admin

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package admin is an auto-generated package for the Google Analytics Admin API.

NOTE: This package is in alpha. It is not stable, and is likely to change.

Example usage

To get started with this package, create a client.

ctx := context.Background()
c, err := admin.NewAnalyticsAdminClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client.

ctx := context.Background()
c, err := admin.NewAnalyticsAdminClient(ctx)
if err != nil {
	// TODO: Handle error.
}
defer c.Close()

req := &adminpb.GetAccountRequest{
	// TODO: Fill request struct fields.
	// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetAccountRequest.
}
resp, err := c.GetAccount(ctx, req)
if err != nil {
	// TODO: Handle error.
}
// TODO: Use resp.
_ = resp

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

Types

type AccountIterator

type AccountIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.Account, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AccountIterator manages a stream of *adminpb.Account.

func (*AccountIterator) Next

func (it *AccountIterator) Next() (*adminpb.Account, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AccountIterator) PageInfo

func (it *AccountIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type AccountSummaryIterator

type AccountSummaryIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.AccountSummary, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AccountSummaryIterator manages a stream of *adminpb.AccountSummary.

func (*AccountSummaryIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AccountSummaryIterator) PageInfo

func (it *AccountSummaryIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type AnalyticsAdminCallOptions

type AnalyticsAdminCallOptions struct {
	GetAccount                                   []gax.CallOption
	ListAccounts                                 []gax.CallOption
	DeleteAccount                                []gax.CallOption
	UpdateAccount                                []gax.CallOption
	ProvisionAccountTicket                       []gax.CallOption
	ListAccountSummaries                         []gax.CallOption
	GetProperty                                  []gax.CallOption
	ListProperties                               []gax.CallOption
	CreateProperty                               []gax.CallOption
	DeleteProperty                               []gax.CallOption
	UpdateProperty                               []gax.CallOption
	GetUserLink                                  []gax.CallOption
	BatchGetUserLinks                            []gax.CallOption
	ListUserLinks                                []gax.CallOption
	AuditUserLinks                               []gax.CallOption
	CreateUserLink                               []gax.CallOption
	BatchCreateUserLinks                         []gax.CallOption
	UpdateUserLink                               []gax.CallOption
	BatchUpdateUserLinks                         []gax.CallOption
	DeleteUserLink                               []gax.CallOption
	BatchDeleteUserLinks                         []gax.CallOption
	GetWebDataStream                             []gax.CallOption
	DeleteWebDataStream                          []gax.CallOption
	UpdateWebDataStream                          []gax.CallOption
	CreateWebDataStream                          []gax.CallOption
	ListWebDataStreams                           []gax.CallOption
	GetIosAppDataStream                          []gax.CallOption
	DeleteIosAppDataStream                       []gax.CallOption
	UpdateIosAppDataStream                       []gax.CallOption
	ListIosAppDataStreams                        []gax.CallOption
	GetAndroidAppDataStream                      []gax.CallOption
	DeleteAndroidAppDataStream                   []gax.CallOption
	UpdateAndroidAppDataStream                   []gax.CallOption
	ListAndroidAppDataStreams                    []gax.CallOption
	CreateFirebaseLink                           []gax.CallOption
	DeleteFirebaseLink                           []gax.CallOption
	ListFirebaseLinks                            []gax.CallOption
	GetGlobalSiteTag                             []gax.CallOption
	CreateGoogleAdsLink                          []gax.CallOption
	UpdateGoogleAdsLink                          []gax.CallOption
	DeleteGoogleAdsLink                          []gax.CallOption
	ListGoogleAdsLinks                           []gax.CallOption
	GetDataSharingSettings                       []gax.CallOption
	GetMeasurementProtocolSecret                 []gax.CallOption
	ListMeasurementProtocolSecrets               []gax.CallOption
	CreateMeasurementProtocolSecret              []gax.CallOption
	DeleteMeasurementProtocolSecret              []gax.CallOption
	UpdateMeasurementProtocolSecret              []gax.CallOption
	AcknowledgeUserDataCollection                []gax.CallOption
	SearchChangeHistoryEvents                    []gax.CallOption
	GetGoogleSignalsSettings                     []gax.CallOption
	UpdateGoogleSignalsSettings                  []gax.CallOption
	CreateConversionEvent                        []gax.CallOption
	GetConversionEvent                           []gax.CallOption
	DeleteConversionEvent                        []gax.CallOption
	ListConversionEvents                         []gax.CallOption
	GetDisplayVideo360AdvertiserLink             []gax.CallOption
	ListDisplayVideo360AdvertiserLinks           []gax.CallOption
	CreateDisplayVideo360AdvertiserLink          []gax.CallOption
	DeleteDisplayVideo360AdvertiserLink          []gax.CallOption
	UpdateDisplayVideo360AdvertiserLink          []gax.CallOption
	GetDisplayVideo360AdvertiserLinkProposal     []gax.CallOption
	ListDisplayVideo360AdvertiserLinkProposals   []gax.CallOption
	CreateDisplayVideo360AdvertiserLinkProposal  []gax.CallOption
	DeleteDisplayVideo360AdvertiserLinkProposal  []gax.CallOption
	ApproveDisplayVideo360AdvertiserLinkProposal []gax.CallOption
	CancelDisplayVideo360AdvertiserLinkProposal  []gax.CallOption
	CreateCustomDimension                        []gax.CallOption
	UpdateCustomDimension                        []gax.CallOption
	ListCustomDimensions                         []gax.CallOption
	ArchiveCustomDimension                       []gax.CallOption
	GetCustomDimension                           []gax.CallOption
	CreateCustomMetric                           []gax.CallOption
	UpdateCustomMetric                           []gax.CallOption
	ListCustomMetrics                            []gax.CallOption
	ArchiveCustomMetric                          []gax.CallOption
	GetCustomMetric                              []gax.CallOption
	GetDataRetentionSettings                     []gax.CallOption
	UpdateDataRetentionSettings                  []gax.CallOption
	CreateDataStream                             []gax.CallOption
	DeleteDataStream                             []gax.CallOption
	UpdateDataStream                             []gax.CallOption
	ListDataStreams                              []gax.CallOption
	GetDataStream                                []gax.CallOption
}

AnalyticsAdminCallOptions contains the retry settings for each method of AnalyticsAdminClient.

type AnalyticsAdminClient

type AnalyticsAdminClient struct {

	// The call options for this service.
	CallOptions *AnalyticsAdminCallOptions
	// contains filtered or unexported fields
}

AnalyticsAdminClient is a client for interacting with Google Analytics Admin API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service Interface for the Analytics Admin API (GA4).

func NewAnalyticsAdminClient

func NewAnalyticsAdminClient(ctx context.Context, opts ...option.ClientOption) (*AnalyticsAdminClient, error)

NewAnalyticsAdminClient creates a new analytics admin service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Service Interface for the Analytics Admin API (GA4).

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}
Output:

func (*AnalyticsAdminClient) AcknowledgeUserDataCollection added in v0.3.0

AcknowledgeUserDataCollection acknowledges the terms of user data collection for the specified property.

This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.AcknowledgeUserDataCollectionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#AcknowledgeUserDataCollectionRequest.
	}
	resp, err := c.AcknowledgeUserDataCollection(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) ApproveDisplayVideo360AdvertiserLinkProposal added in v0.2.0

