Package cloud.google.com/go/channel/apiv1

Package channel is an auto-generated package for the Cloud Channel API.

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.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

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

ActivateEntitlementOperation

type ActivateEntitlementOperation struct {
	// contains filtered or unexported fields
}

ActivateEntitlementOperation manages a long-running operation from ActivateEntitlement.

func (*ActivateEntitlementOperation) Done

Done reports whether the long-running operation has completed.

func (*ActivateEntitlementOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ActivateEntitlementOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ActivateEntitlementOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ActivateEntitlementOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CancelEntitlementOperation

type CancelEntitlementOperation struct {
	// contains filtered or unexported fields
}

CancelEntitlementOperation manages a long-running operation from CancelEntitlement.

func (*CancelEntitlementOperation) Done

func (op *CancelEntitlementOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CancelEntitlementOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*CancelEntitlementOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*CancelEntitlementOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CancelEntitlementOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ChangeOfferOperation

type ChangeOfferOperation struct {
	// contains filtered or unexported fields
}

ChangeOfferOperation manages a long-running operation from ChangeOffer.

func (*ChangeOfferOperation) Done

func (op *ChangeOfferOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ChangeOfferOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ChangeOfferOperation) Name

func (op *ChangeOfferOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ChangeOfferOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ChangeOfferOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ChangeParametersOperation

type ChangeParametersOperation struct {
	// contains filtered or unexported fields
}

ChangeParametersOperation manages a long-running operation from ChangeParameters.

func (*ChangeParametersOperation) Done

func (op *ChangeParametersOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*ChangeParametersOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ChangeParametersOperation) Name

func (op *ChangeParametersOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ChangeParametersOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ChangeParametersOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ChangeRenewalSettingsOperation

type ChangeRenewalSettingsOperation struct {
	// contains filtered or unexported fields
}

ChangeRenewalSettingsOperation manages a long-running operation from ChangeRenewalSettings.

func (*ChangeRenewalSettingsOperation) Done

Done reports whether the long-running operation has completed.

func (*ChangeRenewalSettingsOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ChangeRenewalSettingsOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ChangeRenewalSettingsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ChangeRenewalSettingsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ChannelPartnerLinkIterator

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

ChannelPartnerLinkIterator manages a stream of *channelpb.ChannelPartnerLink.

func (*ChannelPartnerLinkIterator) 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 (*ChannelPartnerLinkIterator) PageInfo

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

CloudChannelCallOptions

type CloudChannelCallOptions struct {
	ListCustomers                   []gax.CallOption
	GetCustomer                     []gax.CallOption
	CheckCloudIdentityAccountsExist []gax.CallOption
	CreateCustomer                  []gax.CallOption
	UpdateCustomer                  []gax.CallOption
	DeleteCustomer                  []gax.CallOption
	ProvisionCloudIdentity          []gax.CallOption
	ListEntitlements                []gax.CallOption
	ListTransferableSkus            []gax.CallOption
	ListTransferableOffers          []gax.CallOption
	GetEntitlement                  []gax.CallOption
	CreateEntitlement               []gax.CallOption
	ChangeParameters                []gax.CallOption
	ChangeRenewalSettings           []gax.CallOption
	ChangeOffer                     []gax.CallOption
	StartPaidService                []gax.CallOption
	SuspendEntitlement              []gax.CallOption
	CancelEntitlement               []gax.CallOption
	ActivateEntitlement             []gax.CallOption
	TransferEntitlements            []gax.CallOption
	TransferEntitlementsToGoogle    []gax.CallOption
	ListChannelPartnerLinks         []gax.CallOption
	GetChannelPartnerLink           []gax.CallOption
	CreateChannelPartnerLink        []gax.CallOption
	UpdateChannelPartnerLink        []gax.CallOption
	LookupOffer                     []gax.CallOption
	ListProducts                    []gax.CallOption
	ListSkus                        []gax.CallOption
	ListOffers                      []gax.CallOption
	ListPurchasableSkus             []gax.CallOption
	ListPurchasableOffers           []gax.CallOption
	RegisterSubscriber              []gax.CallOption
	UnregisterSubscriber            []gax.CallOption
	ListSubscribers                 []gax.CallOption
}

CloudChannelCallOptions contains the retry settings for each method of CloudChannelClient.

CloudChannelClient

type CloudChannelClient struct {

	// The call options for this service.
	CallOptions *CloudChannelCallOptions

	// LROClient is used internally to handle long-running operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient
	// contains filtered or unexported fields
}

CloudChannelClient is a client for interacting with Cloud Channel API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

CloudChannelService lets Google cloud resellers and distributors manage their customers, channel partners, entitlements, and reports.

Using this service:

Resellers and distributors can manage a customer entity.

Distributors can register an authorized reseller in their channel and provide them with delegated admin access.

Resellers and distributors can manage customer entitlements.

CloudChannelService exposes the following resources:

Customers: An entity—usually an enterprise—managed by a reseller or distributor.

Entitlements: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment.

ChannelPartnerLinks: An entity that identifies links between distributors and their indirect resellers in a channel.

func NewCloudChannelClient

func NewCloudChannelClient(ctx context.Context, opts ...option.ClientOption) (*CloudChannelClient, error)

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

CloudChannelService lets Google cloud resellers and distributors manage their customers, channel partners, entitlements, and reports.

Using this service:

Resellers and distributors can manage a customer entity.

Distributors can register an authorized reseller in their channel and provide them with delegated admin access.

Resellers and distributors can manage customer entitlements.

CloudChannelService exposes the following resources:

Customers: An entity—usually an enterprise—managed by a reseller or distributor.

Entitlements: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment.

ChannelPartnerLinks: An entity that identifies links between distributors and their indirect resellers in a channel.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
)

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

	// TODO: Use client.
	_ = c
}

func (*CloudChannelClient) ActivateEntitlement

ActivateEntitlement activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can’t be activated using this method.

An entitlement activation is a long-running operation and it updates the state of the customer entitlement.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: Entitlement resource not found.

SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS.

NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ActivateEntitlementRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ActivateEntitlement(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) ActivateEntitlementOperation

func (c *CloudChannelClient) ActivateEntitlementOperation(name string) *ActivateEntitlementOperation

ActivateEntitlementOperation returns a new ActivateEntitlementOperation from a given name. The name must be that of a previously created ActivateEntitlementOperation, possibly from a different process.

func (*CloudChannelClient) CancelEntitlement

CancelEntitlement cancels a previously fulfilled entitlement.

An entitlement cancellation is a long-running operation.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement’s Cloud Billing subaccount.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: Entitlement resource not found.

DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud’s development platform.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.CancelEntitlementRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CancelEntitlement(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*CloudChannelClient) CancelEntitlementOperation

func (c *CloudChannelClient) CancelEntitlementOperation(name string) *CancelEntitlementOperation

CancelEntitlementOperation returns a new CancelEntitlementOperation from a given name. The name must be that of a previously created CancelEntitlementOperation, possibly from a different process.

func (*CloudChannelClient) ChangeOffer

ChangeOffer updates the Offer for an existing customer entitlement.

An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: Offer or Entitlement resource not found.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ChangeOfferRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ChangeOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) ChangeOfferOperation

func (c *CloudChannelClient) ChangeOfferOperation(name string) *ChangeOfferOperation

ChangeOfferOperation returns a new ChangeOfferOperation from a given name. The name must be that of a previously created ChangeOfferOperation, possibly from a different process.

func (*CloudChannelClient) ChangeParameters

ChangeParameters change parameters of the entitlement.

An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan.

NOT_FOUND: Entitlement resource not found.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ChangeParametersRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ChangeParameters(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) ChangeParametersOperation

func (c *CloudChannelClient) ChangeParametersOperation(name string) *ChangeParametersOperation

ChangeParametersOperation returns a new ChangeParametersOperation from a given name. The name must be that of a previously created ChangeParametersOperation, possibly from a different process.

func (*CloudChannelClient) ChangeRenewalSettings

ChangeRenewalSettings updates the renewal settings for an existing customer entitlement.

An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: Entitlement resource not found.

NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can’t enable or disable renewals for non-commitment plans.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ChangeRenewalSettingsRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ChangeRenewalSettings(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) ChangeRenewalSettingsOperation

func (c *CloudChannelClient) ChangeRenewalSettingsOperation(name string) *ChangeRenewalSettingsOperation

ChangeRenewalSettingsOperation returns a new ChangeRenewalSettingsOperation from a given name. The name must be that of a previously created ChangeRenewalSettingsOperation, possibly from a different process.

func (*CloudChannelClient) CheckCloudIdentityAccountsExist

CheckCloudIdentityAccountsExist confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity accounts are owned by the reseller.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

INVALID_VALUE: Invalid domain value in the request.

Return value: A list of CloudIdentityCustomerAccount resources for the domain (may be empty)

Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no CloudIdentityCustomerAccount resources match the domain.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.CheckCloudIdentityAccountsExistRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CheckCloudIdentityAccountsExist(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) Close

func (c *CloudChannelClient) Close() error

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

func (*CloudChannelClient) Connection

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

Connection returns a connection to the API service.

Deprecated.

CreateChannelPartnerLink initiates a channel partner link between a distributor and a reseller, or between resellers in an n-tier reseller channel. Invited partners need to follow the invite_link_uri provided in the response to accept. After accepting the invitation, a link is set up between the two parties. You must be a distributor to call this method.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists.

NOT_FOUND: No Cloud Identity customer exists for provided domain.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The new ChannelPartnerLink resource.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.CreateChannelPartnerLinkRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateChannelPartnerLink(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) CreateCustomer

CreateCustomer creates a new Customer resource under the reseller or distributor account.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT:

Required request parameters are missing or invalid.

Domain field value doesn’t match the primary email domain.

Return value: The newly created Customer resource.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.CreateCustomerRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateCustomer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) CreateEntitlement

CreateEntitlement creates an entitlement for a customer.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT:

Required request parameters are missing or invalid.

There is already a customer entitlement for a SKU from the same
product family.

INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting.

NOT_FOUND: The customer or offer resource was not found.

ALREADY_EXISTS:

The SKU was already purchased for the customer.

The customer’s primary email already exists. Retry
after changing the customer’s primary contact email.

CONDITION_NOT_MET or FAILED_PRECONDITION:

The domain required for purchasing a SKU has not been verified.

A pre-requisite SKU required to purchase an Add-On SKU is missing.
For example, Google Workspace Business Starter is required to purchase
Vault or Drive.

(Developer accounts only) Reseller and resold domain must meet the
following naming requirements:

  Domain names must start with goog-test.

  Domain names must include the reseller domain.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.CreateEntitlementRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateEntitlement(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) CreateEntitlementOperation

func (c *CloudChannelClient) CreateEntitlementOperation(name string) *CreateEntitlementOperation

CreateEntitlementOperation returns a new CreateEntitlementOperation from a given name. The name must be that of a previously created CreateEntitlementOperation, possibly from a different process.

func (*CloudChannelClient) DeleteCustomer

func (c *CloudChannelClient) DeleteCustomer(ctx context.Context, req *channelpb.DeleteCustomerRequest, opts ...gax.CallOption) error

DeleteCustomer deletes the given Customer permanently.

Possible error codes:

PERMISSION_DENIED: The account making the request does not own this customer.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

FAILED_PRECONDITION: The customer has existing entitlements.

NOT_FOUND: No Customer resource found for the name in the request.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.DeleteCustomerRequest{
		// TODO: Fill request struct fields.
	}
	err = c.DeleteCustomer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

GetChannelPartnerLink returns the requested ChannelPartnerLink resource. You must be a distributor to call this method.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner link name.

Return value: The ChannelPartnerLink resource.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.GetChannelPartnerLinkRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetChannelPartnerLink(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) GetCustomer

GetCustomer returns the requested Customer resource.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: The customer resource doesn’t exist. Usually the result of an invalid name parameter.

Return value: The Customer resource.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.GetCustomerRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetCustomer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) GetEntitlement

