...

Source file src/google.golang.org/api/analyticsdata/v1beta/analyticsdata-gen.go

Documentation: google.golang.org/api/analyticsdata/v1beta

     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 analyticsdata provides access to the Google Analytics Data API.
     8  //
     9  // For product documentation, see: https://developers.google.com/analytics/devguides/reporting/data/v1/
    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/analyticsdata/v1beta"
    27  //	...
    28  //	ctx := context.Background()
    29  //	analyticsdataService, err := analyticsdata.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  //	analyticsdataService, err := analyticsdata.NewService(ctx, option.WithScopes(analyticsdata.AnalyticsReadonlyScope))
    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  //	analyticsdataService, err := analyticsdata.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  //	analyticsdataService, err := analyticsdata.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package analyticsdata // import "google.golang.org/api/analyticsdata/v1beta"
    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 = "analyticsdata:v1beta"
    95  const apiName = "analyticsdata"
    96  const apiVersion = "v1beta"
    97  const basePath = "https://analyticsdata.googleapis.com/"
    98  const basePathTemplate = "https://analyticsdata.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://analyticsdata.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// View and manage your Google Analytics data
   104  	AnalyticsScope = "https://www.googleapis.com/auth/analytics"
   105  
   106  	// See and download your Google Analytics data
   107  	AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analytics.readonly"
   108  )
   109  
   110  // NewService creates a new Service.
   111  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   112  	scopesOption := internaloption.WithDefaultScopes(
   113  		"https://www.googleapis.com/auth/analytics",
   114  		"https://www.googleapis.com/auth/analytics.readonly",
   115  	)
   116  	// NOTE: prepend, so we don't override user-specified scopes.
   117  	opts = append([]option.ClientOption{scopesOption}, opts...)
   118  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   119  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   120  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   121  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   122  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   123  	if err != nil {
   124  		return nil, err
   125  	}
   126  	s, err := New(client)
   127  	if err != nil {
   128  		return nil, err
   129  	}
   130  	if endpoint != "" {
   131  		s.BasePath = endpoint
   132  	}
   133  	return s, nil
   134  }
   135  
   136  // New creates a new Service. It uses the provided http.Client for requests.
   137  //
   138  // Deprecated: please use NewService instead.
   139  // To provide a custom HTTP client, use option.WithHTTPClient.
   140  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   141  func New(client *http.Client) (*Service, error) {
   142  	if client == nil {
   143  		return nil, errors.New("client is nil")
   144  	}
   145  	s := &Service{client: client, BasePath: basePath}
   146  	s.Properties = NewPropertiesService(s)
   147  	return s, nil
   148  }
   149  
   150  type Service struct {
   151  	client    *http.Client
   152  	BasePath  string // API endpoint base URL
   153  	UserAgent string // optional additional User-Agent fragment
   154  
   155  	Properties *PropertiesService
   156  }
   157  
   158  func (s *Service) userAgent() string {
   159  	if s.UserAgent == "" {
   160  		return googleapi.UserAgent
   161  	}
   162  	return googleapi.UserAgent + " " + s.UserAgent
   163  }
   164  
   165  func NewPropertiesService(s *Service) *PropertiesService {
   166  	rs := &PropertiesService{s: s}
   167  	rs.AudienceExports = NewPropertiesAudienceExportsService(s)
   168  	return rs
   169  }
   170  
   171  type PropertiesService struct {
   172  	s *Service
   173  
   174  	AudienceExports *PropertiesAudienceExportsService
   175  }
   176  
   177  func NewPropertiesAudienceExportsService(s *Service) *PropertiesAudienceExportsService {
   178  	rs := &PropertiesAudienceExportsService{s: s}
   179  	return rs
   180  }
   181  
   182  type PropertiesAudienceExportsService struct {
   183  	s *Service
   184  }
   185  
   186  // ActiveMetricRestriction: A metric actively restricted in creating the
   187  // report.
   188  type ActiveMetricRestriction struct {
   189  	// MetricName: The name of the restricted metric.
   190  	MetricName string `json:"metricName,omitempty"`
   191  	// RestrictedMetricTypes: The reason for this metric's restriction.
   192  	//
   193  	// Possible values:
   194  	//   "RESTRICTED_METRIC_TYPE_UNSPECIFIED" - Unspecified type.
   195  	//   "COST_DATA" - Cost metrics such as `adCost`.
   196  	//   "REVENUE_DATA" - Revenue metrics such as `purchaseRevenue`.
   197  	RestrictedMetricTypes []string `json:"restrictedMetricTypes,omitempty"`
   198  	// ForceSendFields is a list of field names (e.g. "MetricName") to
   199  	// unconditionally include in API requests. By default, fields with empty or
   200  	// default values are omitted from API requests. See
   201  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   202  	// details.
   203  	ForceSendFields []string `json:"-"`
   204  	// NullFields is a list of field names (e.g. "MetricName") to include in API
   205  	// requests with the JSON null value. By default, fields with empty values are
   206  	// omitted from API requests. See
   207  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   208  	NullFields []string `json:"-"`
   209  }
   210  
   211  func (s *ActiveMetricRestriction) MarshalJSON() ([]byte, error) {
   212  	type NoMethod ActiveMetricRestriction
   213  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   214  }
   215  
   216  // AudienceExport: An audience export is a list of users in an audience at the
   217  // time of the list's creation. One audience may have multiple audience exports
   218  // created for different days.
   219  type AudienceExport struct {
   220  	// Audience: Required. The audience resource name. This resource name
   221  	// identifies the audience being listed and is shared between the Analytics
   222  	// Data & Admin APIs. Format: `properties/{property}/audiences/{audience}`
   223  	Audience string `json:"audience,omitempty"`
   224  	// AudienceDisplayName: Output only. The descriptive display name for this
   225  	// audience. For example, "Purchasers".
   226  	AudienceDisplayName string `json:"audienceDisplayName,omitempty"`
   227  	// BeginCreatingTime: Output only. The time when CreateAudienceExport was
   228  	// called and the AudienceExport began the `CREATING` state.
   229  	BeginCreatingTime string `json:"beginCreatingTime,omitempty"`
   230  	// CreationQuotaTokensCharged: Output only. The total quota tokens charged
   231  	// during creation of the AudienceExport. Because this token count is based on
   232  	// activity from the `CREATING` state, this tokens charged will be fixed once
   233  	// an AudienceExport enters the `ACTIVE` or `FAILED` states.
   234  	CreationQuotaTokensCharged int64 `json:"creationQuotaTokensCharged,omitempty"`
   235  	// Dimensions: Required. The dimensions requested and displayed in the query
   236  	// response.
   237  	Dimensions []*V1betaAudienceDimension `json:"dimensions,omitempty"`
   238  	// ErrorMessage: Output only. Error message is populated when an audience
   239  	// export fails during creation. A common reason for such a failure is quota
   240  	// exhaustion.
   241  	ErrorMessage string `json:"errorMessage,omitempty"`
   242  	// Name: Output only. Identifier. The audience export resource name assigned
   243  	// during creation. This resource name identifies this `AudienceExport`.
   244  	// Format: `properties/{property}/audienceExports/{audience_export}`
   245  	Name string `json:"name,omitempty"`
   246  	// PercentageCompleted: Output only. The percentage completed for this audience
   247  	// export ranging between 0 to 100.
   248  	PercentageCompleted float64 `json:"percentageCompleted,omitempty"`
   249  	// RowCount: Output only. The total number of rows in the AudienceExport
   250  	// result.
   251  	RowCount int64 `json:"rowCount,omitempty"`
   252  	// State: Output only. The current state for this AudienceExport.
   253  	//
   254  	// Possible values:
   255  	//   "STATE_UNSPECIFIED" - Unspecified state will never be used.
   256  	//   "CREATING" - The AudienceExport is currently creating and will be
   257  	// available in the future. Creating occurs immediately after the
   258  	// CreateAudienceExport call.
   259  	//   "ACTIVE" - The AudienceExport is fully created and ready for querying. An
   260  	// AudienceExport is updated to active asynchronously from a request; this
   261  	// occurs some time (for example 15 minutes) after the initial create call.
   262  	//   "FAILED" - The AudienceExport failed to be created. It is possible that
   263  	// re-requesting this audience export will succeed.
   264  	State string `json:"state,omitempty"`
   265  
   266  	// ServerResponse contains the HTTP response code and headers from the server.
   267  	googleapi.ServerResponse `json:"-"`
   268  	// ForceSendFields is a list of field names (e.g. "Audience") to
   269  	// unconditionally include in API requests. By default, fields with empty or
   270  	// default values are omitted from API requests. See
   271  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   272  	// details.
   273  	ForceSendFields []string `json:"-"`
   274  	// NullFields is a list of field names (e.g. "Audience") to include in API
   275  	// requests with the JSON null value. By default, fields with empty values are
   276  	// omitted from API requests. See
   277  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   278  	NullFields []string `json:"-"`
   279  }
   280  
   281  func (s *AudienceExport) MarshalJSON() ([]byte, error) {
   282  	type NoMethod AudienceExport
   283  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   284  }
   285  
   286  func (s *AudienceExport) UnmarshalJSON(data []byte) error {
   287  	type NoMethod AudienceExport
   288  	var s1 struct {
   289  		PercentageCompleted gensupport.JSONFloat64 `json:"percentageCompleted"`
   290  		*NoMethod
   291  	}
   292  	s1.NoMethod = (*NoMethod)(s)
   293  	if err := json.Unmarshal(data, &s1); err != nil {
   294  		return err
   295  	}
   296  	s.PercentageCompleted = float64(s1.PercentageCompleted)
   297  	return nil
   298  }
   299  
   300  // AudienceListMetadata: This metadata is currently blank.
   301  type AudienceListMetadata struct {
   302  }
   303  
   304  // BatchRunPivotReportsRequest: The batch request containing multiple pivot
   305  // report requests.
   306  type BatchRunPivotReportsRequest struct {
   307  	// Requests: Individual requests. Each request has a separate pivot report
   308  	// response. Each batch request is allowed up to 5 requests.
   309  	Requests []*RunPivotReportRequest `json:"requests,omitempty"`
   310  	// ForceSendFields is a list of field names (e.g. "Requests") to
   311  	// unconditionally include in API requests. By default, fields with empty or
   312  	// default values are omitted from API requests. See
   313  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   314  	// details.
   315  	ForceSendFields []string `json:"-"`
   316  	// NullFields is a list of field names (e.g. "Requests") to include in API
   317  	// requests with the JSON null value. By default, fields with empty values are
   318  	// omitted from API requests. See
   319  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   320  	NullFields []string `json:"-"`
   321  }
   322  
   323  func (s *BatchRunPivotReportsRequest) MarshalJSON() ([]byte, error) {
   324  	type NoMethod BatchRunPivotReportsRequest
   325  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   326  }
   327  
   328  // BatchRunPivotReportsResponse: The batch response containing multiple pivot
   329  // reports.
   330  type BatchRunPivotReportsResponse struct {
   331  	// Kind: Identifies what kind of resource this message is. This `kind` is
   332  	// always the fixed string "analyticsData#batchRunPivotReports". Useful to
   333  	// distinguish between response types in JSON.
   334  	Kind string `json:"kind,omitempty"`
   335  	// PivotReports: Individual responses. Each response has a separate pivot
   336  	// report request.
   337  	PivotReports []*RunPivotReportResponse `json:"pivotReports,omitempty"`
   338  
   339  	// ServerResponse contains the HTTP response code and headers from the server.
   340  	googleapi.ServerResponse `json:"-"`
   341  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
   342  	// include in API requests. By default, fields with empty or default values are
   343  	// omitted from API requests. See
   344  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   345  	// details.
   346  	ForceSendFields []string `json:"-"`
   347  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
   348  	// with the JSON null value. By default, fields with empty values are omitted
   349  	// from API requests. See
   350  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   351  	NullFields []string `json:"-"`
   352  }
   353  
   354  func (s *BatchRunPivotReportsResponse) MarshalJSON() ([]byte, error) {
   355  	type NoMethod BatchRunPivotReportsResponse
   356  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   357  }
   358  
   359  // BatchRunReportsRequest: The batch request containing multiple report
   360  // requests.
   361  type BatchRunReportsRequest struct {
   362  	// Requests: Individual requests. Each request has a separate report response.
   363  	// Each batch request is allowed up to 5 requests.
   364  	Requests []*RunReportRequest `json:"requests,omitempty"`
   365  	// ForceSendFields is a list of field names (e.g. "Requests") to
   366  	// unconditionally include in API requests. By default, fields with empty or
   367  	// default values are omitted from API requests. See
   368  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   369  	// details.
   370  	ForceSendFields []string `json:"-"`
   371  	// NullFields is a list of field names (e.g. "Requests") to include in API
   372  	// requests with the JSON null value. By default, fields with empty values are
   373  	// omitted from API requests. See
   374  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   375  	NullFields []string `json:"-"`
   376  }
   377  
   378  func (s *BatchRunReportsRequest) MarshalJSON() ([]byte, error) {
   379  	type NoMethod BatchRunReportsRequest
   380  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   381  }
   382  
   383  // BatchRunReportsResponse: The batch response containing multiple reports.
   384  type BatchRunReportsResponse struct {
   385  	// Kind: Identifies what kind of resource this message is. This `kind` is
   386  	// always the fixed string "analyticsData#batchRunReports". Useful to
   387  	// distinguish between response types in JSON.
   388  	Kind string `json:"kind,omitempty"`
   389  	// Reports: Individual responses. Each response has a separate report request.
   390  	Reports []*RunReportResponse `json:"reports,omitempty"`
   391  
   392  	// ServerResponse contains the HTTP response code and headers from the server.
   393  	googleapi.ServerResponse `json:"-"`
   394  	// ForceSendFields is a list of field names (e.g. "Kind") to unconditionally
   395  	// include in API requests. By default, fields with empty or default values are
   396  	// omitted from API requests. See
   397  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   398  	// details.
   399  	ForceSendFields []string `json:"-"`
   400  	// NullFields is a list of field names (e.g. "Kind") to include in API requests
   401  	// with the JSON null value. By default, fields with empty values are omitted
   402  	// from API requests. See
   403  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   404  	NullFields []string `json:"-"`
   405  }
   406  
   407  func (s *BatchRunReportsResponse) MarshalJSON() ([]byte, error) {
   408  	type NoMethod BatchRunReportsResponse
   409  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   410  }
   411  
   412  // BetweenFilter: To express that the result needs to be between two numbers
   413  // (inclusive).
   414  type BetweenFilter struct {
   415  	// FromValue: Begins with this number.
   416  	FromValue *NumericValue `json:"fromValue,omitempty"`
   417  	// ToValue: Ends with this number.
   418  	ToValue *NumericValue `json:"toValue,omitempty"`
   419  	// ForceSendFields is a list of field names (e.g. "FromValue") to
   420  	// unconditionally include in API requests. By default, fields with empty or
   421  	// default values are omitted from API requests. See
   422  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   423  	// details.
   424  	ForceSendFields []string `json:"-"`
   425  	// NullFields is a list of field names (e.g. "FromValue") to include in API
   426  	// requests with the JSON null value. By default, fields with empty values are
   427  	// omitted from API requests. See
   428  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   429  	NullFields []string `json:"-"`
   430  }
   431  
   432  func (s *BetweenFilter) MarshalJSON() ([]byte, error) {
   433  	type NoMethod BetweenFilter
   434  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   435  }
   436  
   437  // CaseExpression: Used to convert a dimension value to a single case.
   438  type CaseExpression struct {
   439  	// DimensionName: Name of a dimension. The name must refer back to a name in
   440  	// dimensions field of the request.
   441  	DimensionName string `json:"dimensionName,omitempty"`
   442  	// ForceSendFields is a list of field names (e.g. "DimensionName") to
   443  	// unconditionally include in API requests. By default, fields with empty or
   444  	// default values are omitted from API requests. See
   445  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   446  	// details.
   447  	ForceSendFields []string `json:"-"`
   448  	// NullFields is a list of field names (e.g. "DimensionName") to include in API
   449  	// requests with the JSON null value. By default, fields with empty values are
   450  	// omitted from API requests. See
   451  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   452  	NullFields []string `json:"-"`
   453  }
   454  
   455  func (s *CaseExpression) MarshalJSON() ([]byte, error) {
   456  	type NoMethod CaseExpression
   457  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   458  }
   459  
   460  // CheckCompatibilityRequest: The request for compatibility information for a
   461  // report's dimensions and metrics. Check compatibility provides a preview of
   462  // the compatibility of a report; fields shared with the `runReport` request
   463  // should be the same values as in your `runReport` request.
   464  type CheckCompatibilityRequest struct {
   465  	// CompatibilityFilter: Filters the dimensions and metrics in the response to
   466  	// just this compatibility. Commonly used as `”compatibilityFilter”:
   467  	// “COMPATIBLE”` to only return compatible dimensions & metrics.
   468  	//
   469  	// Possible values:
   470  	//   "COMPATIBILITY_UNSPECIFIED" - Unspecified compatibility.
   471  	//   "COMPATIBLE" - The dimension or metric is compatible. This dimension or
   472  	// metric can be successfully added to a report.
   473  	//   "INCOMPATIBLE" - The dimension or metric is incompatible. This dimension
   474  	// or metric cannot be successfully added to a report.
   475  	CompatibilityFilter string `json:"compatibilityFilter,omitempty"`
   476  	// DimensionFilter: The filter clause of dimensions. `dimensionFilter` should
   477  	// be the same value as in your `runReport` request.
   478  	DimensionFilter *FilterExpression `json:"dimensionFilter,omitempty"`
   479  	// Dimensions: The dimensions in this report. `dimensions` should be the same
   480  	// value as in your `runReport` request.
   481  	Dimensions []*Dimension `json:"dimensions,omitempty"`
   482  	// MetricFilter: The filter clause of metrics. `metricFilter` should be the
   483  	// same value as in your `runReport` request
   484  	MetricFilter *FilterExpression `json:"metricFilter,omitempty"`
   485  	// Metrics: The metrics in this report. `metrics` should be the same value as
   486  	// in your `runReport` request.
   487  	Metrics []*Metric `json:"metrics,omitempty"`
   488  	// ForceSendFields is a list of field names (e.g. "CompatibilityFilter") to
   489  	// unconditionally include in API requests. By default, fields with empty or
   490  	// default values are omitted from API requests. See
   491  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   492  	// details.
   493  	ForceSendFields []string `json:"-"`
   494  	// NullFields is a list of field names (e.g. "CompatibilityFilter") to include
   495  	// in API requests with the JSON null value. By default, fields with empty
   496  	// values are omitted from API requests. See
   497  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   498  	NullFields []string `json:"-"`
   499  }
   500  
   501  func (s *CheckCompatibilityRequest) MarshalJSON() ([]byte, error) {
   502  	type NoMethod CheckCompatibilityRequest
   503  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   504  }
   505  
   506  // CheckCompatibilityResponse: The compatibility response with the
   507  // compatibility of each dimension & metric.
   508  type CheckCompatibilityResponse struct {
   509  	// DimensionCompatibilities: The compatibility of each dimension.
   510  	DimensionCompatibilities []*DimensionCompatibility `json:"dimensionCompatibilities,omitempty"`
   511  	// MetricCompatibilities: The compatibility of each metric.
   512  	MetricCompatibilities []*MetricCompatibility `json:"metricCompatibilities,omitempty"`
   513  
   514  	// ServerResponse contains the HTTP response code and headers from the server.
   515  	googleapi.ServerResponse `json:"-"`
   516  	// ForceSendFields is a list of field names (e.g. "DimensionCompatibilities")
   517  	// to unconditionally include in API requests. By default, fields with empty or
   518  	// default values are omitted from API requests. See
   519  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   520  	// details.
   521  	ForceSendFields []string `json:"-"`
   522  	// NullFields is a list of field names (e.g. "DimensionCompatibilities") to
   523  	// include in API requests with the JSON null value. By default, fields with
   524  	// empty values are omitted from API requests. See
   525  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   526  	NullFields []string `json:"-"`
   527  }
   528  
   529  func (s *CheckCompatibilityResponse) MarshalJSON() ([]byte, error) {
   530  	type NoMethod CheckCompatibilityResponse
   531  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   532  }
   533  
   534  // Cohort: Defines a cohort selection criteria. A cohort is a group of users
   535  // who share a common characteristic. For example, users with the same
   536  // `firstSessionDate` belong to the same cohort.
   537  type Cohort struct {
   538  	// DateRange: The cohort selects users whose first touch date is between start
   539  	// date and end date defined in the `dateRange`. This `dateRange` does not
   540  	// specify the full date range of event data that is present in a cohort
   541  	// report. In a cohort report, this `dateRange` is extended by the granularity
   542  	// and offset present in the `cohortsRange`; event data for the extended
   543  	// reporting date range is present in a cohort report. In a cohort request,
   544  	// this `dateRange` is required and the `dateRanges` in the `RunReportRequest`
   545  	// or `RunPivotReportRequest` must be unspecified. This `dateRange` should
   546  	// generally be aligned with the cohort's granularity. If `CohortsRange` uses
   547  	// daily granularity, this `dateRange` can be a single day. If `CohortsRange`
   548  	// uses weekly granularity, this `dateRange` can be aligned to a week boundary,
   549  	// starting at Sunday and ending Saturday. If `CohortsRange` uses monthly
   550  	// granularity, this `dateRange` can be aligned to a month, starting at the
   551  	// first and ending on the last day of the month.
   552  	DateRange *DateRange `json:"dateRange,omitempty"`
   553  	// Dimension: Dimension used by the cohort. Required and only supports
   554  	// `firstSessionDate`.
   555  	Dimension string `json:"dimension,omitempty"`
   556  	// Name: Assigns a name to this cohort. The dimension `cohort` is valued to
   557  	// this name in a report response. If set, cannot begin with `cohort_` or
   558  	// `RESERVED_`. If not set, cohorts are named by their zero based index
   559  	// `cohort_0`, `cohort_1`, etc.
   560  	Name string `json:"name,omitempty"`
   561  	// ForceSendFields is a list of field names (e.g. "DateRange") to
   562  	// unconditionally include in API requests. By default, fields with empty or
   563  	// default values are omitted from API requests. See
   564  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   565  	// details.
   566  	ForceSendFields []string `json:"-"`
   567  	// NullFields is a list of field names (e.g. "DateRange") to include in API
   568  	// requests with the JSON null value. By default, fields with empty values are
   569  	// omitted from API requests. See
   570  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   571  	NullFields []string `json:"-"`
   572  }
   573  
   574  func (s *Cohort) MarshalJSON() ([]byte, error) {
   575  	type NoMethod Cohort
   576  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   577  }
   578  
   579  // CohortReportSettings: Optional settings of a cohort report.
   580  type CohortReportSettings struct {
   581  	// Accumulate: If true, accumulates the result from first touch day to the end
   582  	// day. Not supported in `RunReportRequest`.
   583  	Accumulate bool `json:"accumulate,omitempty"`
   584  	// ForceSendFields is a list of field names (e.g. "Accumulate") to
   585  	// unconditionally include in API requests. By default, fields with empty or
   586  	// default values are omitted from API requests. See
   587  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   588  	// details.
   589  	ForceSendFields []string `json:"-"`
   590  	// NullFields is a list of field names (e.g. "Accumulate") to include in API
   591  	// requests with the JSON null value. By default, fields with empty values are
   592  	// omitted from API requests. See
   593  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   594  	NullFields []string `json:"-"`
   595  }
   596  
   597  func (s *CohortReportSettings) MarshalJSON() ([]byte, error) {
   598  	type NoMethod CohortReportSettings
   599  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   600  }
   601  
   602  // CohortSpec: The specification of cohorts for a cohort report. Cohort reports
   603  // create a time series of user retention for the cohort. For example, you
   604  // could select the cohort of users that were acquired in the first week of
   605  // September and follow that cohort for the next six weeks. Selecting the users
   606  // acquired in the first week of September cohort is specified in the `cohort`
   607  // object. Following that cohort for the next six weeks is specified in the
   608  // `cohortsRange` object. For examples, see Cohort Report Examples
   609  // (https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples).
   610  // The report response could show a weekly time series where say your app has
   611  // retained 60% of this cohort after three weeks and 25% of this cohort after
   612  // six weeks. These two percentages can be calculated by the metric
   613  // `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the
   614  // report.
   615  type CohortSpec struct {
   616  	// CohortReportSettings: Optional settings for a cohort report.
   617  	CohortReportSettings *CohortReportSettings `json:"cohortReportSettings,omitempty"`
   618  	// Cohorts: Defines the selection criteria to group users into cohorts. Most
   619  	// cohort reports define only a single cohort. If multiple cohorts are
   620  	// specified, each cohort can be recognized in the report by their name.
   621  	Cohorts []*Cohort `json:"cohorts,omitempty"`
   622  	// CohortsRange: Cohort reports follow cohorts over an extended reporting date
   623  	// range. This range specifies an offset duration to follow the cohorts over.
   624  	CohortsRange *CohortsRange `json:"cohortsRange,omitempty"`
   625  	// ForceSendFields is a list of field names (e.g. "CohortReportSettings") to
   626  	// unconditionally include in API requests. By default, fields with empty or
   627  	// default values are omitted from API requests. See
   628  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   629  	// details.
   630  	ForceSendFields []string `json:"-"`
   631  	// NullFields is a list of field names (e.g. "CohortReportSettings") to include
   632  	// in API requests with the JSON null value. By default, fields with empty
   633  	// values are omitted from API requests. See
   634  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   635  	NullFields []string `json:"-"`
   636  }
   637  
   638  func (s *CohortSpec) MarshalJSON() ([]byte, error) {
   639  	type NoMethod CohortSpec
   640  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   641  }
   642  
   643  // CohortsRange: Configures the extended reporting date range for a cohort
   644  // report. Specifies an offset duration to follow the cohorts over.
   645  type CohortsRange struct {
   646  	// EndOffset: Required. `endOffset` specifies the end date of the extended
   647  	// reporting date range for a cohort report. `endOffset` can be any positive
   648  	// integer but is commonly set to 5 to 10 so that reports contain data on the
   649  	// cohort for the next several granularity time periods. If `granularity` is
   650  	// `DAILY`, the `endDate` of the extended reporting date range is `endDate` of
   651  	// the cohort plus `endOffset` days. If `granularity` is `WEEKLY`, the
   652  	// `endDate` of the extended reporting date range is `endDate` of the cohort
   653  	// plus `endOffset * 7` days. If `granularity` is `MONTHLY`, the `endDate` of
   654  	// the extended reporting date range is `endDate` of the cohort plus `endOffset
   655  	// * 30` days.
   656  	EndOffset int64 `json:"endOffset,omitempty"`
   657  	// Granularity: Required. The granularity used to interpret the `startOffset`
   658  	// and `endOffset` for the extended reporting date range for a cohort report.
   659  	//
   660  	// Possible values:
   661  	//   "GRANULARITY_UNSPECIFIED" - Should never be specified.
   662  	//   "DAILY" - Daily granularity. Commonly used if the cohort's `dateRange` is
   663  	// a single day and the request contains `cohortNthDay`.
   664  	//   "WEEKLY" - Weekly granularity. Commonly used if the cohort's `dateRange`
   665  	// is a week in duration (starting on Sunday and ending on Saturday) and the
   666  	// request contains `cohortNthWeek`.
   667  	//   "MONTHLY" - Monthly granularity. Commonly used if the cohort's `dateRange`
   668  	// is a month in duration and the request contains `cohortNthMonth`.
   669  	Granularity string `json:"granularity,omitempty"`
   670  	// StartOffset: `startOffset` specifies the start date of the extended
   671  	// reporting date range for a cohort report. `startOffset` is commonly set to 0
   672  	// so that reports contain data from the acquisition of the cohort forward. If
   673  	// `granularity` is `DAILY`, the `startDate` of the extended reporting date
   674  	// range is `startDate` of the cohort plus `startOffset` days. If `granularity`
   675  	// is `WEEKLY`, the `startDate` of the extended reporting date range is
   676  	// `startDate` of the cohort plus `startOffset * 7` days. If `granularity` is
   677  	// `MONTHLY`, the `startDate` of the extended reporting date range is
   678  	// `startDate` of the cohort plus `startOffset * 30` days.
   679  	StartOffset int64 `json:"startOffset,omitempty"`
   680  	// ForceSendFields is a list of field names (e.g. "EndOffset") to
   681  	// unconditionally include in API requests. By default, fields with empty or
   682  	// default values are omitted from API requests. See
   683  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   684  	// details.
   685  	ForceSendFields []string `json:"-"`
   686  	// NullFields is a list of field names (e.g. "EndOffset") to include in API
   687  	// requests with the JSON null value. By default, fields with empty values are
   688  	// omitted from API requests. See
   689  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   690  	NullFields []string `json:"-"`
   691  }
   692  
   693  func (s *CohortsRange) MarshalJSON() ([]byte, error) {
   694  	type NoMethod CohortsRange
   695  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   696  }
   697  
   698  // Comparison: Defines an individual comparison. Most requests will include
   699  // multiple comparisons so that the report compares between the comparisons.
   700  type Comparison struct {
   701  	// Comparison: A saved comparison identified by the comparison's resource name.
   702  	// For example, 'comparisons/1234'.
   703  	Comparison string `json:"comparison,omitempty"`
   704  	// DimensionFilter: A basic comparison.
   705  	DimensionFilter *FilterExpression `json:"dimensionFilter,omitempty"`
   706  	// Name: Each comparison produces separate rows in the response. In the
   707  	// response, this comparison is identified by this name. If name is
   708  	// unspecified, we will use the saved comparisons display name.
   709  	Name string `json:"name,omitempty"`
   710  	// ForceSendFields is a list of field names (e.g. "Comparison") to
   711  	// unconditionally include in API requests. By default, fields with empty or
   712  	// default values are omitted from API requests. See
   713  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   714  	// details.
   715  	ForceSendFields []string `json:"-"`
   716  	// NullFields is a list of field names (e.g. "Comparison") to include in API
   717  	// requests with the JSON null value. By default, fields with empty values are
   718  	// omitted from API requests. See
   719  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   720  	NullFields []string `json:"-"`
   721  }
   722  
   723  func (s *Comparison) MarshalJSON() ([]byte, error) {
   724  	type NoMethod Comparison
   725  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   726  }
   727  
   728  // ComparisonMetadata: The metadata for a single comparison.
   729  type ComparisonMetadata struct {
   730  	// ApiName: This comparison's resource name. Useable in Comparison
   731  	// (#Comparison)'s `comparison` field. For example, 'comparisons/1234'.
   732  	ApiName string `json:"apiName,omitempty"`
   733  	// Description: This comparison's description.
   734  	Description string `json:"description,omitempty"`
   735  	// UiName: This comparison's name within the Google Analytics user interface.
   736  	UiName string `json:"uiName,omitempty"`
   737  	// ForceSendFields is a list of field names (e.g. "ApiName") to unconditionally
   738  	// include in API requests. By default, fields with empty or default values are
   739  	// omitted from API requests. See
   740  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   741  	// details.
   742  	ForceSendFields []string `json:"-"`
   743  	// NullFields is a list of field names (e.g. "ApiName") to include in API
   744  	// requests with the JSON null value. By default, fields with empty values are
   745  	// omitted from API requests. See
   746  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   747  	NullFields []string `json:"-"`
   748  }
   749  
   750  func (s *ComparisonMetadata) MarshalJSON() ([]byte, error) {
   751  	type NoMethod ComparisonMetadata
   752  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   753  }
   754  
   755  // ConcatenateExpression: Used to combine dimension values to a single
   756  // dimension.
   757  type ConcatenateExpression struct {
   758  	// Delimiter: The delimiter placed between dimension names. Delimiters are
   759  	// often single characters such as "|" or "," but can be longer strings. If a
   760  	// dimension value contains the delimiter, both will be present in response
   761  	// with no distinction. For example if dimension 1 value = "US,FR", dimension 2
   762  	// value = "JP", and delimiter = ",", then the response will contain
   763  	// "US,FR,JP".
   764  	Delimiter string `json:"delimiter,omitempty"`
   765  	// DimensionNames: Names of dimensions. The names must refer back to names in
   766  	// the dimensions field of the request.
   767  	DimensionNames []string `json:"dimensionNames,omitempty"`
   768  	// ForceSendFields is a list of field names (e.g. "Delimiter") to
   769  	// unconditionally include in API requests. By default, fields with empty or
   770  	// default values are omitted from API requests. See
   771  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   772  	// details.
   773  	ForceSendFields []string `json:"-"`
   774  	// NullFields is a list of field names (e.g. "Delimiter") to include in API
   775  	// requests with the JSON null value. By default, fields with empty values are
   776  	// omitted from API requests. See
   777  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   778  	NullFields []string `json:"-"`
   779  }
   780  
   781  func (s *ConcatenateExpression) MarshalJSON() ([]byte, error) {
   782  	type NoMethod ConcatenateExpression
   783  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   784  }
   785  
   786  // DateRange: A contiguous set of days: `startDate`, `startDate + 1`, ...,
   787  // `endDate`. Requests are allowed up to 4 date ranges.
   788  type DateRange struct {
   789  	// EndDate: The inclusive end date for the query in the format `YYYY-MM-DD`.
   790  	// Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or
   791  	// `today` is also accepted, and in that case, the date is inferred based on
   792  	// the property's reporting time zone.
   793  	EndDate string `json:"endDate,omitempty"`
   794  	// Name: Assigns a name to this date range. The dimension `dateRange` is valued
   795  	// to this name in a report response. If set, cannot begin with `date_range_`
   796  	// or `RESERVED_`. If not set, date ranges are named by their zero based index
   797  	// in the request: `date_range_0`, `date_range_1`, etc.
   798  	Name string `json:"name,omitempty"`
   799  	// StartDate: The inclusive start date for the query in the format
   800  	// `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`,
   801  	// `yesterday`, or `today` is also accepted, and in that case, the date is
   802  	// inferred based on the property's reporting time zone.
   803  	StartDate string `json:"startDate,omitempty"`
   804  	// ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally
   805  	// include in API requests. By default, fields with empty or default values are
   806  	// omitted from API requests. See
   807  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   808  	// details.
   809  	ForceSendFields []string `json:"-"`
   810  	// NullFields is a list of field names (e.g. "EndDate") to include in API
   811  	// requests with the JSON null value. By default, fields with empty values are
   812  	// omitted from API requests. See
   813  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   814  	NullFields []string `json:"-"`
   815  }
   816  
   817  func (s *DateRange) MarshalJSON() ([]byte, error) {
   818  	type NoMethod DateRange
   819  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   820  }
   821  
   822  // Dimension: Dimensions are attributes of your data. For example, the
   823  // dimension city indicates the city from which an event originates. Dimension
   824  // values in report responses are strings; for example, the city could be
   825  // "Paris" or "New York". Requests are allowed up to 9 dimensions.
   826  type Dimension struct {
   827  	// DimensionExpression: One dimension can be the result of an expression of
   828  	// multiple dimensions. For example, dimension "country, city":
   829  	// concatenate(country, ", ", city).
   830  	DimensionExpression *DimensionExpression `json:"dimensionExpression,omitempty"`
   831  	// Name: The name of the dimension. See the API Dimensions
   832  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
   833  	// for the list of dimension names supported by core reporting methods such as
   834  	// `runReport` and `batchRunReports`. See Realtime Dimensions
   835  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions)
   836  	// for the list of dimension names supported by the `runRealtimeReport` method.
   837  	// See Funnel Dimensions
   838  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions)
   839  	// for the list of dimension names supported by the `runFunnelReport` method.
   840  	// If `dimensionExpression` is specified, `name` can be any string that you
   841  	// would like within the allowed character set. For example if a
   842  	// `dimensionExpression` concatenates `country` and `city`, you could call that
   843  	// dimension `countryAndCity`. Dimension names that you choose must match the
   844  	// regular expression `^[a-zA-Z0-9_]$`. Dimensions are referenced by `name` in
   845  	// `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.
   846  	Name string `json:"name,omitempty"`
   847  	// ForceSendFields is a list of field names (e.g. "DimensionExpression") to
   848  	// unconditionally include in API requests. By default, fields with empty or
   849  	// default values are omitted from API requests. See
   850  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   851  	// details.
   852  	ForceSendFields []string `json:"-"`
   853  	// NullFields is a list of field names (e.g. "DimensionExpression") to include
   854  	// in API requests with the JSON null value. By default, fields with empty
   855  	// values are omitted from API requests. See
   856  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   857  	NullFields []string `json:"-"`
   858  }
   859  
   860  func (s *Dimension) MarshalJSON() ([]byte, error) {
   861  	type NoMethod Dimension
   862  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   863  }
   864  
   865  // DimensionCompatibility: The compatibility for a single dimension.
   866  type DimensionCompatibility struct {
   867  	// Compatibility: The compatibility of this dimension. If the compatibility is
   868  	// COMPATIBLE, this dimension can be successfully added to the report.
   869  	//
   870  	// Possible values:
   871  	//   "COMPATIBILITY_UNSPECIFIED" - Unspecified compatibility.
   872  	//   "COMPATIBLE" - The dimension or metric is compatible. This dimension or
   873  	// metric can be successfully added to a report.
   874  	//   "INCOMPATIBLE" - The dimension or metric is incompatible. This dimension
   875  	// or metric cannot be successfully added to a report.
   876  	Compatibility string `json:"compatibility,omitempty"`
   877  	// DimensionMetadata: The dimension metadata contains the API name for this
   878  	// compatibility information. The dimension metadata also contains other
   879  	// helpful information like the UI name and description.
   880  	DimensionMetadata *DimensionMetadata `json:"dimensionMetadata,omitempty"`
   881  	// ForceSendFields is a list of field names (e.g. "Compatibility") to
   882  	// unconditionally include in API requests. By default, fields with empty or
   883  	// default values are omitted from API requests. See
   884  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   885  	// details.
   886  	ForceSendFields []string `json:"-"`
   887  	// NullFields is a list of field names (e.g. "Compatibility") to include in API
   888  	// requests with the JSON null value. By default, fields with empty values are
   889  	// omitted from API requests. See
   890  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   891  	NullFields []string `json:"-"`
   892  }
   893  
   894  func (s *DimensionCompatibility) MarshalJSON() ([]byte, error) {
   895  	type NoMethod DimensionCompatibility
   896  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   897  }
   898  
   899  // DimensionExpression: Used to express a dimension which is the result of a
   900  // formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2)
   901  // concatenate(dimension1, symbol, dimension2).
   902  type DimensionExpression struct {
   903  	// Concatenate: Used to combine dimension values to a single dimension. For
   904  	// example, dimension "country, city": concatenate(country, ", ", city).
   905  	Concatenate *ConcatenateExpression `json:"concatenate,omitempty"`
   906  	// LowerCase: Used to convert a dimension value to lower case.
   907  	LowerCase *CaseExpression `json:"lowerCase,omitempty"`
   908  	// UpperCase: Used to convert a dimension value to upper case.
   909  	UpperCase *CaseExpression `json:"upperCase,omitempty"`
   910  	// ForceSendFields is a list of field names (e.g. "Concatenate") to
   911  	// unconditionally include in API requests. By default, fields with empty or
   912  	// default values are omitted from API requests. See
   913  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   914  	// details.
   915  	ForceSendFields []string `json:"-"`
   916  	// NullFields is a list of field names (e.g. "Concatenate") to include in API
   917  	// requests with the JSON null value. By default, fields with empty values are
   918  	// omitted from API requests. See
   919  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   920  	NullFields []string `json:"-"`
   921  }
   922  
   923  func (s *DimensionExpression) MarshalJSON() ([]byte, error) {
   924  	type NoMethod DimensionExpression
   925  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   926  }
   927  
   928  // DimensionHeader: Describes a dimension column in the report. Dimensions
   929  // requested in a report produce column entries within rows and
   930  // DimensionHeaders. However, dimensions used exclusively within filters or
   931  // expressions do not produce columns in a report; correspondingly, those
   932  // dimensions do not produce headers.
   933  type DimensionHeader struct {
   934  	// Name: The dimension's name.
   935  	Name string `json:"name,omitempty"`
   936  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   937  	// include in API requests. By default, fields with empty or default values are
   938  	// omitted from API requests. See
   939  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   940  	// details.
   941  	ForceSendFields []string `json:"-"`
   942  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   943  	// with the JSON null value. By default, fields with empty values are omitted
   944  	// from API requests. See
   945  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   946  	NullFields []string `json:"-"`
   947  }
   948  
   949  func (s *DimensionHeader) MarshalJSON() ([]byte, error) {
   950  	type NoMethod DimensionHeader
   951  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   952  }
   953  
   954  // DimensionMetadata: Explains a dimension.
   955  type DimensionMetadata struct {
   956  	// ApiName: This dimension's name. Useable in Dimension (#Dimension)'s `name`.
   957  	// For example, `eventName`.
   958  	ApiName string `json:"apiName,omitempty"`
   959  	// Category: The display name of the category that this dimension belongs to.
   960  	// Similar dimensions and metrics are categorized together.
   961  	Category string `json:"category,omitempty"`
   962  	// CustomDefinition: True if the dimension is custom to this property. This
   963  	// includes user, event, & item scoped custom dimensions; to learn more about
   964  	// custom dimensions, see https://support.google.com/analytics/answer/14240153.
   965  	// This also include custom channel groups; to learn more about custom channel
   966  	// groups, see https://support.google.com/analytics/answer/13051316.
   967  	CustomDefinition bool `json:"customDefinition,omitempty"`
   968  	// DeprecatedApiNames: Still usable but deprecated names for this dimension. If
   969  	// populated, this dimension is available by either `apiName` or one of
   970  	// `deprecatedApiNames` for a period of time. After the deprecation period, the
   971  	// dimension will be available only by `apiName`.
   972  	DeprecatedApiNames []string `json:"deprecatedApiNames,omitempty"`
   973  	// Description: Description of how this dimension is used and calculated.
   974  	Description string `json:"description,omitempty"`
   975  	// UiName: This dimension's name within the Google Analytics user interface.
   976  	// For example, `Event name`.
   977  	UiName string `json:"uiName,omitempty"`
   978  	// ForceSendFields is a list of field names (e.g. "ApiName") to unconditionally
   979  	// include in API requests. By default, fields with empty or default values are
   980  	// omitted from API requests. See
   981  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   982  	// details.
   983  	ForceSendFields []string `json:"-"`
   984  	// NullFields is a list of field names (e.g. "ApiName") to include in API
   985  	// requests with the JSON null value. By default, fields with empty values are
   986  	// omitted from API requests. See
   987  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   988  	NullFields []string `json:"-"`
   989  }
   990  
   991  func (s *DimensionMetadata) MarshalJSON() ([]byte, error) {
   992  	type NoMethod DimensionMetadata
   993  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   994  }
   995  
   996  // DimensionOrderBy: Sorts by dimension values.
   997  type DimensionOrderBy struct {
   998  	// DimensionName: A dimension name in the request to order by.
   999  	DimensionName string `json:"dimensionName,omitempty"`
  1000  	// OrderType: Controls the rule for dimension value ordering.
  1001  	//
  1002  	// Possible values:
  1003  	//   "ORDER_TYPE_UNSPECIFIED" - Unspecified.
  1004  	//   "ALPHANUMERIC" - Alphanumeric sort by Unicode code point. For example, "2"
  1005  	// < "A" < "X" < "b" < "z".
  1006  	//   "CASE_INSENSITIVE_ALPHANUMERIC" - Case insensitive alphanumeric sort by
  1007  	// lower case Unicode code point. For example, "2" < "A" < "b" < "X" < "z".
  1008  	//   "NUMERIC" - Dimension values are converted to numbers before sorting. For
  1009  	// example in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" <
  1010  	// "25". Non-numeric dimension values all have equal ordering value below all
  1011  	// numeric values.
  1012  	OrderType string `json:"orderType,omitempty"`
  1013  	// ForceSendFields is a list of field names (e.g. "DimensionName") to
  1014  	// unconditionally include in API requests. By default, fields with empty or
  1015  	// default values are omitted from API requests. See
  1016  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1017  	// details.
  1018  	ForceSendFields []string `json:"-"`
  1019  	// NullFields is a list of field names (e.g. "DimensionName") to include in API
  1020  	// requests with the JSON null value. By default, fields with empty values are
  1021  	// omitted from API requests. See
  1022  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1023  	NullFields []string `json:"-"`
  1024  }
  1025  
  1026  func (s *DimensionOrderBy) MarshalJSON() ([]byte, error) {
  1027  	type NoMethod DimensionOrderBy
  1028  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1029  }
  1030  
  1031  // DimensionValue: The value of a dimension.
  1032  type DimensionValue struct {
  1033  	// Value: Value as a string if the dimension type is a string.
  1034  	Value string `json:"value,omitempty"`
  1035  	// ForceSendFields is a list of field names (e.g. "Value") to unconditionally
  1036  	// include in API requests. By default, fields with empty or default values are
  1037  	// omitted from API requests. See
  1038  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1039  	// details.
  1040  	ForceSendFields []string `json:"-"`
  1041  	// NullFields is a list of field names (e.g. "Value") to include in API
  1042  	// requests with the JSON null value. By default, fields with empty values are
  1043  	// omitted from API requests. See
  1044  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1045  	NullFields []string `json:"-"`
  1046  }
  1047  
  1048  func (s *DimensionValue) MarshalJSON() ([]byte, error) {
  1049  	type NoMethod DimensionValue
  1050  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1051  }
  1052  
  1053  // Filter: An expression to filter dimension or metric values.
  1054  type Filter struct {
  1055  	// BetweenFilter: A filter for two values.
  1056  	BetweenFilter *BetweenFilter `json:"betweenFilter,omitempty"`
  1057  	// FieldName: The dimension name or metric name. In most methods, dimensions &
  1058  	// metrics can be used for the first time in this field. However in a
  1059  	// RunPivotReportRequest, this field must be additionally specified by name in
  1060  	// the RunPivotReportRequest's dimensions or metrics.
  1061  	FieldName string `json:"fieldName,omitempty"`
  1062  	// InListFilter: A filter for in list values.
  1063  	InListFilter *InListFilter `json:"inListFilter,omitempty"`
  1064  	// NumericFilter: A filter for numeric or date values.
  1065  	NumericFilter *NumericFilter `json:"numericFilter,omitempty"`
  1066  	// StringFilter: Strings related filter.
  1067  	StringFilter *StringFilter `json:"stringFilter,omitempty"`
  1068  	// ForceSendFields is a list of field names (e.g. "BetweenFilter") to
  1069  	// unconditionally include in API requests. By default, fields with empty or
  1070  	// default values are omitted from API requests. See
  1071  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1072  	// details.
  1073  	ForceSendFields []string `json:"-"`
  1074  	// NullFields is a list of field names (e.g. "BetweenFilter") to include in API
  1075  	// requests with the JSON null value. By default, fields with empty values are
  1076  	// omitted from API requests. See
  1077  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1078  	NullFields []string `json:"-"`
  1079  }
  1080  
  1081  func (s *Filter) MarshalJSON() ([]byte, error) {
  1082  	type NoMethod Filter
  1083  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1084  }
  1085  
  1086  // FilterExpression: To express dimension or metric filters. The fields in the
  1087  // same FilterExpression need to be either all dimensions or all metrics.
  1088  type FilterExpression struct {
  1089  	// AndGroup: The FilterExpressions in and_group have an AND relationship.
  1090  	AndGroup *FilterExpressionList `json:"andGroup,omitempty"`
  1091  	// Filter: A primitive filter. In the same FilterExpression, all of the
  1092  	// filter's field names need to be either all dimensions or all metrics.
  1093  	Filter *Filter `json:"filter,omitempty"`
  1094  	// NotExpression: The FilterExpression is NOT of not_expression.
  1095  	NotExpression *FilterExpression `json:"notExpression,omitempty"`
  1096  	// OrGroup: The FilterExpressions in or_group have an OR relationship.
  1097  	OrGroup *FilterExpressionList `json:"orGroup,omitempty"`
  1098  	// ForceSendFields is a list of field names (e.g. "AndGroup") to
  1099  	// unconditionally include in API requests. By default, fields with empty or
  1100  	// default values are omitted from API requests. See
  1101  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1102  	// details.
  1103  	ForceSendFields []string `json:"-"`
  1104  	// NullFields is a list of field names (e.g. "AndGroup") to include in API
  1105  	// requests with the JSON null value. By default, fields with empty values are
  1106  	// omitted from API requests. See
  1107  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1108  	NullFields []string `json:"-"`
  1109  }
  1110  
  1111  func (s *FilterExpression) MarshalJSON() ([]byte, error) {
  1112  	type NoMethod FilterExpression
  1113  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1114  }
  1115  
  1116  // FilterExpressionList: A list of filter expressions.
  1117  type FilterExpressionList struct {
  1118  	// Expressions: A list of filter expressions.
  1119  	Expressions []*FilterExpression `json:"expressions,omitempty"`
  1120  	// ForceSendFields is a list of field names (e.g. "Expressions") to
  1121  	// unconditionally include in API requests. By default, fields with empty or
  1122  	// default values are omitted from API requests. See
  1123  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1124  	// details.
  1125  	ForceSendFields []string `json:"-"`
  1126  	// NullFields is a list of field names (e.g. "Expressions") to include in API
  1127  	// requests with the JSON null value. By default, fields with empty values are
  1128  	// omitted from API requests. See
  1129  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1130  	NullFields []string `json:"-"`
  1131  }
  1132  
  1133  func (s *FilterExpressionList) MarshalJSON() ([]byte, error) {
  1134  	type NoMethod FilterExpressionList
  1135  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1136  }
  1137  
  1138  // InListFilter: The result needs to be in a list of string values.
  1139  type InListFilter struct {
  1140  	// CaseSensitive: If true, the string value is case sensitive.
  1141  	CaseSensitive bool `json:"caseSensitive,omitempty"`
  1142  	// Values: The list of string values. Must be non-empty.
  1143  	Values []string `json:"values,omitempty"`
  1144  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
  1145  	// unconditionally include in API requests. By default, fields with empty or
  1146  	// default values are omitted from API requests. See
  1147  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1148  	// details.
  1149  	ForceSendFields []string `json:"-"`
  1150  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
  1151  	// requests with the JSON null value. By default, fields with empty values are
  1152  	// omitted from API requests. See
  1153  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1154  	NullFields []string `json:"-"`
  1155  }
  1156  
  1157  func (s *InListFilter) MarshalJSON() ([]byte, error) {
  1158  	type NoMethod InListFilter
  1159  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1160  }
  1161  
  1162  // ListAudienceExportsResponse: A list of all audience exports for a property.
  1163  type ListAudienceExportsResponse struct {
  1164  	// AudienceExports: Each audience export for a property.
  1165  	AudienceExports []*AudienceExport `json:"audienceExports,omitempty"`
  1166  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1167  	// next page. If this field is omitted, there are no subsequent pages.
  1168  	NextPageToken string `json:"nextPageToken,omitempty"`
  1169  
  1170  	// ServerResponse contains the HTTP response code and headers from the server.
  1171  	googleapi.ServerResponse `json:"-"`
  1172  	// ForceSendFields is a list of field names (e.g. "AudienceExports") to
  1173  	// unconditionally include in API requests. By default, fields with empty or
  1174  	// default values are omitted from API requests. See
  1175  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1176  	// details.
  1177  	ForceSendFields []string `json:"-"`
  1178  	// NullFields is a list of field names (e.g. "AudienceExports") to include in
  1179  	// API requests with the JSON null value. By default, fields with empty values
  1180  	// are omitted from API requests. See
  1181  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1182  	NullFields []string `json:"-"`
  1183  }
  1184  
  1185  func (s *ListAudienceExportsResponse) MarshalJSON() ([]byte, error) {
  1186  	type NoMethod ListAudienceExportsResponse
  1187  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1188  }
  1189  
  1190  // Metadata: The dimensions, metrics and comparisons currently accepted in
  1191  // reporting methods.
  1192  type Metadata struct {
  1193  	// Comparisons: The comparison descriptions.
  1194  	Comparisons []*ComparisonMetadata `json:"comparisons,omitempty"`
  1195  	// Dimensions: The dimension descriptions.
  1196  	Dimensions []*DimensionMetadata `json:"dimensions,omitempty"`
  1197  	// Metrics: The metric descriptions.
  1198  	Metrics []*MetricMetadata `json:"metrics,omitempty"`
  1199  	// Name: Resource name of this metadata.
  1200  	Name string `json:"name,omitempty"`
  1201  
  1202  	// ServerResponse contains the HTTP response code and headers from the server.
  1203  	googleapi.ServerResponse `json:"-"`
  1204  	// ForceSendFields is a list of field names (e.g. "Comparisons") to
  1205  	// unconditionally include in API requests. By default, fields with empty or
  1206  	// default values are omitted from API requests. See
  1207  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1208  	// details.
  1209  	ForceSendFields []string `json:"-"`
  1210  	// NullFields is a list of field names (e.g. "Comparisons") to include in API
  1211  	// requests with the JSON null value. By default, fields with empty values are
  1212  	// omitted from API requests. See
  1213  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1214  	NullFields []string `json:"-"`
  1215  }
  1216  
  1217  func (s *Metadata) MarshalJSON() ([]byte, error) {
  1218  	type NoMethod Metadata
  1219  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1220  }
  1221  
  1222  // Metric: The quantitative measurements of a report. For example, the metric
  1223  // `eventCount` is the total number of events. Requests are allowed up to 10
  1224  // metrics.
  1225  type Metric struct {
  1226  	// Expression: A mathematical expression for derived metrics. For example, the
  1227  	// metric Event count per user is `eventCount/totalUsers`.
  1228  	Expression string `json:"expression,omitempty"`
  1229  	// Invisible: Indicates if a metric is invisible in the report response. If a
  1230  	// metric is invisible, the metric will not produce a column in the response,
  1231  	// but can be used in `metricFilter`, `orderBys`, or a metric `expression`.
  1232  	Invisible bool `json:"invisible,omitempty"`
  1233  	// Name: The name of the metric. See the API Metrics
  1234  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
  1235  	// for the list of metric names supported by core reporting methods such as
  1236  	// `runReport` and `batchRunReports`. See Realtime Metrics
  1237  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics)
  1238  	// for the list of metric names supported by the `runRealtimeReport` method.
  1239  	// See Funnel Metrics
  1240  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics)
  1241  	// for the list of metric names supported by the `runFunnelReport` method. If
  1242  	// `expression` is specified, `name` can be any string that you would like
  1243  	// within the allowed character set. For example if `expression` is
  1244  	// `screenPageViews/sessions`, you could call that metric's name =
  1245  	// `viewsPerSession`. Metric names that you choose must match the regular
  1246  	// expression `^[a-zA-Z0-9_]$`. Metrics are referenced by `name` in
  1247  	// `metricFilter`, `orderBys`, and metric `expression`.
  1248  	Name string `json:"name,omitempty"`
  1249  	// ForceSendFields is a list of field names (e.g. "Expression") to
  1250  	// unconditionally include in API requests. By default, fields with empty or
  1251  	// default values are omitted from API requests. See
  1252  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1253  	// details.
  1254  	ForceSendFields []string `json:"-"`
  1255  	// NullFields is a list of field names (e.g. "Expression") to include in API
  1256  	// requests with the JSON null value. By default, fields with empty values are
  1257  	// omitted from API requests. See
  1258  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1259  	NullFields []string `json:"-"`
  1260  }
  1261  
  1262  func (s *Metric) MarshalJSON() ([]byte, error) {
  1263  	type NoMethod Metric
  1264  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1265  }
  1266  
  1267  // MetricCompatibility: The compatibility for a single metric.
  1268  type MetricCompatibility struct {
  1269  	// Compatibility: The compatibility of this metric. If the compatibility is
  1270  	// COMPATIBLE, this metric can be successfully added to the report.
  1271  	//
  1272  	// Possible values:
  1273  	//   "COMPATIBILITY_UNSPECIFIED" - Unspecified compatibility.
  1274  	//   "COMPATIBLE" - The dimension or metric is compatible. This dimension or
  1275  	// metric can be successfully added to a report.
  1276  	//   "INCOMPATIBLE" - The dimension or metric is incompatible. This dimension
  1277  	// or metric cannot be successfully added to a report.
  1278  	Compatibility string `json:"compatibility,omitempty"`
  1279  	// MetricMetadata: The metric metadata contains the API name for this
  1280  	// compatibility information. The metric metadata also contains other helpful
  1281  	// information like the UI name and description.
  1282  	MetricMetadata *MetricMetadata `json:"metricMetadata,omitempty"`
  1283  	// ForceSendFields is a list of field names (e.g. "Compatibility") to
  1284  	// unconditionally include in API requests. By default, fields with empty or
  1285  	// default values are omitted from API requests. See
  1286  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1287  	// details.
  1288  	ForceSendFields []string `json:"-"`
  1289  	// NullFields is a list of field names (e.g. "Compatibility") to include in API
  1290  	// requests with the JSON null value. By default, fields with empty values are
  1291  	// omitted from API requests. See
  1292  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1293  	NullFields []string `json:"-"`
  1294  }
  1295  
  1296  func (s *MetricCompatibility) MarshalJSON() ([]byte, error) {
  1297  	type NoMethod MetricCompatibility
  1298  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1299  }
  1300  
  1301  // MetricHeader: Describes a metric column in the report. Visible metrics
  1302  // requested in a report produce column entries within rows and MetricHeaders.
  1303  // However, metrics used exclusively within filters or expressions do not
  1304  // produce columns in a report; correspondingly, those metrics do not produce
  1305  // headers.
  1306  type MetricHeader struct {
  1307  	// Name: The metric's name.
  1308  	Name string `json:"name,omitempty"`
  1309  	// Type: The metric's data type.
  1310  	//
  1311  	// Possible values:
  1312  	//   "METRIC_TYPE_UNSPECIFIED" - Unspecified type.
  1313  	//   "TYPE_INTEGER" - Integer type.
  1314  	//   "TYPE_FLOAT" - Floating point type.
  1315  	//   "TYPE_SECONDS" - A duration of seconds; a special floating point type.
  1316  	//   "TYPE_MILLISECONDS" - A duration in milliseconds; a special floating point
  1317  	// type.
  1318  	//   "TYPE_MINUTES" - A duration in minutes; a special floating point type.
  1319  	//   "TYPE_HOURS" - A duration in hours; a special floating point type.
  1320  	//   "TYPE_STANDARD" - A custom metric of standard type; a special floating
  1321  	// point type.
  1322  	//   "TYPE_CURRENCY" - An amount of money; a special floating point type.
  1323  	//   "TYPE_FEET" - A length in feet; a special floating point type.
  1324  	//   "TYPE_MILES" - A length in miles; a special floating point type.
  1325  	//   "TYPE_METERS" - A length in meters; a special floating point type.
  1326  	//   "TYPE_KILOMETERS" - A length in kilometers; a special floating point type.
  1327  	Type string `json:"type,omitempty"`
  1328  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1329  	// include in API requests. By default, fields with empty or default values are
  1330  	// omitted from API requests. See
  1331  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1332  	// details.
  1333  	ForceSendFields []string `json:"-"`
  1334  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1335  	// with the JSON null value. By default, fields with empty values are omitted
  1336  	// from API requests. See
  1337  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1338  	NullFields []string `json:"-"`
  1339  }
  1340  
  1341  func (s *MetricHeader) MarshalJSON() ([]byte, error) {
  1342  	type NoMethod MetricHeader
  1343  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1344  }
  1345  
  1346  // MetricMetadata: Explains a metric.
  1347  type MetricMetadata struct {
  1348  	// ApiName: A metric name. Useable in Metric (#Metric)'s `name`. For example,
  1349  	// `eventCount`.
  1350  	ApiName string `json:"apiName,omitempty"`
  1351  	// BlockedReasons: If reasons are specified, your access is blocked to this
  1352  	// metric for this property. API requests from you to this property for this
  1353  	// metric will succeed; however, the report will contain only zeros for this
  1354  	// metric. API requests with metric filters on blocked metrics will fail. If
  1355  	// reasons are empty, you have access to this metric. To learn more, see Access
  1356  	// and data-restriction management
  1357  	// (https://support.google.com/analytics/answer/10851388).
  1358  	//
  1359  	// Possible values:
  1360  	//   "BLOCKED_REASON_UNSPECIFIED" - Will never be specified in API response.
  1361  	//   "NO_REVENUE_METRICS" - If present, your access is blocked to revenue
  1362  	// related metrics for this property, and this metric is revenue related.
  1363  	//   "NO_COST_METRICS" - If present, your access is blocked to cost related
  1364  	// metrics for this property, and this metric is cost related.
  1365  	BlockedReasons []string `json:"blockedReasons,omitempty"`
  1366  	// Category: The display name of the category that this metrics belongs to.
  1367  	// Similar dimensions and metrics are categorized together.
  1368  	Category string `json:"category,omitempty"`
  1369  	// CustomDefinition: True if the metric is a custom metric for this property.
  1370  	CustomDefinition bool `json:"customDefinition,omitempty"`
  1371  	// DeprecatedApiNames: Still usable but deprecated names for this metric. If
  1372  	// populated, this metric is available by either `apiName` or one of
  1373  	// `deprecatedApiNames` for a period of time. After the deprecation period, the
  1374  	// metric will be available only by `apiName`.
  1375  	DeprecatedApiNames []string `json:"deprecatedApiNames,omitempty"`
  1376  	// Description: Description of how this metric is used and calculated.
  1377  	Description string `json:"description,omitempty"`
  1378  	// Expression: The mathematical expression for this derived metric. Can be used
  1379  	// in Metric (#Metric)'s `expression` field for equivalent reports. Most
  1380  	// metrics are not expressions, and for non-expressions, this field is empty.
  1381  	Expression string `json:"expression,omitempty"`
  1382  	// Type: The type of this metric.
  1383  	//
  1384  	// Possible values:
  1385  	//   "METRIC_TYPE_UNSPECIFIED" - Unspecified type.
  1386  	//   "TYPE_INTEGER" - Integer type.
  1387  	//   "TYPE_FLOAT" - Floating point type.
  1388  	//   "TYPE_SECONDS" - A duration of seconds; a special floating point type.
  1389  	//   "TYPE_MILLISECONDS" - A duration in milliseconds; a special floating point
  1390  	// type.
  1391  	//   "TYPE_MINUTES" - A duration in minutes; a special floating point type.
  1392  	//   "TYPE_HOURS" - A duration in hours; a special floating point type.
  1393  	//   "TYPE_STANDARD" - A custom metric of standard type; a special floating
  1394  	// point type.
  1395  	//   "TYPE_CURRENCY" - An amount of money; a special floating point type.
  1396  	//   "TYPE_FEET" - A length in feet; a special floating point type.
  1397  	//   "TYPE_MILES" - A length in miles; a special floating point type.
  1398  	//   "TYPE_METERS" - A length in meters; a special floating point type.
  1399  	//   "TYPE_KILOMETERS" - A length in kilometers; a special floating point type.
  1400  	Type string `json:"type,omitempty"`
  1401  	// UiName: This metric's name within the Google Analytics user interface. For
  1402  	// example, `Event count`.
  1403  	UiName string `json:"uiName,omitempty"`
  1404  	// ForceSendFields is a list of field names (e.g. "ApiName") to unconditionally
  1405  	// include in API requests. By default, fields with empty or default values are
  1406  	// omitted from API requests. See
  1407  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1408  	// details.
  1409  	ForceSendFields []string `json:"-"`
  1410  	// NullFields is a list of field names (e.g. "ApiName") to include in API
  1411  	// requests with the JSON null value. By default, fields with empty values are
  1412  	// omitted from API requests. See
  1413  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1414  	NullFields []string `json:"-"`
  1415  }
  1416  
  1417  func (s *MetricMetadata) MarshalJSON() ([]byte, error) {
  1418  	type NoMethod MetricMetadata
  1419  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1420  }
  1421  
  1422  // MetricOrderBy: Sorts by metric values.
  1423  type MetricOrderBy struct {
  1424  	// MetricName: A metric name in the request to order by.
  1425  	MetricName string `json:"metricName,omitempty"`
  1426  	// ForceSendFields is a list of field names (e.g. "MetricName") to
  1427  	// unconditionally include in API requests. By default, fields with empty or
  1428  	// default values are omitted from API requests. See
  1429  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1430  	// details.
  1431  	ForceSendFields []string `json:"-"`
  1432  	// NullFields is a list of field names (e.g. "MetricName") to include in API
  1433  	// requests with the JSON null value. By default, fields with empty values are
  1434  	// omitted from API requests. See
  1435  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1436  	NullFields []string `json:"-"`
  1437  }
  1438  
  1439  func (s *MetricOrderBy) MarshalJSON() ([]byte, error) {
  1440  	type NoMethod MetricOrderBy
  1441  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1442  }
  1443  
  1444  // MetricValue: The value of a metric.
  1445  type MetricValue struct {
  1446  	// Value: Measurement value. See MetricHeader for type.
  1447  	Value string `json:"value,omitempty"`
  1448  	// ForceSendFields is a list of field names (e.g. "Value") to unconditionally
  1449  	// include in API requests. By default, fields with empty or default values are
  1450  	// omitted from API requests. See
  1451  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1452  	// details.
  1453  	ForceSendFields []string `json:"-"`
  1454  	// NullFields is a list of field names (e.g. "Value") to include in API
  1455  	// requests with the JSON null value. By default, fields with empty values are
  1456  	// omitted from API requests. See
  1457  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1458  	NullFields []string `json:"-"`
  1459  }
  1460  
  1461  func (s *MetricValue) MarshalJSON() ([]byte, error) {
  1462  	type NoMethod MetricValue
  1463  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1464  }
  1465  
  1466  // MinuteRange: A contiguous set of minutes: `startMinutesAgo`,
  1467  // `startMinutesAgo + 1`, ..., `endMinutesAgo`. Requests are allowed up to 2
  1468  // minute ranges.
  1469  type MinuteRange struct {
  1470  	// EndMinutesAgo: The inclusive end minute for the query as a number of minutes
  1471  	// before now. Cannot be before `startMinutesAgo`. For example,
  1472  	// "endMinutesAgo": 15` specifies the report should include event data from
  1473  	// prior to 15 minutes ago. If unspecified, `endMinutesAgo` is defaulted to 0.
  1474  	// Standard Analytics properties can request any minute in the last 30 minutes
  1475  	// of event data (`endMinutesAgo <= 29`), and 360 Analytics properties can
  1476  	// request any minute in the last 60 minutes of event data (`endMinutesAgo <=
  1477  	// 59`).
  1478  	EndMinutesAgo int64 `json:"endMinutesAgo,omitempty"`
  1479  	// Name: Assigns a name to this minute range. The dimension `dateRange` is
  1480  	// valued to this name in a report response. If set, cannot begin with
  1481  	// `date_range_` or `RESERVED_`. If not set, minute ranges are named by their
  1482  	// zero based index in the request: `date_range_0`, `date_range_1`, etc.
  1483  	Name string `json:"name,omitempty"`
  1484  	// StartMinutesAgo: The inclusive start minute for the query as a number of
  1485  	// minutes before now. For example, "startMinutesAgo": 29` specifies the
  1486  	// report should include event data from 29 minutes ago and after. Cannot be
  1487  	// after `endMinutesAgo`. If unspecified, `startMinutesAgo` is defaulted to 29.
  1488  	// Standard Analytics properties can request up to the last 30 minutes of event
  1489  	// data (`startMinutesAgo <= 29`), and 360 Analytics properties can request up
  1490  	// to the last 60 minutes of event data (`startMinutesAgo <= 59`).
  1491  	StartMinutesAgo int64 `json:"startMinutesAgo,omitempty"`
  1492  	// ForceSendFields is a list of field names (e.g. "EndMinutesAgo") to
  1493  	// unconditionally include in API requests. By default, fields with empty or
  1494  	// default values are omitted from API requests. See
  1495  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1496  	// details.
  1497  	ForceSendFields []string `json:"-"`
  1498  	// NullFields is a list of field names (e.g. "EndMinutesAgo") to include in API
  1499  	// requests with the JSON null value. By default, fields with empty values are
  1500  	// omitted from API requests. See
  1501  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1502  	NullFields []string `json:"-"`
  1503  }
  1504  
  1505  func (s *MinuteRange) MarshalJSON() ([]byte, error) {
  1506  	type NoMethod MinuteRange
  1507  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1508  }
  1509  
  1510  // NumericFilter: Filters for numeric or date values.
  1511  type NumericFilter struct {
  1512  	// Operation: The operation type for this filter.
  1513  	//
  1514  	// Possible values:
  1515  	//   "OPERATION_UNSPECIFIED" - Unspecified.
  1516  	//   "EQUAL" - Equal
  1517  	//   "LESS_THAN" - Less than
  1518  	//   "LESS_THAN_OR_EQUAL" - Less than or equal
  1519  	//   "GREATER_THAN" - Greater than
  1520  	//   "GREATER_THAN_OR_EQUAL" - Greater than or equal
  1521  	Operation string `json:"operation,omitempty"`
  1522  	// Value: A numeric value or a date value.
  1523  	Value *NumericValue `json:"value,omitempty"`
  1524  	// ForceSendFields is a list of field names (e.g. "Operation") to
  1525  	// unconditionally include in API requests. By default, fields with empty or
  1526  	// default values are omitted from API requests. See
  1527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1528  	// details.
  1529  	ForceSendFields []string `json:"-"`
  1530  	// NullFields is a list of field names (e.g. "Operation") to include in API
  1531  	// requests with the JSON null value. By default, fields with empty values are
  1532  	// omitted from API requests. See
  1533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1534  	NullFields []string `json:"-"`
  1535  }
  1536  
  1537  func (s *NumericFilter) MarshalJSON() ([]byte, error) {
  1538  	type NoMethod NumericFilter
  1539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1540  }
  1541  
  1542  // NumericValue: To represent a number.
  1543  type NumericValue struct {
  1544  	// DoubleValue: Double value
  1545  	DoubleValue float64 `json:"doubleValue,omitempty"`
  1546  	// Int64Value: Integer value
  1547  	Int64Value int64 `json:"int64Value,omitempty,string"`
  1548  	// ForceSendFields is a list of field names (e.g. "DoubleValue") to
  1549  	// unconditionally include in API requests. By default, fields with empty or
  1550  	// default values are omitted from API requests. See
  1551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1552  	// details.
  1553  	ForceSendFields []string `json:"-"`
  1554  	// NullFields is a list of field names (e.g. "DoubleValue") to include in API
  1555  	// requests with the JSON null value. By default, fields with empty values are
  1556  	// omitted from API requests. See
  1557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1558  	NullFields []string `json:"-"`
  1559  }
  1560  
  1561  func (s *NumericValue) MarshalJSON() ([]byte, error) {
  1562  	type NoMethod NumericValue
  1563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1564  }
  1565  
  1566  func (s *NumericValue) UnmarshalJSON(data []byte) error {
  1567  	type NoMethod NumericValue
  1568  	var s1 struct {
  1569  		DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
  1570  		*NoMethod
  1571  	}
  1572  	s1.NoMethod = (*NoMethod)(s)
  1573  	if err := json.Unmarshal(data, &s1); err != nil {
  1574  		return err
  1575  	}
  1576  	s.DoubleValue = float64(s1.DoubleValue)
  1577  	return nil
  1578  }
  1579  
  1580  // Operation: This resource represents a long-running operation that is the
  1581  // result of a network API call.
  1582  type Operation struct {
  1583  	// Done: If the value is `false`, it means the operation is still in progress.
  1584  	// If `true`, the operation is completed, and either `error` or `response` is
  1585  	// available.
  1586  	Done bool `json:"done,omitempty"`
  1587  	// Error: The error result of the operation in case of failure or cancellation.
  1588  	Error *Status `json:"error,omitempty"`
  1589  	// Metadata: Service-specific metadata associated with the operation. It
  1590  	// typically contains progress information and common metadata such as create
  1591  	// time. Some services might not provide such metadata. Any method that returns
  1592  	// a long-running operation should document the metadata type, if any.
  1593  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1594  	// Name: The server-assigned name, which is only unique within the same service
  1595  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1596  	// should be a resource name ending with `operations/{unique_id}`.
  1597  	Name string `json:"name,omitempty"`
  1598  	// Response: The normal, successful response of the operation. If the original
  1599  	// method returns no data on success, such as `Delete`, the response is
  1600  	// `google.protobuf.Empty`. If the original method is standard
  1601  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1602  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1603  	// original method name. For example, if the original method name is
  1604  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1605  	Response googleapi.RawMessage `json:"response,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. "Done") 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. "Done") to include in API requests
  1616  	// with the JSON null value. By default, fields with empty values are omitted
  1617  	// 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 *Operation) MarshalJSON() ([]byte, error) {
  1623  	type NoMethod Operation
  1624  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1625  }
  1626  
  1627  // OrderBy: Order bys define how rows will be sorted in the response. For
  1628  // example, ordering rows by descending event count is one ordering, and
  1629  // ordering rows by the event name string is a different ordering.
  1630  type OrderBy struct {
  1631  	// Desc: If true, sorts by descending order.
  1632  	Desc bool `json:"desc,omitempty"`
  1633  	// Dimension: Sorts results by a dimension's values.
  1634  	Dimension *DimensionOrderBy `json:"dimension,omitempty"`
  1635  	// Metric: Sorts results by a metric's values.
  1636  	Metric *MetricOrderBy `json:"metric,omitempty"`
  1637  	// Pivot: Sorts results by a metric's values within a pivot column group.
  1638  	Pivot *PivotOrderBy `json:"pivot,omitempty"`
  1639  	// ForceSendFields is a list of field names (e.g. "Desc") to unconditionally
  1640  	// include in API requests. By default, fields with empty or default values are
  1641  	// omitted from API requests. See
  1642  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1643  	// details.
  1644  	ForceSendFields []string `json:"-"`
  1645  	// NullFields is a list of field names (e.g. "Desc") to include in API requests
  1646  	// with the JSON null value. By default, fields with empty values are omitted
  1647  	// from API requests. See
  1648  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1649  	NullFields []string `json:"-"`
  1650  }
  1651  
  1652  func (s *OrderBy) MarshalJSON() ([]byte, error) {
  1653  	type NoMethod OrderBy
  1654  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1655  }
  1656  
  1657  // Pivot: Describes the visible dimension columns and rows in the report
  1658  // response.
  1659  type Pivot struct {
  1660  	// FieldNames: Dimension names for visible columns in the report response.
  1661  	// Including "dateRange" produces a date range column; for each row in the
  1662  	// response, dimension values in the date range column will indicate the
  1663  	// corresponding date range from the request.
  1664  	FieldNames []string `json:"fieldNames,omitempty"`
  1665  	// Limit: The number of unique combinations of dimension values to return in
  1666  	// this pivot. The `limit` parameter is required. A `limit` of 10,000 is common
  1667  	// for single pivot requests. The product of the `limit` for each `pivot` in a
  1668  	// `RunPivotReportRequest` must not exceed 250,000. For example, a two pivot
  1669  	// request with `limit: 1000` in each pivot will fail because the product is
  1670  	// `1,000,000`.
  1671  	Limit int64 `json:"limit,omitempty,string"`
  1672  	// MetricAggregations: Aggregate the metrics by dimensions in this pivot using
  1673  	// the specified metric_aggregations.
  1674  	//
  1675  	// Possible values:
  1676  	//   "METRIC_AGGREGATION_UNSPECIFIED" - Unspecified operator.
  1677  	//   "TOTAL" - SUM operator.
  1678  	//   "MINIMUM" - Minimum operator.
  1679  	//   "MAXIMUM" - Maximum operator.
  1680  	//   "COUNT" - Count operator.
  1681  	MetricAggregations []string `json:"metricAggregations,omitempty"`
  1682  	// Offset: The row count of the start row. The first row is counted as row 0.
  1683  	Offset int64 `json:"offset,omitempty,string"`
  1684  	// OrderBys: Specifies how dimensions are ordered in the pivot. In the first
  1685  	// Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in
  1686  	// subsequent Pivots, the OrderBys determine only PivotDimensionHeader
  1687  	// ordering. Dimensions specified in these OrderBys must be a subset of
  1688  	// Pivot.field_names.
  1689  	OrderBys []*OrderBy `json:"orderBys,omitempty"`
  1690  	// ForceSendFields is a list of field names (e.g. "FieldNames") to
  1691  	// unconditionally include in API requests. By default, fields with empty or
  1692  	// default values are omitted from API requests. See
  1693  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1694  	// details.
  1695  	ForceSendFields []string `json:"-"`
  1696  	// NullFields is a list of field names (e.g. "FieldNames") to include in API
  1697  	// requests with the JSON null value. By default, fields with empty values are
  1698  	// omitted from API requests. See
  1699  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1700  	NullFields []string `json:"-"`
  1701  }
  1702  
  1703  func (s *Pivot) MarshalJSON() ([]byte, error) {
  1704  	type NoMethod Pivot
  1705  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1706  }
  1707  
  1708  // PivotDimensionHeader: Summarizes dimension values from a row for this pivot.
  1709  type PivotDimensionHeader struct {
  1710  	// DimensionValues: Values of multiple dimensions in a pivot.
  1711  	DimensionValues []*DimensionValue `json:"dimensionValues,omitempty"`
  1712  	// ForceSendFields is a list of field names (e.g. "DimensionValues") to
  1713  	// unconditionally include in API requests. By default, fields with empty or
  1714  	// default values are omitted from API requests. See
  1715  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1716  	// details.
  1717  	ForceSendFields []string `json:"-"`
  1718  	// NullFields is a list of field names (e.g. "DimensionValues") to include in
  1719  	// API requests with the JSON null value. By default, fields with empty values
  1720  	// are omitted from API requests. See
  1721  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1722  	NullFields []string `json:"-"`
  1723  }
  1724  
  1725  func (s *PivotDimensionHeader) MarshalJSON() ([]byte, error) {
  1726  	type NoMethod PivotDimensionHeader
  1727  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1728  }
  1729  
  1730  // PivotHeader: Dimensions' values in a single pivot.
  1731  type PivotHeader struct {
  1732  	// PivotDimensionHeaders: The size is the same as the cardinality of the
  1733  	// corresponding dimension combinations.
  1734  	PivotDimensionHeaders []*PivotDimensionHeader `json:"pivotDimensionHeaders,omitempty"`
  1735  	// RowCount: The cardinality of the pivot. The total number of rows for this
  1736  	// pivot's fields regardless of how the parameters `offset` and `limit` are
  1737  	// specified in the request.
  1738  	RowCount int64 `json:"rowCount,omitempty"`
  1739  	// ForceSendFields is a list of field names (e.g. "PivotDimensionHeaders") to
  1740  	// unconditionally include in API requests. By default, fields with empty or
  1741  	// default values are omitted from API requests. See
  1742  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1743  	// details.
  1744  	ForceSendFields []string `json:"-"`
  1745  	// NullFields is a list of field names (e.g. "PivotDimensionHeaders") to
  1746  	// include in API requests with the JSON null value. By default, fields with
  1747  	// empty values are omitted from API requests. See
  1748  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1749  	NullFields []string `json:"-"`
  1750  }
  1751  
  1752  func (s *PivotHeader) MarshalJSON() ([]byte, error) {
  1753  	type NoMethod PivotHeader
  1754  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1755  }
  1756  
  1757  // PivotOrderBy: Sorts by a pivot column group.
  1758  type PivotOrderBy struct {
  1759  	// MetricName: In the response to order by, order rows by this column. Must be
  1760  	// a metric name from the request.
  1761  	MetricName string `json:"metricName,omitempty"`
  1762  	// PivotSelections: Used to select a dimension name and value pivot. If
  1763  	// multiple pivot selections are given, the sort occurs on rows where all pivot
  1764  	// selection dimension name and value pairs match the row's dimension name and
  1765  	// value pair.
  1766  	PivotSelections []*PivotSelection `json:"pivotSelections,omitempty"`
  1767  	// ForceSendFields is a list of field names (e.g. "MetricName") to
  1768  	// unconditionally include in API requests. By default, fields with empty or
  1769  	// default values are omitted from API requests. See
  1770  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1771  	// details.
  1772  	ForceSendFields []string `json:"-"`
  1773  	// NullFields is a list of field names (e.g. "MetricName") to include in API
  1774  	// requests with the JSON null value. By default, fields with empty values are
  1775  	// omitted from API requests. See
  1776  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1777  	NullFields []string `json:"-"`
  1778  }
  1779  
  1780  func (s *PivotOrderBy) MarshalJSON() ([]byte, error) {
  1781  	type NoMethod PivotOrderBy
  1782  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1783  }
  1784  
  1785  // PivotSelection: A pair of dimension names and values. Rows with this
  1786  // dimension pivot pair are ordered by the metric's value. For example if
  1787  // pivots = {{"browser", "Chrome"}} and metric_name = "Sessions", then the rows
  1788  // will be sorted based on Sessions in Chrome.
  1789  // ---------|----------|----------------|----------|---------------- | Chrome |
  1790  // Chrome | Safari | Safari
  1791  // ---------|----------|----------------|----------|---------------- Country |
  1792  // Sessions | Pages/Sessions | Sessions | Pages/Sessions
  1793  // ---------|----------|----------------|----------|---------------- US | 2 | 2
  1794  // | 3 | 1 ---------|----------|----------------|----------|----------------
  1795  // Canada | 3 | 1 | 4 | 1
  1796  // ---------|----------|----------------|----------|----------------
  1797  type PivotSelection struct {
  1798  	// DimensionName: Must be a dimension name from the request.
  1799  	DimensionName string `json:"dimensionName,omitempty"`
  1800  	// DimensionValue: Order by only when the named dimension is this value.
  1801  	DimensionValue string `json:"dimensionValue,omitempty"`
  1802  	// ForceSendFields is a list of field names (e.g. "DimensionName") to
  1803  	// unconditionally include in API requests. By default, fields with empty or
  1804  	// default values are omitted from API requests. See
  1805  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1806  	// details.
  1807  	ForceSendFields []string `json:"-"`
  1808  	// NullFields is a list of field names (e.g. "DimensionName") to include in API
  1809  	// requests with the JSON null value. By default, fields with empty values are
  1810  	// omitted from API requests. See
  1811  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1812  	NullFields []string `json:"-"`
  1813  }
  1814  
  1815  func (s *PivotSelection) MarshalJSON() ([]byte, error) {
  1816  	type NoMethod PivotSelection
  1817  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1818  }
  1819  
  1820  // PropertyQuota: Current state of all quotas for this Analytics Property. If
  1821  // any quota for a property is exhausted, all requests to that property will
  1822  // return Resource Exhausted errors.
  1823  type PropertyQuota struct {
  1824  	// ConcurrentRequests: Standard Analytics Properties can send up to 10
  1825  	// concurrent requests; Analytics 360 Properties can use up to 50 concurrent
  1826  	// requests.
  1827  	ConcurrentRequests *QuotaStatus `json:"concurrentRequests,omitempty"`
  1828  	// PotentiallyThresholdedRequestsPerHour: Analytics Properties can send up to
  1829  	// 120 requests with potentially thresholded dimensions per hour. In a batch
  1830  	// request, each report request is individually counted for this quota if the
  1831  	// request contains potentially thresholded dimensions.
  1832  	PotentiallyThresholdedRequestsPerHour *QuotaStatus `json:"potentiallyThresholdedRequestsPerHour,omitempty"`
  1833  	// ServerErrorsPerProjectPerHour: Standard Analytics Properties and cloud
  1834  	// project pairs can have up to 10 server errors per hour; Analytics 360
  1835  	// Properties and cloud project pairs can have up to 50 server errors per hour.
  1836  	ServerErrorsPerProjectPerHour *QuotaStatus `json:"serverErrorsPerProjectPerHour,omitempty"`
  1837  	// TokensPerDay: Standard Analytics Properties can use up to 200,000 tokens per
  1838  	// day; Analytics 360 Properties can use 2,000,000 tokens per day. Most
  1839  	// requests consume fewer than 10 tokens.
  1840  	TokensPerDay *QuotaStatus `json:"tokensPerDay,omitempty"`
  1841  	// TokensPerHour: Standard Analytics Properties can use up to 40,000 tokens per
  1842  	// hour; Analytics 360 Properties can use 400,000 tokens per hour. An API
  1843  	// request consumes a single number of tokens, and that number is deducted from
  1844  	// all of the hourly, daily, and per project hourly quotas.
  1845  	TokensPerHour *QuotaStatus `json:"tokensPerHour,omitempty"`
  1846  	// TokensPerProjectPerHour: Analytics Properties can use up to 35% of their
  1847  	// tokens per project per hour. This amounts to standard Analytics Properties
  1848  	// can use up to 14,000 tokens per project per hour, and Analytics 360
  1849  	// Properties can use 140,000 tokens per project per hour. An API request
  1850  	// consumes a single number of tokens, and that number is deducted from all of
  1851  	// the hourly, daily, and per project hourly quotas.
  1852  	TokensPerProjectPerHour *QuotaStatus `json:"tokensPerProjectPerHour,omitempty"`
  1853  	// ForceSendFields is a list of field names (e.g. "ConcurrentRequests") to
  1854  	// unconditionally include in API requests. By default, fields with empty or
  1855  	// default values are omitted from API requests. See
  1856  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1857  	// details.
  1858  	ForceSendFields []string `json:"-"`
  1859  	// NullFields is a list of field names (e.g. "ConcurrentRequests") to include
  1860  	// in API requests with the JSON null value. By default, fields with empty
  1861  	// values are omitted from API requests. See
  1862  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1863  	NullFields []string `json:"-"`
  1864  }
  1865  
  1866  func (s *PropertyQuota) MarshalJSON() ([]byte, error) {
  1867  	type NoMethod PropertyQuota
  1868  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1869  }
  1870  
  1871  // QueryAudienceExportRequest: A request to list users in an audience export.
  1872  type QueryAudienceExportRequest struct {
  1873  	// Limit: Optional. The number of rows to return. If unspecified, 10,000 rows
  1874  	// are returned. The API returns a maximum of 250,000 rows per request, no
  1875  	// matter how many you ask for. `limit` must be positive. The API can also
  1876  	// return fewer rows than the requested `limit`, if there aren't as many
  1877  	// dimension values as the `limit`. To learn more about this pagination
  1878  	// parameter, see Pagination
  1879  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  1880  	Limit int64 `json:"limit,omitempty,string"`
  1881  	// Offset: Optional. The row count of the start row. The first row is counted
  1882  	// as row 0. When paging, the first request does not specify offset; or
  1883  	// equivalently, sets offset to 0; the first request returns the first `limit`
  1884  	// of rows. The second request sets offset to the `limit` of the first request;
  1885  	// the second request returns the second `limit` of rows. To learn more about
  1886  	// this pagination parameter, see Pagination
  1887  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  1888  	Offset int64 `json:"offset,omitempty,string"`
  1889  	// ForceSendFields is a list of field names (e.g. "Limit") to unconditionally
  1890  	// include in API requests. By default, fields with empty or default values are
  1891  	// omitted from API requests. See
  1892  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1893  	// details.
  1894  	ForceSendFields []string `json:"-"`
  1895  	// NullFields is a list of field names (e.g. "Limit") to include in API
  1896  	// requests with the JSON null value. By default, fields with empty values are
  1897  	// omitted from API requests. See
  1898  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1899  	NullFields []string `json:"-"`
  1900  }
  1901  
  1902  func (s *QueryAudienceExportRequest) MarshalJSON() ([]byte, error) {
  1903  	type NoMethod QueryAudienceExportRequest
  1904  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1905  }
  1906  
  1907  // QueryAudienceExportResponse: A list of users in an audience export.
  1908  type QueryAudienceExportResponse struct {
  1909  	// AudienceExport: Configuration data about AudienceExport being queried.
  1910  	// Returned to help interpret the audience rows in this response. For example,
  1911  	// the dimensions in this AudienceExport correspond to the columns in the
  1912  	// AudienceRows.
  1913  	AudienceExport *AudienceExport `json:"audienceExport,omitempty"`
  1914  	// AudienceRows: Rows for each user in an audience export. The number of rows
  1915  	// in this response will be less than or equal to request's page size.
  1916  	AudienceRows []*V1betaAudienceRow `json:"audienceRows,omitempty"`
  1917  	// RowCount: The total number of rows in the AudienceExport result. `rowCount`
  1918  	// is independent of the number of rows returned in the response, the `limit`
  1919  	// request parameter, and the `offset` request parameter. For example if a
  1920  	// query returns 175 rows and includes `limit` of 50 in the API request, the
  1921  	// response will contain `rowCount` of 175 but only 50 rows. To learn more
  1922  	// about this pagination parameter, see Pagination
  1923  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  1924  	RowCount int64 `json:"rowCount,omitempty"`
  1925  
  1926  	// ServerResponse contains the HTTP response code and headers from the server.
  1927  	googleapi.ServerResponse `json:"-"`
  1928  	// ForceSendFields is a list of field names (e.g. "AudienceExport") to
  1929  	// unconditionally include in API requests. By default, fields with empty or
  1930  	// default values are omitted from API requests. See
  1931  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1932  	// details.
  1933  	ForceSendFields []string `json:"-"`
  1934  	// NullFields is a list of field names (e.g. "AudienceExport") to include in
  1935  	// API requests with the JSON null value. By default, fields with empty values
  1936  	// are omitted from API requests. See
  1937  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1938  	NullFields []string `json:"-"`
  1939  }
  1940  
  1941  func (s *QueryAudienceExportResponse) MarshalJSON() ([]byte, error) {
  1942  	type NoMethod QueryAudienceExportResponse
  1943  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1944  }
  1945  
  1946  // QuotaStatus: Current state for a particular quota group.
  1947  type QuotaStatus struct {
  1948  	// Consumed: Quota consumed by this request.
  1949  	Consumed int64 `json:"consumed,omitempty"`
  1950  	// Remaining: Quota remaining after this request.
  1951  	Remaining int64 `json:"remaining,omitempty"`
  1952  	// ForceSendFields is a list of field names (e.g. "Consumed") to
  1953  	// unconditionally include in API requests. By default, fields with empty or
  1954  	// default values are omitted from API requests. See
  1955  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1956  	// details.
  1957  	ForceSendFields []string `json:"-"`
  1958  	// NullFields is a list of field names (e.g. "Consumed") to include in API
  1959  	// requests with the JSON null value. By default, fields with empty values are
  1960  	// omitted from API requests. See
  1961  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1962  	NullFields []string `json:"-"`
  1963  }
  1964  
  1965  func (s *QuotaStatus) MarshalJSON() ([]byte, error) {
  1966  	type NoMethod QuotaStatus
  1967  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1968  }
  1969  
  1970  // ResponseMetaData: Response's metadata carrying additional information about
  1971  // the report content.
  1972  type ResponseMetaData struct {
  1973  	// CurrencyCode: The currency code used in this report. Intended to be used in
  1974  	// formatting currency metrics like `purchaseRevenue` for visualization. If
  1975  	// currency_code was specified in the request, this response parameter will
  1976  	// echo the request parameter; otherwise, this response parameter is the
  1977  	// property's current currency_code. Currency codes are string encodings of
  1978  	// currency types from the ISO 4217 standard
  1979  	// (https://en.wikipedia.org/wiki/ISO_4217); for example "USD", "EUR", "JPY".
  1980  	// To learn more, see https://support.google.com/analytics/answer/9796179.
  1981  	CurrencyCode string `json:"currencyCode,omitempty"`
  1982  	// DataLossFromOtherRow: If true, indicates some buckets of dimension
  1983  	// combinations are rolled into "(other)" row. This can happen for high
  1984  	// cardinality reports. The metadata parameter dataLossFromOtherRow is
  1985  	// populated based on the aggregated data table used in the report. The
  1986  	// parameter will be accurately populated regardless of the filters and limits
  1987  	// in the report. For example, the (other) row could be dropped from the report
  1988  	// because the request contains a filter on sessionSource = google. This
  1989  	// parameter will still be populated if data loss from other row was present in
  1990  	// the input aggregate data used to generate this report. To learn more, see
  1991  	// About the (other) row and data sampling
  1992  	// (https://support.google.com/analytics/answer/13208658#reports).
  1993  	DataLossFromOtherRow bool `json:"dataLossFromOtherRow,omitempty"`
  1994  	// EmptyReason: If empty reason is specified, the report is empty for this
  1995  	// reason.
  1996  	EmptyReason string `json:"emptyReason,omitempty"`
  1997  	// SamplingMetadatas: If this report results is sampled
  1998  	// (https://support.google.com/analytics/answer/13331292), this describes the
  1999  	// percentage of events used in this report. One `samplingMetadatas` is
  2000  	// populated for each date range. Each `samplingMetadatas` corresponds to a
  2001  	// date range in order that date ranges were specified in the request. However
  2002  	// if the results are not sampled, this field will not be defined.
  2003  	SamplingMetadatas []*SamplingMetadata `json:"samplingMetadatas,omitempty"`
  2004  	// SchemaRestrictionResponse: Describes the schema restrictions actively
  2005  	// enforced in creating this report. To learn more, see Access and
  2006  	// data-restriction management
  2007  	// (https://support.google.com/analytics/answer/10851388).
  2008  	SchemaRestrictionResponse *SchemaRestrictionResponse `json:"schemaRestrictionResponse,omitempty"`
  2009  	// SubjectToThresholding: If `subjectToThresholding` is true, this report is
  2010  	// subject to thresholding and only returns data that meets the minimum
  2011  	// aggregation thresholds. It is possible for a request to be subject to
  2012  	// thresholding thresholding and no data is absent from the report, and this
  2013  	// happens when all data is above the thresholds. To learn more, see Data
  2014  	// thresholds (https://support.google.com/analytics/answer/9383630).
  2015  	SubjectToThresholding bool `json:"subjectToThresholding,omitempty"`
  2016  	// TimeZone: The property's current timezone. Intended to be used to interpret
  2017  	// time-based dimensions like `hour` and `minute`. Formatted as strings from
  2018  	// the IANA Time Zone database (https://www.iana.org/time-zones); for example
  2019  	// "America/New_York" or "Asia/Tokyo".
  2020  	TimeZone string `json:"timeZone,omitempty"`
  2021  	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
  2022  	// unconditionally include in API requests. By default, fields with empty or
  2023  	// default values are omitted from API requests. See
  2024  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2025  	// details.
  2026  	ForceSendFields []string `json:"-"`
  2027  	// NullFields is a list of field names (e.g. "CurrencyCode") to include in API
  2028  	// requests with the JSON null value. By default, fields with empty values are
  2029  	// omitted from API requests. See
  2030  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2031  	NullFields []string `json:"-"`
  2032  }
  2033  
  2034  func (s *ResponseMetaData) MarshalJSON() ([]byte, error) {
  2035  	type NoMethod ResponseMetaData
  2036  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2037  }
  2038  
  2039  // Row: Report data for each row. For example if RunReportRequest contains:
  2040  // ```none "dimensions": [ { "name": "eventName" }, { "name": "countryId" } ],
  2041  // "metrics": [ { "name": "eventCount" } ] ``` One row with 'in_app_purchase'
  2042  // as the eventName, 'JP' as the countryId, and 15 as the eventCount, would be:
  2043  // ```none "dimensionValues": [ { "value": "in_app_purchase" }, { "value": "JP"
  2044  // } ], "metricValues": [ { "value": "15" } ] ```
  2045  type Row struct {
  2046  	// DimensionValues: List of requested dimension values. In a PivotReport,
  2047  	// dimension_values are only listed for dimensions included in a pivot.
  2048  	DimensionValues []*DimensionValue `json:"dimensionValues,omitempty"`
  2049  	// MetricValues: List of requested visible metric values.
  2050  	MetricValues []*MetricValue `json:"metricValues,omitempty"`
  2051  	// ForceSendFields is a list of field names (e.g. "DimensionValues") to
  2052  	// unconditionally include in API requests. By default, fields with empty or
  2053  	// default values are omitted from API requests. See
  2054  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2055  	// details.
  2056  	ForceSendFields []string `json:"-"`
  2057  	// NullFields is a list of field names (e.g. "DimensionValues") to include in
  2058  	// API requests with the JSON null value. By default, fields with empty values
  2059  	// are omitted from API requests. See
  2060  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2061  	NullFields []string `json:"-"`
  2062  }
  2063  
  2064  func (s *Row) MarshalJSON() ([]byte, error) {
  2065  	type NoMethod Row
  2066  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2067  }
  2068  
  2069  // RunPivotReportRequest: The request to generate a pivot report.
  2070  type RunPivotReportRequest struct {
  2071  	// CohortSpec: Cohort group associated with this request. If there is a cohort
  2072  	// group in the request the 'cohort' dimension must be present.
  2073  	CohortSpec *CohortSpec `json:"cohortSpec,omitempty"`
  2074  	// Comparisons: Optional. The configuration of comparisons requested and
  2075  	// displayed. The request requires both a comparisons field and a comparisons
  2076  	// dimension to receive a comparison column in the response.
  2077  	Comparisons []*Comparison `json:"comparisons,omitempty"`
  2078  	// CurrencyCode: A currency code in ISO4217 format, such as "AED", "USD",
  2079  	// "JPY". If the field is empty, the report uses the property's default
  2080  	// currency.
  2081  	CurrencyCode string `json:"currencyCode,omitempty"`
  2082  	// DateRanges: The date range to retrieve event data for the report. If
  2083  	// multiple date ranges are specified, event data from each date range is used
  2084  	// in the report. A special dimension with field name "dateRange" can be
  2085  	// included in a Pivot's field names; if included, the report compares between
  2086  	// date ranges. In a cohort request, this `dateRanges` must be unspecified.
  2087  	DateRanges []*DateRange `json:"dateRanges,omitempty"`
  2088  	// DimensionFilter: The filter clause of dimensions. Dimensions must be
  2089  	// requested to be used in this filter. Metrics cannot be used in this filter.
  2090  	DimensionFilter *FilterExpression `json:"dimensionFilter,omitempty"`
  2091  	// Dimensions: The dimensions requested. All defined dimensions must be used by
  2092  	// one of the following: dimension_expression, dimension_filter, pivots,
  2093  	// order_bys.
  2094  	Dimensions []*Dimension `json:"dimensions,omitempty"`
  2095  	// KeepEmptyRows: If false or unspecified, each row with all metrics equal to 0
  2096  	// will not be returned. If true, these rows will be returned if they are not
  2097  	// separately removed by a filter. Regardless of this `keep_empty_rows`
  2098  	// setting, only data recorded by the Google Analytics (GA4) property can be
  2099  	// displayed in a report. For example if a property never logs a `purchase`
  2100  	// event, then a query for the `eventName` dimension and `eventCount` metric
  2101  	// will not have a row eventName: "purchase" and eventCount: 0.
  2102  	KeepEmptyRows bool `json:"keepEmptyRows,omitempty"`
  2103  	// MetricFilter: The filter clause of metrics. Applied at post aggregation
  2104  	// phase, similar to SQL having-clause. Metrics must be requested to be used in
  2105  	// this filter. Dimensions cannot be used in this filter.
  2106  	MetricFilter *FilterExpression `json:"metricFilter,omitempty"`
  2107  	// Metrics: The metrics requested, at least one metric needs to be specified.
  2108  	// All defined metrics must be used by one of the following: metric_expression,
  2109  	// metric_filter, order_bys.
  2110  	Metrics []*Metric `json:"metrics,omitempty"`
  2111  	// Pivots: Describes the visual format of the report's dimensions in columns or
  2112  	// rows. The union of the fieldNames (dimension names) in all pivots must be a
  2113  	// subset of dimension names defined in Dimensions. No two pivots can share a
  2114  	// dimension. A dimension is only visible if it appears in a pivot.
  2115  	Pivots []*Pivot `json:"pivots,omitempty"`
  2116  	// Property: A Google Analytics GA4 property identifier whose events are
  2117  	// tracked. Specified in the URL path and not the body. To learn more, see
  2118  	// where to find your Property ID
  2119  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  2120  	// Within a batch request, this property should either be unspecified or
  2121  	// consistent with the batch-level property. Example: properties/1234
  2122  	Property string `json:"property,omitempty"`
  2123  	// ReturnPropertyQuota: Toggles whether to return the current state of this
  2124  	// Analytics Property's quota. Quota is returned in PropertyQuota
  2125  	// (#PropertyQuota).
  2126  	ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"`
  2127  	// ForceSendFields is a list of field names (e.g. "CohortSpec") to
  2128  	// unconditionally include in API requests. By default, fields with empty or
  2129  	// default values are omitted from API requests. See
  2130  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2131  	// details.
  2132  	ForceSendFields []string `json:"-"`
  2133  	// NullFields is a list of field names (e.g. "CohortSpec") to include in API
  2134  	// requests with the JSON null value. By default, fields with empty values are
  2135  	// omitted from API requests. See
  2136  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2137  	NullFields []string `json:"-"`
  2138  }
  2139  
  2140  func (s *RunPivotReportRequest) MarshalJSON() ([]byte, error) {
  2141  	type NoMethod RunPivotReportRequest
  2142  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2143  }
  2144  
  2145  // RunPivotReportResponse: The response pivot report table corresponding to a
  2146  // pivot request.
  2147  type RunPivotReportResponse struct {
  2148  	// Aggregates: Aggregation of metric values. Can be totals, minimums, or
  2149  	// maximums. The returned aggregations are controlled by the
  2150  	// metric_aggregations in the pivot. The type of aggregation returned in each
  2151  	// row is shown by the dimension_values which are set to "RESERVED_".
  2152  	Aggregates []*Row `json:"aggregates,omitempty"`
  2153  	// DimensionHeaders: Describes dimension columns. The number of
  2154  	// DimensionHeaders and ordering of DimensionHeaders matches the dimensions
  2155  	// present in rows.
  2156  	DimensionHeaders []*DimensionHeader `json:"dimensionHeaders,omitempty"`
  2157  	// Kind: Identifies what kind of resource this message is. This `kind` is
  2158  	// always the fixed string "analyticsData#runPivotReport". Useful to
  2159  	// distinguish between response types in JSON.
  2160  	Kind string `json:"kind,omitempty"`
  2161  	// Metadata: Metadata for the report.
  2162  	Metadata *ResponseMetaData `json:"metadata,omitempty"`
  2163  	// MetricHeaders: Describes metric columns. The number of MetricHeaders and
  2164  	// ordering of MetricHeaders matches the metrics present in rows.
  2165  	MetricHeaders []*MetricHeader `json:"metricHeaders,omitempty"`
  2166  	// PivotHeaders: Summarizes the columns and rows created by a pivot. Each pivot
  2167  	// in the request produces one header in the response. If we have a request
  2168  	// like this: "pivots": [{ "fieldNames": ["country", "city"] }, { "fieldNames":
  2169  	// "eventName" }] We will have the following `pivotHeaders` in the response:
  2170  	// "pivotHeaders" : [{ "dimensionHeaders": [{ "dimensionValues": [ { "value":
  2171  	// "United Kingdom" }, { "value": "London" } ] }, { "dimensionValues": [ {
  2172  	// "value": "Japan" }, { "value": "Osaka" } ] }] }, { "dimensionHeaders": [{
  2173  	// "dimensionValues": [{ "value": "session_start" }] }, { "dimensionValues": [{
  2174  	// "value": "scroll" }] }] }]
  2175  	PivotHeaders []*PivotHeader `json:"pivotHeaders,omitempty"`
  2176  	// PropertyQuota: This Analytics Property's quota state including this request.
  2177  	PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"`
  2178  	// Rows: Rows of dimension value combinations and metric values in the report.
  2179  	Rows []*Row `json:"rows,omitempty"`
  2180  
  2181  	// ServerResponse contains the HTTP response code and headers from the server.
  2182  	googleapi.ServerResponse `json:"-"`
  2183  	// ForceSendFields is a list of field names (e.g. "Aggregates") to
  2184  	// unconditionally include in API requests. By default, fields with empty or
  2185  	// default values are omitted from API requests. See
  2186  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2187  	// details.
  2188  	ForceSendFields []string `json:"-"`
  2189  	// NullFields is a list of field names (e.g. "Aggregates") to include in API
  2190  	// requests with the JSON null value. By default, fields with empty values are
  2191  	// omitted from API requests. See
  2192  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2193  	NullFields []string `json:"-"`
  2194  }
  2195  
  2196  func (s *RunPivotReportResponse) MarshalJSON() ([]byte, error) {
  2197  	type NoMethod RunPivotReportResponse
  2198  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2199  }
  2200  
  2201  // RunRealtimeReportRequest: The request to generate a realtime report.
  2202  type RunRealtimeReportRequest struct {
  2203  	// DimensionFilter: The filter clause of dimensions. Metrics cannot be used in
  2204  	// this filter.
  2205  	DimensionFilter *FilterExpression `json:"dimensionFilter,omitempty"`
  2206  	// Dimensions: The dimensions requested and displayed.
  2207  	Dimensions []*Dimension `json:"dimensions,omitempty"`
  2208  	// Limit: The number of rows to return. If unspecified, 10,000 rows are
  2209  	// returned. The API returns a maximum of 250,000 rows per request, no matter
  2210  	// how many you ask for. `limit` must be positive. The API can also return
  2211  	// fewer rows than the requested `limit`, if there aren't as many dimension
  2212  	// values as the `limit`. For instance, there are fewer than 300 possible
  2213  	// values for the dimension `country`, so when reporting on only `country`, you
  2214  	// can't get more than 300 rows, even if you set `limit` to a higher value.
  2215  	Limit int64 `json:"limit,omitempty,string"`
  2216  	// MetricAggregations: Aggregation of metrics. Aggregated metric values will be
  2217  	// shown in rows where the dimension_values are set to
  2218  	// "RESERVED_(MetricAggregation)".
  2219  	//
  2220  	// Possible values:
  2221  	//   "METRIC_AGGREGATION_UNSPECIFIED" - Unspecified operator.
  2222  	//   "TOTAL" - SUM operator.
  2223  	//   "MINIMUM" - Minimum operator.
  2224  	//   "MAXIMUM" - Maximum operator.
  2225  	//   "COUNT" - Count operator.
  2226  	MetricAggregations []string `json:"metricAggregations,omitempty"`
  2227  	// MetricFilter: The filter clause of metrics. Applied at post aggregation
  2228  	// phase, similar to SQL having-clause. Dimensions cannot be used in this
  2229  	// filter.
  2230  	MetricFilter *FilterExpression `json:"metricFilter,omitempty"`
  2231  	// Metrics: The metrics requested and displayed.
  2232  	Metrics []*Metric `json:"metrics,omitempty"`
  2233  	// MinuteRanges: The minute ranges of event data to read. If unspecified, one
  2234  	// minute range for the last 30 minutes will be used. If multiple minute ranges
  2235  	// are requested, each response row will contain a zero based minute range
  2236  	// index. If two minute ranges overlap, the event data for the overlapping
  2237  	// minutes is included in the response rows for both minute ranges.
  2238  	MinuteRanges []*MinuteRange `json:"minuteRanges,omitempty"`
  2239  	// OrderBys: Specifies how rows are ordered in the response.
  2240  	OrderBys []*OrderBy `json:"orderBys,omitempty"`
  2241  	// ReturnPropertyQuota: Toggles whether to return the current state of this
  2242  	// Analytics Property's Realtime quota. Quota is returned in PropertyQuota
  2243  	// (#PropertyQuota).
  2244  	ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"`
  2245  	// ForceSendFields is a list of field names (e.g. "DimensionFilter") to
  2246  	// unconditionally include in API requests. By default, fields with empty or
  2247  	// default values are omitted from API requests. See
  2248  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2249  	// details.
  2250  	ForceSendFields []string `json:"-"`
  2251  	// NullFields is a list of field names (e.g. "DimensionFilter") to include in
  2252  	// API requests with the JSON null value. By default, fields with empty values
  2253  	// are omitted from API requests. See
  2254  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2255  	NullFields []string `json:"-"`
  2256  }
  2257  
  2258  func (s *RunRealtimeReportRequest) MarshalJSON() ([]byte, error) {
  2259  	type NoMethod RunRealtimeReportRequest
  2260  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2261  }
  2262  
  2263  // RunRealtimeReportResponse: The response realtime report table corresponding
  2264  // to a request.
  2265  type RunRealtimeReportResponse struct {
  2266  	// DimensionHeaders: Describes dimension columns. The number of
  2267  	// DimensionHeaders and ordering of DimensionHeaders matches the dimensions
  2268  	// present in rows.
  2269  	DimensionHeaders []*DimensionHeader `json:"dimensionHeaders,omitempty"`
  2270  	// Kind: Identifies what kind of resource this message is. This `kind` is
  2271  	// always the fixed string "analyticsData#runRealtimeReport". Useful to
  2272  	// distinguish between response types in JSON.
  2273  	Kind string `json:"kind,omitempty"`
  2274  	// Maximums: If requested, the maximum values of metrics.
  2275  	Maximums []*Row `json:"maximums,omitempty"`
  2276  	// MetricHeaders: Describes metric columns. The number of MetricHeaders and
  2277  	// ordering of MetricHeaders matches the metrics present in rows.
  2278  	MetricHeaders []*MetricHeader `json:"metricHeaders,omitempty"`
  2279  	// Minimums: If requested, the minimum values of metrics.
  2280  	Minimums []*Row `json:"minimums,omitempty"`
  2281  	// PropertyQuota: This Analytics Property's Realtime quota state including this
  2282  	// request.
  2283  	PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"`
  2284  	// RowCount: The total number of rows in the query result. `rowCount` is
  2285  	// independent of the number of rows returned in the response and the `limit`
  2286  	// request parameter. For example if a query returns 175 rows and includes
  2287  	// `limit` of 50 in the API request, the response will contain `rowCount` of
  2288  	// 175 but only 50 rows.
  2289  	RowCount int64 `json:"rowCount,omitempty"`
  2290  	// Rows: Rows of dimension value combinations and metric values in the report.
  2291  	Rows []*Row `json:"rows,omitempty"`
  2292  	// Totals: If requested, the totaled values of metrics.
  2293  	Totals []*Row `json:"totals,omitempty"`
  2294  
  2295  	// ServerResponse contains the HTTP response code and headers from the server.
  2296  	googleapi.ServerResponse `json:"-"`
  2297  	// ForceSendFields is a list of field names (e.g. "DimensionHeaders") to
  2298  	// unconditionally include in API requests. By default, fields with empty or
  2299  	// default values are omitted from API requests. See
  2300  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2301  	// details.
  2302  	ForceSendFields []string `json:"-"`
  2303  	// NullFields is a list of field names (e.g. "DimensionHeaders") to include in
  2304  	// API requests with the JSON null value. By default, fields with empty values
  2305  	// are omitted from API requests. See
  2306  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2307  	NullFields []string `json:"-"`
  2308  }
  2309  
  2310  func (s *RunRealtimeReportResponse) MarshalJSON() ([]byte, error) {
  2311  	type NoMethod RunRealtimeReportResponse
  2312  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2313  }
  2314  
  2315  // RunReportRequest: The request to generate a report.
  2316  type RunReportRequest struct {
  2317  	// CohortSpec: Cohort group associated with this request. If there is a cohort
  2318  	// group in the request the 'cohort' dimension must be present.
  2319  	CohortSpec *CohortSpec `json:"cohortSpec,omitempty"`
  2320  	// Comparisons: Optional. The configuration of comparisons requested and
  2321  	// displayed. The request only requires a comparisons field in order to receive
  2322  	// a comparison column in the response.
  2323  	Comparisons []*Comparison `json:"comparisons,omitempty"`
  2324  	// CurrencyCode: A currency code in ISO4217 format, such as "AED", "USD",
  2325  	// "JPY". If the field is empty, the report uses the property's default
  2326  	// currency.
  2327  	CurrencyCode string `json:"currencyCode,omitempty"`
  2328  	// DateRanges: Date ranges of data to read. If multiple date ranges are
  2329  	// requested, each response row will contain a zero based date range index. If
  2330  	// two date ranges overlap, the event data for the overlapping days is included
  2331  	// in the response rows for both date ranges. In a cohort request, this
  2332  	// `dateRanges` must be unspecified.
  2333  	DateRanges []*DateRange `json:"dateRanges,omitempty"`
  2334  	// DimensionFilter: Dimension filters let you ask for only specific dimension
  2335  	// values in the report. To learn more, see Fundamentals of Dimension Filters
  2336  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
  2337  	// for examples. Metrics cannot be used in this filter.
  2338  	DimensionFilter *FilterExpression `json:"dimensionFilter,omitempty"`
  2339  	// Dimensions: The dimensions requested and displayed.
  2340  	Dimensions []*Dimension `json:"dimensions,omitempty"`
  2341  	// KeepEmptyRows: If false or unspecified, each row with all metrics equal to 0
  2342  	// will not be returned. If true, these rows will be returned if they are not
  2343  	// separately removed by a filter. Regardless of this `keep_empty_rows`
  2344  	// setting, only data recorded by the Google Analytics (GA4) property can be
  2345  	// displayed in a report. For example if a property never logs a `purchase`
  2346  	// event, then a query for the `eventName` dimension and `eventCount` metric
  2347  	// will not have a row eventName: "purchase" and eventCount: 0.
  2348  	KeepEmptyRows bool `json:"keepEmptyRows,omitempty"`
  2349  	// Limit: The number of rows to return. If unspecified, 10,000 rows are
  2350  	// returned. The API returns a maximum of 250,000 rows per request, no matter
  2351  	// how many you ask for. `limit` must be positive. The API can also return
  2352  	// fewer rows than the requested `limit`, if there aren't as many dimension
  2353  	// values as the `limit`. For instance, there are fewer than 300 possible
  2354  	// values for the dimension `country`, so when reporting on only `country`, you
  2355  	// can't get more than 300 rows, even if you set `limit` to a higher value. To
  2356  	// learn more about this pagination parameter, see Pagination
  2357  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  2358  	Limit int64 `json:"limit,omitempty,string"`
  2359  	// MetricAggregations: Aggregation of metrics. Aggregated metric values will be
  2360  	// shown in rows where the dimension_values are set to
  2361  	// "RESERVED_(MetricAggregation)".
  2362  	//
  2363  	// Possible values:
  2364  	//   "METRIC_AGGREGATION_UNSPECIFIED" - Unspecified operator.
  2365  	//   "TOTAL" - SUM operator.
  2366  	//   "MINIMUM" - Minimum operator.
  2367  	//   "MAXIMUM" - Maximum operator.
  2368  	//   "COUNT" - Count operator.
  2369  	MetricAggregations []string `json:"metricAggregations,omitempty"`
  2370  	// MetricFilter: The filter clause of metrics. Applied after aggregating the
  2371  	// report's rows, similar to SQL having-clause. Dimensions cannot be used in
  2372  	// this filter.
  2373  	MetricFilter *FilterExpression `json:"metricFilter,omitempty"`
  2374  	// Metrics: The metrics requested and displayed.
  2375  	Metrics []*Metric `json:"metrics,omitempty"`
  2376  	// Offset: The row count of the start row. The first row is counted as row 0.
  2377  	// When paging, the first request does not specify offset; or equivalently,
  2378  	// sets offset to 0; the first request returns the first `limit` of rows. The
  2379  	// second request sets offset to the `limit` of the first request; the second
  2380  	// request returns the second `limit` of rows. To learn more about this
  2381  	// pagination parameter, see Pagination
  2382  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  2383  	Offset int64 `json:"offset,omitempty,string"`
  2384  	// OrderBys: Specifies how rows are ordered in the response.
  2385  	OrderBys []*OrderBy `json:"orderBys,omitempty"`
  2386  	// Property: A Google Analytics GA4 property identifier whose events are
  2387  	// tracked. Specified in the URL path and not the body. To learn more, see
  2388  	// where to find your Property ID
  2389  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  2390  	// Within a batch request, this property should either be unspecified or
  2391  	// consistent with the batch-level property. Example: properties/1234
  2392  	Property string `json:"property,omitempty"`
  2393  	// ReturnPropertyQuota: Toggles whether to return the current state of this
  2394  	// Analytics Property's quota. Quota is returned in PropertyQuota
  2395  	// (#PropertyQuota).
  2396  	ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"`
  2397  	// ForceSendFields is a list of field names (e.g. "CohortSpec") to
  2398  	// unconditionally include in API requests. By default, fields with empty or
  2399  	// default values are omitted from API requests. See
  2400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2401  	// details.
  2402  	ForceSendFields []string `json:"-"`
  2403  	// NullFields is a list of field names (e.g. "CohortSpec") to include in API
  2404  	// requests with the JSON null value. By default, fields with empty values are
  2405  	// omitted from API requests. See
  2406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2407  	NullFields []string `json:"-"`
  2408  }
  2409  
  2410  func (s *RunReportRequest) MarshalJSON() ([]byte, error) {
  2411  	type NoMethod RunReportRequest
  2412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2413  }
  2414  
  2415  // RunReportResponse: The response report table corresponding to a request.
  2416  type RunReportResponse struct {
  2417  	// DimensionHeaders: Describes dimension columns. The number of
  2418  	// DimensionHeaders and ordering of DimensionHeaders matches the dimensions
  2419  	// present in rows.
  2420  	DimensionHeaders []*DimensionHeader `json:"dimensionHeaders,omitempty"`
  2421  	// Kind: Identifies what kind of resource this message is. This `kind` is
  2422  	// always the fixed string "analyticsData#runReport". Useful to distinguish
  2423  	// between response types in JSON.
  2424  	Kind string `json:"kind,omitempty"`
  2425  	// Maximums: If requested, the maximum values of metrics.
  2426  	Maximums []*Row `json:"maximums,omitempty"`
  2427  	// Metadata: Metadata for the report.
  2428  	Metadata *ResponseMetaData `json:"metadata,omitempty"`
  2429  	// MetricHeaders: Describes metric columns. The number of MetricHeaders and
  2430  	// ordering of MetricHeaders matches the metrics present in rows.
  2431  	MetricHeaders []*MetricHeader `json:"metricHeaders,omitempty"`
  2432  	// Minimums: If requested, the minimum values of metrics.
  2433  	Minimums []*Row `json:"minimums,omitempty"`
  2434  	// PropertyQuota: This Analytics Property's quota state including this request.
  2435  	PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"`
  2436  	// RowCount: The total number of rows in the query result. `rowCount` is
  2437  	// independent of the number of rows returned in the response, the `limit`
  2438  	// request parameter, and the `offset` request parameter. For example if a
  2439  	// query returns 175 rows and includes `limit` of 50 in the API request, the
  2440  	// response will contain `rowCount` of 175 but only 50 rows. To learn more
  2441  	// about this pagination parameter, see Pagination
  2442  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  2443  	RowCount int64 `json:"rowCount,omitempty"`
  2444  	// Rows: Rows of dimension value combinations and metric values in the report.
  2445  	Rows []*Row `json:"rows,omitempty"`
  2446  	// Totals: If requested, the totaled values of metrics.
  2447  	Totals []*Row `json:"totals,omitempty"`
  2448  
  2449  	// ServerResponse contains the HTTP response code and headers from the server.
  2450  	googleapi.ServerResponse `json:"-"`
  2451  	// ForceSendFields is a list of field names (e.g. "DimensionHeaders") to
  2452  	// unconditionally include in API requests. By default, fields with empty or
  2453  	// default values are omitted from API requests. See
  2454  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2455  	// details.
  2456  	ForceSendFields []string `json:"-"`
  2457  	// NullFields is a list of field names (e.g. "DimensionHeaders") to include in
  2458  	// API requests with the JSON null value. By default, fields with empty values
  2459  	// are omitted from API requests. See
  2460  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2461  	NullFields []string `json:"-"`
  2462  }
  2463  
  2464  func (s *RunReportResponse) MarshalJSON() ([]byte, error) {
  2465  	type NoMethod RunReportResponse
  2466  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2467  }
  2468  
  2469  // SamplingMetadata: If this report results is sampled
  2470  // (https://support.google.com/analytics/answer/13331292), this describes the
  2471  // percentage of events used in this report. Sampling is the practice of
  2472  // analyzing a subset of all data in order to uncover the meaningful
  2473  // information in the larger data set.
  2474  type SamplingMetadata struct {
  2475  	// SamplesReadCount: The total number of events read in this sampled report for
  2476  	// a date range. This is the size of the subset this property's data that was
  2477  	// analyzed in this report.
  2478  	SamplesReadCount int64 `json:"samplesReadCount,omitempty,string"`
  2479  	// SamplingSpaceSize: The total number of events present in this property's
  2480  	// data that could have been analyzed in this report for a date range. Sampling
  2481  	// uncovers the meaningful information about the larger data set, and this is
  2482  	// the size of the larger data set. To calculate the percentage of available
  2483  	// data that was used in this report, compute
  2484  	// `samplesReadCount/samplingSpaceSize`.
  2485  	SamplingSpaceSize int64 `json:"samplingSpaceSize,omitempty,string"`
  2486  	// ForceSendFields is a list of field names (e.g. "SamplesReadCount") to
  2487  	// unconditionally include in API requests. By default, fields with empty or
  2488  	// default values are omitted from API requests. See
  2489  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2490  	// details.
  2491  	ForceSendFields []string `json:"-"`
  2492  	// NullFields is a list of field names (e.g. "SamplesReadCount") to include in
  2493  	// API requests with the JSON null value. By default, fields with empty values
  2494  	// are omitted from API requests. See
  2495  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2496  	NullFields []string `json:"-"`
  2497  }
  2498  
  2499  func (s *SamplingMetadata) MarshalJSON() ([]byte, error) {
  2500  	type NoMethod SamplingMetadata
  2501  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2502  }
  2503  
  2504  // SchemaRestrictionResponse: The schema restrictions actively enforced in
  2505  // creating this report. To learn more, see Access and data-restriction
  2506  // management (https://support.google.com/analytics/answer/10851388).
  2507  type SchemaRestrictionResponse struct {
  2508  	// ActiveMetricRestrictions: All restrictions actively enforced in creating the
  2509  	// report. For example, `purchaseRevenue` always has the restriction type
  2510  	// `REVENUE_DATA`. However, this active response restriction is only populated
  2511  	// if the user's custom role disallows access to `REVENUE_DATA`.
  2512  	ActiveMetricRestrictions []*ActiveMetricRestriction `json:"activeMetricRestrictions,omitempty"`
  2513  	// ForceSendFields is a list of field names (e.g. "ActiveMetricRestrictions")
  2514  	// to unconditionally include in API requests. By default, fields with empty or
  2515  	// default values are omitted from API requests. See
  2516  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2517  	// details.
  2518  	ForceSendFields []string `json:"-"`
  2519  	// NullFields is a list of field names (e.g. "ActiveMetricRestrictions") to
  2520  	// include in API requests with the JSON null value. By default, fields with
  2521  	// empty values are omitted from API requests. See
  2522  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2523  	NullFields []string `json:"-"`
  2524  }
  2525  
  2526  func (s *SchemaRestrictionResponse) MarshalJSON() ([]byte, error) {
  2527  	type NoMethod SchemaRestrictionResponse
  2528  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2529  }
  2530  
  2531  // Status: The `Status` type defines a logical error model that is suitable for
  2532  // different programming environments, including REST APIs and RPC APIs. It is
  2533  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2534  // pieces of data: error code, error message, and error details. You can find
  2535  // out more about this error model and how to work with it in the API Design
  2536  // Guide (https://cloud.google.com/apis/design/errors).
  2537  type Status struct {
  2538  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2539  	Code int64 `json:"code,omitempty"`
  2540  	// Details: A list of messages that carry the error details. There is a common
  2541  	// set of message types for APIs to use.
  2542  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2543  	// Message: A developer-facing error message, which should be in English. Any
  2544  	// user-facing error message should be localized and sent in the
  2545  	// google.rpc.Status.details field, or localized by the client.
  2546  	Message string `json:"message,omitempty"`
  2547  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2548  	// include in API requests. By default, fields with empty or default values are
  2549  	// omitted from API requests. See
  2550  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2551  	// details.
  2552  	ForceSendFields []string `json:"-"`
  2553  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2554  	// with the JSON null value. By default, fields with empty values are omitted
  2555  	// from API requests. See
  2556  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2557  	NullFields []string `json:"-"`
  2558  }
  2559  
  2560  func (s *Status) MarshalJSON() ([]byte, error) {
  2561  	type NoMethod Status
  2562  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2563  }
  2564  
  2565  // StringFilter: The filter for string
  2566  type StringFilter struct {
  2567  	// CaseSensitive: If true, the string value is case sensitive.
  2568  	CaseSensitive bool `json:"caseSensitive,omitempty"`
  2569  	// MatchType: The match type for this filter.
  2570  	//
  2571  	// Possible values:
  2572  	//   "MATCH_TYPE_UNSPECIFIED" - Unspecified
  2573  	//   "EXACT" - Exact match of the string value.
  2574  	//   "BEGINS_WITH" - Begins with the string value.
  2575  	//   "ENDS_WITH" - Ends with the string value.
  2576  	//   "CONTAINS" - Contains the string value.
  2577  	//   "FULL_REGEXP" - Full match for the regular expression with the string
  2578  	// value.
  2579  	//   "PARTIAL_REGEXP" - Partial match for the regular expression with the
  2580  	// string value.
  2581  	MatchType string `json:"matchType,omitempty"`
  2582  	// Value: The string value used for the matching.
  2583  	Value string `json:"value,omitempty"`
  2584  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
  2585  	// unconditionally include in API requests. By default, fields with empty or
  2586  	// default values are omitted from API requests. See
  2587  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2588  	// details.
  2589  	ForceSendFields []string `json:"-"`
  2590  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
  2591  	// requests with the JSON null value. By default, fields with empty values are
  2592  	// omitted from API requests. See
  2593  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2594  	NullFields []string `json:"-"`
  2595  }
  2596  
  2597  func (s *StringFilter) MarshalJSON() ([]byte, error) {
  2598  	type NoMethod StringFilter
  2599  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2600  }
  2601  
  2602  // V1betaAudienceDimension: An audience dimension is a user attribute. Specific
  2603  // user attributed are requested and then later returned in the
  2604  // `QueryAudienceExportResponse`.
  2605  type V1betaAudienceDimension struct {
  2606  	// DimensionName: Optional. The API name of the dimension. See the API
  2607  	// Dimensions
  2608  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions)
  2609  	// for the list of dimension names.
  2610  	DimensionName string `json:"dimensionName,omitempty"`
  2611  	// ForceSendFields is a list of field names (e.g. "DimensionName") to
  2612  	// unconditionally include in API requests. By default, fields with empty or
  2613  	// default values are omitted from API requests. See
  2614  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2615  	// details.
  2616  	ForceSendFields []string `json:"-"`
  2617  	// NullFields is a list of field names (e.g. "DimensionName") to include in API
  2618  	// requests with the JSON null value. By default, fields with empty values are
  2619  	// omitted from API requests. See
  2620  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2621  	NullFields []string `json:"-"`
  2622  }
  2623  
  2624  func (s *V1betaAudienceDimension) MarshalJSON() ([]byte, error) {
  2625  	type NoMethod V1betaAudienceDimension
  2626  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2627  }
  2628  
  2629  // V1betaAudienceDimensionValue: The value of a dimension.
  2630  type V1betaAudienceDimensionValue struct {
  2631  	// Value: Value as a string if the dimension type is a string.
  2632  	Value string `json:"value,omitempty"`
  2633  	// ForceSendFields is a list of field names (e.g. "Value") to unconditionally
  2634  	// include in API requests. By default, fields with empty or default values are
  2635  	// omitted from API requests. See
  2636  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2637  	// details.
  2638  	ForceSendFields []string `json:"-"`
  2639  	// NullFields is a list of field names (e.g. "Value") to include in API
  2640  	// requests with the JSON null value. By default, fields with empty values are
  2641  	// omitted from API requests. See
  2642  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2643  	NullFields []string `json:"-"`
  2644  }
  2645  
  2646  func (s *V1betaAudienceDimensionValue) MarshalJSON() ([]byte, error) {
  2647  	type NoMethod V1betaAudienceDimensionValue
  2648  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2649  }
  2650  
  2651  // V1betaAudienceRow: Dimension value attributes for the audience user row.
  2652  type V1betaAudienceRow struct {
  2653  	// DimensionValues: Each dimension value attribute for an audience user. One
  2654  	// dimension value will be added for each dimension column requested.
  2655  	DimensionValues []*V1betaAudienceDimensionValue `json:"dimensionValues,omitempty"`
  2656  	// ForceSendFields is a list of field names (e.g. "DimensionValues") to
  2657  	// unconditionally include in API requests. By default, fields with empty or
  2658  	// default values are omitted from API requests. See
  2659  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2660  	// details.
  2661  	ForceSendFields []string `json:"-"`
  2662  	// NullFields is a list of field names (e.g. "DimensionValues") to include in
  2663  	// API requests with the JSON null value. By default, fields with empty values
  2664  	// are omitted from API requests. See
  2665  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2666  	NullFields []string `json:"-"`
  2667  }
  2668  
  2669  func (s *V1betaAudienceRow) MarshalJSON() ([]byte, error) {
  2670  	type NoMethod V1betaAudienceRow
  2671  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2672  }
  2673  
  2674  type PropertiesBatchRunPivotReportsCall struct {
  2675  	s                           *Service
  2676  	propertyid                  string
  2677  	batchrunpivotreportsrequest *BatchRunPivotReportsRequest
  2678  	urlParams_                  gensupport.URLParams
  2679  	ctx_                        context.Context
  2680  	header_                     http.Header
  2681  }
  2682  
  2683  // BatchRunPivotReports: Returns multiple pivot reports in a batch. All reports
  2684  // must be for the same GA4 Property.
  2685  //
  2686  //   - property: A Google Analytics GA4 property identifier whose events are
  2687  //     tracked. Specified in the URL path and not the body. To learn more, see
  2688  //     where to find your Property ID
  2689  //     (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  2690  //     This property must be specified for the batch. The property within
  2691  //     RunPivotReportRequest may either be unspecified or consistent with this
  2692  //     property. Example: properties/1234.
  2693  func (r *PropertiesService) BatchRunPivotReports(propertyid string, batchrunpivotreportsrequest *BatchRunPivotReportsRequest) *PropertiesBatchRunPivotReportsCall {
  2694  	c := &PropertiesBatchRunPivotReportsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2695  	c.propertyid = propertyid
  2696  	c.batchrunpivotreportsrequest = batchrunpivotreportsrequest
  2697  	return c
  2698  }
  2699  
  2700  // Fields allows partial responses to be retrieved. See
  2701  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2702  // details.
  2703  func (c *PropertiesBatchRunPivotReportsCall) Fields(s ...googleapi.Field) *PropertiesBatchRunPivotReportsCall {
  2704  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2705  	return c
  2706  }
  2707  
  2708  // Context sets the context to be used in this call's Do method.
  2709  func (c *PropertiesBatchRunPivotReportsCall) Context(ctx context.Context) *PropertiesBatchRunPivotReportsCall {
  2710  	c.ctx_ = ctx
  2711  	return c
  2712  }
  2713  
  2714  // Header returns a http.Header that can be modified by the caller to add
  2715  // headers to the request.
  2716  func (c *PropertiesBatchRunPivotReportsCall) Header() http.Header {
  2717  	if c.header_ == nil {
  2718  		c.header_ = make(http.Header)
  2719  	}
  2720  	return c.header_
  2721  }
  2722  
  2723  func (c *PropertiesBatchRunPivotReportsCall) doRequest(alt string) (*http.Response, error) {
  2724  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2725  	var body io.Reader = nil
  2726  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchrunpivotreportsrequest)
  2727  	if err != nil {
  2728  		return nil, err
  2729  	}
  2730  	c.urlParams_.Set("alt", alt)
  2731  	c.urlParams_.Set("prettyPrint", "false")
  2732  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+property}:batchRunPivotReports")
  2733  	urls += "?" + c.urlParams_.Encode()
  2734  	req, err := http.NewRequest("POST", urls, body)
  2735  	if err != nil {
  2736  		return nil, err
  2737  	}
  2738  	req.Header = reqHeaders
  2739  	googleapi.Expand(req.URL, map[string]string{
  2740  		"property": c.propertyid,
  2741  	})
  2742  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2743  }
  2744  
  2745  // Do executes the "analyticsdata.properties.batchRunPivotReports" call.
  2746  // Any non-2xx status code is an error. Response headers are in either
  2747  // *BatchRunPivotReportsResponse.ServerResponse.Header or (if a response was
  2748  // returned at all) in error.(*googleapi.Error).Header. Use
  2749  // googleapi.IsNotModified to check whether the returned error was because
  2750  // http.StatusNotModified was returned.
  2751  func (c *PropertiesBatchRunPivotReportsCall) Do(opts ...googleapi.CallOption) (*BatchRunPivotReportsResponse, error) {
  2752  	gensupport.SetOptions(c.urlParams_, opts...)
  2753  	res, err := c.doRequest("json")
  2754  	if res != nil && res.StatusCode == http.StatusNotModified {
  2755  		if res.Body != nil {
  2756  			res.Body.Close()
  2757  		}
  2758  		return nil, gensupport.WrapError(&googleapi.Error{
  2759  			Code:   res.StatusCode,
  2760  			Header: res.Header,
  2761  		})
  2762  	}
  2763  	if err != nil {
  2764  		return nil, err
  2765  	}
  2766  	defer googleapi.CloseBody(res)
  2767  	if err := googleapi.CheckResponse(res); err != nil {
  2768  		return nil, gensupport.WrapError(err)
  2769  	}
  2770  	ret := &BatchRunPivotReportsResponse{
  2771  		ServerResponse: googleapi.ServerResponse{
  2772  			Header:         res.Header,
  2773  			HTTPStatusCode: res.StatusCode,
  2774  		},
  2775  	}
  2776  	target := &ret
  2777  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2778  		return nil, err
  2779  	}
  2780  	return ret, nil
  2781  }
  2782  
  2783  type PropertiesBatchRunReportsCall struct {
  2784  	s                      *Service
  2785  	propertyid             string
  2786  	batchrunreportsrequest *BatchRunReportsRequest
  2787  	urlParams_             gensupport.URLParams
  2788  	ctx_                   context.Context
  2789  	header_                http.Header
  2790  }
  2791  
  2792  // BatchRunReports: Returns multiple reports in a batch. All reports must be
  2793  // for the same GA4 Property.
  2794  //
  2795  //   - property: A Google Analytics GA4 property identifier whose events are
  2796  //     tracked. Specified in the URL path and not the body. To learn more, see
  2797  //     where to find your Property ID
  2798  //     (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  2799  //     This property must be specified for the batch. The property within
  2800  //     RunReportRequest may either be unspecified or consistent with this
  2801  //     property. Example: properties/1234.
  2802  func (r *PropertiesService) BatchRunReports(propertyid string, batchrunreportsrequest *BatchRunReportsRequest) *PropertiesBatchRunReportsCall {
  2803  	c := &PropertiesBatchRunReportsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2804  	c.propertyid = propertyid
  2805  	c.batchrunreportsrequest = batchrunreportsrequest
  2806  	return c
  2807  }
  2808  
  2809  // Fields allows partial responses to be retrieved. See
  2810  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2811  // details.
  2812  func (c *PropertiesBatchRunReportsCall) Fields(s ...googleapi.Field) *PropertiesBatchRunReportsCall {
  2813  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2814  	return c
  2815  }
  2816  
  2817  // Context sets the context to be used in this call's Do method.
  2818  func (c *PropertiesBatchRunReportsCall) Context(ctx context.Context) *PropertiesBatchRunReportsCall {
  2819  	c.ctx_ = ctx
  2820  	return c
  2821  }
  2822  
  2823  // Header returns a http.Header that can be modified by the caller to add
  2824  // headers to the request.
  2825  func (c *PropertiesBatchRunReportsCall) Header() http.Header {
  2826  	if c.header_ == nil {
  2827  		c.header_ = make(http.Header)
  2828  	}
  2829  	return c.header_
  2830  }
  2831  
  2832  func (c *PropertiesBatchRunReportsCall) doRequest(alt string) (*http.Response, error) {
  2833  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2834  	var body io.Reader = nil
  2835  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchrunreportsrequest)
  2836  	if err != nil {
  2837  		return nil, err
  2838  	}
  2839  	c.urlParams_.Set("alt", alt)
  2840  	c.urlParams_.Set("prettyPrint", "false")
  2841  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+property}:batchRunReports")
  2842  	urls += "?" + c.urlParams_.Encode()
  2843  	req, err := http.NewRequest("POST", urls, body)
  2844  	if err != nil {
  2845  		return nil, err
  2846  	}
  2847  	req.Header = reqHeaders
  2848  	googleapi.Expand(req.URL, map[string]string{
  2849  		"property": c.propertyid,
  2850  	})
  2851  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2852  }
  2853  
  2854  // Do executes the "analyticsdata.properties.batchRunReports" call.
  2855  // Any non-2xx status code is an error. Response headers are in either
  2856  // *BatchRunReportsResponse.ServerResponse.Header or (if a response was
  2857  // returned at all) in error.(*googleapi.Error).Header. Use
  2858  // googleapi.IsNotModified to check whether the returned error was because
  2859  // http.StatusNotModified was returned.
  2860  func (c *PropertiesBatchRunReportsCall) Do(opts ...googleapi.CallOption) (*BatchRunReportsResponse, error) {
  2861  	gensupport.SetOptions(c.urlParams_, opts...)
  2862  	res, err := c.doRequest("json")
  2863  	if res != nil && res.StatusCode == http.StatusNotModified {
  2864  		if res.Body != nil {
  2865  			res.Body.Close()
  2866  		}
  2867  		return nil, gensupport.WrapError(&googleapi.Error{
  2868  			Code:   res.StatusCode,
  2869  			Header: res.Header,
  2870  		})
  2871  	}
  2872  	if err != nil {
  2873  		return nil, err
  2874  	}
  2875  	defer googleapi.CloseBody(res)
  2876  	if err := googleapi.CheckResponse(res); err != nil {
  2877  		return nil, gensupport.WrapError(err)
  2878  	}
  2879  	ret := &BatchRunReportsResponse{
  2880  		ServerResponse: googleapi.ServerResponse{
  2881  			Header:         res.Header,
  2882  			HTTPStatusCode: res.StatusCode,
  2883  		},
  2884  	}
  2885  	target := &ret
  2886  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2887  		return nil, err
  2888  	}
  2889  	return ret, nil
  2890  }
  2891  
  2892  type PropertiesCheckCompatibilityCall struct {
  2893  	s                         *Service
  2894  	propertyid                string
  2895  	checkcompatibilityrequest *CheckCompatibilityRequest
  2896  	urlParams_                gensupport.URLParams
  2897  	ctx_                      context.Context
  2898  	header_                   http.Header
  2899  }
  2900  
  2901  // CheckCompatibility: This compatibility method lists dimensions and metrics
  2902  // that can be added to a report request and maintain compatibility. This
  2903  // method fails if the request's dimensions and metrics are incompatible. In
  2904  // Google Analytics, reports fail if they request incompatible dimensions
  2905  // and/or metrics; in that case, you will need to remove dimensions and/or
  2906  // metrics from the incompatible report until the report is compatible. The
  2907  // Realtime and Core reports have different compatibility rules. This method
  2908  // checks compatibility for Core reports.
  2909  //
  2910  //   - property: A Google Analytics GA4 property identifier whose events are
  2911  //     tracked. To learn more, see where to find your Property ID
  2912  //     (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  2913  //     `property` should be the same value as in your `runReport` request.
  2914  //     Example: properties/1234.
  2915  func (r *PropertiesService) CheckCompatibility(propertyid string, checkcompatibilityrequest *CheckCompatibilityRequest) *PropertiesCheckCompatibilityCall {
  2916  	c := &PropertiesCheckCompatibilityCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2917  	c.propertyid = propertyid
  2918  	c.checkcompatibilityrequest = checkcompatibilityrequest
  2919  	return c
  2920  }
  2921  
  2922  // Fields allows partial responses to be retrieved. See
  2923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2924  // details.
  2925  func (c *PropertiesCheckCompatibilityCall) Fields(s ...googleapi.Field) *PropertiesCheckCompatibilityCall {
  2926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2927  	return c
  2928  }
  2929  
  2930  // Context sets the context to be used in this call's Do method.
  2931  func (c *PropertiesCheckCompatibilityCall) Context(ctx context.Context) *PropertiesCheckCompatibilityCall {
  2932  	c.ctx_ = ctx
  2933  	return c
  2934  }
  2935  
  2936  // Header returns a http.Header that can be modified by the caller to add
  2937  // headers to the request.
  2938  func (c *PropertiesCheckCompatibilityCall) Header() http.Header {
  2939  	if c.header_ == nil {
  2940  		c.header_ = make(http.Header)
  2941  	}
  2942  	return c.header_
  2943  }
  2944  
  2945  func (c *PropertiesCheckCompatibilityCall) doRequest(alt string) (*http.Response, error) {
  2946  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2947  	var body io.Reader = nil
  2948  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkcompatibilityrequest)
  2949  	if err != nil {
  2950  		return nil, err
  2951  	}
  2952  	c.urlParams_.Set("alt", alt)
  2953  	c.urlParams_.Set("prettyPrint", "false")
  2954  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+property}:checkCompatibility")
  2955  	urls += "?" + c.urlParams_.Encode()
  2956  	req, err := http.NewRequest("POST", urls, body)
  2957  	if err != nil {
  2958  		return nil, err
  2959  	}
  2960  	req.Header = reqHeaders
  2961  	googleapi.Expand(req.URL, map[string]string{
  2962  		"property": c.propertyid,
  2963  	})
  2964  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2965  }
  2966  
  2967  // Do executes the "analyticsdata.properties.checkCompatibility" call.
  2968  // Any non-2xx status code is an error. Response headers are in either
  2969  // *CheckCompatibilityResponse.ServerResponse.Header or (if a response was
  2970  // returned at all) in error.(*googleapi.Error).Header. Use
  2971  // googleapi.IsNotModified to check whether the returned error was because
  2972  // http.StatusNotModified was returned.
  2973  func (c *PropertiesCheckCompatibilityCall) Do(opts ...googleapi.CallOption) (*CheckCompatibilityResponse, error) {
  2974  	gensupport.SetOptions(c.urlParams_, opts...)
  2975  	res, err := c.doRequest("json")
  2976  	if res != nil && res.StatusCode == http.StatusNotModified {
  2977  		if res.Body != nil {
  2978  			res.Body.Close()
  2979  		}
  2980  		return nil, gensupport.WrapError(&googleapi.Error{
  2981  			Code:   res.StatusCode,
  2982  			Header: res.Header,
  2983  		})
  2984  	}
  2985  	if err != nil {
  2986  		return nil, err
  2987  	}
  2988  	defer googleapi.CloseBody(res)
  2989  	if err := googleapi.CheckResponse(res); err != nil {
  2990  		return nil, gensupport.WrapError(err)
  2991  	}
  2992  	ret := &CheckCompatibilityResponse{
  2993  		ServerResponse: googleapi.ServerResponse{
  2994  			Header:         res.Header,
  2995  			HTTPStatusCode: res.StatusCode,
  2996  		},
  2997  	}
  2998  	target := &ret
  2999  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3000  		return nil, err
  3001  	}
  3002  	return ret, nil
  3003  }
  3004  
  3005  type PropertiesGetMetadataCall struct {
  3006  	s            *Service
  3007  	nameid       string
  3008  	urlParams_   gensupport.URLParams
  3009  	ifNoneMatch_ string
  3010  	ctx_         context.Context
  3011  	header_      http.Header
  3012  }
  3013  
  3014  // GetMetadata: Returns metadata for dimensions and metrics available in
  3015  // reporting methods. Used to explore the dimensions and metrics. In this
  3016  // method, a Google Analytics GA4 Property Identifier is specified in the
  3017  // request, and the metadata response includes Custom dimensions and metrics as
  3018  // well as Universal metadata. For example if a custom metric with parameter
  3019  // name `levels_unlocked` is registered to a property, the Metadata response
  3020  // will contain `customEvent:levels_unlocked`. Universal metadata are
  3021  // dimensions and metrics applicable to any property such as `country` and
  3022  // `totalUsers`.
  3023  //
  3024  //   - name: The resource name of the metadata to retrieve. This name field is
  3025  //     specified in the URL path and not URL parameters. Property is a numeric
  3026  //     Google Analytics GA4 Property identifier. To learn more, see where to find
  3027  //     your Property ID
  3028  //     (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  3029  //     Example: properties/1234/metadata Set the Property ID to 0 for dimensions
  3030  //     and metrics common to all properties. In this special mode, this method
  3031  //     will not return custom dimensions and metrics.
  3032  func (r *PropertiesService) GetMetadata(nameid string) *PropertiesGetMetadataCall {
  3033  	c := &PropertiesGetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3034  	c.nameid = nameid
  3035  	return c
  3036  }
  3037  
  3038  // Fields allows partial responses to be retrieved. See
  3039  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3040  // details.
  3041  func (c *PropertiesGetMetadataCall) Fields(s ...googleapi.Field) *PropertiesGetMetadataCall {
  3042  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3043  	return c
  3044  }
  3045  
  3046  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3047  // object's ETag matches the given value. This is useful for getting updates
  3048  // only after the object has changed since the last request.
  3049  func (c *PropertiesGetMetadataCall) IfNoneMatch(entityTag string) *PropertiesGetMetadataCall {
  3050  	c.ifNoneMatch_ = entityTag
  3051  	return c
  3052  }
  3053  
  3054  // Context sets the context to be used in this call's Do method.
  3055  func (c *PropertiesGetMetadataCall) Context(ctx context.Context) *PropertiesGetMetadataCall {
  3056  	c.ctx_ = ctx
  3057  	return c
  3058  }
  3059  
  3060  // Header returns a http.Header that can be modified by the caller to add
  3061  // headers to the request.
  3062  func (c *PropertiesGetMetadataCall) Header() http.Header {
  3063  	if c.header_ == nil {
  3064  		c.header_ = make(http.Header)
  3065  	}
  3066  	return c.header_
  3067  }
  3068  
  3069  func (c *PropertiesGetMetadataCall) doRequest(alt string) (*http.Response, error) {
  3070  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3071  	if c.ifNoneMatch_ != "" {
  3072  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3073  	}
  3074  	var body io.Reader = nil
  3075  	c.urlParams_.Set("alt", alt)
  3076  	c.urlParams_.Set("prettyPrint", "false")
  3077  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3078  	urls += "?" + c.urlParams_.Encode()
  3079  	req, err := http.NewRequest("GET", urls, body)
  3080  	if err != nil {
  3081  		return nil, err
  3082  	}
  3083  	req.Header = reqHeaders
  3084  	googleapi.Expand(req.URL, map[string]string{
  3085  		"name": c.nameid,
  3086  	})
  3087  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3088  }
  3089  
  3090  // Do executes the "analyticsdata.properties.getMetadata" call.
  3091  // Any non-2xx status code is an error. Response headers are in either
  3092  // *Metadata.ServerResponse.Header or (if a response was returned at all) in
  3093  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3094  // whether the returned error was because http.StatusNotModified was returned.
  3095  func (c *PropertiesGetMetadataCall) Do(opts ...googleapi.CallOption) (*Metadata, error) {
  3096  	gensupport.SetOptions(c.urlParams_, opts...)
  3097  	res, err := c.doRequest("json")
  3098  	if res != nil && res.StatusCode == http.StatusNotModified {
  3099  		if res.Body != nil {
  3100  			res.Body.Close()
  3101  		}
  3102  		return nil, gensupport.WrapError(&googleapi.Error{
  3103  			Code:   res.StatusCode,
  3104  			Header: res.Header,
  3105  		})
  3106  	}
  3107  	if err != nil {
  3108  		return nil, err
  3109  	}
  3110  	defer googleapi.CloseBody(res)
  3111  	if err := googleapi.CheckResponse(res); err != nil {
  3112  		return nil, gensupport.WrapError(err)
  3113  	}
  3114  	ret := &Metadata{
  3115  		ServerResponse: googleapi.ServerResponse{
  3116  			Header:         res.Header,
  3117  			HTTPStatusCode: res.StatusCode,
  3118  		},
  3119  	}
  3120  	target := &ret
  3121  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3122  		return nil, err
  3123  	}
  3124  	return ret, nil
  3125  }
  3126  
  3127  type PropertiesRunPivotReportCall struct {
  3128  	s                     *Service
  3129  	propertyid            string
  3130  	runpivotreportrequest *RunPivotReportRequest
  3131  	urlParams_            gensupport.URLParams
  3132  	ctx_                  context.Context
  3133  	header_               http.Header
  3134  }
  3135  
  3136  // RunPivotReport: Returns a customized pivot report of your Google Analytics
  3137  // event data. Pivot reports are more advanced and expressive formats than
  3138  // regular reports. In a pivot report, dimensions are only visible if they are
  3139  // included in a pivot. Multiple pivots can be specified to further dissect
  3140  // your data.
  3141  //
  3142  //   - property: A Google Analytics GA4 property identifier whose events are
  3143  //     tracked. Specified in the URL path and not the body. To learn more, see
  3144  //     where to find your Property ID
  3145  //     (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  3146  //     Within a batch request, this property should either be unspecified or
  3147  //     consistent with the batch-level property. Example: properties/1234.
  3148  func (r *PropertiesService) RunPivotReport(propertyid string, runpivotreportrequest *RunPivotReportRequest) *PropertiesRunPivotReportCall {
  3149  	c := &PropertiesRunPivotReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3150  	c.propertyid = propertyid
  3151  	c.runpivotreportrequest = runpivotreportrequest
  3152  	return c
  3153  }
  3154  
  3155  // Fields allows partial responses to be retrieved. See
  3156  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3157  // details.
  3158  func (c *PropertiesRunPivotReportCall) Fields(s ...googleapi.Field) *PropertiesRunPivotReportCall {
  3159  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3160  	return c
  3161  }
  3162  
  3163  // Context sets the context to be used in this call's Do method.
  3164  func (c *PropertiesRunPivotReportCall) Context(ctx context.Context) *PropertiesRunPivotReportCall {
  3165  	c.ctx_ = ctx
  3166  	return c
  3167  }
  3168  
  3169  // Header returns a http.Header that can be modified by the caller to add
  3170  // headers to the request.
  3171  func (c *PropertiesRunPivotReportCall) Header() http.Header {
  3172  	if c.header_ == nil {
  3173  		c.header_ = make(http.Header)
  3174  	}
  3175  	return c.header_
  3176  }
  3177  
  3178  func (c *PropertiesRunPivotReportCall) doRequest(alt string) (*http.Response, error) {
  3179  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3180  	var body io.Reader = nil
  3181  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runpivotreportrequest)
  3182  	if err != nil {
  3183  		return nil, err
  3184  	}
  3185  	c.urlParams_.Set("alt", alt)
  3186  	c.urlParams_.Set("prettyPrint", "false")
  3187  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+property}:runPivotReport")
  3188  	urls += "?" + c.urlParams_.Encode()
  3189  	req, err := http.NewRequest("POST", urls, body)
  3190  	if err != nil {
  3191  		return nil, err
  3192  	}
  3193  	req.Header = reqHeaders
  3194  	googleapi.Expand(req.URL, map[string]string{
  3195  		"property": c.propertyid,
  3196  	})
  3197  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3198  }
  3199  
  3200  // Do executes the "analyticsdata.properties.runPivotReport" call.
  3201  // Any non-2xx status code is an error. Response headers are in either
  3202  // *RunPivotReportResponse.ServerResponse.Header or (if a response was returned
  3203  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3204  // check whether the returned error was because http.StatusNotModified was
  3205  // returned.
  3206  func (c *PropertiesRunPivotReportCall) Do(opts ...googleapi.CallOption) (*RunPivotReportResponse, error) {
  3207  	gensupport.SetOptions(c.urlParams_, opts...)
  3208  	res, err := c.doRequest("json")
  3209  	if res != nil && res.StatusCode == http.StatusNotModified {
  3210  		if res.Body != nil {
  3211  			res.Body.Close()
  3212  		}
  3213  		return nil, gensupport.WrapError(&googleapi.Error{
  3214  			Code:   res.StatusCode,
  3215  			Header: res.Header,
  3216  		})
  3217  	}
  3218  	if err != nil {
  3219  		return nil, err
  3220  	}
  3221  	defer googleapi.CloseBody(res)
  3222  	if err := googleapi.CheckResponse(res); err != nil {
  3223  		return nil, gensupport.WrapError(err)
  3224  	}
  3225  	ret := &RunPivotReportResponse{
  3226  		ServerResponse: googleapi.ServerResponse{
  3227  			Header:         res.Header,
  3228  			HTTPStatusCode: res.StatusCode,
  3229  		},
  3230  	}
  3231  	target := &ret
  3232  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3233  		return nil, err
  3234  	}
  3235  	return ret, nil
  3236  }
  3237  
  3238  type PropertiesRunRealtimeReportCall struct {
  3239  	s                        *Service
  3240  	propertyid               string
  3241  	runrealtimereportrequest *RunRealtimeReportRequest
  3242  	urlParams_               gensupport.URLParams
  3243  	ctx_                     context.Context
  3244  	header_                  http.Header
  3245  }
  3246  
  3247  // RunRealtimeReport: Returns a customized report of realtime event data for
  3248  // your property. Events appear in realtime reports seconds after they have
  3249  // been sent to the Google Analytics. Realtime reports show events and usage
  3250  // data for the periods of time ranging from the present moment to 30 minutes
  3251  // ago (up to 60 minutes for Google Analytics 360 properties). For a guide to
  3252  // constructing realtime requests & understanding responses, see Creating a
  3253  // Realtime Report
  3254  // (https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).
  3255  //
  3256  //   - property: A Google Analytics GA4 property identifier whose events are
  3257  //     tracked. Specified in the URL path and not the body. To learn more, see
  3258  //     where to find your Property ID
  3259  //     (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  3260  //     Example: properties/1234.
  3261  func (r *PropertiesService) RunRealtimeReport(propertyid string, runrealtimereportrequest *RunRealtimeReportRequest) *PropertiesRunRealtimeReportCall {
  3262  	c := &PropertiesRunRealtimeReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3263  	c.propertyid = propertyid
  3264  	c.runrealtimereportrequest = runrealtimereportrequest
  3265  	return c
  3266  }
  3267  
  3268  // Fields allows partial responses to be retrieved. See
  3269  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3270  // details.
  3271  func (c *PropertiesRunRealtimeReportCall) Fields(s ...googleapi.Field) *PropertiesRunRealtimeReportCall {
  3272  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3273  	return c
  3274  }
  3275  
  3276  // Context sets the context to be used in this call's Do method.
  3277  func (c *PropertiesRunRealtimeReportCall) Context(ctx context.Context) *PropertiesRunRealtimeReportCall {
  3278  	c.ctx_ = ctx
  3279  	return c
  3280  }
  3281  
  3282  // Header returns a http.Header that can be modified by the caller to add
  3283  // headers to the request.
  3284  func (c *PropertiesRunRealtimeReportCall) Header() http.Header {
  3285  	if c.header_ == nil {
  3286  		c.header_ = make(http.Header)
  3287  	}
  3288  	return c.header_
  3289  }
  3290  
  3291  func (c *PropertiesRunRealtimeReportCall) doRequest(alt string) (*http.Response, error) {
  3292  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3293  	var body io.Reader = nil
  3294  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runrealtimereportrequest)
  3295  	if err != nil {
  3296  		return nil, err
  3297  	}
  3298  	c.urlParams_.Set("alt", alt)
  3299  	c.urlParams_.Set("prettyPrint", "false")
  3300  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+property}:runRealtimeReport")
  3301  	urls += "?" + c.urlParams_.Encode()
  3302  	req, err := http.NewRequest("POST", urls, body)
  3303  	if err != nil {
  3304  		return nil, err
  3305  	}
  3306  	req.Header = reqHeaders
  3307  	googleapi.Expand(req.URL, map[string]string{
  3308  		"property": c.propertyid,
  3309  	})
  3310  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3311  }
  3312  
  3313  // Do executes the "analyticsdata.properties.runRealtimeReport" call.
  3314  // Any non-2xx status code is an error. Response headers are in either
  3315  // *RunRealtimeReportResponse.ServerResponse.Header or (if a response was
  3316  // returned at all) in error.(*googleapi.Error).Header. Use
  3317  // googleapi.IsNotModified to check whether the returned error was because
  3318  // http.StatusNotModified was returned.
  3319  func (c *PropertiesRunRealtimeReportCall) Do(opts ...googleapi.CallOption) (*RunRealtimeReportResponse, error) {
  3320  	gensupport.SetOptions(c.urlParams_, opts...)
  3321  	res, err := c.doRequest("json")
  3322  	if res != nil && res.StatusCode == http.StatusNotModified {
  3323  		if res.Body != nil {
  3324  			res.Body.Close()
  3325  		}
  3326  		return nil, gensupport.WrapError(&googleapi.Error{
  3327  			Code:   res.StatusCode,
  3328  			Header: res.Header,
  3329  		})
  3330  	}
  3331  	if err != nil {
  3332  		return nil, err
  3333  	}
  3334  	defer googleapi.CloseBody(res)
  3335  	if err := googleapi.CheckResponse(res); err != nil {
  3336  		return nil, gensupport.WrapError(err)
  3337  	}
  3338  	ret := &RunRealtimeReportResponse{
  3339  		ServerResponse: googleapi.ServerResponse{
  3340  			Header:         res.Header,
  3341  			HTTPStatusCode: res.StatusCode,
  3342  		},
  3343  	}
  3344  	target := &ret
  3345  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3346  		return nil, err
  3347  	}
  3348  	return ret, nil
  3349  }
  3350  
  3351  type PropertiesRunReportCall struct {
  3352  	s                *Service
  3353  	propertyid       string
  3354  	runreportrequest *RunReportRequest
  3355  	urlParams_       gensupport.URLParams
  3356  	ctx_             context.Context
  3357  	header_          http.Header
  3358  }
  3359  
  3360  // RunReport: Returns a customized report of your Google Analytics event data.
  3361  // Reports contain statistics derived from data collected by the Google
  3362  // Analytics tracking code. The data returned from the API is as a table with
  3363  // columns for the requested dimensions and metrics. Metrics are individual
  3364  // measurements of user activity on your property, such as active users or
  3365  // event count. Dimensions break down metrics across some common criteria, such
  3366  // as country or event name. For a guide to constructing requests &
  3367  // understanding responses, see Creating a Report
  3368  // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics).
  3369  //
  3370  //   - property: A Google Analytics GA4 property identifier whose events are
  3371  //     tracked. Specified in the URL path and not the body. To learn more, see
  3372  //     where to find your Property ID
  3373  //     (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
  3374  //     Within a batch request, this property should either be unspecified or
  3375  //     consistent with the batch-level property. Example: properties/1234.
  3376  func (r *PropertiesService) RunReport(propertyid string, runreportrequest *RunReportRequest) *PropertiesRunReportCall {
  3377  	c := &PropertiesRunReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3378  	c.propertyid = propertyid
  3379  	c.runreportrequest = runreportrequest
  3380  	return c
  3381  }
  3382  
  3383  // Fields allows partial responses to be retrieved. See
  3384  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3385  // details.
  3386  func (c *PropertiesRunReportCall) Fields(s ...googleapi.Field) *PropertiesRunReportCall {
  3387  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3388  	return c
  3389  }
  3390  
  3391  // Context sets the context to be used in this call's Do method.
  3392  func (c *PropertiesRunReportCall) Context(ctx context.Context) *PropertiesRunReportCall {
  3393  	c.ctx_ = ctx
  3394  	return c
  3395  }
  3396  
  3397  // Header returns a http.Header that can be modified by the caller to add
  3398  // headers to the request.
  3399  func (c *PropertiesRunReportCall) Header() http.Header {
  3400  	if c.header_ == nil {
  3401  		c.header_ = make(http.Header)
  3402  	}
  3403  	return c.header_
  3404  }
  3405  
  3406  func (c *PropertiesRunReportCall) doRequest(alt string) (*http.Response, error) {
  3407  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3408  	var body io.Reader = nil
  3409  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runreportrequest)
  3410  	if err != nil {
  3411  		return nil, err
  3412  	}
  3413  	c.urlParams_.Set("alt", alt)
  3414  	c.urlParams_.Set("prettyPrint", "false")
  3415  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+property}:runReport")
  3416  	urls += "?" + c.urlParams_.Encode()
  3417  	req, err := http.NewRequest("POST", urls, body)
  3418  	if err != nil {
  3419  		return nil, err
  3420  	}
  3421  	req.Header = reqHeaders
  3422  	googleapi.Expand(req.URL, map[string]string{
  3423  		"property": c.propertyid,
  3424  	})
  3425  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3426  }
  3427  
  3428  // Do executes the "analyticsdata.properties.runReport" call.
  3429  // Any non-2xx status code is an error. Response headers are in either
  3430  // *RunReportResponse.ServerResponse.Header or (if a response was returned at
  3431  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3432  // check whether the returned error was because http.StatusNotModified was
  3433  // returned.
  3434  func (c *PropertiesRunReportCall) Do(opts ...googleapi.CallOption) (*RunReportResponse, error) {
  3435  	gensupport.SetOptions(c.urlParams_, opts...)
  3436  	res, err := c.doRequest("json")
  3437  	if res != nil && res.StatusCode == http.StatusNotModified {
  3438  		if res.Body != nil {
  3439  			res.Body.Close()
  3440  		}
  3441  		return nil, gensupport.WrapError(&googleapi.Error{
  3442  			Code:   res.StatusCode,
  3443  			Header: res.Header,
  3444  		})
  3445  	}
  3446  	if err != nil {
  3447  		return nil, err
  3448  	}
  3449  	defer googleapi.CloseBody(res)
  3450  	if err := googleapi.CheckResponse(res); err != nil {
  3451  		return nil, gensupport.WrapError(err)
  3452  	}
  3453  	ret := &RunReportResponse{
  3454  		ServerResponse: googleapi.ServerResponse{
  3455  			Header:         res.Header,
  3456  			HTTPStatusCode: res.StatusCode,
  3457  		},
  3458  	}
  3459  	target := &ret
  3460  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3461  		return nil, err
  3462  	}
  3463  	return ret, nil
  3464  }
  3465  
  3466  type PropertiesAudienceExportsCreateCall struct {
  3467  	s              *Service
  3468  	parent         string
  3469  	audienceexport *AudienceExport
  3470  	urlParams_     gensupport.URLParams
  3471  	ctx_           context.Context
  3472  	header_        http.Header
  3473  }
  3474  
  3475  // Create: Creates an audience export for later retrieval. This method quickly
  3476  // returns the audience export's resource name and initiates a long running
  3477  // asynchronous request to form an audience export. To export the users in an
  3478  // audience export, first create the audience export through this method and
  3479  // then send the audience resource name to the `QueryAudienceExport` method.
  3480  // See Creating an Audience Export
  3481  // (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
  3482  // for an introduction to Audience Exports with examples. An audience export is
  3483  // a snapshot of the users currently in the audience at the time of audience
  3484  // export creation. Creating audience exports for one audience on different
  3485  // days will return different results as users enter and exit the audience.
  3486  // Audiences in Google Analytics 4 allow you to segment your users in the ways
  3487  // that are important to your business. To learn more, see
  3488  // https://support.google.com/analytics/answer/9267572. Audience exports
  3489  // contain the users in each audience. Audience Export APIs have some methods
  3490  // at alpha and other methods at beta stability. The intention is to advance
  3491  // methods to beta stability after some feedback and adoption. To give your
  3492  // feedback on this API, complete the Google Analytics Audience Export API
  3493  // Feedback (https://forms.gle/EeA5u5LW6PEggtCEA) form.
  3494  //
  3495  //   - parent: The parent resource where this audience export will be created.
  3496  //     Format: `properties/{property}`.
  3497  func (r *PropertiesAudienceExportsService) Create(parent string, audienceexport *AudienceExport) *PropertiesAudienceExportsCreateCall {
  3498  	c := &PropertiesAudienceExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3499  	c.parent = parent
  3500  	c.audienceexport = audienceexport
  3501  	return c
  3502  }
  3503  
  3504  // Fields allows partial responses to be retrieved. See
  3505  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3506  // details.
  3507  func (c *PropertiesAudienceExportsCreateCall) Fields(s ...googleapi.Field) *PropertiesAudienceExportsCreateCall {
  3508  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3509  	return c
  3510  }
  3511  
  3512  // Context sets the context to be used in this call's Do method.
  3513  func (c *PropertiesAudienceExportsCreateCall) Context(ctx context.Context) *PropertiesAudienceExportsCreateCall {
  3514  	c.ctx_ = ctx
  3515  	return c
  3516  }
  3517  
  3518  // Header returns a http.Header that can be modified by the caller to add
  3519  // headers to the request.
  3520  func (c *PropertiesAudienceExportsCreateCall) Header() http.Header {
  3521  	if c.header_ == nil {
  3522  		c.header_ = make(http.Header)
  3523  	}
  3524  	return c.header_
  3525  }
  3526  
  3527  func (c *PropertiesAudienceExportsCreateCall) doRequest(alt string) (*http.Response, error) {
  3528  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3529  	var body io.Reader = nil
  3530  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.audienceexport)
  3531  	if err != nil {
  3532  		return nil, err
  3533  	}
  3534  	c.urlParams_.Set("alt", alt)
  3535  	c.urlParams_.Set("prettyPrint", "false")
  3536  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/audienceExports")
  3537  	urls += "?" + c.urlParams_.Encode()
  3538  	req, err := http.NewRequest("POST", urls, body)
  3539  	if err != nil {
  3540  		return nil, err
  3541  	}
  3542  	req.Header = reqHeaders
  3543  	googleapi.Expand(req.URL, map[string]string{
  3544  		"parent": c.parent,
  3545  	})
  3546  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3547  }
  3548  
  3549  // Do executes the "analyticsdata.properties.audienceExports.create" call.
  3550  // Any non-2xx status code is an error. Response headers are in either
  3551  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3552  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3553  // whether the returned error was because http.StatusNotModified was returned.
  3554  func (c *PropertiesAudienceExportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3555  	gensupport.SetOptions(c.urlParams_, opts...)
  3556  	res, err := c.doRequest("json")
  3557  	if res != nil && res.StatusCode == http.StatusNotModified {
  3558  		if res.Body != nil {
  3559  			res.Body.Close()
  3560  		}
  3561  		return nil, gensupport.WrapError(&googleapi.Error{
  3562  			Code:   res.StatusCode,
  3563  			Header: res.Header,
  3564  		})
  3565  	}
  3566  	if err != nil {
  3567  		return nil, err
  3568  	}
  3569  	defer googleapi.CloseBody(res)
  3570  	if err := googleapi.CheckResponse(res); err != nil {
  3571  		return nil, gensupport.WrapError(err)
  3572  	}
  3573  	ret := &Operation{
  3574  		ServerResponse: googleapi.ServerResponse{
  3575  			Header:         res.Header,
  3576  			HTTPStatusCode: res.StatusCode,
  3577  		},
  3578  	}
  3579  	target := &ret
  3580  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3581  		return nil, err
  3582  	}
  3583  	return ret, nil
  3584  }
  3585  
  3586  type PropertiesAudienceExportsGetCall struct {
  3587  	s            *Service
  3588  	name         string
  3589  	urlParams_   gensupport.URLParams
  3590  	ifNoneMatch_ string
  3591  	ctx_         context.Context
  3592  	header_      http.Header
  3593  }
  3594  
  3595  // Get: Gets configuration metadata about a specific audience export. This
  3596  // method can be used to understand an audience export after it has been
  3597  // created. See Creating an Audience Export
  3598  // (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
  3599  // for an introduction to Audience Exports with examples. Audience Export APIs
  3600  // have some methods at alpha and other methods at beta stability. The
  3601  // intention is to advance methods to beta stability after some feedback and
  3602  // adoption. To give your feedback on this API, complete the Google Analytics
  3603  // Audience Export API Feedback (https://forms.gle/EeA5u5LW6PEggtCEA) form.
  3604  //
  3605  //   - name: The audience export resource name. Format:
  3606  //     `properties/{property}/audienceExports/{audience_export}`.
  3607  func (r *PropertiesAudienceExportsService) Get(name string) *PropertiesAudienceExportsGetCall {
  3608  	c := &PropertiesAudienceExportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3609  	c.name = name
  3610  	return c
  3611  }
  3612  
  3613  // Fields allows partial responses to be retrieved. See
  3614  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3615  // details.
  3616  func (c *PropertiesAudienceExportsGetCall) Fields(s ...googleapi.Field) *PropertiesAudienceExportsGetCall {
  3617  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3618  	return c
  3619  }
  3620  
  3621  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3622  // object's ETag matches the given value. This is useful for getting updates
  3623  // only after the object has changed since the last request.
  3624  func (c *PropertiesAudienceExportsGetCall) IfNoneMatch(entityTag string) *PropertiesAudienceExportsGetCall {
  3625  	c.ifNoneMatch_ = entityTag
  3626  	return c
  3627  }
  3628  
  3629  // Context sets the context to be used in this call's Do method.
  3630  func (c *PropertiesAudienceExportsGetCall) Context(ctx context.Context) *PropertiesAudienceExportsGetCall {
  3631  	c.ctx_ = ctx
  3632  	return c
  3633  }
  3634  
  3635  // Header returns a http.Header that can be modified by the caller to add
  3636  // headers to the request.
  3637  func (c *PropertiesAudienceExportsGetCall) Header() http.Header {
  3638  	if c.header_ == nil {
  3639  		c.header_ = make(http.Header)
  3640  	}
  3641  	return c.header_
  3642  }
  3643  
  3644  func (c *PropertiesAudienceExportsGetCall) doRequest(alt string) (*http.Response, error) {
  3645  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3646  	if c.ifNoneMatch_ != "" {
  3647  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3648  	}
  3649  	var body io.Reader = nil
  3650  	c.urlParams_.Set("alt", alt)
  3651  	c.urlParams_.Set("prettyPrint", "false")
  3652  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3653  	urls += "?" + c.urlParams_.Encode()
  3654  	req, err := http.NewRequest("GET", urls, body)
  3655  	if err != nil {
  3656  		return nil, err
  3657  	}
  3658  	req.Header = reqHeaders
  3659  	googleapi.Expand(req.URL, map[string]string{
  3660  		"name": c.name,
  3661  	})
  3662  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3663  }
  3664  
  3665  // Do executes the "analyticsdata.properties.audienceExports.get" call.
  3666  // Any non-2xx status code is an error. Response headers are in either
  3667  // *AudienceExport.ServerResponse.Header or (if a response was returned at all)
  3668  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3669  // whether the returned error was because http.StatusNotModified was returned.
  3670  func (c *PropertiesAudienceExportsGetCall) Do(opts ...googleapi.CallOption) (*AudienceExport, error) {
  3671  	gensupport.SetOptions(c.urlParams_, opts...)
  3672  	res, err := c.doRequest("json")
  3673  	if res != nil && res.StatusCode == http.StatusNotModified {
  3674  		if res.Body != nil {
  3675  			res.Body.Close()
  3676  		}
  3677  		return nil, gensupport.WrapError(&googleapi.Error{
  3678  			Code:   res.StatusCode,
  3679  			Header: res.Header,
  3680  		})
  3681  	}
  3682  	if err != nil {
  3683  		return nil, err
  3684  	}
  3685  	defer googleapi.CloseBody(res)
  3686  	if err := googleapi.CheckResponse(res); err != nil {
  3687  		return nil, gensupport.WrapError(err)
  3688  	}
  3689  	ret := &AudienceExport{
  3690  		ServerResponse: googleapi.ServerResponse{
  3691  			Header:         res.Header,
  3692  			HTTPStatusCode: res.StatusCode,
  3693  		},
  3694  	}
  3695  	target := &ret
  3696  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3697  		return nil, err
  3698  	}
  3699  	return ret, nil
  3700  }
  3701  
  3702  type PropertiesAudienceExportsListCall struct {
  3703  	s            *Service
  3704  	parent       string
  3705  	urlParams_   gensupport.URLParams
  3706  	ifNoneMatch_ string
  3707  	ctx_         context.Context
  3708  	header_      http.Header
  3709  }
  3710  
  3711  // List: Lists all audience exports for a property. This method can be used for
  3712  // you to find and reuse existing audience exports rather than creating
  3713  // unnecessary new audience exports. The same audience can have multiple
  3714  // audience exports that represent the export of users that were in an audience
  3715  // on different days. See Creating an Audience Export
  3716  // (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
  3717  // for an introduction to Audience Exports with examples. Audience Export APIs
  3718  // have some methods at alpha and other methods at beta stability. The
  3719  // intention is to advance methods to beta stability after some feedback and
  3720  // adoption. To give your feedback on this API, complete the Google Analytics
  3721  // Audience Export API Feedback (https://forms.gle/EeA5u5LW6PEggtCEA) form.
  3722  //
  3723  //   - parent: All audience exports for this property will be listed in the
  3724  //     response. Format: `properties/{property}`.
  3725  func (r *PropertiesAudienceExportsService) List(parent string) *PropertiesAudienceExportsListCall {
  3726  	c := &PropertiesAudienceExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3727  	c.parent = parent
  3728  	return c
  3729  }
  3730  
  3731  // PageSize sets the optional parameter "pageSize": The maximum number of
  3732  // audience exports to return. The service may return fewer than this value. If
  3733  // unspecified, at most 200 audience exports will be returned. The maximum
  3734  // value is 1000 (higher values will be coerced to the maximum).
  3735  func (c *PropertiesAudienceExportsListCall) PageSize(pageSize int64) *PropertiesAudienceExportsListCall {
  3736  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3737  	return c
  3738  }
  3739  
  3740  // PageToken sets the optional parameter "pageToken": A page token, received
  3741  // from a previous `ListAudienceExports` call. Provide this to retrieve the
  3742  // subsequent page. When paginating, all other parameters provided to
  3743  // `ListAudienceExports` must match the call that provided the page token.
  3744  func (c *PropertiesAudienceExportsListCall) PageToken(pageToken string) *PropertiesAudienceExportsListCall {
  3745  	c.urlParams_.Set("pageToken", pageToken)
  3746  	return c
  3747  }
  3748  
  3749  // Fields allows partial responses to be retrieved. See
  3750  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3751  // details.
  3752  func (c *PropertiesAudienceExportsListCall) Fields(s ...googleapi.Field) *PropertiesAudienceExportsListCall {
  3753  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3754  	return c
  3755  }
  3756  
  3757  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3758  // object's ETag matches the given value. This is useful for getting updates
  3759  // only after the object has changed since the last request.
  3760  func (c *PropertiesAudienceExportsListCall) IfNoneMatch(entityTag string) *PropertiesAudienceExportsListCall {
  3761  	c.ifNoneMatch_ = entityTag
  3762  	return c
  3763  }
  3764  
  3765  // Context sets the context to be used in this call's Do method.
  3766  func (c *PropertiesAudienceExportsListCall) Context(ctx context.Context) *PropertiesAudienceExportsListCall {
  3767  	c.ctx_ = ctx
  3768  	return c
  3769  }
  3770  
  3771  // Header returns a http.Header that can be modified by the caller to add
  3772  // headers to the request.
  3773  func (c *PropertiesAudienceExportsListCall) Header() http.Header {
  3774  	if c.header_ == nil {
  3775  		c.header_ = make(http.Header)
  3776  	}
  3777  	return c.header_
  3778  }
  3779  
  3780  func (c *PropertiesAudienceExportsListCall) doRequest(alt string) (*http.Response, error) {
  3781  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3782  	if c.ifNoneMatch_ != "" {
  3783  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3784  	}
  3785  	var body io.Reader = nil
  3786  	c.urlParams_.Set("alt", alt)
  3787  	c.urlParams_.Set("prettyPrint", "false")
  3788  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/audienceExports")
  3789  	urls += "?" + c.urlParams_.Encode()
  3790  	req, err := http.NewRequest("GET", urls, body)
  3791  	if err != nil {
  3792  		return nil, err
  3793  	}
  3794  	req.Header = reqHeaders
  3795  	googleapi.Expand(req.URL, map[string]string{
  3796  		"parent": c.parent,
  3797  	})
  3798  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3799  }
  3800  
  3801  // Do executes the "analyticsdata.properties.audienceExports.list" call.
  3802  // Any non-2xx status code is an error. Response headers are in either
  3803  // *ListAudienceExportsResponse.ServerResponse.Header or (if a response was
  3804  // returned at all) in error.(*googleapi.Error).Header. Use
  3805  // googleapi.IsNotModified to check whether the returned error was because
  3806  // http.StatusNotModified was returned.
  3807  func (c *PropertiesAudienceExportsListCall) Do(opts ...googleapi.CallOption) (*ListAudienceExportsResponse, error) {
  3808  	gensupport.SetOptions(c.urlParams_, opts...)
  3809  	res, err := c.doRequest("json")
  3810  	if res != nil && res.StatusCode == http.StatusNotModified {
  3811  		if res.Body != nil {
  3812  			res.Body.Close()
  3813  		}
  3814  		return nil, gensupport.WrapError(&googleapi.Error{
  3815  			Code:   res.StatusCode,
  3816  			Header: res.Header,
  3817  		})
  3818  	}
  3819  	if err != nil {
  3820  		return nil, err
  3821  	}
  3822  	defer googleapi.CloseBody(res)
  3823  	if err := googleapi.CheckResponse(res); err != nil {
  3824  		return nil, gensupport.WrapError(err)
  3825  	}
  3826  	ret := &ListAudienceExportsResponse{
  3827  		ServerResponse: googleapi.ServerResponse{
  3828  			Header:         res.Header,
  3829  			HTTPStatusCode: res.StatusCode,
  3830  		},
  3831  	}
  3832  	target := &ret
  3833  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3834  		return nil, err
  3835  	}
  3836  	return ret, nil
  3837  }
  3838  
  3839  // Pages invokes f for each page of results.
  3840  // A non-nil error returned from f will halt the iteration.
  3841  // The provided context supersedes any context provided to the Context method.
  3842  func (c *PropertiesAudienceExportsListCall) Pages(ctx context.Context, f func(*ListAudienceExportsResponse) error) error {
  3843  	c.ctx_ = ctx
  3844  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3845  	for {
  3846  		x, err := c.Do()
  3847  		if err != nil {
  3848  			return err
  3849  		}
  3850  		if err := f(x); err != nil {
  3851  			return err
  3852  		}
  3853  		if x.NextPageToken == "" {
  3854  			return nil
  3855  		}
  3856  		c.PageToken(x.NextPageToken)
  3857  	}
  3858  }
  3859  
  3860  type PropertiesAudienceExportsQueryCall struct {
  3861  	s                          *Service
  3862  	name                       string
  3863  	queryaudienceexportrequest *QueryAudienceExportRequest
  3864  	urlParams_                 gensupport.URLParams
  3865  	ctx_                       context.Context
  3866  	header_                    http.Header
  3867  }
  3868  
  3869  // Query: Retrieves an audience export of users. After creating an audience,
  3870  // the users are not immediately available for exporting. First, a request to
  3871  // `CreateAudienceExport` is necessary to create an audience export of users,
  3872  // and then second, this method is used to retrieve the users in the audience
  3873  // export. See Creating an Audience Export
  3874  // (https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
  3875  // for an introduction to Audience Exports with examples. Audiences in Google
  3876  // Analytics 4 allow you to segment your users in the ways that are important
  3877  // to your business. To learn more, see
  3878  // https://support.google.com/analytics/answer/9267572. Audience Export APIs
  3879  // have some methods at alpha and other methods at beta stability. The
  3880  // intention is to advance methods to beta stability after some feedback and
  3881  // adoption. To give your feedback on this API, complete the Google Analytics
  3882  // Audience Export API Feedback (https://forms.gle/EeA5u5LW6PEggtCEA) form.
  3883  //
  3884  //   - name: The name of the audience export to retrieve users from. Format:
  3885  //     `properties/{property}/audienceExports/{audience_export}`.
  3886  func (r *PropertiesAudienceExportsService) Query(name string, queryaudienceexportrequest *QueryAudienceExportRequest) *PropertiesAudienceExportsQueryCall {
  3887  	c := &PropertiesAudienceExportsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3888  	c.name = name
  3889  	c.queryaudienceexportrequest = queryaudienceexportrequest
  3890  	return c
  3891  }
  3892  
  3893  // Fields allows partial responses to be retrieved. See
  3894  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3895  // details.
  3896  func (c *PropertiesAudienceExportsQueryCall) Fields(s ...googleapi.Field) *PropertiesAudienceExportsQueryCall {
  3897  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3898  	return c
  3899  }
  3900  
  3901  // Context sets the context to be used in this call's Do method.
  3902  func (c *PropertiesAudienceExportsQueryCall) Context(ctx context.Context) *PropertiesAudienceExportsQueryCall {
  3903  	c.ctx_ = ctx
  3904  	return c
  3905  }
  3906  
  3907  // Header returns a http.Header that can be modified by the caller to add
  3908  // headers to the request.
  3909  func (c *PropertiesAudienceExportsQueryCall) Header() http.Header {
  3910  	if c.header_ == nil {
  3911  		c.header_ = make(http.Header)
  3912  	}
  3913  	return c.header_
  3914  }
  3915  
  3916  func (c *PropertiesAudienceExportsQueryCall) doRequest(alt string) (*http.Response, error) {
  3917  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3918  	var body io.Reader = nil
  3919  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.queryaudienceexportrequest)
  3920  	if err != nil {
  3921  		return nil, err
  3922  	}
  3923  	c.urlParams_.Set("alt", alt)
  3924  	c.urlParams_.Set("prettyPrint", "false")
  3925  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:query")
  3926  	urls += "?" + c.urlParams_.Encode()
  3927  	req, err := http.NewRequest("POST", urls, body)
  3928  	if err != nil {
  3929  		return nil, err
  3930  	}
  3931  	req.Header = reqHeaders
  3932  	googleapi.Expand(req.URL, map[string]string{
  3933  		"name": c.name,
  3934  	})
  3935  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3936  }
  3937  
  3938  // Do executes the "analyticsdata.properties.audienceExports.query" call.
  3939  // Any non-2xx status code is an error. Response headers are in either
  3940  // *QueryAudienceExportResponse.ServerResponse.Header or (if a response was
  3941  // returned at all) in error.(*googleapi.Error).Header. Use
  3942  // googleapi.IsNotModified to check whether the returned error was because
  3943  // http.StatusNotModified was returned.
  3944  func (c *PropertiesAudienceExportsQueryCall) Do(opts ...googleapi.CallOption) (*QueryAudienceExportResponse, error) {
  3945  	gensupport.SetOptions(c.urlParams_, opts...)
  3946  	res, err := c.doRequest("json")
  3947  	if res != nil && res.StatusCode == http.StatusNotModified {
  3948  		if res.Body != nil {
  3949  			res.Body.Close()
  3950  		}
  3951  		return nil, gensupport.WrapError(&googleapi.Error{
  3952  			Code:   res.StatusCode,
  3953  			Header: res.Header,
  3954  		})
  3955  	}
  3956  	if err != nil {
  3957  		return nil, err
  3958  	}
  3959  	defer googleapi.CloseBody(res)
  3960  	if err := googleapi.CheckResponse(res); err != nil {
  3961  		return nil, gensupport.WrapError(err)
  3962  	}
  3963  	ret := &QueryAudienceExportResponse{
  3964  		ServerResponse: googleapi.ServerResponse{
  3965  			Header:         res.Header,
  3966  			HTTPStatusCode: res.StatusCode,
  3967  		},
  3968  	}
  3969  	target := &ret
  3970  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3971  		return nil, err
  3972  	}
  3973  	return ret, nil
  3974  }
  3975  

View as plain text