ApproveDisplayVideo360AdvertiserLinkProposal approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal will be deleted and a new DisplayVideo360AdvertiserLink will be created.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ApproveDisplayVideo360AdvertiserLinkProposalRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ApproveDisplayVideo360AdvertiserLinkProposalRequest.
	}
	resp, err := c.ApproveDisplayVideo360AdvertiserLinkProposal(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) ArchiveCustomDimension

func (c *AnalyticsAdminClient) ArchiveCustomDimension(ctx context.Context, req *adminpb.ArchiveCustomDimensionRequest, opts ...gax.CallOption) error

ArchiveCustomDimension archives a CustomDimension on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ArchiveCustomDimensionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ArchiveCustomDimensionRequest.
	}
	err = c.ArchiveCustomDimension(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*AnalyticsAdminClient) ArchiveCustomMetric

func (c *AnalyticsAdminClient) ArchiveCustomMetric(ctx context.Context, req *adminpb.ArchiveCustomMetricRequest, opts ...gax.CallOption) error

ArchiveCustomMetric archives a CustomMetric on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ArchiveCustomMetricRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ArchiveCustomMetricRequest.
	}
	err = c.ArchiveCustomMetric(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

AuditUserLinks 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.

BatchCreateUserLinks 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 (c *AnalyticsAdminClient) BatchDeleteUserLinks(ctx context.Context, req *adminpb.BatchDeleteUserLinksRequest, opts ...gax.CallOption) error

BatchDeleteUserLinks deletes information about multiple users’ links to an account or property.

BatchGetUserLinks gets information about multiple users’ links to an account or property.

BatchUpdateUserLinks updates information about multiple users’ links to an account or property.

func (*AnalyticsAdminClient) CancelDisplayVideo360AdvertiserLinkProposal added in v0.2.0

CancelDisplayVideo360AdvertiserLinkProposal cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either:

Declining a proposal initiated from Display & Video 360

Withdrawing a proposal initiated from Google Analytics
After being cancelled, a proposal will eventually be deleted automatically.
Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CancelDisplayVideo360AdvertiserLinkProposalRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CancelDisplayVideo360AdvertiserLinkProposalRequest.
	}
	resp, err := c.CancelDisplayVideo360AdvertiserLinkProposal(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) Close

