blob: 927add6a733f465f183f265613e92d63d251181e [file] [log] [blame]
// Copyright 2020 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package analyticsadmin provides access to the Google Analytics Admin API.
//
// For product documentation, see: http://code.google.com/apis/analytics/docs/mgmt/home.html
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/analyticsadmin/v1alpha"
// ...
// ctx := context.Background()
// analyticsadminService, err := analyticsadmin.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
//
// analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithScopes(analyticsadmin.AnalyticsReadonlyScope))
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package analyticsadmin // import "google.golang.org/api/analyticsadmin/v1alpha"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "analyticsadmin:v1alpha"
const apiName = "analyticsadmin"
const apiVersion = "v1alpha"
const basePath = "https://analyticsadmin.googleapis.com/"
const mtlsBasePath = "https://analyticsadmin.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// Edit Google Analytics management entities
AnalyticsEditScope = "https://www.googleapis.com/auth/analytics.edit"
// Manage Google Analytics Account users by email address
AnalyticsManageUsersScope = "https://www.googleapis.com/auth/analytics.manage.users"
// View Google Analytics user permissions
AnalyticsManageUsersReadonlyScope = "https://www.googleapis.com/auth/analytics.manage.users.readonly"
// View your Google Analytics data
AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analytics.readonly"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := option.WithScopes(
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.manage.users",
"https://www.googleapis.com/auth/analytics.manage.users.readonly",
"https://www.googleapis.com/auth/analytics.readonly",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.AccountSummaries = NewAccountSummariesService(s)
s.Accounts = NewAccountsService(s)
s.Properties = NewPropertiesService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
AccountSummaries *AccountSummariesService
Accounts *AccountsService
Properties *PropertiesService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewAccountSummariesService(s *Service) *AccountSummariesService {
rs := &AccountSummariesService{s: s}
return rs
}
type AccountSummariesService struct {
s *Service
}
func NewAccountsService(s *Service) *AccountsService {
rs := &AccountsService{s: s}
rs.UserLinks = NewAccountsUserLinksService(s)
return rs
}
type AccountsService struct {
s *Service
UserLinks *AccountsUserLinksService
}
func NewAccountsUserLinksService(s *Service) *AccountsUserLinksService {
rs := &AccountsUserLinksService{s: s}
return rs
}
type AccountsUserLinksService struct {
s *Service
}
func NewPropertiesService(s *Service) *PropertiesService {
rs := &PropertiesService{s: s}
rs.AndroidAppDataStreams = NewPropertiesAndroidAppDataStreamsService(s)
rs.FirebaseLinks = NewPropertiesFirebaseLinksService(s)
rs.GoogleAdsLinks = NewPropertiesGoogleAdsLinksService(s)
rs.IosAppDataStreams = NewPropertiesIosAppDataStreamsService(s)
rs.UserLinks = NewPropertiesUserLinksService(s)
rs.WebDataStreams = NewPropertiesWebDataStreamsService(s)
return rs
}
type PropertiesService struct {
s *Service
AndroidAppDataStreams *PropertiesAndroidAppDataStreamsService
FirebaseLinks *PropertiesFirebaseLinksService
GoogleAdsLinks *PropertiesGoogleAdsLinksService
IosAppDataStreams *PropertiesIosAppDataStreamsService
UserLinks *PropertiesUserLinksService
WebDataStreams *PropertiesWebDataStreamsService
}
func NewPropertiesAndroidAppDataStreamsService(s *Service) *PropertiesAndroidAppDataStreamsService {
rs := &PropertiesAndroidAppDataStreamsService{s: s}
return rs
}
type PropertiesAndroidAppDataStreamsService struct {
s *Service
}
func NewPropertiesFirebaseLinksService(s *Service) *PropertiesFirebaseLinksService {
rs := &PropertiesFirebaseLinksService{s: s}
return rs
}
type PropertiesFirebaseLinksService struct {
s *Service
}
func NewPropertiesGoogleAdsLinksService(s *Service) *PropertiesGoogleAdsLinksService {
rs := &PropertiesGoogleAdsLinksService{s: s}
return rs
}
type PropertiesGoogleAdsLinksService struct {
s *Service
}
func NewPropertiesIosAppDataStreamsService(s *Service) *PropertiesIosAppDataStreamsService {
rs := &PropertiesIosAppDataStreamsService{s: s}
return rs
}
type PropertiesIosAppDataStreamsService struct {
s *Service
}
func NewPropertiesUserLinksService(s *Service) *PropertiesUserLinksService {
rs := &PropertiesUserLinksService{s: s}
return rs
}
type PropertiesUserLinksService struct {
s *Service
}
func NewPropertiesWebDataStreamsService(s *Service) *PropertiesWebDataStreamsService {
rs := &PropertiesWebDataStreamsService{s: s}
return rs
}
type PropertiesWebDataStreamsService struct {
s *Service
}
// GoogleAnalyticsAdminV1alphaAccount: A resource message representing a
// Google Analytics account.
type GoogleAnalyticsAdminV1alphaAccount struct {
// CountryCode: Country of business. Must be a non-deprecated code for a
// UN M.49 region.
// https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html
CountryCode string `json:"countryCode,omitempty"`
// CreateTime: Output only. Time when this account was originally
// created.
CreateTime string `json:"createTime,omitempty"`
// Deleted: Output only. Indicates whether this Account is soft-deleted
// or not. Deleted accounts are excluded from List results unless
// specifically requested.
Deleted bool `json:"deleted,omitempty"`
// DisplayName: Required. Human-readable display name for this account.
DisplayName string `json:"displayName,omitempty"`
// Name: Output only. Resource name of this account. Format:
// accounts/{account} Example: "accounts/100"
Name string `json:"name,omitempty"`
// UpdateTime: Output only. Time when account payload fields were last
// updated.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CountryCode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CountryCode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaAccount) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaAccount
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaAccountSummary: A virtual resource
// representing an overview of an account and all its child App+Web
// properties.
type GoogleAnalyticsAdminV1alphaAccountSummary struct {
// Account: Resource name of account referred to by this account summary
// Format: accounts/{account_id} Example: "accounts/1000"
Account string `json:"account,omitempty"`
// DisplayName: Display name for the account referred to in this account
// summary.
DisplayName string `json:"displayName,omitempty"`
// Name: Resource name for this account summary. Format:
// accountSummaries/{account_id} Example: "accountSummaries/1000"
Name string `json:"name,omitempty"`
// PropertySummaries: List of summaries for child accounts of this
// account.
PropertySummaries []*GoogleAnalyticsAdminV1alphaPropertySummary `json:"propertySummaries,omitempty"`
// ForceSendFields is a list of field names (e.g. "Account") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Account") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaAccountSummary) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaAccountSummary
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaAndroidAppDataStream: A resource message
// representing a Google Analytics Android app stream.
type GoogleAnalyticsAdminV1alphaAndroidAppDataStream struct {
// CreateTime: Output only. Time when this stream was originally
// created.
CreateTime string `json:"createTime,omitempty"`
// DisplayName: Human-readable display name for the Data Stream. The max
// allowed display name length is 255 UTF-16 code units.
DisplayName string `json:"displayName,omitempty"`
// FirebaseAppId: Output only. ID of the corresponding Android app in
// Firebase, if any. This ID can change if the Android app is deleted
// and recreated.
FirebaseAppId string `json:"firebaseAppId,omitempty"`
// Name: Output only. Resource name of this Data Stream. Format:
// properties/{property_id}/androidAppDataStreams/{stream_id} Example:
// "properties/1000/androidAppDataStreams/2000"
Name string `json:"name,omitempty"`
// PackageName: Immutable. The package name for the app being measured.
// Example: "com.example.myandroidapp"
PackageName string `json:"packageName,omitempty"`
// UpdateTime: Output only. Time when stream payload fields were last
// updated.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaAndroidAppDataStream) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaAndroidAppDataStream
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaAuditUserLink: Read-only resource used to
// summarize a principal's effective roles.
type GoogleAnalyticsAdminV1alphaAuditUserLink struct {
// DirectRoles: Roles directly assigned to this user for this entity.
// Format: predefinedRoles/read Excludes roles that are inherited from
// an account (if this is for a property), group, or organization admin
// role.
DirectRoles []string `json:"directRoles,omitempty"`
// EffectiveRoles: Union of all permissions a user has at this account
// or property (includes direct permissions, group-inherited
// permissions, etc.). Format: predefinedRoles/read
EffectiveRoles []string `json:"effectiveRoles,omitempty"`
// EmailAddress: Email address of the linked user
EmailAddress string `json:"emailAddress,omitempty"`
// Name: Example format: properties/1234/userLinks/5678
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "DirectRoles") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DirectRoles") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaAuditUserLink) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLink
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaAuditUserLinksRequest: Request message for
// AuditUserLinks RPC.
type GoogleAnalyticsAdminV1alphaAuditUserLinksRequest struct {
// PageSize: The maximum number of user links to return. The service may
// return fewer than this value. If unspecified, at most 1000 user links
// will be returned. The maximum value is 5000; values above 5000 will
// be coerced to 5000.
PageSize int64 `json:"pageSize,omitempty"`
// PageToken: A page token, received from a previous `AuditUserLinks`
// call. Provide this to retrieve the subsequent page. When paginating,
// all other parameters provided to `AuditUserLinks` must match the call
// that provided the page token.
PageToken string `json:"pageToken,omitempty"`
// ForceSendFields is a list of field names (e.g. "PageSize") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PageSize") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaAuditUserLinksResponse: Response message
// for AuditUserLinks RPC.
type GoogleAnalyticsAdminV1alphaAuditUserLinksResponse struct {
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// UserLinks: List of AuditUserLinks. These will be ordered stably, but
// in an arbitrary order.
UserLinks []*GoogleAnalyticsAdminV1alphaAuditUserLink `json:"userLinks,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaAuditUserLinksResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest: Request
// message for BatchCreateUserLinks RPC.
type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest struct {
// NotifyNewUsers: Optional. If notify_new_users is set, then email new
// users that they've been given permissions on the resource.
NotifyNewUsers bool `json:"notifyNewUsers,omitempty"`
// Requests: The requests specifying the user links to create. A maximum
// of 1000 user links can be created in a batch.
Requests []*GoogleAnalyticsAdminV1alphaCreateUserLinkRequest `json:"requests,omitempty"`
// ForceSendFields is a list of field names (e.g. "NotifyNewUsers") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NotifyNewUsers") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse: Response
// message for BatchCreateUserLinks RPC.
type GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse struct {
// UserLinks: The user links created.
UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "UserLinks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "UserLinks") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest: Request
// message for BatchDeleteUserLinks RPC.
type GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest struct {
// Requests: The requests specifying the user links to update. A maximum
// of 1000 user links can be updated in a batch.
Requests []*GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest `json:"requests,omitempty"`
// ForceSendFields is a list of field names (e.g. "Requests") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Requests") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse: Response
// message for BatchGetUserLinks RPC.
type GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse struct {
// UserLinks: The requested user links.
UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "UserLinks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "UserLinks") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest: Request
// message for BatchUpdateUserLinks RPC.
type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest struct {
// Requests: The requests specifying the user links to update. A maximum
// of 1000 user links can be updated in a batch.
Requests []*GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest `json:"requests,omitempty"`
// ForceSendFields is a list of field names (e.g. "Requests") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Requests") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse: Response
// message for BatchUpdateUserLinks RPC.
type GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse struct {
// UserLinks: The user links updated.
UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "UserLinks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "UserLinks") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaCreateUserLinkRequest: Request message for
// CreateUserLink RPC. Users can have multiple email addresses
// associated with their Google account, and one of these email
// addresses is the "primary" email address. Any of the email addresses
// associated with a Google account may be used for a new UserLink, but
// the returned UserLink will always contain the "primary" email
// address. As a result, the input and output email address for this
// request may differ.
type GoogleAnalyticsAdminV1alphaCreateUserLinkRequest struct {
// NotifyNewUser: Optional. If notify_new_user is set, then email new
// user that they've been given permissions on the resource.
NotifyNewUser bool `json:"notifyNewUser,omitempty"`
// Parent: Required. Example format: accounts/1234
Parent string `json:"parent,omitempty"`
// UserLink: Required. The user link to create.
UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"`
// ForceSendFields is a list of field names (e.g. "NotifyNewUser") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NotifyNewUser") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaCreateUserLinkRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaCreateUserLinkRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaDataSharingSettings: A resource message
// representing data sharing settings of a Google Analytics account.
type GoogleAnalyticsAdminV1alphaDataSharingSettings struct {
// Name: Output only. Resource name. Format:
// accounts/{account}/dataSharingSettings Example:
// "accounts/1000/dataSharingSettings"
Name string `json:"name,omitempty"`
// SharingWithGoogleAnySalesEnabled: Allows any of Google sales to
// access the data in order to suggest configuration changes to improve
// results.
SharingWithGoogleAnySalesEnabled bool `json:"sharingWithGoogleAnySalesEnabled,omitempty"`
// SharingWithGoogleAssignedSalesEnabled: Allows Google sales teams that
// are assigned to the customer to access the data in order to suggest
// configuration changes to improve results. Sales team restrictions
// still apply when enabled.
SharingWithGoogleAssignedSalesEnabled bool `json:"sharingWithGoogleAssignedSalesEnabled,omitempty"`
// SharingWithGoogleProductsEnabled: Allows Google to use the data to
// improve other Google products or services.
SharingWithGoogleProductsEnabled bool `json:"sharingWithGoogleProductsEnabled,omitempty"`
// SharingWithGoogleSupportEnabled: Allows Google support to access the
// data in order to help troubleshoot issues.
SharingWithGoogleSupportEnabled bool `json:"sharingWithGoogleSupportEnabled,omitempty"`
// SharingWithOthersEnabled: Allows Google to share the data anonymously
// in aggregate form with others.
SharingWithOthersEnabled bool `json:"sharingWithOthersEnabled,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaDataSharingSettings) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaDataSharingSettings
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest: Request message for
// DeleteUserLink RPC.
type GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest struct {
// Name: Required. Example format: accounts/1234/userLinks/5678
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "Name") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Name") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings: Singleton
// resource under a WebDataStream, configuring measurement of additional
// site interactions and content.
type GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings struct {
// ArticlesAndBlogsEnabled: Capture events when your visitors view
// content on your site that has articles or blog posts.
ArticlesAndBlogsEnabled bool `json:"articlesAndBlogsEnabled,omitempty"`
// ContentViewsEnabled: Capture events when your visitors view content
// on your site that has structured data (eg, articles, blog posts,
// product details screens, etc.).
ContentViewsEnabled bool `json:"contentViewsEnabled,omitempty"`
// DataTaggedElementClicksEnabled: If enabled, capture a click event
// each time a visitor clicks a link or element that has data attributes
// beginning with "data-ga".
DataTaggedElementClicksEnabled bool `json:"dataTaggedElementClicksEnabled,omitempty"`
// ExcludedDomains: Domains to exclude from measurement. Max length is
// 1024 characters.
ExcludedDomains string `json:"excludedDomains,omitempty"`
// FileDownloadsEnabled: If enabled, capture a file download event each
// time a link is clicked with a common document, compressed file,
// application, video, or audio extension.
FileDownloadsEnabled bool `json:"fileDownloadsEnabled,omitempty"`
// FormInteractionsEnabled: If enabled, capture a view search results
// event each time a visitor interacts with a form on your site.
FormInteractionsEnabled bool `json:"formInteractionsEnabled,omitempty"`
// Name: Output only. Resource name of this Data Stream. Format:
// properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasuremen
// tSettings Example:
// "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"
Name string `json:"name,omitempty"`
// OutboundClicksEnabled: If enabled, capture an outbound click event
// each time a visitor clicks a link that leads them away from your
// domain.
OutboundClicksEnabled bool `json:"outboundClicksEnabled,omitempty"`
// PageChangesEnabled: If enabled, capture a page view event each time
// the website changes the browser history state.
PageChangesEnabled bool `json:"pageChangesEnabled,omitempty"`
// PageLoadsEnabled: If enabled, capture a page view event each time a
// page loads.
PageLoadsEnabled bool `json:"pageLoadsEnabled,omitempty"`
// PageViewsEnabled: Output only. If enabled, capture a page view event
// each time a page loads or the website changes the browser history
// state.
PageViewsEnabled bool `json:"pageViewsEnabled,omitempty"`
// ProductsAndEcommerceEnabled: Capture events when your visitors view
// content on your site that has product details screens, etc.
ProductsAndEcommerceEnabled bool `json:"productsAndEcommerceEnabled,omitempty"`
// ScrollsEnabled: If enabled, capture scroll events each time a visitor
// gets to the bottom of a page.
ScrollsEnabled bool `json:"scrollsEnabled,omitempty"`
// SearchQueryParameter: Required. URL query parameters to interpret as
// site search parameters. Max length is 1024 characters. Must not be
// empty.
SearchQueryParameter string `json:"searchQueryParameter,omitempty"`
// SiteSearchEnabled: If enabled, capture a view search results event
// each time a visitor performs a search on your site (based on a query
// parameter).
SiteSearchEnabled bool `json:"siteSearchEnabled,omitempty"`
// StreamEnabled: Indicates whether Enhanced Measurement Settings will
// be used to automatically measure interactions and content on this web
// stream. Changing this value does not affect the settings themselves,
// but determines whether they are respected.
StreamEnabled bool `json:"streamEnabled,omitempty"`
// UrlQueryParameter: Additional URL query parameters. Max length is
// 1024 characters.
UrlQueryParameter string `json:"urlQueryParameter,omitempty"`
// VideoEngagementEnabled: If enabled, capture video play, progress, and
// complete events as visitors view embedded videos on your site.
VideoEngagementEnabled bool `json:"videoEngagementEnabled,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g.
// "ArticlesAndBlogsEnabled") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ArticlesAndBlogsEnabled")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaFirebaseLink: A link between an App+Web
// property and a Firebase project.
type GoogleAnalyticsAdminV1alphaFirebaseLink struct {
// CreateTime: Output only. Time when this FirebaseLink was originally
// created.
CreateTime string `json:"createTime,omitempty"`
// MaximumUserAccess: Maximum user access to the App + Web property
// allowed to admins of the linked Firebase project.
//
// Possible values:
// "MAXIMUM_USER_ACCESS_UNSPECIFIED" - Unspecified maximum user
// access.
// "NO_ACCESS" - Firebase users have no access to the Analytics
// property.
// "READ_AND_ANALYZE" - Firebase users have Read & Analyze access to
// the Analytics property.
// "EDITOR_WITHOUT_LINK_MANAGEMENT" - Firebase users have edit access
// to the Analytics property, but may not manage the Firebase link.
// "EDITOR_INCLUDING_LINK_MANAGEMENT" - Firebase users have edit
// access to the Analytics property and may manage the Firebase link.
MaximumUserAccess string `json:"maximumUserAccess,omitempty"`
// Name: Output only. Example format: properties/1234/firebaseLinks/5678
Name string `json:"name,omitempty"`
// Project: Immutable. Firebase project resource name. When creating a
// FirebaseLink, you may provide this resource name using either a
// project number or project ID. Once this resource has been created,
// returned FirebaseLinks will always have a project_name that contains
// a project number. Format: 'projects/{project number}' Example:
// 'projects/1234'
Project string `json:"project,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaFirebaseLink) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaFirebaseLink
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaGlobalSiteTag: Read-only resource with the
// tag for sending data from a website to a WebDataStream.
type GoogleAnalyticsAdminV1alphaGlobalSiteTag struct {
// Snippet: Immutable. JavaScript code snippet to be pasted as the first
// item into the head tag of every webpage to measure.
Snippet string `json:"snippet,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Snippet") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Snippet") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaGlobalSiteTag) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaGlobalSiteTag
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaGoogleAdsLink: A link between an App+Web
// property and a Google Ads account.
type GoogleAnalyticsAdminV1alphaGoogleAdsLink struct {
// AdsPersonalizationEnabled: Enable personalized advertising features
// with this integration. Automatically publish my Google Analytics
// audience lists and Google Analytics remarketing events/parameters to
// the linked Google Ads account. If this field is not set on
// create/update it will be defaulted to true.
AdsPersonalizationEnabled bool `json:"adsPersonalizationEnabled,omitempty"`
// CanManageClients: Output only. If true, this link is for a Google Ads
// manager account.
CanManageClients bool `json:"canManageClients,omitempty"`
// CreateTime: Output only. Time when this link was originally created.
CreateTime string `json:"createTime,omitempty"`
// CustomerId: Immutable. Google Ads customer ID.
CustomerId string `json:"customerId,omitempty"`
// EmailAddress: Output only. Email address of the user that created the
// link. An empty string will be returned if the email address can't be
// retrieved.
EmailAddress string `json:"emailAddress,omitempty"`
// Name: Output only. Format:
// properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note:
// googleAdsLinkId is not the Google Ads customer ID.
Name string `json:"name,omitempty"`
// Parent: Immutable. Format: properties/{propertyId}
Parent string `json:"parent,omitempty"`
// UpdateTime: Output only. Time when this link was last updated.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g.
// "AdsPersonalizationEnabled") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "AdsPersonalizationEnabled") to include in API requests with the JSON
// null value. By default, fields with empty values are omitted from API
// requests. However, any field with an empty value appearing in
// NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaGoogleAdsLink) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaGoogleAdsLink
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaIosAppDataStream: A resource message
// representing a Google Analytics IOS app stream.
type GoogleAnalyticsAdminV1alphaIosAppDataStream struct {
// BundleId: Required. Immutable. The Apple App Store Bundle ID for the
// app Example: "com.example.myiosapp"
BundleId string `json:"bundleId,omitempty"`
// CreateTime: Output only. Time when this stream was originally
// created.
CreateTime string `json:"createTime,omitempty"`
// DisplayName: Human-readable display name for the Data Stream. The max
// allowed display name length is 255 UTF-16 code units.
DisplayName string `json:"displayName,omitempty"`
// FirebaseAppId: Output only. ID of the corresponding iOS app in
// Firebase, if any. This ID can change if the iOS app is deleted and
// recreated.
FirebaseAppId string `json:"firebaseAppId,omitempty"`
// Name: Output only. Resource name of this Data Stream. Format:
// properties/{property_id}/iosAppDataStreams/{stream_id} Example:
// "properties/1000/iosAppDataStreams/2000"
Name string `json:"name,omitempty"`
// UpdateTime: Output only. Time when stream payload fields were last
// updated.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "BundleId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BundleId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaIosAppDataStream) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaIosAppDataStream
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListAccountSummariesResponse: Response
// message for ListAccountSummaries RPC.
type GoogleAnalyticsAdminV1alphaListAccountSummariesResponse struct {
// AccountSummaries: Account summaries of all accounts the caller has
// access to.
AccountSummaries []*GoogleAnalyticsAdminV1alphaAccountSummary `json:"accountSummaries,omitempty"`
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AccountSummaries") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccountSummaries") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListAccountSummariesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListAccountsResponse: Request message for
// ListAccounts RPC.
type GoogleAnalyticsAdminV1alphaListAccountsResponse struct {
// Accounts: Results that were accessible to the caller.
Accounts []*GoogleAnalyticsAdminV1alphaAccount `json:"accounts,omitempty"`
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Accounts") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Accounts") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListAccountsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListAccountsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse: Request
// message for ListAndroidDataStreams RPC.
type GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse struct {
// AndroidAppDataStreams: Results that matched the filter criteria and
// were accessible to the caller.
AndroidAppDataStreams []*GoogleAnalyticsAdminV1alphaAndroidAppDataStream `json:"androidAppDataStreams,omitempty"`
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g.
// "AndroidAppDataStreams") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AndroidAppDataStreams") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse: Response
// message for ListFirebaseLinks RPC
type GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse struct {
// FirebaseLinks: List of FirebaseLinks. This will have at most one
// value.
FirebaseLinks []*GoogleAnalyticsAdminV1alphaFirebaseLink `json:"firebaseLinks,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "FirebaseLinks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FirebaseLinks") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse: Response
// message for ListGoogleAdsLinks RPC.
type GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse struct {
// GoogleAdsLinks: List of GoogleAdsLinks.
GoogleAdsLinks []*GoogleAnalyticsAdminV1alphaGoogleAdsLink `json:"googleAdsLinks,omitempty"`
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "GoogleAdsLinks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "GoogleAdsLinks") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse: Request
// message for ListIosAppDataStreams RPC.
type GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse struct {
// IosAppDataStreams: Results that matched the filter criteria and were
// accessible to the caller.
IosAppDataStreams []*GoogleAnalyticsAdminV1alphaIosAppDataStream `json:"iosAppDataStreams,omitempty"`
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "IosAppDataStreams")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "IosAppDataStreams") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListPropertiesResponse: Response message
// for ListProperties RPC.
type GoogleAnalyticsAdminV1alphaListPropertiesResponse struct {
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// Properties: Results that matched the filter criteria and were
// accessible to the caller.
Properties []*GoogleAnalyticsAdminV1alphaProperty `json:"properties,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListPropertiesResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListPropertiesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListUserLinksResponse: Response message
// for ListUserLinks RPC.
type GoogleAnalyticsAdminV1alphaListUserLinksResponse struct {
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// UserLinks: List of UserLinks. These will be ordered stably, but in an
// arbitrary order.
UserLinks []*GoogleAnalyticsAdminV1alphaUserLink `json:"userLinks,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListUserLinksResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListUserLinksResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse: Request
// message for ListWebDataStreams RPC.
type GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse struct {
// NextPageToken: A token, which can be sent as `page_token` to retrieve
// the next page. If this field is omitted, there are no subsequent
// pages.
NextPageToken string `json:"nextPageToken,omitempty"`
// WebDataStreams: Results that matched the filter criteria and were
// accessible to the caller.
WebDataStreams []*GoogleAnalyticsAdminV1alphaWebDataStream `json:"webDataStreams,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaProperty: A resource message representing
// a Google Analytics App+Web property.
type GoogleAnalyticsAdminV1alphaProperty struct {
// CreateTime: Output only. Time when the entity was originally created.
CreateTime string `json:"createTime,omitempty"`
// CurrencyCode: The currency type used in reports involving monetary
// values. Format: https://en.wikipedia.org/wiki/ISO_4217 Examples:
// "USD", "EUR", "JPY"
CurrencyCode string `json:"currencyCode,omitempty"`
// Deleted: Output only. Indicates whether this Property is soft-deleted
// or not. Deleted properties are excluded from List results unless
// specifically requested.
Deleted bool `json:"deleted,omitempty"`
// DisplayName: Required. Human-readable display name for this property.
// The max allowed display name length is 100 UTF-16 code units.
DisplayName string `json:"displayName,omitempty"`
// IndustryCategory: Industry associated with this property Example:
// AUTOMOTIVE, FOOD_AND_DRINK
//
// Possible values:
// "INDUSTRY_CATEGORY_UNSPECIFIED" - Industry category unspecified
// "AUTOMOTIVE" - Automotive
// "BUSINESS_AND_INDUSTRIAL_MARKETS" - Business and industrial markets
// "FINANCE" - Finance
// "HEALTHCARE" - Healthcare
// "TECHNOLOGY" - Technology
// "TRAVEL" - Travel
// "OTHER" - Other
// "ARTS_AND_ENTERTAINMENT" - Arts and entertainment
// "BEAUTY_AND_FITNESS" - Beauty and fitness
// "BOOKS_AND_LITERATURE" - Books and literature
// "FOOD_AND_DRINK" - Food and drink
// "GAMES" - Games
// "HOBBIES_AND_LEISURE" - Hobbies and leisure
// "HOME_AND_GARDEN" - Home and garden
// "INTERNET_AND_TELECOM" - Internet and telecom
// "LAW_AND_GOVERNMENT" - Law and government
// "NEWS" - News
// "ONLINE_COMMUNITIES" - Online communities
// "PEOPLE_AND_SOCIETY" - People and society
// "PETS_AND_ANIMALS" - Pets and animals
// "REAL_ESTATE" - Real estate
// "REFERENCE" - Reference
// "SCIENCE" - Science
// "SPORTS" - Sports
// "JOBS_AND_EDUCATION" - Jobs and education
// "SHOPPING" - Shopping
IndustryCategory string `json:"industryCategory,omitempty"`
// Name: Output only. Resource name of this property. Format:
// properties/{property_id} Example: "properties/1000"
Name string `json:"name,omitempty"`
// Parent: Immutable. Resource name of this property's logical parent.
// Note: The Property-Moving UI can be used to change the parent.
// Format: accounts/{account} Example: "accounts/100"
Parent string `json:"parent,omitempty"`
// TimeZone: Reporting Time Zone, used as the day boundary for reports,
// regardless of where the data originates. If the time zone honors DST,
// Analytics will automatically adjust for the changes. NOTE: Changing
// the time zone only affects data going forward, and is not applied
// retroactively. Format: https://www.iana.org/time-zones Example:
// "America/Los_Angeles"
TimeZone string `json:"timeZone,omitempty"`
// UpdateTime: Output only. Time when entity payload fields were last
// updated.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaProperty) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaProperty
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaPropertySummary: A virtual resource
// representing metadata for an App+Web property.
type GoogleAnalyticsAdminV1alphaPropertySummary struct {
// DisplayName: Display name for the property referred to in this
// account summary.
DisplayName string `json:"displayName,omitempty"`
// Property: Resource name of property referred to by this property
// summary Format: properties/{property_id} Example: "properties/1000"
Property string `json:"property,omitempty"`
// ForceSendFields is a list of field names (e.g. "DisplayName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DisplayName") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaPropertySummary) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaPropertySummary
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest: Request
// message for ProvisionAccountTicket RPC.
type GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest struct {
// Account: The account to create.
Account *GoogleAnalyticsAdminV1alphaAccount `json:"account,omitempty"`
// RedirectUri: Redirect URI where the user will be sent after accepting
// Terms of Service. Must be configured in Developers Console as a
// Redirect URI
RedirectUri string `json:"redirectUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Account") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Account") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse: Response
// message for ProvisionAccountTicket RPC.
type GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse struct {
// AccountTicketId: The param to be passed in the ToS link.
AccountTicketId string `json:"accountTicketId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AccountTicketId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccountTicketId") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest: Request message for
// UpdateUserLink RPC.
type GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest struct {
// UserLink: Required. The user link to update.
UserLink *GoogleAnalyticsAdminV1alphaUserLink `json:"userLink,omitempty"`
// ForceSendFields is a list of field names (e.g. "UserLink") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "UserLink") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaUserLink: A resource message representing
// a user's permissions on an Account or Property resource.
type GoogleAnalyticsAdminV1alphaUserLink struct {
// DirectRoles: Roles directly assigned to this user for this account or
// property. Valid values: predefinedRoles/read
// predefinedRoles/collaborate predefinedRoles/edit
// predefinedRoles/manage-users Excludes roles that are inherited from a
// higher-level entity, group, or organization admin role. A UserLink
// that is updated to have an empty list of direct_roles will be
// deleted.
DirectRoles []string `json:"directRoles,omitempty"`
// EmailAddress: Email address of the user to link
EmailAddress string `json:"emailAddress,omitempty"`
// Name: Example format: properties/1234/userLinks/5678
Name string `json:"name,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DirectRoles") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DirectRoles") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaUserLink) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaUserLink
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleAnalyticsAdminV1alphaWebDataStream: A resource message
// representing a Google Analytics web stream.
type GoogleAnalyticsAdminV1alphaWebDataStream struct {
// CreateTime: Output only. Time when this stream was originally
// created.
CreateTime string `json:"createTime,omitempty"`
// DefaultUri: Immutable. Domain name of the web app being measured, or
// empty. Example: "http://www.google.com", "https://www.google.com"
DefaultUri string `json:"defaultUri,omitempty"`
// DisplayName: Required. Human-readable display name for the Data
// Stream. The max allowed display name length is 100 UTF-16 code units.
DisplayName string `json:"displayName,omitempty"`
// FirebaseAppId: Output only. ID of the corresponding web app in
// Firebase, if any. This ID can change if the web app is deleted and
// recreated.
FirebaseAppId string `json:"firebaseAppId,omitempty"`
// MeasurementId: Output only. Analytics "Measurement ID", without the
// "G-" prefix. Example: "G-1A2BCD345E" would just be "1A2BCD345E"
MeasurementId string `json:"measurementId,omitempty"`
// Name: Output only. Resource name of this Data Stream. Format:
// properties/{property_id}/webDataStreams/{stream_id} Example:
// "properties/1000/webDataStreams/2000"
Name string `json:"name,omitempty"`
// UpdateTime: Output only. Time when stream payload fields were last
// updated.
UpdateTime string `json:"updateTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleAnalyticsAdminV1alphaWebDataStream) MarshalJSON() ([]byte, error) {
type NoMethod GoogleAnalyticsAdminV1alphaWebDataStream
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleProtobufEmpty: A generic empty message that you can re-use to
// avoid defining duplicated empty messages in your APIs. A typical
// example is to use it as the request or the response type of an API
// method. For instance: service Foo { rpc Bar(google.protobuf.Empty)
// returns (google.protobuf.Empty); } The JSON representation for
// `Empty` is empty JSON object `{}`.
type GoogleProtobufEmpty struct {
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
}
// method id "analyticsadmin.accountSummaries.list":
type AccountSummariesListCall struct {
s *Service
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Returns summaries of all accounts accessible by the caller.
func (r *AccountSummariesService) List() *AccountSummariesListCall {
c := &AccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
return c
}
// PageSize sets the optional parameter "pageSize": The maximum number
// of AccountSummary resources to return. The service may return fewer
// than this value, even if there are additional pages. If unspecified,
// at most 50 resources will be returned. The maximum value is 200;
// (higher values will be coerced to the maximum)
func (c *AccountSummariesListCall) PageSize(pageSize int64) *AccountSummariesListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
// PageToken sets the optional parameter "pageToken": A page token,
// received from a previous `ListAccountSummaries` call. Provide this to
// retrieve the subsequent page. When paginating, all other parameters
// provided to `ListAccountSummaries` must match the call that provided
// the page token.
func (c *AccountSummariesListCall) PageToken(pageToken string) *AccountSummariesListCall {
c.urlParams_.Set("pageToken", pageToken)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountSummariesListCall) Fields(s ...googleapi.Field) *AccountSummariesListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *AccountSummariesListCall) IfNoneMatch(entityTag string) *AccountSummariesListCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountSummariesListCall) Context(ctx context.Context) *AccountSummariesListCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountSummariesListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountSummariesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accountSummaries")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accountSummaries.list" call.
// Exactly one of
// *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse or error
// will be non-nil. Any non-2xx status code is an error. Response
// headers are in either
// *GoogleAnalyticsAdminV1alphaListAccountSummariesResponse.ServerRespons
// e.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountSummariesListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccountSummariesResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaListAccountSummariesResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Returns summaries of all accounts accessible by the caller.",
// "flatPath": "v1alpha/accountSummaries",
// "httpMethod": "GET",
// "id": "analyticsadmin.accountSummaries.list",
// "parameterOrder": [],
// "parameters": {
// "pageSize": {
// "description": "The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
// "description": "A page token, received from a previous `ListAccountSummaries` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountSummaries` must match the call that provided the page token.",
// "location": "query",
// "type": "string"
// }
// },
// "path": "v1alpha/accountSummaries",
// "response": {
// "$ref": "GoogleAnalyticsAdminV1alphaListAccountSummariesResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.readonly"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *AccountSummariesListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccountSummariesResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.PageToken(x.NextPageToken)
}
}
// method id "analyticsadmin.accounts.delete":
type AccountsDeleteCall struct {
s *Service
name string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Marks target Account as soft-deleted (ie: "trashed") and
// returns it. This API does not have a method to restore soft-deleted
// accounts. However, they can be restored using the Trash Can UI. If
// the accounts are not restored before the expiration time, the account
// and all child resources (eg: Properties, GoogleAdsLinks, Streams,
// UserLinks) will be permanently purged.
// https://support.google.com/analytics/answer/6154772 Returns an error
// if the target is not found.
func (r *AccountsService) Delete(name string) *AccountsDeleteCall {
c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("DELETE", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.delete" call.
// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleProtobufEmpty{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.",
// "flatPath": "v1alpha/accounts/{accountsId}",
// "httpMethod": "DELETE",
// "id": "analyticsadmin.accounts.delete",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "Required. The name of the Account to soft-delete. Format: accounts/{account} Example: \"accounts/100\"",
// "location": "path",
// "pattern": "^accounts/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1alpha/{+name}",
// "response": {
// "$ref": "GoogleProtobufEmpty"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.edit"
// ]
// }
}
// method id "analyticsadmin.accounts.get":
type AccountsGetCall struct {
s *Service
name string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Lookup for a single Account. Throws "Target not found" if no
// such account found, or if caller does not have permissions to access
// it.
func (r *AccountsService) Get(name string) *AccountsGetCall {
c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.get" call.
// Exactly one of *GoogleAnalyticsAdminV1alphaAccount or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *GoogleAnalyticsAdminV1alphaAccount.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccount, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaAccount{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Lookup for a single Account. Throws \"Target not found\" if no such account found, or if caller does not have permissions to access it.",
// "flatPath": "v1alpha/accounts/{accountsId}",
// "httpMethod": "GET",
// "id": "analyticsadmin.accounts.get",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "Required. The name of the account to lookup. Format: accounts/{account} Example: \"accounts/100\"",
// "location": "path",
// "pattern": "^accounts/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1alpha/{+name}",
// "response": {
// "$ref": "GoogleAnalyticsAdminV1alphaAccount"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.readonly"
// ]
// }
}
// method id "analyticsadmin.accounts.getDataSharingSettings":
type AccountsGetDataSharingSettingsCall struct {
s *Service
name string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// GetDataSharingSettings: Get data sharing settings on an account. Data
// sharing settings are singletons.
func (r *AccountsService) GetDataSharingSettings(name string) *AccountsGetDataSharingSettingsCall {
c := &AccountsGetDataSharingSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsGetDataSharingSettingsCall) Fields(s ...googleapi.Field) *AccountsGetDataSharingSettingsCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *AccountsGetDataSharingSettingsCall) IfNoneMatch(entityTag string) *AccountsGetDataSharingSettingsCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsGetDataSharingSettingsCall) Context(ctx context.Context) *AccountsGetDataSharingSettingsCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsGetDataSharingSettingsCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsGetDataSharingSettingsCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.getDataSharingSettings" call.
// Exactly one of *GoogleAnalyticsAdminV1alphaDataSharingSettings or
// error will be non-nil. Any non-2xx status code is an error. Response
// headers are in either
// *GoogleAnalyticsAdminV1alphaDataSharingSettings.ServerResponse.Header
// or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountsGetDataSharingSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaDataSharingSettings, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaDataSharingSettings{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Get data sharing settings on an account. Data sharing settings are singletons.",
// "flatPath": "v1alpha/accounts/{accountsId}/dataSharingSettings",
// "httpMethod": "GET",
// "id": "analyticsadmin.accounts.getDataSharingSettings",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: \"accounts/1000/dataSharingSettings\"",
// "location": "path",
// "pattern": "^accounts/[^/]+/dataSharingSettings$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1alpha/{+name}",
// "response": {
// "$ref": "GoogleAnalyticsAdminV1alphaDataSharingSettings"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.readonly"
// ]
// }
}
// method id "analyticsadmin.accounts.list":
type AccountsListCall struct {
s *Service
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Returns all accounts accessible by the caller. Note that these
// accounts might not currently have App+Web properties. Soft-deleted
// (ie: "trashed") accounts are excluded by default. Returns an empty
// list if no relevant accounts are found.
func (r *AccountsService) List() *AccountsListCall {
c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
return c
}
// PageSize sets the optional parameter "pageSize": The maximum number
// of resources to return. The service may return fewer than this value,
// even if there are additional pages. If unspecified, at most 50
// resources will be returned. The maximum value is 200; (higher values
// will be coerced to the maximum)
func (c *AccountsListCall) PageSize(pageSize int64) *AccountsListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
// PageToken sets the optional parameter "pageToken": A page token,
// received from a previous `ListAccounts` call. Provide this to
// retrieve the subsequent page. When paginating, all other parameters
// provided to `ListAccounts` must match the call that provided the page
// token.
func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
c.urlParams_.Set("pageToken", pageToken)
return c
}
// ShowDeleted sets the optional parameter "showDeleted": Whether to
// include soft-deleted (ie: "trashed") Accounts in the results.
// Accounts can be inspected to determine whether they are deleted or
// not.
func (c *AccountsListCall) ShowDeleted(showDeleted bool) *AccountsListCall {
c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accounts")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.list" call.
// Exactly one of *GoogleAnalyticsAdminV1alphaListAccountsResponse or
// error will be non-nil. Any non-2xx status code is an error. Response
// headers are in either
// *GoogleAnalyticsAdminV1alphaListAccountsResponse.ServerResponse.Header
// or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListAccountsResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaListAccountsResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have App+Web properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.",
// "flatPath": "v1alpha/accounts",
// "httpMethod": "GET",
// "id": "analyticsadmin.accounts.list",
// "parameterOrder": [],
// "parameters": {
// "pageSize": {
// "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
// "description": "A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token.",
// "location": "query",
// "type": "string"
// },
// "showDeleted": {
// "description": "Whether to include soft-deleted (ie: \"trashed\") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.",
// "location": "query",
// "type": "boolean"
// }
// },
// "path": "v1alpha/accounts",
// "response": {
// "$ref": "GoogleAnalyticsAdminV1alphaListAccountsResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.readonly"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *AccountsListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListAccountsResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.PageToken(x.NextPageToken)
}
}
// method id "analyticsadmin.accounts.patch":
type AccountsPatchCall struct {
s *Service
name string
googleanalyticsadminv1alphaaccount *GoogleAnalyticsAdminV1alphaAccount
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Patch: Updates an account.
func (r *AccountsService) Patch(name string, googleanalyticsadminv1alphaaccount *GoogleAnalyticsAdminV1alphaAccount) *AccountsPatchCall {
c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.googleanalyticsadminv1alphaaccount = googleanalyticsadminv1alphaaccount
return c
}
// UpdateMask sets the optional parameter "updateMask": The list of
// fields to be updated. Omitted fields will not be updated.
func (c *AccountsPatchCall) UpdateMask(updateMask string) *AccountsPatchCall {
c.urlParams_.Set("updateMask", updateMask)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsPatchCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaccount)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("PATCH", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.patch" call.
// Exactly one of *GoogleAnalyticsAdminV1alphaAccount or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *GoogleAnalyticsAdminV1alphaAccount.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAccount, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaAccount{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Updates an account.",
// "flatPath": "v1alpha/accounts/{accountsId}",
// "httpMethod": "PATCH",
// "id": "analyticsadmin.accounts.patch",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "Output only. Resource name of this account. Format: accounts/{account} Example: \"accounts/100\"",
// "location": "path",
// "pattern": "^accounts/[^/]+$",
// "required": true,
// "type": "string"
// },
// "updateMask": {
// "description": "The list of fields to be updated. Omitted fields will not be updated.",
// "format": "google-fieldmask",
// "location": "query",
// "type": "string"
// }
// },
// "path": "v1alpha/{+name}",
// "request": {
// "$ref": "GoogleAnalyticsAdminV1alphaAccount"
// },
// "response": {
// "$ref": "GoogleAnalyticsAdminV1alphaAccount"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.edit"
// ]
// }
}
// method id "analyticsadmin.accounts.provisionAccountTicket":
type AccountsProvisionAccountTicketCall struct {
s *Service
googleanalyticsadminv1alphaprovisionaccountticketrequest *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// ProvisionAccountTicket: Requests a ticket for creating an account.
func (r *AccountsService) ProvisionAccountTicket(googleanalyticsadminv1alphaprovisionaccountticketrequest *GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest) *AccountsProvisionAccountTicketCall {
c := &AccountsProvisionAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.googleanalyticsadminv1alphaprovisionaccountticketrequest = googleanalyticsadminv1alphaprovisionaccountticketrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsProvisionAccountTicketCall) Fields(s ...googleapi.Field) *AccountsProvisionAccountTicketCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsProvisionAccountTicketCall) Context(ctx context.Context) *AccountsProvisionAccountTicketCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsProvisionAccountTicketCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsProvisionAccountTicketCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaprovisionaccountticketrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/accounts:provisionAccountTicket")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.provisionAccountTicket" call.
// Exactly one of
// *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse or error
// will be non-nil. Any non-2xx status code is an error. Response
// headers are in either
// *GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse.ServerRespo
// nse.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountsProvisionAccountTicketCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Requests a ticket for creating an account.",
// "flatPath": "v1alpha/accounts:provisionAccountTicket",
// "httpMethod": "POST",
// "id": "analyticsadmin.accounts.provisionAccountTicket",
// "parameterOrder": [],
// "parameters": {},
// "path": "v1alpha/accounts:provisionAccountTicket",
// "request": {
// "$ref": "GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest"
// },
// "response": {
// "$ref": "GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.edit"
// ]
// }
}
// method id "analyticsadmin.accounts.userLinks.audit":
type AccountsUserLinksAuditCall struct {
s *Service
parent string
googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Audit: Lists all user links on an account or property, including
// implicit ones that come from effective permissions granted by groups
// or organization admin roles. If a returned user link does not have
// direct permissions, they cannot be removed from the account or
// property directly with the DeleteUserLink command. They have to be
// removed from the group/etc that gives them permissions, which is
// currently only usable/discoverable in the GA or GMP UIs.
func (r *AccountsUserLinksService) Audit(parent string, googleanalyticsadminv1alphaaudituserlinksrequest *GoogleAnalyticsAdminV1alphaAuditUserLinksRequest) *AccountsUserLinksAuditCall {
c := &AccountsUserLinksAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
c.googleanalyticsadminv1alphaaudituserlinksrequest = googleanalyticsadminv1alphaaudituserlinksrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsUserLinksAuditCall) Fields(s ...googleapi.Field) *AccountsUserLinksAuditCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsUserLinksAuditCall) Context(ctx context.Context) *AccountsUserLinksAuditCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsUserLinksAuditCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsUserLinksAuditCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaaudituserlinksrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:audit")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.userLinks.audit" call.
// Exactly one of *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse or
// error will be non-nil. Any non-2xx status code is an error. Response
// headers are in either
// *GoogleAnalyticsAdminV1alphaAuditUserLinksResponse.ServerResponse.Head
// er or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountsUserLinksAuditCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaAuditUserLinksResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles. If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.",
// "flatPath": "v1alpha/accounts/{accountsId}/userLinks:audit",
// "httpMethod": "POST",
// "id": "analyticsadmin.accounts.userLinks.audit",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "parent": {
// "description": "Required. Example format: accounts/1234",
// "location": "path",
// "pattern": "^accounts/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1alpha/{+parent}/userLinks:audit",
// "request": {
// "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksRequest"
// },
// "response": {
// "$ref": "GoogleAnalyticsAdminV1alphaAuditUserLinksResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.manage.users.readonly"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *AccountsUserLinksAuditCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaAuditUserLinksResponse) error) error {
c.ctx_ = ctx
defer func(pt string) { c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = pt }(c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.googleanalyticsadminv1alphaaudituserlinksrequest.PageToken = x.NextPageToken
}
}
// method id "analyticsadmin.accounts.userLinks.batchCreate":
type AccountsUserLinksBatchCreateCall struct {
s *Service
parent string
googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// BatchCreate: Creates information about multiple users' links to an
// account or property. This method is transactional. If any UserLink
// cannot be created, none of the UserLinks will be created.
func (r *AccountsUserLinksService) BatchCreate(parent string, googleanalyticsadminv1alphabatchcreateuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest) *AccountsUserLinksBatchCreateCall {
c := &AccountsUserLinksBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
c.googleanalyticsadminv1alphabatchcreateuserlinksrequest = googleanalyticsadminv1alphabatchcreateuserlinksrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsUserLinksBatchCreateCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchCreateCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsUserLinksBatchCreateCall) Context(ctx context.Context) *AccountsUserLinksBatchCreateCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsUserLinksBatchCreateCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsUserLinksBatchCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchcreateuserlinksrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchCreate")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.userLinks.batchCreate" call.
// Exactly one of
// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse or error
// will be non-nil. Any non-2xx status code is an error. Response
// headers are in either
// *GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse.ServerRespons
// e.Header or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountsUserLinksBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Creates information about multiple users' links to an account or property. This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.",
// "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchCreate",
// "httpMethod": "POST",
// "id": "analyticsadmin.accounts.userLinks.batchCreate",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "parent": {
// "description": "Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234",
// "location": "path",
// "pattern": "^accounts/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1alpha/{+parent}/userLinks:batchCreate",
// "request": {
// "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest"
// },
// "response": {
// "$ref": "GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.manage.users"
// ]
// }
}
// method id "analyticsadmin.accounts.userLinks.batchDelete":
type AccountsUserLinksBatchDeleteCall struct {
s *Service
parent string
googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// BatchDelete: Deletes information about multiple users' links to an
// account or property.
func (r *AccountsUserLinksService) BatchDelete(parent string, googleanalyticsadminv1alphabatchdeleteuserlinksrequest *GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest) *AccountsUserLinksBatchDeleteCall {
c := &AccountsUserLinksBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest = googleanalyticsadminv1alphabatchdeleteuserlinksrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsUserLinksBatchDeleteCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchDeleteCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsUserLinksBatchDeleteCall) Context(ctx context.Context) *AccountsUserLinksBatchDeleteCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsUserLinksBatchDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsUserLinksBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphabatchdeleteuserlinksrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchDelete")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.userLinks.batchDelete" call.
// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *AccountsUserLinksBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleProtobufEmpty{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Deletes information about multiple users' links to an account or property.",
// "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchDelete",
// "httpMethod": "POST",
// "id": "analyticsadmin.accounts.userLinks.batchDelete",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "parent": {
// "description": "Required. The account or property that all user links in the request are for. The parent of all values for user link names to delete must match this field. Example format: accounts/1234",
// "location": "path",
// "pattern": "^accounts/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1alpha/{+parent}/userLinks:batchDelete",
// "request": {
// "$ref": "GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest"
// },
// "response": {
// "$ref": "GoogleProtobufEmpty"
// },
// "scopes": [
// "https://www.googleapis.com/auth/analytics.manage.users"
// ]
// }
}
// method id "analyticsadmin.accounts.userLinks.batchGet":
type AccountsUserLinksBatchGetCall struct {
s *Service
parent string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// BatchGet: Gets information about multiple users' links to an account
// or property.
func (r *AccountsUserLinksService) BatchGet(parent string) *AccountsUserLinksBatchGetCall {
c := &AccountsUserLinksBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
return c
}
// Names sets the optional parameter "names": Required. The names of the
// user links to retrieve. A maximum of 1000 user links can be retrieved
// in a batch. Format: accounts/{accountId}/userLinks/{userLinkId}
func (c *AccountsUserLinksBatchGetCall) Names(names ...string) *AccountsUserLinksBatchGetCall {
c.urlParams_.SetMulti("names", append([]string{}, names...))
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *AccountsUserLinksBatchGetCall) Fields(s ...googleapi.Field) *AccountsUserLinksBatchGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *AccountsUserLinksBatchGetCall) IfNoneMatch(entityTag string) *AccountsUserLinksBatchGetCall {
c.ifNoneMatch_ = entityTag
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *AccountsUserLinksBatchGetCall) Context(ctx context.Context) *AccountsUserLinksBatchGetCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *AccountsUserLinksBatchGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *AccountsUserLinksBatchGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200926")
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userLinks:batchGet")
urls += "?" + c.urlParams_.Encode()
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "analyticsadmin.accounts.userLinks.batchGet" call.
// Exactly one of *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse
// or error will be non-nil. Any non-2xx status code is an error.
// Response headers are in either
// *GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse.ServerResponse.H
// eader or (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *AccountsUserLinksBatchGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Gets information about multiple users' links to an account or property.",
// "flatPath": "v1alpha/accounts/{accountsId}/userLinks:batchGet",
// "httpMethod": "GET",
// "id": "analyticsadmin.accounts.userLinks.batchGet",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "names": {
// "description": "Required. The names of the user links to retrieve. A maximum of 1000 user links can be retrieved in a batch. Format: accounts/{accountId}/userLinks/{userLinkId}",