...

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

Documentation: google.golang.org/api/analyticsadmin/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 analyticsadmin provides access to the Google Analytics Admin API.
     8  //
     9  // For product documentation, see: http://code.google.com/apis/analytics/docs/mgmt/home.html
    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/analyticsadmin/v1beta"
    27  //	...
    28  //	ctx := context.Background()
    29  //	analyticsadminService, err := analyticsadmin.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  //	analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithScopes(analyticsadmin.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  //	analyticsadminService, err := analyticsadmin.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  //	analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package analyticsadmin // import "google.golang.org/api/analyticsadmin/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 = "analyticsadmin:v1beta"
    95  const apiName = "analyticsadmin"
    96  const apiVersion = "v1beta"
    97  const basePath = "https://analyticsadmin.googleapis.com/"
    98  const basePathTemplate = "https://analyticsadmin.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://analyticsadmin.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// Edit Google Analytics management entities
   104  	AnalyticsEditScope = "https://www.googleapis.com/auth/analytics.edit"
   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.edit",
   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.AccountSummaries = NewAccountSummariesService(s)
   147  	s.Accounts = NewAccountsService(s)
   148  	s.Properties = NewPropertiesService(s)
   149  	return s, nil
   150  }
   151  
   152  type Service struct {
   153  	client    *http.Client
   154  	BasePath  string // API endpoint base URL
   155  	UserAgent string // optional additional User-Agent fragment
   156  
   157  	AccountSummaries *AccountSummariesService
   158  
   159  	Accounts *AccountsService
   160  
   161  	Properties *PropertiesService
   162  }
   163  
   164  func (s *Service) userAgent() string {
   165  	if s.UserAgent == "" {
   166  		return googleapi.UserAgent
   167  	}
   168  	return googleapi.UserAgent + " " + s.UserAgent
   169  }
   170  
   171  func NewAccountSummariesService(s *Service) *AccountSummariesService {
   172  	rs := &AccountSummariesService{s: s}
   173  	return rs
   174  }
   175  
   176  type AccountSummariesService struct {
   177  	s *Service
   178  }
   179  
   180  func NewAccountsService(s *Service) *AccountsService {
   181  	rs := &AccountsService{s: s}
   182  	return rs
   183  }
   184  
   185  type AccountsService struct {
   186  	s *Service
   187  }
   188  
   189  func NewPropertiesService(s *Service) *PropertiesService {
   190  	rs := &PropertiesService{s: s}
   191  	rs.ConversionEvents = NewPropertiesConversionEventsService(s)
   192  	rs.CustomDimensions = NewPropertiesCustomDimensionsService(s)
   193  	rs.CustomMetrics = NewPropertiesCustomMetricsService(s)
   194  	rs.DataStreams = NewPropertiesDataStreamsService(s)
   195  	rs.FirebaseLinks = NewPropertiesFirebaseLinksService(s)
   196  	rs.GoogleAdsLinks = NewPropertiesGoogleAdsLinksService(s)
   197  	rs.KeyEvents = NewPropertiesKeyEventsService(s)
   198  	return rs
   199  }
   200  
   201  type PropertiesService struct {
   202  	s *Service
   203  
   204  	ConversionEvents *PropertiesConversionEventsService
   205  
   206  	CustomDimensions *PropertiesCustomDimensionsService
   207  
   208  	CustomMetrics *PropertiesCustomMetricsService
   209  
   210  	DataStreams *PropertiesDataStreamsService
   211  
   212  	FirebaseLinks *PropertiesFirebaseLinksService
   213  
   214  	GoogleAdsLinks *PropertiesGoogleAdsLinksService
   215  
   216  	KeyEvents *PropertiesKeyEventsService
   217  }
   218  
   219  func NewPropertiesConversionEventsService(s *Service) *PropertiesConversionEventsService {
   220  	rs := &PropertiesConversionEventsService{s: s}
   221  	return rs
   222  }
   223  
   224  type PropertiesConversionEventsService struct {
   225  	s *Service
   226  }
   227  
   228  func NewPropertiesCustomDimensionsService(s *Service) *PropertiesCustomDimensionsService {
   229  	rs := &PropertiesCustomDimensionsService{s: s}
   230  	return rs
   231  }
   232  
   233  type PropertiesCustomDimensionsService struct {
   234  	s *Service
   235  }
   236  
   237  func NewPropertiesCustomMetricsService(s *Service) *PropertiesCustomMetricsService {
   238  	rs := &PropertiesCustomMetricsService{s: s}
   239  	return rs
   240  }
   241  
   242  type PropertiesCustomMetricsService struct {
   243  	s *Service
   244  }
   245  
   246  func NewPropertiesDataStreamsService(s *Service) *PropertiesDataStreamsService {
   247  	rs := &PropertiesDataStreamsService{s: s}
   248  	rs.MeasurementProtocolSecrets = NewPropertiesDataStreamsMeasurementProtocolSecretsService(s)
   249  	return rs
   250  }
   251  
   252  type PropertiesDataStreamsService struct {
   253  	s *Service
   254  
   255  	MeasurementProtocolSecrets *PropertiesDataStreamsMeasurementProtocolSecretsService
   256  }
   257  
   258  func NewPropertiesDataStreamsMeasurementProtocolSecretsService(s *Service) *PropertiesDataStreamsMeasurementProtocolSecretsService {
   259  	rs := &PropertiesDataStreamsMeasurementProtocolSecretsService{s: s}
   260  	return rs
   261  }
   262  
   263  type PropertiesDataStreamsMeasurementProtocolSecretsService struct {
   264  	s *Service
   265  }
   266  
   267  func NewPropertiesFirebaseLinksService(s *Service) *PropertiesFirebaseLinksService {
   268  	rs := &PropertiesFirebaseLinksService{s: s}
   269  	return rs
   270  }
   271  
   272  type PropertiesFirebaseLinksService struct {
   273  	s *Service
   274  }
   275  
   276  func NewPropertiesGoogleAdsLinksService(s *Service) *PropertiesGoogleAdsLinksService {
   277  	rs := &PropertiesGoogleAdsLinksService{s: s}
   278  	return rs
   279  }
   280  
   281  type PropertiesGoogleAdsLinksService struct {
   282  	s *Service
   283  }
   284  
   285  func NewPropertiesKeyEventsService(s *Service) *PropertiesKeyEventsService {
   286  	rs := &PropertiesKeyEventsService{s: s}
   287  	return rs
   288  }
   289  
   290  type PropertiesKeyEventsService struct {
   291  	s *Service
   292  }
   293  
   294  // GoogleAnalyticsAdminV1betaAccessBetweenFilter: To express that the result
   295  // needs to be between two numbers (inclusive).
   296  type GoogleAnalyticsAdminV1betaAccessBetweenFilter struct {
   297  	// FromValue: Begins with this number.
   298  	FromValue *GoogleAnalyticsAdminV1betaNumericValue `json:"fromValue,omitempty"`
   299  	// ToValue: Ends with this number.
   300  	ToValue *GoogleAnalyticsAdminV1betaNumericValue `json:"toValue,omitempty"`
   301  	// ForceSendFields is a list of field names (e.g. "FromValue") to
   302  	// unconditionally include in API requests. By default, fields with empty or
   303  	// default values are omitted from API requests. See
   304  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   305  	// details.
   306  	ForceSendFields []string `json:"-"`
   307  	// NullFields is a list of field names (e.g. "FromValue") to include in API
   308  	// requests with the JSON null value. By default, fields with empty values are
   309  	// omitted from API requests. See
   310  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   311  	NullFields []string `json:"-"`
   312  }
   313  
   314  func (s *GoogleAnalyticsAdminV1betaAccessBetweenFilter) MarshalJSON() ([]byte, error) {
   315  	type NoMethod GoogleAnalyticsAdminV1betaAccessBetweenFilter
   316  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   317  }
   318  
   319  // GoogleAnalyticsAdminV1betaAccessDateRange: A contiguous range of days:
   320  // startDate, startDate + 1, ..., endDate.
   321  type GoogleAnalyticsAdminV1betaAccessDateRange struct {
   322  	// EndDate: The inclusive end date for the query in the format `YYYY-MM-DD`.
   323  	// Cannot be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today`
   324  	// is also accepted, and in that case, the date is inferred based on the
   325  	// current time in the request's time zone.
   326  	EndDate string `json:"endDate,omitempty"`
   327  	// StartDate: The inclusive start date for the query in the format
   328  	// `YYYY-MM-DD`. Cannot be after `endDate`. The format `NdaysAgo`, `yesterday`,
   329  	// or `today` is also accepted, and in that case, the date is inferred based on
   330  	// the current time in the request's time zone.
   331  	StartDate string `json:"startDate,omitempty"`
   332  	// ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally
   333  	// include in API requests. By default, fields with empty or default values are
   334  	// omitted from API requests. See
   335  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   336  	// details.
   337  	ForceSendFields []string `json:"-"`
   338  	// NullFields is a list of field names (e.g. "EndDate") to include in API
   339  	// requests with the JSON null value. By default, fields with empty values are
   340  	// omitted from API requests. See
   341  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   342  	NullFields []string `json:"-"`
   343  }
   344  
   345  func (s *GoogleAnalyticsAdminV1betaAccessDateRange) MarshalJSON() ([]byte, error) {
   346  	type NoMethod GoogleAnalyticsAdminV1betaAccessDateRange
   347  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   348  }
   349  
   350  // GoogleAnalyticsAdminV1betaAccessDimension: Dimensions are attributes of your
   351  // data. For example, the dimension `userEmail` indicates the email of the user
   352  // that accessed reporting data. Dimension values in report responses are
   353  // strings.
   354  type GoogleAnalyticsAdminV1betaAccessDimension struct {
   355  	// DimensionName: The API name of the dimension. See Data Access Schema
   356  	// (https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema)
   357  	// for the list of dimensions supported in this API. Dimensions are referenced
   358  	// by name in `dimensionFilter` and `orderBys`.
   359  	DimensionName string `json:"dimensionName,omitempty"`
   360  	// ForceSendFields is a list of field names (e.g. "DimensionName") to
   361  	// unconditionally include in API requests. By default, fields with empty or
   362  	// default values are omitted from API requests. See
   363  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   364  	// details.
   365  	ForceSendFields []string `json:"-"`
   366  	// NullFields is a list of field names (e.g. "DimensionName") to include in API
   367  	// requests with the JSON null value. By default, fields with empty values are
   368  	// omitted from API requests. See
   369  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   370  	NullFields []string `json:"-"`
   371  }
   372  
   373  func (s *GoogleAnalyticsAdminV1betaAccessDimension) MarshalJSON() ([]byte, error) {
   374  	type NoMethod GoogleAnalyticsAdminV1betaAccessDimension
   375  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   376  }
   377  
   378  // GoogleAnalyticsAdminV1betaAccessDimensionHeader: Describes a dimension
   379  // column in the report. Dimensions requested in a report produce column
   380  // entries within rows and DimensionHeaders. However, dimensions used
   381  // exclusively within filters or expressions do not produce columns in a
   382  // report; correspondingly, those dimensions do not produce headers.
   383  type GoogleAnalyticsAdminV1betaAccessDimensionHeader struct {
   384  	// DimensionName: The dimension's name; for example 'userEmail'.
   385  	DimensionName string `json:"dimensionName,omitempty"`
   386  	// ForceSendFields is a list of field names (e.g. "DimensionName") to
   387  	// unconditionally include in API requests. By default, fields with empty or
   388  	// default values are omitted from API requests. See
   389  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   390  	// details.
   391  	ForceSendFields []string `json:"-"`
   392  	// NullFields is a list of field names (e.g. "DimensionName") to include in API
   393  	// requests with the JSON null value. By default, fields with empty values are
   394  	// omitted from API requests. See
   395  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   396  	NullFields []string `json:"-"`
   397  }
   398  
   399  func (s *GoogleAnalyticsAdminV1betaAccessDimensionHeader) MarshalJSON() ([]byte, error) {
   400  	type NoMethod GoogleAnalyticsAdminV1betaAccessDimensionHeader
   401  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   402  }
   403  
   404  // GoogleAnalyticsAdminV1betaAccessDimensionValue: The value of a dimension.
   405  type GoogleAnalyticsAdminV1betaAccessDimensionValue struct {
   406  	// Value: The dimension value. For example, this value may be 'France' for the
   407  	// 'country' dimension.
   408  	Value string `json:"value,omitempty"`
   409  	// ForceSendFields is a list of field names (e.g. "Value") to unconditionally
   410  	// include in API requests. By default, fields with empty or default values are
   411  	// omitted from API requests. See
   412  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   413  	// details.
   414  	ForceSendFields []string `json:"-"`
   415  	// NullFields is a list of field names (e.g. "Value") to include in API
   416  	// requests with the JSON null value. By default, fields with empty values are
   417  	// omitted from API requests. See
   418  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   419  	NullFields []string `json:"-"`
   420  }
   421  
   422  func (s *GoogleAnalyticsAdminV1betaAccessDimensionValue) MarshalJSON() ([]byte, error) {
   423  	type NoMethod GoogleAnalyticsAdminV1betaAccessDimensionValue
   424  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   425  }
   426  
   427  // GoogleAnalyticsAdminV1betaAccessFilter: An expression to filter dimension or
   428  // metric values.
   429  type GoogleAnalyticsAdminV1betaAccessFilter struct {
   430  	// BetweenFilter: A filter for two values.
   431  	BetweenFilter *GoogleAnalyticsAdminV1betaAccessBetweenFilter `json:"betweenFilter,omitempty"`
   432  	// FieldName: The dimension name or metric name.
   433  	FieldName string `json:"fieldName,omitempty"`
   434  	// InListFilter: A filter for in list values.
   435  	InListFilter *GoogleAnalyticsAdminV1betaAccessInListFilter `json:"inListFilter,omitempty"`
   436  	// NumericFilter: A filter for numeric or date values.
   437  	NumericFilter *GoogleAnalyticsAdminV1betaAccessNumericFilter `json:"numericFilter,omitempty"`
   438  	// StringFilter: Strings related filter.
   439  	StringFilter *GoogleAnalyticsAdminV1betaAccessStringFilter `json:"stringFilter,omitempty"`
   440  	// ForceSendFields is a list of field names (e.g. "BetweenFilter") to
   441  	// unconditionally include in API requests. By default, fields with empty or
   442  	// default values are omitted from API requests. See
   443  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   444  	// details.
   445  	ForceSendFields []string `json:"-"`
   446  	// NullFields is a list of field names (e.g. "BetweenFilter") to include in API
   447  	// requests with the JSON null value. By default, fields with empty values are
   448  	// omitted from API requests. See
   449  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   450  	NullFields []string `json:"-"`
   451  }
   452  
   453  func (s *GoogleAnalyticsAdminV1betaAccessFilter) MarshalJSON() ([]byte, error) {
   454  	type NoMethod GoogleAnalyticsAdminV1betaAccessFilter
   455  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   456  }
   457  
   458  // GoogleAnalyticsAdminV1betaAccessFilterExpression: Expresses dimension or
   459  // metric filters. The fields in the same expression need to be either all
   460  // dimensions or all metrics.
   461  type GoogleAnalyticsAdminV1betaAccessFilterExpression struct {
   462  	// AccessFilter: A primitive filter. In the same FilterExpression, all of the
   463  	// filter's field names need to be either all dimensions or all metrics.
   464  	AccessFilter *GoogleAnalyticsAdminV1betaAccessFilter `json:"accessFilter,omitempty"`
   465  	// AndGroup: Each of the FilterExpressions in the and_group has an AND
   466  	// relationship.
   467  	AndGroup *GoogleAnalyticsAdminV1betaAccessFilterExpressionList `json:"andGroup,omitempty"`
   468  	// NotExpression: The FilterExpression is NOT of not_expression.
   469  	NotExpression *GoogleAnalyticsAdminV1betaAccessFilterExpression `json:"notExpression,omitempty"`
   470  	// OrGroup: Each of the FilterExpressions in the or_group has an OR
   471  	// relationship.
   472  	OrGroup *GoogleAnalyticsAdminV1betaAccessFilterExpressionList `json:"orGroup,omitempty"`
   473  	// ForceSendFields is a list of field names (e.g. "AccessFilter") to
   474  	// unconditionally include in API requests. By default, fields with empty or
   475  	// default values are omitted from API requests. See
   476  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   477  	// details.
   478  	ForceSendFields []string `json:"-"`
   479  	// NullFields is a list of field names (e.g. "AccessFilter") to include in API
   480  	// requests with the JSON null value. By default, fields with empty values are
   481  	// omitted from API requests. See
   482  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   483  	NullFields []string `json:"-"`
   484  }
   485  
   486  func (s *GoogleAnalyticsAdminV1betaAccessFilterExpression) MarshalJSON() ([]byte, error) {
   487  	type NoMethod GoogleAnalyticsAdminV1betaAccessFilterExpression
   488  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   489  }
   490  
   491  // GoogleAnalyticsAdminV1betaAccessFilterExpressionList: A list of filter
   492  // expressions.
   493  type GoogleAnalyticsAdminV1betaAccessFilterExpressionList struct {
   494  	// Expressions: A list of filter expressions.
   495  	Expressions []*GoogleAnalyticsAdminV1betaAccessFilterExpression `json:"expressions,omitempty"`
   496  	// ForceSendFields is a list of field names (e.g. "Expressions") to
   497  	// unconditionally include in API requests. By default, fields with empty or
   498  	// default values are omitted from API requests. See
   499  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   500  	// details.
   501  	ForceSendFields []string `json:"-"`
   502  	// NullFields is a list of field names (e.g. "Expressions") to include in API
   503  	// requests with the JSON null value. By default, fields with empty values are
   504  	// omitted from API requests. See
   505  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   506  	NullFields []string `json:"-"`
   507  }
   508  
   509  func (s *GoogleAnalyticsAdminV1betaAccessFilterExpressionList) MarshalJSON() ([]byte, error) {
   510  	type NoMethod GoogleAnalyticsAdminV1betaAccessFilterExpressionList
   511  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   512  }
   513  
   514  // GoogleAnalyticsAdminV1betaAccessInListFilter: The result needs to be in a
   515  // list of string values.
   516  type GoogleAnalyticsAdminV1betaAccessInListFilter struct {
   517  	// CaseSensitive: If true, the string value is case sensitive.
   518  	CaseSensitive bool `json:"caseSensitive,omitempty"`
   519  	// Values: The list of string values. Must be non-empty.
   520  	Values []string `json:"values,omitempty"`
   521  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
   522  	// unconditionally include in API requests. By default, fields with empty or
   523  	// default values are omitted from API requests. See
   524  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   525  	// details.
   526  	ForceSendFields []string `json:"-"`
   527  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
   528  	// requests with the JSON null value. By default, fields with empty values are
   529  	// omitted from API requests. See
   530  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   531  	NullFields []string `json:"-"`
   532  }
   533  
   534  func (s *GoogleAnalyticsAdminV1betaAccessInListFilter) MarshalJSON() ([]byte, error) {
   535  	type NoMethod GoogleAnalyticsAdminV1betaAccessInListFilter
   536  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   537  }
   538  
   539  // GoogleAnalyticsAdminV1betaAccessMetric: The quantitative measurements of a
   540  // report. For example, the metric `accessCount` is the total number of data
   541  // access records.
   542  type GoogleAnalyticsAdminV1betaAccessMetric struct {
   543  	// MetricName: The API name of the metric. See Data Access Schema
   544  	// (https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema)
   545  	// for the list of metrics supported in this API. Metrics are referenced by
   546  	// name in `metricFilter` & `orderBys`.
   547  	MetricName string `json:"metricName,omitempty"`
   548  	// ForceSendFields is a list of field names (e.g. "MetricName") to
   549  	// unconditionally include in API requests. By default, fields with empty or
   550  	// default values are omitted from API requests. See
   551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   552  	// details.
   553  	ForceSendFields []string `json:"-"`
   554  	// NullFields is a list of field names (e.g. "MetricName") to include in API
   555  	// requests with the JSON null value. By default, fields with empty values are
   556  	// omitted from API requests. See
   557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   558  	NullFields []string `json:"-"`
   559  }
   560  
   561  func (s *GoogleAnalyticsAdminV1betaAccessMetric) MarshalJSON() ([]byte, error) {
   562  	type NoMethod GoogleAnalyticsAdminV1betaAccessMetric
   563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   564  }
   565  
   566  // GoogleAnalyticsAdminV1betaAccessMetricHeader: Describes a metric column in
   567  // the report. Visible metrics requested in a report produce column entries
   568  // within rows and MetricHeaders. However, metrics used exclusively within
   569  // filters or expressions do not produce columns in a report; correspondingly,
   570  // those metrics do not produce headers.
   571  type GoogleAnalyticsAdminV1betaAccessMetricHeader struct {
   572  	// MetricName: The metric's name; for example 'accessCount'.
   573  	MetricName string `json:"metricName,omitempty"`
   574  	// ForceSendFields is a list of field names (e.g. "MetricName") to
   575  	// unconditionally include in API requests. By default, fields with empty or
   576  	// default values are omitted from API requests. See
   577  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   578  	// details.
   579  	ForceSendFields []string `json:"-"`
   580  	// NullFields is a list of field names (e.g. "MetricName") to include in API
   581  	// requests with the JSON null value. By default, fields with empty values are
   582  	// omitted from API requests. See
   583  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   584  	NullFields []string `json:"-"`
   585  }
   586  
   587  func (s *GoogleAnalyticsAdminV1betaAccessMetricHeader) MarshalJSON() ([]byte, error) {
   588  	type NoMethod GoogleAnalyticsAdminV1betaAccessMetricHeader
   589  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   590  }
   591  
   592  // GoogleAnalyticsAdminV1betaAccessMetricValue: The value of a metric.
   593  type GoogleAnalyticsAdminV1betaAccessMetricValue struct {
   594  	// Value: The measurement value. For example, this value may be '13'.
   595  	Value string `json:"value,omitempty"`
   596  	// ForceSendFields is a list of field names (e.g. "Value") to unconditionally
   597  	// include in API requests. By default, fields with empty or default values are
   598  	// omitted from API requests. See
   599  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   600  	// details.
   601  	ForceSendFields []string `json:"-"`
   602  	// NullFields is a list of field names (e.g. "Value") to include in API
   603  	// requests with the JSON null value. By default, fields with empty values are
   604  	// omitted from API requests. See
   605  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   606  	NullFields []string `json:"-"`
   607  }
   608  
   609  func (s *GoogleAnalyticsAdminV1betaAccessMetricValue) MarshalJSON() ([]byte, error) {
   610  	type NoMethod GoogleAnalyticsAdminV1betaAccessMetricValue
   611  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   612  }
   613  
   614  // GoogleAnalyticsAdminV1betaAccessNumericFilter: Filters for numeric or date
   615  // values.
   616  type GoogleAnalyticsAdminV1betaAccessNumericFilter struct {
   617  	// Operation: The operation type for this filter.
   618  	//
   619  	// Possible values:
   620  	//   "OPERATION_UNSPECIFIED" - Unspecified.
   621  	//   "EQUAL" - Equal
   622  	//   "LESS_THAN" - Less than
   623  	//   "LESS_THAN_OR_EQUAL" - Less than or equal
   624  	//   "GREATER_THAN" - Greater than
   625  	//   "GREATER_THAN_OR_EQUAL" - Greater than or equal
   626  	Operation string `json:"operation,omitempty"`
   627  	// Value: A numeric value or a date value.
   628  	Value *GoogleAnalyticsAdminV1betaNumericValue `json:"value,omitempty"`
   629  	// ForceSendFields is a list of field names (e.g. "Operation") to
   630  	// unconditionally include in API requests. By default, fields with empty or
   631  	// default values are omitted from API requests. See
   632  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   633  	// details.
   634  	ForceSendFields []string `json:"-"`
   635  	// NullFields is a list of field names (e.g. "Operation") to include in API
   636  	// requests with the JSON null value. By default, fields with empty values are
   637  	// omitted from API requests. See
   638  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   639  	NullFields []string `json:"-"`
   640  }
   641  
   642  func (s *GoogleAnalyticsAdminV1betaAccessNumericFilter) MarshalJSON() ([]byte, error) {
   643  	type NoMethod GoogleAnalyticsAdminV1betaAccessNumericFilter
   644  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   645  }
   646  
   647  // GoogleAnalyticsAdminV1betaAccessOrderBy: Order bys define how rows will be
   648  // sorted in the response. For example, ordering rows by descending access
   649  // count is one ordering, and ordering rows by the country string is a
   650  // different ordering.
   651  type GoogleAnalyticsAdminV1betaAccessOrderBy struct {
   652  	// Desc: If true, sorts by descending order. If false or unspecified, sorts in
   653  	// ascending order.
   654  	Desc bool `json:"desc,omitempty"`
   655  	// Dimension: Sorts results by a dimension's values.
   656  	Dimension *GoogleAnalyticsAdminV1betaAccessOrderByDimensionOrderBy `json:"dimension,omitempty"`
   657  	// Metric: Sorts results by a metric's values.
   658  	Metric *GoogleAnalyticsAdminV1betaAccessOrderByMetricOrderBy `json:"metric,omitempty"`
   659  	// ForceSendFields is a list of field names (e.g. "Desc") to unconditionally
   660  	// include in API requests. By default, fields with empty or default values are
   661  	// omitted from API requests. See
   662  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   663  	// details.
   664  	ForceSendFields []string `json:"-"`
   665  	// NullFields is a list of field names (e.g. "Desc") to include in API requests
   666  	// with the JSON null value. By default, fields with empty values are omitted
   667  	// from API requests. See
   668  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   669  	NullFields []string `json:"-"`
   670  }
   671  
   672  func (s *GoogleAnalyticsAdminV1betaAccessOrderBy) MarshalJSON() ([]byte, error) {
   673  	type NoMethod GoogleAnalyticsAdminV1betaAccessOrderBy
   674  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   675  }
   676  
   677  // GoogleAnalyticsAdminV1betaAccessOrderByDimensionOrderBy: Sorts by dimension
   678  // values.
   679  type GoogleAnalyticsAdminV1betaAccessOrderByDimensionOrderBy struct {
   680  	// DimensionName: A dimension name in the request to order by.
   681  	DimensionName string `json:"dimensionName,omitempty"`
   682  	// OrderType: Controls the rule for dimension value ordering.
   683  	//
   684  	// Possible values:
   685  	//   "ORDER_TYPE_UNSPECIFIED" - Unspecified.
   686  	//   "ALPHANUMERIC" - Alphanumeric sort by Unicode code point. For example, "2"
   687  	// < "A" < "X" < "b" < "z".
   688  	//   "CASE_INSENSITIVE_ALPHANUMERIC" - Case insensitive alphanumeric sort by
   689  	// lower case Unicode code point. For example, "2" < "A" < "b" < "X" < "z".
   690  	//   "NUMERIC" - Dimension values are converted to numbers before sorting. For
   691  	// example in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" <
   692  	// "25". Non-numeric dimension values all have equal ordering value below all
   693  	// numeric values.
   694  	OrderType string `json:"orderType,omitempty"`
   695  	// ForceSendFields is a list of field names (e.g. "DimensionName") to
   696  	// unconditionally include in API requests. By default, fields with empty or
   697  	// default values are omitted from API requests. See
   698  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   699  	// details.
   700  	ForceSendFields []string `json:"-"`
   701  	// NullFields is a list of field names (e.g. "DimensionName") to include in API
   702  	// requests with the JSON null value. By default, fields with empty values are
   703  	// omitted from API requests. See
   704  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   705  	NullFields []string `json:"-"`
   706  }
   707  
   708  func (s *GoogleAnalyticsAdminV1betaAccessOrderByDimensionOrderBy) MarshalJSON() ([]byte, error) {
   709  	type NoMethod GoogleAnalyticsAdminV1betaAccessOrderByDimensionOrderBy
   710  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   711  }
   712  
   713  // GoogleAnalyticsAdminV1betaAccessOrderByMetricOrderBy: Sorts by metric
   714  // values.
   715  type GoogleAnalyticsAdminV1betaAccessOrderByMetricOrderBy struct {
   716  	// MetricName: A metric name in the request to order by.
   717  	MetricName string `json:"metricName,omitempty"`
   718  	// ForceSendFields is a list of field names (e.g. "MetricName") to
   719  	// unconditionally include in API requests. By default, fields with empty or
   720  	// default values are omitted from API requests. See
   721  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   722  	// details.
   723  	ForceSendFields []string `json:"-"`
   724  	// NullFields is a list of field names (e.g. "MetricName") to include in API
   725  	// requests with the JSON null value. By default, fields with empty values are
   726  	// omitted from API requests. See
   727  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   728  	NullFields []string `json:"-"`
   729  }
   730  
   731  func (s *GoogleAnalyticsAdminV1betaAccessOrderByMetricOrderBy) MarshalJSON() ([]byte, error) {
   732  	type NoMethod GoogleAnalyticsAdminV1betaAccessOrderByMetricOrderBy
   733  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   734  }
   735  
   736  // GoogleAnalyticsAdminV1betaAccessQuota: Current state of all quotas for this
   737  // Analytics property. If any quota for a property is exhausted, all requests
   738  // to that property will return Resource Exhausted errors.
   739  type GoogleAnalyticsAdminV1betaAccessQuota struct {
   740  	// ConcurrentRequests: Properties can use up to 50 concurrent requests.
   741  	ConcurrentRequests *GoogleAnalyticsAdminV1betaAccessQuotaStatus `json:"concurrentRequests,omitempty"`
   742  	// ServerErrorsPerProjectPerHour: Properties and cloud project pairs can have
   743  	// up to 50 server errors per hour.
   744  	ServerErrorsPerProjectPerHour *GoogleAnalyticsAdminV1betaAccessQuotaStatus `json:"serverErrorsPerProjectPerHour,omitempty"`
   745  	// TokensPerDay: Properties can use 250,000 tokens per day. Most requests
   746  	// consume fewer than 10 tokens.
   747  	TokensPerDay *GoogleAnalyticsAdminV1betaAccessQuotaStatus `json:"tokensPerDay,omitempty"`
   748  	// TokensPerHour: Properties can use 50,000 tokens per hour. An API request
   749  	// consumes a single number of tokens, and that number is deducted from all of
   750  	// the hourly, daily, and per project hourly quotas.
   751  	TokensPerHour *GoogleAnalyticsAdminV1betaAccessQuotaStatus `json:"tokensPerHour,omitempty"`
   752  	// TokensPerProjectPerHour: Properties can use up to 25% of their tokens per
   753  	// project per hour. This amounts to Analytics 360 Properties can use 12,500
   754  	// tokens per project per hour. An API request consumes a single number of
   755  	// tokens, and that number is deducted from all of the hourly, daily, and per
   756  	// project hourly quotas.
   757  	TokensPerProjectPerHour *GoogleAnalyticsAdminV1betaAccessQuotaStatus `json:"tokensPerProjectPerHour,omitempty"`
   758  	// ForceSendFields is a list of field names (e.g. "ConcurrentRequests") to
   759  	// unconditionally include in API requests. By default, fields with empty or
   760  	// default values are omitted from API requests. See
   761  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   762  	// details.
   763  	ForceSendFields []string `json:"-"`
   764  	// NullFields is a list of field names (e.g. "ConcurrentRequests") to include
   765  	// in API requests with the JSON null value. By default, fields with empty
   766  	// values are omitted from API requests. See
   767  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   768  	NullFields []string `json:"-"`
   769  }
   770  
   771  func (s *GoogleAnalyticsAdminV1betaAccessQuota) MarshalJSON() ([]byte, error) {
   772  	type NoMethod GoogleAnalyticsAdminV1betaAccessQuota
   773  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   774  }
   775  
   776  // GoogleAnalyticsAdminV1betaAccessQuotaStatus: Current state for a particular
   777  // quota group.
   778  type GoogleAnalyticsAdminV1betaAccessQuotaStatus struct {
   779  	// Consumed: Quota consumed by this request.
   780  	Consumed int64 `json:"consumed,omitempty"`
   781  	// Remaining: Quota remaining after this request.
   782  	Remaining int64 `json:"remaining,omitempty"`
   783  	// ForceSendFields is a list of field names (e.g. "Consumed") to
   784  	// unconditionally include in API requests. By default, fields with empty or
   785  	// default values are omitted from API requests. See
   786  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   787  	// details.
   788  	ForceSendFields []string `json:"-"`
   789  	// NullFields is a list of field names (e.g. "Consumed") to include in API
   790  	// requests with the JSON null value. By default, fields with empty values are
   791  	// omitted from API requests. See
   792  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   793  	NullFields []string `json:"-"`
   794  }
   795  
   796  func (s *GoogleAnalyticsAdminV1betaAccessQuotaStatus) MarshalJSON() ([]byte, error) {
   797  	type NoMethod GoogleAnalyticsAdminV1betaAccessQuotaStatus
   798  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   799  }
   800  
   801  // GoogleAnalyticsAdminV1betaAccessRow: Access report data for each row.
   802  type GoogleAnalyticsAdminV1betaAccessRow struct {
   803  	// DimensionValues: List of dimension values. These values are in the same
   804  	// order as specified in the request.
   805  	DimensionValues []*GoogleAnalyticsAdminV1betaAccessDimensionValue `json:"dimensionValues,omitempty"`
   806  	// MetricValues: List of metric values. These values are in the same order as
   807  	// specified in the request.
   808  	MetricValues []*GoogleAnalyticsAdminV1betaAccessMetricValue `json:"metricValues,omitempty"`
   809  	// ForceSendFields is a list of field names (e.g. "DimensionValues") to
   810  	// unconditionally include in API requests. By default, fields with empty or
   811  	// default values are omitted from API requests. See
   812  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   813  	// details.
   814  	ForceSendFields []string `json:"-"`
   815  	// NullFields is a list of field names (e.g. "DimensionValues") to include in
   816  	// API requests with the JSON null value. By default, fields with empty values
   817  	// are omitted from API requests. See
   818  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   819  	NullFields []string `json:"-"`
   820  }
   821  
   822  func (s *GoogleAnalyticsAdminV1betaAccessRow) MarshalJSON() ([]byte, error) {
   823  	type NoMethod GoogleAnalyticsAdminV1betaAccessRow
   824  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   825  }
   826  
   827  // GoogleAnalyticsAdminV1betaAccessStringFilter: The filter for strings.
   828  type GoogleAnalyticsAdminV1betaAccessStringFilter struct {
   829  	// CaseSensitive: If true, the string value is case sensitive.
   830  	CaseSensitive bool `json:"caseSensitive,omitempty"`
   831  	// MatchType: The match type for this filter.
   832  	//
   833  	// Possible values:
   834  	//   "MATCH_TYPE_UNSPECIFIED" - Unspecified
   835  	//   "EXACT" - Exact match of the string value.
   836  	//   "BEGINS_WITH" - Begins with the string value.
   837  	//   "ENDS_WITH" - Ends with the string value.
   838  	//   "CONTAINS" - Contains the string value.
   839  	//   "FULL_REGEXP" - Full match for the regular expression with the string
   840  	// value.
   841  	//   "PARTIAL_REGEXP" - Partial match for the regular expression with the
   842  	// string value.
   843  	MatchType string `json:"matchType,omitempty"`
   844  	// Value: The string value used for the matching.
   845  	Value string `json:"value,omitempty"`
   846  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
   847  	// unconditionally include in API requests. By default, fields with empty or
   848  	// default values are omitted from API requests. See
   849  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   850  	// details.
   851  	ForceSendFields []string `json:"-"`
   852  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
   853  	// requests with the JSON null value. By default, fields with empty values are
   854  	// omitted from API requests. See
   855  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   856  	NullFields []string `json:"-"`
   857  }
   858  
   859  func (s *GoogleAnalyticsAdminV1betaAccessStringFilter) MarshalJSON() ([]byte, error) {
   860  	type NoMethod GoogleAnalyticsAdminV1betaAccessStringFilter
   861  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   862  }
   863  
   864  // GoogleAnalyticsAdminV1betaAccount: A resource message representing a Google
   865  // Analytics account.
   866  type GoogleAnalyticsAdminV1betaAccount struct {
   867  	// CreateTime: Output only. Time when this account was originally created.
   868  	CreateTime string `json:"createTime,omitempty"`
   869  	// Deleted: Output only. Indicates whether this Account is soft-deleted or not.
   870  	// Deleted accounts are excluded from List results unless specifically
   871  	// requested.
   872  	Deleted bool `json:"deleted,omitempty"`
   873  	// DisplayName: Required. Human-readable display name for this account.
   874  	DisplayName string `json:"displayName,omitempty"`
   875  	// GmpOrganization: Output only. The URI for a Google Marketing Platform
   876  	// organization resource. Only set when this account is connected to a GMP
   877  	// organization. Format:
   878  	// marketingplatformadmin.googleapis.com/organizations/{org_id}
   879  	GmpOrganization string `json:"gmpOrganization,omitempty"`
   880  	// Name: Output only. Resource name of this account. Format: accounts/{account}
   881  	// Example: "accounts/100"
   882  	Name string `json:"name,omitempty"`
   883  	// RegionCode: Country of business. Must be a Unicode CLDR region code.
   884  	RegionCode string `json:"regionCode,omitempty"`
   885  	// UpdateTime: Output only. Time when account payload fields were last updated.
   886  	UpdateTime string `json:"updateTime,omitempty"`
   887  
   888  	// ServerResponse contains the HTTP response code and headers from the server.
   889  	googleapi.ServerResponse `json:"-"`
   890  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   891  	// unconditionally include in API requests. By default, fields with empty or
   892  	// default values are omitted from API requests. See
   893  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   894  	// details.
   895  	ForceSendFields []string `json:"-"`
   896  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   897  	// requests with the JSON null value. By default, fields with empty values are
   898  	// omitted from API requests. See
   899  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   900  	NullFields []string `json:"-"`
   901  }
   902  
   903  func (s *GoogleAnalyticsAdminV1betaAccount) MarshalJSON() ([]byte, error) {
   904  	type NoMethod GoogleAnalyticsAdminV1betaAccount
   905  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   906  }
   907  
   908  // GoogleAnalyticsAdminV1betaAccountSummary: A virtual resource representing an
   909  // overview of an account and all its child GA4 properties.
   910  type GoogleAnalyticsAdminV1betaAccountSummary struct {
   911  	// Account: Resource name of account referred to by this account summary
   912  	// Format: accounts/{account_id} Example: "accounts/1000"
   913  	Account string `json:"account,omitempty"`
   914  	// DisplayName: Display name for the account referred to in this account
   915  	// summary.
   916  	DisplayName string `json:"displayName,omitempty"`
   917  	// Name: Resource name for this account summary. Format:
   918  	// accountSummaries/{account_id} Example: "accountSummaries/1000"
   919  	Name string `json:"name,omitempty"`
   920  	// PropertySummaries: List of summaries for child accounts of this account.
   921  	PropertySummaries []*GoogleAnalyticsAdminV1betaPropertySummary `json:"propertySummaries,omitempty"`
   922  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
   923  	// include in API requests. By default, fields with empty or default values are
   924  	// omitted from API requests. See
   925  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   926  	// details.
   927  	ForceSendFields []string `json:"-"`
   928  	// NullFields is a list of field names (e.g. "Account") to include in API
   929  	// requests with the JSON null value. By default, fields with empty values are
   930  	// omitted from API requests. See
   931  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   932  	NullFields []string `json:"-"`
   933  }
   934  
   935  func (s *GoogleAnalyticsAdminV1betaAccountSummary) MarshalJSON() ([]byte, error) {
   936  	type NoMethod GoogleAnalyticsAdminV1betaAccountSummary
   937  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   938  }
   939  
   940  // GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionRequest: Request
   941  // message for AcknowledgeUserDataCollection RPC.
   942  type GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionRequest struct {
   943  	// Acknowledgement: Required. An acknowledgement that the caller of this method
   944  	// understands the terms of user data collection. This field must contain the
   945  	// exact value: "I acknowledge that I have the necessary privacy disclosures
   946  	// and rights from my end users for the collection and processing of their
   947  	// data, including the association of such data with the visitation information
   948  	// Google Analytics collects from my site and/or app property."
   949  	Acknowledgement string `json:"acknowledgement,omitempty"`
   950  	// ForceSendFields is a list of field names (e.g. "Acknowledgement") to
   951  	// unconditionally include in API requests. By default, fields with empty or
   952  	// default values are omitted from API requests. See
   953  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   954  	// details.
   955  	ForceSendFields []string `json:"-"`
   956  	// NullFields is a list of field names (e.g. "Acknowledgement") to include in
   957  	// API requests with the JSON null value. By default, fields with empty values
   958  	// are omitted from API requests. See
   959  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   960  	NullFields []string `json:"-"`
   961  }
   962  
   963  func (s *GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionRequest) MarshalJSON() ([]byte, error) {
   964  	type NoMethod GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionRequest
   965  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   966  }
   967  
   968  // GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionResponse: Response
   969  // message for AcknowledgeUserDataCollection RPC.
   970  type GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionResponse struct {
   971  	// ServerResponse contains the HTTP response code and headers from the server.
   972  	googleapi.ServerResponse `json:"-"`
   973  }
   974  
   975  // GoogleAnalyticsAdminV1betaArchiveCustomDimensionRequest: Request message for
   976  // ArchiveCustomDimension RPC.
   977  type GoogleAnalyticsAdminV1betaArchiveCustomDimensionRequest struct {
   978  }
   979  
   980  // GoogleAnalyticsAdminV1betaArchiveCustomMetricRequest: Request message for
   981  // ArchiveCustomMetric RPC.
   982  type GoogleAnalyticsAdminV1betaArchiveCustomMetricRequest struct {
   983  }
   984  
   985  // GoogleAnalyticsAdminV1betaChangeHistoryChange: A description of a change to
   986  // a single Google Analytics resource.
   987  type GoogleAnalyticsAdminV1betaChangeHistoryChange struct {
   988  	// Action: The type of action that changed this resource.
   989  	//
   990  	// Possible values:
   991  	//   "ACTION_TYPE_UNSPECIFIED" - Action type unknown or not specified.
   992  	//   "CREATED" - Resource was created in this change.
   993  	//   "UPDATED" - Resource was updated in this change.
   994  	//   "DELETED" - Resource was deleted in this change.
   995  	Action string `json:"action,omitempty"`
   996  	// Resource: Resource name of the resource whose changes are described by this
   997  	// entry.
   998  	Resource string `json:"resource,omitempty"`
   999  	// ResourceAfterChange: Resource contents from after the change was made. If
  1000  	// this resource was deleted in this change, this field will be missing.
  1001  	ResourceAfterChange *GoogleAnalyticsAdminV1betaChangeHistoryChangeChangeHistoryResource `json:"resourceAfterChange,omitempty"`
  1002  	// ResourceBeforeChange: Resource contents from before the change was made. If
  1003  	// this resource was created in this change, this field will be missing.
  1004  	ResourceBeforeChange *GoogleAnalyticsAdminV1betaChangeHistoryChangeChangeHistoryResource `json:"resourceBeforeChange,omitempty"`
  1005  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  1006  	// include in API requests. By default, fields with empty or default values are
  1007  	// omitted from API requests. See
  1008  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1009  	// details.
  1010  	ForceSendFields []string `json:"-"`
  1011  	// NullFields is a list of field names (e.g. "Action") to include in API
  1012  	// requests with the JSON null value. By default, fields with empty values are
  1013  	// omitted from API requests. See
  1014  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1015  	NullFields []string `json:"-"`
  1016  }
  1017  
  1018  func (s *GoogleAnalyticsAdminV1betaChangeHistoryChange) MarshalJSON() ([]byte, error) {
  1019  	type NoMethod GoogleAnalyticsAdminV1betaChangeHistoryChange
  1020  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1021  }
  1022  
  1023  // GoogleAnalyticsAdminV1betaChangeHistoryChangeChangeHistoryResource: A
  1024  // snapshot of a resource as before or after the result of a change in change
  1025  // history.
  1026  type GoogleAnalyticsAdminV1betaChangeHistoryChangeChangeHistoryResource struct {
  1027  	// Account: A snapshot of an Account resource in change history.
  1028  	Account *GoogleAnalyticsAdminV1betaAccount `json:"account,omitempty"`
  1029  	// ConversionEvent: A snapshot of a ConversionEvent resource in change history.
  1030  	ConversionEvent *GoogleAnalyticsAdminV1betaConversionEvent `json:"conversionEvent,omitempty"`
  1031  	// DataRetentionSettings: A snapshot of a data retention settings resource in
  1032  	// change history.
  1033  	DataRetentionSettings *GoogleAnalyticsAdminV1betaDataRetentionSettings `json:"dataRetentionSettings,omitempty"`
  1034  	// DataStream: A snapshot of a DataStream resource in change history.
  1035  	DataStream *GoogleAnalyticsAdminV1betaDataStream `json:"dataStream,omitempty"`
  1036  	// FirebaseLink: A snapshot of a FirebaseLink resource in change history.
  1037  	FirebaseLink *GoogleAnalyticsAdminV1betaFirebaseLink `json:"firebaseLink,omitempty"`
  1038  	// GoogleAdsLink: A snapshot of a GoogleAdsLink resource in change history.
  1039  	GoogleAdsLink *GoogleAnalyticsAdminV1betaGoogleAdsLink `json:"googleAdsLink,omitempty"`
  1040  	// MeasurementProtocolSecret: A snapshot of a MeasurementProtocolSecret
  1041  	// resource in change history.
  1042  	MeasurementProtocolSecret *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret `json:"measurementProtocolSecret,omitempty"`
  1043  	// Property: A snapshot of a Property resource in change history.
  1044  	Property *GoogleAnalyticsAdminV1betaProperty `json:"property,omitempty"`
  1045  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
  1046  	// include in API requests. By default, fields with empty or default values are
  1047  	// omitted from API requests. See
  1048  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1049  	// details.
  1050  	ForceSendFields []string `json:"-"`
  1051  	// NullFields is a list of field names (e.g. "Account") to include in API
  1052  	// requests with the JSON null value. By default, fields with empty values are
  1053  	// omitted from API requests. See
  1054  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1055  	NullFields []string `json:"-"`
  1056  }
  1057  
  1058  func (s *GoogleAnalyticsAdminV1betaChangeHistoryChangeChangeHistoryResource) MarshalJSON() ([]byte, error) {
  1059  	type NoMethod GoogleAnalyticsAdminV1betaChangeHistoryChangeChangeHistoryResource
  1060  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1061  }
  1062  
  1063  // GoogleAnalyticsAdminV1betaChangeHistoryEvent: A set of changes within a
  1064  // Google Analytics account or its child properties that resulted from the same
  1065  // cause. Common causes would be updates made in the Google Analytics UI,
  1066  // changes from customer support, or automatic Google Analytics system changes.
  1067  type GoogleAnalyticsAdminV1betaChangeHistoryEvent struct {
  1068  	// ActorType: The type of actor that made this change.
  1069  	//
  1070  	// Possible values:
  1071  	//   "ACTOR_TYPE_UNSPECIFIED" - Unknown or unspecified actor type.
  1072  	//   "USER" - Changes made by the user specified in actor_email.
  1073  	//   "SYSTEM" - Changes made by the Google Analytics system.
  1074  	//   "SUPPORT" - Changes made by Google Analytics support team staff.
  1075  	ActorType string `json:"actorType,omitempty"`
  1076  	// ChangeTime: Time when change was made.
  1077  	ChangeTime string `json:"changeTime,omitempty"`
  1078  	// Changes: A list of changes made in this change history event that fit the
  1079  	// filters specified in SearchChangeHistoryEventsRequest.
  1080  	Changes []*GoogleAnalyticsAdminV1betaChangeHistoryChange `json:"changes,omitempty"`
  1081  	// ChangesFiltered: If true, then the list of changes returned was filtered,
  1082  	// and does not represent all changes that occurred in this event.
  1083  	ChangesFiltered bool `json:"changesFiltered,omitempty"`
  1084  	// Id: ID of this change history event. This ID is unique across Google
  1085  	// Analytics.
  1086  	Id string `json:"id,omitempty"`
  1087  	// UserActorEmail: Email address of the Google account that made the change.
  1088  	// This will be a valid email address if the actor field is set to USER, and
  1089  	// empty otherwise. Google accounts that have been deleted will cause an error.
  1090  	UserActorEmail string `json:"userActorEmail,omitempty"`
  1091  	// ForceSendFields is a list of field names (e.g. "ActorType") to
  1092  	// unconditionally include in API requests. By default, fields with empty or
  1093  	// default values are omitted from API requests. See
  1094  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1095  	// details.
  1096  	ForceSendFields []string `json:"-"`
  1097  	// NullFields is a list of field names (e.g. "ActorType") to include in API
  1098  	// requests with the JSON null value. By default, fields with empty values are
  1099  	// omitted from API requests. See
  1100  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1101  	NullFields []string `json:"-"`
  1102  }
  1103  
  1104  func (s *GoogleAnalyticsAdminV1betaChangeHistoryEvent) MarshalJSON() ([]byte, error) {
  1105  	type NoMethod GoogleAnalyticsAdminV1betaChangeHistoryEvent
  1106  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1107  }
  1108  
  1109  // GoogleAnalyticsAdminV1betaConversionEvent: A conversion event in a Google
  1110  // Analytics property.
  1111  type GoogleAnalyticsAdminV1betaConversionEvent struct {
  1112  	// CountingMethod: Optional. The method by which conversions will be counted
  1113  	// across multiple events within a session. If this value is not provided, it
  1114  	// will be set to `ONCE_PER_EVENT`.
  1115  	//
  1116  	// Possible values:
  1117  	//   "CONVERSION_COUNTING_METHOD_UNSPECIFIED" - Counting method not specified.
  1118  	//   "ONCE_PER_EVENT" - Each Event instance is considered a Conversion.
  1119  	//   "ONCE_PER_SESSION" - An Event instance is considered a Conversion at most
  1120  	// once per session per user.
  1121  	CountingMethod string `json:"countingMethod,omitempty"`
  1122  	// CreateTime: Output only. Time when this conversion event was created in the
  1123  	// property.
  1124  	CreateTime string `json:"createTime,omitempty"`
  1125  	// Custom: Output only. If set to true, this conversion event refers to a
  1126  	// custom event. If set to false, this conversion event refers to a default
  1127  	// event in GA. Default events typically have special meaning in GA. Default
  1128  	// events are usually created for you by the GA system, but in some cases can
  1129  	// be created by property admins. Custom events count towards the maximum
  1130  	// number of custom conversion events that may be created per property.
  1131  	Custom bool `json:"custom,omitempty"`
  1132  	// DefaultConversionValue: Optional. Defines a default value/currency for a
  1133  	// conversion event.
  1134  	DefaultConversionValue *GoogleAnalyticsAdminV1betaConversionEventDefaultConversionValue `json:"defaultConversionValue,omitempty"`
  1135  	// Deletable: Output only. If set, this event can currently be deleted with
  1136  	// DeleteConversionEvent.
  1137  	Deletable bool `json:"deletable,omitempty"`
  1138  	// EventName: Immutable. The event name for this conversion event. Examples:
  1139  	// 'click', 'purchase'
  1140  	EventName string `json:"eventName,omitempty"`
  1141  	// Name: Output only. Resource name of this conversion event. Format:
  1142  	// properties/{property}/conversionEvents/{conversion_event}
  1143  	Name string `json:"name,omitempty"`
  1144  
  1145  	// ServerResponse contains the HTTP response code and headers from the server.
  1146  	googleapi.ServerResponse `json:"-"`
  1147  	// ForceSendFields is a list of field names (e.g. "CountingMethod") to
  1148  	// unconditionally include in API requests. By default, fields with empty or
  1149  	// default values are omitted from API requests. See
  1150  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1151  	// details.
  1152  	ForceSendFields []string `json:"-"`
  1153  	// NullFields is a list of field names (e.g. "CountingMethod") to include in
  1154  	// API requests with the JSON null value. By default, fields with empty values
  1155  	// are omitted from API requests. See
  1156  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1157  	NullFields []string `json:"-"`
  1158  }
  1159  
  1160  func (s *GoogleAnalyticsAdminV1betaConversionEvent) MarshalJSON() ([]byte, error) {
  1161  	type NoMethod GoogleAnalyticsAdminV1betaConversionEvent
  1162  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1163  }
  1164  
  1165  // GoogleAnalyticsAdminV1betaConversionEventDefaultConversionValue: Defines a
  1166  // default value/currency for a conversion event. Both value and currency must
  1167  // be provided.
  1168  type GoogleAnalyticsAdminV1betaConversionEventDefaultConversionValue struct {
  1169  	// CurrencyCode: When a conversion event for this event_name has no set
  1170  	// currency, this currency will be applied as the default. Must be in ISO 4217
  1171  	// currency code format. See https://en.wikipedia.org/wiki/ISO_4217 for more
  1172  	// information.
  1173  	CurrencyCode string `json:"currencyCode,omitempty"`
  1174  	// Value: This value will be used to populate the value for all conversions of
  1175  	// the specified event_name where the event "value" parameter is unset.
  1176  	Value float64 `json:"value,omitempty"`
  1177  	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
  1178  	// unconditionally include in API requests. By default, fields with empty or
  1179  	// default values are omitted from API requests. See
  1180  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1181  	// details.
  1182  	ForceSendFields []string `json:"-"`
  1183  	// NullFields is a list of field names (e.g. "CurrencyCode") to include in API
  1184  	// requests with the JSON null value. By default, fields with empty values are
  1185  	// omitted from API requests. See
  1186  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1187  	NullFields []string `json:"-"`
  1188  }
  1189  
  1190  func (s *GoogleAnalyticsAdminV1betaConversionEventDefaultConversionValue) MarshalJSON() ([]byte, error) {
  1191  	type NoMethod GoogleAnalyticsAdminV1betaConversionEventDefaultConversionValue
  1192  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1193  }
  1194  
  1195  func (s *GoogleAnalyticsAdminV1betaConversionEventDefaultConversionValue) UnmarshalJSON(data []byte) error {
  1196  	type NoMethod GoogleAnalyticsAdminV1betaConversionEventDefaultConversionValue
  1197  	var s1 struct {
  1198  		Value gensupport.JSONFloat64 `json:"value"`
  1199  		*NoMethod
  1200  	}
  1201  	s1.NoMethod = (*NoMethod)(s)
  1202  	if err := json.Unmarshal(data, &s1); err != nil {
  1203  		return err
  1204  	}
  1205  	s.Value = float64(s1.Value)
  1206  	return nil
  1207  }
  1208  
  1209  // GoogleAnalyticsAdminV1betaCustomDimension: A definition for a
  1210  // CustomDimension.
  1211  type GoogleAnalyticsAdminV1betaCustomDimension struct {
  1212  	// Description: Optional. Description for this custom dimension. Max length of
  1213  	// 150 characters.
  1214  	Description string `json:"description,omitempty"`
  1215  	// DisallowAdsPersonalization: Optional. If set to true, sets this dimension as
  1216  	// NPA and excludes it from ads personalization. This is currently only
  1217  	// supported by user-scoped custom dimensions.
  1218  	DisallowAdsPersonalization bool `json:"disallowAdsPersonalization,omitempty"`
  1219  	// DisplayName: Required. Display name for this custom dimension as shown in
  1220  	// the Analytics UI. Max length of 82 characters, alphanumeric plus space and
  1221  	// underscore starting with a letter. Legacy system-generated display names may
  1222  	// contain square brackets, but updates to this field will never permit square
  1223  	// brackets.
  1224  	DisplayName string `json:"displayName,omitempty"`
  1225  	// Name: Output only. Resource name for this CustomDimension resource. Format:
  1226  	// properties/{property}/customDimensions/{customDimension}
  1227  	Name string `json:"name,omitempty"`
  1228  	// ParameterName: Required. Immutable. Tagging parameter name for this custom
  1229  	// dimension. If this is a user-scoped dimension, then this is the user
  1230  	// property name. If this is an event-scoped dimension, then this is the event
  1231  	// parameter name. If this is an item-scoped dimension, then this is the
  1232  	// parameter name found in the eCommerce items array. May only contain
  1233  	// alphanumeric and underscore characters, starting with a letter. Max length
  1234  	// of 24 characters for user-scoped dimensions, 40 characters for event-scoped
  1235  	// dimensions.
  1236  	ParameterName string `json:"parameterName,omitempty"`
  1237  	// Scope: Required. Immutable. The scope of this dimension.
  1238  	//
  1239  	// Possible values:
  1240  	//   "DIMENSION_SCOPE_UNSPECIFIED" - Scope unknown or not specified.
  1241  	//   "EVENT" - Dimension scoped to an event.
  1242  	//   "USER" - Dimension scoped to a user.
  1243  	//   "ITEM" - Dimension scoped to eCommerce items
  1244  	Scope string `json:"scope,omitempty"`
  1245  
  1246  	// ServerResponse contains the HTTP response code and headers from the server.
  1247  	googleapi.ServerResponse `json:"-"`
  1248  	// ForceSendFields is a list of field names (e.g. "Description") to
  1249  	// unconditionally include in API requests. By default, fields with empty or
  1250  	// default values are omitted from API requests. See
  1251  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1252  	// details.
  1253  	ForceSendFields []string `json:"-"`
  1254  	// NullFields is a list of field names (e.g. "Description") to include in API
  1255  	// requests with the JSON null value. By default, fields with empty values are
  1256  	// omitted from API requests. See
  1257  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1258  	NullFields []string `json:"-"`
  1259  }
  1260  
  1261  func (s *GoogleAnalyticsAdminV1betaCustomDimension) MarshalJSON() ([]byte, error) {
  1262  	type NoMethod GoogleAnalyticsAdminV1betaCustomDimension
  1263  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1264  }
  1265  
  1266  // GoogleAnalyticsAdminV1betaCustomMetric: A definition for a custom metric.
  1267  type GoogleAnalyticsAdminV1betaCustomMetric struct {
  1268  	// Description: Optional. Description for this custom dimension. Max length of
  1269  	// 150 characters.
  1270  	Description string `json:"description,omitempty"`
  1271  	// DisplayName: Required. Display name for this custom metric as shown in the
  1272  	// Analytics UI. Max length of 82 characters, alphanumeric plus space and
  1273  	// underscore starting with a letter. Legacy system-generated display names may
  1274  	// contain square brackets, but updates to this field will never permit square
  1275  	// brackets.
  1276  	DisplayName string `json:"displayName,omitempty"`
  1277  	// MeasurementUnit: Required. The type for the custom metric's value.
  1278  	//
  1279  	// Possible values:
  1280  	//   "MEASUREMENT_UNIT_UNSPECIFIED" - MeasurementUnit unspecified or missing.
  1281  	//   "STANDARD" - This metric uses default units.
  1282  	//   "CURRENCY" - This metric measures a currency.
  1283  	//   "FEET" - This metric measures feet.
  1284  	//   "METERS" - This metric measures meters.
  1285  	//   "KILOMETERS" - This metric measures kilometers.
  1286  	//   "MILES" - This metric measures miles.
  1287  	//   "MILLISECONDS" - This metric measures milliseconds.
  1288  	//   "SECONDS" - This metric measures seconds.
  1289  	//   "MINUTES" - This metric measures minutes.
  1290  	//   "HOURS" - This metric measures hours.
  1291  	MeasurementUnit string `json:"measurementUnit,omitempty"`
  1292  	// Name: Output only. Resource name for this CustomMetric resource. Format:
  1293  	// properties/{property}/customMetrics/{customMetric}
  1294  	Name string `json:"name,omitempty"`
  1295  	// ParameterName: Required. Immutable. Tagging name for this custom metric. If
  1296  	// this is an event-scoped metric, then this is the event parameter name. May
  1297  	// only contain alphanumeric and underscore charactes, starting with a letter.
  1298  	// Max length of 40 characters for event-scoped metrics.
  1299  	ParameterName string `json:"parameterName,omitempty"`
  1300  	// RestrictedMetricType: Optional. Types of restricted data that this metric
  1301  	// may contain. Required for metrics with CURRENCY measurement unit. Must be
  1302  	// empty for metrics with a non-CURRENCY measurement unit.
  1303  	//
  1304  	// Possible values:
  1305  	//   "RESTRICTED_METRIC_TYPE_UNSPECIFIED" - Type unknown or unspecified.
  1306  	//   "COST_DATA" - Metric reports cost data.
  1307  	//   "REVENUE_DATA" - Metric reports revenue data.
  1308  	RestrictedMetricType []string `json:"restrictedMetricType,omitempty"`
  1309  	// Scope: Required. Immutable. The scope of this custom metric.
  1310  	//
  1311  	// Possible values:
  1312  	//   "METRIC_SCOPE_UNSPECIFIED" - Scope unknown or not specified.
  1313  	//   "EVENT" - Metric scoped to an event.
  1314  	Scope string `json:"scope,omitempty"`
  1315  
  1316  	// ServerResponse contains the HTTP response code and headers from the server.
  1317  	googleapi.ServerResponse `json:"-"`
  1318  	// ForceSendFields is a list of field names (e.g. "Description") to
  1319  	// unconditionally include in API requests. By default, fields with empty or
  1320  	// default values are omitted from API requests. See
  1321  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1322  	// details.
  1323  	ForceSendFields []string `json:"-"`
  1324  	// NullFields is a list of field names (e.g. "Description") to include in API
  1325  	// requests with the JSON null value. By default, fields with empty values are
  1326  	// omitted from API requests. See
  1327  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1328  	NullFields []string `json:"-"`
  1329  }
  1330  
  1331  func (s *GoogleAnalyticsAdminV1betaCustomMetric) MarshalJSON() ([]byte, error) {
  1332  	type NoMethod GoogleAnalyticsAdminV1betaCustomMetric
  1333  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1334  }
  1335  
  1336  // GoogleAnalyticsAdminV1betaDataRetentionSettings: Settings values for data
  1337  // retention. This is a singleton resource.
  1338  type GoogleAnalyticsAdminV1betaDataRetentionSettings struct {
  1339  	// EventDataRetention: The length of time that event-level data is retained.
  1340  	//
  1341  	// Possible values:
  1342  	//   "RETENTION_DURATION_UNSPECIFIED" - Data retention time duration is not
  1343  	// specified.
  1344  	//   "TWO_MONTHS" - The data retention time duration is 2 months.
  1345  	//   "FOURTEEN_MONTHS" - The data retention time duration is 14 months.
  1346  	//   "TWENTY_SIX_MONTHS" - The data retention time duration is 26 months.
  1347  	// Available to 360 properties only.
  1348  	//   "THIRTY_EIGHT_MONTHS" - The data retention time duration is 38 months.
  1349  	// Available to 360 properties only.
  1350  	//   "FIFTY_MONTHS" - The data retention time duration is 50 months. Available
  1351  	// to 360 properties only.
  1352  	EventDataRetention string `json:"eventDataRetention,omitempty"`
  1353  	// Name: Output only. Resource name for this DataRetentionSetting resource.
  1354  	// Format: properties/{property}/dataRetentionSettings
  1355  	Name string `json:"name,omitempty"`
  1356  	// ResetUserDataOnNewActivity: If true, reset the retention period for the user
  1357  	// identifier with every event from that user.
  1358  	ResetUserDataOnNewActivity bool `json:"resetUserDataOnNewActivity,omitempty"`
  1359  
  1360  	// ServerResponse contains the HTTP response code and headers from the server.
  1361  	googleapi.ServerResponse `json:"-"`
  1362  	// ForceSendFields is a list of field names (e.g. "EventDataRetention") to
  1363  	// unconditionally include in API requests. By default, fields with empty or
  1364  	// default values are omitted from API requests. See
  1365  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1366  	// details.
  1367  	ForceSendFields []string `json:"-"`
  1368  	// NullFields is a list of field names (e.g. "EventDataRetention") to include
  1369  	// in API requests with the JSON null value. By default, fields with empty
  1370  	// values are omitted from API requests. See
  1371  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1372  	NullFields []string `json:"-"`
  1373  }
  1374  
  1375  func (s *GoogleAnalyticsAdminV1betaDataRetentionSettings) MarshalJSON() ([]byte, error) {
  1376  	type NoMethod GoogleAnalyticsAdminV1betaDataRetentionSettings
  1377  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1378  }
  1379  
  1380  // GoogleAnalyticsAdminV1betaDataSharingSettings: A resource message
  1381  // representing data sharing settings of a Google Analytics account.
  1382  type GoogleAnalyticsAdminV1betaDataSharingSettings struct {
  1383  	// Name: Output only. Resource name. Format:
  1384  	// accounts/{account}/dataSharingSettings Example:
  1385  	// "accounts/1000/dataSharingSettings"
  1386  	Name string `json:"name,omitempty"`
  1387  	// SharingWithGoogleAnySalesEnabled: Allows any of Google sales to access the
  1388  	// data in order to suggest configuration changes to improve results.
  1389  	SharingWithGoogleAnySalesEnabled bool `json:"sharingWithGoogleAnySalesEnabled,omitempty"`
  1390  	// SharingWithGoogleAssignedSalesEnabled: Allows Google sales teams that are
  1391  	// assigned to the customer to access the data in order to suggest
  1392  	// configuration changes to improve results. Sales team restrictions still
  1393  	// apply when enabled.
  1394  	SharingWithGoogleAssignedSalesEnabled bool `json:"sharingWithGoogleAssignedSalesEnabled,omitempty"`
  1395  	// SharingWithGoogleProductsEnabled: Allows Google to use the data to improve
  1396  	// other Google products or services.
  1397  	SharingWithGoogleProductsEnabled bool `json:"sharingWithGoogleProductsEnabled,omitempty"`
  1398  	// SharingWithGoogleSupportEnabled: Allows Google support to access the data in
  1399  	// order to help troubleshoot issues.
  1400  	SharingWithGoogleSupportEnabled bool `json:"sharingWithGoogleSupportEnabled,omitempty"`
  1401  	// SharingWithOthersEnabled: Allows Google to share the data anonymously in
  1402  	// aggregate form with others.
  1403  	SharingWithOthersEnabled bool `json:"sharingWithOthersEnabled,omitempty"`
  1404  
  1405  	// ServerResponse contains the HTTP response code and headers from the server.
  1406  	googleapi.ServerResponse `json:"-"`
  1407  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1408  	// include in API requests. By default, fields with empty or default values are
  1409  	// omitted from API requests. See
  1410  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1411  	// details.
  1412  	ForceSendFields []string `json:"-"`
  1413  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1414  	// with the JSON null value. By default, fields with empty values are omitted
  1415  	// from API requests. See
  1416  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1417  	NullFields []string `json:"-"`
  1418  }
  1419  
  1420  func (s *GoogleAnalyticsAdminV1betaDataSharingSettings) MarshalJSON() ([]byte, error) {
  1421  	type NoMethod GoogleAnalyticsAdminV1betaDataSharingSettings
  1422  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1423  }
  1424  
  1425  // GoogleAnalyticsAdminV1betaDataStream: A resource message representing a data
  1426  // stream.
  1427  type GoogleAnalyticsAdminV1betaDataStream struct {
  1428  	// AndroidAppStreamData: Data specific to Android app streams. Must be
  1429  	// populated if type is ANDROID_APP_DATA_STREAM.
  1430  	AndroidAppStreamData *GoogleAnalyticsAdminV1betaDataStreamAndroidAppStreamData `json:"androidAppStreamData,omitempty"`
  1431  	// CreateTime: Output only. Time when this stream was originally created.
  1432  	CreateTime string `json:"createTime,omitempty"`
  1433  	// DisplayName: Human-readable display name for the Data Stream. Required for
  1434  	// web data streams. The max allowed display name length is 255 UTF-16 code
  1435  	// units.
  1436  	DisplayName string `json:"displayName,omitempty"`
  1437  	// IosAppStreamData: Data specific to iOS app streams. Must be populated if
  1438  	// type is IOS_APP_DATA_STREAM.
  1439  	IosAppStreamData *GoogleAnalyticsAdminV1betaDataStreamIosAppStreamData `json:"iosAppStreamData,omitempty"`
  1440  	// Name: Output only. Resource name of this Data Stream. Format:
  1441  	// properties/{property_id}/dataStreams/{stream_id} Example:
  1442  	// "properties/1000/dataStreams/2000"
  1443  	Name string `json:"name,omitempty"`
  1444  	// Type: Required. Immutable. The type of this DataStream resource.
  1445  	//
  1446  	// Possible values:
  1447  	//   "DATA_STREAM_TYPE_UNSPECIFIED" - Type unknown or not specified.
  1448  	//   "WEB_DATA_STREAM" - Web data stream.
  1449  	//   "ANDROID_APP_DATA_STREAM" - Android app data stream.
  1450  	//   "IOS_APP_DATA_STREAM" - iOS app data stream.
  1451  	Type string `json:"type,omitempty"`
  1452  	// UpdateTime: Output only. Time when stream payload fields were last updated.
  1453  	UpdateTime string `json:"updateTime,omitempty"`
  1454  	// WebStreamData: Data specific to web streams. Must be populated if type is
  1455  	// WEB_DATA_STREAM.
  1456  	WebStreamData *GoogleAnalyticsAdminV1betaDataStreamWebStreamData `json:"webStreamData,omitempty"`
  1457  
  1458  	// ServerResponse contains the HTTP response code and headers from the server.
  1459  	googleapi.ServerResponse `json:"-"`
  1460  	// ForceSendFields is a list of field names (e.g. "AndroidAppStreamData") to
  1461  	// unconditionally include in API requests. By default, fields with empty or
  1462  	// default values are omitted from API requests. See
  1463  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1464  	// details.
  1465  	ForceSendFields []string `json:"-"`
  1466  	// NullFields is a list of field names (e.g. "AndroidAppStreamData") to include
  1467  	// in API requests with the JSON null value. By default, fields with empty
  1468  	// values are omitted from API requests. See
  1469  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1470  	NullFields []string `json:"-"`
  1471  }
  1472  
  1473  func (s *GoogleAnalyticsAdminV1betaDataStream) MarshalJSON() ([]byte, error) {
  1474  	type NoMethod GoogleAnalyticsAdminV1betaDataStream
  1475  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1476  }
  1477  
  1478  // GoogleAnalyticsAdminV1betaDataStreamAndroidAppStreamData: Data specific to
  1479  // Android app streams.
  1480  type GoogleAnalyticsAdminV1betaDataStreamAndroidAppStreamData struct {
  1481  	// FirebaseAppId: Output only. ID of the corresponding Android app in Firebase,
  1482  	// if any. This ID can change if the Android app is deleted and recreated.
  1483  	FirebaseAppId string `json:"firebaseAppId,omitempty"`
  1484  	// PackageName: Immutable. The package name for the app being measured.
  1485  	// Example: "com.example.myandroidapp"
  1486  	PackageName string `json:"packageName,omitempty"`
  1487  	// ForceSendFields is a list of field names (e.g. "FirebaseAppId") to
  1488  	// unconditionally include in API requests. By default, fields with empty or
  1489  	// default values are omitted from API requests. See
  1490  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1491  	// details.
  1492  	ForceSendFields []string `json:"-"`
  1493  	// NullFields is a list of field names (e.g. "FirebaseAppId") to include in API
  1494  	// requests with the JSON null value. By default, fields with empty values are
  1495  	// omitted from API requests. See
  1496  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1497  	NullFields []string `json:"-"`
  1498  }
  1499  
  1500  func (s *GoogleAnalyticsAdminV1betaDataStreamAndroidAppStreamData) MarshalJSON() ([]byte, error) {
  1501  	type NoMethod GoogleAnalyticsAdminV1betaDataStreamAndroidAppStreamData
  1502  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1503  }
  1504  
  1505  // GoogleAnalyticsAdminV1betaDataStreamIosAppStreamData: Data specific to iOS
  1506  // app streams.
  1507  type GoogleAnalyticsAdminV1betaDataStreamIosAppStreamData struct {
  1508  	// BundleId: Required. Immutable. The Apple App Store Bundle ID for the app
  1509  	// Example: "com.example.myiosapp"
  1510  	BundleId string `json:"bundleId,omitempty"`
  1511  	// FirebaseAppId: Output only. ID of the corresponding iOS app in Firebase, if
  1512  	// any. This ID can change if the iOS app is deleted and recreated.
  1513  	FirebaseAppId string `json:"firebaseAppId,omitempty"`
  1514  	// ForceSendFields is a list of field names (e.g. "BundleId") to
  1515  	// unconditionally include in API requests. By default, fields with empty or
  1516  	// default values are omitted from API requests. See
  1517  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1518  	// details.
  1519  	ForceSendFields []string `json:"-"`
  1520  	// NullFields is a list of field names (e.g. "BundleId") to include in API
  1521  	// requests with the JSON null value. By default, fields with empty values are
  1522  	// omitted from API requests. See
  1523  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1524  	NullFields []string `json:"-"`
  1525  }
  1526  
  1527  func (s *GoogleAnalyticsAdminV1betaDataStreamIosAppStreamData) MarshalJSON() ([]byte, error) {
  1528  	type NoMethod GoogleAnalyticsAdminV1betaDataStreamIosAppStreamData
  1529  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1530  }
  1531  
  1532  // GoogleAnalyticsAdminV1betaDataStreamWebStreamData: Data specific to web
  1533  // streams.
  1534  type GoogleAnalyticsAdminV1betaDataStreamWebStreamData struct {
  1535  	// DefaultUri: Domain name of the web app being measured, or empty. Example:
  1536  	// "http://www.google.com", "https://www.google.com"
  1537  	DefaultUri string `json:"defaultUri,omitempty"`
  1538  	// FirebaseAppId: Output only. ID of the corresponding web app in Firebase, if
  1539  	// any. This ID can change if the web app is deleted and recreated.
  1540  	FirebaseAppId string `json:"firebaseAppId,omitempty"`
  1541  	// MeasurementId: Output only. Analytics Measurement ID. Example:
  1542  	// "G-1A2BCD345E"
  1543  	MeasurementId string `json:"measurementId,omitempty"`
  1544  	// ForceSendFields is a list of field names (e.g. "DefaultUri") to
  1545  	// unconditionally include in API requests. By default, fields with empty or
  1546  	// default values are omitted from API requests. See
  1547  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1548  	// details.
  1549  	ForceSendFields []string `json:"-"`
  1550  	// NullFields is a list of field names (e.g. "DefaultUri") to include in API
  1551  	// requests with the JSON null value. By default, fields with empty values are
  1552  	// omitted from API requests. See
  1553  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1554  	NullFields []string `json:"-"`
  1555  }
  1556  
  1557  func (s *GoogleAnalyticsAdminV1betaDataStreamWebStreamData) MarshalJSON() ([]byte, error) {
  1558  	type NoMethod GoogleAnalyticsAdminV1betaDataStreamWebStreamData
  1559  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1560  }
  1561  
  1562  // GoogleAnalyticsAdminV1betaFirebaseLink: A link between a GA4 property and a
  1563  // Firebase project.
  1564  type GoogleAnalyticsAdminV1betaFirebaseLink struct {
  1565  	// CreateTime: Output only. Time when this FirebaseLink was originally created.
  1566  	CreateTime string `json:"createTime,omitempty"`
  1567  	// Name: Output only. Example format: properties/1234/firebaseLinks/5678
  1568  	Name string `json:"name,omitempty"`
  1569  	// Project: Immutable. Firebase project resource name. When creating a
  1570  	// FirebaseLink, you may provide this resource name using either a project
  1571  	// number or project ID. Once this resource has been created, returned
  1572  	// FirebaseLinks will always have a project_name that contains a project
  1573  	// number. Format: 'projects/{project number}' Example: 'projects/1234'
  1574  	Project string `json:"project,omitempty"`
  1575  
  1576  	// ServerResponse contains the HTTP response code and headers from the server.
  1577  	googleapi.ServerResponse `json:"-"`
  1578  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1579  	// unconditionally include in API requests. By default, fields with empty or
  1580  	// default values are omitted from API requests. See
  1581  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1582  	// details.
  1583  	ForceSendFields []string `json:"-"`
  1584  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1585  	// requests with the JSON null value. By default, fields with empty values are
  1586  	// omitted from API requests. See
  1587  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1588  	NullFields []string `json:"-"`
  1589  }
  1590  
  1591  func (s *GoogleAnalyticsAdminV1betaFirebaseLink) MarshalJSON() ([]byte, error) {
  1592  	type NoMethod GoogleAnalyticsAdminV1betaFirebaseLink
  1593  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1594  }
  1595  
  1596  // GoogleAnalyticsAdminV1betaGoogleAdsLink: A link between a GA4 property and a
  1597  // Google Ads account.
  1598  type GoogleAnalyticsAdminV1betaGoogleAdsLink struct {
  1599  	// AdsPersonalizationEnabled: Enable personalized advertising features with
  1600  	// this integration. Automatically publish my Google Analytics audience lists
  1601  	// and Google Analytics remarketing events/parameters to the linked Google Ads
  1602  	// account. If this field is not set on create/update, it will be defaulted to
  1603  	// true.
  1604  	AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"`
  1605  	// CanManageClients: Output only. If true, this link is for a Google Ads
  1606  	// manager account.
  1607  	CanManageClients bool `json:"canManageClients,omitempty"`
  1608  	// CreateTime: Output only. Time when this link was originally created.
  1609  	CreateTime string `json:"createTime,omitempty"`
  1610  	// CreatorEmailAddress: Output only. Email address of the user that created the
  1611  	// link. An empty string will be returned if the email address can't be
  1612  	// retrieved.
  1613  	CreatorEmailAddress string `json:"creatorEmailAddress,omitempty"`
  1614  	// CustomerId: Immutable. Google Ads customer ID.
  1615  	CustomerId string `json:"customerId,omitempty"`
  1616  	// Name: Output only. Format:
  1617  	// properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note:
  1618  	// googleAdsLinkId is not the Google Ads customer ID.
  1619  	Name string `json:"name,omitempty"`
  1620  	// UpdateTime: Output only. Time when this link was last updated.
  1621  	UpdateTime string `json:"updateTime,omitempty"`
  1622  
  1623  	// ServerResponse contains the HTTP response code and headers from the server.
  1624  	googleapi.ServerResponse `json:"-"`
  1625  	// ForceSendFields is a list of field names (e.g. "AdsPersonalizationEnabled")
  1626  	// to unconditionally include in API requests. By default, fields with empty or
  1627  	// default values are omitted from API requests. See
  1628  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1629  	// details.
  1630  	ForceSendFields []string `json:"-"`
  1631  	// NullFields is a list of field names (e.g. "AdsPersonalizationEnabled") to
  1632  	// include in API requests with the JSON null value. By default, fields with
  1633  	// empty values are omitted from API requests. See
  1634  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1635  	NullFields []string `json:"-"`
  1636  }
  1637  
  1638  func (s *GoogleAnalyticsAdminV1betaGoogleAdsLink) MarshalJSON() ([]byte, error) {
  1639  	type NoMethod GoogleAnalyticsAdminV1betaGoogleAdsLink
  1640  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1641  }
  1642  
  1643  // GoogleAnalyticsAdminV1betaKeyEvent: A key event in a Google Analytics
  1644  // property.
  1645  type GoogleAnalyticsAdminV1betaKeyEvent struct {
  1646  	// CountingMethod: Required. The method by which Key Events will be counted
  1647  	// across multiple events within a session.
  1648  	//
  1649  	// Possible values:
  1650  	//   "COUNTING_METHOD_UNSPECIFIED" - Counting method not specified.
  1651  	//   "ONCE_PER_EVENT" - Each Event instance is considered a Key Event.
  1652  	//   "ONCE_PER_SESSION" - An Event instance is considered a Key Event at most
  1653  	// once per session per user.
  1654  	CountingMethod string `json:"countingMethod,omitempty"`
  1655  	// CreateTime: Output only. Time when this key event was created in the
  1656  	// property.
  1657  	CreateTime string `json:"createTime,omitempty"`
  1658  	// Custom: Output only. If set to true, this key event refers to a custom
  1659  	// event. If set to false, this key event refers to a default event in GA.
  1660  	// Default events typically have special meaning in GA. Default events are
  1661  	// usually created for you by the GA system, but in some cases can be created
  1662  	// by property admins. Custom events count towards the maximum number of custom
  1663  	// key events that may be created per property.
  1664  	Custom bool `json:"custom,omitempty"`
  1665  	// DefaultValue: Optional. Defines a default value/currency for a key event.
  1666  	DefaultValue *GoogleAnalyticsAdminV1betaKeyEventDefaultValue `json:"defaultValue,omitempty"`
  1667  	// Deletable: Output only. If set to true, this event can be deleted.
  1668  	Deletable bool `json:"deletable,omitempty"`
  1669  	// EventName: Immutable. The event name for this key event. Examples: 'click',
  1670  	// 'purchase'
  1671  	EventName string `json:"eventName,omitempty"`
  1672  	// Name: Output only. Resource name of this key event. Format:
  1673  	// properties/{property}/keyEvents/{key_event}
  1674  	Name string `json:"name,omitempty"`
  1675  
  1676  	// ServerResponse contains the HTTP response code and headers from the server.
  1677  	googleapi.ServerResponse `json:"-"`
  1678  	// ForceSendFields is a list of field names (e.g. "CountingMethod") to
  1679  	// unconditionally include in API requests. By default, fields with empty or
  1680  	// default values are omitted from API requests. See
  1681  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1682  	// details.
  1683  	ForceSendFields []string `json:"-"`
  1684  	// NullFields is a list of field names (e.g. "CountingMethod") to include in
  1685  	// API requests with the JSON null value. By default, fields with empty values
  1686  	// are omitted from API requests. See
  1687  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1688  	NullFields []string `json:"-"`
  1689  }
  1690  
  1691  func (s *GoogleAnalyticsAdminV1betaKeyEvent) MarshalJSON() ([]byte, error) {
  1692  	type NoMethod GoogleAnalyticsAdminV1betaKeyEvent
  1693  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1694  }
  1695  
  1696  // GoogleAnalyticsAdminV1betaKeyEventDefaultValue: Defines a default
  1697  // value/currency for a key event.
  1698  type GoogleAnalyticsAdminV1betaKeyEventDefaultValue struct {
  1699  	// CurrencyCode: Required. When an occurrence of this Key Event (specified by
  1700  	// event_name) has no set currency this currency will be applied as the
  1701  	// default. Must be in ISO 4217 currency code format. See
  1702  	// https://en.wikipedia.org/wiki/ISO_4217 for more information.
  1703  	CurrencyCode string `json:"currencyCode,omitempty"`
  1704  	// NumericValue: Required. This will be used to populate the "value" parameter
  1705  	// for all occurrences of this Key Event (specified by event_name) where that
  1706  	// parameter is unset.
  1707  	NumericValue float64 `json:"numericValue,omitempty"`
  1708  	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
  1709  	// unconditionally include in API requests. By default, fields with empty or
  1710  	// default values are omitted from API requests. See
  1711  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1712  	// details.
  1713  	ForceSendFields []string `json:"-"`
  1714  	// NullFields is a list of field names (e.g. "CurrencyCode") to include in API
  1715  	// requests with the JSON null value. By default, fields with empty values are
  1716  	// omitted from API requests. See
  1717  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1718  	NullFields []string `json:"-"`
  1719  }
  1720  
  1721  func (s *GoogleAnalyticsAdminV1betaKeyEventDefaultValue) MarshalJSON() ([]byte, error) {
  1722  	type NoMethod GoogleAnalyticsAdminV1betaKeyEventDefaultValue
  1723  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1724  }
  1725  
  1726  func (s *GoogleAnalyticsAdminV1betaKeyEventDefaultValue) UnmarshalJSON(data []byte) error {
  1727  	type NoMethod GoogleAnalyticsAdminV1betaKeyEventDefaultValue
  1728  	var s1 struct {
  1729  		NumericValue gensupport.JSONFloat64 `json:"numericValue"`
  1730  		*NoMethod
  1731  	}
  1732  	s1.NoMethod = (*NoMethod)(s)
  1733  	if err := json.Unmarshal(data, &s1); err != nil {
  1734  		return err
  1735  	}
  1736  	s.NumericValue = float64(s1.NumericValue)
  1737  	return nil
  1738  }
  1739  
  1740  // GoogleAnalyticsAdminV1betaListAccountSummariesResponse: Response message for
  1741  // ListAccountSummaries RPC.
  1742  type GoogleAnalyticsAdminV1betaListAccountSummariesResponse struct {
  1743  	// AccountSummaries: Account summaries of all accounts the caller has access
  1744  	// to.
  1745  	AccountSummaries []*GoogleAnalyticsAdminV1betaAccountSummary `json:"accountSummaries,omitempty"`
  1746  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1747  	// next page. If this field is omitted, there are no subsequent pages.
  1748  	NextPageToken string `json:"nextPageToken,omitempty"`
  1749  
  1750  	// ServerResponse contains the HTTP response code and headers from the server.
  1751  	googleapi.ServerResponse `json:"-"`
  1752  	// ForceSendFields is a list of field names (e.g. "AccountSummaries") to
  1753  	// unconditionally include in API requests. By default, fields with empty or
  1754  	// default values are omitted from API requests. See
  1755  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1756  	// details.
  1757  	ForceSendFields []string `json:"-"`
  1758  	// NullFields is a list of field names (e.g. "AccountSummaries") to include in
  1759  	// API requests with the JSON null value. By default, fields with empty values
  1760  	// are omitted from API requests. See
  1761  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1762  	NullFields []string `json:"-"`
  1763  }
  1764  
  1765  func (s *GoogleAnalyticsAdminV1betaListAccountSummariesResponse) MarshalJSON() ([]byte, error) {
  1766  	type NoMethod GoogleAnalyticsAdminV1betaListAccountSummariesResponse
  1767  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1768  }
  1769  
  1770  // GoogleAnalyticsAdminV1betaListAccountsResponse: Request message for
  1771  // ListAccounts RPC.
  1772  type GoogleAnalyticsAdminV1betaListAccountsResponse struct {
  1773  	// Accounts: Results that were accessible to the caller.
  1774  	Accounts []*GoogleAnalyticsAdminV1betaAccount `json:"accounts,omitempty"`
  1775  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1776  	// next page. If this field is omitted, there are no subsequent pages.
  1777  	NextPageToken string `json:"nextPageToken,omitempty"`
  1778  
  1779  	// ServerResponse contains the HTTP response code and headers from the server.
  1780  	googleapi.ServerResponse `json:"-"`
  1781  	// ForceSendFields is a list of field names (e.g. "Accounts") to
  1782  	// unconditionally include in API requests. By default, fields with empty or
  1783  	// default values are omitted from API requests. See
  1784  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1785  	// details.
  1786  	ForceSendFields []string `json:"-"`
  1787  	// NullFields is a list of field names (e.g. "Accounts") to include in API
  1788  	// requests with the JSON null value. By default, fields with empty values are
  1789  	// omitted from API requests. See
  1790  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1791  	NullFields []string `json:"-"`
  1792  }
  1793  
  1794  func (s *GoogleAnalyticsAdminV1betaListAccountsResponse) MarshalJSON() ([]byte, error) {
  1795  	type NoMethod GoogleAnalyticsAdminV1betaListAccountsResponse
  1796  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1797  }
  1798  
  1799  // GoogleAnalyticsAdminV1betaListConversionEventsResponse: Response message for
  1800  // ListConversionEvents RPC.
  1801  type GoogleAnalyticsAdminV1betaListConversionEventsResponse struct {
  1802  	// ConversionEvents: The requested conversion events
  1803  	ConversionEvents []*GoogleAnalyticsAdminV1betaConversionEvent `json:"conversionEvents,omitempty"`
  1804  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1805  	// next page. If this field is omitted, there are no subsequent pages.
  1806  	NextPageToken string `json:"nextPageToken,omitempty"`
  1807  
  1808  	// ServerResponse contains the HTTP response code and headers from the server.
  1809  	googleapi.ServerResponse `json:"-"`
  1810  	// ForceSendFields is a list of field names (e.g. "ConversionEvents") to
  1811  	// unconditionally include in API requests. By default, fields with empty or
  1812  	// default values are omitted from API requests. See
  1813  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1814  	// details.
  1815  	ForceSendFields []string `json:"-"`
  1816  	// NullFields is a list of field names (e.g. "ConversionEvents") to include in
  1817  	// API requests with the JSON null value. By default, fields with empty values
  1818  	// are omitted from API requests. See
  1819  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1820  	NullFields []string `json:"-"`
  1821  }
  1822  
  1823  func (s *GoogleAnalyticsAdminV1betaListConversionEventsResponse) MarshalJSON() ([]byte, error) {
  1824  	type NoMethod GoogleAnalyticsAdminV1betaListConversionEventsResponse
  1825  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1826  }
  1827  
  1828  // GoogleAnalyticsAdminV1betaListCustomDimensionsResponse: Response message for
  1829  // ListCustomDimensions RPC.
  1830  type GoogleAnalyticsAdminV1betaListCustomDimensionsResponse struct {
  1831  	// CustomDimensions: List of CustomDimensions.
  1832  	CustomDimensions []*GoogleAnalyticsAdminV1betaCustomDimension `json:"customDimensions,omitempty"`
  1833  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1834  	// next page. If this field is omitted, there are no subsequent pages.
  1835  	NextPageToken string `json:"nextPageToken,omitempty"`
  1836  
  1837  	// ServerResponse contains the HTTP response code and headers from the server.
  1838  	googleapi.ServerResponse `json:"-"`
  1839  	// ForceSendFields is a list of field names (e.g. "CustomDimensions") to
  1840  	// unconditionally include in API requests. By default, fields with empty or
  1841  	// default values are omitted from API requests. See
  1842  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1843  	// details.
  1844  	ForceSendFields []string `json:"-"`
  1845  	// NullFields is a list of field names (e.g. "CustomDimensions") to include in
  1846  	// API requests with the JSON null value. By default, fields with empty values
  1847  	// are omitted from API requests. See
  1848  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1849  	NullFields []string `json:"-"`
  1850  }
  1851  
  1852  func (s *GoogleAnalyticsAdminV1betaListCustomDimensionsResponse) MarshalJSON() ([]byte, error) {
  1853  	type NoMethod GoogleAnalyticsAdminV1betaListCustomDimensionsResponse
  1854  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1855  }
  1856  
  1857  // GoogleAnalyticsAdminV1betaListCustomMetricsResponse: Response message for
  1858  // ListCustomMetrics RPC.
  1859  type GoogleAnalyticsAdminV1betaListCustomMetricsResponse struct {
  1860  	// CustomMetrics: List of CustomMetrics.
  1861  	CustomMetrics []*GoogleAnalyticsAdminV1betaCustomMetric `json:"customMetrics,omitempty"`
  1862  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1863  	// next page. If this field is omitted, there are no subsequent pages.
  1864  	NextPageToken string `json:"nextPageToken,omitempty"`
  1865  
  1866  	// ServerResponse contains the HTTP response code and headers from the server.
  1867  	googleapi.ServerResponse `json:"-"`
  1868  	// ForceSendFields is a list of field names (e.g. "CustomMetrics") to
  1869  	// unconditionally include in API requests. By default, fields with empty or
  1870  	// default values are omitted from API requests. See
  1871  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1872  	// details.
  1873  	ForceSendFields []string `json:"-"`
  1874  	// NullFields is a list of field names (e.g. "CustomMetrics") to include in API
  1875  	// requests with the JSON null value. By default, fields with empty values are
  1876  	// omitted from API requests. See
  1877  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1878  	NullFields []string `json:"-"`
  1879  }
  1880  
  1881  func (s *GoogleAnalyticsAdminV1betaListCustomMetricsResponse) MarshalJSON() ([]byte, error) {
  1882  	type NoMethod GoogleAnalyticsAdminV1betaListCustomMetricsResponse
  1883  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1884  }
  1885  
  1886  // GoogleAnalyticsAdminV1betaListDataStreamsResponse: Response message for
  1887  // ListDataStreams RPC.
  1888  type GoogleAnalyticsAdminV1betaListDataStreamsResponse struct {
  1889  	// DataStreams: List of DataStreams.
  1890  	DataStreams []*GoogleAnalyticsAdminV1betaDataStream `json:"dataStreams,omitempty"`
  1891  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1892  	// next page. If this field is omitted, there are no subsequent pages.
  1893  	NextPageToken string `json:"nextPageToken,omitempty"`
  1894  
  1895  	// ServerResponse contains the HTTP response code and headers from the server.
  1896  	googleapi.ServerResponse `json:"-"`
  1897  	// ForceSendFields is a list of field names (e.g. "DataStreams") to
  1898  	// unconditionally include in API requests. By default, fields with empty or
  1899  	// default values are omitted from API requests. See
  1900  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1901  	// details.
  1902  	ForceSendFields []string `json:"-"`
  1903  	// NullFields is a list of field names (e.g. "DataStreams") to include in API
  1904  	// requests with the JSON null value. By default, fields with empty values are
  1905  	// omitted from API requests. See
  1906  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1907  	NullFields []string `json:"-"`
  1908  }
  1909  
  1910  func (s *GoogleAnalyticsAdminV1betaListDataStreamsResponse) MarshalJSON() ([]byte, error) {
  1911  	type NoMethod GoogleAnalyticsAdminV1betaListDataStreamsResponse
  1912  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1913  }
  1914  
  1915  // GoogleAnalyticsAdminV1betaListFirebaseLinksResponse: Response message for
  1916  // ListFirebaseLinks RPC
  1917  type GoogleAnalyticsAdminV1betaListFirebaseLinksResponse struct {
  1918  	// FirebaseLinks: List of FirebaseLinks. This will have at most one value.
  1919  	FirebaseLinks []*GoogleAnalyticsAdminV1betaFirebaseLink `json:"firebaseLinks,omitempty"`
  1920  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1921  	// next page. If this field is omitted, there are no subsequent pages.
  1922  	// Currently, Google Analytics supports only one FirebaseLink per property, so
  1923  	// this will never be populated.
  1924  	NextPageToken string `json:"nextPageToken,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. "FirebaseLinks") 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. "FirebaseLinks") to include in API
  1935  	// requests with the JSON null value. By default, fields with empty values are
  1936  	// 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 *GoogleAnalyticsAdminV1betaListFirebaseLinksResponse) MarshalJSON() ([]byte, error) {
  1942  	type NoMethod GoogleAnalyticsAdminV1betaListFirebaseLinksResponse
  1943  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1944  }
  1945  
  1946  // GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse: Response message for
  1947  // ListGoogleAdsLinks RPC.
  1948  type GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse struct {
  1949  	// GoogleAdsLinks: List of GoogleAdsLinks.
  1950  	GoogleAdsLinks []*GoogleAnalyticsAdminV1betaGoogleAdsLink `json:"googleAdsLinks,omitempty"`
  1951  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1952  	// next page. If this field is omitted, there are no subsequent pages.
  1953  	NextPageToken string `json:"nextPageToken,omitempty"`
  1954  
  1955  	// ServerResponse contains the HTTP response code and headers from the server.
  1956  	googleapi.ServerResponse `json:"-"`
  1957  	// ForceSendFields is a list of field names (e.g. "GoogleAdsLinks") to
  1958  	// unconditionally include in API requests. By default, fields with empty or
  1959  	// default values are omitted from API requests. See
  1960  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1961  	// details.
  1962  	ForceSendFields []string `json:"-"`
  1963  	// NullFields is a list of field names (e.g. "GoogleAdsLinks") to include in
  1964  	// API requests with the JSON null value. By default, fields with empty values
  1965  	// are omitted from API requests. See
  1966  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1967  	NullFields []string `json:"-"`
  1968  }
  1969  
  1970  func (s *GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse) MarshalJSON() ([]byte, error) {
  1971  	type NoMethod GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse
  1972  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1973  }
  1974  
  1975  // GoogleAnalyticsAdminV1betaListKeyEventsResponse: Response message for
  1976  // ListKeyEvents RPC.
  1977  type GoogleAnalyticsAdminV1betaListKeyEventsResponse struct {
  1978  	// KeyEvents: The requested Key Events
  1979  	KeyEvents []*GoogleAnalyticsAdminV1betaKeyEvent `json:"keyEvents,omitempty"`
  1980  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1981  	// next page. If this field is omitted, there are no subsequent pages.
  1982  	NextPageToken string `json:"nextPageToken,omitempty"`
  1983  
  1984  	// ServerResponse contains the HTTP response code and headers from the server.
  1985  	googleapi.ServerResponse `json:"-"`
  1986  	// ForceSendFields is a list of field names (e.g. "KeyEvents") to
  1987  	// unconditionally include in API requests. By default, fields with empty or
  1988  	// default values are omitted from API requests. See
  1989  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1990  	// details.
  1991  	ForceSendFields []string `json:"-"`
  1992  	// NullFields is a list of field names (e.g. "KeyEvents") to include in API
  1993  	// requests with the JSON null value. By default, fields with empty values are
  1994  	// omitted from API requests. See
  1995  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1996  	NullFields []string `json:"-"`
  1997  }
  1998  
  1999  func (s *GoogleAnalyticsAdminV1betaListKeyEventsResponse) MarshalJSON() ([]byte, error) {
  2000  	type NoMethod GoogleAnalyticsAdminV1betaListKeyEventsResponse
  2001  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2002  }
  2003  
  2004  // GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse: Response
  2005  // message for ListMeasurementProtocolSecret RPC
  2006  type GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse struct {
  2007  	// MeasurementProtocolSecrets: A list of secrets for the parent stream
  2008  	// specified in the request.
  2009  	MeasurementProtocolSecrets []*GoogleAnalyticsAdminV1betaMeasurementProtocolSecret `json:"measurementProtocolSecrets,omitempty"`
  2010  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  2011  	// next page. If this field is omitted, there are no subsequent pages.
  2012  	NextPageToken string `json:"nextPageToken,omitempty"`
  2013  
  2014  	// ServerResponse contains the HTTP response code and headers from the server.
  2015  	googleapi.ServerResponse `json:"-"`
  2016  	// ForceSendFields is a list of field names (e.g. "MeasurementProtocolSecrets")
  2017  	// to unconditionally include in API requests. By default, fields with empty or
  2018  	// default values are omitted from API requests. See
  2019  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2020  	// details.
  2021  	ForceSendFields []string `json:"-"`
  2022  	// NullFields is a list of field names (e.g. "MeasurementProtocolSecrets") to
  2023  	// include in API requests with the JSON null value. By default, fields with
  2024  	// empty values are omitted from API requests. See
  2025  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2026  	NullFields []string `json:"-"`
  2027  }
  2028  
  2029  func (s *GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse) MarshalJSON() ([]byte, error) {
  2030  	type NoMethod GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse
  2031  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2032  }
  2033  
  2034  // GoogleAnalyticsAdminV1betaListPropertiesResponse: Response message for
  2035  // ListProperties RPC.
  2036  type GoogleAnalyticsAdminV1betaListPropertiesResponse struct {
  2037  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  2038  	// next page. If this field is omitted, there are no subsequent pages.
  2039  	NextPageToken string `json:"nextPageToken,omitempty"`
  2040  	// Properties: Results that matched the filter criteria and were accessible to
  2041  	// the caller.
  2042  	Properties []*GoogleAnalyticsAdminV1betaProperty `json:"properties,omitempty"`
  2043  
  2044  	// ServerResponse contains the HTTP response code and headers from the server.
  2045  	googleapi.ServerResponse `json:"-"`
  2046  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2047  	// unconditionally include in API requests. By default, fields with empty or
  2048  	// default values are omitted from API requests. See
  2049  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2050  	// details.
  2051  	ForceSendFields []string `json:"-"`
  2052  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2053  	// requests with the JSON null value. By default, fields with empty values are
  2054  	// omitted from API requests. See
  2055  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2056  	NullFields []string `json:"-"`
  2057  }
  2058  
  2059  func (s *GoogleAnalyticsAdminV1betaListPropertiesResponse) MarshalJSON() ([]byte, error) {
  2060  	type NoMethod GoogleAnalyticsAdminV1betaListPropertiesResponse
  2061  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2062  }
  2063  
  2064  // GoogleAnalyticsAdminV1betaMeasurementProtocolSecret: A secret value used for
  2065  // sending hits to Measurement Protocol.
  2066  type GoogleAnalyticsAdminV1betaMeasurementProtocolSecret struct {
  2067  	// DisplayName: Required. Human-readable display name for this secret.
  2068  	DisplayName string `json:"displayName,omitempty"`
  2069  	// Name: Output only. Resource name of this secret. This secret may be a child
  2070  	// of any type of stream. Format:
  2071  	// properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{me
  2072  	// asurementProtocolSecret}
  2073  	Name string `json:"name,omitempty"`
  2074  	// SecretValue: Output only. The measurement protocol secret value. Pass this
  2075  	// value to the api_secret field of the Measurement Protocol API when sending
  2076  	// hits to this secret's parent property.
  2077  	SecretValue string `json:"secretValue,omitempty"`
  2078  
  2079  	// ServerResponse contains the HTTP response code and headers from the server.
  2080  	googleapi.ServerResponse `json:"-"`
  2081  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  2082  	// unconditionally include in API requests. By default, fields with empty or
  2083  	// default values are omitted from API requests. See
  2084  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2085  	// details.
  2086  	ForceSendFields []string `json:"-"`
  2087  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  2088  	// requests with the JSON null value. By default, fields with empty values are
  2089  	// omitted from API requests. See
  2090  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2091  	NullFields []string `json:"-"`
  2092  }
  2093  
  2094  func (s *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret) MarshalJSON() ([]byte, error) {
  2095  	type NoMethod GoogleAnalyticsAdminV1betaMeasurementProtocolSecret
  2096  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2097  }
  2098  
  2099  // GoogleAnalyticsAdminV1betaNumericValue: To represent a number.
  2100  type GoogleAnalyticsAdminV1betaNumericValue struct {
  2101  	// DoubleValue: Double value
  2102  	DoubleValue float64 `json:"doubleValue,omitempty"`
  2103  	// Int64Value: Integer value
  2104  	Int64Value int64 `json:"int64Value,omitempty,string"`
  2105  	// ForceSendFields is a list of field names (e.g. "DoubleValue") to
  2106  	// unconditionally include in API requests. By default, fields with empty or
  2107  	// default values are omitted from API requests. See
  2108  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2109  	// details.
  2110  	ForceSendFields []string `json:"-"`
  2111  	// NullFields is a list of field names (e.g. "DoubleValue") to include in API
  2112  	// requests with the JSON null value. By default, fields with empty values are
  2113  	// omitted from API requests. See
  2114  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2115  	NullFields []string `json:"-"`
  2116  }
  2117  
  2118  func (s *GoogleAnalyticsAdminV1betaNumericValue) MarshalJSON() ([]byte, error) {
  2119  	type NoMethod GoogleAnalyticsAdminV1betaNumericValue
  2120  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2121  }
  2122  
  2123  func (s *GoogleAnalyticsAdminV1betaNumericValue) UnmarshalJSON(data []byte) error {
  2124  	type NoMethod GoogleAnalyticsAdminV1betaNumericValue
  2125  	var s1 struct {
  2126  		DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
  2127  		*NoMethod
  2128  	}
  2129  	s1.NoMethod = (*NoMethod)(s)
  2130  	if err := json.Unmarshal(data, &s1); err != nil {
  2131  		return err
  2132  	}
  2133  	s.DoubleValue = float64(s1.DoubleValue)
  2134  	return nil
  2135  }
  2136  
  2137  // GoogleAnalyticsAdminV1betaProperty: A resource message representing a Google
  2138  // Analytics GA4 property.
  2139  type GoogleAnalyticsAdminV1betaProperty struct {
  2140  	// Account: Immutable. The resource name of the parent account Format:
  2141  	// accounts/{account_id} Example: "accounts/123"
  2142  	Account string `json:"account,omitempty"`
  2143  	// CreateTime: Output only. Time when the entity was originally created.
  2144  	CreateTime string `json:"createTime,omitempty"`
  2145  	// CurrencyCode: The currency type used in reports involving monetary values.
  2146  	// Format: https://en.wikipedia.org/wiki/ISO_4217 Examples: "USD", "EUR", "JPY"
  2147  	CurrencyCode string `json:"currencyCode,omitempty"`
  2148  	// DeleteTime: Output only. If set, the time at which this property was
  2149  	// trashed. If not set, then this property is not currently in the trash can.
  2150  	DeleteTime string `json:"deleteTime,omitempty"`
  2151  	// DisplayName: Required. Human-readable display name for this property. The
  2152  	// max allowed display name length is 100 UTF-16 code units.
  2153  	DisplayName string `json:"displayName,omitempty"`
  2154  	// ExpireTime: Output only. If set, the time at which this trashed property
  2155  	// will be permanently deleted. If not set, then this property is not currently
  2156  	// in the trash can and is not slated to be deleted.
  2157  	ExpireTime string `json:"expireTime,omitempty"`
  2158  	// IndustryCategory: Industry associated with this property Example:
  2159  	// AUTOMOTIVE, FOOD_AND_DRINK
  2160  	//
  2161  	// Possible values:
  2162  	//   "INDUSTRY_CATEGORY_UNSPECIFIED" - Industry category unspecified
  2163  	//   "AUTOMOTIVE" - Automotive
  2164  	//   "BUSINESS_AND_INDUSTRIAL_MARKETS" - Business and industrial markets
  2165  	//   "FINANCE" - Finance
  2166  	//   "HEALTHCARE" - Healthcare
  2167  	//   "TECHNOLOGY" - Technology
  2168  	//   "TRAVEL" - Travel
  2169  	//   "OTHER" - Other
  2170  	//   "ARTS_AND_ENTERTAINMENT" - Arts and entertainment
  2171  	//   "BEAUTY_AND_FITNESS" - Beauty and fitness
  2172  	//   "BOOKS_AND_LITERATURE" - Books and literature
  2173  	//   "FOOD_AND_DRINK" - Food and drink
  2174  	//   "GAMES" - Games
  2175  	//   "HOBBIES_AND_LEISURE" - Hobbies and leisure
  2176  	//   "HOME_AND_GARDEN" - Home and garden
  2177  	//   "INTERNET_AND_TELECOM" - Internet and telecom
  2178  	//   "LAW_AND_GOVERNMENT" - Law and government
  2179  	//   "NEWS" - News
  2180  	//   "ONLINE_COMMUNITIES" - Online communities
  2181  	//   "PEOPLE_AND_SOCIETY" - People and society
  2182  	//   "PETS_AND_ANIMALS" - Pets and animals
  2183  	//   "REAL_ESTATE" - Real estate
  2184  	//   "REFERENCE" - Reference
  2185  	//   "SCIENCE" - Science
  2186  	//   "SPORTS" - Sports
  2187  	//   "JOBS_AND_EDUCATION" - Jobs and education
  2188  	//   "SHOPPING" - Shopping
  2189  	IndustryCategory string `json:"industryCategory,omitempty"`
  2190  	// Name: Output only. Resource name of this property. Format:
  2191  	// properties/{property_id} Example: "properties/1000"
  2192  	Name string `json:"name,omitempty"`
  2193  	// Parent: Immutable. Resource name of this property's logical parent. Note:
  2194  	// The Property-Moving UI can be used to change the parent. Format:
  2195  	// accounts/{account}, properties/{property} Example: "accounts/100",
  2196  	// "properties/101"
  2197  	Parent string `json:"parent,omitempty"`
  2198  	// PropertyType: Immutable. The property type for this Property resource. When
  2199  	// creating a property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then
  2200  	// "ORDINARY_PROPERTY" will be implied.
  2201  	//
  2202  	// Possible values:
  2203  	//   "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type
  2204  	//   "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property
  2205  	//   "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty
  2206  	//   "PROPERTY_TYPE_ROLLUP" - GA4 rollup property
  2207  	PropertyType string `json:"propertyType,omitempty"`
  2208  	// ServiceLevel: Output only. The Google Analytics service level that applies
  2209  	// to this property.
  2210  	//
  2211  	// Possible values:
  2212  	//   "SERVICE_LEVEL_UNSPECIFIED" - Service level not specified or invalid.
  2213  	//   "GOOGLE_ANALYTICS_STANDARD" - The standard version of Google Analytics.
  2214  	//   "GOOGLE_ANALYTICS_360" - The paid, premium version of Google Analytics.
  2215  	ServiceLevel string `json:"serviceLevel,omitempty"`
  2216  	// TimeZone: Required. Reporting Time Zone, used as the day boundary for
  2217  	// reports, regardless of where the data originates. If the time zone honors
  2218  	// DST, Analytics will automatically adjust for the changes. NOTE: Changing the
  2219  	// time zone only affects data going forward, and is not applied retroactively.
  2220  	// Format: https://www.iana.org/time-zones Example: "America/Los_Angeles"
  2221  	TimeZone string `json:"timeZone,omitempty"`
  2222  	// UpdateTime: Output only. Time when entity payload fields were last updated.
  2223  	UpdateTime string `json:"updateTime,omitempty"`
  2224  
  2225  	// ServerResponse contains the HTTP response code and headers from the server.
  2226  	googleapi.ServerResponse `json:"-"`
  2227  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
  2228  	// include in API requests. By default, fields with empty or default values are
  2229  	// omitted from API requests. See
  2230  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2231  	// details.
  2232  	ForceSendFields []string `json:"-"`
  2233  	// NullFields is a list of field names (e.g. "Account") to include in API
  2234  	// requests with the JSON null value. By default, fields with empty values are
  2235  	// omitted from API requests. See
  2236  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2237  	NullFields []string `json:"-"`
  2238  }
  2239  
  2240  func (s *GoogleAnalyticsAdminV1betaProperty) MarshalJSON() ([]byte, error) {
  2241  	type NoMethod GoogleAnalyticsAdminV1betaProperty
  2242  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2243  }
  2244  
  2245  // GoogleAnalyticsAdminV1betaPropertySummary: A virtual resource representing
  2246  // metadata for a GA4 property.
  2247  type GoogleAnalyticsAdminV1betaPropertySummary struct {
  2248  	// DisplayName: Display name for the property referred to in this property
  2249  	// summary.
  2250  	DisplayName string `json:"displayName,omitempty"`
  2251  	// Parent: Resource name of this property's logical parent. Note: The
  2252  	// Property-Moving UI can be used to change the parent. Format:
  2253  	// accounts/{account}, properties/{property} Example: "accounts/100",
  2254  	// "properties/200"
  2255  	Parent string `json:"parent,omitempty"`
  2256  	// Property: Resource name of property referred to by this property summary
  2257  	// Format: properties/{property_id} Example: "properties/1000"
  2258  	Property string `json:"property,omitempty"`
  2259  	// PropertyType: The property's property type.
  2260  	//
  2261  	// Possible values:
  2262  	//   "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type
  2263  	//   "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property
  2264  	//   "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty
  2265  	//   "PROPERTY_TYPE_ROLLUP" - GA4 rollup property
  2266  	PropertyType string `json:"propertyType,omitempty"`
  2267  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  2268  	// unconditionally include in API requests. By default, fields with empty or
  2269  	// default values are omitted from API requests. See
  2270  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2271  	// details.
  2272  	ForceSendFields []string `json:"-"`
  2273  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  2274  	// requests with the JSON null value. By default, fields with empty values are
  2275  	// omitted from API requests. See
  2276  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2277  	NullFields []string `json:"-"`
  2278  }
  2279  
  2280  func (s *GoogleAnalyticsAdminV1betaPropertySummary) MarshalJSON() ([]byte, error) {
  2281  	type NoMethod GoogleAnalyticsAdminV1betaPropertySummary
  2282  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2283  }
  2284  
  2285  // GoogleAnalyticsAdminV1betaProvisionAccountTicketRequest: Request message for
  2286  // ProvisionAccountTicket RPC.
  2287  type GoogleAnalyticsAdminV1betaProvisionAccountTicketRequest struct {
  2288  	// Account: The account to create.
  2289  	Account *GoogleAnalyticsAdminV1betaAccount `json:"account,omitempty"`
  2290  	// RedirectUri: Redirect URI where the user will be sent after accepting Terms
  2291  	// of Service. Must be configured in Cloud Console as a Redirect URI.
  2292  	RedirectUri string `json:"redirectUri,omitempty"`
  2293  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
  2294  	// include in API requests. By default, fields with empty or default values are
  2295  	// omitted from API requests. See
  2296  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2297  	// details.
  2298  	ForceSendFields []string `json:"-"`
  2299  	// NullFields is a list of field names (e.g. "Account") to include in API
  2300  	// requests with the JSON null value. By default, fields with empty values are
  2301  	// omitted from API requests. See
  2302  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2303  	NullFields []string `json:"-"`
  2304  }
  2305  
  2306  func (s *GoogleAnalyticsAdminV1betaProvisionAccountTicketRequest) MarshalJSON() ([]byte, error) {
  2307  	type NoMethod GoogleAnalyticsAdminV1betaProvisionAccountTicketRequest
  2308  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2309  }
  2310  
  2311  // GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse: Response message
  2312  // for ProvisionAccountTicket RPC.
  2313  type GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse struct {
  2314  	// AccountTicketId: The param to be passed in the ToS link.
  2315  	AccountTicketId string `json:"accountTicketId,omitempty"`
  2316  
  2317  	// ServerResponse contains the HTTP response code and headers from the server.
  2318  	googleapi.ServerResponse `json:"-"`
  2319  	// ForceSendFields is a list of field names (e.g. "AccountTicketId") to
  2320  	// unconditionally include in API requests. By default, fields with empty or
  2321  	// default values are omitted from API requests. See
  2322  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2323  	// details.
  2324  	ForceSendFields []string `json:"-"`
  2325  	// NullFields is a list of field names (e.g. "AccountTicketId") to include in
  2326  	// API requests with the JSON null value. By default, fields with empty values
  2327  	// are omitted from API requests. See
  2328  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2329  	NullFields []string `json:"-"`
  2330  }
  2331  
  2332  func (s *GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse) MarshalJSON() ([]byte, error) {
  2333  	type NoMethod GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse
  2334  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2335  }
  2336  
  2337  // GoogleAnalyticsAdminV1betaRunAccessReportRequest: The request for a Data
  2338  // Access Record Report.
  2339  type GoogleAnalyticsAdminV1betaRunAccessReportRequest struct {
  2340  	// DateRanges: Date ranges of access records to read. If multiple date ranges
  2341  	// are requested, each response row will contain a zero based date range index.
  2342  	// If two date ranges overlap, the access records for the overlapping days is
  2343  	// included in the response rows for both date ranges. Requests are allowed up
  2344  	// to 2 date ranges.
  2345  	DateRanges []*GoogleAnalyticsAdminV1betaAccessDateRange `json:"dateRanges,omitempty"`
  2346  	// DimensionFilter: Dimension filters let you restrict report response to
  2347  	// specific dimension values which match the filter. For example, filtering on
  2348  	// access records of a single user. To learn more, see Fundamentals of
  2349  	// Dimension Filters
  2350  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
  2351  	// for examples. Metrics cannot be used in this filter.
  2352  	DimensionFilter *GoogleAnalyticsAdminV1betaAccessFilterExpression `json:"dimensionFilter,omitempty"`
  2353  	// Dimensions: The dimensions requested and displayed in the response. Requests
  2354  	// are allowed up to 9 dimensions.
  2355  	Dimensions []*GoogleAnalyticsAdminV1betaAccessDimension `json:"dimensions,omitempty"`
  2356  	// ExpandGroups: Optional. Decides whether to return the users within user
  2357  	// groups. This field works only when include_all_users is set to true. If
  2358  	// true, it will return all users with access to the specified property or
  2359  	// account. If false, only the users with direct access will be returned.
  2360  	ExpandGroups bool `json:"expandGroups,omitempty"`
  2361  	// IncludeAllUsers: Optional. Determines whether to include users who have
  2362  	// never made an API call in the response. If true, all users with access to
  2363  	// the specified property or account are included in the response, regardless
  2364  	// of whether they have made an API call or not. If false, only the users who
  2365  	// have made an API call will be included.
  2366  	IncludeAllUsers bool `json:"includeAllUsers,omitempty"`
  2367  	// Limit: The number of rows to return. If unspecified, 10,000 rows are
  2368  	// returned. The API returns a maximum of 100,000 rows per request, no matter
  2369  	// how many you ask for. `limit` must be positive. The API may return fewer
  2370  	// rows than the requested `limit`, if there aren't as many remaining rows as
  2371  	// the `limit`. For instance, there are fewer than 300 possible values for the
  2372  	// dimension `country`, so when reporting on only `country`, you can't get more
  2373  	// than 300 rows, even if you set `limit` to a higher value. To learn more
  2374  	// about this pagination parameter, see Pagination
  2375  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  2376  	Limit int64 `json:"limit,omitempty,string"`
  2377  	// MetricFilter: Metric filters allow you to restrict report response to
  2378  	// specific metric values which match the filter. Metric filters are applied
  2379  	// after aggregating the report's rows, similar to SQL having-clause.
  2380  	// Dimensions cannot be used in this filter.
  2381  	MetricFilter *GoogleAnalyticsAdminV1betaAccessFilterExpression `json:"metricFilter,omitempty"`
  2382  	// Metrics: The metrics requested and displayed in the response. Requests are
  2383  	// allowed up to 10 metrics.
  2384  	Metrics []*GoogleAnalyticsAdminV1betaAccessMetric `json:"metrics,omitempty"`
  2385  	// Offset: The row count of the start row. The first row is counted as row 0.
  2386  	// If offset is unspecified, it is treated as 0. If offset is zero, then this
  2387  	// method will return the first page of results with `limit` entries. To learn
  2388  	// more about this pagination parameter, see Pagination
  2389  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  2390  	Offset int64 `json:"offset,omitempty,string"`
  2391  	// OrderBys: Specifies how rows are ordered in the response.
  2392  	OrderBys []*GoogleAnalyticsAdminV1betaAccessOrderBy `json:"orderBys,omitempty"`
  2393  	// ReturnEntityQuota: Toggles whether to return the current state of this
  2394  	// Analytics Property's quota. Quota is returned in AccessQuota (#AccessQuota).
  2395  	// For account-level requests, this field must be false.
  2396  	ReturnEntityQuota bool `json:"returnEntityQuota,omitempty"`
  2397  	// TimeZone: This request's time zone if specified. If unspecified, the
  2398  	// property's time zone is used. The request's time zone is used to interpret
  2399  	// the start & end dates of the report. Formatted as strings from the IANA Time
  2400  	// Zone database (https://www.iana.org/time-zones); for example
  2401  	// "America/New_York" or "Asia/Tokyo".
  2402  	TimeZone string `json:"timeZone,omitempty"`
  2403  	// ForceSendFields is a list of field names (e.g. "DateRanges") to
  2404  	// unconditionally include in API requests. By default, fields with empty or
  2405  	// default values are omitted from API requests. See
  2406  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2407  	// details.
  2408  	ForceSendFields []string `json:"-"`
  2409  	// NullFields is a list of field names (e.g. "DateRanges") to include in API
  2410  	// requests with the JSON null value. By default, fields with empty values are
  2411  	// omitted from API requests. See
  2412  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2413  	NullFields []string `json:"-"`
  2414  }
  2415  
  2416  func (s *GoogleAnalyticsAdminV1betaRunAccessReportRequest) MarshalJSON() ([]byte, error) {
  2417  	type NoMethod GoogleAnalyticsAdminV1betaRunAccessReportRequest
  2418  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2419  }
  2420  
  2421  // GoogleAnalyticsAdminV1betaRunAccessReportResponse: The customized Data
  2422  // Access Record Report response.
  2423  type GoogleAnalyticsAdminV1betaRunAccessReportResponse struct {
  2424  	// DimensionHeaders: The header for a column in the report that corresponds to
  2425  	// a specific dimension. The number of DimensionHeaders and ordering of
  2426  	// DimensionHeaders matches the dimensions present in rows.
  2427  	DimensionHeaders []*GoogleAnalyticsAdminV1betaAccessDimensionHeader `json:"dimensionHeaders,omitempty"`
  2428  	// MetricHeaders: The header for a column in the report that corresponds to a
  2429  	// specific metric. The number of MetricHeaders and ordering of MetricHeaders
  2430  	// matches the metrics present in rows.
  2431  	MetricHeaders []*GoogleAnalyticsAdminV1betaAccessMetricHeader `json:"metricHeaders,omitempty"`
  2432  	// Quota: The quota state for this Analytics property including this request.
  2433  	// This field doesn't work with account-level requests.
  2434  	Quota *GoogleAnalyticsAdminV1betaAccessQuota `json:"quota,omitempty"`
  2435  	// RowCount: The total number of rows in the query result. `rowCount` is
  2436  	// independent of the number of rows returned in the response, the `limit`
  2437  	// request parameter, and the `offset` request parameter. For example if a
  2438  	// query returns 175 rows and includes `limit` of 50 in the API request, the
  2439  	// response will contain `rowCount` of 175 but only 50 rows. To learn more
  2440  	// about this pagination parameter, see Pagination
  2441  	// (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
  2442  	RowCount int64 `json:"rowCount,omitempty"`
  2443  	// Rows: Rows of dimension value combinations and metric values in the report.
  2444  	Rows []*GoogleAnalyticsAdminV1betaAccessRow `json:"rows,omitempty"`
  2445  
  2446  	// ServerResponse contains the HTTP response code and headers from the server.
  2447  	googleapi.ServerResponse `json:"-"`
  2448  	// ForceSendFields is a list of field names (e.g. "DimensionHeaders") to
  2449  	// unconditionally include in API requests. By default, fields with empty or
  2450  	// default values are omitted from API requests. See
  2451  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2452  	// details.
  2453  	ForceSendFields []string `json:"-"`
  2454  	// NullFields is a list of field names (e.g. "DimensionHeaders") to include in
  2455  	// API requests with the JSON null value. By default, fields with empty values
  2456  	// are omitted from API requests. See
  2457  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2458  	NullFields []string `json:"-"`
  2459  }
  2460  
  2461  func (s *GoogleAnalyticsAdminV1betaRunAccessReportResponse) MarshalJSON() ([]byte, error) {
  2462  	type NoMethod GoogleAnalyticsAdminV1betaRunAccessReportResponse
  2463  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2464  }
  2465  
  2466  // GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest: Request message
  2467  // for SearchChangeHistoryEvents RPC.
  2468  type GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest struct {
  2469  	// Action: Optional. If set, only return changes that match one or more of
  2470  	// these types of actions.
  2471  	//
  2472  	// Possible values:
  2473  	//   "ACTION_TYPE_UNSPECIFIED" - Action type unknown or not specified.
  2474  	//   "CREATED" - Resource was created in this change.
  2475  	//   "UPDATED" - Resource was updated in this change.
  2476  	//   "DELETED" - Resource was deleted in this change.
  2477  	Action []string `json:"action,omitempty"`
  2478  	// ActorEmail: Optional. If set, only return changes if they are made by a user
  2479  	// in this list.
  2480  	ActorEmail []string `json:"actorEmail,omitempty"`
  2481  	// EarliestChangeTime: Optional. If set, only return changes made after this
  2482  	// time (inclusive).
  2483  	EarliestChangeTime string `json:"earliestChangeTime,omitempty"`
  2484  	// LatestChangeTime: Optional. If set, only return changes made before this
  2485  	// time (inclusive).
  2486  	LatestChangeTime string `json:"latestChangeTime,omitempty"`
  2487  	// PageSize: Optional. The maximum number of ChangeHistoryEvent items to
  2488  	// return. The service may return fewer than this value, even if there are
  2489  	// additional pages. If unspecified, at most 50 items will be returned. The
  2490  	// maximum value is 200 (higher values will be coerced to the maximum).
  2491  	PageSize int64 `json:"pageSize,omitempty"`
  2492  	// PageToken: Optional. A page token, received from a previous
  2493  	// `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent
  2494  	// page. When paginating, all other parameters provided to
  2495  	// `SearchChangeHistoryEvents` must match the call that provided the page
  2496  	// token.
  2497  	PageToken string `json:"pageToken,omitempty"`
  2498  	// Property: Optional. Resource name for a child property. If set, only return
  2499  	// changes made to this property or its child resources. Format:
  2500  	// properties/{propertyId} Example: "properties/100"
  2501  	Property string `json:"property,omitempty"`
  2502  	// ResourceType: Optional. If set, only return changes if they are for a
  2503  	// resource that matches at least one of these types.
  2504  	//
  2505  	// Possible values:
  2506  	//   "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED" - Resource type unknown or not
  2507  	// specified.
  2508  	//   "ACCOUNT" - Account resource
  2509  	//   "PROPERTY" - Property resource
  2510  	//   "FIREBASE_LINK" - FirebaseLink resource
  2511  	//   "GOOGLE_ADS_LINK" - GoogleAdsLink resource
  2512  	//   "GOOGLE_SIGNALS_SETTINGS" - GoogleSignalsSettings resource
  2513  	//   "CONVERSION_EVENT" - ConversionEvent resource
  2514  	//   "MEASUREMENT_PROTOCOL_SECRET" - MeasurementProtocolSecret resource
  2515  	//   "DATA_RETENTION_SETTINGS" - DataRetentionSettings resource
  2516  	//   "DISPLAY_VIDEO_360_ADVERTISER_LINK" - DisplayVideo360AdvertiserLink
  2517  	// resource
  2518  	//   "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL" -
  2519  	// DisplayVideo360AdvertiserLinkProposal resource
  2520  	//   "DATA_STREAM" - DataStream resource
  2521  	//   "ATTRIBUTION_SETTINGS" - AttributionSettings resource
  2522  	ResourceType []string `json:"resourceType,omitempty"`
  2523  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  2524  	// include in API requests. By default, fields with empty or default values are
  2525  	// omitted from API requests. See
  2526  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2527  	// details.
  2528  	ForceSendFields []string `json:"-"`
  2529  	// NullFields is a list of field names (e.g. "Action") to include in API
  2530  	// requests with the JSON null value. By default, fields with empty values are
  2531  	// omitted from API requests. See
  2532  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2533  	NullFields []string `json:"-"`
  2534  }
  2535  
  2536  func (s *GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest) MarshalJSON() ([]byte, error) {
  2537  	type NoMethod GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest
  2538  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2539  }
  2540  
  2541  // GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse: Response
  2542  // message for SearchAccounts RPC.
  2543  type GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse struct {
  2544  	// ChangeHistoryEvents: Results that were accessible to the caller.
  2545  	ChangeHistoryEvents []*GoogleAnalyticsAdminV1betaChangeHistoryEvent `json:"changeHistoryEvents,omitempty"`
  2546  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  2547  	// next page. If this field is omitted, there are no subsequent pages.
  2548  	NextPageToken string `json:"nextPageToken,omitempty"`
  2549  
  2550  	// ServerResponse contains the HTTP response code and headers from the server.
  2551  	googleapi.ServerResponse `json:"-"`
  2552  	// ForceSendFields is a list of field names (e.g. "ChangeHistoryEvents") to
  2553  	// unconditionally include in API requests. By default, fields with empty or
  2554  	// default values are omitted from API requests. See
  2555  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2556  	// details.
  2557  	ForceSendFields []string `json:"-"`
  2558  	// NullFields is a list of field names (e.g. "ChangeHistoryEvents") to include
  2559  	// in API requests with the JSON null value. By default, fields with empty
  2560  	// values are omitted from API requests. See
  2561  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2562  	NullFields []string `json:"-"`
  2563  }
  2564  
  2565  func (s *GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse) MarshalJSON() ([]byte, error) {
  2566  	type NoMethod GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse
  2567  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2568  }
  2569  
  2570  // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid
  2571  // defining duplicated empty messages in your APIs. A typical example is to use
  2572  // it as the request or the response type of an API method. For instance:
  2573  // service Foo { rpc Bar(google.protobuf.Empty) returns
  2574  // (google.protobuf.Empty); }
  2575  type GoogleProtobufEmpty struct {
  2576  	// ServerResponse contains the HTTP response code and headers from the server.
  2577  	googleapi.ServerResponse `json:"-"`
  2578  }
  2579  
  2580  type AccountSummariesListCall struct {
  2581  	s            *Service
  2582  	urlParams_   gensupport.URLParams
  2583  	ifNoneMatch_ string
  2584  	ctx_         context.Context
  2585  	header_      http.Header
  2586  }
  2587  
  2588  // List: Returns summaries of all accounts accessible by the caller.
  2589  func (r *AccountSummariesService) List() *AccountSummariesListCall {
  2590  	c := &AccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2591  	return c
  2592  }
  2593  
  2594  // PageSize sets the optional parameter "pageSize": The maximum number of
  2595  // AccountSummary resources to return. The service may return fewer than this
  2596  // value, even if there are additional pages. If unspecified, at most 50
  2597  // resources will be returned. The maximum value is 200; (higher values will be
  2598  // coerced to the maximum)
  2599  func (c *AccountSummariesListCall) PageSize(pageSize int64) *AccountSummariesListCall {
  2600  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2601  	return c
  2602  }
  2603  
  2604  // PageToken sets the optional parameter "pageToken": A page token, received
  2605  // from a previous `ListAccountSummaries` call. Provide this to retrieve the
  2606  // subsequent page. When paginating, all other parameters provided to
  2607  // `ListAccountSummaries` must match the call that provided the page token.
  2608  func (c *AccountSummariesListCall) PageToken(pageToken string) *AccountSummariesListCall {
  2609  	c.urlParams_.Set("pageToken", pageToken)
  2610  	return c
  2611  }
  2612  
  2613  // Fields allows partial responses to be retrieved. See
  2614  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2615  // details.
  2616  func (c *AccountSummariesListCall) Fields(s ...googleapi.Field) *AccountSummariesListCall {
  2617  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2618  	return c
  2619  }
  2620  
  2621  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2622  // object's ETag matches the given value. This is useful for getting updates
  2623  // only after the object has changed since the last request.
  2624  func (c *AccountSummariesListCall) IfNoneMatch(entityTag string) *AccountSummariesListCall {
  2625  	c.ifNoneMatch_ = entityTag
  2626  	return c
  2627  }
  2628  
  2629  // Context sets the context to be used in this call's Do method.
  2630  func (c *AccountSummariesListCall) Context(ctx context.Context) *AccountSummariesListCall {
  2631  	c.ctx_ = ctx
  2632  	return c
  2633  }
  2634  
  2635  // Header returns a http.Header that can be modified by the caller to add
  2636  // headers to the request.
  2637  func (c *AccountSummariesListCall) Header() http.Header {
  2638  	if c.header_ == nil {
  2639  		c.header_ = make(http.Header)
  2640  	}
  2641  	return c.header_
  2642  }
  2643  
  2644  func (c *AccountSummariesListCall) doRequest(alt string) (*http.Response, error) {
  2645  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2646  	if c.ifNoneMatch_ != "" {
  2647  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2648  	}
  2649  	var body io.Reader = nil
  2650  	c.urlParams_.Set("alt", alt)
  2651  	c.urlParams_.Set("prettyPrint", "false")
  2652  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/accountSummaries")
  2653  	urls += "?" + c.urlParams_.Encode()
  2654  	req, err := http.NewRequest("GET", urls, body)
  2655  	if err != nil {
  2656  		return nil, err
  2657  	}
  2658  	req.Header = reqHeaders
  2659  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2660  }
  2661  
  2662  // Do executes the "analyticsadmin.accountSummaries.list" call.
  2663  // Any non-2xx status code is an error. Response headers are in either
  2664  // *GoogleAnalyticsAdminV1betaListAccountSummariesResponse.ServerResponse.Header
  2665  //
  2666  //	or (if a response was returned at all) in error.(*googleapi.Error).Header.
  2667  //
  2668  // Use googleapi.IsNotModified to check whether the returned error was because
  2669  // http.StatusNotModified was returned.
  2670  func (c *AccountSummariesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListAccountSummariesResponse, error) {
  2671  	gensupport.SetOptions(c.urlParams_, opts...)
  2672  	res, err := c.doRequest("json")
  2673  	if res != nil && res.StatusCode == http.StatusNotModified {
  2674  		if res.Body != nil {
  2675  			res.Body.Close()
  2676  		}
  2677  		return nil, gensupport.WrapError(&googleapi.Error{
  2678  			Code:   res.StatusCode,
  2679  			Header: res.Header,
  2680  		})
  2681  	}
  2682  	if err != nil {
  2683  		return nil, err
  2684  	}
  2685  	defer googleapi.CloseBody(res)
  2686  	if err := googleapi.CheckResponse(res); err != nil {
  2687  		return nil, gensupport.WrapError(err)
  2688  	}
  2689  	ret := &GoogleAnalyticsAdminV1betaListAccountSummariesResponse{
  2690  		ServerResponse: googleapi.ServerResponse{
  2691  			Header:         res.Header,
  2692  			HTTPStatusCode: res.StatusCode,
  2693  		},
  2694  	}
  2695  	target := &ret
  2696  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2697  		return nil, err
  2698  	}
  2699  	return ret, nil
  2700  }
  2701  
  2702  // Pages invokes f for each page of results.
  2703  // A non-nil error returned from f will halt the iteration.
  2704  // The provided context supersedes any context provided to the Context method.
  2705  func (c *AccountSummariesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListAccountSummariesResponse) error) error {
  2706  	c.ctx_ = ctx
  2707  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2708  	for {
  2709  		x, err := c.Do()
  2710  		if err != nil {
  2711  			return err
  2712  		}
  2713  		if err := f(x); err != nil {
  2714  			return err
  2715  		}
  2716  		if x.NextPageToken == "" {
  2717  			return nil
  2718  		}
  2719  		c.PageToken(x.NextPageToken)
  2720  	}
  2721  }
  2722  
  2723  type AccountsDeleteCall struct {
  2724  	s          *Service
  2725  	name       string
  2726  	urlParams_ gensupport.URLParams
  2727  	ctx_       context.Context
  2728  	header_    http.Header
  2729  }
  2730  
  2731  // Delete: Marks target Account as soft-deleted (ie: "trashed") and returns it.
  2732  // This API does not have a method to restore soft-deleted accounts. However,
  2733  // they can be restored using the Trash Can UI. If the accounts are not
  2734  // restored before the expiration time, the account and all child resources
  2735  // (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be
  2736  // permanently purged. https://support.google.com/analytics/answer/6154772
  2737  // Returns an error if the target is not found.
  2738  //
  2739  //   - name: The name of the Account to soft-delete. Format: accounts/{account}
  2740  //     Example: "accounts/100".
  2741  func (r *AccountsService) Delete(name string) *AccountsDeleteCall {
  2742  	c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2743  	c.name = name
  2744  	return c
  2745  }
  2746  
  2747  // Fields allows partial responses to be retrieved. See
  2748  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2749  // details.
  2750  func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall {
  2751  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2752  	return c
  2753  }
  2754  
  2755  // Context sets the context to be used in this call's Do method.
  2756  func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall {
  2757  	c.ctx_ = ctx
  2758  	return c
  2759  }
  2760  
  2761  // Header returns a http.Header that can be modified by the caller to add
  2762  // headers to the request.
  2763  func (c *AccountsDeleteCall) Header() http.Header {
  2764  	if c.header_ == nil {
  2765  		c.header_ = make(http.Header)
  2766  	}
  2767  	return c.header_
  2768  }
  2769  
  2770  func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2771  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2772  	var body io.Reader = nil
  2773  	c.urlParams_.Set("alt", alt)
  2774  	c.urlParams_.Set("prettyPrint", "false")
  2775  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  2776  	urls += "?" + c.urlParams_.Encode()
  2777  	req, err := http.NewRequest("DELETE", urls, body)
  2778  	if err != nil {
  2779  		return nil, err
  2780  	}
  2781  	req.Header = reqHeaders
  2782  	googleapi.Expand(req.URL, map[string]string{
  2783  		"name": c.name,
  2784  	})
  2785  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2786  }
  2787  
  2788  // Do executes the "analyticsadmin.accounts.delete" call.
  2789  // Any non-2xx status code is an error. Response headers are in either
  2790  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  2791  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2792  // check whether the returned error was because http.StatusNotModified was
  2793  // returned.
  2794  func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  2795  	gensupport.SetOptions(c.urlParams_, opts...)
  2796  	res, err := c.doRequest("json")
  2797  	if res != nil && res.StatusCode == http.StatusNotModified {
  2798  		if res.Body != nil {
  2799  			res.Body.Close()
  2800  		}
  2801  		return nil, gensupport.WrapError(&googleapi.Error{
  2802  			Code:   res.StatusCode,
  2803  			Header: res.Header,
  2804  		})
  2805  	}
  2806  	if err != nil {
  2807  		return nil, err
  2808  	}
  2809  	defer googleapi.CloseBody(res)
  2810  	if err := googleapi.CheckResponse(res); err != nil {
  2811  		return nil, gensupport.WrapError(err)
  2812  	}
  2813  	ret := &GoogleProtobufEmpty{
  2814  		ServerResponse: googleapi.ServerResponse{
  2815  			Header:         res.Header,
  2816  			HTTPStatusCode: res.StatusCode,
  2817  		},
  2818  	}
  2819  	target := &ret
  2820  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2821  		return nil, err
  2822  	}
  2823  	return ret, nil
  2824  }
  2825  
  2826  type AccountsGetCall struct {
  2827  	s            *Service
  2828  	name         string
  2829  	urlParams_   gensupport.URLParams
  2830  	ifNoneMatch_ string
  2831  	ctx_         context.Context
  2832  	header_      http.Header
  2833  }
  2834  
  2835  // Get: Lookup for a single Account.
  2836  //
  2837  //   - name: The name of the account to lookup. Format: accounts/{account}
  2838  //     Example: "accounts/100".
  2839  func (r *AccountsService) Get(name string) *AccountsGetCall {
  2840  	c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2841  	c.name = name
  2842  	return c
  2843  }
  2844  
  2845  // Fields allows partial responses to be retrieved. See
  2846  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2847  // details.
  2848  func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
  2849  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2850  	return c
  2851  }
  2852  
  2853  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2854  // object's ETag matches the given value. This is useful for getting updates
  2855  // only after the object has changed since the last request.
  2856  func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
  2857  	c.ifNoneMatch_ = entityTag
  2858  	return c
  2859  }
  2860  
  2861  // Context sets the context to be used in this call's Do method.
  2862  func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
  2863  	c.ctx_ = ctx
  2864  	return c
  2865  }
  2866  
  2867  // Header returns a http.Header that can be modified by the caller to add
  2868  // headers to the request.
  2869  func (c *AccountsGetCall) Header() http.Header {
  2870  	if c.header_ == nil {
  2871  		c.header_ = make(http.Header)
  2872  	}
  2873  	return c.header_
  2874  }
  2875  
  2876  func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
  2877  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2878  	if c.ifNoneMatch_ != "" {
  2879  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2880  	}
  2881  	var body io.Reader = nil
  2882  	c.urlParams_.Set("alt", alt)
  2883  	c.urlParams_.Set("prettyPrint", "false")
  2884  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  2885  	urls += "?" + c.urlParams_.Encode()
  2886  	req, err := http.NewRequest("GET", urls, body)
  2887  	if err != nil {
  2888  		return nil, err
  2889  	}
  2890  	req.Header = reqHeaders
  2891  	googleapi.Expand(req.URL, map[string]string{
  2892  		"name": c.name,
  2893  	})
  2894  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2895  }
  2896  
  2897  // Do executes the "analyticsadmin.accounts.get" call.
  2898  // Any non-2xx status code is an error. Response headers are in either
  2899  // *GoogleAnalyticsAdminV1betaAccount.ServerResponse.Header or (if a response
  2900  // was returned at all) in error.(*googleapi.Error).Header. Use
  2901  // googleapi.IsNotModified to check whether the returned error was because
  2902  // http.StatusNotModified was returned.
  2903  func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaAccount, error) {
  2904  	gensupport.SetOptions(c.urlParams_, opts...)
  2905  	res, err := c.doRequest("json")
  2906  	if res != nil && res.StatusCode == http.StatusNotModified {
  2907  		if res.Body != nil {
  2908  			res.Body.Close()
  2909  		}
  2910  		return nil, gensupport.WrapError(&googleapi.Error{
  2911  			Code:   res.StatusCode,
  2912  			Header: res.Header,
  2913  		})
  2914  	}
  2915  	if err != nil {
  2916  		return nil, err
  2917  	}
  2918  	defer googleapi.CloseBody(res)
  2919  	if err := googleapi.CheckResponse(res); err != nil {
  2920  		return nil, gensupport.WrapError(err)
  2921  	}
  2922  	ret := &GoogleAnalyticsAdminV1betaAccount{
  2923  		ServerResponse: googleapi.ServerResponse{
  2924  			Header:         res.Header,
  2925  			HTTPStatusCode: res.StatusCode,
  2926  		},
  2927  	}
  2928  	target := &ret
  2929  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2930  		return nil, err
  2931  	}
  2932  	return ret, nil
  2933  }
  2934  
  2935  type AccountsGetDataSharingSettingsCall struct {
  2936  	s            *Service
  2937  	name         string
  2938  	urlParams_   gensupport.URLParams
  2939  	ifNoneMatch_ string
  2940  	ctx_         context.Context
  2941  	header_      http.Header
  2942  }
  2943  
  2944  // GetDataSharingSettings: Get data sharing settings on an account. Data
  2945  // sharing settings are singletons.
  2946  //
  2947  //   - name: The name of the settings to lookup. Format:
  2948  //     accounts/{account}/dataSharingSettings Example:
  2949  //     "accounts/1000/dataSharingSettings".
  2950  func (r *AccountsService) GetDataSharingSettings(name string) *AccountsGetDataSharingSettingsCall {
  2951  	c := &AccountsGetDataSharingSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2952  	c.name = name
  2953  	return c
  2954  }
  2955  
  2956  // Fields allows partial responses to be retrieved. See
  2957  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2958  // details.
  2959  func (c *AccountsGetDataSharingSettingsCall) Fields(s ...googleapi.Field) *AccountsGetDataSharingSettingsCall {
  2960  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2961  	return c
  2962  }
  2963  
  2964  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2965  // object's ETag matches the given value. This is useful for getting updates
  2966  // only after the object has changed since the last request.
  2967  func (c *AccountsGetDataSharingSettingsCall) IfNoneMatch(entityTag string) *AccountsGetDataSharingSettingsCall {
  2968  	c.ifNoneMatch_ = entityTag
  2969  	return c
  2970  }
  2971  
  2972  // Context sets the context to be used in this call's Do method.
  2973  func (c *AccountsGetDataSharingSettingsCall) Context(ctx context.Context) *AccountsGetDataSharingSettingsCall {
  2974  	c.ctx_ = ctx
  2975  	return c
  2976  }
  2977  
  2978  // Header returns a http.Header that can be modified by the caller to add
  2979  // headers to the request.
  2980  func (c *AccountsGetDataSharingSettingsCall) Header() http.Header {
  2981  	if c.header_ == nil {
  2982  		c.header_ = make(http.Header)
  2983  	}
  2984  	return c.header_
  2985  }
  2986  
  2987  func (c *AccountsGetDataSharingSettingsCall) doRequest(alt string) (*http.Response, error) {
  2988  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2989  	if c.ifNoneMatch_ != "" {
  2990  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2991  	}
  2992  	var body io.Reader = nil
  2993  	c.urlParams_.Set("alt", alt)
  2994  	c.urlParams_.Set("prettyPrint", "false")
  2995  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  2996  	urls += "?" + c.urlParams_.Encode()
  2997  	req, err := http.NewRequest("GET", urls, body)
  2998  	if err != nil {
  2999  		return nil, err
  3000  	}
  3001  	req.Header = reqHeaders
  3002  	googleapi.Expand(req.URL, map[string]string{
  3003  		"name": c.name,
  3004  	})
  3005  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3006  }
  3007  
  3008  // Do executes the "analyticsadmin.accounts.getDataSharingSettings" call.
  3009  // Any non-2xx status code is an error. Response headers are in either
  3010  // *GoogleAnalyticsAdminV1betaDataSharingSettings.ServerResponse.Header or (if
  3011  // a response was returned at all) in error.(*googleapi.Error).Header. Use
  3012  // googleapi.IsNotModified to check whether the returned error was because
  3013  // http.StatusNotModified was returned.
  3014  func (c *AccountsGetDataSharingSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaDataSharingSettings, error) {
  3015  	gensupport.SetOptions(c.urlParams_, opts...)
  3016  	res, err := c.doRequest("json")
  3017  	if res != nil && res.StatusCode == http.StatusNotModified {
  3018  		if res.Body != nil {
  3019  			res.Body.Close()
  3020  		}
  3021  		return nil, gensupport.WrapError(&googleapi.Error{
  3022  			Code:   res.StatusCode,
  3023  			Header: res.Header,
  3024  		})
  3025  	}
  3026  	if err != nil {
  3027  		return nil, err
  3028  	}
  3029  	defer googleapi.CloseBody(res)
  3030  	if err := googleapi.CheckResponse(res); err != nil {
  3031  		return nil, gensupport.WrapError(err)
  3032  	}
  3033  	ret := &GoogleAnalyticsAdminV1betaDataSharingSettings{
  3034  		ServerResponse: googleapi.ServerResponse{
  3035  			Header:         res.Header,
  3036  			HTTPStatusCode: res.StatusCode,
  3037  		},
  3038  	}
  3039  	target := &ret
  3040  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3041  		return nil, err
  3042  	}
  3043  	return ret, nil
  3044  }
  3045  
  3046  type AccountsListCall struct {
  3047  	s            *Service
  3048  	urlParams_   gensupport.URLParams
  3049  	ifNoneMatch_ string
  3050  	ctx_         context.Context
  3051  	header_      http.Header
  3052  }
  3053  
  3054  // List: Returns all accounts accessible by the caller. Note that these
  3055  // accounts might not currently have GA4 properties. Soft-deleted (ie:
  3056  // "trashed") accounts are excluded by default. Returns an empty list if no
  3057  // relevant accounts are found.
  3058  func (r *AccountsService) List() *AccountsListCall {
  3059  	c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3060  	return c
  3061  }
  3062  
  3063  // PageSize sets the optional parameter "pageSize": The maximum number of
  3064  // resources to return. The service may return fewer than this value, even if
  3065  // there are additional pages. If unspecified, at most 50 resources will be
  3066  // returned. The maximum value is 200; (higher values will be coerced to the
  3067  // maximum)
  3068  func (c *AccountsListCall) PageSize(pageSize int64) *AccountsListCall {
  3069  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3070  	return c
  3071  }
  3072  
  3073  // PageToken sets the optional parameter "pageToken": A page token, received
  3074  // from a previous `ListAccounts` call. Provide this to retrieve the subsequent
  3075  // page. When paginating, all other parameters provided to `ListAccounts` must
  3076  // match the call that provided the page token.
  3077  func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
  3078  	c.urlParams_.Set("pageToken", pageToken)
  3079  	return c
  3080  }
  3081  
  3082  // ShowDeleted sets the optional parameter "showDeleted": Whether to include
  3083  // soft-deleted (ie: "trashed") Accounts in the results. Accounts can be
  3084  // inspected to determine whether they are deleted or not.
  3085  func (c *AccountsListCall) ShowDeleted(showDeleted bool) *AccountsListCall {
  3086  	c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  3087  	return c
  3088  }
  3089  
  3090  // Fields allows partial responses to be retrieved. See
  3091  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3092  // details.
  3093  func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
  3094  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3095  	return c
  3096  }
  3097  
  3098  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3099  // object's ETag matches the given value. This is useful for getting updates
  3100  // only after the object has changed since the last request.
  3101  func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
  3102  	c.ifNoneMatch_ = entityTag
  3103  	return c
  3104  }
  3105  
  3106  // Context sets the context to be used in this call's Do method.
  3107  func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
  3108  	c.ctx_ = ctx
  3109  	return c
  3110  }
  3111  
  3112  // Header returns a http.Header that can be modified by the caller to add
  3113  // headers to the request.
  3114  func (c *AccountsListCall) Header() http.Header {
  3115  	if c.header_ == nil {
  3116  		c.header_ = make(http.Header)
  3117  	}
  3118  	return c.header_
  3119  }
  3120  
  3121  func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
  3122  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3123  	if c.ifNoneMatch_ != "" {
  3124  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3125  	}
  3126  	var body io.Reader = nil
  3127  	c.urlParams_.Set("alt", alt)
  3128  	c.urlParams_.Set("prettyPrint", "false")
  3129  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/accounts")
  3130  	urls += "?" + c.urlParams_.Encode()
  3131  	req, err := http.NewRequest("GET", urls, body)
  3132  	if err != nil {
  3133  		return nil, err
  3134  	}
  3135  	req.Header = reqHeaders
  3136  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3137  }
  3138  
  3139  // Do executes the "analyticsadmin.accounts.list" call.
  3140  // Any non-2xx status code is an error. Response headers are in either
  3141  // *GoogleAnalyticsAdminV1betaListAccountsResponse.ServerResponse.Header or (if
  3142  // a response was returned at all) in error.(*googleapi.Error).Header. Use
  3143  // googleapi.IsNotModified to check whether the returned error was because
  3144  // http.StatusNotModified was returned.
  3145  func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListAccountsResponse, error) {
  3146  	gensupport.SetOptions(c.urlParams_, opts...)
  3147  	res, err := c.doRequest("json")
  3148  	if res != nil && res.StatusCode == http.StatusNotModified {
  3149  		if res.Body != nil {
  3150  			res.Body.Close()
  3151  		}
  3152  		return nil, gensupport.WrapError(&googleapi.Error{
  3153  			Code:   res.StatusCode,
  3154  			Header: res.Header,
  3155  		})
  3156  	}
  3157  	if err != nil {
  3158  		return nil, err
  3159  	}
  3160  	defer googleapi.CloseBody(res)
  3161  	if err := googleapi.CheckResponse(res); err != nil {
  3162  		return nil, gensupport.WrapError(err)
  3163  	}
  3164  	ret := &GoogleAnalyticsAdminV1betaListAccountsResponse{
  3165  		ServerResponse: googleapi.ServerResponse{
  3166  			Header:         res.Header,
  3167  			HTTPStatusCode: res.StatusCode,
  3168  		},
  3169  	}
  3170  	target := &ret
  3171  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3172  		return nil, err
  3173  	}
  3174  	return ret, nil
  3175  }
  3176  
  3177  // Pages invokes f for each page of results.
  3178  // A non-nil error returned from f will halt the iteration.
  3179  // The provided context supersedes any context provided to the Context method.
  3180  func (c *AccountsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListAccountsResponse) error) error {
  3181  	c.ctx_ = ctx
  3182  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3183  	for {
  3184  		x, err := c.Do()
  3185  		if err != nil {
  3186  			return err
  3187  		}
  3188  		if err := f(x); err != nil {
  3189  			return err
  3190  		}
  3191  		if x.NextPageToken == "" {
  3192  			return nil
  3193  		}
  3194  		c.PageToken(x.NextPageToken)
  3195  	}
  3196  }
  3197  
  3198  type AccountsPatchCall struct {
  3199  	s                                 *Service
  3200  	name                              string
  3201  	googleanalyticsadminv1betaaccount *GoogleAnalyticsAdminV1betaAccount
  3202  	urlParams_                        gensupport.URLParams
  3203  	ctx_                              context.Context
  3204  	header_                           http.Header
  3205  }
  3206  
  3207  // Patch: Updates an account.
  3208  //
  3209  //   - name: Output only. Resource name of this account. Format:
  3210  //     accounts/{account} Example: "accounts/100".
  3211  func (r *AccountsService) Patch(name string, googleanalyticsadminv1betaaccount *GoogleAnalyticsAdminV1betaAccount) *AccountsPatchCall {
  3212  	c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3213  	c.name = name
  3214  	c.googleanalyticsadminv1betaaccount = googleanalyticsadminv1betaaccount
  3215  	return c
  3216  }
  3217  
  3218  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  3219  // fields to be updated. Field names must be in snake case (for example,
  3220  // "field_to_update"). Omitted fields will not be updated. To replace the
  3221  // entire entity, use one path with the string "*" to match all fields.
  3222  func (c *AccountsPatchCall) UpdateMask(updateMask string) *AccountsPatchCall {
  3223  	c.urlParams_.Set("updateMask", updateMask)
  3224  	return c
  3225  }
  3226  
  3227  // Fields allows partial responses to be retrieved. See
  3228  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3229  // details.
  3230  func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
  3231  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3232  	return c
  3233  }
  3234  
  3235  // Context sets the context to be used in this call's Do method.
  3236  func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
  3237  	c.ctx_ = ctx
  3238  	return c
  3239  }
  3240  
  3241  // Header returns a http.Header that can be modified by the caller to add
  3242  // headers to the request.
  3243  func (c *AccountsPatchCall) Header() http.Header {
  3244  	if c.header_ == nil {
  3245  		c.header_ = make(http.Header)
  3246  	}
  3247  	return c.header_
  3248  }
  3249  
  3250  func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
  3251  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3252  	var body io.Reader = nil
  3253  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaaccount)
  3254  	if err != nil {
  3255  		return nil, err
  3256  	}
  3257  	c.urlParams_.Set("alt", alt)
  3258  	c.urlParams_.Set("prettyPrint", "false")
  3259  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3260  	urls += "?" + c.urlParams_.Encode()
  3261  	req, err := http.NewRequest("PATCH", urls, body)
  3262  	if err != nil {
  3263  		return nil, err
  3264  	}
  3265  	req.Header = reqHeaders
  3266  	googleapi.Expand(req.URL, map[string]string{
  3267  		"name": c.name,
  3268  	})
  3269  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3270  }
  3271  
  3272  // Do executes the "analyticsadmin.accounts.patch" call.
  3273  // Any non-2xx status code is an error. Response headers are in either
  3274  // *GoogleAnalyticsAdminV1betaAccount.ServerResponse.Header or (if a response
  3275  // was returned at all) in error.(*googleapi.Error).Header. Use
  3276  // googleapi.IsNotModified to check whether the returned error was because
  3277  // http.StatusNotModified was returned.
  3278  func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaAccount, error) {
  3279  	gensupport.SetOptions(c.urlParams_, opts...)
  3280  	res, err := c.doRequest("json")
  3281  	if res != nil && res.StatusCode == http.StatusNotModified {
  3282  		if res.Body != nil {
  3283  			res.Body.Close()
  3284  		}
  3285  		return nil, gensupport.WrapError(&googleapi.Error{
  3286  			Code:   res.StatusCode,
  3287  			Header: res.Header,
  3288  		})
  3289  	}
  3290  	if err != nil {
  3291  		return nil, err
  3292  	}
  3293  	defer googleapi.CloseBody(res)
  3294  	if err := googleapi.CheckResponse(res); err != nil {
  3295  		return nil, gensupport.WrapError(err)
  3296  	}
  3297  	ret := &GoogleAnalyticsAdminV1betaAccount{
  3298  		ServerResponse: googleapi.ServerResponse{
  3299  			Header:         res.Header,
  3300  			HTTPStatusCode: res.StatusCode,
  3301  		},
  3302  	}
  3303  	target := &ret
  3304  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3305  		return nil, err
  3306  	}
  3307  	return ret, nil
  3308  }
  3309  
  3310  type AccountsProvisionAccountTicketCall struct {
  3311  	s                                                       *Service
  3312  	googleanalyticsadminv1betaprovisionaccountticketrequest *GoogleAnalyticsAdminV1betaProvisionAccountTicketRequest
  3313  	urlParams_                                              gensupport.URLParams
  3314  	ctx_                                                    context.Context
  3315  	header_                                                 http.Header
  3316  }
  3317  
  3318  // ProvisionAccountTicket: Requests a ticket for creating an account.
  3319  func (r *AccountsService) ProvisionAccountTicket(googleanalyticsadminv1betaprovisionaccountticketrequest *GoogleAnalyticsAdminV1betaProvisionAccountTicketRequest) *AccountsProvisionAccountTicketCall {
  3320  	c := &AccountsProvisionAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3321  	c.googleanalyticsadminv1betaprovisionaccountticketrequest = googleanalyticsadminv1betaprovisionaccountticketrequest
  3322  	return c
  3323  }
  3324  
  3325  // Fields allows partial responses to be retrieved. See
  3326  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3327  // details.
  3328  func (c *AccountsProvisionAccountTicketCall) Fields(s ...googleapi.Field) *AccountsProvisionAccountTicketCall {
  3329  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3330  	return c
  3331  }
  3332  
  3333  // Context sets the context to be used in this call's Do method.
  3334  func (c *AccountsProvisionAccountTicketCall) Context(ctx context.Context) *AccountsProvisionAccountTicketCall {
  3335  	c.ctx_ = ctx
  3336  	return c
  3337  }
  3338  
  3339  // Header returns a http.Header that can be modified by the caller to add
  3340  // headers to the request.
  3341  func (c *AccountsProvisionAccountTicketCall) Header() http.Header {
  3342  	if c.header_ == nil {
  3343  		c.header_ = make(http.Header)
  3344  	}
  3345  	return c.header_
  3346  }
  3347  
  3348  func (c *AccountsProvisionAccountTicketCall) doRequest(alt string) (*http.Response, error) {
  3349  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3350  	var body io.Reader = nil
  3351  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaprovisionaccountticketrequest)
  3352  	if err != nil {
  3353  		return nil, err
  3354  	}
  3355  	c.urlParams_.Set("alt", alt)
  3356  	c.urlParams_.Set("prettyPrint", "false")
  3357  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/accounts:provisionAccountTicket")
  3358  	urls += "?" + c.urlParams_.Encode()
  3359  	req, err := http.NewRequest("POST", urls, body)
  3360  	if err != nil {
  3361  		return nil, err
  3362  	}
  3363  	req.Header = reqHeaders
  3364  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3365  }
  3366  
  3367  // Do executes the "analyticsadmin.accounts.provisionAccountTicket" call.
  3368  // Any non-2xx status code is an error. Response headers are in either
  3369  // *GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse.ServerResponse.Head
  3370  // er or (if a response was returned at all) in
  3371  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3372  // whether the returned error was because http.StatusNotModified was returned.
  3373  func (c *AccountsProvisionAccountTicketCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse, error) {
  3374  	gensupport.SetOptions(c.urlParams_, opts...)
  3375  	res, err := c.doRequest("json")
  3376  	if res != nil && res.StatusCode == http.StatusNotModified {
  3377  		if res.Body != nil {
  3378  			res.Body.Close()
  3379  		}
  3380  		return nil, gensupport.WrapError(&googleapi.Error{
  3381  			Code:   res.StatusCode,
  3382  			Header: res.Header,
  3383  		})
  3384  	}
  3385  	if err != nil {
  3386  		return nil, err
  3387  	}
  3388  	defer googleapi.CloseBody(res)
  3389  	if err := googleapi.CheckResponse(res); err != nil {
  3390  		return nil, gensupport.WrapError(err)
  3391  	}
  3392  	ret := &GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse{
  3393  		ServerResponse: googleapi.ServerResponse{
  3394  			Header:         res.Header,
  3395  			HTTPStatusCode: res.StatusCode,
  3396  		},
  3397  	}
  3398  	target := &ret
  3399  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3400  		return nil, err
  3401  	}
  3402  	return ret, nil
  3403  }
  3404  
  3405  type AccountsRunAccessReportCall struct {
  3406  	s                                                *Service
  3407  	entity                                           string
  3408  	googleanalyticsadminv1betarunaccessreportrequest *GoogleAnalyticsAdminV1betaRunAccessReportRequest
  3409  	urlParams_                                       gensupport.URLParams
  3410  	ctx_                                             context.Context
  3411  	header_                                          http.Header
  3412  }
  3413  
  3414  // RunAccessReport: Returns a customized report of data access records. The
  3415  // report provides records of each time a user reads Google Analytics reporting
  3416  // data. Access records are retained for up to 2 years. Data Access Reports can
  3417  // be requested for a property. Reports may be requested for any property, but
  3418  // dimensions that aren't related to quota can only be requested on Google
  3419  // Analytics 360 properties. This method is only available to Administrators.
  3420  // These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4
  3421  // Data API, and other products like Firebase & Admob that can retrieve data
  3422  // from Google Analytics through a linkage. These records don't include
  3423  // property configuration changes like adding a stream or changing a property's
  3424  // time zone. For configuration change history, see searchChangeHistoryEvents
  3425  // (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).
  3426  //
  3427  //   - entity: The Data Access Report supports requesting at the property level
  3428  //     or account level. If requested at the account level, Data Access Reports
  3429  //     include all access for all properties under that account. To request at
  3430  //     the property level, entity should be for example 'properties/123' if "123"
  3431  //     is your GA4 property ID. To request at the account level, entity should be
  3432  //     for example 'accounts/1234' if "1234" is your GA4 Account ID.
  3433  func (r *AccountsService) RunAccessReport(entity string, googleanalyticsadminv1betarunaccessreportrequest *GoogleAnalyticsAdminV1betaRunAccessReportRequest) *AccountsRunAccessReportCall {
  3434  	c := &AccountsRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3435  	c.entity = entity
  3436  	c.googleanalyticsadminv1betarunaccessreportrequest = googleanalyticsadminv1betarunaccessreportrequest
  3437  	return c
  3438  }
  3439  
  3440  // Fields allows partial responses to be retrieved. See
  3441  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3442  // details.
  3443  func (c *AccountsRunAccessReportCall) Fields(s ...googleapi.Field) *AccountsRunAccessReportCall {
  3444  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3445  	return c
  3446  }
  3447  
  3448  // Context sets the context to be used in this call's Do method.
  3449  func (c *AccountsRunAccessReportCall) Context(ctx context.Context) *AccountsRunAccessReportCall {
  3450  	c.ctx_ = ctx
  3451  	return c
  3452  }
  3453  
  3454  // Header returns a http.Header that can be modified by the caller to add
  3455  // headers to the request.
  3456  func (c *AccountsRunAccessReportCall) Header() http.Header {
  3457  	if c.header_ == nil {
  3458  		c.header_ = make(http.Header)
  3459  	}
  3460  	return c.header_
  3461  }
  3462  
  3463  func (c *AccountsRunAccessReportCall) doRequest(alt string) (*http.Response, error) {
  3464  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3465  	var body io.Reader = nil
  3466  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betarunaccessreportrequest)
  3467  	if err != nil {
  3468  		return nil, err
  3469  	}
  3470  	c.urlParams_.Set("alt", alt)
  3471  	c.urlParams_.Set("prettyPrint", "false")
  3472  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+entity}:runAccessReport")
  3473  	urls += "?" + c.urlParams_.Encode()
  3474  	req, err := http.NewRequest("POST", urls, body)
  3475  	if err != nil {
  3476  		return nil, err
  3477  	}
  3478  	req.Header = reqHeaders
  3479  	googleapi.Expand(req.URL, map[string]string{
  3480  		"entity": c.entity,
  3481  	})
  3482  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3483  }
  3484  
  3485  // Do executes the "analyticsadmin.accounts.runAccessReport" call.
  3486  // Any non-2xx status code is an error. Response headers are in either
  3487  // *GoogleAnalyticsAdminV1betaRunAccessReportResponse.ServerResponse.Header or
  3488  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  3489  // googleapi.IsNotModified to check whether the returned error was because
  3490  // http.StatusNotModified was returned.
  3491  func (c *AccountsRunAccessReportCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaRunAccessReportResponse, error) {
  3492  	gensupport.SetOptions(c.urlParams_, opts...)
  3493  	res, err := c.doRequest("json")
  3494  	if res != nil && res.StatusCode == http.StatusNotModified {
  3495  		if res.Body != nil {
  3496  			res.Body.Close()
  3497  		}
  3498  		return nil, gensupport.WrapError(&googleapi.Error{
  3499  			Code:   res.StatusCode,
  3500  			Header: res.Header,
  3501  		})
  3502  	}
  3503  	if err != nil {
  3504  		return nil, err
  3505  	}
  3506  	defer googleapi.CloseBody(res)
  3507  	if err := googleapi.CheckResponse(res); err != nil {
  3508  		return nil, gensupport.WrapError(err)
  3509  	}
  3510  	ret := &GoogleAnalyticsAdminV1betaRunAccessReportResponse{
  3511  		ServerResponse: googleapi.ServerResponse{
  3512  			Header:         res.Header,
  3513  			HTTPStatusCode: res.StatusCode,
  3514  		},
  3515  	}
  3516  	target := &ret
  3517  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3518  		return nil, err
  3519  	}
  3520  	return ret, nil
  3521  }
  3522  
  3523  type AccountsSearchChangeHistoryEventsCall struct {
  3524  	s                                                          *Service
  3525  	account                                                    string
  3526  	googleanalyticsadminv1betasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest
  3527  	urlParams_                                                 gensupport.URLParams
  3528  	ctx_                                                       context.Context
  3529  	header_                                                    http.Header
  3530  }
  3531  
  3532  // SearchChangeHistoryEvents: Searches through all changes to an account or its
  3533  // children given the specified set of filters.
  3534  //
  3535  //   - account: The account resource for which to return change history
  3536  //     resources. Format: accounts/{account} Example: "accounts/100".
  3537  func (r *AccountsService) SearchChangeHistoryEvents(account string, googleanalyticsadminv1betasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest) *AccountsSearchChangeHistoryEventsCall {
  3538  	c := &AccountsSearchChangeHistoryEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3539  	c.account = account
  3540  	c.googleanalyticsadminv1betasearchchangehistoryeventsrequest = googleanalyticsadminv1betasearchchangehistoryeventsrequest
  3541  	return c
  3542  }
  3543  
  3544  // Fields allows partial responses to be retrieved. See
  3545  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3546  // details.
  3547  func (c *AccountsSearchChangeHistoryEventsCall) Fields(s ...googleapi.Field) *AccountsSearchChangeHistoryEventsCall {
  3548  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3549  	return c
  3550  }
  3551  
  3552  // Context sets the context to be used in this call's Do method.
  3553  func (c *AccountsSearchChangeHistoryEventsCall) Context(ctx context.Context) *AccountsSearchChangeHistoryEventsCall {
  3554  	c.ctx_ = ctx
  3555  	return c
  3556  }
  3557  
  3558  // Header returns a http.Header that can be modified by the caller to add
  3559  // headers to the request.
  3560  func (c *AccountsSearchChangeHistoryEventsCall) Header() http.Header {
  3561  	if c.header_ == nil {
  3562  		c.header_ = make(http.Header)
  3563  	}
  3564  	return c.header_
  3565  }
  3566  
  3567  func (c *AccountsSearchChangeHistoryEventsCall) doRequest(alt string) (*http.Response, error) {
  3568  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3569  	var body io.Reader = nil
  3570  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betasearchchangehistoryeventsrequest)
  3571  	if err != nil {
  3572  		return nil, err
  3573  	}
  3574  	c.urlParams_.Set("alt", alt)
  3575  	c.urlParams_.Set("prettyPrint", "false")
  3576  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+account}:searchChangeHistoryEvents")
  3577  	urls += "?" + c.urlParams_.Encode()
  3578  	req, err := http.NewRequest("POST", urls, body)
  3579  	if err != nil {
  3580  		return nil, err
  3581  	}
  3582  	req.Header = reqHeaders
  3583  	googleapi.Expand(req.URL, map[string]string{
  3584  		"account": c.account,
  3585  	})
  3586  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3587  }
  3588  
  3589  // Do executes the "analyticsadmin.accounts.searchChangeHistoryEvents" call.
  3590  // Any non-2xx status code is an error. Response headers are in either
  3591  // *GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse.ServerResponse.H
  3592  // eader or (if a response was returned at all) in
  3593  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3594  // whether the returned error was because http.StatusNotModified was returned.
  3595  func (c *AccountsSearchChangeHistoryEventsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse, error) {
  3596  	gensupport.SetOptions(c.urlParams_, opts...)
  3597  	res, err := c.doRequest("json")
  3598  	if res != nil && res.StatusCode == http.StatusNotModified {
  3599  		if res.Body != nil {
  3600  			res.Body.Close()
  3601  		}
  3602  		return nil, gensupport.WrapError(&googleapi.Error{
  3603  			Code:   res.StatusCode,
  3604  			Header: res.Header,
  3605  		})
  3606  	}
  3607  	if err != nil {
  3608  		return nil, err
  3609  	}
  3610  	defer googleapi.CloseBody(res)
  3611  	if err := googleapi.CheckResponse(res); err != nil {
  3612  		return nil, gensupport.WrapError(err)
  3613  	}
  3614  	ret := &GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse{
  3615  		ServerResponse: googleapi.ServerResponse{
  3616  			Header:         res.Header,
  3617  			HTTPStatusCode: res.StatusCode,
  3618  		},
  3619  	}
  3620  	target := &ret
  3621  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3622  		return nil, err
  3623  	}
  3624  	return ret, nil
  3625  }
  3626  
  3627  // Pages invokes f for each page of results.
  3628  // A non-nil error returned from f will halt the iteration.
  3629  // The provided context supersedes any context provided to the Context method.
  3630  func (c *AccountsSearchChangeHistoryEventsCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsResponse) error) error {
  3631  	c.ctx_ = ctx
  3632  	defer func(pt string) { c.googleanalyticsadminv1betasearchchangehistoryeventsrequest.PageToken = pt }(c.googleanalyticsadminv1betasearchchangehistoryeventsrequest.PageToken)
  3633  	for {
  3634  		x, err := c.Do()
  3635  		if err != nil {
  3636  			return err
  3637  		}
  3638  		if err := f(x); err != nil {
  3639  			return err
  3640  		}
  3641  		if x.NextPageToken == "" {
  3642  			return nil
  3643  		}
  3644  		c.googleanalyticsadminv1betasearchchangehistoryeventsrequest.PageToken = x.NextPageToken
  3645  	}
  3646  }
  3647  
  3648  type PropertiesAcknowledgeUserDataCollectionCall struct {
  3649  	s                                                              *Service
  3650  	property                                                       string
  3651  	googleanalyticsadminv1betaacknowledgeuserdatacollectionrequest *GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionRequest
  3652  	urlParams_                                                     gensupport.URLParams
  3653  	ctx_                                                           context.Context
  3654  	header_                                                        http.Header
  3655  }
  3656  
  3657  // AcknowledgeUserDataCollection: Acknowledges the terms of user data
  3658  // collection for the specified property. This acknowledgement must be
  3659  // completed (either in the Google Analytics UI or through this API) before
  3660  // MeasurementProtocolSecret resources may be created.
  3661  //
  3662  // - property: The property for which to acknowledge user data collection.
  3663  func (r *PropertiesService) AcknowledgeUserDataCollection(property string, googleanalyticsadminv1betaacknowledgeuserdatacollectionrequest *GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionRequest) *PropertiesAcknowledgeUserDataCollectionCall {
  3664  	c := &PropertiesAcknowledgeUserDataCollectionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3665  	c.property = property
  3666  	c.googleanalyticsadminv1betaacknowledgeuserdatacollectionrequest = googleanalyticsadminv1betaacknowledgeuserdatacollectionrequest
  3667  	return c
  3668  }
  3669  
  3670  // Fields allows partial responses to be retrieved. See
  3671  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3672  // details.
  3673  func (c *PropertiesAcknowledgeUserDataCollectionCall) Fields(s ...googleapi.Field) *PropertiesAcknowledgeUserDataCollectionCall {
  3674  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3675  	return c
  3676  }
  3677  
  3678  // Context sets the context to be used in this call's Do method.
  3679  func (c *PropertiesAcknowledgeUserDataCollectionCall) Context(ctx context.Context) *PropertiesAcknowledgeUserDataCollectionCall {
  3680  	c.ctx_ = ctx
  3681  	return c
  3682  }
  3683  
  3684  // Header returns a http.Header that can be modified by the caller to add
  3685  // headers to the request.
  3686  func (c *PropertiesAcknowledgeUserDataCollectionCall) Header() http.Header {
  3687  	if c.header_ == nil {
  3688  		c.header_ = make(http.Header)
  3689  	}
  3690  	return c.header_
  3691  }
  3692  
  3693  func (c *PropertiesAcknowledgeUserDataCollectionCall) doRequest(alt string) (*http.Response, error) {
  3694  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3695  	var body io.Reader = nil
  3696  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaacknowledgeuserdatacollectionrequest)
  3697  	if err != nil {
  3698  		return nil, err
  3699  	}
  3700  	c.urlParams_.Set("alt", alt)
  3701  	c.urlParams_.Set("prettyPrint", "false")
  3702  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+property}:acknowledgeUserDataCollection")
  3703  	urls += "?" + c.urlParams_.Encode()
  3704  	req, err := http.NewRequest("POST", urls, body)
  3705  	if err != nil {
  3706  		return nil, err
  3707  	}
  3708  	req.Header = reqHeaders
  3709  	googleapi.Expand(req.URL, map[string]string{
  3710  		"property": c.property,
  3711  	})
  3712  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3713  }
  3714  
  3715  // Do executes the "analyticsadmin.properties.acknowledgeUserDataCollection" call.
  3716  // Any non-2xx status code is an error. Response headers are in either
  3717  // *GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionResponse.ServerRespon
  3718  // se.Header or (if a response was returned at all) in
  3719  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3720  // whether the returned error was because http.StatusNotModified was returned.
  3721  func (c *PropertiesAcknowledgeUserDataCollectionCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionResponse, error) {
  3722  	gensupport.SetOptions(c.urlParams_, opts...)
  3723  	res, err := c.doRequest("json")
  3724  	if res != nil && res.StatusCode == http.StatusNotModified {
  3725  		if res.Body != nil {
  3726  			res.Body.Close()
  3727  		}
  3728  		return nil, gensupport.WrapError(&googleapi.Error{
  3729  			Code:   res.StatusCode,
  3730  			Header: res.Header,
  3731  		})
  3732  	}
  3733  	if err != nil {
  3734  		return nil, err
  3735  	}
  3736  	defer googleapi.CloseBody(res)
  3737  	if err := googleapi.CheckResponse(res); err != nil {
  3738  		return nil, gensupport.WrapError(err)
  3739  	}
  3740  	ret := &GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionResponse{
  3741  		ServerResponse: googleapi.ServerResponse{
  3742  			Header:         res.Header,
  3743  			HTTPStatusCode: res.StatusCode,
  3744  		},
  3745  	}
  3746  	target := &ret
  3747  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3748  		return nil, err
  3749  	}
  3750  	return ret, nil
  3751  }
  3752  
  3753  type PropertiesCreateCall struct {
  3754  	s                                  *Service
  3755  	googleanalyticsadminv1betaproperty *GoogleAnalyticsAdminV1betaProperty
  3756  	urlParams_                         gensupport.URLParams
  3757  	ctx_                               context.Context
  3758  	header_                            http.Header
  3759  }
  3760  
  3761  // Create: Creates an "GA4" property with the specified location and
  3762  // attributes.
  3763  func (r *PropertiesService) Create(googleanalyticsadminv1betaproperty *GoogleAnalyticsAdminV1betaProperty) *PropertiesCreateCall {
  3764  	c := &PropertiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3765  	c.googleanalyticsadminv1betaproperty = googleanalyticsadminv1betaproperty
  3766  	return c
  3767  }
  3768  
  3769  // Fields allows partial responses to be retrieved. See
  3770  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3771  // details.
  3772  func (c *PropertiesCreateCall) Fields(s ...googleapi.Field) *PropertiesCreateCall {
  3773  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3774  	return c
  3775  }
  3776  
  3777  // Context sets the context to be used in this call's Do method.
  3778  func (c *PropertiesCreateCall) Context(ctx context.Context) *PropertiesCreateCall {
  3779  	c.ctx_ = ctx
  3780  	return c
  3781  }
  3782  
  3783  // Header returns a http.Header that can be modified by the caller to add
  3784  // headers to the request.
  3785  func (c *PropertiesCreateCall) Header() http.Header {
  3786  	if c.header_ == nil {
  3787  		c.header_ = make(http.Header)
  3788  	}
  3789  	return c.header_
  3790  }
  3791  
  3792  func (c *PropertiesCreateCall) doRequest(alt string) (*http.Response, error) {
  3793  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3794  	var body io.Reader = nil
  3795  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaproperty)
  3796  	if err != nil {
  3797  		return nil, err
  3798  	}
  3799  	c.urlParams_.Set("alt", alt)
  3800  	c.urlParams_.Set("prettyPrint", "false")
  3801  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/properties")
  3802  	urls += "?" + c.urlParams_.Encode()
  3803  	req, err := http.NewRequest("POST", urls, body)
  3804  	if err != nil {
  3805  		return nil, err
  3806  	}
  3807  	req.Header = reqHeaders
  3808  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3809  }
  3810  
  3811  // Do executes the "analyticsadmin.properties.create" call.
  3812  // Any non-2xx status code is an error. Response headers are in either
  3813  // *GoogleAnalyticsAdminV1betaProperty.ServerResponse.Header or (if a response
  3814  // was returned at all) in error.(*googleapi.Error).Header. Use
  3815  // googleapi.IsNotModified to check whether the returned error was because
  3816  // http.StatusNotModified was returned.
  3817  func (c *PropertiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaProperty, error) {
  3818  	gensupport.SetOptions(c.urlParams_, opts...)
  3819  	res, err := c.doRequest("json")
  3820  	if res != nil && res.StatusCode == http.StatusNotModified {
  3821  		if res.Body != nil {
  3822  			res.Body.Close()
  3823  		}
  3824  		return nil, gensupport.WrapError(&googleapi.Error{
  3825  			Code:   res.StatusCode,
  3826  			Header: res.Header,
  3827  		})
  3828  	}
  3829  	if err != nil {
  3830  		return nil, err
  3831  	}
  3832  	defer googleapi.CloseBody(res)
  3833  	if err := googleapi.CheckResponse(res); err != nil {
  3834  		return nil, gensupport.WrapError(err)
  3835  	}
  3836  	ret := &GoogleAnalyticsAdminV1betaProperty{
  3837  		ServerResponse: googleapi.ServerResponse{
  3838  			Header:         res.Header,
  3839  			HTTPStatusCode: res.StatusCode,
  3840  		},
  3841  	}
  3842  	target := &ret
  3843  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3844  		return nil, err
  3845  	}
  3846  	return ret, nil
  3847  }
  3848  
  3849  type PropertiesDeleteCall struct {
  3850  	s          *Service
  3851  	name       string
  3852  	urlParams_ gensupport.URLParams
  3853  	ctx_       context.Context
  3854  	header_    http.Header
  3855  }
  3856  
  3857  // Delete: Marks target Property as soft-deleted (ie: "trashed") and returns
  3858  // it. This API does not have a method to restore soft-deleted properties.
  3859  // However, they can be restored using the Trash Can UI. If the properties are
  3860  // not restored before the expiration time, the Property and all child
  3861  // resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently
  3862  // purged. https://support.google.com/analytics/answer/6154772 Returns an error
  3863  // if the target is not found, or is not a GA4 Property.
  3864  //
  3865  //   - name: The name of the Property to soft-delete. Format:
  3866  //     properties/{property_id} Example: "properties/1000".
  3867  func (r *PropertiesService) Delete(name string) *PropertiesDeleteCall {
  3868  	c := &PropertiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3869  	c.name = name
  3870  	return c
  3871  }
  3872  
  3873  // Fields allows partial responses to be retrieved. See
  3874  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3875  // details.
  3876  func (c *PropertiesDeleteCall) Fields(s ...googleapi.Field) *PropertiesDeleteCall {
  3877  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3878  	return c
  3879  }
  3880  
  3881  // Context sets the context to be used in this call's Do method.
  3882  func (c *PropertiesDeleteCall) Context(ctx context.Context) *PropertiesDeleteCall {
  3883  	c.ctx_ = ctx
  3884  	return c
  3885  }
  3886  
  3887  // Header returns a http.Header that can be modified by the caller to add
  3888  // headers to the request.
  3889  func (c *PropertiesDeleteCall) Header() http.Header {
  3890  	if c.header_ == nil {
  3891  		c.header_ = make(http.Header)
  3892  	}
  3893  	return c.header_
  3894  }
  3895  
  3896  func (c *PropertiesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3897  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3898  	var body io.Reader = nil
  3899  	c.urlParams_.Set("alt", alt)
  3900  	c.urlParams_.Set("prettyPrint", "false")
  3901  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3902  	urls += "?" + c.urlParams_.Encode()
  3903  	req, err := http.NewRequest("DELETE", urls, body)
  3904  	if err != nil {
  3905  		return nil, err
  3906  	}
  3907  	req.Header = reqHeaders
  3908  	googleapi.Expand(req.URL, map[string]string{
  3909  		"name": c.name,
  3910  	})
  3911  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3912  }
  3913  
  3914  // Do executes the "analyticsadmin.properties.delete" call.
  3915  // Any non-2xx status code is an error. Response headers are in either
  3916  // *GoogleAnalyticsAdminV1betaProperty.ServerResponse.Header or (if a response
  3917  // was returned at all) in error.(*googleapi.Error).Header. Use
  3918  // googleapi.IsNotModified to check whether the returned error was because
  3919  // http.StatusNotModified was returned.
  3920  func (c *PropertiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaProperty, error) {
  3921  	gensupport.SetOptions(c.urlParams_, opts...)
  3922  	res, err := c.doRequest("json")
  3923  	if res != nil && res.StatusCode == http.StatusNotModified {
  3924  		if res.Body != nil {
  3925  			res.Body.Close()
  3926  		}
  3927  		return nil, gensupport.WrapError(&googleapi.Error{
  3928  			Code:   res.StatusCode,
  3929  			Header: res.Header,
  3930  		})
  3931  	}
  3932  	if err != nil {
  3933  		return nil, err
  3934  	}
  3935  	defer googleapi.CloseBody(res)
  3936  	if err := googleapi.CheckResponse(res); err != nil {
  3937  		return nil, gensupport.WrapError(err)
  3938  	}
  3939  	ret := &GoogleAnalyticsAdminV1betaProperty{
  3940  		ServerResponse: googleapi.ServerResponse{
  3941  			Header:         res.Header,
  3942  			HTTPStatusCode: res.StatusCode,
  3943  		},
  3944  	}
  3945  	target := &ret
  3946  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3947  		return nil, err
  3948  	}
  3949  	return ret, nil
  3950  }
  3951  
  3952  type PropertiesGetCall struct {
  3953  	s            *Service
  3954  	name         string
  3955  	urlParams_   gensupport.URLParams
  3956  	ifNoneMatch_ string
  3957  	ctx_         context.Context
  3958  	header_      http.Header
  3959  }
  3960  
  3961  // Get: Lookup for a single "GA4" Property.
  3962  //
  3963  //   - name: The name of the property to lookup. Format: properties/{property_id}
  3964  //     Example: "properties/1000".
  3965  func (r *PropertiesService) Get(name string) *PropertiesGetCall {
  3966  	c := &PropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3967  	c.name = name
  3968  	return c
  3969  }
  3970  
  3971  // Fields allows partial responses to be retrieved. See
  3972  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3973  // details.
  3974  func (c *PropertiesGetCall) Fields(s ...googleapi.Field) *PropertiesGetCall {
  3975  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3976  	return c
  3977  }
  3978  
  3979  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3980  // object's ETag matches the given value. This is useful for getting updates
  3981  // only after the object has changed since the last request.
  3982  func (c *PropertiesGetCall) IfNoneMatch(entityTag string) *PropertiesGetCall {
  3983  	c.ifNoneMatch_ = entityTag
  3984  	return c
  3985  }
  3986  
  3987  // Context sets the context to be used in this call's Do method.
  3988  func (c *PropertiesGetCall) Context(ctx context.Context) *PropertiesGetCall {
  3989  	c.ctx_ = ctx
  3990  	return c
  3991  }
  3992  
  3993  // Header returns a http.Header that can be modified by the caller to add
  3994  // headers to the request.
  3995  func (c *PropertiesGetCall) Header() http.Header {
  3996  	if c.header_ == nil {
  3997  		c.header_ = make(http.Header)
  3998  	}
  3999  	return c.header_
  4000  }
  4001  
  4002  func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) {
  4003  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4004  	if c.ifNoneMatch_ != "" {
  4005  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4006  	}
  4007  	var body io.Reader = nil
  4008  	c.urlParams_.Set("alt", alt)
  4009  	c.urlParams_.Set("prettyPrint", "false")
  4010  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4011  	urls += "?" + c.urlParams_.Encode()
  4012  	req, err := http.NewRequest("GET", urls, body)
  4013  	if err != nil {
  4014  		return nil, err
  4015  	}
  4016  	req.Header = reqHeaders
  4017  	googleapi.Expand(req.URL, map[string]string{
  4018  		"name": c.name,
  4019  	})
  4020  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4021  }
  4022  
  4023  // Do executes the "analyticsadmin.properties.get" call.
  4024  // Any non-2xx status code is an error. Response headers are in either
  4025  // *GoogleAnalyticsAdminV1betaProperty.ServerResponse.Header or (if a response
  4026  // was returned at all) in error.(*googleapi.Error).Header. Use
  4027  // googleapi.IsNotModified to check whether the returned error was because
  4028  // http.StatusNotModified was returned.
  4029  func (c *PropertiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaProperty, error) {
  4030  	gensupport.SetOptions(c.urlParams_, opts...)
  4031  	res, err := c.doRequest("json")
  4032  	if res != nil && res.StatusCode == http.StatusNotModified {
  4033  		if res.Body != nil {
  4034  			res.Body.Close()
  4035  		}
  4036  		return nil, gensupport.WrapError(&googleapi.Error{
  4037  			Code:   res.StatusCode,
  4038  			Header: res.Header,
  4039  		})
  4040  	}
  4041  	if err != nil {
  4042  		return nil, err
  4043  	}
  4044  	defer googleapi.CloseBody(res)
  4045  	if err := googleapi.CheckResponse(res); err != nil {
  4046  		return nil, gensupport.WrapError(err)
  4047  	}
  4048  	ret := &GoogleAnalyticsAdminV1betaProperty{
  4049  		ServerResponse: googleapi.ServerResponse{
  4050  			Header:         res.Header,
  4051  			HTTPStatusCode: res.StatusCode,
  4052  		},
  4053  	}
  4054  	target := &ret
  4055  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4056  		return nil, err
  4057  	}
  4058  	return ret, nil
  4059  }
  4060  
  4061  type PropertiesGetDataRetentionSettingsCall struct {
  4062  	s            *Service
  4063  	name         string
  4064  	urlParams_   gensupport.URLParams
  4065  	ifNoneMatch_ string
  4066  	ctx_         context.Context
  4067  	header_      http.Header
  4068  }
  4069  
  4070  // GetDataRetentionSettings: Returns the singleton data retention settings for
  4071  // this property.
  4072  //
  4073  //   - name: The name of the settings to lookup. Format:
  4074  //     properties/{property}/dataRetentionSettings Example:
  4075  //     "properties/1000/dataRetentionSettings".
  4076  func (r *PropertiesService) GetDataRetentionSettings(name string) *PropertiesGetDataRetentionSettingsCall {
  4077  	c := &PropertiesGetDataRetentionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4078  	c.name = name
  4079  	return c
  4080  }
  4081  
  4082  // Fields allows partial responses to be retrieved. See
  4083  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4084  // details.
  4085  func (c *PropertiesGetDataRetentionSettingsCall) Fields(s ...googleapi.Field) *PropertiesGetDataRetentionSettingsCall {
  4086  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4087  	return c
  4088  }
  4089  
  4090  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4091  // object's ETag matches the given value. This is useful for getting updates
  4092  // only after the object has changed since the last request.
  4093  func (c *PropertiesGetDataRetentionSettingsCall) IfNoneMatch(entityTag string) *PropertiesGetDataRetentionSettingsCall {
  4094  	c.ifNoneMatch_ = entityTag
  4095  	return c
  4096  }
  4097  
  4098  // Context sets the context to be used in this call's Do method.
  4099  func (c *PropertiesGetDataRetentionSettingsCall) Context(ctx context.Context) *PropertiesGetDataRetentionSettingsCall {
  4100  	c.ctx_ = ctx
  4101  	return c
  4102  }
  4103  
  4104  // Header returns a http.Header that can be modified by the caller to add
  4105  // headers to the request.
  4106  func (c *PropertiesGetDataRetentionSettingsCall) Header() http.Header {
  4107  	if c.header_ == nil {
  4108  		c.header_ = make(http.Header)
  4109  	}
  4110  	return c.header_
  4111  }
  4112  
  4113  func (c *PropertiesGetDataRetentionSettingsCall) doRequest(alt string) (*http.Response, error) {
  4114  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4115  	if c.ifNoneMatch_ != "" {
  4116  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4117  	}
  4118  	var body io.Reader = nil
  4119  	c.urlParams_.Set("alt", alt)
  4120  	c.urlParams_.Set("prettyPrint", "false")
  4121  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4122  	urls += "?" + c.urlParams_.Encode()
  4123  	req, err := http.NewRequest("GET", urls, body)
  4124  	if err != nil {
  4125  		return nil, err
  4126  	}
  4127  	req.Header = reqHeaders
  4128  	googleapi.Expand(req.URL, map[string]string{
  4129  		"name": c.name,
  4130  	})
  4131  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4132  }
  4133  
  4134  // Do executes the "analyticsadmin.properties.getDataRetentionSettings" call.
  4135  // Any non-2xx status code is an error. Response headers are in either
  4136  // *GoogleAnalyticsAdminV1betaDataRetentionSettings.ServerResponse.Header or
  4137  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  4138  // googleapi.IsNotModified to check whether the returned error was because
  4139  // http.StatusNotModified was returned.
  4140  func (c *PropertiesGetDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaDataRetentionSettings, error) {
  4141  	gensupport.SetOptions(c.urlParams_, opts...)
  4142  	res, err := c.doRequest("json")
  4143  	if res != nil && res.StatusCode == http.StatusNotModified {
  4144  		if res.Body != nil {
  4145  			res.Body.Close()
  4146  		}
  4147  		return nil, gensupport.WrapError(&googleapi.Error{
  4148  			Code:   res.StatusCode,
  4149  			Header: res.Header,
  4150  		})
  4151  	}
  4152  	if err != nil {
  4153  		return nil, err
  4154  	}
  4155  	defer googleapi.CloseBody(res)
  4156  	if err := googleapi.CheckResponse(res); err != nil {
  4157  		return nil, gensupport.WrapError(err)
  4158  	}
  4159  	ret := &GoogleAnalyticsAdminV1betaDataRetentionSettings{
  4160  		ServerResponse: googleapi.ServerResponse{
  4161  			Header:         res.Header,
  4162  			HTTPStatusCode: res.StatusCode,
  4163  		},
  4164  	}
  4165  	target := &ret
  4166  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4167  		return nil, err
  4168  	}
  4169  	return ret, nil
  4170  }
  4171  
  4172  type PropertiesListCall struct {
  4173  	s            *Service
  4174  	urlParams_   gensupport.URLParams
  4175  	ifNoneMatch_ string
  4176  	ctx_         context.Context
  4177  	header_      http.Header
  4178  }
  4179  
  4180  // List: Returns child Properties under the specified parent Account. Only
  4181  // "GA4" properties will be returned. Properties will be excluded if the caller
  4182  // does not have access. Soft-deleted (ie: "trashed") properties are excluded
  4183  // by default. Returns an empty list if no relevant properties are found.
  4184  func (r *PropertiesService) List() *PropertiesListCall {
  4185  	c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4186  	return c
  4187  }
  4188  
  4189  // Filter sets the optional parameter "filter": Required. An expression for
  4190  // filtering the results of the request. Fields eligible for filtering are:
  4191  // `parent:`(The resource name of the parent account/property) or
  4192  // `ancestor:`(The resource name of the parent account) or
  4193  // `firebase_project:`(The id or number of the linked firebase project). Some
  4194  // examples of filters: ``` | Filter | Description |
  4195  // |-----------------------------|-------------------------------------------|
  4196  // | parent:accounts/123 | The account with account id: 123. | |
  4197  // parent:properties/123 | The property with property id: 123. | |
  4198  // ancestor:accounts/123 | The account with account id: 123. | |
  4199  // firebase_project:project-id | The firebase project with id: project-id. | |
  4200  // firebase_project:123 | The firebase project with number: 123. | ```
  4201  func (c *PropertiesListCall) Filter(filter string) *PropertiesListCall {
  4202  	c.urlParams_.Set("filter", filter)
  4203  	return c
  4204  }
  4205  
  4206  // PageSize sets the optional parameter "pageSize": The maximum number of
  4207  // resources to return. The service may return fewer than this value, even if
  4208  // there are additional pages. If unspecified, at most 50 resources will be
  4209  // returned. The maximum value is 200; (higher values will be coerced to the
  4210  // maximum)
  4211  func (c *PropertiesListCall) PageSize(pageSize int64) *PropertiesListCall {
  4212  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4213  	return c
  4214  }
  4215  
  4216  // PageToken sets the optional parameter "pageToken": A page token, received
  4217  // from a previous `ListProperties` call. Provide this to retrieve the
  4218  // subsequent page. When paginating, all other parameters provided to
  4219  // `ListProperties` must match the call that provided the page token.
  4220  func (c *PropertiesListCall) PageToken(pageToken string) *PropertiesListCall {
  4221  	c.urlParams_.Set("pageToken", pageToken)
  4222  	return c
  4223  }
  4224  
  4225  // ShowDeleted sets the optional parameter "showDeleted": Whether to include
  4226  // soft-deleted (ie: "trashed") Properties in the results. Properties can be
  4227  // inspected to determine whether they are deleted or not.
  4228  func (c *PropertiesListCall) ShowDeleted(showDeleted bool) *PropertiesListCall {
  4229  	c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
  4230  	return c
  4231  }
  4232  
  4233  // Fields allows partial responses to be retrieved. See
  4234  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4235  // details.
  4236  func (c *PropertiesListCall) Fields(s ...googleapi.Field) *PropertiesListCall {
  4237  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4238  	return c
  4239  }
  4240  
  4241  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4242  // object's ETag matches the given value. This is useful for getting updates
  4243  // only after the object has changed since the last request.
  4244  func (c *PropertiesListCall) IfNoneMatch(entityTag string) *PropertiesListCall {
  4245  	c.ifNoneMatch_ = entityTag
  4246  	return c
  4247  }
  4248  
  4249  // Context sets the context to be used in this call's Do method.
  4250  func (c *PropertiesListCall) Context(ctx context.Context) *PropertiesListCall {
  4251  	c.ctx_ = ctx
  4252  	return c
  4253  }
  4254  
  4255  // Header returns a http.Header that can be modified by the caller to add
  4256  // headers to the request.
  4257  func (c *PropertiesListCall) Header() http.Header {
  4258  	if c.header_ == nil {
  4259  		c.header_ = make(http.Header)
  4260  	}
  4261  	return c.header_
  4262  }
  4263  
  4264  func (c *PropertiesListCall) doRequest(alt string) (*http.Response, error) {
  4265  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4266  	if c.ifNoneMatch_ != "" {
  4267  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4268  	}
  4269  	var body io.Reader = nil
  4270  	c.urlParams_.Set("alt", alt)
  4271  	c.urlParams_.Set("prettyPrint", "false")
  4272  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/properties")
  4273  	urls += "?" + c.urlParams_.Encode()
  4274  	req, err := http.NewRequest("GET", urls, body)
  4275  	if err != nil {
  4276  		return nil, err
  4277  	}
  4278  	req.Header = reqHeaders
  4279  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4280  }
  4281  
  4282  // Do executes the "analyticsadmin.properties.list" call.
  4283  // Any non-2xx status code is an error. Response headers are in either
  4284  // *GoogleAnalyticsAdminV1betaListPropertiesResponse.ServerResponse.Header or
  4285  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  4286  // googleapi.IsNotModified to check whether the returned error was because
  4287  // http.StatusNotModified was returned.
  4288  func (c *PropertiesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListPropertiesResponse, error) {
  4289  	gensupport.SetOptions(c.urlParams_, opts...)
  4290  	res, err := c.doRequest("json")
  4291  	if res != nil && res.StatusCode == http.StatusNotModified {
  4292  		if res.Body != nil {
  4293  			res.Body.Close()
  4294  		}
  4295  		return nil, gensupport.WrapError(&googleapi.Error{
  4296  			Code:   res.StatusCode,
  4297  			Header: res.Header,
  4298  		})
  4299  	}
  4300  	if err != nil {
  4301  		return nil, err
  4302  	}
  4303  	defer googleapi.CloseBody(res)
  4304  	if err := googleapi.CheckResponse(res); err != nil {
  4305  		return nil, gensupport.WrapError(err)
  4306  	}
  4307  	ret := &GoogleAnalyticsAdminV1betaListPropertiesResponse{
  4308  		ServerResponse: googleapi.ServerResponse{
  4309  			Header:         res.Header,
  4310  			HTTPStatusCode: res.StatusCode,
  4311  		},
  4312  	}
  4313  	target := &ret
  4314  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4315  		return nil, err
  4316  	}
  4317  	return ret, nil
  4318  }
  4319  
  4320  // Pages invokes f for each page of results.
  4321  // A non-nil error returned from f will halt the iteration.
  4322  // The provided context supersedes any context provided to the Context method.
  4323  func (c *PropertiesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListPropertiesResponse) error) error {
  4324  	c.ctx_ = ctx
  4325  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4326  	for {
  4327  		x, err := c.Do()
  4328  		if err != nil {
  4329  			return err
  4330  		}
  4331  		if err := f(x); err != nil {
  4332  			return err
  4333  		}
  4334  		if x.NextPageToken == "" {
  4335  			return nil
  4336  		}
  4337  		c.PageToken(x.NextPageToken)
  4338  	}
  4339  }
  4340  
  4341  type PropertiesPatchCall struct {
  4342  	s                                  *Service
  4343  	name                               string
  4344  	googleanalyticsadminv1betaproperty *GoogleAnalyticsAdminV1betaProperty
  4345  	urlParams_                         gensupport.URLParams
  4346  	ctx_                               context.Context
  4347  	header_                            http.Header
  4348  }
  4349  
  4350  // Patch: Updates a property.
  4351  //
  4352  //   - name: Output only. Resource name of this property. Format:
  4353  //     properties/{property_id} Example: "properties/1000".
  4354  func (r *PropertiesService) Patch(name string, googleanalyticsadminv1betaproperty *GoogleAnalyticsAdminV1betaProperty) *PropertiesPatchCall {
  4355  	c := &PropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4356  	c.name = name
  4357  	c.googleanalyticsadminv1betaproperty = googleanalyticsadminv1betaproperty
  4358  	return c
  4359  }
  4360  
  4361  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  4362  // fields to be updated. Field names must be in snake case (e.g.,
  4363  // "field_to_update"). Omitted fields will not be updated. To replace the
  4364  // entire entity, use one path with the string "*" to match all fields.
  4365  func (c *PropertiesPatchCall) UpdateMask(updateMask string) *PropertiesPatchCall {
  4366  	c.urlParams_.Set("updateMask", updateMask)
  4367  	return c
  4368  }
  4369  
  4370  // Fields allows partial responses to be retrieved. See
  4371  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4372  // details.
  4373  func (c *PropertiesPatchCall) Fields(s ...googleapi.Field) *PropertiesPatchCall {
  4374  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4375  	return c
  4376  }
  4377  
  4378  // Context sets the context to be used in this call's Do method.
  4379  func (c *PropertiesPatchCall) Context(ctx context.Context) *PropertiesPatchCall {
  4380  	c.ctx_ = ctx
  4381  	return c
  4382  }
  4383  
  4384  // Header returns a http.Header that can be modified by the caller to add
  4385  // headers to the request.
  4386  func (c *PropertiesPatchCall) Header() http.Header {
  4387  	if c.header_ == nil {
  4388  		c.header_ = make(http.Header)
  4389  	}
  4390  	return c.header_
  4391  }
  4392  
  4393  func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
  4394  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4395  	var body io.Reader = nil
  4396  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaproperty)
  4397  	if err != nil {
  4398  		return nil, err
  4399  	}
  4400  	c.urlParams_.Set("alt", alt)
  4401  	c.urlParams_.Set("prettyPrint", "false")
  4402  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4403  	urls += "?" + c.urlParams_.Encode()
  4404  	req, err := http.NewRequest("PATCH", urls, body)
  4405  	if err != nil {
  4406  		return nil, err
  4407  	}
  4408  	req.Header = reqHeaders
  4409  	googleapi.Expand(req.URL, map[string]string{
  4410  		"name": c.name,
  4411  	})
  4412  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4413  }
  4414  
  4415  // Do executes the "analyticsadmin.properties.patch" call.
  4416  // Any non-2xx status code is an error. Response headers are in either
  4417  // *GoogleAnalyticsAdminV1betaProperty.ServerResponse.Header or (if a response
  4418  // was returned at all) in error.(*googleapi.Error).Header. Use
  4419  // googleapi.IsNotModified to check whether the returned error was because
  4420  // http.StatusNotModified was returned.
  4421  func (c *PropertiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaProperty, error) {
  4422  	gensupport.SetOptions(c.urlParams_, opts...)
  4423  	res, err := c.doRequest("json")
  4424  	if res != nil && res.StatusCode == http.StatusNotModified {
  4425  		if res.Body != nil {
  4426  			res.Body.Close()
  4427  		}
  4428  		return nil, gensupport.WrapError(&googleapi.Error{
  4429  			Code:   res.StatusCode,
  4430  			Header: res.Header,
  4431  		})
  4432  	}
  4433  	if err != nil {
  4434  		return nil, err
  4435  	}
  4436  	defer googleapi.CloseBody(res)
  4437  	if err := googleapi.CheckResponse(res); err != nil {
  4438  		return nil, gensupport.WrapError(err)
  4439  	}
  4440  	ret := &GoogleAnalyticsAdminV1betaProperty{
  4441  		ServerResponse: googleapi.ServerResponse{
  4442  			Header:         res.Header,
  4443  			HTTPStatusCode: res.StatusCode,
  4444  		},
  4445  	}
  4446  	target := &ret
  4447  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4448  		return nil, err
  4449  	}
  4450  	return ret, nil
  4451  }
  4452  
  4453  type PropertiesRunAccessReportCall struct {
  4454  	s                                                *Service
  4455  	entity                                           string
  4456  	googleanalyticsadminv1betarunaccessreportrequest *GoogleAnalyticsAdminV1betaRunAccessReportRequest
  4457  	urlParams_                                       gensupport.URLParams
  4458  	ctx_                                             context.Context
  4459  	header_                                          http.Header
  4460  }
  4461  
  4462  // RunAccessReport: Returns a customized report of data access records. The
  4463  // report provides records of each time a user reads Google Analytics reporting
  4464  // data. Access records are retained for up to 2 years. Data Access Reports can
  4465  // be requested for a property. Reports may be requested for any property, but
  4466  // dimensions that aren't related to quota can only be requested on Google
  4467  // Analytics 360 properties. This method is only available to Administrators.
  4468  // These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4
  4469  // Data API, and other products like Firebase & Admob that can retrieve data
  4470  // from Google Analytics through a linkage. These records don't include
  4471  // property configuration changes like adding a stream or changing a property's
  4472  // time zone. For configuration change history, see searchChangeHistoryEvents
  4473  // (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).
  4474  //
  4475  //   - entity: The Data Access Report supports requesting at the property level
  4476  //     or account level. If requested at the account level, Data Access Reports
  4477  //     include all access for all properties under that account. To request at
  4478  //     the property level, entity should be for example 'properties/123' if "123"
  4479  //     is your GA4 property ID. To request at the account level, entity should be
  4480  //     for example 'accounts/1234' if "1234" is your GA4 Account ID.
  4481  func (r *PropertiesService) RunAccessReport(entity string, googleanalyticsadminv1betarunaccessreportrequest *GoogleAnalyticsAdminV1betaRunAccessReportRequest) *PropertiesRunAccessReportCall {
  4482  	c := &PropertiesRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4483  	c.entity = entity
  4484  	c.googleanalyticsadminv1betarunaccessreportrequest = googleanalyticsadminv1betarunaccessreportrequest
  4485  	return c
  4486  }
  4487  
  4488  // Fields allows partial responses to be retrieved. See
  4489  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4490  // details.
  4491  func (c *PropertiesRunAccessReportCall) Fields(s ...googleapi.Field) *PropertiesRunAccessReportCall {
  4492  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4493  	return c
  4494  }
  4495  
  4496  // Context sets the context to be used in this call's Do method.
  4497  func (c *PropertiesRunAccessReportCall) Context(ctx context.Context) *PropertiesRunAccessReportCall {
  4498  	c.ctx_ = ctx
  4499  	return c
  4500  }
  4501  
  4502  // Header returns a http.Header that can be modified by the caller to add
  4503  // headers to the request.
  4504  func (c *PropertiesRunAccessReportCall) Header() http.Header {
  4505  	if c.header_ == nil {
  4506  		c.header_ = make(http.Header)
  4507  	}
  4508  	return c.header_
  4509  }
  4510  
  4511  func (c *PropertiesRunAccessReportCall) doRequest(alt string) (*http.Response, error) {
  4512  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4513  	var body io.Reader = nil
  4514  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betarunaccessreportrequest)
  4515  	if err != nil {
  4516  		return nil, err
  4517  	}
  4518  	c.urlParams_.Set("alt", alt)
  4519  	c.urlParams_.Set("prettyPrint", "false")
  4520  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+entity}:runAccessReport")
  4521  	urls += "?" + c.urlParams_.Encode()
  4522  	req, err := http.NewRequest("POST", urls, body)
  4523  	if err != nil {
  4524  		return nil, err
  4525  	}
  4526  	req.Header = reqHeaders
  4527  	googleapi.Expand(req.URL, map[string]string{
  4528  		"entity": c.entity,
  4529  	})
  4530  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4531  }
  4532  
  4533  // Do executes the "analyticsadmin.properties.runAccessReport" call.
  4534  // Any non-2xx status code is an error. Response headers are in either
  4535  // *GoogleAnalyticsAdminV1betaRunAccessReportResponse.ServerResponse.Header or
  4536  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  4537  // googleapi.IsNotModified to check whether the returned error was because
  4538  // http.StatusNotModified was returned.
  4539  func (c *PropertiesRunAccessReportCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaRunAccessReportResponse, error) {
  4540  	gensupport.SetOptions(c.urlParams_, opts...)
  4541  	res, err := c.doRequest("json")
  4542  	if res != nil && res.StatusCode == http.StatusNotModified {
  4543  		if res.Body != nil {
  4544  			res.Body.Close()
  4545  		}
  4546  		return nil, gensupport.WrapError(&googleapi.Error{
  4547  			Code:   res.StatusCode,
  4548  			Header: res.Header,
  4549  		})
  4550  	}
  4551  	if err != nil {
  4552  		return nil, err
  4553  	}
  4554  	defer googleapi.CloseBody(res)
  4555  	if err := googleapi.CheckResponse(res); err != nil {
  4556  		return nil, gensupport.WrapError(err)
  4557  	}
  4558  	ret := &GoogleAnalyticsAdminV1betaRunAccessReportResponse{
  4559  		ServerResponse: googleapi.ServerResponse{
  4560  			Header:         res.Header,
  4561  			HTTPStatusCode: res.StatusCode,
  4562  		},
  4563  	}
  4564  	target := &ret
  4565  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4566  		return nil, err
  4567  	}
  4568  	return ret, nil
  4569  }
  4570  
  4571  type PropertiesUpdateDataRetentionSettingsCall struct {
  4572  	s                                               *Service
  4573  	name                                            string
  4574  	googleanalyticsadminv1betadataretentionsettings *GoogleAnalyticsAdminV1betaDataRetentionSettings
  4575  	urlParams_                                      gensupport.URLParams
  4576  	ctx_                                            context.Context
  4577  	header_                                         http.Header
  4578  }
  4579  
  4580  // UpdateDataRetentionSettings: Updates the singleton data retention settings
  4581  // for this property.
  4582  //
  4583  //   - name: Output only. Resource name for this DataRetentionSetting resource.
  4584  //     Format: properties/{property}/dataRetentionSettings.
  4585  func (r *PropertiesService) UpdateDataRetentionSettings(name string, googleanalyticsadminv1betadataretentionsettings *GoogleAnalyticsAdminV1betaDataRetentionSettings) *PropertiesUpdateDataRetentionSettingsCall {
  4586  	c := &PropertiesUpdateDataRetentionSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4587  	c.name = name
  4588  	c.googleanalyticsadminv1betadataretentionsettings = googleanalyticsadminv1betadataretentionsettings
  4589  	return c
  4590  }
  4591  
  4592  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  4593  // fields to be updated. Field names must be in snake case (e.g.,
  4594  // "field_to_update"). Omitted fields will not be updated. To replace the
  4595  // entire entity, use one path with the string "*" to match all fields.
  4596  func (c *PropertiesUpdateDataRetentionSettingsCall) UpdateMask(updateMask string) *PropertiesUpdateDataRetentionSettingsCall {
  4597  	c.urlParams_.Set("updateMask", updateMask)
  4598  	return c
  4599  }
  4600  
  4601  // Fields allows partial responses to be retrieved. See
  4602  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4603  // details.
  4604  func (c *PropertiesUpdateDataRetentionSettingsCall) Fields(s ...googleapi.Field) *PropertiesUpdateDataRetentionSettingsCall {
  4605  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4606  	return c
  4607  }
  4608  
  4609  // Context sets the context to be used in this call's Do method.
  4610  func (c *PropertiesUpdateDataRetentionSettingsCall) Context(ctx context.Context) *PropertiesUpdateDataRetentionSettingsCall {
  4611  	c.ctx_ = ctx
  4612  	return c
  4613  }
  4614  
  4615  // Header returns a http.Header that can be modified by the caller to add
  4616  // headers to the request.
  4617  func (c *PropertiesUpdateDataRetentionSettingsCall) Header() http.Header {
  4618  	if c.header_ == nil {
  4619  		c.header_ = make(http.Header)
  4620  	}
  4621  	return c.header_
  4622  }
  4623  
  4624  func (c *PropertiesUpdateDataRetentionSettingsCall) doRequest(alt string) (*http.Response, error) {
  4625  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4626  	var body io.Reader = nil
  4627  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betadataretentionsettings)
  4628  	if err != nil {
  4629  		return nil, err
  4630  	}
  4631  	c.urlParams_.Set("alt", alt)
  4632  	c.urlParams_.Set("prettyPrint", "false")
  4633  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4634  	urls += "?" + c.urlParams_.Encode()
  4635  	req, err := http.NewRequest("PATCH", urls, body)
  4636  	if err != nil {
  4637  		return nil, err
  4638  	}
  4639  	req.Header = reqHeaders
  4640  	googleapi.Expand(req.URL, map[string]string{
  4641  		"name": c.name,
  4642  	})
  4643  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4644  }
  4645  
  4646  // Do executes the "analyticsadmin.properties.updateDataRetentionSettings" call.
  4647  // Any non-2xx status code is an error. Response headers are in either
  4648  // *GoogleAnalyticsAdminV1betaDataRetentionSettings.ServerResponse.Header or
  4649  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  4650  // googleapi.IsNotModified to check whether the returned error was because
  4651  // http.StatusNotModified was returned.
  4652  func (c *PropertiesUpdateDataRetentionSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaDataRetentionSettings, error) {
  4653  	gensupport.SetOptions(c.urlParams_, opts...)
  4654  	res, err := c.doRequest("json")
  4655  	if res != nil && res.StatusCode == http.StatusNotModified {
  4656  		if res.Body != nil {
  4657  			res.Body.Close()
  4658  		}
  4659  		return nil, gensupport.WrapError(&googleapi.Error{
  4660  			Code:   res.StatusCode,
  4661  			Header: res.Header,
  4662  		})
  4663  	}
  4664  	if err != nil {
  4665  		return nil, err
  4666  	}
  4667  	defer googleapi.CloseBody(res)
  4668  	if err := googleapi.CheckResponse(res); err != nil {
  4669  		return nil, gensupport.WrapError(err)
  4670  	}
  4671  	ret := &GoogleAnalyticsAdminV1betaDataRetentionSettings{
  4672  		ServerResponse: googleapi.ServerResponse{
  4673  			Header:         res.Header,
  4674  			HTTPStatusCode: res.StatusCode,
  4675  		},
  4676  	}
  4677  	target := &ret
  4678  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4679  		return nil, err
  4680  	}
  4681  	return ret, nil
  4682  }
  4683  
  4684  type PropertiesConversionEventsCreateCall struct {
  4685  	s                                         *Service
  4686  	parent                                    string
  4687  	googleanalyticsadminv1betaconversionevent *GoogleAnalyticsAdminV1betaConversionEvent
  4688  	urlParams_                                gensupport.URLParams
  4689  	ctx_                                      context.Context
  4690  	header_                                   http.Header
  4691  }
  4692  
  4693  // Create: Creates a conversion event with the specified attributes.
  4694  //
  4695  //   - parent: The resource name of the parent property where this conversion
  4696  //     event will be created. Format: properties/123.
  4697  func (r *PropertiesConversionEventsService) Create(parent string, googleanalyticsadminv1betaconversionevent *GoogleAnalyticsAdminV1betaConversionEvent) *PropertiesConversionEventsCreateCall {
  4698  	c := &PropertiesConversionEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4699  	c.parent = parent
  4700  	c.googleanalyticsadminv1betaconversionevent = googleanalyticsadminv1betaconversionevent
  4701  	return c
  4702  }
  4703  
  4704  // Fields allows partial responses to be retrieved. See
  4705  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4706  // details.
  4707  func (c *PropertiesConversionEventsCreateCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsCreateCall {
  4708  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4709  	return c
  4710  }
  4711  
  4712  // Context sets the context to be used in this call's Do method.
  4713  func (c *PropertiesConversionEventsCreateCall) Context(ctx context.Context) *PropertiesConversionEventsCreateCall {
  4714  	c.ctx_ = ctx
  4715  	return c
  4716  }
  4717  
  4718  // Header returns a http.Header that can be modified by the caller to add
  4719  // headers to the request.
  4720  func (c *PropertiesConversionEventsCreateCall) Header() http.Header {
  4721  	if c.header_ == nil {
  4722  		c.header_ = make(http.Header)
  4723  	}
  4724  	return c.header_
  4725  }
  4726  
  4727  func (c *PropertiesConversionEventsCreateCall) doRequest(alt string) (*http.Response, error) {
  4728  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4729  	var body io.Reader = nil
  4730  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaconversionevent)
  4731  	if err != nil {
  4732  		return nil, err
  4733  	}
  4734  	c.urlParams_.Set("alt", alt)
  4735  	c.urlParams_.Set("prettyPrint", "false")
  4736  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversionEvents")
  4737  	urls += "?" + c.urlParams_.Encode()
  4738  	req, err := http.NewRequest("POST", urls, body)
  4739  	if err != nil {
  4740  		return nil, err
  4741  	}
  4742  	req.Header = reqHeaders
  4743  	googleapi.Expand(req.URL, map[string]string{
  4744  		"parent": c.parent,
  4745  	})
  4746  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4747  }
  4748  
  4749  // Do executes the "analyticsadmin.properties.conversionEvents.create" call.
  4750  // Any non-2xx status code is an error. Response headers are in either
  4751  // *GoogleAnalyticsAdminV1betaConversionEvent.ServerResponse.Header or (if a
  4752  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4753  // googleapi.IsNotModified to check whether the returned error was because
  4754  // http.StatusNotModified was returned.
  4755  func (c *PropertiesConversionEventsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaConversionEvent, error) {
  4756  	gensupport.SetOptions(c.urlParams_, opts...)
  4757  	res, err := c.doRequest("json")
  4758  	if res != nil && res.StatusCode == http.StatusNotModified {
  4759  		if res.Body != nil {
  4760  			res.Body.Close()
  4761  		}
  4762  		return nil, gensupport.WrapError(&googleapi.Error{
  4763  			Code:   res.StatusCode,
  4764  			Header: res.Header,
  4765  		})
  4766  	}
  4767  	if err != nil {
  4768  		return nil, err
  4769  	}
  4770  	defer googleapi.CloseBody(res)
  4771  	if err := googleapi.CheckResponse(res); err != nil {
  4772  		return nil, gensupport.WrapError(err)
  4773  	}
  4774  	ret := &GoogleAnalyticsAdminV1betaConversionEvent{
  4775  		ServerResponse: googleapi.ServerResponse{
  4776  			Header:         res.Header,
  4777  			HTTPStatusCode: res.StatusCode,
  4778  		},
  4779  	}
  4780  	target := &ret
  4781  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4782  		return nil, err
  4783  	}
  4784  	return ret, nil
  4785  }
  4786  
  4787  type PropertiesConversionEventsDeleteCall struct {
  4788  	s          *Service
  4789  	name       string
  4790  	urlParams_ gensupport.URLParams
  4791  	ctx_       context.Context
  4792  	header_    http.Header
  4793  }
  4794  
  4795  // Delete: Deletes a conversion event in a property.
  4796  //
  4797  //   - name: The resource name of the conversion event to delete. Format:
  4798  //     properties/{property}/conversionEvents/{conversion_event} Example:
  4799  //     "properties/123/conversionEvents/456".
  4800  func (r *PropertiesConversionEventsService) Delete(name string) *PropertiesConversionEventsDeleteCall {
  4801  	c := &PropertiesConversionEventsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4802  	c.name = name
  4803  	return c
  4804  }
  4805  
  4806  // Fields allows partial responses to be retrieved. See
  4807  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4808  // details.
  4809  func (c *PropertiesConversionEventsDeleteCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsDeleteCall {
  4810  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4811  	return c
  4812  }
  4813  
  4814  // Context sets the context to be used in this call's Do method.
  4815  func (c *PropertiesConversionEventsDeleteCall) Context(ctx context.Context) *PropertiesConversionEventsDeleteCall {
  4816  	c.ctx_ = ctx
  4817  	return c
  4818  }
  4819  
  4820  // Header returns a http.Header that can be modified by the caller to add
  4821  // headers to the request.
  4822  func (c *PropertiesConversionEventsDeleteCall) Header() http.Header {
  4823  	if c.header_ == nil {
  4824  		c.header_ = make(http.Header)
  4825  	}
  4826  	return c.header_
  4827  }
  4828  
  4829  func (c *PropertiesConversionEventsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4830  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4831  	var body io.Reader = nil
  4832  	c.urlParams_.Set("alt", alt)
  4833  	c.urlParams_.Set("prettyPrint", "false")
  4834  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4835  	urls += "?" + c.urlParams_.Encode()
  4836  	req, err := http.NewRequest("DELETE", urls, body)
  4837  	if err != nil {
  4838  		return nil, err
  4839  	}
  4840  	req.Header = reqHeaders
  4841  	googleapi.Expand(req.URL, map[string]string{
  4842  		"name": c.name,
  4843  	})
  4844  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4845  }
  4846  
  4847  // Do executes the "analyticsadmin.properties.conversionEvents.delete" call.
  4848  // Any non-2xx status code is an error. Response headers are in either
  4849  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  4850  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4851  // check whether the returned error was because http.StatusNotModified was
  4852  // returned.
  4853  func (c *PropertiesConversionEventsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  4854  	gensupport.SetOptions(c.urlParams_, opts...)
  4855  	res, err := c.doRequest("json")
  4856  	if res != nil && res.StatusCode == http.StatusNotModified {
  4857  		if res.Body != nil {
  4858  			res.Body.Close()
  4859  		}
  4860  		return nil, gensupport.WrapError(&googleapi.Error{
  4861  			Code:   res.StatusCode,
  4862  			Header: res.Header,
  4863  		})
  4864  	}
  4865  	if err != nil {
  4866  		return nil, err
  4867  	}
  4868  	defer googleapi.CloseBody(res)
  4869  	if err := googleapi.CheckResponse(res); err != nil {
  4870  		return nil, gensupport.WrapError(err)
  4871  	}
  4872  	ret := &GoogleProtobufEmpty{
  4873  		ServerResponse: googleapi.ServerResponse{
  4874  			Header:         res.Header,
  4875  			HTTPStatusCode: res.StatusCode,
  4876  		},
  4877  	}
  4878  	target := &ret
  4879  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4880  		return nil, err
  4881  	}
  4882  	return ret, nil
  4883  }
  4884  
  4885  type PropertiesConversionEventsGetCall struct {
  4886  	s            *Service
  4887  	name         string
  4888  	urlParams_   gensupport.URLParams
  4889  	ifNoneMatch_ string
  4890  	ctx_         context.Context
  4891  	header_      http.Header
  4892  }
  4893  
  4894  // Get: Retrieve a single conversion event.
  4895  //
  4896  //   - name: The resource name of the conversion event to retrieve. Format:
  4897  //     properties/{property}/conversionEvents/{conversion_event} Example:
  4898  //     "properties/123/conversionEvents/456".
  4899  func (r *PropertiesConversionEventsService) Get(name string) *PropertiesConversionEventsGetCall {
  4900  	c := &PropertiesConversionEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4901  	c.name = name
  4902  	return c
  4903  }
  4904  
  4905  // Fields allows partial responses to be retrieved. See
  4906  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4907  // details.
  4908  func (c *PropertiesConversionEventsGetCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsGetCall {
  4909  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4910  	return c
  4911  }
  4912  
  4913  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4914  // object's ETag matches the given value. This is useful for getting updates
  4915  // only after the object has changed since the last request.
  4916  func (c *PropertiesConversionEventsGetCall) IfNoneMatch(entityTag string) *PropertiesConversionEventsGetCall {
  4917  	c.ifNoneMatch_ = entityTag
  4918  	return c
  4919  }
  4920  
  4921  // Context sets the context to be used in this call's Do method.
  4922  func (c *PropertiesConversionEventsGetCall) Context(ctx context.Context) *PropertiesConversionEventsGetCall {
  4923  	c.ctx_ = ctx
  4924  	return c
  4925  }
  4926  
  4927  // Header returns a http.Header that can be modified by the caller to add
  4928  // headers to the request.
  4929  func (c *PropertiesConversionEventsGetCall) Header() http.Header {
  4930  	if c.header_ == nil {
  4931  		c.header_ = make(http.Header)
  4932  	}
  4933  	return c.header_
  4934  }
  4935  
  4936  func (c *PropertiesConversionEventsGetCall) doRequest(alt string) (*http.Response, error) {
  4937  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4938  	if c.ifNoneMatch_ != "" {
  4939  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4940  	}
  4941  	var body io.Reader = nil
  4942  	c.urlParams_.Set("alt", alt)
  4943  	c.urlParams_.Set("prettyPrint", "false")
  4944  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4945  	urls += "?" + c.urlParams_.Encode()
  4946  	req, err := http.NewRequest("GET", urls, body)
  4947  	if err != nil {
  4948  		return nil, err
  4949  	}
  4950  	req.Header = reqHeaders
  4951  	googleapi.Expand(req.URL, map[string]string{
  4952  		"name": c.name,
  4953  	})
  4954  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4955  }
  4956  
  4957  // Do executes the "analyticsadmin.properties.conversionEvents.get" call.
  4958  // Any non-2xx status code is an error. Response headers are in either
  4959  // *GoogleAnalyticsAdminV1betaConversionEvent.ServerResponse.Header or (if a
  4960  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4961  // googleapi.IsNotModified to check whether the returned error was because
  4962  // http.StatusNotModified was returned.
  4963  func (c *PropertiesConversionEventsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaConversionEvent, error) {
  4964  	gensupport.SetOptions(c.urlParams_, opts...)
  4965  	res, err := c.doRequest("json")
  4966  	if res != nil && res.StatusCode == http.StatusNotModified {
  4967  		if res.Body != nil {
  4968  			res.Body.Close()
  4969  		}
  4970  		return nil, gensupport.WrapError(&googleapi.Error{
  4971  			Code:   res.StatusCode,
  4972  			Header: res.Header,
  4973  		})
  4974  	}
  4975  	if err != nil {
  4976  		return nil, err
  4977  	}
  4978  	defer googleapi.CloseBody(res)
  4979  	if err := googleapi.CheckResponse(res); err != nil {
  4980  		return nil, gensupport.WrapError(err)
  4981  	}
  4982  	ret := &GoogleAnalyticsAdminV1betaConversionEvent{
  4983  		ServerResponse: googleapi.ServerResponse{
  4984  			Header:         res.Header,
  4985  			HTTPStatusCode: res.StatusCode,
  4986  		},
  4987  	}
  4988  	target := &ret
  4989  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4990  		return nil, err
  4991  	}
  4992  	return ret, nil
  4993  }
  4994  
  4995  type PropertiesConversionEventsListCall struct {
  4996  	s            *Service
  4997  	parent       string
  4998  	urlParams_   gensupport.URLParams
  4999  	ifNoneMatch_ string
  5000  	ctx_         context.Context
  5001  	header_      http.Header
  5002  }
  5003  
  5004  // List: Returns a list of conversion events in the specified parent property.
  5005  // Returns an empty list if no conversion events are found.
  5006  //
  5007  //   - parent: The resource name of the parent property. Example:
  5008  //     'properties/123'.
  5009  func (r *PropertiesConversionEventsService) List(parent string) *PropertiesConversionEventsListCall {
  5010  	c := &PropertiesConversionEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5011  	c.parent = parent
  5012  	return c
  5013  }
  5014  
  5015  // PageSize sets the optional parameter "pageSize": The maximum number of
  5016  // resources to return. If unspecified, at most 50 resources will be returned.
  5017  // The maximum value is 200; (higher values will be coerced to the maximum)
  5018  func (c *PropertiesConversionEventsListCall) PageSize(pageSize int64) *PropertiesConversionEventsListCall {
  5019  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5020  	return c
  5021  }
  5022  
  5023  // PageToken sets the optional parameter "pageToken": A page token, received
  5024  // from a previous `ListConversionEvents` call. Provide this to retrieve the
  5025  // subsequent page. When paginating, all other parameters provided to
  5026  // `ListConversionEvents` must match the call that provided the page token.
  5027  func (c *PropertiesConversionEventsListCall) PageToken(pageToken string) *PropertiesConversionEventsListCall {
  5028  	c.urlParams_.Set("pageToken", pageToken)
  5029  	return c
  5030  }
  5031  
  5032  // Fields allows partial responses to be retrieved. See
  5033  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5034  // details.
  5035  func (c *PropertiesConversionEventsListCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsListCall {
  5036  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5037  	return c
  5038  }
  5039  
  5040  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5041  // object's ETag matches the given value. This is useful for getting updates
  5042  // only after the object has changed since the last request.
  5043  func (c *PropertiesConversionEventsListCall) IfNoneMatch(entityTag string) *PropertiesConversionEventsListCall {
  5044  	c.ifNoneMatch_ = entityTag
  5045  	return c
  5046  }
  5047  
  5048  // Context sets the context to be used in this call's Do method.
  5049  func (c *PropertiesConversionEventsListCall) Context(ctx context.Context) *PropertiesConversionEventsListCall {
  5050  	c.ctx_ = ctx
  5051  	return c
  5052  }
  5053  
  5054  // Header returns a http.Header that can be modified by the caller to add
  5055  // headers to the request.
  5056  func (c *PropertiesConversionEventsListCall) Header() http.Header {
  5057  	if c.header_ == nil {
  5058  		c.header_ = make(http.Header)
  5059  	}
  5060  	return c.header_
  5061  }
  5062  
  5063  func (c *PropertiesConversionEventsListCall) doRequest(alt string) (*http.Response, error) {
  5064  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5065  	if c.ifNoneMatch_ != "" {
  5066  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5067  	}
  5068  	var body io.Reader = nil
  5069  	c.urlParams_.Set("alt", alt)
  5070  	c.urlParams_.Set("prettyPrint", "false")
  5071  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversionEvents")
  5072  	urls += "?" + c.urlParams_.Encode()
  5073  	req, err := http.NewRequest("GET", urls, body)
  5074  	if err != nil {
  5075  		return nil, err
  5076  	}
  5077  	req.Header = reqHeaders
  5078  	googleapi.Expand(req.URL, map[string]string{
  5079  		"parent": c.parent,
  5080  	})
  5081  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5082  }
  5083  
  5084  // Do executes the "analyticsadmin.properties.conversionEvents.list" call.
  5085  // Any non-2xx status code is an error. Response headers are in either
  5086  // *GoogleAnalyticsAdminV1betaListConversionEventsResponse.ServerResponse.Header
  5087  //
  5088  //	or (if a response was returned at all) in error.(*googleapi.Error).Header.
  5089  //
  5090  // Use googleapi.IsNotModified to check whether the returned error was because
  5091  // http.StatusNotModified was returned.
  5092  func (c *PropertiesConversionEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListConversionEventsResponse, error) {
  5093  	gensupport.SetOptions(c.urlParams_, opts...)
  5094  	res, err := c.doRequest("json")
  5095  	if res != nil && res.StatusCode == http.StatusNotModified {
  5096  		if res.Body != nil {
  5097  			res.Body.Close()
  5098  		}
  5099  		return nil, gensupport.WrapError(&googleapi.Error{
  5100  			Code:   res.StatusCode,
  5101  			Header: res.Header,
  5102  		})
  5103  	}
  5104  	if err != nil {
  5105  		return nil, err
  5106  	}
  5107  	defer googleapi.CloseBody(res)
  5108  	if err := googleapi.CheckResponse(res); err != nil {
  5109  		return nil, gensupport.WrapError(err)
  5110  	}
  5111  	ret := &GoogleAnalyticsAdminV1betaListConversionEventsResponse{
  5112  		ServerResponse: googleapi.ServerResponse{
  5113  			Header:         res.Header,
  5114  			HTTPStatusCode: res.StatusCode,
  5115  		},
  5116  	}
  5117  	target := &ret
  5118  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5119  		return nil, err
  5120  	}
  5121  	return ret, nil
  5122  }
  5123  
  5124  // Pages invokes f for each page of results.
  5125  // A non-nil error returned from f will halt the iteration.
  5126  // The provided context supersedes any context provided to the Context method.
  5127  func (c *PropertiesConversionEventsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListConversionEventsResponse) error) error {
  5128  	c.ctx_ = ctx
  5129  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5130  	for {
  5131  		x, err := c.Do()
  5132  		if err != nil {
  5133  			return err
  5134  		}
  5135  		if err := f(x); err != nil {
  5136  			return err
  5137  		}
  5138  		if x.NextPageToken == "" {
  5139  			return nil
  5140  		}
  5141  		c.PageToken(x.NextPageToken)
  5142  	}
  5143  }
  5144  
  5145  type PropertiesConversionEventsPatchCall struct {
  5146  	s                                         *Service
  5147  	name                                      string
  5148  	googleanalyticsadminv1betaconversionevent *GoogleAnalyticsAdminV1betaConversionEvent
  5149  	urlParams_                                gensupport.URLParams
  5150  	ctx_                                      context.Context
  5151  	header_                                   http.Header
  5152  }
  5153  
  5154  // Patch: Updates a conversion event with the specified attributes.
  5155  //
  5156  //   - name: Output only. Resource name of this conversion event. Format:
  5157  //     properties/{property}/conversionEvents/{conversion_event}.
  5158  func (r *PropertiesConversionEventsService) Patch(name string, googleanalyticsadminv1betaconversionevent *GoogleAnalyticsAdminV1betaConversionEvent) *PropertiesConversionEventsPatchCall {
  5159  	c := &PropertiesConversionEventsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5160  	c.name = name
  5161  	c.googleanalyticsadminv1betaconversionevent = googleanalyticsadminv1betaconversionevent
  5162  	return c
  5163  }
  5164  
  5165  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  5166  // fields to be updated. Field names must be in snake case (e.g.,
  5167  // "field_to_update"). Omitted fields will not be updated. To replace the
  5168  // entire entity, use one path with the string "*" to match all fields.
  5169  func (c *PropertiesConversionEventsPatchCall) UpdateMask(updateMask string) *PropertiesConversionEventsPatchCall {
  5170  	c.urlParams_.Set("updateMask", updateMask)
  5171  	return c
  5172  }
  5173  
  5174  // Fields allows partial responses to be retrieved. See
  5175  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5176  // details.
  5177  func (c *PropertiesConversionEventsPatchCall) Fields(s ...googleapi.Field) *PropertiesConversionEventsPatchCall {
  5178  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5179  	return c
  5180  }
  5181  
  5182  // Context sets the context to be used in this call's Do method.
  5183  func (c *PropertiesConversionEventsPatchCall) Context(ctx context.Context) *PropertiesConversionEventsPatchCall {
  5184  	c.ctx_ = ctx
  5185  	return c
  5186  }
  5187  
  5188  // Header returns a http.Header that can be modified by the caller to add
  5189  // headers to the request.
  5190  func (c *PropertiesConversionEventsPatchCall) Header() http.Header {
  5191  	if c.header_ == nil {
  5192  		c.header_ = make(http.Header)
  5193  	}
  5194  	return c.header_
  5195  }
  5196  
  5197  func (c *PropertiesConversionEventsPatchCall) doRequest(alt string) (*http.Response, error) {
  5198  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5199  	var body io.Reader = nil
  5200  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaconversionevent)
  5201  	if err != nil {
  5202  		return nil, err
  5203  	}
  5204  	c.urlParams_.Set("alt", alt)
  5205  	c.urlParams_.Set("prettyPrint", "false")
  5206  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  5207  	urls += "?" + c.urlParams_.Encode()
  5208  	req, err := http.NewRequest("PATCH", urls, body)
  5209  	if err != nil {
  5210  		return nil, err
  5211  	}
  5212  	req.Header = reqHeaders
  5213  	googleapi.Expand(req.URL, map[string]string{
  5214  		"name": c.name,
  5215  	})
  5216  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5217  }
  5218  
  5219  // Do executes the "analyticsadmin.properties.conversionEvents.patch" call.
  5220  // Any non-2xx status code is an error. Response headers are in either
  5221  // *GoogleAnalyticsAdminV1betaConversionEvent.ServerResponse.Header or (if a
  5222  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5223  // googleapi.IsNotModified to check whether the returned error was because
  5224  // http.StatusNotModified was returned.
  5225  func (c *PropertiesConversionEventsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaConversionEvent, error) {
  5226  	gensupport.SetOptions(c.urlParams_, opts...)
  5227  	res, err := c.doRequest("json")
  5228  	if res != nil && res.StatusCode == http.StatusNotModified {
  5229  		if res.Body != nil {
  5230  			res.Body.Close()
  5231  		}
  5232  		return nil, gensupport.WrapError(&googleapi.Error{
  5233  			Code:   res.StatusCode,
  5234  			Header: res.Header,
  5235  		})
  5236  	}
  5237  	if err != nil {
  5238  		return nil, err
  5239  	}
  5240  	defer googleapi.CloseBody(res)
  5241  	if err := googleapi.CheckResponse(res); err != nil {
  5242  		return nil, gensupport.WrapError(err)
  5243  	}
  5244  	ret := &GoogleAnalyticsAdminV1betaConversionEvent{
  5245  		ServerResponse: googleapi.ServerResponse{
  5246  			Header:         res.Header,
  5247  			HTTPStatusCode: res.StatusCode,
  5248  		},
  5249  	}
  5250  	target := &ret
  5251  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5252  		return nil, err
  5253  	}
  5254  	return ret, nil
  5255  }
  5256  
  5257  type PropertiesCustomDimensionsArchiveCall struct {
  5258  	s                                                       *Service
  5259  	name                                                    string
  5260  	googleanalyticsadminv1betaarchivecustomdimensionrequest *GoogleAnalyticsAdminV1betaArchiveCustomDimensionRequest
  5261  	urlParams_                                              gensupport.URLParams
  5262  	ctx_                                                    context.Context
  5263  	header_                                                 http.Header
  5264  }
  5265  
  5266  // Archive: Archives a CustomDimension on a property.
  5267  //
  5268  //   - name: The name of the CustomDimension to archive. Example format:
  5269  //     properties/1234/customDimensions/5678.
  5270  func (r *PropertiesCustomDimensionsService) Archive(name string, googleanalyticsadminv1betaarchivecustomdimensionrequest *GoogleAnalyticsAdminV1betaArchiveCustomDimensionRequest) *PropertiesCustomDimensionsArchiveCall {
  5271  	c := &PropertiesCustomDimensionsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5272  	c.name = name
  5273  	c.googleanalyticsadminv1betaarchivecustomdimensionrequest = googleanalyticsadminv1betaarchivecustomdimensionrequest
  5274  	return c
  5275  }
  5276  
  5277  // Fields allows partial responses to be retrieved. See
  5278  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5279  // details.
  5280  func (c *PropertiesCustomDimensionsArchiveCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsArchiveCall {
  5281  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5282  	return c
  5283  }
  5284  
  5285  // Context sets the context to be used in this call's Do method.
  5286  func (c *PropertiesCustomDimensionsArchiveCall) Context(ctx context.Context) *PropertiesCustomDimensionsArchiveCall {
  5287  	c.ctx_ = ctx
  5288  	return c
  5289  }
  5290  
  5291  // Header returns a http.Header that can be modified by the caller to add
  5292  // headers to the request.
  5293  func (c *PropertiesCustomDimensionsArchiveCall) Header() http.Header {
  5294  	if c.header_ == nil {
  5295  		c.header_ = make(http.Header)
  5296  	}
  5297  	return c.header_
  5298  }
  5299  
  5300  func (c *PropertiesCustomDimensionsArchiveCall) doRequest(alt string) (*http.Response, error) {
  5301  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5302  	var body io.Reader = nil
  5303  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaarchivecustomdimensionrequest)
  5304  	if err != nil {
  5305  		return nil, err
  5306  	}
  5307  	c.urlParams_.Set("alt", alt)
  5308  	c.urlParams_.Set("prettyPrint", "false")
  5309  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:archive")
  5310  	urls += "?" + c.urlParams_.Encode()
  5311  	req, err := http.NewRequest("POST", urls, body)
  5312  	if err != nil {
  5313  		return nil, err
  5314  	}
  5315  	req.Header = reqHeaders
  5316  	googleapi.Expand(req.URL, map[string]string{
  5317  		"name": c.name,
  5318  	})
  5319  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5320  }
  5321  
  5322  // Do executes the "analyticsadmin.properties.customDimensions.archive" call.
  5323  // Any non-2xx status code is an error. Response headers are in either
  5324  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  5325  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5326  // check whether the returned error was because http.StatusNotModified was
  5327  // returned.
  5328  func (c *PropertiesCustomDimensionsArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  5329  	gensupport.SetOptions(c.urlParams_, opts...)
  5330  	res, err := c.doRequest("json")
  5331  	if res != nil && res.StatusCode == http.StatusNotModified {
  5332  		if res.Body != nil {
  5333  			res.Body.Close()
  5334  		}
  5335  		return nil, gensupport.WrapError(&googleapi.Error{
  5336  			Code:   res.StatusCode,
  5337  			Header: res.Header,
  5338  		})
  5339  	}
  5340  	if err != nil {
  5341  		return nil, err
  5342  	}
  5343  	defer googleapi.CloseBody(res)
  5344  	if err := googleapi.CheckResponse(res); err != nil {
  5345  		return nil, gensupport.WrapError(err)
  5346  	}
  5347  	ret := &GoogleProtobufEmpty{
  5348  		ServerResponse: googleapi.ServerResponse{
  5349  			Header:         res.Header,
  5350  			HTTPStatusCode: res.StatusCode,
  5351  		},
  5352  	}
  5353  	target := &ret
  5354  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5355  		return nil, err
  5356  	}
  5357  	return ret, nil
  5358  }
  5359  
  5360  type PropertiesCustomDimensionsCreateCall struct {
  5361  	s                                         *Service
  5362  	parent                                    string
  5363  	googleanalyticsadminv1betacustomdimension *GoogleAnalyticsAdminV1betaCustomDimension
  5364  	urlParams_                                gensupport.URLParams
  5365  	ctx_                                      context.Context
  5366  	header_                                   http.Header
  5367  }
  5368  
  5369  // Create: Creates a CustomDimension.
  5370  //
  5371  // - parent: Example format: properties/1234.
  5372  func (r *PropertiesCustomDimensionsService) Create(parent string, googleanalyticsadminv1betacustomdimension *GoogleAnalyticsAdminV1betaCustomDimension) *PropertiesCustomDimensionsCreateCall {
  5373  	c := &PropertiesCustomDimensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5374  	c.parent = parent
  5375  	c.googleanalyticsadminv1betacustomdimension = googleanalyticsadminv1betacustomdimension
  5376  	return c
  5377  }
  5378  
  5379  // Fields allows partial responses to be retrieved. See
  5380  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5381  // details.
  5382  func (c *PropertiesCustomDimensionsCreateCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsCreateCall {
  5383  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5384  	return c
  5385  }
  5386  
  5387  // Context sets the context to be used in this call's Do method.
  5388  func (c *PropertiesCustomDimensionsCreateCall) Context(ctx context.Context) *PropertiesCustomDimensionsCreateCall {
  5389  	c.ctx_ = ctx
  5390  	return c
  5391  }
  5392  
  5393  // Header returns a http.Header that can be modified by the caller to add
  5394  // headers to the request.
  5395  func (c *PropertiesCustomDimensionsCreateCall) Header() http.Header {
  5396  	if c.header_ == nil {
  5397  		c.header_ = make(http.Header)
  5398  	}
  5399  	return c.header_
  5400  }
  5401  
  5402  func (c *PropertiesCustomDimensionsCreateCall) doRequest(alt string) (*http.Response, error) {
  5403  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5404  	var body io.Reader = nil
  5405  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betacustomdimension)
  5406  	if err != nil {
  5407  		return nil, err
  5408  	}
  5409  	c.urlParams_.Set("alt", alt)
  5410  	c.urlParams_.Set("prettyPrint", "false")
  5411  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/customDimensions")
  5412  	urls += "?" + c.urlParams_.Encode()
  5413  	req, err := http.NewRequest("POST", urls, body)
  5414  	if err != nil {
  5415  		return nil, err
  5416  	}
  5417  	req.Header = reqHeaders
  5418  	googleapi.Expand(req.URL, map[string]string{
  5419  		"parent": c.parent,
  5420  	})
  5421  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5422  }
  5423  
  5424  // Do executes the "analyticsadmin.properties.customDimensions.create" call.
  5425  // Any non-2xx status code is an error. Response headers are in either
  5426  // *GoogleAnalyticsAdminV1betaCustomDimension.ServerResponse.Header or (if a
  5427  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5428  // googleapi.IsNotModified to check whether the returned error was because
  5429  // http.StatusNotModified was returned.
  5430  func (c *PropertiesCustomDimensionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaCustomDimension, error) {
  5431  	gensupport.SetOptions(c.urlParams_, opts...)
  5432  	res, err := c.doRequest("json")
  5433  	if res != nil && res.StatusCode == http.StatusNotModified {
  5434  		if res.Body != nil {
  5435  			res.Body.Close()
  5436  		}
  5437  		return nil, gensupport.WrapError(&googleapi.Error{
  5438  			Code:   res.StatusCode,
  5439  			Header: res.Header,
  5440  		})
  5441  	}
  5442  	if err != nil {
  5443  		return nil, err
  5444  	}
  5445  	defer googleapi.CloseBody(res)
  5446  	if err := googleapi.CheckResponse(res); err != nil {
  5447  		return nil, gensupport.WrapError(err)
  5448  	}
  5449  	ret := &GoogleAnalyticsAdminV1betaCustomDimension{
  5450  		ServerResponse: googleapi.ServerResponse{
  5451  			Header:         res.Header,
  5452  			HTTPStatusCode: res.StatusCode,
  5453  		},
  5454  	}
  5455  	target := &ret
  5456  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5457  		return nil, err
  5458  	}
  5459  	return ret, nil
  5460  }
  5461  
  5462  type PropertiesCustomDimensionsGetCall struct {
  5463  	s            *Service
  5464  	name         string
  5465  	urlParams_   gensupport.URLParams
  5466  	ifNoneMatch_ string
  5467  	ctx_         context.Context
  5468  	header_      http.Header
  5469  }
  5470  
  5471  // Get: Lookup for a single CustomDimension.
  5472  //
  5473  //   - name: The name of the CustomDimension to get. Example format:
  5474  //     properties/1234/customDimensions/5678.
  5475  func (r *PropertiesCustomDimensionsService) Get(name string) *PropertiesCustomDimensionsGetCall {
  5476  	c := &PropertiesCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5477  	c.name = name
  5478  	return c
  5479  }
  5480  
  5481  // Fields allows partial responses to be retrieved. See
  5482  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5483  // details.
  5484  func (c *PropertiesCustomDimensionsGetCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsGetCall {
  5485  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5486  	return c
  5487  }
  5488  
  5489  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5490  // object's ETag matches the given value. This is useful for getting updates
  5491  // only after the object has changed since the last request.
  5492  func (c *PropertiesCustomDimensionsGetCall) IfNoneMatch(entityTag string) *PropertiesCustomDimensionsGetCall {
  5493  	c.ifNoneMatch_ = entityTag
  5494  	return c
  5495  }
  5496  
  5497  // Context sets the context to be used in this call's Do method.
  5498  func (c *PropertiesCustomDimensionsGetCall) Context(ctx context.Context) *PropertiesCustomDimensionsGetCall {
  5499  	c.ctx_ = ctx
  5500  	return c
  5501  }
  5502  
  5503  // Header returns a http.Header that can be modified by the caller to add
  5504  // headers to the request.
  5505  func (c *PropertiesCustomDimensionsGetCall) Header() http.Header {
  5506  	if c.header_ == nil {
  5507  		c.header_ = make(http.Header)
  5508  	}
  5509  	return c.header_
  5510  }
  5511  
  5512  func (c *PropertiesCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) {
  5513  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5514  	if c.ifNoneMatch_ != "" {
  5515  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5516  	}
  5517  	var body io.Reader = nil
  5518  	c.urlParams_.Set("alt", alt)
  5519  	c.urlParams_.Set("prettyPrint", "false")
  5520  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  5521  	urls += "?" + c.urlParams_.Encode()
  5522  	req, err := http.NewRequest("GET", urls, body)
  5523  	if err != nil {
  5524  		return nil, err
  5525  	}
  5526  	req.Header = reqHeaders
  5527  	googleapi.Expand(req.URL, map[string]string{
  5528  		"name": c.name,
  5529  	})
  5530  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5531  }
  5532  
  5533  // Do executes the "analyticsadmin.properties.customDimensions.get" call.
  5534  // Any non-2xx status code is an error. Response headers are in either
  5535  // *GoogleAnalyticsAdminV1betaCustomDimension.ServerResponse.Header or (if a
  5536  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5537  // googleapi.IsNotModified to check whether the returned error was because
  5538  // http.StatusNotModified was returned.
  5539  func (c *PropertiesCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaCustomDimension, error) {
  5540  	gensupport.SetOptions(c.urlParams_, opts...)
  5541  	res, err := c.doRequest("json")
  5542  	if res != nil && res.StatusCode == http.StatusNotModified {
  5543  		if res.Body != nil {
  5544  			res.Body.Close()
  5545  		}
  5546  		return nil, gensupport.WrapError(&googleapi.Error{
  5547  			Code:   res.StatusCode,
  5548  			Header: res.Header,
  5549  		})
  5550  	}
  5551  	if err != nil {
  5552  		return nil, err
  5553  	}
  5554  	defer googleapi.CloseBody(res)
  5555  	if err := googleapi.CheckResponse(res); err != nil {
  5556  		return nil, gensupport.WrapError(err)
  5557  	}
  5558  	ret := &GoogleAnalyticsAdminV1betaCustomDimension{
  5559  		ServerResponse: googleapi.ServerResponse{
  5560  			Header:         res.Header,
  5561  			HTTPStatusCode: res.StatusCode,
  5562  		},
  5563  	}
  5564  	target := &ret
  5565  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5566  		return nil, err
  5567  	}
  5568  	return ret, nil
  5569  }
  5570  
  5571  type PropertiesCustomDimensionsListCall struct {
  5572  	s            *Service
  5573  	parent       string
  5574  	urlParams_   gensupport.URLParams
  5575  	ifNoneMatch_ string
  5576  	ctx_         context.Context
  5577  	header_      http.Header
  5578  }
  5579  
  5580  // List: Lists CustomDimensions on a property.
  5581  //
  5582  // - parent: Example format: properties/1234.
  5583  func (r *PropertiesCustomDimensionsService) List(parent string) *PropertiesCustomDimensionsListCall {
  5584  	c := &PropertiesCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5585  	c.parent = parent
  5586  	return c
  5587  }
  5588  
  5589  // PageSize sets the optional parameter "pageSize": The maximum number of
  5590  // resources to return. If unspecified, at most 50 resources will be returned.
  5591  // The maximum value is 200 (higher values will be coerced to the maximum).
  5592  func (c *PropertiesCustomDimensionsListCall) PageSize(pageSize int64) *PropertiesCustomDimensionsListCall {
  5593  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5594  	return c
  5595  }
  5596  
  5597  // PageToken sets the optional parameter "pageToken": A page token, received
  5598  // from a previous `ListCustomDimensions` call. Provide this to retrieve the
  5599  // subsequent page. When paginating, all other parameters provided to
  5600  // `ListCustomDimensions` must match the call that provided the page token.
  5601  func (c *PropertiesCustomDimensionsListCall) PageToken(pageToken string) *PropertiesCustomDimensionsListCall {
  5602  	c.urlParams_.Set("pageToken", pageToken)
  5603  	return c
  5604  }
  5605  
  5606  // Fields allows partial responses to be retrieved. See
  5607  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5608  // details.
  5609  func (c *PropertiesCustomDimensionsListCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsListCall {
  5610  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5611  	return c
  5612  }
  5613  
  5614  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5615  // object's ETag matches the given value. This is useful for getting updates
  5616  // only after the object has changed since the last request.
  5617  func (c *PropertiesCustomDimensionsListCall) IfNoneMatch(entityTag string) *PropertiesCustomDimensionsListCall {
  5618  	c.ifNoneMatch_ = entityTag
  5619  	return c
  5620  }
  5621  
  5622  // Context sets the context to be used in this call's Do method.
  5623  func (c *PropertiesCustomDimensionsListCall) Context(ctx context.Context) *PropertiesCustomDimensionsListCall {
  5624  	c.ctx_ = ctx
  5625  	return c
  5626  }
  5627  
  5628  // Header returns a http.Header that can be modified by the caller to add
  5629  // headers to the request.
  5630  func (c *PropertiesCustomDimensionsListCall) Header() http.Header {
  5631  	if c.header_ == nil {
  5632  		c.header_ = make(http.Header)
  5633  	}
  5634  	return c.header_
  5635  }
  5636  
  5637  func (c *PropertiesCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) {
  5638  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5639  	if c.ifNoneMatch_ != "" {
  5640  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5641  	}
  5642  	var body io.Reader = nil
  5643  	c.urlParams_.Set("alt", alt)
  5644  	c.urlParams_.Set("prettyPrint", "false")
  5645  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/customDimensions")
  5646  	urls += "?" + c.urlParams_.Encode()
  5647  	req, err := http.NewRequest("GET", urls, body)
  5648  	if err != nil {
  5649  		return nil, err
  5650  	}
  5651  	req.Header = reqHeaders
  5652  	googleapi.Expand(req.URL, map[string]string{
  5653  		"parent": c.parent,
  5654  	})
  5655  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5656  }
  5657  
  5658  // Do executes the "analyticsadmin.properties.customDimensions.list" call.
  5659  // Any non-2xx status code is an error. Response headers are in either
  5660  // *GoogleAnalyticsAdminV1betaListCustomDimensionsResponse.ServerResponse.Header
  5661  //
  5662  //	or (if a response was returned at all) in error.(*googleapi.Error).Header.
  5663  //
  5664  // Use googleapi.IsNotModified to check whether the returned error was because
  5665  // http.StatusNotModified was returned.
  5666  func (c *PropertiesCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListCustomDimensionsResponse, error) {
  5667  	gensupport.SetOptions(c.urlParams_, opts...)
  5668  	res, err := c.doRequest("json")
  5669  	if res != nil && res.StatusCode == http.StatusNotModified {
  5670  		if res.Body != nil {
  5671  			res.Body.Close()
  5672  		}
  5673  		return nil, gensupport.WrapError(&googleapi.Error{
  5674  			Code:   res.StatusCode,
  5675  			Header: res.Header,
  5676  		})
  5677  	}
  5678  	if err != nil {
  5679  		return nil, err
  5680  	}
  5681  	defer googleapi.CloseBody(res)
  5682  	if err := googleapi.CheckResponse(res); err != nil {
  5683  		return nil, gensupport.WrapError(err)
  5684  	}
  5685  	ret := &GoogleAnalyticsAdminV1betaListCustomDimensionsResponse{
  5686  		ServerResponse: googleapi.ServerResponse{
  5687  			Header:         res.Header,
  5688  			HTTPStatusCode: res.StatusCode,
  5689  		},
  5690  	}
  5691  	target := &ret
  5692  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5693  		return nil, err
  5694  	}
  5695  	return ret, nil
  5696  }
  5697  
  5698  // Pages invokes f for each page of results.
  5699  // A non-nil error returned from f will halt the iteration.
  5700  // The provided context supersedes any context provided to the Context method.
  5701  func (c *PropertiesCustomDimensionsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListCustomDimensionsResponse) error) error {
  5702  	c.ctx_ = ctx
  5703  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5704  	for {
  5705  		x, err := c.Do()
  5706  		if err != nil {
  5707  			return err
  5708  		}
  5709  		if err := f(x); err != nil {
  5710  			return err
  5711  		}
  5712  		if x.NextPageToken == "" {
  5713  			return nil
  5714  		}
  5715  		c.PageToken(x.NextPageToken)
  5716  	}
  5717  }
  5718  
  5719  type PropertiesCustomDimensionsPatchCall struct {
  5720  	s                                         *Service
  5721  	name                                      string
  5722  	googleanalyticsadminv1betacustomdimension *GoogleAnalyticsAdminV1betaCustomDimension
  5723  	urlParams_                                gensupport.URLParams
  5724  	ctx_                                      context.Context
  5725  	header_                                   http.Header
  5726  }
  5727  
  5728  // Patch: Updates a CustomDimension on a property.
  5729  //
  5730  //   - name: Output only. Resource name for this CustomDimension resource.
  5731  //     Format: properties/{property}/customDimensions/{customDimension}.
  5732  func (r *PropertiesCustomDimensionsService) Patch(name string, googleanalyticsadminv1betacustomdimension *GoogleAnalyticsAdminV1betaCustomDimension) *PropertiesCustomDimensionsPatchCall {
  5733  	c := &PropertiesCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5734  	c.name = name
  5735  	c.googleanalyticsadminv1betacustomdimension = googleanalyticsadminv1betacustomdimension
  5736  	return c
  5737  }
  5738  
  5739  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  5740  // fields to be updated. Omitted fields will not be updated. To replace the
  5741  // entire entity, use one path with the string "*" to match all fields.
  5742  func (c *PropertiesCustomDimensionsPatchCall) UpdateMask(updateMask string) *PropertiesCustomDimensionsPatchCall {
  5743  	c.urlParams_.Set("updateMask", updateMask)
  5744  	return c
  5745  }
  5746  
  5747  // Fields allows partial responses to be retrieved. See
  5748  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5749  // details.
  5750  func (c *PropertiesCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *PropertiesCustomDimensionsPatchCall {
  5751  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5752  	return c
  5753  }
  5754  
  5755  // Context sets the context to be used in this call's Do method.
  5756  func (c *PropertiesCustomDimensionsPatchCall) Context(ctx context.Context) *PropertiesCustomDimensionsPatchCall {
  5757  	c.ctx_ = ctx
  5758  	return c
  5759  }
  5760  
  5761  // Header returns a http.Header that can be modified by the caller to add
  5762  // headers to the request.
  5763  func (c *PropertiesCustomDimensionsPatchCall) Header() http.Header {
  5764  	if c.header_ == nil {
  5765  		c.header_ = make(http.Header)
  5766  	}
  5767  	return c.header_
  5768  }
  5769  
  5770  func (c *PropertiesCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) {
  5771  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5772  	var body io.Reader = nil
  5773  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betacustomdimension)
  5774  	if err != nil {
  5775  		return nil, err
  5776  	}
  5777  	c.urlParams_.Set("alt", alt)
  5778  	c.urlParams_.Set("prettyPrint", "false")
  5779  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  5780  	urls += "?" + c.urlParams_.Encode()
  5781  	req, err := http.NewRequest("PATCH", urls, body)
  5782  	if err != nil {
  5783  		return nil, err
  5784  	}
  5785  	req.Header = reqHeaders
  5786  	googleapi.Expand(req.URL, map[string]string{
  5787  		"name": c.name,
  5788  	})
  5789  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5790  }
  5791  
  5792  // Do executes the "analyticsadmin.properties.customDimensions.patch" call.
  5793  // Any non-2xx status code is an error. Response headers are in either
  5794  // *GoogleAnalyticsAdminV1betaCustomDimension.ServerResponse.Header or (if a
  5795  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5796  // googleapi.IsNotModified to check whether the returned error was because
  5797  // http.StatusNotModified was returned.
  5798  func (c *PropertiesCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaCustomDimension, error) {
  5799  	gensupport.SetOptions(c.urlParams_, opts...)
  5800  	res, err := c.doRequest("json")
  5801  	if res != nil && res.StatusCode == http.StatusNotModified {
  5802  		if res.Body != nil {
  5803  			res.Body.Close()
  5804  		}
  5805  		return nil, gensupport.WrapError(&googleapi.Error{
  5806  			Code:   res.StatusCode,
  5807  			Header: res.Header,
  5808  		})
  5809  	}
  5810  	if err != nil {
  5811  		return nil, err
  5812  	}
  5813  	defer googleapi.CloseBody(res)
  5814  	if err := googleapi.CheckResponse(res); err != nil {
  5815  		return nil, gensupport.WrapError(err)
  5816  	}
  5817  	ret := &GoogleAnalyticsAdminV1betaCustomDimension{
  5818  		ServerResponse: googleapi.ServerResponse{
  5819  			Header:         res.Header,
  5820  			HTTPStatusCode: res.StatusCode,
  5821  		},
  5822  	}
  5823  	target := &ret
  5824  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5825  		return nil, err
  5826  	}
  5827  	return ret, nil
  5828  }
  5829  
  5830  type PropertiesCustomMetricsArchiveCall struct {
  5831  	s                                                    *Service
  5832  	name                                                 string
  5833  	googleanalyticsadminv1betaarchivecustommetricrequest *GoogleAnalyticsAdminV1betaArchiveCustomMetricRequest
  5834  	urlParams_                                           gensupport.URLParams
  5835  	ctx_                                                 context.Context
  5836  	header_                                              http.Header
  5837  }
  5838  
  5839  // Archive: Archives a CustomMetric on a property.
  5840  //
  5841  //   - name: The name of the CustomMetric to archive. Example format:
  5842  //     properties/1234/customMetrics/5678.
  5843  func (r *PropertiesCustomMetricsService) Archive(name string, googleanalyticsadminv1betaarchivecustommetricrequest *GoogleAnalyticsAdminV1betaArchiveCustomMetricRequest) *PropertiesCustomMetricsArchiveCall {
  5844  	c := &PropertiesCustomMetricsArchiveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5845  	c.name = name
  5846  	c.googleanalyticsadminv1betaarchivecustommetricrequest = googleanalyticsadminv1betaarchivecustommetricrequest
  5847  	return c
  5848  }
  5849  
  5850  // Fields allows partial responses to be retrieved. See
  5851  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5852  // details.
  5853  func (c *PropertiesCustomMetricsArchiveCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsArchiveCall {
  5854  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5855  	return c
  5856  }
  5857  
  5858  // Context sets the context to be used in this call's Do method.
  5859  func (c *PropertiesCustomMetricsArchiveCall) Context(ctx context.Context) *PropertiesCustomMetricsArchiveCall {
  5860  	c.ctx_ = ctx
  5861  	return c
  5862  }
  5863  
  5864  // Header returns a http.Header that can be modified by the caller to add
  5865  // headers to the request.
  5866  func (c *PropertiesCustomMetricsArchiveCall) Header() http.Header {
  5867  	if c.header_ == nil {
  5868  		c.header_ = make(http.Header)
  5869  	}
  5870  	return c.header_
  5871  }
  5872  
  5873  func (c *PropertiesCustomMetricsArchiveCall) doRequest(alt string) (*http.Response, error) {
  5874  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5875  	var body io.Reader = nil
  5876  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betaarchivecustommetricrequest)
  5877  	if err != nil {
  5878  		return nil, err
  5879  	}
  5880  	c.urlParams_.Set("alt", alt)
  5881  	c.urlParams_.Set("prettyPrint", "false")
  5882  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:archive")
  5883  	urls += "?" + c.urlParams_.Encode()
  5884  	req, err := http.NewRequest("POST", urls, body)
  5885  	if err != nil {
  5886  		return nil, err
  5887  	}
  5888  	req.Header = reqHeaders
  5889  	googleapi.Expand(req.URL, map[string]string{
  5890  		"name": c.name,
  5891  	})
  5892  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5893  }
  5894  
  5895  // Do executes the "analyticsadmin.properties.customMetrics.archive" call.
  5896  // Any non-2xx status code is an error. Response headers are in either
  5897  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  5898  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5899  // check whether the returned error was because http.StatusNotModified was
  5900  // returned.
  5901  func (c *PropertiesCustomMetricsArchiveCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  5902  	gensupport.SetOptions(c.urlParams_, opts...)
  5903  	res, err := c.doRequest("json")
  5904  	if res != nil && res.StatusCode == http.StatusNotModified {
  5905  		if res.Body != nil {
  5906  			res.Body.Close()
  5907  		}
  5908  		return nil, gensupport.WrapError(&googleapi.Error{
  5909  			Code:   res.StatusCode,
  5910  			Header: res.Header,
  5911  		})
  5912  	}
  5913  	if err != nil {
  5914  		return nil, err
  5915  	}
  5916  	defer googleapi.CloseBody(res)
  5917  	if err := googleapi.CheckResponse(res); err != nil {
  5918  		return nil, gensupport.WrapError(err)
  5919  	}
  5920  	ret := &GoogleProtobufEmpty{
  5921  		ServerResponse: googleapi.ServerResponse{
  5922  			Header:         res.Header,
  5923  			HTTPStatusCode: res.StatusCode,
  5924  		},
  5925  	}
  5926  	target := &ret
  5927  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5928  		return nil, err
  5929  	}
  5930  	return ret, nil
  5931  }
  5932  
  5933  type PropertiesCustomMetricsCreateCall struct {
  5934  	s                                      *Service
  5935  	parent                                 string
  5936  	googleanalyticsadminv1betacustommetric *GoogleAnalyticsAdminV1betaCustomMetric
  5937  	urlParams_                             gensupport.URLParams
  5938  	ctx_                                   context.Context
  5939  	header_                                http.Header
  5940  }
  5941  
  5942  // Create: Creates a CustomMetric.
  5943  //
  5944  // - parent: Example format: properties/1234.
  5945  func (r *PropertiesCustomMetricsService) Create(parent string, googleanalyticsadminv1betacustommetric *GoogleAnalyticsAdminV1betaCustomMetric) *PropertiesCustomMetricsCreateCall {
  5946  	c := &PropertiesCustomMetricsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5947  	c.parent = parent
  5948  	c.googleanalyticsadminv1betacustommetric = googleanalyticsadminv1betacustommetric
  5949  	return c
  5950  }
  5951  
  5952  // Fields allows partial responses to be retrieved. See
  5953  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5954  // details.
  5955  func (c *PropertiesCustomMetricsCreateCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsCreateCall {
  5956  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5957  	return c
  5958  }
  5959  
  5960  // Context sets the context to be used in this call's Do method.
  5961  func (c *PropertiesCustomMetricsCreateCall) Context(ctx context.Context) *PropertiesCustomMetricsCreateCall {
  5962  	c.ctx_ = ctx
  5963  	return c
  5964  }
  5965  
  5966  // Header returns a http.Header that can be modified by the caller to add
  5967  // headers to the request.
  5968  func (c *PropertiesCustomMetricsCreateCall) Header() http.Header {
  5969  	if c.header_ == nil {
  5970  		c.header_ = make(http.Header)
  5971  	}
  5972  	return c.header_
  5973  }
  5974  
  5975  func (c *PropertiesCustomMetricsCreateCall) doRequest(alt string) (*http.Response, error) {
  5976  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5977  	var body io.Reader = nil
  5978  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betacustommetric)
  5979  	if err != nil {
  5980  		return nil, err
  5981  	}
  5982  	c.urlParams_.Set("alt", alt)
  5983  	c.urlParams_.Set("prettyPrint", "false")
  5984  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/customMetrics")
  5985  	urls += "?" + c.urlParams_.Encode()
  5986  	req, err := http.NewRequest("POST", urls, body)
  5987  	if err != nil {
  5988  		return nil, err
  5989  	}
  5990  	req.Header = reqHeaders
  5991  	googleapi.Expand(req.URL, map[string]string{
  5992  		"parent": c.parent,
  5993  	})
  5994  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5995  }
  5996  
  5997  // Do executes the "analyticsadmin.properties.customMetrics.create" call.
  5998  // Any non-2xx status code is an error. Response headers are in either
  5999  // *GoogleAnalyticsAdminV1betaCustomMetric.ServerResponse.Header or (if a
  6000  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6001  // googleapi.IsNotModified to check whether the returned error was because
  6002  // http.StatusNotModified was returned.
  6003  func (c *PropertiesCustomMetricsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaCustomMetric, error) {
  6004  	gensupport.SetOptions(c.urlParams_, opts...)
  6005  	res, err := c.doRequest("json")
  6006  	if res != nil && res.StatusCode == http.StatusNotModified {
  6007  		if res.Body != nil {
  6008  			res.Body.Close()
  6009  		}
  6010  		return nil, gensupport.WrapError(&googleapi.Error{
  6011  			Code:   res.StatusCode,
  6012  			Header: res.Header,
  6013  		})
  6014  	}
  6015  	if err != nil {
  6016  		return nil, err
  6017  	}
  6018  	defer googleapi.CloseBody(res)
  6019  	if err := googleapi.CheckResponse(res); err != nil {
  6020  		return nil, gensupport.WrapError(err)
  6021  	}
  6022  	ret := &GoogleAnalyticsAdminV1betaCustomMetric{
  6023  		ServerResponse: googleapi.ServerResponse{
  6024  			Header:         res.Header,
  6025  			HTTPStatusCode: res.StatusCode,
  6026  		},
  6027  	}
  6028  	target := &ret
  6029  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6030  		return nil, err
  6031  	}
  6032  	return ret, nil
  6033  }
  6034  
  6035  type PropertiesCustomMetricsGetCall struct {
  6036  	s            *Service
  6037  	name         string
  6038  	urlParams_   gensupport.URLParams
  6039  	ifNoneMatch_ string
  6040  	ctx_         context.Context
  6041  	header_      http.Header
  6042  }
  6043  
  6044  // Get: Lookup for a single CustomMetric.
  6045  //
  6046  //   - name: The name of the CustomMetric to get. Example format:
  6047  //     properties/1234/customMetrics/5678.
  6048  func (r *PropertiesCustomMetricsService) Get(name string) *PropertiesCustomMetricsGetCall {
  6049  	c := &PropertiesCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6050  	c.name = name
  6051  	return c
  6052  }
  6053  
  6054  // Fields allows partial responses to be retrieved. See
  6055  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6056  // details.
  6057  func (c *PropertiesCustomMetricsGetCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsGetCall {
  6058  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6059  	return c
  6060  }
  6061  
  6062  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6063  // object's ETag matches the given value. This is useful for getting updates
  6064  // only after the object has changed since the last request.
  6065  func (c *PropertiesCustomMetricsGetCall) IfNoneMatch(entityTag string) *PropertiesCustomMetricsGetCall {
  6066  	c.ifNoneMatch_ = entityTag
  6067  	return c
  6068  }
  6069  
  6070  // Context sets the context to be used in this call's Do method.
  6071  func (c *PropertiesCustomMetricsGetCall) Context(ctx context.Context) *PropertiesCustomMetricsGetCall {
  6072  	c.ctx_ = ctx
  6073  	return c
  6074  }
  6075  
  6076  // Header returns a http.Header that can be modified by the caller to add
  6077  // headers to the request.
  6078  func (c *PropertiesCustomMetricsGetCall) Header() http.Header {
  6079  	if c.header_ == nil {
  6080  		c.header_ = make(http.Header)
  6081  	}
  6082  	return c.header_
  6083  }
  6084  
  6085  func (c *PropertiesCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) {
  6086  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6087  	if c.ifNoneMatch_ != "" {
  6088  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6089  	}
  6090  	var body io.Reader = nil
  6091  	c.urlParams_.Set("alt", alt)
  6092  	c.urlParams_.Set("prettyPrint", "false")
  6093  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  6094  	urls += "?" + c.urlParams_.Encode()
  6095  	req, err := http.NewRequest("GET", urls, body)
  6096  	if err != nil {
  6097  		return nil, err
  6098  	}
  6099  	req.Header = reqHeaders
  6100  	googleapi.Expand(req.URL, map[string]string{
  6101  		"name": c.name,
  6102  	})
  6103  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6104  }
  6105  
  6106  // Do executes the "analyticsadmin.properties.customMetrics.get" call.
  6107  // Any non-2xx status code is an error. Response headers are in either
  6108  // *GoogleAnalyticsAdminV1betaCustomMetric.ServerResponse.Header or (if a
  6109  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6110  // googleapi.IsNotModified to check whether the returned error was because
  6111  // http.StatusNotModified was returned.
  6112  func (c *PropertiesCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaCustomMetric, error) {
  6113  	gensupport.SetOptions(c.urlParams_, opts...)
  6114  	res, err := c.doRequest("json")
  6115  	if res != nil && res.StatusCode == http.StatusNotModified {
  6116  		if res.Body != nil {
  6117  			res.Body.Close()
  6118  		}
  6119  		return nil, gensupport.WrapError(&googleapi.Error{
  6120  			Code:   res.StatusCode,
  6121  			Header: res.Header,
  6122  		})
  6123  	}
  6124  	if err != nil {
  6125  		return nil, err
  6126  	}
  6127  	defer googleapi.CloseBody(res)
  6128  	if err := googleapi.CheckResponse(res); err != nil {
  6129  		return nil, gensupport.WrapError(err)
  6130  	}
  6131  	ret := &GoogleAnalyticsAdminV1betaCustomMetric{
  6132  		ServerResponse: googleapi.ServerResponse{
  6133  			Header:         res.Header,
  6134  			HTTPStatusCode: res.StatusCode,
  6135  		},
  6136  	}
  6137  	target := &ret
  6138  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6139  		return nil, err
  6140  	}
  6141  	return ret, nil
  6142  }
  6143  
  6144  type PropertiesCustomMetricsListCall struct {
  6145  	s            *Service
  6146  	parent       string
  6147  	urlParams_   gensupport.URLParams
  6148  	ifNoneMatch_ string
  6149  	ctx_         context.Context
  6150  	header_      http.Header
  6151  }
  6152  
  6153  // List: Lists CustomMetrics on a property.
  6154  //
  6155  // - parent: Example format: properties/1234.
  6156  func (r *PropertiesCustomMetricsService) List(parent string) *PropertiesCustomMetricsListCall {
  6157  	c := &PropertiesCustomMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6158  	c.parent = parent
  6159  	return c
  6160  }
  6161  
  6162  // PageSize sets the optional parameter "pageSize": The maximum number of
  6163  // resources to return. If unspecified, at most 50 resources will be returned.
  6164  // The maximum value is 200 (higher values will be coerced to the maximum).
  6165  func (c *PropertiesCustomMetricsListCall) PageSize(pageSize int64) *PropertiesCustomMetricsListCall {
  6166  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6167  	return c
  6168  }
  6169  
  6170  // PageToken sets the optional parameter "pageToken": A page token, received
  6171  // from a previous `ListCustomMetrics` call. Provide this to retrieve the
  6172  // subsequent page. When paginating, all other parameters provided to
  6173  // `ListCustomMetrics` must match the call that provided the page token.
  6174  func (c *PropertiesCustomMetricsListCall) PageToken(pageToken string) *PropertiesCustomMetricsListCall {
  6175  	c.urlParams_.Set("pageToken", pageToken)
  6176  	return c
  6177  }
  6178  
  6179  // Fields allows partial responses to be retrieved. See
  6180  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6181  // details.
  6182  func (c *PropertiesCustomMetricsListCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsListCall {
  6183  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6184  	return c
  6185  }
  6186  
  6187  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6188  // object's ETag matches the given value. This is useful for getting updates
  6189  // only after the object has changed since the last request.
  6190  func (c *PropertiesCustomMetricsListCall) IfNoneMatch(entityTag string) *PropertiesCustomMetricsListCall {
  6191  	c.ifNoneMatch_ = entityTag
  6192  	return c
  6193  }
  6194  
  6195  // Context sets the context to be used in this call's Do method.
  6196  func (c *PropertiesCustomMetricsListCall) Context(ctx context.Context) *PropertiesCustomMetricsListCall {
  6197  	c.ctx_ = ctx
  6198  	return c
  6199  }
  6200  
  6201  // Header returns a http.Header that can be modified by the caller to add
  6202  // headers to the request.
  6203  func (c *PropertiesCustomMetricsListCall) Header() http.Header {
  6204  	if c.header_ == nil {
  6205  		c.header_ = make(http.Header)
  6206  	}
  6207  	return c.header_
  6208  }
  6209  
  6210  func (c *PropertiesCustomMetricsListCall) doRequest(alt string) (*http.Response, error) {
  6211  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6212  	if c.ifNoneMatch_ != "" {
  6213  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6214  	}
  6215  	var body io.Reader = nil
  6216  	c.urlParams_.Set("alt", alt)
  6217  	c.urlParams_.Set("prettyPrint", "false")
  6218  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/customMetrics")
  6219  	urls += "?" + c.urlParams_.Encode()
  6220  	req, err := http.NewRequest("GET", urls, body)
  6221  	if err != nil {
  6222  		return nil, err
  6223  	}
  6224  	req.Header = reqHeaders
  6225  	googleapi.Expand(req.URL, map[string]string{
  6226  		"parent": c.parent,
  6227  	})
  6228  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6229  }
  6230  
  6231  // Do executes the "analyticsadmin.properties.customMetrics.list" call.
  6232  // Any non-2xx status code is an error. Response headers are in either
  6233  // *GoogleAnalyticsAdminV1betaListCustomMetricsResponse.ServerResponse.Header
  6234  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  6235  // Use googleapi.IsNotModified to check whether the returned error was because
  6236  // http.StatusNotModified was returned.
  6237  func (c *PropertiesCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListCustomMetricsResponse, error) {
  6238  	gensupport.SetOptions(c.urlParams_, opts...)
  6239  	res, err := c.doRequest("json")
  6240  	if res != nil && res.StatusCode == http.StatusNotModified {
  6241  		if res.Body != nil {
  6242  			res.Body.Close()
  6243  		}
  6244  		return nil, gensupport.WrapError(&googleapi.Error{
  6245  			Code:   res.StatusCode,
  6246  			Header: res.Header,
  6247  		})
  6248  	}
  6249  	if err != nil {
  6250  		return nil, err
  6251  	}
  6252  	defer googleapi.CloseBody(res)
  6253  	if err := googleapi.CheckResponse(res); err != nil {
  6254  		return nil, gensupport.WrapError(err)
  6255  	}
  6256  	ret := &GoogleAnalyticsAdminV1betaListCustomMetricsResponse{
  6257  		ServerResponse: googleapi.ServerResponse{
  6258  			Header:         res.Header,
  6259  			HTTPStatusCode: res.StatusCode,
  6260  		},
  6261  	}
  6262  	target := &ret
  6263  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6264  		return nil, err
  6265  	}
  6266  	return ret, nil
  6267  }
  6268  
  6269  // Pages invokes f for each page of results.
  6270  // A non-nil error returned from f will halt the iteration.
  6271  // The provided context supersedes any context provided to the Context method.
  6272  func (c *PropertiesCustomMetricsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListCustomMetricsResponse) error) error {
  6273  	c.ctx_ = ctx
  6274  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6275  	for {
  6276  		x, err := c.Do()
  6277  		if err != nil {
  6278  			return err
  6279  		}
  6280  		if err := f(x); err != nil {
  6281  			return err
  6282  		}
  6283  		if x.NextPageToken == "" {
  6284  			return nil
  6285  		}
  6286  		c.PageToken(x.NextPageToken)
  6287  	}
  6288  }
  6289  
  6290  type PropertiesCustomMetricsPatchCall struct {
  6291  	s                                      *Service
  6292  	name                                   string
  6293  	googleanalyticsadminv1betacustommetric *GoogleAnalyticsAdminV1betaCustomMetric
  6294  	urlParams_                             gensupport.URLParams
  6295  	ctx_                                   context.Context
  6296  	header_                                http.Header
  6297  }
  6298  
  6299  // Patch: Updates a CustomMetric on a property.
  6300  //
  6301  //   - name: Output only. Resource name for this CustomMetric resource. Format:
  6302  //     properties/{property}/customMetrics/{customMetric}.
  6303  func (r *PropertiesCustomMetricsService) Patch(name string, googleanalyticsadminv1betacustommetric *GoogleAnalyticsAdminV1betaCustomMetric) *PropertiesCustomMetricsPatchCall {
  6304  	c := &PropertiesCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6305  	c.name = name
  6306  	c.googleanalyticsadminv1betacustommetric = googleanalyticsadminv1betacustommetric
  6307  	return c
  6308  }
  6309  
  6310  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  6311  // fields to be updated. Omitted fields will not be updated. To replace the
  6312  // entire entity, use one path with the string "*" to match all fields.
  6313  func (c *PropertiesCustomMetricsPatchCall) UpdateMask(updateMask string) *PropertiesCustomMetricsPatchCall {
  6314  	c.urlParams_.Set("updateMask", updateMask)
  6315  	return c
  6316  }
  6317  
  6318  // Fields allows partial responses to be retrieved. See
  6319  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6320  // details.
  6321  func (c *PropertiesCustomMetricsPatchCall) Fields(s ...googleapi.Field) *PropertiesCustomMetricsPatchCall {
  6322  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6323  	return c
  6324  }
  6325  
  6326  // Context sets the context to be used in this call's Do method.
  6327  func (c *PropertiesCustomMetricsPatchCall) Context(ctx context.Context) *PropertiesCustomMetricsPatchCall {
  6328  	c.ctx_ = ctx
  6329  	return c
  6330  }
  6331  
  6332  // Header returns a http.Header that can be modified by the caller to add
  6333  // headers to the request.
  6334  func (c *PropertiesCustomMetricsPatchCall) Header() http.Header {
  6335  	if c.header_ == nil {
  6336  		c.header_ = make(http.Header)
  6337  	}
  6338  	return c.header_
  6339  }
  6340  
  6341  func (c *PropertiesCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) {
  6342  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6343  	var body io.Reader = nil
  6344  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betacustommetric)
  6345  	if err != nil {
  6346  		return nil, err
  6347  	}
  6348  	c.urlParams_.Set("alt", alt)
  6349  	c.urlParams_.Set("prettyPrint", "false")
  6350  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  6351  	urls += "?" + c.urlParams_.Encode()
  6352  	req, err := http.NewRequest("PATCH", urls, body)
  6353  	if err != nil {
  6354  		return nil, err
  6355  	}
  6356  	req.Header = reqHeaders
  6357  	googleapi.Expand(req.URL, map[string]string{
  6358  		"name": c.name,
  6359  	})
  6360  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6361  }
  6362  
  6363  // Do executes the "analyticsadmin.properties.customMetrics.patch" call.
  6364  // Any non-2xx status code is an error. Response headers are in either
  6365  // *GoogleAnalyticsAdminV1betaCustomMetric.ServerResponse.Header or (if a
  6366  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6367  // googleapi.IsNotModified to check whether the returned error was because
  6368  // http.StatusNotModified was returned.
  6369  func (c *PropertiesCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaCustomMetric, error) {
  6370  	gensupport.SetOptions(c.urlParams_, opts...)
  6371  	res, err := c.doRequest("json")
  6372  	if res != nil && res.StatusCode == http.StatusNotModified {
  6373  		if res.Body != nil {
  6374  			res.Body.Close()
  6375  		}
  6376  		return nil, gensupport.WrapError(&googleapi.Error{
  6377  			Code:   res.StatusCode,
  6378  			Header: res.Header,
  6379  		})
  6380  	}
  6381  	if err != nil {
  6382  		return nil, err
  6383  	}
  6384  	defer googleapi.CloseBody(res)
  6385  	if err := googleapi.CheckResponse(res); err != nil {
  6386  		return nil, gensupport.WrapError(err)
  6387  	}
  6388  	ret := &GoogleAnalyticsAdminV1betaCustomMetric{
  6389  		ServerResponse: googleapi.ServerResponse{
  6390  			Header:         res.Header,
  6391  			HTTPStatusCode: res.StatusCode,
  6392  		},
  6393  	}
  6394  	target := &ret
  6395  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6396  		return nil, err
  6397  	}
  6398  	return ret, nil
  6399  }
  6400  
  6401  type PropertiesDataStreamsCreateCall struct {
  6402  	s                                    *Service
  6403  	parent                               string
  6404  	googleanalyticsadminv1betadatastream *GoogleAnalyticsAdminV1betaDataStream
  6405  	urlParams_                           gensupport.URLParams
  6406  	ctx_                                 context.Context
  6407  	header_                              http.Header
  6408  }
  6409  
  6410  // Create: Creates a DataStream.
  6411  //
  6412  // - parent: Example format: properties/1234.
  6413  func (r *PropertiesDataStreamsService) Create(parent string, googleanalyticsadminv1betadatastream *GoogleAnalyticsAdminV1betaDataStream) *PropertiesDataStreamsCreateCall {
  6414  	c := &PropertiesDataStreamsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6415  	c.parent = parent
  6416  	c.googleanalyticsadminv1betadatastream = googleanalyticsadminv1betadatastream
  6417  	return c
  6418  }
  6419  
  6420  // Fields allows partial responses to be retrieved. See
  6421  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6422  // details.
  6423  func (c *PropertiesDataStreamsCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsCreateCall {
  6424  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6425  	return c
  6426  }
  6427  
  6428  // Context sets the context to be used in this call's Do method.
  6429  func (c *PropertiesDataStreamsCreateCall) Context(ctx context.Context) *PropertiesDataStreamsCreateCall {
  6430  	c.ctx_ = ctx
  6431  	return c
  6432  }
  6433  
  6434  // Header returns a http.Header that can be modified by the caller to add
  6435  // headers to the request.
  6436  func (c *PropertiesDataStreamsCreateCall) Header() http.Header {
  6437  	if c.header_ == nil {
  6438  		c.header_ = make(http.Header)
  6439  	}
  6440  	return c.header_
  6441  }
  6442  
  6443  func (c *PropertiesDataStreamsCreateCall) doRequest(alt string) (*http.Response, error) {
  6444  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6445  	var body io.Reader = nil
  6446  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betadatastream)
  6447  	if err != nil {
  6448  		return nil, err
  6449  	}
  6450  	c.urlParams_.Set("alt", alt)
  6451  	c.urlParams_.Set("prettyPrint", "false")
  6452  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStreams")
  6453  	urls += "?" + c.urlParams_.Encode()
  6454  	req, err := http.NewRequest("POST", urls, body)
  6455  	if err != nil {
  6456  		return nil, err
  6457  	}
  6458  	req.Header = reqHeaders
  6459  	googleapi.Expand(req.URL, map[string]string{
  6460  		"parent": c.parent,
  6461  	})
  6462  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6463  }
  6464  
  6465  // Do executes the "analyticsadmin.properties.dataStreams.create" call.
  6466  // Any non-2xx status code is an error. Response headers are in either
  6467  // *GoogleAnalyticsAdminV1betaDataStream.ServerResponse.Header or (if a
  6468  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6469  // googleapi.IsNotModified to check whether the returned error was because
  6470  // http.StatusNotModified was returned.
  6471  func (c *PropertiesDataStreamsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaDataStream, error) {
  6472  	gensupport.SetOptions(c.urlParams_, opts...)
  6473  	res, err := c.doRequest("json")
  6474  	if res != nil && res.StatusCode == http.StatusNotModified {
  6475  		if res.Body != nil {
  6476  			res.Body.Close()
  6477  		}
  6478  		return nil, gensupport.WrapError(&googleapi.Error{
  6479  			Code:   res.StatusCode,
  6480  			Header: res.Header,
  6481  		})
  6482  	}
  6483  	if err != nil {
  6484  		return nil, err
  6485  	}
  6486  	defer googleapi.CloseBody(res)
  6487  	if err := googleapi.CheckResponse(res); err != nil {
  6488  		return nil, gensupport.WrapError(err)
  6489  	}
  6490  	ret := &GoogleAnalyticsAdminV1betaDataStream{
  6491  		ServerResponse: googleapi.ServerResponse{
  6492  			Header:         res.Header,
  6493  			HTTPStatusCode: res.StatusCode,
  6494  		},
  6495  	}
  6496  	target := &ret
  6497  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6498  		return nil, err
  6499  	}
  6500  	return ret, nil
  6501  }
  6502  
  6503  type PropertiesDataStreamsDeleteCall struct {
  6504  	s          *Service
  6505  	name       string
  6506  	urlParams_ gensupport.URLParams
  6507  	ctx_       context.Context
  6508  	header_    http.Header
  6509  }
  6510  
  6511  // Delete: Deletes a DataStream on a property.
  6512  //
  6513  //   - name: The name of the DataStream to delete. Example format:
  6514  //     properties/1234/dataStreams/5678.
  6515  func (r *PropertiesDataStreamsService) Delete(name string) *PropertiesDataStreamsDeleteCall {
  6516  	c := &PropertiesDataStreamsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6517  	c.name = name
  6518  	return c
  6519  }
  6520  
  6521  // Fields allows partial responses to be retrieved. See
  6522  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6523  // details.
  6524  func (c *PropertiesDataStreamsDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsDeleteCall {
  6525  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6526  	return c
  6527  }
  6528  
  6529  // Context sets the context to be used in this call's Do method.
  6530  func (c *PropertiesDataStreamsDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsDeleteCall {
  6531  	c.ctx_ = ctx
  6532  	return c
  6533  }
  6534  
  6535  // Header returns a http.Header that can be modified by the caller to add
  6536  // headers to the request.
  6537  func (c *PropertiesDataStreamsDeleteCall) Header() http.Header {
  6538  	if c.header_ == nil {
  6539  		c.header_ = make(http.Header)
  6540  	}
  6541  	return c.header_
  6542  }
  6543  
  6544  func (c *PropertiesDataStreamsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6545  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6546  	var body io.Reader = nil
  6547  	c.urlParams_.Set("alt", alt)
  6548  	c.urlParams_.Set("prettyPrint", "false")
  6549  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  6550  	urls += "?" + c.urlParams_.Encode()
  6551  	req, err := http.NewRequest("DELETE", urls, body)
  6552  	if err != nil {
  6553  		return nil, err
  6554  	}
  6555  	req.Header = reqHeaders
  6556  	googleapi.Expand(req.URL, map[string]string{
  6557  		"name": c.name,
  6558  	})
  6559  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6560  }
  6561  
  6562  // Do executes the "analyticsadmin.properties.dataStreams.delete" call.
  6563  // Any non-2xx status code is an error. Response headers are in either
  6564  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  6565  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6566  // check whether the returned error was because http.StatusNotModified was
  6567  // returned.
  6568  func (c *PropertiesDataStreamsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  6569  	gensupport.SetOptions(c.urlParams_, opts...)
  6570  	res, err := c.doRequest("json")
  6571  	if res != nil && res.StatusCode == http.StatusNotModified {
  6572  		if res.Body != nil {
  6573  			res.Body.Close()
  6574  		}
  6575  		return nil, gensupport.WrapError(&googleapi.Error{
  6576  			Code:   res.StatusCode,
  6577  			Header: res.Header,
  6578  		})
  6579  	}
  6580  	if err != nil {
  6581  		return nil, err
  6582  	}
  6583  	defer googleapi.CloseBody(res)
  6584  	if err := googleapi.CheckResponse(res); err != nil {
  6585  		return nil, gensupport.WrapError(err)
  6586  	}
  6587  	ret := &GoogleProtobufEmpty{
  6588  		ServerResponse: googleapi.ServerResponse{
  6589  			Header:         res.Header,
  6590  			HTTPStatusCode: res.StatusCode,
  6591  		},
  6592  	}
  6593  	target := &ret
  6594  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6595  		return nil, err
  6596  	}
  6597  	return ret, nil
  6598  }
  6599  
  6600  type PropertiesDataStreamsGetCall struct {
  6601  	s            *Service
  6602  	name         string
  6603  	urlParams_   gensupport.URLParams
  6604  	ifNoneMatch_ string
  6605  	ctx_         context.Context
  6606  	header_      http.Header
  6607  }
  6608  
  6609  // Get: Lookup for a single DataStream.
  6610  //
  6611  //   - name: The name of the DataStream to get. Example format:
  6612  //     properties/1234/dataStreams/5678.
  6613  func (r *PropertiesDataStreamsService) Get(name string) *PropertiesDataStreamsGetCall {
  6614  	c := &PropertiesDataStreamsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6615  	c.name = name
  6616  	return c
  6617  }
  6618  
  6619  // Fields allows partial responses to be retrieved. See
  6620  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6621  // details.
  6622  func (c *PropertiesDataStreamsGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsGetCall {
  6623  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6624  	return c
  6625  }
  6626  
  6627  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6628  // object's ETag matches the given value. This is useful for getting updates
  6629  // only after the object has changed since the last request.
  6630  func (c *PropertiesDataStreamsGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsGetCall {
  6631  	c.ifNoneMatch_ = entityTag
  6632  	return c
  6633  }
  6634  
  6635  // Context sets the context to be used in this call's Do method.
  6636  func (c *PropertiesDataStreamsGetCall) Context(ctx context.Context) *PropertiesDataStreamsGetCall {
  6637  	c.ctx_ = ctx
  6638  	return c
  6639  }
  6640  
  6641  // Header returns a http.Header that can be modified by the caller to add
  6642  // headers to the request.
  6643  func (c *PropertiesDataStreamsGetCall) Header() http.Header {
  6644  	if c.header_ == nil {
  6645  		c.header_ = make(http.Header)
  6646  	}
  6647  	return c.header_
  6648  }
  6649  
  6650  func (c *PropertiesDataStreamsGetCall) doRequest(alt string) (*http.Response, error) {
  6651  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6652  	if c.ifNoneMatch_ != "" {
  6653  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6654  	}
  6655  	var body io.Reader = nil
  6656  	c.urlParams_.Set("alt", alt)
  6657  	c.urlParams_.Set("prettyPrint", "false")
  6658  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  6659  	urls += "?" + c.urlParams_.Encode()
  6660  	req, err := http.NewRequest("GET", urls, body)
  6661  	if err != nil {
  6662  		return nil, err
  6663  	}
  6664  	req.Header = reqHeaders
  6665  	googleapi.Expand(req.URL, map[string]string{
  6666  		"name": c.name,
  6667  	})
  6668  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6669  }
  6670  
  6671  // Do executes the "analyticsadmin.properties.dataStreams.get" call.
  6672  // Any non-2xx status code is an error. Response headers are in either
  6673  // *GoogleAnalyticsAdminV1betaDataStream.ServerResponse.Header or (if a
  6674  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6675  // googleapi.IsNotModified to check whether the returned error was because
  6676  // http.StatusNotModified was returned.
  6677  func (c *PropertiesDataStreamsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaDataStream, error) {
  6678  	gensupport.SetOptions(c.urlParams_, opts...)
  6679  	res, err := c.doRequest("json")
  6680  	if res != nil && res.StatusCode == http.StatusNotModified {
  6681  		if res.Body != nil {
  6682  			res.Body.Close()
  6683  		}
  6684  		return nil, gensupport.WrapError(&googleapi.Error{
  6685  			Code:   res.StatusCode,
  6686  			Header: res.Header,
  6687  		})
  6688  	}
  6689  	if err != nil {
  6690  		return nil, err
  6691  	}
  6692  	defer googleapi.CloseBody(res)
  6693  	if err := googleapi.CheckResponse(res); err != nil {
  6694  		return nil, gensupport.WrapError(err)
  6695  	}
  6696  	ret := &GoogleAnalyticsAdminV1betaDataStream{
  6697  		ServerResponse: googleapi.ServerResponse{
  6698  			Header:         res.Header,
  6699  			HTTPStatusCode: res.StatusCode,
  6700  		},
  6701  	}
  6702  	target := &ret
  6703  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6704  		return nil, err
  6705  	}
  6706  	return ret, nil
  6707  }
  6708  
  6709  type PropertiesDataStreamsListCall struct {
  6710  	s            *Service
  6711  	parent       string
  6712  	urlParams_   gensupport.URLParams
  6713  	ifNoneMatch_ string
  6714  	ctx_         context.Context
  6715  	header_      http.Header
  6716  }
  6717  
  6718  // List: Lists DataStreams on a property.
  6719  //
  6720  // - parent: Example format: properties/1234.
  6721  func (r *PropertiesDataStreamsService) List(parent string) *PropertiesDataStreamsListCall {
  6722  	c := &PropertiesDataStreamsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6723  	c.parent = parent
  6724  	return c
  6725  }
  6726  
  6727  // PageSize sets the optional parameter "pageSize": The maximum number of
  6728  // resources to return. If unspecified, at most 50 resources will be returned.
  6729  // The maximum value is 200 (higher values will be coerced to the maximum).
  6730  func (c *PropertiesDataStreamsListCall) PageSize(pageSize int64) *PropertiesDataStreamsListCall {
  6731  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6732  	return c
  6733  }
  6734  
  6735  // PageToken sets the optional parameter "pageToken": A page token, received
  6736  // from a previous `ListDataStreams` call. Provide this to retrieve the
  6737  // subsequent page. When paginating, all other parameters provided to
  6738  // `ListDataStreams` must match the call that provided the page token.
  6739  func (c *PropertiesDataStreamsListCall) PageToken(pageToken string) *PropertiesDataStreamsListCall {
  6740  	c.urlParams_.Set("pageToken", pageToken)
  6741  	return c
  6742  }
  6743  
  6744  // Fields allows partial responses to be retrieved. See
  6745  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6746  // details.
  6747  func (c *PropertiesDataStreamsListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsListCall {
  6748  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6749  	return c
  6750  }
  6751  
  6752  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6753  // object's ETag matches the given value. This is useful for getting updates
  6754  // only after the object has changed since the last request.
  6755  func (c *PropertiesDataStreamsListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsListCall {
  6756  	c.ifNoneMatch_ = entityTag
  6757  	return c
  6758  }
  6759  
  6760  // Context sets the context to be used in this call's Do method.
  6761  func (c *PropertiesDataStreamsListCall) Context(ctx context.Context) *PropertiesDataStreamsListCall {
  6762  	c.ctx_ = ctx
  6763  	return c
  6764  }
  6765  
  6766  // Header returns a http.Header that can be modified by the caller to add
  6767  // headers to the request.
  6768  func (c *PropertiesDataStreamsListCall) Header() http.Header {
  6769  	if c.header_ == nil {
  6770  		c.header_ = make(http.Header)
  6771  	}
  6772  	return c.header_
  6773  }
  6774  
  6775  func (c *PropertiesDataStreamsListCall) doRequest(alt string) (*http.Response, error) {
  6776  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6777  	if c.ifNoneMatch_ != "" {
  6778  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6779  	}
  6780  	var body io.Reader = nil
  6781  	c.urlParams_.Set("alt", alt)
  6782  	c.urlParams_.Set("prettyPrint", "false")
  6783  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStreams")
  6784  	urls += "?" + c.urlParams_.Encode()
  6785  	req, err := http.NewRequest("GET", urls, body)
  6786  	if err != nil {
  6787  		return nil, err
  6788  	}
  6789  	req.Header = reqHeaders
  6790  	googleapi.Expand(req.URL, map[string]string{
  6791  		"parent": c.parent,
  6792  	})
  6793  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6794  }
  6795  
  6796  // Do executes the "analyticsadmin.properties.dataStreams.list" call.
  6797  // Any non-2xx status code is an error. Response headers are in either
  6798  // *GoogleAnalyticsAdminV1betaListDataStreamsResponse.ServerResponse.Header or
  6799  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  6800  // googleapi.IsNotModified to check whether the returned error was because
  6801  // http.StatusNotModified was returned.
  6802  func (c *PropertiesDataStreamsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListDataStreamsResponse, error) {
  6803  	gensupport.SetOptions(c.urlParams_, opts...)
  6804  	res, err := c.doRequest("json")
  6805  	if res != nil && res.StatusCode == http.StatusNotModified {
  6806  		if res.Body != nil {
  6807  			res.Body.Close()
  6808  		}
  6809  		return nil, gensupport.WrapError(&googleapi.Error{
  6810  			Code:   res.StatusCode,
  6811  			Header: res.Header,
  6812  		})
  6813  	}
  6814  	if err != nil {
  6815  		return nil, err
  6816  	}
  6817  	defer googleapi.CloseBody(res)
  6818  	if err := googleapi.CheckResponse(res); err != nil {
  6819  		return nil, gensupport.WrapError(err)
  6820  	}
  6821  	ret := &GoogleAnalyticsAdminV1betaListDataStreamsResponse{
  6822  		ServerResponse: googleapi.ServerResponse{
  6823  			Header:         res.Header,
  6824  			HTTPStatusCode: res.StatusCode,
  6825  		},
  6826  	}
  6827  	target := &ret
  6828  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6829  		return nil, err
  6830  	}
  6831  	return ret, nil
  6832  }
  6833  
  6834  // Pages invokes f for each page of results.
  6835  // A non-nil error returned from f will halt the iteration.
  6836  // The provided context supersedes any context provided to the Context method.
  6837  func (c *PropertiesDataStreamsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListDataStreamsResponse) error) error {
  6838  	c.ctx_ = ctx
  6839  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6840  	for {
  6841  		x, err := c.Do()
  6842  		if err != nil {
  6843  			return err
  6844  		}
  6845  		if err := f(x); err != nil {
  6846  			return err
  6847  		}
  6848  		if x.NextPageToken == "" {
  6849  			return nil
  6850  		}
  6851  		c.PageToken(x.NextPageToken)
  6852  	}
  6853  }
  6854  
  6855  type PropertiesDataStreamsPatchCall struct {
  6856  	s                                    *Service
  6857  	name                                 string
  6858  	googleanalyticsadminv1betadatastream *GoogleAnalyticsAdminV1betaDataStream
  6859  	urlParams_                           gensupport.URLParams
  6860  	ctx_                                 context.Context
  6861  	header_                              http.Header
  6862  }
  6863  
  6864  // Patch: Updates a DataStream on a property.
  6865  //
  6866  //   - name: Output only. Resource name of this Data Stream. Format:
  6867  //     properties/{property_id}/dataStreams/{stream_id} Example:
  6868  //     "properties/1000/dataStreams/2000".
  6869  func (r *PropertiesDataStreamsService) Patch(name string, googleanalyticsadminv1betadatastream *GoogleAnalyticsAdminV1betaDataStream) *PropertiesDataStreamsPatchCall {
  6870  	c := &PropertiesDataStreamsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6871  	c.name = name
  6872  	c.googleanalyticsadminv1betadatastream = googleanalyticsadminv1betadatastream
  6873  	return c
  6874  }
  6875  
  6876  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  6877  // fields to be updated. Omitted fields will not be updated. To replace the
  6878  // entire entity, use one path with the string "*" to match all fields.
  6879  func (c *PropertiesDataStreamsPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsPatchCall {
  6880  	c.urlParams_.Set("updateMask", updateMask)
  6881  	return c
  6882  }
  6883  
  6884  // Fields allows partial responses to be retrieved. See
  6885  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6886  // details.
  6887  func (c *PropertiesDataStreamsPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsPatchCall {
  6888  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6889  	return c
  6890  }
  6891  
  6892  // Context sets the context to be used in this call's Do method.
  6893  func (c *PropertiesDataStreamsPatchCall) Context(ctx context.Context) *PropertiesDataStreamsPatchCall {
  6894  	c.ctx_ = ctx
  6895  	return c
  6896  }
  6897  
  6898  // Header returns a http.Header that can be modified by the caller to add
  6899  // headers to the request.
  6900  func (c *PropertiesDataStreamsPatchCall) Header() http.Header {
  6901  	if c.header_ == nil {
  6902  		c.header_ = make(http.Header)
  6903  	}
  6904  	return c.header_
  6905  }
  6906  
  6907  func (c *PropertiesDataStreamsPatchCall) doRequest(alt string) (*http.Response, error) {
  6908  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6909  	var body io.Reader = nil
  6910  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betadatastream)
  6911  	if err != nil {
  6912  		return nil, err
  6913  	}
  6914  	c.urlParams_.Set("alt", alt)
  6915  	c.urlParams_.Set("prettyPrint", "false")
  6916  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  6917  	urls += "?" + c.urlParams_.Encode()
  6918  	req, err := http.NewRequest("PATCH", urls, body)
  6919  	if err != nil {
  6920  		return nil, err
  6921  	}
  6922  	req.Header = reqHeaders
  6923  	googleapi.Expand(req.URL, map[string]string{
  6924  		"name": c.name,
  6925  	})
  6926  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6927  }
  6928  
  6929  // Do executes the "analyticsadmin.properties.dataStreams.patch" call.
  6930  // Any non-2xx status code is an error. Response headers are in either
  6931  // *GoogleAnalyticsAdminV1betaDataStream.ServerResponse.Header or (if a
  6932  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6933  // googleapi.IsNotModified to check whether the returned error was because
  6934  // http.StatusNotModified was returned.
  6935  func (c *PropertiesDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaDataStream, error) {
  6936  	gensupport.SetOptions(c.urlParams_, opts...)
  6937  	res, err := c.doRequest("json")
  6938  	if res != nil && res.StatusCode == http.StatusNotModified {
  6939  		if res.Body != nil {
  6940  			res.Body.Close()
  6941  		}
  6942  		return nil, gensupport.WrapError(&googleapi.Error{
  6943  			Code:   res.StatusCode,
  6944  			Header: res.Header,
  6945  		})
  6946  	}
  6947  	if err != nil {
  6948  		return nil, err
  6949  	}
  6950  	defer googleapi.CloseBody(res)
  6951  	if err := googleapi.CheckResponse(res); err != nil {
  6952  		return nil, gensupport.WrapError(err)
  6953  	}
  6954  	ret := &GoogleAnalyticsAdminV1betaDataStream{
  6955  		ServerResponse: googleapi.ServerResponse{
  6956  			Header:         res.Header,
  6957  			HTTPStatusCode: res.StatusCode,
  6958  		},
  6959  	}
  6960  	target := &ret
  6961  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6962  		return nil, err
  6963  	}
  6964  	return ret, nil
  6965  }
  6966  
  6967  type PropertiesDataStreamsMeasurementProtocolSecretsCreateCall struct {
  6968  	s                                                   *Service
  6969  	parent                                              string
  6970  	googleanalyticsadminv1betameasurementprotocolsecret *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret
  6971  	urlParams_                                          gensupport.URLParams
  6972  	ctx_                                                context.Context
  6973  	header_                                             http.Header
  6974  }
  6975  
  6976  // Create: Creates a measurement protocol secret.
  6977  //
  6978  //   - parent: The parent resource where this secret will be created. Format:
  6979  //     properties/{property}/dataStreams/{dataStream}.
  6980  func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Create(parent string, googleanalyticsadminv1betameasurementprotocolsecret *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall {
  6981  	c := &PropertiesDataStreamsMeasurementProtocolSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6982  	c.parent = parent
  6983  	c.googleanalyticsadminv1betameasurementprotocolsecret = googleanalyticsadminv1betameasurementprotocolsecret
  6984  	return c
  6985  }
  6986  
  6987  // Fields allows partial responses to be retrieved. See
  6988  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6989  // details.
  6990  func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall {
  6991  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6992  	return c
  6993  }
  6994  
  6995  // Context sets the context to be used in this call's Do method.
  6996  func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall {
  6997  	c.ctx_ = ctx
  6998  	return c
  6999  }
  7000  
  7001  // Header returns a http.Header that can be modified by the caller to add
  7002  // headers to the request.
  7003  func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Header() http.Header {
  7004  	if c.header_ == nil {
  7005  		c.header_ = make(http.Header)
  7006  	}
  7007  	return c.header_
  7008  }
  7009  
  7010  func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) doRequest(alt string) (*http.Response, error) {
  7011  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7012  	var body io.Reader = nil
  7013  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betameasurementprotocolsecret)
  7014  	if err != nil {
  7015  		return nil, err
  7016  	}
  7017  	c.urlParams_.Set("alt", alt)
  7018  	c.urlParams_.Set("prettyPrint", "false")
  7019  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/measurementProtocolSecrets")
  7020  	urls += "?" + c.urlParams_.Encode()
  7021  	req, err := http.NewRequest("POST", urls, body)
  7022  	if err != nil {
  7023  		return nil, err
  7024  	}
  7025  	req.Header = reqHeaders
  7026  	googleapi.Expand(req.URL, map[string]string{
  7027  		"parent": c.parent,
  7028  	})
  7029  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7030  }
  7031  
  7032  // Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create" call.
  7033  // Any non-2xx status code is an error. Response headers are in either
  7034  // *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret.ServerResponse.Header
  7035  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  7036  // Use googleapi.IsNotModified to check whether the returned error was because
  7037  // http.StatusNotModified was returned.
  7038  func (c *PropertiesDataStreamsMeasurementProtocolSecretsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaMeasurementProtocolSecret, error) {
  7039  	gensupport.SetOptions(c.urlParams_, opts...)
  7040  	res, err := c.doRequest("json")
  7041  	if res != nil && res.StatusCode == http.StatusNotModified {
  7042  		if res.Body != nil {
  7043  			res.Body.Close()
  7044  		}
  7045  		return nil, gensupport.WrapError(&googleapi.Error{
  7046  			Code:   res.StatusCode,
  7047  			Header: res.Header,
  7048  		})
  7049  	}
  7050  	if err != nil {
  7051  		return nil, err
  7052  	}
  7053  	defer googleapi.CloseBody(res)
  7054  	if err := googleapi.CheckResponse(res); err != nil {
  7055  		return nil, gensupport.WrapError(err)
  7056  	}
  7057  	ret := &GoogleAnalyticsAdminV1betaMeasurementProtocolSecret{
  7058  		ServerResponse: googleapi.ServerResponse{
  7059  			Header:         res.Header,
  7060  			HTTPStatusCode: res.StatusCode,
  7061  		},
  7062  	}
  7063  	target := &ret
  7064  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7065  		return nil, err
  7066  	}
  7067  	return ret, nil
  7068  }
  7069  
  7070  type PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall struct {
  7071  	s          *Service
  7072  	name       string
  7073  	urlParams_ gensupport.URLParams
  7074  	ctx_       context.Context
  7075  	header_    http.Header
  7076  }
  7077  
  7078  // Delete: Deletes target MeasurementProtocolSecret.
  7079  //
  7080  //   - name: The name of the MeasurementProtocolSecret to delete. Format:
  7081  //     properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{
  7082  //     measurementProtocolSecret}.
  7083  func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Delete(name string) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall {
  7084  	c := &PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7085  	c.name = name
  7086  	return c
  7087  }
  7088  
  7089  // Fields allows partial responses to be retrieved. See
  7090  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7091  // details.
  7092  func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall {
  7093  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7094  	return c
  7095  }
  7096  
  7097  // Context sets the context to be used in this call's Do method.
  7098  func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall {
  7099  	c.ctx_ = ctx
  7100  	return c
  7101  }
  7102  
  7103  // Header returns a http.Header that can be modified by the caller to add
  7104  // headers to the request.
  7105  func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Header() http.Header {
  7106  	if c.header_ == nil {
  7107  		c.header_ = make(http.Header)
  7108  	}
  7109  	return c.header_
  7110  }
  7111  
  7112  func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7113  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7114  	var body io.Reader = nil
  7115  	c.urlParams_.Set("alt", alt)
  7116  	c.urlParams_.Set("prettyPrint", "false")
  7117  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  7118  	urls += "?" + c.urlParams_.Encode()
  7119  	req, err := http.NewRequest("DELETE", urls, body)
  7120  	if err != nil {
  7121  		return nil, err
  7122  	}
  7123  	req.Header = reqHeaders
  7124  	googleapi.Expand(req.URL, map[string]string{
  7125  		"name": c.name,
  7126  	})
  7127  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7128  }
  7129  
  7130  // Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.delete" call.
  7131  // Any non-2xx status code is an error. Response headers are in either
  7132  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  7133  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7134  // check whether the returned error was because http.StatusNotModified was
  7135  // returned.
  7136  func (c *PropertiesDataStreamsMeasurementProtocolSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  7137  	gensupport.SetOptions(c.urlParams_, opts...)
  7138  	res, err := c.doRequest("json")
  7139  	if res != nil && res.StatusCode == http.StatusNotModified {
  7140  		if res.Body != nil {
  7141  			res.Body.Close()
  7142  		}
  7143  		return nil, gensupport.WrapError(&googleapi.Error{
  7144  			Code:   res.StatusCode,
  7145  			Header: res.Header,
  7146  		})
  7147  	}
  7148  	if err != nil {
  7149  		return nil, err
  7150  	}
  7151  	defer googleapi.CloseBody(res)
  7152  	if err := googleapi.CheckResponse(res); err != nil {
  7153  		return nil, gensupport.WrapError(err)
  7154  	}
  7155  	ret := &GoogleProtobufEmpty{
  7156  		ServerResponse: googleapi.ServerResponse{
  7157  			Header:         res.Header,
  7158  			HTTPStatusCode: res.StatusCode,
  7159  		},
  7160  	}
  7161  	target := &ret
  7162  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7163  		return nil, err
  7164  	}
  7165  	return ret, nil
  7166  }
  7167  
  7168  type PropertiesDataStreamsMeasurementProtocolSecretsGetCall struct {
  7169  	s            *Service
  7170  	name         string
  7171  	urlParams_   gensupport.URLParams
  7172  	ifNoneMatch_ string
  7173  	ctx_         context.Context
  7174  	header_      http.Header
  7175  }
  7176  
  7177  // Get: Lookup for a single "GA4" MeasurementProtocolSecret.
  7178  //
  7179  //   - name: The name of the measurement protocol secret to lookup. Format:
  7180  //     properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{
  7181  //     measurementProtocolSecret}.
  7182  func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Get(name string) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall {
  7183  	c := &PropertiesDataStreamsMeasurementProtocolSecretsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7184  	c.name = name
  7185  	return c
  7186  }
  7187  
  7188  // Fields allows partial responses to be retrieved. See
  7189  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7190  // details.
  7191  func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall {
  7192  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7193  	return c
  7194  }
  7195  
  7196  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7197  // object's ETag matches the given value. This is useful for getting updates
  7198  // only after the object has changed since the last request.
  7199  func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall {
  7200  	c.ifNoneMatch_ = entityTag
  7201  	return c
  7202  }
  7203  
  7204  // Context sets the context to be used in this call's Do method.
  7205  func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsGetCall {
  7206  	c.ctx_ = ctx
  7207  	return c
  7208  }
  7209  
  7210  // Header returns a http.Header that can be modified by the caller to add
  7211  // headers to the request.
  7212  func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Header() http.Header {
  7213  	if c.header_ == nil {
  7214  		c.header_ = make(http.Header)
  7215  	}
  7216  	return c.header_
  7217  }
  7218  
  7219  func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) doRequest(alt string) (*http.Response, error) {
  7220  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7221  	if c.ifNoneMatch_ != "" {
  7222  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7223  	}
  7224  	var body io.Reader = nil
  7225  	c.urlParams_.Set("alt", alt)
  7226  	c.urlParams_.Set("prettyPrint", "false")
  7227  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  7228  	urls += "?" + c.urlParams_.Encode()
  7229  	req, err := http.NewRequest("GET", urls, body)
  7230  	if err != nil {
  7231  		return nil, err
  7232  	}
  7233  	req.Header = reqHeaders
  7234  	googleapi.Expand(req.URL, map[string]string{
  7235  		"name": c.name,
  7236  	})
  7237  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7238  }
  7239  
  7240  // Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get" call.
  7241  // Any non-2xx status code is an error. Response headers are in either
  7242  // *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret.ServerResponse.Header
  7243  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  7244  // Use googleapi.IsNotModified to check whether the returned error was because
  7245  // http.StatusNotModified was returned.
  7246  func (c *PropertiesDataStreamsMeasurementProtocolSecretsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaMeasurementProtocolSecret, error) {
  7247  	gensupport.SetOptions(c.urlParams_, opts...)
  7248  	res, err := c.doRequest("json")
  7249  	if res != nil && res.StatusCode == http.StatusNotModified {
  7250  		if res.Body != nil {
  7251  			res.Body.Close()
  7252  		}
  7253  		return nil, gensupport.WrapError(&googleapi.Error{
  7254  			Code:   res.StatusCode,
  7255  			Header: res.Header,
  7256  		})
  7257  	}
  7258  	if err != nil {
  7259  		return nil, err
  7260  	}
  7261  	defer googleapi.CloseBody(res)
  7262  	if err := googleapi.CheckResponse(res); err != nil {
  7263  		return nil, gensupport.WrapError(err)
  7264  	}
  7265  	ret := &GoogleAnalyticsAdminV1betaMeasurementProtocolSecret{
  7266  		ServerResponse: googleapi.ServerResponse{
  7267  			Header:         res.Header,
  7268  			HTTPStatusCode: res.StatusCode,
  7269  		},
  7270  	}
  7271  	target := &ret
  7272  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7273  		return nil, err
  7274  	}
  7275  	return ret, nil
  7276  }
  7277  
  7278  type PropertiesDataStreamsMeasurementProtocolSecretsListCall struct {
  7279  	s            *Service
  7280  	parent       string
  7281  	urlParams_   gensupport.URLParams
  7282  	ifNoneMatch_ string
  7283  	ctx_         context.Context
  7284  	header_      http.Header
  7285  }
  7286  
  7287  // List: Returns child MeasurementProtocolSecrets under the specified parent
  7288  // Property.
  7289  //
  7290  //   - parent: The resource name of the parent stream. Format:
  7291  //     properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets.
  7292  func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) List(parent string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall {
  7293  	c := &PropertiesDataStreamsMeasurementProtocolSecretsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7294  	c.parent = parent
  7295  	return c
  7296  }
  7297  
  7298  // PageSize sets the optional parameter "pageSize": The maximum number of
  7299  // resources to return. If unspecified, at most 10 resources will be returned.
  7300  // The maximum value is 10. Higher values will be coerced to the maximum.
  7301  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) PageSize(pageSize int64) *PropertiesDataStreamsMeasurementProtocolSecretsListCall {
  7302  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7303  	return c
  7304  }
  7305  
  7306  // PageToken sets the optional parameter "pageToken": A page token, received
  7307  // from a previous `ListMeasurementProtocolSecrets` call. Provide this to
  7308  // retrieve the subsequent page. When paginating, all other parameters provided
  7309  // to `ListMeasurementProtocolSecrets` must match the call that provided the
  7310  // page token.
  7311  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) PageToken(pageToken string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall {
  7312  	c.urlParams_.Set("pageToken", pageToken)
  7313  	return c
  7314  }
  7315  
  7316  // Fields allows partial responses to be retrieved. See
  7317  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7318  // details.
  7319  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsListCall {
  7320  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7321  	return c
  7322  }
  7323  
  7324  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7325  // object's ETag matches the given value. This is useful for getting updates
  7326  // only after the object has changed since the last request.
  7327  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsMeasurementProtocolSecretsListCall {
  7328  	c.ifNoneMatch_ = entityTag
  7329  	return c
  7330  }
  7331  
  7332  // Context sets the context to be used in this call's Do method.
  7333  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsListCall {
  7334  	c.ctx_ = ctx
  7335  	return c
  7336  }
  7337  
  7338  // Header returns a http.Header that can be modified by the caller to add
  7339  // headers to the request.
  7340  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Header() http.Header {
  7341  	if c.header_ == nil {
  7342  		c.header_ = make(http.Header)
  7343  	}
  7344  	return c.header_
  7345  }
  7346  
  7347  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) doRequest(alt string) (*http.Response, error) {
  7348  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7349  	if c.ifNoneMatch_ != "" {
  7350  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7351  	}
  7352  	var body io.Reader = nil
  7353  	c.urlParams_.Set("alt", alt)
  7354  	c.urlParams_.Set("prettyPrint", "false")
  7355  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/measurementProtocolSecrets")
  7356  	urls += "?" + c.urlParams_.Encode()
  7357  	req, err := http.NewRequest("GET", urls, body)
  7358  	if err != nil {
  7359  		return nil, err
  7360  	}
  7361  	req.Header = reqHeaders
  7362  	googleapi.Expand(req.URL, map[string]string{
  7363  		"parent": c.parent,
  7364  	})
  7365  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7366  }
  7367  
  7368  // Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.list" call.
  7369  // Any non-2xx status code is an error. Response headers are in either
  7370  // *GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse.ServerRespo
  7371  // nse.Header or (if a response was returned at all) in
  7372  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7373  // whether the returned error was because http.StatusNotModified was returned.
  7374  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse, error) {
  7375  	gensupport.SetOptions(c.urlParams_, opts...)
  7376  	res, err := c.doRequest("json")
  7377  	if res != nil && res.StatusCode == http.StatusNotModified {
  7378  		if res.Body != nil {
  7379  			res.Body.Close()
  7380  		}
  7381  		return nil, gensupport.WrapError(&googleapi.Error{
  7382  			Code:   res.StatusCode,
  7383  			Header: res.Header,
  7384  		})
  7385  	}
  7386  	if err != nil {
  7387  		return nil, err
  7388  	}
  7389  	defer googleapi.CloseBody(res)
  7390  	if err := googleapi.CheckResponse(res); err != nil {
  7391  		return nil, gensupport.WrapError(err)
  7392  	}
  7393  	ret := &GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse{
  7394  		ServerResponse: googleapi.ServerResponse{
  7395  			Header:         res.Header,
  7396  			HTTPStatusCode: res.StatusCode,
  7397  		},
  7398  	}
  7399  	target := &ret
  7400  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7401  		return nil, err
  7402  	}
  7403  	return ret, nil
  7404  }
  7405  
  7406  // Pages invokes f for each page of results.
  7407  // A non-nil error returned from f will halt the iteration.
  7408  // The provided context supersedes any context provided to the Context method.
  7409  func (c *PropertiesDataStreamsMeasurementProtocolSecretsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListMeasurementProtocolSecretsResponse) error) error {
  7410  	c.ctx_ = ctx
  7411  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7412  	for {
  7413  		x, err := c.Do()
  7414  		if err != nil {
  7415  			return err
  7416  		}
  7417  		if err := f(x); err != nil {
  7418  			return err
  7419  		}
  7420  		if x.NextPageToken == "" {
  7421  			return nil
  7422  		}
  7423  		c.PageToken(x.NextPageToken)
  7424  	}
  7425  }
  7426  
  7427  type PropertiesDataStreamsMeasurementProtocolSecretsPatchCall struct {
  7428  	s                                                   *Service
  7429  	name                                                string
  7430  	googleanalyticsadminv1betameasurementprotocolsecret *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret
  7431  	urlParams_                                          gensupport.URLParams
  7432  	ctx_                                                context.Context
  7433  	header_                                             http.Header
  7434  }
  7435  
  7436  // Patch: Updates a measurement protocol secret.
  7437  //
  7438  //   - name: Output only. Resource name of this secret. This secret may be a
  7439  //     child of any type of stream. Format:
  7440  //     properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{
  7441  //     measurementProtocolSecret}.
  7442  func (r *PropertiesDataStreamsMeasurementProtocolSecretsService) Patch(name string, googleanalyticsadminv1betameasurementprotocolsecret *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall {
  7443  	c := &PropertiesDataStreamsMeasurementProtocolSecretsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7444  	c.name = name
  7445  	c.googleanalyticsadminv1betameasurementprotocolsecret = googleanalyticsadminv1betameasurementprotocolsecret
  7446  	return c
  7447  }
  7448  
  7449  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  7450  // fields to be updated. Omitted fields will not be updated.
  7451  func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall {
  7452  	c.urlParams_.Set("updateMask", updateMask)
  7453  	return c
  7454  }
  7455  
  7456  // Fields allows partial responses to be retrieved. See
  7457  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7458  // details.
  7459  func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall {
  7460  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7461  	return c
  7462  }
  7463  
  7464  // Context sets the context to be used in this call's Do method.
  7465  func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Context(ctx context.Context) *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall {
  7466  	c.ctx_ = ctx
  7467  	return c
  7468  }
  7469  
  7470  // Header returns a http.Header that can be modified by the caller to add
  7471  // headers to the request.
  7472  func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Header() http.Header {
  7473  	if c.header_ == nil {
  7474  		c.header_ = make(http.Header)
  7475  	}
  7476  	return c.header_
  7477  }
  7478  
  7479  func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) doRequest(alt string) (*http.Response, error) {
  7480  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7481  	var body io.Reader = nil
  7482  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betameasurementprotocolsecret)
  7483  	if err != nil {
  7484  		return nil, err
  7485  	}
  7486  	c.urlParams_.Set("alt", alt)
  7487  	c.urlParams_.Set("prettyPrint", "false")
  7488  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  7489  	urls += "?" + c.urlParams_.Encode()
  7490  	req, err := http.NewRequest("PATCH", urls, body)
  7491  	if err != nil {
  7492  		return nil, err
  7493  	}
  7494  	req.Header = reqHeaders
  7495  	googleapi.Expand(req.URL, map[string]string{
  7496  		"name": c.name,
  7497  	})
  7498  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7499  }
  7500  
  7501  // Do executes the "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch" call.
  7502  // Any non-2xx status code is an error. Response headers are in either
  7503  // *GoogleAnalyticsAdminV1betaMeasurementProtocolSecret.ServerResponse.Header
  7504  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  7505  // Use googleapi.IsNotModified to check whether the returned error was because
  7506  // http.StatusNotModified was returned.
  7507  func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaMeasurementProtocolSecret, error) {
  7508  	gensupport.SetOptions(c.urlParams_, opts...)
  7509  	res, err := c.doRequest("json")
  7510  	if res != nil && res.StatusCode == http.StatusNotModified {
  7511  		if res.Body != nil {
  7512  			res.Body.Close()
  7513  		}
  7514  		return nil, gensupport.WrapError(&googleapi.Error{
  7515  			Code:   res.StatusCode,
  7516  			Header: res.Header,
  7517  		})
  7518  	}
  7519  	if err != nil {
  7520  		return nil, err
  7521  	}
  7522  	defer googleapi.CloseBody(res)
  7523  	if err := googleapi.CheckResponse(res); err != nil {
  7524  		return nil, gensupport.WrapError(err)
  7525  	}
  7526  	ret := &GoogleAnalyticsAdminV1betaMeasurementProtocolSecret{
  7527  		ServerResponse: googleapi.ServerResponse{
  7528  			Header:         res.Header,
  7529  			HTTPStatusCode: res.StatusCode,
  7530  		},
  7531  	}
  7532  	target := &ret
  7533  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7534  		return nil, err
  7535  	}
  7536  	return ret, nil
  7537  }
  7538  
  7539  type PropertiesFirebaseLinksCreateCall struct {
  7540  	s                                      *Service
  7541  	parent                                 string
  7542  	googleanalyticsadminv1betafirebaselink *GoogleAnalyticsAdminV1betaFirebaseLink
  7543  	urlParams_                             gensupport.URLParams
  7544  	ctx_                                   context.Context
  7545  	header_                                http.Header
  7546  }
  7547  
  7548  // Create: Creates a FirebaseLink. Properties can have at most one
  7549  // FirebaseLink.
  7550  //
  7551  // - parent: Format: properties/{property_id} Example: properties/1234.
  7552  func (r *PropertiesFirebaseLinksService) Create(parent string, googleanalyticsadminv1betafirebaselink *GoogleAnalyticsAdminV1betaFirebaseLink) *PropertiesFirebaseLinksCreateCall {
  7553  	c := &PropertiesFirebaseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7554  	c.parent = parent
  7555  	c.googleanalyticsadminv1betafirebaselink = googleanalyticsadminv1betafirebaselink
  7556  	return c
  7557  }
  7558  
  7559  // Fields allows partial responses to be retrieved. See
  7560  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7561  // details.
  7562  func (c *PropertiesFirebaseLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksCreateCall {
  7563  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7564  	return c
  7565  }
  7566  
  7567  // Context sets the context to be used in this call's Do method.
  7568  func (c *PropertiesFirebaseLinksCreateCall) Context(ctx context.Context) *PropertiesFirebaseLinksCreateCall {
  7569  	c.ctx_ = ctx
  7570  	return c
  7571  }
  7572  
  7573  // Header returns a http.Header that can be modified by the caller to add
  7574  // headers to the request.
  7575  func (c *PropertiesFirebaseLinksCreateCall) Header() http.Header {
  7576  	if c.header_ == nil {
  7577  		c.header_ = make(http.Header)
  7578  	}
  7579  	return c.header_
  7580  }
  7581  
  7582  func (c *PropertiesFirebaseLinksCreateCall) doRequest(alt string) (*http.Response, error) {
  7583  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7584  	var body io.Reader = nil
  7585  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betafirebaselink)
  7586  	if err != nil {
  7587  		return nil, err
  7588  	}
  7589  	c.urlParams_.Set("alt", alt)
  7590  	c.urlParams_.Set("prettyPrint", "false")
  7591  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/firebaseLinks")
  7592  	urls += "?" + c.urlParams_.Encode()
  7593  	req, err := http.NewRequest("POST", urls, body)
  7594  	if err != nil {
  7595  		return nil, err
  7596  	}
  7597  	req.Header = reqHeaders
  7598  	googleapi.Expand(req.URL, map[string]string{
  7599  		"parent": c.parent,
  7600  	})
  7601  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7602  }
  7603  
  7604  // Do executes the "analyticsadmin.properties.firebaseLinks.create" call.
  7605  // Any non-2xx status code is an error. Response headers are in either
  7606  // *GoogleAnalyticsAdminV1betaFirebaseLink.ServerResponse.Header or (if a
  7607  // response was returned at all) in error.(*googleapi.Error).Header. Use
  7608  // googleapi.IsNotModified to check whether the returned error was because
  7609  // http.StatusNotModified was returned.
  7610  func (c *PropertiesFirebaseLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaFirebaseLink, error) {
  7611  	gensupport.SetOptions(c.urlParams_, opts...)
  7612  	res, err := c.doRequest("json")
  7613  	if res != nil && res.StatusCode == http.StatusNotModified {
  7614  		if res.Body != nil {
  7615  			res.Body.Close()
  7616  		}
  7617  		return nil, gensupport.WrapError(&googleapi.Error{
  7618  			Code:   res.StatusCode,
  7619  			Header: res.Header,
  7620  		})
  7621  	}
  7622  	if err != nil {
  7623  		return nil, err
  7624  	}
  7625  	defer googleapi.CloseBody(res)
  7626  	if err := googleapi.CheckResponse(res); err != nil {
  7627  		return nil, gensupport.WrapError(err)
  7628  	}
  7629  	ret := &GoogleAnalyticsAdminV1betaFirebaseLink{
  7630  		ServerResponse: googleapi.ServerResponse{
  7631  			Header:         res.Header,
  7632  			HTTPStatusCode: res.StatusCode,
  7633  		},
  7634  	}
  7635  	target := &ret
  7636  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7637  		return nil, err
  7638  	}
  7639  	return ret, nil
  7640  }
  7641  
  7642  type PropertiesFirebaseLinksDeleteCall struct {
  7643  	s          *Service
  7644  	name       string
  7645  	urlParams_ gensupport.URLParams
  7646  	ctx_       context.Context
  7647  	header_    http.Header
  7648  }
  7649  
  7650  // Delete: Deletes a FirebaseLink on a property
  7651  //
  7652  //   - name: Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
  7653  //     Example: properties/1234/firebaseLinks/5678.
  7654  func (r *PropertiesFirebaseLinksService) Delete(name string) *PropertiesFirebaseLinksDeleteCall {
  7655  	c := &PropertiesFirebaseLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7656  	c.name = name
  7657  	return c
  7658  }
  7659  
  7660  // Fields allows partial responses to be retrieved. See
  7661  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7662  // details.
  7663  func (c *PropertiesFirebaseLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksDeleteCall {
  7664  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7665  	return c
  7666  }
  7667  
  7668  // Context sets the context to be used in this call's Do method.
  7669  func (c *PropertiesFirebaseLinksDeleteCall) Context(ctx context.Context) *PropertiesFirebaseLinksDeleteCall {
  7670  	c.ctx_ = ctx
  7671  	return c
  7672  }
  7673  
  7674  // Header returns a http.Header that can be modified by the caller to add
  7675  // headers to the request.
  7676  func (c *PropertiesFirebaseLinksDeleteCall) Header() http.Header {
  7677  	if c.header_ == nil {
  7678  		c.header_ = make(http.Header)
  7679  	}
  7680  	return c.header_
  7681  }
  7682  
  7683  func (c *PropertiesFirebaseLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
  7684  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7685  	var body io.Reader = nil
  7686  	c.urlParams_.Set("alt", alt)
  7687  	c.urlParams_.Set("prettyPrint", "false")
  7688  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  7689  	urls += "?" + c.urlParams_.Encode()
  7690  	req, err := http.NewRequest("DELETE", urls, body)
  7691  	if err != nil {
  7692  		return nil, err
  7693  	}
  7694  	req.Header = reqHeaders
  7695  	googleapi.Expand(req.URL, map[string]string{
  7696  		"name": c.name,
  7697  	})
  7698  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7699  }
  7700  
  7701  // Do executes the "analyticsadmin.properties.firebaseLinks.delete" call.
  7702  // Any non-2xx status code is an error. Response headers are in either
  7703  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  7704  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7705  // check whether the returned error was because http.StatusNotModified was
  7706  // returned.
  7707  func (c *PropertiesFirebaseLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  7708  	gensupport.SetOptions(c.urlParams_, opts...)
  7709  	res, err := c.doRequest("json")
  7710  	if res != nil && res.StatusCode == http.StatusNotModified {
  7711  		if res.Body != nil {
  7712  			res.Body.Close()
  7713  		}
  7714  		return nil, gensupport.WrapError(&googleapi.Error{
  7715  			Code:   res.StatusCode,
  7716  			Header: res.Header,
  7717  		})
  7718  	}
  7719  	if err != nil {
  7720  		return nil, err
  7721  	}
  7722  	defer googleapi.CloseBody(res)
  7723  	if err := googleapi.CheckResponse(res); err != nil {
  7724  		return nil, gensupport.WrapError(err)
  7725  	}
  7726  	ret := &GoogleProtobufEmpty{
  7727  		ServerResponse: googleapi.ServerResponse{
  7728  			Header:         res.Header,
  7729  			HTTPStatusCode: res.StatusCode,
  7730  		},
  7731  	}
  7732  	target := &ret
  7733  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7734  		return nil, err
  7735  	}
  7736  	return ret, nil
  7737  }
  7738  
  7739  type PropertiesFirebaseLinksListCall struct {
  7740  	s            *Service
  7741  	parent       string
  7742  	urlParams_   gensupport.URLParams
  7743  	ifNoneMatch_ string
  7744  	ctx_         context.Context
  7745  	header_      http.Header
  7746  }
  7747  
  7748  // List: Lists FirebaseLinks on a property. Properties can have at most one
  7749  // FirebaseLink.
  7750  //
  7751  // - parent: Format: properties/{property_id} Example: properties/1234.
  7752  func (r *PropertiesFirebaseLinksService) List(parent string) *PropertiesFirebaseLinksListCall {
  7753  	c := &PropertiesFirebaseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7754  	c.parent = parent
  7755  	return c
  7756  }
  7757  
  7758  // PageSize sets the optional parameter "pageSize": The maximum number of
  7759  // resources to return. The service may return fewer than this value, even if
  7760  // there are additional pages. If unspecified, at most 50 resources will be
  7761  // returned. The maximum value is 200; (higher values will be coerced to the
  7762  // maximum)
  7763  func (c *PropertiesFirebaseLinksListCall) PageSize(pageSize int64) *PropertiesFirebaseLinksListCall {
  7764  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7765  	return c
  7766  }
  7767  
  7768  // PageToken sets the optional parameter "pageToken": A page token, received
  7769  // from a previous `ListFirebaseLinks` call. Provide this to retrieve the
  7770  // subsequent page. When paginating, all other parameters provided to
  7771  // `ListFirebaseLinks` must match the call that provided the page token.
  7772  func (c *PropertiesFirebaseLinksListCall) PageToken(pageToken string) *PropertiesFirebaseLinksListCall {
  7773  	c.urlParams_.Set("pageToken", pageToken)
  7774  	return c
  7775  }
  7776  
  7777  // Fields allows partial responses to be retrieved. See
  7778  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7779  // details.
  7780  func (c *PropertiesFirebaseLinksListCall) Fields(s ...googleapi.Field) *PropertiesFirebaseLinksListCall {
  7781  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7782  	return c
  7783  }
  7784  
  7785  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7786  // object's ETag matches the given value. This is useful for getting updates
  7787  // only after the object has changed since the last request.
  7788  func (c *PropertiesFirebaseLinksListCall) IfNoneMatch(entityTag string) *PropertiesFirebaseLinksListCall {
  7789  	c.ifNoneMatch_ = entityTag
  7790  	return c
  7791  }
  7792  
  7793  // Context sets the context to be used in this call's Do method.
  7794  func (c *PropertiesFirebaseLinksListCall) Context(ctx context.Context) *PropertiesFirebaseLinksListCall {
  7795  	c.ctx_ = ctx
  7796  	return c
  7797  }
  7798  
  7799  // Header returns a http.Header that can be modified by the caller to add
  7800  // headers to the request.
  7801  func (c *PropertiesFirebaseLinksListCall) Header() http.Header {
  7802  	if c.header_ == nil {
  7803  		c.header_ = make(http.Header)
  7804  	}
  7805  	return c.header_
  7806  }
  7807  
  7808  func (c *PropertiesFirebaseLinksListCall) doRequest(alt string) (*http.Response, error) {
  7809  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7810  	if c.ifNoneMatch_ != "" {
  7811  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7812  	}
  7813  	var body io.Reader = nil
  7814  	c.urlParams_.Set("alt", alt)
  7815  	c.urlParams_.Set("prettyPrint", "false")
  7816  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/firebaseLinks")
  7817  	urls += "?" + c.urlParams_.Encode()
  7818  	req, err := http.NewRequest("GET", urls, body)
  7819  	if err != nil {
  7820  		return nil, err
  7821  	}
  7822  	req.Header = reqHeaders
  7823  	googleapi.Expand(req.URL, map[string]string{
  7824  		"parent": c.parent,
  7825  	})
  7826  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7827  }
  7828  
  7829  // Do executes the "analyticsadmin.properties.firebaseLinks.list" call.
  7830  // Any non-2xx status code is an error. Response headers are in either
  7831  // *GoogleAnalyticsAdminV1betaListFirebaseLinksResponse.ServerResponse.Header
  7832  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  7833  // Use googleapi.IsNotModified to check whether the returned error was because
  7834  // http.StatusNotModified was returned.
  7835  func (c *PropertiesFirebaseLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListFirebaseLinksResponse, error) {
  7836  	gensupport.SetOptions(c.urlParams_, opts...)
  7837  	res, err := c.doRequest("json")
  7838  	if res != nil && res.StatusCode == http.StatusNotModified {
  7839  		if res.Body != nil {
  7840  			res.Body.Close()
  7841  		}
  7842  		return nil, gensupport.WrapError(&googleapi.Error{
  7843  			Code:   res.StatusCode,
  7844  			Header: res.Header,
  7845  		})
  7846  	}
  7847  	if err != nil {
  7848  		return nil, err
  7849  	}
  7850  	defer googleapi.CloseBody(res)
  7851  	if err := googleapi.CheckResponse(res); err != nil {
  7852  		return nil, gensupport.WrapError(err)
  7853  	}
  7854  	ret := &GoogleAnalyticsAdminV1betaListFirebaseLinksResponse{
  7855  		ServerResponse: googleapi.ServerResponse{
  7856  			Header:         res.Header,
  7857  			HTTPStatusCode: res.StatusCode,
  7858  		},
  7859  	}
  7860  	target := &ret
  7861  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7862  		return nil, err
  7863  	}
  7864  	return ret, nil
  7865  }
  7866  
  7867  // Pages invokes f for each page of results.
  7868  // A non-nil error returned from f will halt the iteration.
  7869  // The provided context supersedes any context provided to the Context method.
  7870  func (c *PropertiesFirebaseLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListFirebaseLinksResponse) error) error {
  7871  	c.ctx_ = ctx
  7872  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7873  	for {
  7874  		x, err := c.Do()
  7875  		if err != nil {
  7876  			return err
  7877  		}
  7878  		if err := f(x); err != nil {
  7879  			return err
  7880  		}
  7881  		if x.NextPageToken == "" {
  7882  			return nil
  7883  		}
  7884  		c.PageToken(x.NextPageToken)
  7885  	}
  7886  }
  7887  
  7888  type PropertiesGoogleAdsLinksCreateCall struct {
  7889  	s                                       *Service
  7890  	parent                                  string
  7891  	googleanalyticsadminv1betagoogleadslink *GoogleAnalyticsAdminV1betaGoogleAdsLink
  7892  	urlParams_                              gensupport.URLParams
  7893  	ctx_                                    context.Context
  7894  	header_                                 http.Header
  7895  }
  7896  
  7897  // Create: Creates a GoogleAdsLink.
  7898  //
  7899  // - parent: Example format: properties/1234.
  7900  func (r *PropertiesGoogleAdsLinksService) Create(parent string, googleanalyticsadminv1betagoogleadslink *GoogleAnalyticsAdminV1betaGoogleAdsLink) *PropertiesGoogleAdsLinksCreateCall {
  7901  	c := &PropertiesGoogleAdsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7902  	c.parent = parent
  7903  	c.googleanalyticsadminv1betagoogleadslink = googleanalyticsadminv1betagoogleadslink
  7904  	return c
  7905  }
  7906  
  7907  // Fields allows partial responses to be retrieved. See
  7908  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7909  // details.
  7910  func (c *PropertiesGoogleAdsLinksCreateCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksCreateCall {
  7911  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7912  	return c
  7913  }
  7914  
  7915  // Context sets the context to be used in this call's Do method.
  7916  func (c *PropertiesGoogleAdsLinksCreateCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksCreateCall {
  7917  	c.ctx_ = ctx
  7918  	return c
  7919  }
  7920  
  7921  // Header returns a http.Header that can be modified by the caller to add
  7922  // headers to the request.
  7923  func (c *PropertiesGoogleAdsLinksCreateCall) Header() http.Header {
  7924  	if c.header_ == nil {
  7925  		c.header_ = make(http.Header)
  7926  	}
  7927  	return c.header_
  7928  }
  7929  
  7930  func (c *PropertiesGoogleAdsLinksCreateCall) doRequest(alt string) (*http.Response, error) {
  7931  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7932  	var body io.Reader = nil
  7933  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betagoogleadslink)
  7934  	if err != nil {
  7935  		return nil, err
  7936  	}
  7937  	c.urlParams_.Set("alt", alt)
  7938  	c.urlParams_.Set("prettyPrint", "false")
  7939  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/googleAdsLinks")
  7940  	urls += "?" + c.urlParams_.Encode()
  7941  	req, err := http.NewRequest("POST", urls, body)
  7942  	if err != nil {
  7943  		return nil, err
  7944  	}
  7945  	req.Header = reqHeaders
  7946  	googleapi.Expand(req.URL, map[string]string{
  7947  		"parent": c.parent,
  7948  	})
  7949  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7950  }
  7951  
  7952  // Do executes the "analyticsadmin.properties.googleAdsLinks.create" call.
  7953  // Any non-2xx status code is an error. Response headers are in either
  7954  // *GoogleAnalyticsAdminV1betaGoogleAdsLink.ServerResponse.Header or (if a
  7955  // response was returned at all) in error.(*googleapi.Error).Header. Use
  7956  // googleapi.IsNotModified to check whether the returned error was because
  7957  // http.StatusNotModified was returned.
  7958  func (c *PropertiesGoogleAdsLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaGoogleAdsLink, error) {
  7959  	gensupport.SetOptions(c.urlParams_, opts...)
  7960  	res, err := c.doRequest("json")
  7961  	if res != nil && res.StatusCode == http.StatusNotModified {
  7962  		if res.Body != nil {
  7963  			res.Body.Close()
  7964  		}
  7965  		return nil, gensupport.WrapError(&googleapi.Error{
  7966  			Code:   res.StatusCode,
  7967  			Header: res.Header,
  7968  		})
  7969  	}
  7970  	if err != nil {
  7971  		return nil, err
  7972  	}
  7973  	defer googleapi.CloseBody(res)
  7974  	if err := googleapi.CheckResponse(res); err != nil {
  7975  		return nil, gensupport.WrapError(err)
  7976  	}
  7977  	ret := &GoogleAnalyticsAdminV1betaGoogleAdsLink{
  7978  		ServerResponse: googleapi.ServerResponse{
  7979  			Header:         res.Header,
  7980  			HTTPStatusCode: res.StatusCode,
  7981  		},
  7982  	}
  7983  	target := &ret
  7984  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7985  		return nil, err
  7986  	}
  7987  	return ret, nil
  7988  }
  7989  
  7990  type PropertiesGoogleAdsLinksDeleteCall struct {
  7991  	s          *Service
  7992  	name       string
  7993  	urlParams_ gensupport.URLParams
  7994  	ctx_       context.Context
  7995  	header_    http.Header
  7996  }
  7997  
  7998  // Delete: Deletes a GoogleAdsLink on a property
  7999  //
  8000  // - name: Example format: properties/1234/googleAdsLinks/5678.
  8001  func (r *PropertiesGoogleAdsLinksService) Delete(name string) *PropertiesGoogleAdsLinksDeleteCall {
  8002  	c := &PropertiesGoogleAdsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8003  	c.name = name
  8004  	return c
  8005  }
  8006  
  8007  // Fields allows partial responses to be retrieved. See
  8008  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8009  // details.
  8010  func (c *PropertiesGoogleAdsLinksDeleteCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksDeleteCall {
  8011  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8012  	return c
  8013  }
  8014  
  8015  // Context sets the context to be used in this call's Do method.
  8016  func (c *PropertiesGoogleAdsLinksDeleteCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksDeleteCall {
  8017  	c.ctx_ = ctx
  8018  	return c
  8019  }
  8020  
  8021  // Header returns a http.Header that can be modified by the caller to add
  8022  // headers to the request.
  8023  func (c *PropertiesGoogleAdsLinksDeleteCall) Header() http.Header {
  8024  	if c.header_ == nil {
  8025  		c.header_ = make(http.Header)
  8026  	}
  8027  	return c.header_
  8028  }
  8029  
  8030  func (c *PropertiesGoogleAdsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
  8031  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8032  	var body io.Reader = nil
  8033  	c.urlParams_.Set("alt", alt)
  8034  	c.urlParams_.Set("prettyPrint", "false")
  8035  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  8036  	urls += "?" + c.urlParams_.Encode()
  8037  	req, err := http.NewRequest("DELETE", urls, body)
  8038  	if err != nil {
  8039  		return nil, err
  8040  	}
  8041  	req.Header = reqHeaders
  8042  	googleapi.Expand(req.URL, map[string]string{
  8043  		"name": c.name,
  8044  	})
  8045  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8046  }
  8047  
  8048  // Do executes the "analyticsadmin.properties.googleAdsLinks.delete" call.
  8049  // Any non-2xx status code is an error. Response headers are in either
  8050  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  8051  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8052  // check whether the returned error was because http.StatusNotModified was
  8053  // returned.
  8054  func (c *PropertiesGoogleAdsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  8055  	gensupport.SetOptions(c.urlParams_, opts...)
  8056  	res, err := c.doRequest("json")
  8057  	if res != nil && res.StatusCode == http.StatusNotModified {
  8058  		if res.Body != nil {
  8059  			res.Body.Close()
  8060  		}
  8061  		return nil, gensupport.WrapError(&googleapi.Error{
  8062  			Code:   res.StatusCode,
  8063  			Header: res.Header,
  8064  		})
  8065  	}
  8066  	if err != nil {
  8067  		return nil, err
  8068  	}
  8069  	defer googleapi.CloseBody(res)
  8070  	if err := googleapi.CheckResponse(res); err != nil {
  8071  		return nil, gensupport.WrapError(err)
  8072  	}
  8073  	ret := &GoogleProtobufEmpty{
  8074  		ServerResponse: googleapi.ServerResponse{
  8075  			Header:         res.Header,
  8076  			HTTPStatusCode: res.StatusCode,
  8077  		},
  8078  	}
  8079  	target := &ret
  8080  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8081  		return nil, err
  8082  	}
  8083  	return ret, nil
  8084  }
  8085  
  8086  type PropertiesGoogleAdsLinksListCall struct {
  8087  	s            *Service
  8088  	parent       string
  8089  	urlParams_   gensupport.URLParams
  8090  	ifNoneMatch_ string
  8091  	ctx_         context.Context
  8092  	header_      http.Header
  8093  }
  8094  
  8095  // List: Lists GoogleAdsLinks on a property.
  8096  //
  8097  // - parent: Example format: properties/1234.
  8098  func (r *PropertiesGoogleAdsLinksService) List(parent string) *PropertiesGoogleAdsLinksListCall {
  8099  	c := &PropertiesGoogleAdsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8100  	c.parent = parent
  8101  	return c
  8102  }
  8103  
  8104  // PageSize sets the optional parameter "pageSize": The maximum number of
  8105  // resources to return. If unspecified, at most 50 resources will be returned.
  8106  // The maximum value is 200 (higher values will be coerced to the maximum).
  8107  func (c *PropertiesGoogleAdsLinksListCall) PageSize(pageSize int64) *PropertiesGoogleAdsLinksListCall {
  8108  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8109  	return c
  8110  }
  8111  
  8112  // PageToken sets the optional parameter "pageToken": A page token, received
  8113  // from a previous `ListGoogleAdsLinks` call. Provide this to retrieve the
  8114  // subsequent page. When paginating, all other parameters provided to
  8115  // `ListGoogleAdsLinks` must match the call that provided the page token.
  8116  func (c *PropertiesGoogleAdsLinksListCall) PageToken(pageToken string) *PropertiesGoogleAdsLinksListCall {
  8117  	c.urlParams_.Set("pageToken", pageToken)
  8118  	return c
  8119  }
  8120  
  8121  // Fields allows partial responses to be retrieved. See
  8122  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8123  // details.
  8124  func (c *PropertiesGoogleAdsLinksListCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksListCall {
  8125  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8126  	return c
  8127  }
  8128  
  8129  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8130  // object's ETag matches the given value. This is useful for getting updates
  8131  // only after the object has changed since the last request.
  8132  func (c *PropertiesGoogleAdsLinksListCall) IfNoneMatch(entityTag string) *PropertiesGoogleAdsLinksListCall {
  8133  	c.ifNoneMatch_ = entityTag
  8134  	return c
  8135  }
  8136  
  8137  // Context sets the context to be used in this call's Do method.
  8138  func (c *PropertiesGoogleAdsLinksListCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksListCall {
  8139  	c.ctx_ = ctx
  8140  	return c
  8141  }
  8142  
  8143  // Header returns a http.Header that can be modified by the caller to add
  8144  // headers to the request.
  8145  func (c *PropertiesGoogleAdsLinksListCall) Header() http.Header {
  8146  	if c.header_ == nil {
  8147  		c.header_ = make(http.Header)
  8148  	}
  8149  	return c.header_
  8150  }
  8151  
  8152  func (c *PropertiesGoogleAdsLinksListCall) doRequest(alt string) (*http.Response, error) {
  8153  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8154  	if c.ifNoneMatch_ != "" {
  8155  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8156  	}
  8157  	var body io.Reader = nil
  8158  	c.urlParams_.Set("alt", alt)
  8159  	c.urlParams_.Set("prettyPrint", "false")
  8160  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/googleAdsLinks")
  8161  	urls += "?" + c.urlParams_.Encode()
  8162  	req, err := http.NewRequest("GET", urls, body)
  8163  	if err != nil {
  8164  		return nil, err
  8165  	}
  8166  	req.Header = reqHeaders
  8167  	googleapi.Expand(req.URL, map[string]string{
  8168  		"parent": c.parent,
  8169  	})
  8170  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8171  }
  8172  
  8173  // Do executes the "analyticsadmin.properties.googleAdsLinks.list" call.
  8174  // Any non-2xx status code is an error. Response headers are in either
  8175  // *GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse.ServerResponse.Header
  8176  // or (if a response was returned at all) in error.(*googleapi.Error).Header.
  8177  // Use googleapi.IsNotModified to check whether the returned error was because
  8178  // http.StatusNotModified was returned.
  8179  func (c *PropertiesGoogleAdsLinksListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse, error) {
  8180  	gensupport.SetOptions(c.urlParams_, opts...)
  8181  	res, err := c.doRequest("json")
  8182  	if res != nil && res.StatusCode == http.StatusNotModified {
  8183  		if res.Body != nil {
  8184  			res.Body.Close()
  8185  		}
  8186  		return nil, gensupport.WrapError(&googleapi.Error{
  8187  			Code:   res.StatusCode,
  8188  			Header: res.Header,
  8189  		})
  8190  	}
  8191  	if err != nil {
  8192  		return nil, err
  8193  	}
  8194  	defer googleapi.CloseBody(res)
  8195  	if err := googleapi.CheckResponse(res); err != nil {
  8196  		return nil, gensupport.WrapError(err)
  8197  	}
  8198  	ret := &GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse{
  8199  		ServerResponse: googleapi.ServerResponse{
  8200  			Header:         res.Header,
  8201  			HTTPStatusCode: res.StatusCode,
  8202  		},
  8203  	}
  8204  	target := &ret
  8205  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8206  		return nil, err
  8207  	}
  8208  	return ret, nil
  8209  }
  8210  
  8211  // Pages invokes f for each page of results.
  8212  // A non-nil error returned from f will halt the iteration.
  8213  // The provided context supersedes any context provided to the Context method.
  8214  func (c *PropertiesGoogleAdsLinksListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListGoogleAdsLinksResponse) error) error {
  8215  	c.ctx_ = ctx
  8216  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8217  	for {
  8218  		x, err := c.Do()
  8219  		if err != nil {
  8220  			return err
  8221  		}
  8222  		if err := f(x); err != nil {
  8223  			return err
  8224  		}
  8225  		if x.NextPageToken == "" {
  8226  			return nil
  8227  		}
  8228  		c.PageToken(x.NextPageToken)
  8229  	}
  8230  }
  8231  
  8232  type PropertiesGoogleAdsLinksPatchCall struct {
  8233  	s                                       *Service
  8234  	name                                    string
  8235  	googleanalyticsadminv1betagoogleadslink *GoogleAnalyticsAdminV1betaGoogleAdsLink
  8236  	urlParams_                              gensupport.URLParams
  8237  	ctx_                                    context.Context
  8238  	header_                                 http.Header
  8239  }
  8240  
  8241  // Patch: Updates a GoogleAdsLink on a property
  8242  //
  8243  //   - name: Output only. Format:
  8244  //     properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note:
  8245  //     googleAdsLinkId is not the Google Ads customer ID.
  8246  func (r *PropertiesGoogleAdsLinksService) Patch(name string, googleanalyticsadminv1betagoogleadslink *GoogleAnalyticsAdminV1betaGoogleAdsLink) *PropertiesGoogleAdsLinksPatchCall {
  8247  	c := &PropertiesGoogleAdsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8248  	c.name = name
  8249  	c.googleanalyticsadminv1betagoogleadslink = googleanalyticsadminv1betagoogleadslink
  8250  	return c
  8251  }
  8252  
  8253  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  8254  // fields to be updated. Field names must be in snake case (e.g.,
  8255  // "field_to_update"). Omitted fields will not be updated. To replace the
  8256  // entire entity, use one path with the string "*" to match all fields.
  8257  func (c *PropertiesGoogleAdsLinksPatchCall) UpdateMask(updateMask string) *PropertiesGoogleAdsLinksPatchCall {
  8258  	c.urlParams_.Set("updateMask", updateMask)
  8259  	return c
  8260  }
  8261  
  8262  // Fields allows partial responses to be retrieved. See
  8263  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8264  // details.
  8265  func (c *PropertiesGoogleAdsLinksPatchCall) Fields(s ...googleapi.Field) *PropertiesGoogleAdsLinksPatchCall {
  8266  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8267  	return c
  8268  }
  8269  
  8270  // Context sets the context to be used in this call's Do method.
  8271  func (c *PropertiesGoogleAdsLinksPatchCall) Context(ctx context.Context) *PropertiesGoogleAdsLinksPatchCall {
  8272  	c.ctx_ = ctx
  8273  	return c
  8274  }
  8275  
  8276  // Header returns a http.Header that can be modified by the caller to add
  8277  // headers to the request.
  8278  func (c *PropertiesGoogleAdsLinksPatchCall) Header() http.Header {
  8279  	if c.header_ == nil {
  8280  		c.header_ = make(http.Header)
  8281  	}
  8282  	return c.header_
  8283  }
  8284  
  8285  func (c *PropertiesGoogleAdsLinksPatchCall) doRequest(alt string) (*http.Response, error) {
  8286  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8287  	var body io.Reader = nil
  8288  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betagoogleadslink)
  8289  	if err != nil {
  8290  		return nil, err
  8291  	}
  8292  	c.urlParams_.Set("alt", alt)
  8293  	c.urlParams_.Set("prettyPrint", "false")
  8294  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  8295  	urls += "?" + c.urlParams_.Encode()
  8296  	req, err := http.NewRequest("PATCH", urls, body)
  8297  	if err != nil {
  8298  		return nil, err
  8299  	}
  8300  	req.Header = reqHeaders
  8301  	googleapi.Expand(req.URL, map[string]string{
  8302  		"name": c.name,
  8303  	})
  8304  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8305  }
  8306  
  8307  // Do executes the "analyticsadmin.properties.googleAdsLinks.patch" call.
  8308  // Any non-2xx status code is an error. Response headers are in either
  8309  // *GoogleAnalyticsAdminV1betaGoogleAdsLink.ServerResponse.Header or (if a
  8310  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8311  // googleapi.IsNotModified to check whether the returned error was because
  8312  // http.StatusNotModified was returned.
  8313  func (c *PropertiesGoogleAdsLinksPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaGoogleAdsLink, error) {
  8314  	gensupport.SetOptions(c.urlParams_, opts...)
  8315  	res, err := c.doRequest("json")
  8316  	if res != nil && res.StatusCode == http.StatusNotModified {
  8317  		if res.Body != nil {
  8318  			res.Body.Close()
  8319  		}
  8320  		return nil, gensupport.WrapError(&googleapi.Error{
  8321  			Code:   res.StatusCode,
  8322  			Header: res.Header,
  8323  		})
  8324  	}
  8325  	if err != nil {
  8326  		return nil, err
  8327  	}
  8328  	defer googleapi.CloseBody(res)
  8329  	if err := googleapi.CheckResponse(res); err != nil {
  8330  		return nil, gensupport.WrapError(err)
  8331  	}
  8332  	ret := &GoogleAnalyticsAdminV1betaGoogleAdsLink{
  8333  		ServerResponse: googleapi.ServerResponse{
  8334  			Header:         res.Header,
  8335  			HTTPStatusCode: res.StatusCode,
  8336  		},
  8337  	}
  8338  	target := &ret
  8339  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8340  		return nil, err
  8341  	}
  8342  	return ret, nil
  8343  }
  8344  
  8345  type PropertiesKeyEventsCreateCall struct {
  8346  	s                                  *Service
  8347  	parent                             string
  8348  	googleanalyticsadminv1betakeyevent *GoogleAnalyticsAdminV1betaKeyEvent
  8349  	urlParams_                         gensupport.URLParams
  8350  	ctx_                               context.Context
  8351  	header_                            http.Header
  8352  }
  8353  
  8354  // Create: Creates a Key Event.
  8355  //
  8356  //   - parent: The resource name of the parent property where this Key Event will
  8357  //     be created. Format: properties/123.
  8358  func (r *PropertiesKeyEventsService) Create(parent string, googleanalyticsadminv1betakeyevent *GoogleAnalyticsAdminV1betaKeyEvent) *PropertiesKeyEventsCreateCall {
  8359  	c := &PropertiesKeyEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8360  	c.parent = parent
  8361  	c.googleanalyticsadminv1betakeyevent = googleanalyticsadminv1betakeyevent
  8362  	return c
  8363  }
  8364  
  8365  // Fields allows partial responses to be retrieved. See
  8366  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8367  // details.
  8368  func (c *PropertiesKeyEventsCreateCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsCreateCall {
  8369  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8370  	return c
  8371  }
  8372  
  8373  // Context sets the context to be used in this call's Do method.
  8374  func (c *PropertiesKeyEventsCreateCall) Context(ctx context.Context) *PropertiesKeyEventsCreateCall {
  8375  	c.ctx_ = ctx
  8376  	return c
  8377  }
  8378  
  8379  // Header returns a http.Header that can be modified by the caller to add
  8380  // headers to the request.
  8381  func (c *PropertiesKeyEventsCreateCall) Header() http.Header {
  8382  	if c.header_ == nil {
  8383  		c.header_ = make(http.Header)
  8384  	}
  8385  	return c.header_
  8386  }
  8387  
  8388  func (c *PropertiesKeyEventsCreateCall) doRequest(alt string) (*http.Response, error) {
  8389  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8390  	var body io.Reader = nil
  8391  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betakeyevent)
  8392  	if err != nil {
  8393  		return nil, err
  8394  	}
  8395  	c.urlParams_.Set("alt", alt)
  8396  	c.urlParams_.Set("prettyPrint", "false")
  8397  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/keyEvents")
  8398  	urls += "?" + c.urlParams_.Encode()
  8399  	req, err := http.NewRequest("POST", urls, body)
  8400  	if err != nil {
  8401  		return nil, err
  8402  	}
  8403  	req.Header = reqHeaders
  8404  	googleapi.Expand(req.URL, map[string]string{
  8405  		"parent": c.parent,
  8406  	})
  8407  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8408  }
  8409  
  8410  // Do executes the "analyticsadmin.properties.keyEvents.create" call.
  8411  // Any non-2xx status code is an error. Response headers are in either
  8412  // *GoogleAnalyticsAdminV1betaKeyEvent.ServerResponse.Header or (if a response
  8413  // was returned at all) in error.(*googleapi.Error).Header. Use
  8414  // googleapi.IsNotModified to check whether the returned error was because
  8415  // http.StatusNotModified was returned.
  8416  func (c *PropertiesKeyEventsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaKeyEvent, error) {
  8417  	gensupport.SetOptions(c.urlParams_, opts...)
  8418  	res, err := c.doRequest("json")
  8419  	if res != nil && res.StatusCode == http.StatusNotModified {
  8420  		if res.Body != nil {
  8421  			res.Body.Close()
  8422  		}
  8423  		return nil, gensupport.WrapError(&googleapi.Error{
  8424  			Code:   res.StatusCode,
  8425  			Header: res.Header,
  8426  		})
  8427  	}
  8428  	if err != nil {
  8429  		return nil, err
  8430  	}
  8431  	defer googleapi.CloseBody(res)
  8432  	if err := googleapi.CheckResponse(res); err != nil {
  8433  		return nil, gensupport.WrapError(err)
  8434  	}
  8435  	ret := &GoogleAnalyticsAdminV1betaKeyEvent{
  8436  		ServerResponse: googleapi.ServerResponse{
  8437  			Header:         res.Header,
  8438  			HTTPStatusCode: res.StatusCode,
  8439  		},
  8440  	}
  8441  	target := &ret
  8442  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8443  		return nil, err
  8444  	}
  8445  	return ret, nil
  8446  }
  8447  
  8448  type PropertiesKeyEventsDeleteCall struct {
  8449  	s          *Service
  8450  	name       string
  8451  	urlParams_ gensupport.URLParams
  8452  	ctx_       context.Context
  8453  	header_    http.Header
  8454  }
  8455  
  8456  // Delete: Deletes a Key Event.
  8457  //
  8458  //   - name: The resource name of the Key Event to delete. Format:
  8459  //     properties/{property}/keyEvents/{key_event} Example:
  8460  //     "properties/123/keyEvents/456".
  8461  func (r *PropertiesKeyEventsService) Delete(name string) *PropertiesKeyEventsDeleteCall {
  8462  	c := &PropertiesKeyEventsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8463  	c.name = name
  8464  	return c
  8465  }
  8466  
  8467  // Fields allows partial responses to be retrieved. See
  8468  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8469  // details.
  8470  func (c *PropertiesKeyEventsDeleteCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsDeleteCall {
  8471  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8472  	return c
  8473  }
  8474  
  8475  // Context sets the context to be used in this call's Do method.
  8476  func (c *PropertiesKeyEventsDeleteCall) Context(ctx context.Context) *PropertiesKeyEventsDeleteCall {
  8477  	c.ctx_ = ctx
  8478  	return c
  8479  }
  8480  
  8481  // Header returns a http.Header that can be modified by the caller to add
  8482  // headers to the request.
  8483  func (c *PropertiesKeyEventsDeleteCall) Header() http.Header {
  8484  	if c.header_ == nil {
  8485  		c.header_ = make(http.Header)
  8486  	}
  8487  	return c.header_
  8488  }
  8489  
  8490  func (c *PropertiesKeyEventsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8491  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8492  	var body io.Reader = nil
  8493  	c.urlParams_.Set("alt", alt)
  8494  	c.urlParams_.Set("prettyPrint", "false")
  8495  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  8496  	urls += "?" + c.urlParams_.Encode()
  8497  	req, err := http.NewRequest("DELETE", urls, body)
  8498  	if err != nil {
  8499  		return nil, err
  8500  	}
  8501  	req.Header = reqHeaders
  8502  	googleapi.Expand(req.URL, map[string]string{
  8503  		"name": c.name,
  8504  	})
  8505  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8506  }
  8507  
  8508  // Do executes the "analyticsadmin.properties.keyEvents.delete" call.
  8509  // Any non-2xx status code is an error. Response headers are in either
  8510  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  8511  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8512  // check whether the returned error was because http.StatusNotModified was
  8513  // returned.
  8514  func (c *PropertiesKeyEventsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  8515  	gensupport.SetOptions(c.urlParams_, opts...)
  8516  	res, err := c.doRequest("json")
  8517  	if res != nil && res.StatusCode == http.StatusNotModified {
  8518  		if res.Body != nil {
  8519  			res.Body.Close()
  8520  		}
  8521  		return nil, gensupport.WrapError(&googleapi.Error{
  8522  			Code:   res.StatusCode,
  8523  			Header: res.Header,
  8524  		})
  8525  	}
  8526  	if err != nil {
  8527  		return nil, err
  8528  	}
  8529  	defer googleapi.CloseBody(res)
  8530  	if err := googleapi.CheckResponse(res); err != nil {
  8531  		return nil, gensupport.WrapError(err)
  8532  	}
  8533  	ret := &GoogleProtobufEmpty{
  8534  		ServerResponse: googleapi.ServerResponse{
  8535  			Header:         res.Header,
  8536  			HTTPStatusCode: res.StatusCode,
  8537  		},
  8538  	}
  8539  	target := &ret
  8540  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8541  		return nil, err
  8542  	}
  8543  	return ret, nil
  8544  }
  8545  
  8546  type PropertiesKeyEventsGetCall struct {
  8547  	s            *Service
  8548  	name         string
  8549  	urlParams_   gensupport.URLParams
  8550  	ifNoneMatch_ string
  8551  	ctx_         context.Context
  8552  	header_      http.Header
  8553  }
  8554  
  8555  // Get: Retrieve a single Key Event.
  8556  //
  8557  //   - name: The resource name of the Key Event to retrieve. Format:
  8558  //     properties/{property}/keyEvents/{key_event} Example:
  8559  //     "properties/123/keyEvents/456".
  8560  func (r *PropertiesKeyEventsService) Get(name string) *PropertiesKeyEventsGetCall {
  8561  	c := &PropertiesKeyEventsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8562  	c.name = name
  8563  	return c
  8564  }
  8565  
  8566  // Fields allows partial responses to be retrieved. See
  8567  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8568  // details.
  8569  func (c *PropertiesKeyEventsGetCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsGetCall {
  8570  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8571  	return c
  8572  }
  8573  
  8574  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8575  // object's ETag matches the given value. This is useful for getting updates
  8576  // only after the object has changed since the last request.
  8577  func (c *PropertiesKeyEventsGetCall) IfNoneMatch(entityTag string) *PropertiesKeyEventsGetCall {
  8578  	c.ifNoneMatch_ = entityTag
  8579  	return c
  8580  }
  8581  
  8582  // Context sets the context to be used in this call's Do method.
  8583  func (c *PropertiesKeyEventsGetCall) Context(ctx context.Context) *PropertiesKeyEventsGetCall {
  8584  	c.ctx_ = ctx
  8585  	return c
  8586  }
  8587  
  8588  // Header returns a http.Header that can be modified by the caller to add
  8589  // headers to the request.
  8590  func (c *PropertiesKeyEventsGetCall) Header() http.Header {
  8591  	if c.header_ == nil {
  8592  		c.header_ = make(http.Header)
  8593  	}
  8594  	return c.header_
  8595  }
  8596  
  8597  func (c *PropertiesKeyEventsGetCall) doRequest(alt string) (*http.Response, error) {
  8598  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8599  	if c.ifNoneMatch_ != "" {
  8600  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8601  	}
  8602  	var body io.Reader = nil
  8603  	c.urlParams_.Set("alt", alt)
  8604  	c.urlParams_.Set("prettyPrint", "false")
  8605  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  8606  	urls += "?" + c.urlParams_.Encode()
  8607  	req, err := http.NewRequest("GET", urls, body)
  8608  	if err != nil {
  8609  		return nil, err
  8610  	}
  8611  	req.Header = reqHeaders
  8612  	googleapi.Expand(req.URL, map[string]string{
  8613  		"name": c.name,
  8614  	})
  8615  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8616  }
  8617  
  8618  // Do executes the "analyticsadmin.properties.keyEvents.get" call.
  8619  // Any non-2xx status code is an error. Response headers are in either
  8620  // *GoogleAnalyticsAdminV1betaKeyEvent.ServerResponse.Header or (if a response
  8621  // was returned at all) in error.(*googleapi.Error).Header. Use
  8622  // googleapi.IsNotModified to check whether the returned error was because
  8623  // http.StatusNotModified was returned.
  8624  func (c *PropertiesKeyEventsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaKeyEvent, error) {
  8625  	gensupport.SetOptions(c.urlParams_, opts...)
  8626  	res, err := c.doRequest("json")
  8627  	if res != nil && res.StatusCode == http.StatusNotModified {
  8628  		if res.Body != nil {
  8629  			res.Body.Close()
  8630  		}
  8631  		return nil, gensupport.WrapError(&googleapi.Error{
  8632  			Code:   res.StatusCode,
  8633  			Header: res.Header,
  8634  		})
  8635  	}
  8636  	if err != nil {
  8637  		return nil, err
  8638  	}
  8639  	defer googleapi.CloseBody(res)
  8640  	if err := googleapi.CheckResponse(res); err != nil {
  8641  		return nil, gensupport.WrapError(err)
  8642  	}
  8643  	ret := &GoogleAnalyticsAdminV1betaKeyEvent{
  8644  		ServerResponse: googleapi.ServerResponse{
  8645  			Header:         res.Header,
  8646  			HTTPStatusCode: res.StatusCode,
  8647  		},
  8648  	}
  8649  	target := &ret
  8650  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8651  		return nil, err
  8652  	}
  8653  	return ret, nil
  8654  }
  8655  
  8656  type PropertiesKeyEventsListCall struct {
  8657  	s            *Service
  8658  	parent       string
  8659  	urlParams_   gensupport.URLParams
  8660  	ifNoneMatch_ string
  8661  	ctx_         context.Context
  8662  	header_      http.Header
  8663  }
  8664  
  8665  // List: Returns a list of Key Events in the specified parent property. Returns
  8666  // an empty list if no Key Events are found.
  8667  //
  8668  //   - parent: The resource name of the parent property. Example:
  8669  //     'properties/123'.
  8670  func (r *PropertiesKeyEventsService) List(parent string) *PropertiesKeyEventsListCall {
  8671  	c := &PropertiesKeyEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8672  	c.parent = parent
  8673  	return c
  8674  }
  8675  
  8676  // PageSize sets the optional parameter "pageSize": The maximum number of
  8677  // resources to return. If unspecified, at most 50 resources will be returned.
  8678  // The maximum value is 200; (higher values will be coerced to the maximum)
  8679  func (c *PropertiesKeyEventsListCall) PageSize(pageSize int64) *PropertiesKeyEventsListCall {
  8680  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8681  	return c
  8682  }
  8683  
  8684  // PageToken sets the optional parameter "pageToken": A page token, received
  8685  // from a previous `ListKeyEvents` call. Provide this to retrieve the
  8686  // subsequent page. When paginating, all other parameters provided to
  8687  // `ListKeyEvents` must match the call that provided the page token.
  8688  func (c *PropertiesKeyEventsListCall) PageToken(pageToken string) *PropertiesKeyEventsListCall {
  8689  	c.urlParams_.Set("pageToken", pageToken)
  8690  	return c
  8691  }
  8692  
  8693  // Fields allows partial responses to be retrieved. See
  8694  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8695  // details.
  8696  func (c *PropertiesKeyEventsListCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsListCall {
  8697  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8698  	return c
  8699  }
  8700  
  8701  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8702  // object's ETag matches the given value. This is useful for getting updates
  8703  // only after the object has changed since the last request.
  8704  func (c *PropertiesKeyEventsListCall) IfNoneMatch(entityTag string) *PropertiesKeyEventsListCall {
  8705  	c.ifNoneMatch_ = entityTag
  8706  	return c
  8707  }
  8708  
  8709  // Context sets the context to be used in this call's Do method.
  8710  func (c *PropertiesKeyEventsListCall) Context(ctx context.Context) *PropertiesKeyEventsListCall {
  8711  	c.ctx_ = ctx
  8712  	return c
  8713  }
  8714  
  8715  // Header returns a http.Header that can be modified by the caller to add
  8716  // headers to the request.
  8717  func (c *PropertiesKeyEventsListCall) Header() http.Header {
  8718  	if c.header_ == nil {
  8719  		c.header_ = make(http.Header)
  8720  	}
  8721  	return c.header_
  8722  }
  8723  
  8724  func (c *PropertiesKeyEventsListCall) doRequest(alt string) (*http.Response, error) {
  8725  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8726  	if c.ifNoneMatch_ != "" {
  8727  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8728  	}
  8729  	var body io.Reader = nil
  8730  	c.urlParams_.Set("alt", alt)
  8731  	c.urlParams_.Set("prettyPrint", "false")
  8732  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/keyEvents")
  8733  	urls += "?" + c.urlParams_.Encode()
  8734  	req, err := http.NewRequest("GET", urls, body)
  8735  	if err != nil {
  8736  		return nil, err
  8737  	}
  8738  	req.Header = reqHeaders
  8739  	googleapi.Expand(req.URL, map[string]string{
  8740  		"parent": c.parent,
  8741  	})
  8742  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8743  }
  8744  
  8745  // Do executes the "analyticsadmin.properties.keyEvents.list" call.
  8746  // Any non-2xx status code is an error. Response headers are in either
  8747  // *GoogleAnalyticsAdminV1betaListKeyEventsResponse.ServerResponse.Header or
  8748  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  8749  // googleapi.IsNotModified to check whether the returned error was because
  8750  // http.StatusNotModified was returned.
  8751  func (c *PropertiesKeyEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaListKeyEventsResponse, error) {
  8752  	gensupport.SetOptions(c.urlParams_, opts...)
  8753  	res, err := c.doRequest("json")
  8754  	if res != nil && res.StatusCode == http.StatusNotModified {
  8755  		if res.Body != nil {
  8756  			res.Body.Close()
  8757  		}
  8758  		return nil, gensupport.WrapError(&googleapi.Error{
  8759  			Code:   res.StatusCode,
  8760  			Header: res.Header,
  8761  		})
  8762  	}
  8763  	if err != nil {
  8764  		return nil, err
  8765  	}
  8766  	defer googleapi.CloseBody(res)
  8767  	if err := googleapi.CheckResponse(res); err != nil {
  8768  		return nil, gensupport.WrapError(err)
  8769  	}
  8770  	ret := &GoogleAnalyticsAdminV1betaListKeyEventsResponse{
  8771  		ServerResponse: googleapi.ServerResponse{
  8772  			Header:         res.Header,
  8773  			HTTPStatusCode: res.StatusCode,
  8774  		},
  8775  	}
  8776  	target := &ret
  8777  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8778  		return nil, err
  8779  	}
  8780  	return ret, nil
  8781  }
  8782  
  8783  // Pages invokes f for each page of results.
  8784  // A non-nil error returned from f will halt the iteration.
  8785  // The provided context supersedes any context provided to the Context method.
  8786  func (c *PropertiesKeyEventsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1betaListKeyEventsResponse) error) error {
  8787  	c.ctx_ = ctx
  8788  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8789  	for {
  8790  		x, err := c.Do()
  8791  		if err != nil {
  8792  			return err
  8793  		}
  8794  		if err := f(x); err != nil {
  8795  			return err
  8796  		}
  8797  		if x.NextPageToken == "" {
  8798  			return nil
  8799  		}
  8800  		c.PageToken(x.NextPageToken)
  8801  	}
  8802  }
  8803  
  8804  type PropertiesKeyEventsPatchCall struct {
  8805  	s                                  *Service
  8806  	name                               string
  8807  	googleanalyticsadminv1betakeyevent *GoogleAnalyticsAdminV1betaKeyEvent
  8808  	urlParams_                         gensupport.URLParams
  8809  	ctx_                               context.Context
  8810  	header_                            http.Header
  8811  }
  8812  
  8813  // Patch: Updates a Key Event.
  8814  //
  8815  //   - name: Output only. Resource name of this key event. Format:
  8816  //     properties/{property}/keyEvents/{key_event}.
  8817  func (r *PropertiesKeyEventsService) Patch(name string, googleanalyticsadminv1betakeyevent *GoogleAnalyticsAdminV1betaKeyEvent) *PropertiesKeyEventsPatchCall {
  8818  	c := &PropertiesKeyEventsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8819  	c.name = name
  8820  	c.googleanalyticsadminv1betakeyevent = googleanalyticsadminv1betakeyevent
  8821  	return c
  8822  }
  8823  
  8824  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  8825  // fields to be updated. Field names must be in snake case (e.g.,
  8826  // "field_to_update"). Omitted fields will not be updated. To replace the
  8827  // entire entity, use one path with the string "*" to match all fields.
  8828  func (c *PropertiesKeyEventsPatchCall) UpdateMask(updateMask string) *PropertiesKeyEventsPatchCall {
  8829  	c.urlParams_.Set("updateMask", updateMask)
  8830  	return c
  8831  }
  8832  
  8833  // Fields allows partial responses to be retrieved. See
  8834  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8835  // details.
  8836  func (c *PropertiesKeyEventsPatchCall) Fields(s ...googleapi.Field) *PropertiesKeyEventsPatchCall {
  8837  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8838  	return c
  8839  }
  8840  
  8841  // Context sets the context to be used in this call's Do method.
  8842  func (c *PropertiesKeyEventsPatchCall) Context(ctx context.Context) *PropertiesKeyEventsPatchCall {
  8843  	c.ctx_ = ctx
  8844  	return c
  8845  }
  8846  
  8847  // Header returns a http.Header that can be modified by the caller to add
  8848  // headers to the request.
  8849  func (c *PropertiesKeyEventsPatchCall) Header() http.Header {
  8850  	if c.header_ == nil {
  8851  		c.header_ = make(http.Header)
  8852  	}
  8853  	return c.header_
  8854  }
  8855  
  8856  func (c *PropertiesKeyEventsPatchCall) doRequest(alt string) (*http.Response, error) {
  8857  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8858  	var body io.Reader = nil
  8859  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1betakeyevent)
  8860  	if err != nil {
  8861  		return nil, err
  8862  	}
  8863  	c.urlParams_.Set("alt", alt)
  8864  	c.urlParams_.Set("prettyPrint", "false")
  8865  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  8866  	urls += "?" + c.urlParams_.Encode()
  8867  	req, err := http.NewRequest("PATCH", urls, body)
  8868  	if err != nil {
  8869  		return nil, err
  8870  	}
  8871  	req.Header = reqHeaders
  8872  	googleapi.Expand(req.URL, map[string]string{
  8873  		"name": c.name,
  8874  	})
  8875  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8876  }
  8877  
  8878  // Do executes the "analyticsadmin.properties.keyEvents.patch" call.
  8879  // Any non-2xx status code is an error. Response headers are in either
  8880  // *GoogleAnalyticsAdminV1betaKeyEvent.ServerResponse.Header or (if a response
  8881  // was returned at all) in error.(*googleapi.Error).Header. Use
  8882  // googleapi.IsNotModified to check whether the returned error was because
  8883  // http.StatusNotModified was returned.
  8884  func (c *PropertiesKeyEventsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1betaKeyEvent, error) {
  8885  	gensupport.SetOptions(c.urlParams_, opts...)
  8886  	res, err := c.doRequest("json")
  8887  	if res != nil && res.StatusCode == http.StatusNotModified {
  8888  		if res.Body != nil {
  8889  			res.Body.Close()
  8890  		}
  8891  		return nil, gensupport.WrapError(&googleapi.Error{
  8892  			Code:   res.StatusCode,
  8893  			Header: res.Header,
  8894  		})
  8895  	}
  8896  	if err != nil {
  8897  		return nil, err
  8898  	}
  8899  	defer googleapi.CloseBody(res)
  8900  	if err := googleapi.CheckResponse(res); err != nil {
  8901  		return nil, gensupport.WrapError(err)
  8902  	}
  8903  	ret := &GoogleAnalyticsAdminV1betaKeyEvent{
  8904  		ServerResponse: googleapi.ServerResponse{
  8905  			Header:         res.Header,
  8906  			HTTPStatusCode: res.StatusCode,
  8907  		},
  8908  	}
  8909  	target := &ret
  8910  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8911  		return nil, err
  8912  	}
  8913  	return ret, nil
  8914  }
  8915  

View as plain text