func (c *AnalyticsAdminClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*AnalyticsAdminClient) Connection

func (c *AnalyticsAdminClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*AnalyticsAdminClient) CreateConversionEvent

CreateConversionEvent creates a conversion event with the specified attributes.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CreateConversionEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreateConversionEventRequest.
	}
	resp, err := c.CreateConversionEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) CreateCustomDimension

CreateCustomDimension creates a CustomDimension.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CreateCustomDimensionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreateCustomDimensionRequest.
	}
	resp, err := c.CreateCustomDimension(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) CreateCustomMetric

CreateCustomMetric creates a CustomMetric.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CreateCustomMetricRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreateCustomMetricRequest.
	}
	resp, err := c.CreateCustomMetric(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) CreateDataStream added in v0.3.0

CreateDataStream creates a DataStream.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CreateDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreateDataStreamRequest.
	}
	resp, err := c.CreateDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

CreateDisplayVideo360AdvertiserLink creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper authorization both on the Google Analytics property and on the Display & Video 360 advertiser. Users who do not have access to the Display & Video 360 advertiser should instead seek to create a DisplayVideo360LinkProposal.

func (*AnalyticsAdminClient) CreateDisplayVideo360AdvertiserLinkProposal added in v0.2.0

CreateDisplayVideo360AdvertiserLinkProposal creates a DisplayVideo360AdvertiserLinkProposal.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CreateDisplayVideo360AdvertiserLinkProposalRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreateDisplayVideo360AdvertiserLinkProposalRequest.
	}
	resp, err := c.CreateDisplayVideo360AdvertiserLinkProposal(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

CreateFirebaseLink creates a FirebaseLink.

Properties can have at most one FirebaseLink.

CreateGoogleAdsLink creates a GoogleAdsLink.

func (*AnalyticsAdminClient) CreateMeasurementProtocolSecret

CreateMeasurementProtocolSecret creates a measurement protocol secret.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CreateMeasurementProtocolSecretRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreateMeasurementProtocolSecretRequest.
	}
	resp, err := c.CreateMeasurementProtocolSecret(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) CreateProperty

CreateProperty creates an “GA4” property with the specified location and attributes.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CreatePropertyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreatePropertyRequest.
	}
	resp, err := c.CreateProperty(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

CreateUserLink creates a user link on an account or property.

If the user with the specified email already has permissions on the account or property, then the user’s existing permissions will be unioned with the permissions specified in the new UserLink.

func (*AnalyticsAdminClient) CreateWebDataStream

CreateWebDataStream creates a web stream with the specified location and attributes.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.CreateWebDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreateWebDataStreamRequest.
	}
	resp, err := c.CreateWebDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) DeleteAccount

func (c *AnalyticsAdminClient) DeleteAccount(ctx context.Context, req *adminpb.DeleteAccountRequest, opts ...gax.CallOption) error

