datamanager

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package datamanager is an auto-generated package for the Data Manager API.

A unified ingestion API for data partners, agencies and advertisers to connect first-party data across Google advertising products.

NOTE: This package is in beta. It is not stable, and may be subject to changes.

General documentation

For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:

Example usage

To get started with this package, create a client.

// go get cloud.google.com/go/datamanager/apiv1@latest
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := datamanager.NewIngestionClient(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, mentioned above.

req := &datamanagerpb.IngestAudienceMembersRequest{
	// TODO: Fill request struct fields.
	// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#IngestAudienceMembersRequest.
}
resp, err := c.IngestAudienceMembers(ctx, req)
if err != nil {
	// TODO: Handle error.
}
// TODO: Use resp.
_ = resp

Use of Context

The ctx passed to NewIngestionClient 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.

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 IngestionCallOptions

type IngestionCallOptions struct {
	IngestAudienceMembers []gax.CallOption
	RemoveAudienceMembers []gax.CallOption
	IngestEvents          []gax.CallOption
	RetrieveRequestStatus []gax.CallOption
}

IngestionCallOptions contains the retry settings for each method of IngestionClient.

type IngestionClient

type IngestionClient struct {

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

IngestionClient is a client for interacting with Data Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for sending audience data to supported destinations.

func NewIngestionClient

func NewIngestionClient(ctx context.Context, opts ...option.ClientOption) (*IngestionClient, error)

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

Service for sending audience data to supported destinations.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewIngestionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewIngestionRESTClient

func NewIngestionRESTClient(ctx context.Context, opts ...option.ClientOption) (*IngestionClient, error)

NewIngestionRESTClient creates a new ingestion service rest client.

Service for sending audience data to supported destinations.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewIngestionRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*IngestionClient) Close

func (c *IngestionClient) Close() error

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

func (*IngestionClient) Connection deprecated

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

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*IngestionClient) IngestAudienceMembers

IngestAudienceMembers uploads a list of AudienceMember resources to the provided Destination.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewIngestionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.IngestAudienceMembersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#IngestAudienceMembersRequest.
	}
	resp, err := c.IngestAudienceMembers(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IngestionClient) IngestEvents

IngestEvents uploads a list of Event resources from the provided Destination.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewIngestionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.IngestEventsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#IngestEventsRequest.
	}
	resp, err := c.IngestEvents(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IngestionClient) RemoveAudienceMembers

RemoveAudienceMembers removes a list of AudienceMember resources from the provided Destination.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewIngestionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.RemoveAudienceMembersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#RemoveAudienceMembersRequest.
	}
	resp, err := c.RemoveAudienceMembers(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*IngestionClient) RetrieveRequestStatus

RetrieveRequestStatus gets the status of a request given request id.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewIngestionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.RetrieveRequestStatusRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#RetrieveRequestStatusRequest.
	}
	resp, err := c.RetrieveRequestStatus(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type MarketingDataInsightsCallOptions added in v0.2.0

type MarketingDataInsightsCallOptions struct {
	RetrieveInsights []gax.CallOption
}

MarketingDataInsightsCallOptions contains the retry settings for each method of MarketingDataInsightsClient.

type MarketingDataInsightsClient added in v0.2.0

type MarketingDataInsightsClient struct {

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

MarketingDataInsightsClient is a client for interacting with Data Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service to return insights on marketing data.

This feature is only available to data partners.

func NewMarketingDataInsightsClient added in v0.2.0

func NewMarketingDataInsightsClient(ctx context.Context, opts ...option.ClientOption) (*MarketingDataInsightsClient, error)

NewMarketingDataInsightsClient creates a new marketing data insights service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Service to return insights on marketing data.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewMarketingDataInsightsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewMarketingDataInsightsRESTClient added in v0.2.0

func NewMarketingDataInsightsRESTClient(ctx context.Context, opts ...option.ClientOption) (*MarketingDataInsightsClient, error)

NewMarketingDataInsightsRESTClient creates a new marketing data insights service rest client.

Service to return insights on marketing data.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewMarketingDataInsightsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*MarketingDataInsightsClient) Close added in v0.2.0

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

func (*MarketingDataInsightsClient) Connection deprecated added in v0.2.0

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

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*MarketingDataInsightsClient) RetrieveInsights added in v0.2.0

RetrieveInsights retrieves marketing data insights for a given user list.

