- 0.116.0 (latest)
- 0.115.1
- 0.114.0
- 0.113.0
- 0.112.2
- 0.111.0
- 0.110.10
- 0.109.0
- 0.108.0
- 0.107.0
- 0.106.0
- 0.105.0
- 0.104.0
- 0.103.0
- 0.102.1
- 0.101.1
- 0.100.2
- 0.99.0
- 0.98.0
- 0.97.0
- 0.96.0
- 0.95.0
- 0.94.1
- 0.93.3
- 0.92.3
- 0.91.1
- 0.90.0
- 0.89.0
- 0.88.0
- 0.87.0
- 0.86.0
- 0.85.0
- 0.84.0
- 0.83.0
- 0.82.0
- 0.81.0
- 0.80.0
- 0.79.0
- 0.78.0
- 0.77.0
- 0.76.0
- 0.75.0
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 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
func (op *ActivateEntitlementOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ActivateEntitlementOperation) Metadata
func (op *ActivateEntitlementOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *ActivateEntitlementOperation) 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 (*ActivateEntitlementOperation) Poll
func (op *ActivateEntitlementOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *ActivateEntitlementOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *CancelEntitlementOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *CancelEntitlementOperation) 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 (*CancelEntitlementOperation) Poll
func (op *CancelEntitlementOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
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
func (op *CancelEntitlementOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
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
func (op *ChangeOfferOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *ChangeOfferOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *ChangeOfferOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *ChangeParametersOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *ChangeParametersOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *ChangeParametersOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *ChangeRenewalSettingsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ChangeRenewalSettingsOperation) Metadata
func (op *ChangeRenewalSettingsOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *ChangeRenewalSettingsOperation) 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 (*ChangeRenewalSettingsOperation) Poll
func (op *ChangeRenewalSettingsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *ChangeRenewalSettingsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (it *ChannelPartnerLinkIterator) Next() (*channelpb.ChannelPartnerLink, 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 (*ChannelPartnerLinkIterator) PageInfo
func (it *ChannelPartnerLinkIterator) PageInfo() *iterator.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
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 {
// LROClient is used internally to handle longrunning operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
// The call options for this service.
CallOptions *CloudChannelCallOptions
// 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.
func NewCloudChannelClient
func NewCloudChannelClient(ctx context.Context, opts ...option.ClientOption) (*CloudChannelClient, error)
NewCloudChannelClient creates a new cloud channel service client.
CloudChannelService enables Google cloud resellers and distributors to manage their customers, channel partners, entitlements and reports.
Using this service:
Resellers or distributors can manage a customer entity.
Distributors can register an authorized reseller in their channel and then enable delegated admin access for the reseller.
Resellers or distributors can manage entitlements for their customers.
The service primarily exposes the following resources:
Customers: A Customer represents an entity managed by a reseller or distributor. A customer typically represents an enterprise. In an n-tier resale channel hierarchy, customers are generally represented as leaf nodes. Customers primarily have an Entitlement sub-resource discussed below.
Entitlements: An Entitlement represents an entity which provides a customer means to start using a service. Entitlements are created or updated as a result of a successful fulfillment.
ChannelPartnerLinks: A ChannelPartnerLink is an entity that identifies links between distributors and their indirect resellers in a channel.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
)
func main() {
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use client.
_ = c
}
func (*CloudChannelClient) ActivateEntitlement
func (c *CloudChannelClient) ActivateEntitlement(ctx context.Context, req *channelpb.ActivateEntitlementRequest, opts ...gax.CallOption) (*ActivateEntitlementOperation, error)
ActivateEntitlement activates a previously suspended entitlement. The entitlement must be in a suspended state for it to be activated. Entitlements suspended for pending ToS acceptance can’t be activated using this method. An entitlement activation is a long-running operation and can result in updates to the state of the customer entitlement.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller or if the reseller account making the request and reseller account being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: Entitlement resource not found.
SUSPENSION_NOT_RESELLER_INITIATED: Can’t activate an entitlement that is pending TOS acceptance. Only reseller initiated suspensions can be activated.
NOT_SUSPENDED: Can’t activate entitlements that are already in ACTIVE state. Can only activate suspended entitlements.
INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) CancelEntitlement(ctx context.Context, req *channelpb.CancelEntitlementRequest, opts ...gax.CallOption) (*CancelEntitlementOperation, error)
CancelEntitlement cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running operation.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller or if the reseller account making the request and reseller account being queried for are different.
FAILED_PRECONDITION: If there are any Google Cloud projects linked to the Google Cloud entitlement’s Cloud Billing subaccount.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
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. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ChangeOffer(ctx context.Context, req *channelpb.ChangeOfferRequest, opts ...gax.CallOption) (*ChangeOfferOperation, error)
ChangeOffer updates the Offer for an existing customer entitlement.
An entitlement update is a long-running operation and results in updates to the entitlement as a result of fulfillment.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: Offer or Entitlement resource not found.
INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ChangeParameters(ctx context.Context, req *channelpb.ChangeParametersRequest, opts ...gax.CallOption) (*ChangeParametersOperation, error)
ChangeParameters change parameters of the entitlement
An entitlement parameters update is a long-running operation and results in updates to the entitlement as a result of fulfillment.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request. For example, if the number of seats being changed to is greater than the allowed number of max seats for the resource. 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. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ChangeRenewalSettings(ctx context.Context, req *channelpb.ChangeRenewalSettingsRequest, opts ...gax.CallOption) (*ChangeRenewalSettingsOperation, error)
ChangeRenewalSettings updates the renewal settings for an existing customer entitlement.
An entitlement update is a long-running operation and results in updates to the entitlement as a result of fulfillment.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: Entitlement resource not found.
NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can’t enable or disable renewal for non-commitment plans.
INTERNAL: Any non user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
UNKNOWN: Any non user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) CheckCloudIdentityAccountsExist(ctx context.Context, req *channelpb.CheckCloudIdentityAccountsExistRequest, opts ...gax.CallOption) (*channelpb.CheckCloudIdentityAccountsExistResponse, error)
CheckCloudIdentityAccountsExist confirms the existence of Cloud Identity accounts, based on the domain and whether the Cloud Identity accounts are owned by the reseller.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
INVALID_VALUE: Invalid domain value in the request.
Return Value: List of CloudIdentityCustomerAccount resources for the domain. List may be empty.
Note: in the v1alpha1 version of the API, a NOT_FOUND error is returned if no CloudIdentityCustomerAccount resources match the domain.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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.
func (*CloudChannelClient) CreateChannelPartnerLink
func (c *CloudChannelClient) CreateChannelPartnerLink(ctx context.Context, req *channelpb.CreateChannelPartnerLinkRequest, opts ...gax.CallOption) (*channelpb.ChannelPartnerLink, error)
CreateChannelPartnerLink initiates a channel partner link between a distributor and a reseller or between resellers in an n-tier reseller channel. To accept the invite, the invited partner should follow the invite_link_uri provided in the response. If the link creation is accepted, a valid link is set up between the two involved parties. To call this method, you must be a distributor.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already exists.
NOT_FOUND: If no Cloud Identity customer exists for domain provided.
INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Newly created ChannelPartnerLink resource if successful, otherwise error is returned.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) CreateCustomer(ctx context.Context, req *channelpb.CreateCustomerRequest, opts ...gax.CallOption) (*channelpb.Customer, error)
CreateCustomer creates a new Customer resource under the reseller or distributor account.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: It can happen in following scenarios -
Missing or invalid required parameters in the request.
Domain field value doesn’t match the domain specified in primary
email.
Return Value: If successful, the newly created Customer resource, otherwise returns an error.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) CreateEntitlement(ctx context.Context, req *channelpb.CreateEntitlementRequest, opts ...gax.CallOption) (*CreateEntitlementOperation, error)
CreateEntitlement creates an entitlement for a customer.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: It can happen in below scenarios -
Missing or invalid required parameters in the request.
Cannot purchase an entitlement if there is already an entitlement for
customer, for a SKU from the same product family.
INVALID_VALUE: Offer passed in isn’t valid. Make sure OfferId is
valid. If it is valid, then contact Google Channel support for further
troubleshooting.
NOT_FOUND: If the customer or offer resource is not found for the reseller.
ALREADY_EXISTS: This failure can happen in the following cases:
If the SKU has been already purchased for the customer.
If the customer’s primary email already exists. In this case retry
after changing the customer’s primary contact email.
CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases:
Purchasing a SKU that requires domain verification and the domain has
not been verified.
Purchasing an Add-On SKU like Vault or Drive without purchasing the
pre-requisite SKU, such as Google Workspace Business Starter.
Applicable only for developer accounts: reseller and resold domain.
Must meet the following domain naming requirements:
Domain names must start with goog-test.
Resold domain names must include the reseller domain.
INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel Support in this case.
UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel Support in this case.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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 and irreversibly.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request does not own this customer.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
FAILED_PRECONDITION: If the customer has existing entitlements.
NOT_FOUND: No Customer resource found for the name specified in the request.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
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.
}
req := &channelpb.DeleteCustomerRequest{
// TODO: Fill request struct fields.
}
err = c.DeleteCustomer(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*CloudChannelClient) GetChannelPartnerLink
func (c *CloudChannelClient) GetChannelPartnerLink(ctx context.Context, req *channelpb.GetChannelPartnerLinkRequest, opts ...gax.CallOption) (*channelpb.ChannelPartnerLink, error)
GetChannelPartnerLink returns a requested ChannelPartnerLink resource. To call this method, you must be a distributor.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: ChannelPartnerLink resource not found. Results due invalid channel partner link name.
Return Value: ChannelPartnerLink resource if found, otherwise returns an error.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) GetCustomer(ctx context.Context, req *channelpb.GetCustomerRequest, opts ...gax.CallOption) (*channelpb.Customer, error)
GetCustomer returns a requested Customer resource.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: If the customer resource doesn’t exist. Usually the result of an invalid name parameter.
Return Value: Customer resource if found, error otherwise.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) GetEntitlement(ctx context.Context, req *channelpb.GetEntitlementRequest, opts ...gax.CallOption) (*channelpb.Entitlement, error)
GetEntitlement returns a requested Entitlement resource.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: If the entitlement is not found for the customer.
Return Value: If found, the requested Entitlement resource, otherwise returns an error.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &channelpb.GetEntitlementRequest{
// TODO: Fill request struct fields.
}
resp, err := c.GetEntitlement(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CloudChannelClient) ListChannelPartnerLinks
func (c *CloudChannelClient) ListChannelPartnerLinks(ctx context.Context, req *channelpb.ListChannelPartnerLinksRequest, opts ...gax.CallOption) *ChannelPartnerLinkIterator
ListChannelPartnerLinks list ChannelPartnerLinks belonging to a distributor. To call this method, you must be a distributor.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Return Value: If successful, returns the list of ChannelPartnerLink resources for the distributor account, otherwise returns an error.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListCustomers(ctx context.Context, req *channelpb.ListCustomersRequest, opts ...gax.CallOption) *CustomerIterator
ListCustomers list downstream Customers.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Return Value: List of Customers pertaining to the reseller or empty list if there are none.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListEntitlements(ctx context.Context, req *channelpb.ListEntitlementsRequest, opts ...gax.CallOption) *EntitlementIterator
ListEntitlements list Entitlements belonging to a customer.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Return Value: List of Entitlements belonging to the customer, or empty list if there are none.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListOffers(ctx context.Context, req *channelpb.ListOffersRequest, opts ...gax.CallOption) *OfferIterator
ListOffers lists the Offers the reseller can sell.
Possible Error Codes:
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListProducts(ctx context.Context, req *channelpb.ListProductsRequest, opts ...gax.CallOption) *ProductIterator
ListProducts lists the Products the reseller is authorized to sell.
Possible Error Codes:
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListPurchasableOffers(ctx context.Context, req *channelpb.ListPurchasableOffersRequest, opts ...gax.CallOption) *PurchasableOfferIterator
ListPurchasableOffers lists the Purchasable Offers for the following cases:
Offers that can be newly purchased for a customer
Offers that can be changed to, for an entitlement.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListPurchasableSkus(ctx context.Context, req *channelpb.ListPurchasableSkusRequest, opts ...gax.CallOption) *PurchasableSkuIterator
ListPurchasableSkus lists the Purchasable SKUs for following cases:
SKUs that can be newly purchased for a customer
SKUs that can be upgraded/downgraded to, for an entitlement.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListSkus(ctx context.Context, req *channelpb.ListSkusRequest, opts ...gax.CallOption) *SkuIterator
ListSkus lists the SKUs for a product the reseller is authorized to sell.
Possible Error Codes:
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListSubscribers(ctx context.Context, req *channelpb.ListSubscribersRequest, opts ...gax.CallOption) *StringIterator
ListSubscribers lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the account is not a super admin.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: If the topic resource doesn’t exist.
INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: List of service email addresses if successful, otherwise error is returned.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListTransferableOffers(ctx context.Context, req *channelpb.ListTransferableOffersRequest, opts ...gax.CallOption) *TransferableOfferIterator
ListTransferableOffers list TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request.
This method is used when a reseller gets the entitlement information of a customer that is not owned. The reseller should provide the customer’s Cloud Identity ID or Customer Name.
Possible Error Codes:
PERMISSION_DENIED: Appears because of one of the following:
If the customer doesn’t belong to the reseller and no auth token or
invalid auth token is supplied.
If the reseller account making the request and the reseller account
being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Return Value: List of TransferableOffer for the given customer and SKU.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) ListTransferableSkus(ctx context.Context, req *channelpb.ListTransferableSkusRequest, opts ...gax.CallOption) *TransferableSkuIterator
ListTransferableSkus list TransferableSkus of a customer based on Cloud Identity ID or Customer Name in the request.
This method is used when a reseller lists the entitlements information of a customer that is not owned. The reseller should provide the customer’s Cloud Identity ID or Customer Name.
Possible Error Codes:
PERMISSION_DENIED: Appears because of one of the following -
The customer doesn’t belong to the reseller and no auth token.
The supplied auth token is invalid.
The reseller account making the request and the queries reseller
account are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Return Value: List of TransferableSku for the given customer.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
"google.golang.org/api/iterator"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
// import "google.golang.org/api/iterator"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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) ProvisionCloudIdentity
func (c *CloudChannelClient) ProvisionCloudIdentity(ctx context.Context, req *channelpb.ProvisionCloudIdentityRequest, opts ...gax.CallOption) (*ProvisionCloudIdentityOperation, error)
ProvisionCloudIdentity creates a Cloud Identity for the given customer using the customer’s information or the information provided here, if present.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: If the customer is not found for the reseller.
ALREADY_EXISTS: If the customer’s primary email already exists. In this case, 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 in this case.
UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support in this case.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) RegisterSubscriber(ctx context.Context, req *channelpb.RegisterSubscriberRequest, opts ...gax.CallOption) (*channelpb.RegisterSubscriberResponse, error)
RegisterSubscriber registers a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. Once you create a subscriber, you will get the events as per SubscriberEvent
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the impersonated user is not a super admin.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Topic name with service email address registered if successful, otherwise error is returned.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) StartPaidService(ctx context.Context, req *channelpb.StartPaidServiceRequest, opts ...gax.CallOption) (*StartPaidServiceOperation, error)
StartPaidService starts paid service for a trial entitlement.
Starts paid service for a trial entitlement immediately. This method is only applicable if a plan has already been set up for a trial entitlement but has some trial days remaining.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
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. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) SuspendEntitlement(ctx context.Context, req *channelpb.SuspendEntitlementRequest, opts ...gax.CallOption) (*SuspendEntitlementOperation, error)
SuspendEntitlement suspends a previously fulfilled entitlement. An entitlement suspension is a long-running operation.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
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. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) TransferEntitlements(ctx context.Context, req *channelpb.TransferEntitlementsRequest, opts ...gax.CallOption) (*TransferEntitlementsOperation, error)
TransferEntitlements transfers customer entitlements to new reseller.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: If the customer or offer resource is not found for the reseller.
ALREADY_EXISTS: If the SKU has been already transferred for the customer.
CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases:
Transferring a SKU that requires domain verification and the domain
has not been verified.
Transferring an Add-On SKU like Vault or Drive without transferring
the pre-requisite SKU, such as G Suite Basic.
Applicable only for developer accounts: reseller and resold domain
must follow the domain naming convention as follows:
Domain names must start with goog-test.
Resold domain names must include the reseller domain.
All transferring entitlements must be specified.
INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case.
UNKNOWN: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) TransferEntitlementsToGoogle(ctx context.Context, req *channelpb.TransferEntitlementsToGoogleRequest, opts ...gax.CallOption) (*TransferEntitlementsToGoogleOperation, error)
TransferEntitlementsToGoogle transfers customer entitlements from current reseller to Google.
Possible Error Codes:
PERMISSION_DENIED: If the customer doesn’t belong to the reseller.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: If the customer or offer resource is not found for the reseller.
ALREADY_EXISTS: If the SKU has been already transferred for the customer.
CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases:
Transferring a SKU that requires domain verification and the domain
has not been verified.
Transferring an Add-On SKU like Vault or Drive without purchasing the
pre-requisite SKU, such as G Suite Basic.
Applicable only for developer accounts: reseller and resold domain
must follow the domain naming convention as follows:
Domain names must start with goog-test.
Resold domain names must include the reseller domain.
INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case.
UNKNOWN: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case.
Return Value: Long Running Operation ID.
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 (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) UnregisterSubscriber(ctx context.Context, req *channelpb.UnregisterSubscriberRequest, opts ...gax.CallOption) (*channelpb.UnregisterSubscriberResponse, error)
UnregisterSubscriber unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no more service account left with sunbscriber privileges, the topic will be deleted. You can check this by calling ListSubscribers api.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the impersonated user is not a super admin.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: If the topic resource doesn’t exist.
INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: Topic name from which service email address has been unregistered if successful, otherwise error is returned. If the service email was already not associated with the topic, the success response will be returned.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
req := &channelpb.UnregisterSubscriberRequest{
// TODO: Fill request struct fields.
}
resp, err := c.UnregisterSubscriber(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CloudChannelClient) UpdateChannelPartnerLink
func (c *CloudChannelClient) UpdateChannelPartnerLink(ctx context.Context, req *channelpb.UpdateChannelPartnerLinkRequest, opts ...gax.CallOption) (*channelpb.ChannelPartnerLink, error)
UpdateChannelPartnerLink updates a channel partner link. A distributor calls this method to change a link’s status. For example, suspend a partner link. To call this method, you must be a distributor.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: It can happen in following scenarios -
Missing or invalid required parameters in the request.
Updating link state from invited to active or suspended.
Sending 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. In this case, contact Cloud Channel support.
UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated ChannelPartnerLink resource, otherwise returns an error.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (c *CloudChannelClient) UpdateCustomer(ctx context.Context, req *channelpb.UpdateCustomerRequest, opts ...gax.CallOption) (*channelpb.Customer, error)
UpdateCustomer updates an existing Customer resource belonging to the reseller or distributor.
Possible Error Codes:
PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
INVALID_ARGUMENT: Missing or invalid required parameters in the request.
NOT_FOUND: No Customer resource found for the name specified in the request.
Return Value: If successful, the updated Customer resource, otherwise returns an error.
Example
package main
import (
"context"
channel "cloud.google.com/go/channel/apiv1"
channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
)
func main() {
// import channelpb "google.golang.org/genproto/googleapis/cloud/channel/v1"
ctx := context.Background()
c, err := channel.NewCloudChannelClient(ctx)
if err != nil {
// TODO: Handle error.
}
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
func (op *CreateEntitlementOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *CreateEntitlementOperation) 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 (*CreateEntitlementOperation) Poll
func (op *CreateEntitlementOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *CreateEntitlementOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (it *EntitlementIterator) Next() (*channelpb.Entitlement, 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 (*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
func (op *ProvisionCloudIdentityOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ProvisionCloudIdentityOperation) Metadata
func (op *ProvisionCloudIdentityOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *ProvisionCloudIdentityOperation) 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 (*ProvisionCloudIdentityOperation) Poll
func (op *ProvisionCloudIdentityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Customer, error)
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
func (op *ProvisionCloudIdentityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Customer, error)
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
func (it *PurchasableOfferIterator) Next() (*channelpb.PurchasableOffer, 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 (*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
func (it *PurchasableSkuIterator) Next() (*channelpb.PurchasableSku, 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 (*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
func (op *StartPaidServiceOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *StartPaidServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *StartPaidServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *SuspendEntitlementOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *SuspendEntitlementOperation) 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 (*SuspendEntitlementOperation) Poll
func (op *SuspendEntitlementOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *SuspendEntitlementOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
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
func (op *TransferEntitlementsOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*TransferEntitlementsOperation) Metadata
func (op *TransferEntitlementsOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *TransferEntitlementsOperation) 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 (*TransferEntitlementsOperation) Poll
func (op *TransferEntitlementsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.TransferEntitlementsResponse, error)
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
func (op *TransferEntitlementsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.TransferEntitlementsResponse, error)
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
func (op *TransferEntitlementsToGoogleOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*TransferEntitlementsToGoogleOperation) Metadata
func (op *TransferEntitlementsToGoogleOperation) Metadata() (*channelpb.OperationMetadata, error)
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
func (op *TransferEntitlementsToGoogleOperation) 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 (*TransferEntitlementsToGoogleOperation) Poll
func (op *TransferEntitlementsToGoogleOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
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
func (op *TransferEntitlementsToGoogleOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
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
func (it *TransferableOfferIterator) Next() (*channelpb.TransferableOffer, 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 (*TransferableOfferIterator) PageInfo
func (it *TransferableOfferIterator) PageInfo() *iterator.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
func (it *TransferableSkuIterator) Next() (*channelpb.TransferableSku, 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 (*TransferableSkuIterator) PageInfo
func (it *TransferableSkuIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.