DeleteAccount 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 (at https://support.google.com/analytics/answer/6154772)

Returns an error if the target is not found.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeleteAccountRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeleteAccountRequest.
	}
	err = c.DeleteAccount(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*AnalyticsAdminClient) DeleteAndroidAppDataStream

func (c *AnalyticsAdminClient) DeleteAndroidAppDataStream(ctx context.Context, req *adminpb.DeleteAndroidAppDataStreamRequest, opts ...gax.CallOption) error

DeleteAndroidAppDataStream deletes an android app stream on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeleteAndroidAppDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeleteAndroidAppDataStreamRequest.
	}
	err = c.DeleteAndroidAppDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*AnalyticsAdminClient) DeleteConversionEvent

func (c *AnalyticsAdminClient) DeleteConversionEvent(ctx context.Context, req *adminpb.DeleteConversionEventRequest, opts ...gax.CallOption) error

DeleteConversionEvent deletes a conversion event in a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeleteConversionEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeleteConversionEventRequest.
	}
	err = c.DeleteConversionEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*AnalyticsAdminClient) DeleteDataStream added in v0.3.0

func (c *AnalyticsAdminClient) DeleteDataStream(ctx context.Context, req *adminpb.DeleteDataStreamRequest, opts ...gax.CallOption) error

DeleteDataStream deletes a DataStream on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeleteDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeleteDataStreamRequest.
	}
	err = c.DeleteDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (c *AnalyticsAdminClient) DeleteDisplayVideo360AdvertiserLink(ctx context.Context, req *adminpb.DeleteDisplayVideo360AdvertiserLinkRequest, opts ...gax.CallOption) error

DeleteDisplayVideo360AdvertiserLink deletes a DisplayVideo360AdvertiserLink on a property.

func (*AnalyticsAdminClient) DeleteDisplayVideo360AdvertiserLinkProposal added in v0.2.0

func (c *AnalyticsAdminClient) DeleteDisplayVideo360AdvertiserLinkProposal(ctx context.Context, req *adminpb.DeleteDisplayVideo360AdvertiserLinkProposalRequest, opts ...gax.CallOption) error

DeleteDisplayVideo360AdvertiserLinkProposal deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on cancelled proposals.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeleteDisplayVideo360AdvertiserLinkProposalRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeleteDisplayVideo360AdvertiserLinkProposalRequest.
	}
	err = c.DeleteDisplayVideo360AdvertiserLinkProposal(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (c *AnalyticsAdminClient) DeleteFirebaseLink(ctx context.Context, req *adminpb.DeleteFirebaseLinkRequest, opts ...gax.CallOption) error

DeleteFirebaseLink deletes a FirebaseLink on a property

func (c *AnalyticsAdminClient) DeleteGoogleAdsLink(ctx context.Context, req *adminpb.DeleteGoogleAdsLinkRequest, opts ...gax.CallOption) error

DeleteGoogleAdsLink deletes a GoogleAdsLink on a property

func (*AnalyticsAdminClient) DeleteIosAppDataStream

func (c *AnalyticsAdminClient) DeleteIosAppDataStream(ctx context.Context, req *adminpb.DeleteIosAppDataStreamRequest, opts ...gax.CallOption) error

DeleteIosAppDataStream deletes an iOS app stream on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeleteIosAppDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeleteIosAppDataStreamRequest.
	}
	err = c.DeleteIosAppDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*AnalyticsAdminClient) DeleteMeasurementProtocolSecret

func (c *AnalyticsAdminClient) DeleteMeasurementProtocolSecret(ctx context.Context, req *adminpb.DeleteMeasurementProtocolSecretRequest, opts ...gax.CallOption) error

DeleteMeasurementProtocolSecret deletes target MeasurementProtocolSecret.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeleteMeasurementProtocolSecretRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeleteMeasurementProtocolSecretRequest.
	}
	err = c.DeleteMeasurementProtocolSecret(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*AnalyticsAdminClient) DeleteProperty

DeleteProperty marks target Property as soft-deleted (ie: “trashed”) and returns it.

This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.