This feature is only available to data partners.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewMarketingDataInsightsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.RetrieveInsightsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#RetrieveInsightsRequest.
	}
	resp, err := c.RetrieveInsights(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type PartnerLinkCallOptions added in v0.2.0

type PartnerLinkCallOptions struct {
	CreatePartnerLink  []gax.CallOption
	DeletePartnerLink  []gax.CallOption
	SearchPartnerLinks []gax.CallOption
}

PartnerLinkCallOptions contains the retry settings for each method of PartnerLinkClient.

type PartnerLinkClient added in v0.2.0

type PartnerLinkClient struct {

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

PartnerLinkClient is a client for interacting with Data Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing partner links.

func NewPartnerLinkClient added in v0.2.0

func NewPartnerLinkClient(ctx context.Context, opts ...option.ClientOption) (*PartnerLinkClient, error)

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

Service for managing partner links.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewPartnerLinkClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewPartnerLinkRESTClient added in v0.2.0

func NewPartnerLinkRESTClient(ctx context.Context, opts ...option.ClientOption) (*PartnerLinkClient, error)

NewPartnerLinkRESTClient creates a new partner link service rest client.

Service for managing partner links.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewPartnerLinkRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*PartnerLinkClient) Close added in v0.2.0

func (c *PartnerLinkClient) Close() error

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

func (*PartnerLinkClient) Connection deprecated added in v0.2.0

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

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

CreatePartnerLink creates a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}

DeletePartnerLink deletes a partner link for the given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}

SearchPartnerLinks searches for all partner links to and from a given account.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}

type PartnerLinkIterator added in v0.2.0

type PartnerLinkIterator 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 []*datamanagerpb.PartnerLink, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PartnerLinkIterator manages a stream of *datamanagerpb.PartnerLink.

func (*PartnerLinkIterator) All added in v0.2.0

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*PartnerLinkIterator) 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 (*PartnerLinkIterator) PageInfo added in v0.2.0

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

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

type UserListCallOptions added in v0.2.0

type UserListCallOptions struct {
	GetUserList    []gax.CallOption
	ListUserLists  []gax.CallOption
	CreateUserList []gax.CallOption
	UpdateUserList []gax.CallOption
	DeleteUserList []gax.CallOption
}

UserListCallOptions contains the retry settings for each method of UserListClient.

type UserListClient added in v0.2.0

type UserListClient struct {

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

UserListClient is a client for interacting with Data Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing UserList resources.

func NewUserListClient added in v0.2.0

func NewUserListClient(ctx context.Context, opts ...option.ClientOption) (*UserListClient, error)

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

Service for managing UserList resources.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewUserListRESTClient added in v0.2.0

func NewUserListRESTClient(ctx context.Context, opts ...option.ClientOption) (*UserListClient, error)

NewUserListRESTClient creates a new user list service rest client.

Service for managing UserList resources.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*UserListClient) Close added in v0.2.0

func (c *UserListClient) Close() error

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

func (*UserListClient) Connection deprecated added in v0.2.0

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

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*UserListClient) CreateUserList added in v0.2.0

CreateUserList creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.CreateUserListRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#CreateUserListRequest.
	}
	resp, err := c.CreateUserList(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UserListClient) DeleteUserList added in v0.2.0

func (c *UserListClient) DeleteUserList(ctx context.Context, req *datamanagerpb.DeleteUserListRequest, opts ...gax.CallOption) error

DeleteUserList deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.DeleteUserListRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#DeleteUserListRequest.
	}
	err = c.DeleteUserList(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*UserListClient) GetUserList added in v0.2.0

GetUserList gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.GetUserListRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#GetUserListRequest.
	}
	resp, err := c.GetUserList(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UserListClient) ListUserLists added in v0.2.0

ListUserLists lists UserLists.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.ListUserListsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#ListUserListsRequest.
	}
	it := c.ListUserLists(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*datamanagerpb.ListUserListsResponse)
	}
}
Example (All)
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.ListUserListsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#ListUserListsRequest.
	}
	for resp, err := range c.ListUserLists(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*UserListClient) UpdateUserList added in v0.2.0

UpdateUserList updates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}