GetEntitlement returns the requested Entitlement resource.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: The customer entitlement was not found.

Return value: The requested Entitlement resource.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.GetEntitlementRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetEntitlement(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ListChannelPartnerLinks list ChannelPartnerLinks belonging to a distributor. You must be a distributor to call this method.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: The list of the distributor account’s ChannelPartnerLink resources.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListChannelPartnerLinksRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListChannelPartnerLinks(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListCustomers

ListCustomers list Customers.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: List of Customers, or an empty list if there are no customers.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListCustomersRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListCustomers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListEntitlements

ListEntitlements lists Entitlements belonging to a customer.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: A list of the customer’s Entitlements.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListEntitlementsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListEntitlements(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListOffers

ListOffers lists the Offers the reseller can sell.

Possible error codes:

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListOffersRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListOffers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListProducts

ListProducts lists the Products the reseller is authorized to sell.

Possible error codes:

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListProductsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListProducts(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListPurchasableOffers

ListPurchasableOffers lists the following:

Offers that you can purchase for a customer.

Offers that you can change for an entitlement.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListPurchasableOffersRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListPurchasableOffers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListPurchasableSkus

ListPurchasableSkus lists the following:

SKUs that you can purchase for a customer

SKUs that you can upgrade or downgrade for an entitlement.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListPurchasableSkusRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListPurchasableSkus(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListSkus

ListSkus lists the SKUs for a product the reseller is authorized to sell.

Possible error codes:

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListSkusRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListSkus(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListSubscribers

ListSubscribers lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: The topic resource doesn’t exist.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: A list of service email addresses.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListSubscribersRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListSubscribers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListTransferableOffers

ListTransferableOffers list TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request.

Use this method when a reseller gets the entitlement information of an unowned customer. The reseller should provide the customer’s Cloud Identity ID or Customer Name.

Possible error codes:

PERMISSION_DENIED:

The customer doesn’t belong to the reseller and has no auth token.

The supplied auth token is invalid.

The reseller account making the request is different
from the reseller account in the query.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: List of TransferableOffer for the given customer and SKU.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListTransferableOffersRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListTransferableOffers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) ListTransferableSkus

ListTransferableSkus list TransferableSkus of a customer based on the Cloud Identity ID or Customer Name in the request.

Use this method to list the entitlements information of an unowned customer. You should provide the customer’s Cloud Identity ID or Customer Name.

Possible error codes:

PERMISSION_DENIED:

The customer doesn’t belong to the reseller and has no auth token.

The supplied auth token is invalid.

The reseller account making the request is different
from the reseller account in the query.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: A list of the customer’s TransferableSku.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	"google.golang.org/api/iterator"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ListTransferableSkusRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListTransferableSkus(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CloudChannelClient) LookupOffer

LookupOffer returns the requested Offer resource.

Possible error codes:

PERMISSION_DENIED: The entitlement doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: Entitlement or offer was not found.

Return value: The Offer resource.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.LookupOfferRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.LookupOffer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) ProvisionCloudIdentity

ProvisionCloudIdentity creates a Cloud Identity for the given customer using the customer’s information, or the information provided here.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: The customer was not found.

ALREADY_EXISTS: The customer’s primary email already exists. Retry after changing the customer’s primary contact email.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.ProvisionCloudIdentityRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ProvisionCloudIdentity(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) ProvisionCloudIdentityOperation

func (c *CloudChannelClient) ProvisionCloudIdentityOperation(name string) *ProvisionCloudIdentityOperation

ProvisionCloudIdentityOperation returns a new ProvisionCloudIdentityOperation from a given name. The name must be that of a previously created ProvisionCloudIdentityOperation, possibly from a different process.

func (*CloudChannelClient) RegisterSubscriber

RegisterSubscriber registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account. After you create a subscriber, you get the events through SubscriberEvent

Possible error codes:

PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The topic name with the registered service email address.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.RegisterSubscriberRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.RegisterSubscriber(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) StartPaidService

StartPaidService starts paid service for a trial entitlement.

Starts paid service for a trial entitlement immediately. This method is only applicable if a plan is set up for a trial entitlement but has some trial days remaining.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: Entitlement resource not found.

FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.StartPaidServiceRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.StartPaidService(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) StartPaidServiceOperation

func (c *CloudChannelClient) StartPaidServiceOperation(name string) *StartPaidServiceOperation

StartPaidServiceOperation returns a new StartPaidServiceOperation from a given name. The name must be that of a previously created StartPaidServiceOperation, possibly from a different process.

func (*CloudChannelClient) SuspendEntitlement

SuspendEntitlement suspends a previously fulfilled entitlement.

An entitlement suspension is a long-running operation.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: Entitlement resource not found.

NOT_ACTIVE: Entitlement is not active.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.SuspendEntitlementRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.SuspendEntitlement(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) SuspendEntitlementOperation

func (c *CloudChannelClient) SuspendEntitlementOperation(name string) *SuspendEntitlementOperation

SuspendEntitlementOperation returns a new SuspendEntitlementOperation from a given name. The name must be that of a previously created SuspendEntitlementOperation, possibly from a different process.

func (*CloudChannelClient) TransferEntitlements

TransferEntitlements transfers customer entitlements to new reseller.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: The customer or offer resource was not found.

ALREADY_EXISTS: The SKU was already transferred for the customer.

CONDITION_NOT_MET or FAILED_PRECONDITION:

The SKU requires domain verification to transfer, but the domain is
not verified.

An Add-On SKU (example, Vault or Drive) is missing the
pre-requisite SKU (example, G Suite Basic).

(Developer accounts only) Reseller and resold domain must meet the
following naming requirements:

  Domain names must start with goog-test.

  Domain names must include the reseller domain.

Specify all transferring entitlements.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.TransferEntitlementsRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.TransferEntitlements(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) TransferEntitlementsOperation

func (c *CloudChannelClient) TransferEntitlementsOperation(name string) *TransferEntitlementsOperation

TransferEntitlementsOperation returns a new TransferEntitlementsOperation from a given name. The name must be that of a previously created TransferEntitlementsOperation, possibly from a different process.

func (*CloudChannelClient) TransferEntitlementsToGoogle

TransferEntitlementsToGoogle transfers customer entitlements from their current reseller to Google.

Possible error codes:

PERMISSION_DENIED: The customer doesn’t belong to the reseller.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: The customer or offer resource was not found.

ALREADY_EXISTS: The SKU was already transferred for the customer.

CONDITION_NOT_MET or FAILED_PRECONDITION:

The SKU requires domain verification to transfer, but the domain is
not verified.

An Add-On SKU (example, Vault or Drive) is missing the
pre-requisite SKU (example, G Suite Basic).

(Developer accounts only) Reseller and resold domain must meet the
following naming requirements:

  Domain names must start with goog-test.

  Domain names must include the reseller domain.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.TransferEntitlementsToGoogleRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.TransferEntitlementsToGoogle(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*CloudChannelClient) TransferEntitlementsToGoogleOperation

func (c *CloudChannelClient) TransferEntitlementsToGoogleOperation(name string) *TransferEntitlementsToGoogleOperation

TransferEntitlementsToGoogleOperation returns a new TransferEntitlementsToGoogleOperation from a given name. The name must be that of a previously created TransferEntitlementsToGoogleOperation, possibly from a different process.

func (*CloudChannelClient) UnregisterSubscriber

UnregisterSubscriber unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no service accounts left with subscriber privileges, this deletes the topic. You can call ListSubscribers to check for these accounts.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: The topic resource doesn’t exist.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn’t registered with the topic.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.UnregisterSubscriberRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UnregisterSubscriber(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

UpdateChannelPartnerLink updates a channel partner link. Distributors call this method to change a link’s status. For example, to suspend a partner link. You must be a distributor to call this method.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT:

Required request parameters are missing or invalid.

Link state cannot change from invited to active or suspended.

Cannot send reseller_cloud_identity_id, invite_url, or name in update
mask.

NOT_FOUND: ChannelPartnerLink resource not found.

INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The updated ChannelPartnerLink resource.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.UpdateChannelPartnerLinkRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateChannelPartnerLink(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CloudChannelClient) UpdateCustomer

UpdateCustomer updates an existing Customer resource for the reseller or distributor.

Possible error codes:

PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.

INVALID_ARGUMENT: Required request parameters are missing or invalid.

NOT_FOUND: No Customer resource found for the name in the request.

Return value: The updated Customer resource.

Example

package main

import (
	channel "cloud.google.com/go/channel/apiv1"
	"context"
	channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)

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

	req := &channelpb.UpdateCustomerRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateCustomer(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

CreateEntitlementOperation

type CreateEntitlementOperation struct {
	// contains filtered or unexported fields
}

CreateEntitlementOperation manages a long-running operation from CreateEntitlement.

func (*CreateEntitlementOperation) Done

func (op *CreateEntitlementOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateEntitlementOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*CreateEntitlementOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateEntitlementOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateEntitlementOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CustomerIterator

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

CustomerIterator manages a stream of *channelpb.Customer.

func (*CustomerIterator) Next

func (it *CustomerIterator) Next() (*channelpb.Customer, 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 (*CustomerIterator) PageInfo

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

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

EntitlementIterator

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

EntitlementIterator manages a stream of *channelpb.Entitlement.

func (*EntitlementIterator) 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 (*EntitlementIterator) PageInfo

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

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

OfferIterator

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

OfferIterator manages a stream of *channelpb.Offer.

func (*OfferIterator) Next

func (it *OfferIterator) Next() (*channelpb.Offer, 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 (*OfferIterator) PageInfo

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

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

ProductIterator

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

ProductIterator manages a stream of *channelpb.Product.

func (*ProductIterator) Next

func (it *ProductIterator) Next() (*channelpb.Product, 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 (*ProductIterator) PageInfo

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

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

ProvisionCloudIdentityOperation

type ProvisionCloudIdentityOperation struct {
	// contains filtered or unexported fields
}

ProvisionCloudIdentityOperation manages a long-running operation from ProvisionCloudIdentity.

func (*ProvisionCloudIdentityOperation) Done

Done reports whether the long-running operation has completed.

func (*ProvisionCloudIdentityOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*ProvisionCloudIdentityOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*ProvisionCloudIdentityOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ProvisionCloudIdentityOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

PurchasableOfferIterator

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

PurchasableOfferIterator manages a stream of *channelpb.PurchasableOffer.

func (*PurchasableOfferIterator) 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 (*PurchasableOfferIterator) PageInfo

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

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

PurchasableSkuIterator

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

PurchasableSkuIterator manages a stream of *channelpb.PurchasableSku.

func (*PurchasableSkuIterator) 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 (*PurchasableSkuIterator) PageInfo

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

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

SkuIterator

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

SkuIterator manages a stream of *channelpb.Sku.

func (*SkuIterator) Next

func (it *SkuIterator) Next() (*channelpb.Sku, 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 (*SkuIterator) PageInfo

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

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

StartPaidServiceOperation

type StartPaidServiceOperation struct {
	// contains filtered or unexported fields
}

StartPaidServiceOperation manages a long-running operation from StartPaidService.

func (*StartPaidServiceOperation) Done

func (op *StartPaidServiceOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*StartPaidServiceOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*StartPaidServiceOperation) Name

func (op *StartPaidServiceOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*StartPaidServiceOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*StartPaidServiceOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

StringIterator

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

StringIterator manages a stream of string.

func (*StringIterator) Next

func (it *StringIterator) Next() (string, 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 (*StringIterator) PageInfo

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

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

SuspendEntitlementOperation

type SuspendEntitlementOperation struct {
	// contains filtered or unexported fields
}

SuspendEntitlementOperation manages a long-running operation from SuspendEntitlement.

func (*SuspendEntitlementOperation) Done

func (op *SuspendEntitlementOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*SuspendEntitlementOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*SuspendEntitlementOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*SuspendEntitlementOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*SuspendEntitlementOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

TransferEntitlementsOperation

type TransferEntitlementsOperation struct {
	// contains filtered or unexported fields
}

TransferEntitlementsOperation manages a long-running operation from TransferEntitlements.

func (*TransferEntitlementsOperation) Done

Done reports whether the long-running operation has completed.

func (*TransferEntitlementsOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*TransferEntitlementsOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*TransferEntitlementsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*TransferEntitlementsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

TransferEntitlementsToGoogleOperation

type TransferEntitlementsToGoogleOperation struct {
	// contains filtered or unexported fields
}

TransferEntitlementsToGoogleOperation manages a long-running operation from TransferEntitlementsToGoogle.

func (*TransferEntitlementsToGoogleOperation) Done

Done reports whether the long-running operation has completed.

func (*TransferEntitlementsToGoogleOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*TransferEntitlementsToGoogleOperation) Name

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*TransferEntitlementsToGoogleOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*TransferEntitlementsToGoogleOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

TransferableOfferIterator

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

TransferableOfferIterator manages a stream of *channelpb.TransferableOffer.

func (*TransferableOfferIterator) 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 (*TransferableOfferIterator) PageInfo

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

TransferableSkuIterator

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

TransferableSkuIterator manages a stream of *channelpb.TransferableSku.

func (*TransferableSkuIterator) 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 (*TransferableSkuIterator) PageInfo

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

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