If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 (at https://support.google.com/analytics/answer/6154772)

Returns an error if the target is not found, or is not an GA4 Property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeletePropertyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeletePropertyRequest.
	}
	resp, err := c.DeleteProperty(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (c *AnalyticsAdminClient) DeleteUserLink(ctx context.Context, req *adminpb.DeleteUserLinkRequest, opts ...gax.CallOption) error

DeleteUserLink deletes a user link on an account or property.

func (*AnalyticsAdminClient) DeleteWebDataStream

func (c *AnalyticsAdminClient) DeleteWebDataStream(ctx context.Context, req *adminpb.DeleteWebDataStreamRequest, opts ...gax.CallOption) error

DeleteWebDataStream deletes a web stream on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.DeleteWebDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#DeleteWebDataStreamRequest.
	}
	err = c.DeleteWebDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}
Output:

func (*AnalyticsAdminClient) GetAccount

GetAccount lookup for a single Account.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetAccountRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetAccountRequest.
	}
	resp, err := c.GetAccount(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetAndroidAppDataStream

GetAndroidAppDataStream lookup for a single AndroidAppDataStream

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetAndroidAppDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetAndroidAppDataStreamRequest.
	}
	resp, err := c.GetAndroidAppDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetConversionEvent

GetConversionEvent retrieve a single conversion event.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetConversionEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetConversionEventRequest.
	}
	resp, err := c.GetConversionEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetCustomDimension

GetCustomDimension lookup for a single CustomDimension.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetCustomDimensionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetCustomDimensionRequest.
	}
	resp, err := c.GetCustomDimension(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetCustomMetric

GetCustomMetric lookup for a single CustomMetric.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetCustomMetricRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetCustomMetricRequest.
	}
	resp, err := c.GetCustomMetric(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetDataRetentionSettings added in v0.2.0

GetDataRetentionSettings returns the singleton data retention settings for this property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetDataRetentionSettingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetDataRetentionSettingsRequest.
	}
	resp, err := c.GetDataRetentionSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetDataSharingSettings

GetDataSharingSettings get data sharing settings on an account. Data sharing settings are singletons.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetDataSharingSettingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetDataSharingSettingsRequest.
	}
	resp, err := c.GetDataSharingSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetDataStream added in v0.3.0

GetDataStream lookup for a single DataStream.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetDataStreamRequest.
	}
	resp, err := c.GetDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

GetDisplayVideo360AdvertiserLink look up a single DisplayVideo360AdvertiserLink

func (*AnalyticsAdminClient) GetDisplayVideo360AdvertiserLinkProposal added in v0.2.0

GetDisplayVideo360AdvertiserLinkProposal lookup for a single DisplayVideo360AdvertiserLinkProposal.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetDisplayVideo360AdvertiserLinkProposalRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetDisplayVideo360AdvertiserLinkProposalRequest.
	}
	resp, err := c.GetDisplayVideo360AdvertiserLinkProposal(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetGlobalSiteTag

GetGlobalSiteTag returns the Site Tag for the specified web stream. Site Tags are immutable singletons.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetGlobalSiteTagRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetGlobalSiteTagRequest.
	}
	resp, err := c.GetGlobalSiteTag(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetGoogleSignalsSettings

GetGoogleSignalsSettings lookup for Google Signals settings for a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetGoogleSignalsSettingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetGoogleSignalsSettingsRequest.
	}
	resp, err := c.GetGoogleSignalsSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetIosAppDataStream

GetIosAppDataStream lookup for a single IosAppDataStream

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetIosAppDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetIosAppDataStreamRequest.
	}
	resp, err := c.GetIosAppDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetMeasurementProtocolSecret

GetMeasurementProtocolSecret lookup for a single “GA4” MeasurementProtocolSecret.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetMeasurementProtocolSecretRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetMeasurementProtocolSecretRequest.
	}
	resp, err := c.GetMeasurementProtocolSecret(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) GetProperty

GetProperty lookup for a single “GA4” Property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetPropertyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetPropertyRequest.
	}
	resp, err := c.GetProperty(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

GetUserLink gets information about a user’s link to an account or property.

func (*AnalyticsAdminClient) GetWebDataStream

GetWebDataStream lookup for a single WebDataStream

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.GetWebDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetWebDataStreamRequest.
	}
	resp, err := c.GetWebDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) ListAccountSummaries