linked-account: (Optional) The resource name of the account with an
established product link to the login-account. Format:
accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.UpdateUserListRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#UpdateUserListRequest.
	}
	resp, err := c.UpdateUserList(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type UserListDirectLicenseCallOptions added in v0.2.0

type UserListDirectLicenseCallOptions struct {
	CreateUserListDirectLicense []gax.CallOption
	GetUserListDirectLicense    []gax.CallOption
	UpdateUserListDirectLicense []gax.CallOption
	ListUserListDirectLicenses  []gax.CallOption
}

UserListDirectLicenseCallOptions contains the retry settings for each method of UserListDirectLicenseClient.

type UserListDirectLicenseClient added in v0.2.0

type UserListDirectLicenseClient struct {

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

UserListDirectLicenseClient is a client for interacting with Data Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing user list direct licenses. Delete is not a supported operation for UserListDirectLicenses. Callers should update the license status to DISABLED to instead to deactivate a license.

This feature is only available to data partners.

func NewUserListDirectLicenseClient added in v0.2.0

func NewUserListDirectLicenseClient(ctx context.Context, opts ...option.ClientOption) (*UserListDirectLicenseClient, error)

NewUserListDirectLicenseClient creates a new user list direct license service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Service for managing user list direct licenses. Delete is not a supported operation for UserListDirectLicenses. Callers should update the license status to DISABLED to instead to deactivate a license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListDirectLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewUserListDirectLicenseRESTClient added in v0.2.0

func NewUserListDirectLicenseRESTClient(ctx context.Context, opts ...option.ClientOption) (*UserListDirectLicenseClient, error)

NewUserListDirectLicenseRESTClient creates a new user list direct license service rest client.

Service for managing user list direct licenses. Delete is not a supported operation for UserListDirectLicenses. Callers should update the license status to DISABLED to instead to deactivate a license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListDirectLicenseRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*UserListDirectLicenseClient) Close added in v0.2.0

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

func (*UserListDirectLicenseClient) Connection deprecated added in v0.2.0

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

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*UserListDirectLicenseClient) CreateUserListDirectLicense added in v0.2.0

CreateUserListDirectLicense creates a user list direct license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListDirectLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.CreateUserListDirectLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#CreateUserListDirectLicenseRequest.
	}
	resp, err := c.CreateUserListDirectLicense(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UserListDirectLicenseClient) GetUserListDirectLicense added in v0.2.0

GetUserListDirectLicense retrieves a user list direct license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListDirectLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.GetUserListDirectLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#GetUserListDirectLicenseRequest.
	}
	resp, err := c.GetUserListDirectLicense(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UserListDirectLicenseClient) ListUserListDirectLicenses added in v0.2.0

ListUserListDirectLicenses lists all user list direct licenses owned by the parent account.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListDirectLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.ListUserListDirectLicensesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#ListUserListDirectLicensesRequest.
	}
	it := c.ListUserListDirectLicenses(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*datamanagerpb.ListUserListDirectLicensesResponse)
	}
}
Example (All)
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListDirectLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.ListUserListDirectLicensesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#ListUserListDirectLicensesRequest.
	}
	for resp, err := range c.ListUserListDirectLicenses(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*UserListDirectLicenseClient) UpdateUserListDirectLicense added in v0.2.0

UpdateUserListDirectLicense updates a user list direct license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListDirectLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.UpdateUserListDirectLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#UpdateUserListDirectLicenseRequest.
	}
	resp, err := c.UpdateUserListDirectLicense(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type UserListDirectLicenseIterator added in v0.2.0

type UserListDirectLicenseIterator 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 []*datamanagerpb.UserListDirectLicense, nextPageToken string, err error)
	// contains filtered or unexported fields
}

UserListDirectLicenseIterator manages a stream of *datamanagerpb.UserListDirectLicense.

func (*UserListDirectLicenseIterator) All added in v0.2.0

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*UserListDirectLicenseIterator) 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 (*UserListDirectLicenseIterator) PageInfo added in v0.2.0

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

type UserListGlobalLicenseCallOptions added in v0.2.0

type UserListGlobalLicenseCallOptions struct {
	CreateUserListGlobalLicense            []gax.CallOption
	UpdateUserListGlobalLicense            []gax.CallOption
	GetUserListGlobalLicense               []gax.CallOption
	ListUserListGlobalLicenses             []gax.CallOption
	ListUserListGlobalLicenseCustomerInfos []gax.CallOption
}

UserListGlobalLicenseCallOptions contains the retry settings for each method of UserListGlobalLicenseClient.

type UserListGlobalLicenseClient added in v0.2.0

type UserListGlobalLicenseClient struct {

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

UserListGlobalLicenseClient is a client for interacting with Data Manager API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Service for managing user list global licenses. Delete is not a supported operation for UserListGlobalLicenses. Callers should update the license status to DISABLED to instead to deactivate a license.

This feature is only available to data partners.

func NewUserListGlobalLicenseClient added in v0.2.0

func NewUserListGlobalLicenseClient(ctx context.Context, opts ...option.ClientOption) (*UserListGlobalLicenseClient, error)

NewUserListGlobalLicenseClient creates a new user list global license service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Service for managing user list global licenses. Delete is not a supported operation for UserListGlobalLicenses. Callers should update the license status to DISABLED to instead to deactivate a license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewUserListGlobalLicenseRESTClient added in v0.2.0

func NewUserListGlobalLicenseRESTClient(ctx context.Context, opts ...option.ClientOption) (*UserListGlobalLicenseClient, error)

NewUserListGlobalLicenseRESTClient creates a new user list global license service rest client.

Service for managing user list global licenses. Delete is not a supported operation for UserListGlobalLicenses. Callers should update the license status to DISABLED to instead to deactivate a license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*UserListGlobalLicenseClient) Close added in v0.2.0

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

func (*UserListGlobalLicenseClient) Connection deprecated added in v0.2.0

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

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not always return the same resource.

func (*UserListGlobalLicenseClient) CreateUserListGlobalLicense added in v0.2.0

CreateUserListGlobalLicense creates a user list global license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.CreateUserListGlobalLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#CreateUserListGlobalLicenseRequest.
	}
	resp, err := c.CreateUserListGlobalLicense(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UserListGlobalLicenseClient) GetUserListGlobalLicense added in v0.2.0

GetUserListGlobalLicense retrieves a user list global license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.GetUserListGlobalLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#GetUserListGlobalLicenseRequest.
	}
	resp, err := c.GetUserListGlobalLicense(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UserListGlobalLicenseClient) ListUserListGlobalLicenseCustomerInfos added in v0.2.0

ListUserListGlobalLicenseCustomerInfos lists all customer info for a user list global license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.ListUserListGlobalLicenseCustomerInfosRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#ListUserListGlobalLicenseCustomerInfosRequest.
	}
	it := c.ListUserListGlobalLicenseCustomerInfos(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*datamanagerpb.ListUserListGlobalLicenseCustomerInfosResponse)
	}
}
Example (All)
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.ListUserListGlobalLicenseCustomerInfosRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#ListUserListGlobalLicenseCustomerInfosRequest.
	}
	for resp, err := range c.ListUserListGlobalLicenseCustomerInfos(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*UserListGlobalLicenseClient) ListUserListGlobalLicenses added in v0.2.0

ListUserListGlobalLicenses lists all user list global licenses owned by the parent account.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.ListUserListGlobalLicensesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#ListUserListGlobalLicensesRequest.
	}
	it := c.ListUserListGlobalLicenses(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*datamanagerpb.ListUserListGlobalLicensesResponse)
	}
}
Example (All)
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.ListUserListGlobalLicensesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#ListUserListGlobalLicensesRequest.
	}
	for resp, err := range c.ListUserListGlobalLicenses(ctx, req).All() {
		if err != nil {
			// TODO: Handle error and break/return/continue. Iteration will stop after any error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*UserListGlobalLicenseClient) UpdateUserListGlobalLicense added in v0.2.0

UpdateUserListGlobalLicense updates a user list global license.

This feature is only available to data partners.

Example
package main

import (
	"context"

	datamanager "cloud.google.com/go/datamanager/apiv1"
	datamanagerpb "cloud.google.com/go/datamanager/apiv1/datamanagerpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := datamanager.NewUserListGlobalLicenseClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &datamanagerpb.UpdateUserListGlobalLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/datamanager/apiv1/datamanagerpb#UpdateUserListGlobalLicenseRequest.
	}
	resp, err := c.UpdateUserListGlobalLicense(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type UserListGlobalLicenseCustomerInfoIterator added in v0.2.0

type UserListGlobalLicenseCustomerInfoIterator 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 []*datamanagerpb.UserListGlobalLicenseCustomerInfo, nextPageToken string, err error)
	// contains filtered or unexported fields
}

UserListGlobalLicenseCustomerInfoIterator manages a stream of *datamanagerpb.UserListGlobalLicenseCustomerInfo.

func (*UserListGlobalLicenseCustomerInfoIterator) All added in v0.2.0

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*UserListGlobalLicenseCustomerInfoIterator) 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 (*UserListGlobalLicenseCustomerInfoIterator) PageInfo added in v0.2.0

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

type UserListGlobalLicenseIterator added in v0.2.0

type UserListGlobalLicenseIterator 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 []*datamanagerpb.UserListGlobalLicense, nextPageToken string, err error)
	// contains filtered or unexported fields
}

UserListGlobalLicenseIterator manages a stream of *datamanagerpb.UserListGlobalLicense.

func (*UserListGlobalLicenseIterator) All added in v0.2.0

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*UserListGlobalLicenseIterator) 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 (*UserListGlobalLicenseIterator) PageInfo added in v0.2.0

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

type UserListIterator added in v0.2.0

type UserListIterator 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 []*datamanagerpb.UserList, nextPageToken string, err error)
	// contains filtered or unexported fields
}

UserListIterator manages a stream of *datamanagerpb.UserList.

func (*UserListIterator) All added in v0.2.0

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*UserListIterator) 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 (*UserListIterator) PageInfo added in v0.2.0

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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