ListAccountSummaries returns summaries of all accounts accessible by the caller.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListAccountSummariesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListAccountSummariesRequest.
	}
	it := c.ListAccountSummaries(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListAccounts

ListAccounts returns all accounts accessible by the caller.

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: “trashed”) accounts are excluded by default. Returns an empty list if no relevant accounts are found.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListAccountsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListAccountsRequest.
	}
	it := c.ListAccounts(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListAndroidAppDataStreams

ListAndroidAppDataStreams returns child android app streams under the specified parent property.

Android app streams will be excluded if the caller does not have access. Returns an empty list if no relevant android app streams are found.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListAndroidAppDataStreamsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListAndroidAppDataStreamsRequest.
	}
	it := c.ListAndroidAppDataStreams(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListConversionEvents

ListConversionEvents returns a list of conversion events in the specified parent property.

Returns an empty list if no conversion events are found.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListConversionEventsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListConversionEventsRequest.
	}
	it := c.ListConversionEvents(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListCustomDimensions

ListCustomDimensions lists CustomDimensions on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListCustomDimensionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListCustomDimensionsRequest.
	}
	it := c.ListCustomDimensions(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListCustomMetrics

ListCustomMetrics lists CustomMetrics on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListCustomMetricsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListCustomMetricsRequest.
	}
	it := c.ListCustomMetrics(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListDataStreams added in v0.3.0

ListDataStreams lists DataStreams on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListDataStreamsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListDataStreamsRequest.
	}
	it := c.ListDataStreams(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListDisplayVideo360AdvertiserLinkProposals added in v0.2.0

ListDisplayVideo360AdvertiserLinkProposals lists DisplayVideo360AdvertiserLinkProposals on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListDisplayVideo360AdvertiserLinkProposalsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListDisplayVideo360AdvertiserLinkProposalsRequest.
	}
	it := c.ListDisplayVideo360AdvertiserLinkProposals(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

ListDisplayVideo360AdvertiserLinks lists all DisplayVideo360AdvertiserLinks on a property.

ListFirebaseLinks lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.

ListGoogleAdsLinks lists GoogleAdsLinks on a property.

func (*AnalyticsAdminClient) ListIosAppDataStreams

ListIosAppDataStreams returns child iOS app data streams under the specified parent property.

iOS app data streams will be excluded if the caller does not have access. Returns an empty list if no relevant iOS app data streams are found.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListIosAppDataStreamsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListIosAppDataStreamsRequest.
	}
	it := c.ListIosAppDataStreams(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListMeasurementProtocolSecrets

ListMeasurementProtocolSecrets returns child MeasurementProtocolSecrets under the specified parent Property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListMeasurementProtocolSecretsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListMeasurementProtocolSecretsRequest.
	}
	it := c.ListMeasurementProtocolSecrets(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ListProperties

ListProperties returns child Properties under the specified parent Account.

Only “GA4” properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: “trashed”) properties are excluded by default. Returns an empty list if no relevant properties are found.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListPropertiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListPropertiesRequest.
	}
	it := c.ListProperties(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

ListUserLinks lists all user links on an account or property.

func (*AnalyticsAdminClient) ListWebDataStreams

ListWebDataStreams returns child web data streams under the specified parent property.

Web data streams will be excluded if the caller does not have access. Returns an empty list if no relevant web data streams are found.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ListWebDataStreamsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListWebDataStreamsRequest.
	}
	it := c.ListWebDataStreams(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) ProvisionAccountTicket

ProvisionAccountTicket requests a ticket for creating an account.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.ProvisionAccountTicketRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ProvisionAccountTicketRequest.
	}
	resp, err := c.ProvisionAccountTicket(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) SearchChangeHistoryEvents

SearchChangeHistoryEvents searches through all changes to an account or its children given the specified set of filters.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"
	"google.golang.org/api/iterator"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.SearchChangeHistoryEventsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#SearchChangeHistoryEventsRequest.
	}
	it := c.SearchChangeHistoryEvents(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}
Output:

func (*AnalyticsAdminClient) UpdateAccount

UpdateAccount updates an account.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateAccountRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateAccountRequest.
	}
	resp, err := c.UpdateAccount(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) UpdateAndroidAppDataStream

UpdateAndroidAppDataStream updates an android app stream on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateAndroidAppDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateAndroidAppDataStreamRequest.
	}
	resp, err := c.UpdateAndroidAppDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) UpdateCustomDimension

UpdateCustomDimension updates a CustomDimension on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateCustomDimensionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateCustomDimensionRequest.
	}
	resp, err := c.UpdateCustomDimension(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) UpdateCustomMetric

UpdateCustomMetric updates a CustomMetric on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateCustomMetricRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateCustomMetricRequest.
	}
	resp, err := c.UpdateCustomMetric(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) UpdateDataRetentionSettings added in v0.2.0

UpdateDataRetentionSettings updates the singleton data retention settings for this property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateDataRetentionSettingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateDataRetentionSettingsRequest.
	}
	resp, err := c.UpdateDataRetentionSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) UpdateDataStream added in v0.3.0

UpdateDataStream updates a DataStream on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateDataStreamRequest.
	}
	resp, err := c.UpdateDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

UpdateDisplayVideo360AdvertiserLink updates a DisplayVideo360AdvertiserLink on a property.

UpdateGoogleAdsLink updates a GoogleAdsLink on a property

func (*AnalyticsAdminClient) UpdateGoogleSignalsSettings

UpdateGoogleSignalsSettings updates Google Signals settings for a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateGoogleSignalsSettingsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateGoogleSignalsSettingsRequest.
	}
	resp, err := c.UpdateGoogleSignalsSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) UpdateIosAppDataStream

UpdateIosAppDataStream updates an iOS app stream on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateIosAppDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateIosAppDataStreamRequest.
	}
	resp, err := c.UpdateIosAppDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) UpdateMeasurementProtocolSecret

UpdateMeasurementProtocolSecret updates a measurement protocol secret.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateMeasurementProtocolSecretRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateMeasurementProtocolSecretRequest.
	}
	resp, err := c.UpdateMeasurementProtocolSecret(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

func (*AnalyticsAdminClient) UpdateProperty

UpdateProperty updates a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdatePropertyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdatePropertyRequest.
	}
	resp, err := c.UpdateProperty(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

UpdateUserLink updates a user link on an account or property.

func (*AnalyticsAdminClient) UpdateWebDataStream

UpdateWebDataStream updates a web stream on a property.

Example
package main

import (
	"context"

	admin "cloud.google.com/go/analytics/admin/apiv1alpha"

	adminpb "google.golang.org/genproto/googleapis/analytics/admin/v1alpha"
)

func main() {
	ctx := context.Background()
	c, err := admin.NewAnalyticsAdminClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &adminpb.UpdateWebDataStreamRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateWebDataStreamRequest.
	}
	resp, err := c.UpdateWebDataStream(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}
Output:

type AndroidAppDataStreamIterator

type AndroidAppDataStreamIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.AndroidAppDataStream, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AndroidAppDataStreamIterator manages a stream of *adminpb.AndroidAppDataStream.

func (*AndroidAppDataStreamIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AndroidAppDataStreamIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type AuditUserLinkIterator

type AuditUserLinkIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.AuditUserLink, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AuditUserLinkIterator manages a stream of *adminpb.AuditUserLink.

func (*AuditUserLinkIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AuditUserLinkIterator) PageInfo

func (it *AuditUserLinkIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ChangeHistoryEventIterator

type ChangeHistoryEventIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.ChangeHistoryEvent, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ChangeHistoryEventIterator manages a stream of *adminpb.ChangeHistoryEvent.

func (*ChangeHistoryEventIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ChangeHistoryEventIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ConversionEventIterator

type ConversionEventIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.ConversionEvent, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ConversionEventIterator manages a stream of *adminpb.ConversionEvent.

func (*ConversionEventIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ConversionEventIterator) PageInfo

func (it *ConversionEventIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type CustomDimensionIterator

type CustomDimensionIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.CustomDimension, nextPageToken string, err error)
	// contains filtered or unexported fields
}

CustomDimensionIterator manages a stream of *adminpb.CustomDimension.

func (*CustomDimensionIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*CustomDimensionIterator) PageInfo

func (it *CustomDimensionIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type CustomMetricIterator

type CustomMetricIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.CustomMetric, nextPageToken string, err error)
	// contains filtered or unexported fields
}

CustomMetricIterator manages a stream of *adminpb.CustomMetric.

func (*CustomMetricIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*CustomMetricIterator) PageInfo

func (it *CustomMetricIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type DataStreamIterator added in v0.3.0

type DataStreamIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.DataStream, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DataStreamIterator manages a stream of *adminpb.DataStream.

func (*DataStreamIterator) Next added in v0.3.0

func (it *DataStreamIterator) Next() (*adminpb.DataStream, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DataStreamIterator) PageInfo added in v0.3.0

func (it *DataStreamIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type DisplayVideo360AdvertiserLinkIterator added in v0.2.0

type DisplayVideo360AdvertiserLinkIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.DisplayVideo360AdvertiserLink, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DisplayVideo360AdvertiserLinkIterator manages a stream of *adminpb.DisplayVideo360AdvertiserLink.

func (*DisplayVideo360AdvertiserLinkIterator) Next added in v0.2.0

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DisplayVideo360AdvertiserLinkIterator) PageInfo added in v0.2.0

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type DisplayVideo360AdvertiserLinkProposalIterator added in v0.2.0

type DisplayVideo360AdvertiserLinkProposalIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.DisplayVideo360AdvertiserLinkProposal, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DisplayVideo360AdvertiserLinkProposalIterator manages a stream of *adminpb.DisplayVideo360AdvertiserLinkProposal.

func (*DisplayVideo360AdvertiserLinkProposalIterator) Next added in v0.2.0

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DisplayVideo360AdvertiserLinkProposalIterator) PageInfo added in v0.2.0

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type FirebaseLinkIterator

type FirebaseLinkIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.FirebaseLink, nextPageToken string, err error)
	// contains filtered or unexported fields
}

FirebaseLinkIterator manages a stream of *adminpb.FirebaseLink.

func (*FirebaseLinkIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*FirebaseLinkIterator) PageInfo

func (it *FirebaseLinkIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type GoogleAdsLinkIterator

type GoogleAdsLinkIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.GoogleAdsLink, nextPageToken string, err error)
	// contains filtered or unexported fields
}

GoogleAdsLinkIterator manages a stream of *adminpb.GoogleAdsLink.

func (*GoogleAdsLinkIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*GoogleAdsLinkIterator) PageInfo

func (it *GoogleAdsLinkIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type IosAppDataStreamIterator

type IosAppDataStreamIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.IosAppDataStream, nextPageToken string, err error)
	// contains filtered or unexported fields
}

IosAppDataStreamIterator manages a stream of *adminpb.IosAppDataStream.

func (*IosAppDataStreamIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*IosAppDataStreamIterator) PageInfo

func (it *IosAppDataStreamIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type MeasurementProtocolSecretIterator

type MeasurementProtocolSecretIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.MeasurementProtocolSecret, nextPageToken string, err error)
	// contains filtered or unexported fields
}

MeasurementProtocolSecretIterator manages a stream of *adminpb.MeasurementProtocolSecret.

func (*MeasurementProtocolSecretIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*MeasurementProtocolSecretIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type PropertyIterator

type PropertyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.Property, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PropertyIterator manages a stream of *adminpb.Property.

func (*PropertyIterator) Next

func (it *PropertyIterator) Next() (*adminpb.Property, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PropertyIterator) PageInfo

func (it *PropertyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type UserLinkIterator

type UserLinkIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.UserLink, nextPageToken string, err error)
	// contains filtered or unexported fields
}

UserLinkIterator manages a stream of *adminpb.UserLink.

func (*UserLinkIterator) Next

func (it *UserLinkIterator) Next() (*adminpb.UserLink, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*UserLinkIterator) PageInfo

func (it *UserLinkIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type WebDataStreamIterator

type WebDataStreamIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*adminpb.WebDataStream, nextPageToken string, err error)
	// contains filtered or unexported fields
}

WebDataStreamIterator manages a stream of *adminpb.WebDataStream.

func (*WebDataStreamIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*WebDataStreamIterator) PageInfo

func (it *WebDataStreamIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL