Documentation ¶
Overview ¶
Package channel is an auto-generated package for the Cloud Channel API.
The Cloud Channel API enables Google Cloud partners to have a single unified resale platform and APIs across all of Google Cloud including GCP, Workspace, Maps and Chrome.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client ¶
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.FetchReportResultsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#FetchReportResultsRequest. } it := c.FetchReportResults(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.FetchReportResultsResponse) }
Use of Context ¶
The ctx passed to NewCloudChannelReportsClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Index ¶
- func DefaultAuthScopes() []string
- type ActivateEntitlementOperation
- func (op *ActivateEntitlementOperation) Done() bool
- func (op *ActivateEntitlementOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *ActivateEntitlementOperation) Name() string
- func (op *ActivateEntitlementOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- func (op *ActivateEntitlementOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- type BillableSkuIterator
- type CancelEntitlementOperation
- func (op *CancelEntitlementOperation) Done() bool
- func (op *CancelEntitlementOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *CancelEntitlementOperation) Name() string
- func (op *CancelEntitlementOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *CancelEntitlementOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type ChangeOfferOperation
- func (op *ChangeOfferOperation) Done() bool
- func (op *ChangeOfferOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *ChangeOfferOperation) Name() string
- func (op *ChangeOfferOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- func (op *ChangeOfferOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- type ChangeParametersOperation
- func (op *ChangeParametersOperation) Done() bool
- func (op *ChangeParametersOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *ChangeParametersOperation) Name() string
- func (op *ChangeParametersOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- func (op *ChangeParametersOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- type ChangeRenewalSettingsOperation
- func (op *ChangeRenewalSettingsOperation) Done() bool
- func (op *ChangeRenewalSettingsOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *ChangeRenewalSettingsOperation) Name() string
- func (op *ChangeRenewalSettingsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- func (op *ChangeRenewalSettingsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- type ChannelPartnerLinkIterator
- type ChannelPartnerRepricingConfigIterator
- type CloudChannelCallOptions
- type CloudChannelClient
- func (c *CloudChannelClient) ActivateEntitlement(ctx context.Context, req *channelpb.ActivateEntitlementRequest, ...) (*ActivateEntitlementOperation, error)
- func (c *CloudChannelClient) ActivateEntitlementOperation(name string) *ActivateEntitlementOperation
- func (c *CloudChannelClient) CancelEntitlement(ctx context.Context, req *channelpb.CancelEntitlementRequest, ...) (*CancelEntitlementOperation, error)
- func (c *CloudChannelClient) CancelEntitlementOperation(name string) *CancelEntitlementOperation
- func (c *CloudChannelClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *CloudChannelClient) ChangeOffer(ctx context.Context, req *channelpb.ChangeOfferRequest, opts ...gax.CallOption) (*ChangeOfferOperation, error)
- func (c *CloudChannelClient) ChangeOfferOperation(name string) *ChangeOfferOperation
- func (c *CloudChannelClient) ChangeParameters(ctx context.Context, req *channelpb.ChangeParametersRequest, ...) (*ChangeParametersOperation, error)
- func (c *CloudChannelClient) ChangeParametersOperation(name string) *ChangeParametersOperation
- func (c *CloudChannelClient) ChangeRenewalSettings(ctx context.Context, req *channelpb.ChangeRenewalSettingsRequest, ...) (*ChangeRenewalSettingsOperation, error)
- func (c *CloudChannelClient) ChangeRenewalSettingsOperation(name string) *ChangeRenewalSettingsOperation
- func (c *CloudChannelClient) CheckCloudIdentityAccountsExist(ctx context.Context, req *channelpb.CheckCloudIdentityAccountsExistRequest, ...) (*channelpb.CheckCloudIdentityAccountsExistResponse, error)
- func (c *CloudChannelClient) Close() error
- func (c *CloudChannelClient) Connection() *grpc.ClientConndeprecated
- func (c *CloudChannelClient) CreateChannelPartnerLink(ctx context.Context, req *channelpb.CreateChannelPartnerLinkRequest, ...) (*channelpb.ChannelPartnerLink, error)
- func (c *CloudChannelClient) CreateChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.CreateChannelPartnerRepricingConfigRequest, ...) (*channelpb.ChannelPartnerRepricingConfig, error)
- func (c *CloudChannelClient) CreateCustomer(ctx context.Context, req *channelpb.CreateCustomerRequest, ...) (*channelpb.Customer, error)
- func (c *CloudChannelClient) CreateCustomerRepricingConfig(ctx context.Context, req *channelpb.CreateCustomerRepricingConfigRequest, ...) (*channelpb.CustomerRepricingConfig, error)
- func (c *CloudChannelClient) CreateEntitlement(ctx context.Context, req *channelpb.CreateEntitlementRequest, ...) (*CreateEntitlementOperation, error)
- func (c *CloudChannelClient) CreateEntitlementOperation(name string) *CreateEntitlementOperation
- func (c *CloudChannelClient) DeleteChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.DeleteChannelPartnerRepricingConfigRequest, ...) error
- func (c *CloudChannelClient) DeleteCustomer(ctx context.Context, req *channelpb.DeleteCustomerRequest, ...) error
- func (c *CloudChannelClient) DeleteCustomerRepricingConfig(ctx context.Context, req *channelpb.DeleteCustomerRepricingConfigRequest, ...) error
- func (c *CloudChannelClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *CloudChannelClient) GetChannelPartnerLink(ctx context.Context, req *channelpb.GetChannelPartnerLinkRequest, ...) (*channelpb.ChannelPartnerLink, error)
- func (c *CloudChannelClient) GetChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.GetChannelPartnerRepricingConfigRequest, ...) (*channelpb.ChannelPartnerRepricingConfig, error)
- func (c *CloudChannelClient) GetCustomer(ctx context.Context, req *channelpb.GetCustomerRequest, opts ...gax.CallOption) (*channelpb.Customer, error)
- func (c *CloudChannelClient) GetCustomerRepricingConfig(ctx context.Context, req *channelpb.GetCustomerRepricingConfigRequest, ...) (*channelpb.CustomerRepricingConfig, error)
- func (c *CloudChannelClient) GetEntitlement(ctx context.Context, req *channelpb.GetEntitlementRequest, ...) (*channelpb.Entitlement, error)
- func (c *CloudChannelClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *CloudChannelClient) ImportCustomer(ctx context.Context, req *channelpb.ImportCustomerRequest, ...) (*channelpb.Customer, error)
- func (c *CloudChannelClient) ListChannelPartnerLinks(ctx context.Context, req *channelpb.ListChannelPartnerLinksRequest, ...) *ChannelPartnerLinkIterator
- func (c *CloudChannelClient) ListChannelPartnerRepricingConfigs(ctx context.Context, req *channelpb.ListChannelPartnerRepricingConfigsRequest, ...) *ChannelPartnerRepricingConfigIterator
- func (c *CloudChannelClient) ListCustomerRepricingConfigs(ctx context.Context, req *channelpb.ListCustomerRepricingConfigsRequest, ...) *CustomerRepricingConfigIterator
- func (c *CloudChannelClient) ListCustomers(ctx context.Context, req *channelpb.ListCustomersRequest, ...) *CustomerIterator
- func (c *CloudChannelClient) ListEntitlementChanges(ctx context.Context, req *channelpb.ListEntitlementChangesRequest, ...) *EntitlementChangeIterator
- func (c *CloudChannelClient) ListEntitlements(ctx context.Context, req *channelpb.ListEntitlementsRequest, ...) *EntitlementIterator
- func (c *CloudChannelClient) ListOffers(ctx context.Context, req *channelpb.ListOffersRequest, opts ...gax.CallOption) *OfferIterator
- func (c *CloudChannelClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *CloudChannelClient) ListProducts(ctx context.Context, req *channelpb.ListProductsRequest, ...) *ProductIterator
- func (c *CloudChannelClient) ListPurchasableOffers(ctx context.Context, req *channelpb.ListPurchasableOffersRequest, ...) *PurchasableOfferIterator
- func (c *CloudChannelClient) ListPurchasableSkus(ctx context.Context, req *channelpb.ListPurchasableSkusRequest, ...) *PurchasableSkuIterator
- func (c *CloudChannelClient) ListSkuGroupBillableSkus(ctx context.Context, req *channelpb.ListSkuGroupBillableSkusRequest, ...) *BillableSkuIterator
- func (c *CloudChannelClient) ListSkuGroups(ctx context.Context, req *channelpb.ListSkuGroupsRequest, ...) *SkuGroupIterator
- func (c *CloudChannelClient) ListSkus(ctx context.Context, req *channelpb.ListSkusRequest, opts ...gax.CallOption) *SkuIterator
- func (c *CloudChannelClient) ListSubscribers(ctx context.Context, req *channelpb.ListSubscribersRequest, ...) *StringIterator
- func (c *CloudChannelClient) ListTransferableOffers(ctx context.Context, req *channelpb.ListTransferableOffersRequest, ...) *TransferableOfferIterator
- func (c *CloudChannelClient) ListTransferableSkus(ctx context.Context, req *channelpb.ListTransferableSkusRequest, ...) *TransferableSkuIterator
- func (c *CloudChannelClient) LookupOffer(ctx context.Context, req *channelpb.LookupOfferRequest, opts ...gax.CallOption) (*channelpb.Offer, error)
- func (c *CloudChannelClient) ProvisionCloudIdentity(ctx context.Context, req *channelpb.ProvisionCloudIdentityRequest, ...) (*ProvisionCloudIdentityOperation, error)
- func (c *CloudChannelClient) ProvisionCloudIdentityOperation(name string) *ProvisionCloudIdentityOperation
- func (c *CloudChannelClient) QueryEligibleBillingAccounts(ctx context.Context, req *channelpb.QueryEligibleBillingAccountsRequest, ...) (*channelpb.QueryEligibleBillingAccountsResponse, error)
- func (c *CloudChannelClient) RegisterSubscriber(ctx context.Context, req *channelpb.RegisterSubscriberRequest, ...) (*channelpb.RegisterSubscriberResponse, error)
- func (c *CloudChannelClient) StartPaidService(ctx context.Context, req *channelpb.StartPaidServiceRequest, ...) (*StartPaidServiceOperation, error)
- func (c *CloudChannelClient) StartPaidServiceOperation(name string) *StartPaidServiceOperation
- func (c *CloudChannelClient) SuspendEntitlement(ctx context.Context, req *channelpb.SuspendEntitlementRequest, ...) (*SuspendEntitlementOperation, error)
- func (c *CloudChannelClient) SuspendEntitlementOperation(name string) *SuspendEntitlementOperation
- func (c *CloudChannelClient) TransferEntitlements(ctx context.Context, req *channelpb.TransferEntitlementsRequest, ...) (*TransferEntitlementsOperation, error)
- func (c *CloudChannelClient) TransferEntitlementsOperation(name string) *TransferEntitlementsOperation
- func (c *CloudChannelClient) TransferEntitlementsToGoogle(ctx context.Context, req *channelpb.TransferEntitlementsToGoogleRequest, ...) (*TransferEntitlementsToGoogleOperation, error)
- func (c *CloudChannelClient) TransferEntitlementsToGoogleOperation(name string) *TransferEntitlementsToGoogleOperation
- func (c *CloudChannelClient) UnregisterSubscriber(ctx context.Context, req *channelpb.UnregisterSubscriberRequest, ...) (*channelpb.UnregisterSubscriberResponse, error)
- func (c *CloudChannelClient) UpdateChannelPartnerLink(ctx context.Context, req *channelpb.UpdateChannelPartnerLinkRequest, ...) (*channelpb.ChannelPartnerLink, error)
- func (c *CloudChannelClient) UpdateChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.UpdateChannelPartnerRepricingConfigRequest, ...) (*channelpb.ChannelPartnerRepricingConfig, error)
- func (c *CloudChannelClient) UpdateCustomer(ctx context.Context, req *channelpb.UpdateCustomerRequest, ...) (*channelpb.Customer, error)
- func (c *CloudChannelClient) UpdateCustomerRepricingConfig(ctx context.Context, req *channelpb.UpdateCustomerRepricingConfigRequest, ...) (*channelpb.CustomerRepricingConfig, error)
- type CloudChannelReportsCallOptions
- type CloudChannelReportsClientdeprecated
- func (c *CloudChannelReportsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *CloudChannelReportsClient) Close() error
- func (c *CloudChannelReportsClient) Connection() *grpc.ClientConndeprecated
- func (c *CloudChannelReportsClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *CloudChannelReportsClient) FetchReportResults(ctx context.Context, req *channelpb.FetchReportResultsRequest, ...) *RowIteratordeprecated
- func (c *CloudChannelReportsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *CloudChannelReportsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *CloudChannelReportsClient) ListReports(ctx context.Context, req *channelpb.ListReportsRequest, opts ...gax.CallOption) *ReportIteratordeprecated
- func (c *CloudChannelReportsClient) RunReportJob(ctx context.Context, req *channelpb.RunReportJobRequest, ...) (*RunReportJobOperation, error)deprecated
- func (c *CloudChannelReportsClient) RunReportJobOperation(name string) *RunReportJobOperation
- type CreateEntitlementOperation
- func (op *CreateEntitlementOperation) Done() bool
- func (op *CreateEntitlementOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *CreateEntitlementOperation) Name() string
- func (op *CreateEntitlementOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- func (op *CreateEntitlementOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- type CustomerIterator
- type CustomerRepricingConfigIterator
- type EntitlementChangeIterator
- type EntitlementIterator
- type OfferIterator
- type OperationIterator
- type ProductIterator
- type ProvisionCloudIdentityOperation
- func (op *ProvisionCloudIdentityOperation) Done() bool
- func (op *ProvisionCloudIdentityOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *ProvisionCloudIdentityOperation) Name() string
- func (op *ProvisionCloudIdentityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Customer, error)
- func (op *ProvisionCloudIdentityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Customer, error)
- type PurchasableOfferIterator
- type PurchasableSkuIterator
- type ReportIterator
- type RowIterator
- type RunReportJobOperation
- func (op *RunReportJobOperation) Done() bool
- func (op *RunReportJobOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *RunReportJobOperation) Name() string
- func (op *RunReportJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.RunReportJobResponse, error)
- func (op *RunReportJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.RunReportJobResponse, error)
- type SkuGroupIterator
- type SkuIterator
- type StartPaidServiceOperation
- func (op *StartPaidServiceOperation) Done() bool
- func (op *StartPaidServiceOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *StartPaidServiceOperation) Name() string
- func (op *StartPaidServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- func (op *StartPaidServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- type StringIterator
- type SuspendEntitlementOperation
- func (op *SuspendEntitlementOperation) Done() bool
- func (op *SuspendEntitlementOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *SuspendEntitlementOperation) Name() string
- func (op *SuspendEntitlementOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- func (op *SuspendEntitlementOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.Entitlement, error)
- type TransferEntitlementsOperation
- func (op *TransferEntitlementsOperation) Done() bool
- func (op *TransferEntitlementsOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *TransferEntitlementsOperation) Name() string
- func (op *TransferEntitlementsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.TransferEntitlementsResponse, error)
- func (op *TransferEntitlementsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.TransferEntitlementsResponse, error)
- type TransferEntitlementsToGoogleOperation
- func (op *TransferEntitlementsToGoogleOperation) Done() bool
- func (op *TransferEntitlementsToGoogleOperation) Metadata() (*channelpb.OperationMetadata, error)
- func (op *TransferEntitlementsToGoogleOperation) Name() string
- func (op *TransferEntitlementsToGoogleOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *TransferEntitlementsToGoogleOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type TransferableOfferIterator
- type TransferableSkuIterator
Examples ¶
- CloudChannelClient.ActivateEntitlement
- CloudChannelClient.CancelEntitlement
- CloudChannelClient.CancelOperation
- CloudChannelClient.ChangeOffer
- CloudChannelClient.ChangeParameters
- CloudChannelClient.ChangeRenewalSettings
- CloudChannelClient.CheckCloudIdentityAccountsExist
- CloudChannelClient.CreateChannelPartnerLink
- CloudChannelClient.CreateChannelPartnerRepricingConfig
- CloudChannelClient.CreateCustomer
- CloudChannelClient.CreateCustomerRepricingConfig
- CloudChannelClient.CreateEntitlement
- CloudChannelClient.DeleteChannelPartnerRepricingConfig
- CloudChannelClient.DeleteCustomer
- CloudChannelClient.DeleteCustomerRepricingConfig
- CloudChannelClient.DeleteOperation
- CloudChannelClient.GetChannelPartnerLink
- CloudChannelClient.GetChannelPartnerRepricingConfig
- CloudChannelClient.GetCustomer
- CloudChannelClient.GetCustomerRepricingConfig
- CloudChannelClient.GetEntitlement
- CloudChannelClient.GetOperation
- CloudChannelClient.ImportCustomer
- CloudChannelClient.ListChannelPartnerLinks
- CloudChannelClient.ListChannelPartnerLinks (All)
- CloudChannelClient.ListChannelPartnerRepricingConfigs
- CloudChannelClient.ListChannelPartnerRepricingConfigs (All)
- CloudChannelClient.ListCustomerRepricingConfigs
- CloudChannelClient.ListCustomerRepricingConfigs (All)
- CloudChannelClient.ListCustomers
- CloudChannelClient.ListCustomers (All)
- CloudChannelClient.ListEntitlementChanges
- CloudChannelClient.ListEntitlementChanges (All)
- CloudChannelClient.ListEntitlements
- CloudChannelClient.ListEntitlements (All)
- CloudChannelClient.ListOffers
- CloudChannelClient.ListOffers (All)
- CloudChannelClient.ListOperations
- CloudChannelClient.ListOperations (All)
- CloudChannelClient.ListProducts
- CloudChannelClient.ListProducts (All)
- CloudChannelClient.ListPurchasableOffers
- CloudChannelClient.ListPurchasableOffers (All)
- CloudChannelClient.ListPurchasableSkus
- CloudChannelClient.ListPurchasableSkus (All)
- CloudChannelClient.ListSkuGroupBillableSkus
- CloudChannelClient.ListSkuGroupBillableSkus (All)
- CloudChannelClient.ListSkuGroups
- CloudChannelClient.ListSkuGroups (All)
- CloudChannelClient.ListSkus
- CloudChannelClient.ListSkus (All)
- CloudChannelClient.ListSubscribers
- CloudChannelClient.ListSubscribers (All)
- CloudChannelClient.ListTransferableOffers
- CloudChannelClient.ListTransferableOffers (All)
- CloudChannelClient.ListTransferableSkus
- CloudChannelClient.ListTransferableSkus (All)
- CloudChannelClient.LookupOffer
- CloudChannelClient.ProvisionCloudIdentity
- CloudChannelClient.QueryEligibleBillingAccounts
- CloudChannelClient.RegisterSubscriber
- CloudChannelClient.StartPaidService
- CloudChannelClient.SuspendEntitlement
- CloudChannelClient.TransferEntitlements
- CloudChannelClient.TransferEntitlementsToGoogle
- CloudChannelClient.UnregisterSubscriber
- CloudChannelClient.UpdateChannelPartnerLink
- CloudChannelClient.UpdateChannelPartnerRepricingConfig
- CloudChannelClient.UpdateCustomer
- CloudChannelClient.UpdateCustomerRepricingConfig
- CloudChannelReportsClient.CancelOperation
- CloudChannelReportsClient.DeleteOperation
- CloudChannelReportsClient.FetchReportResults
- CloudChannelReportsClient.FetchReportResults (All)
- CloudChannelReportsClient.GetOperation
- CloudChannelReportsClient.ListOperations
- CloudChannelReportsClient.ListOperations (All)
- CloudChannelReportsClient.ListReports
- CloudChannelReportsClient.ListReports (All)
- CloudChannelReportsClient.RunReportJob
- NewCloudChannelClient
- NewCloudChannelRESTClient
- NewCloudChannelReportsClient
- NewCloudChannelReportsRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type 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.
type BillableSkuIterator ¶ added in v1.16.0
type BillableSkuIterator 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.BillableSku, nextPageToken string, err error) // contains filtered or unexported fields }
BillableSkuIterator manages a stream of *channelpb.BillableSku.
func (*BillableSkuIterator) All ¶ added in v1.18.1
func (it *BillableSkuIterator) All() iter.Seq2[*channelpb.BillableSku, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*BillableSkuIterator) Next ¶ added in v1.16.0
func (it *BillableSkuIterator) Next() (*channelpb.BillableSku, 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 (*BillableSkuIterator) PageInfo ¶ added in v1.16.0
func (it *BillableSkuIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.
type 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.
type 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.
type 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.
type 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) All ¶ added in v1.18.1
func (it *ChannelPartnerLinkIterator) All() iter.Seq2[*channelpb.ChannelPartnerLink, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type ChannelPartnerRepricingConfigIterator ¶ added in v1.6.0
type ChannelPartnerRepricingConfigIterator 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.ChannelPartnerRepricingConfig, nextPageToken string, err error) // contains filtered or unexported fields }
ChannelPartnerRepricingConfigIterator manages a stream of *channelpb.ChannelPartnerRepricingConfig.
func (*ChannelPartnerRepricingConfigIterator) All ¶ added in v1.18.1
func (it *ChannelPartnerRepricingConfigIterator) All() iter.Seq2[*channelpb.ChannelPartnerRepricingConfig, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ChannelPartnerRepricingConfigIterator) Next ¶ added in v1.6.0
func (it *ChannelPartnerRepricingConfigIterator) Next() (*channelpb.ChannelPartnerRepricingConfig, 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 (*ChannelPartnerRepricingConfigIterator) PageInfo ¶ added in v1.6.0
func (it *ChannelPartnerRepricingConfigIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CloudChannelCallOptions ¶
type CloudChannelCallOptions struct { ListCustomers []gax.CallOption GetCustomer []gax.CallOption CheckCloudIdentityAccountsExist []gax.CallOption CreateCustomer []gax.CallOption UpdateCustomer []gax.CallOption DeleteCustomer []gax.CallOption ImportCustomer []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 GetCustomerRepricingConfig []gax.CallOption ListCustomerRepricingConfigs []gax.CallOption CreateCustomerRepricingConfig []gax.CallOption UpdateCustomerRepricingConfig []gax.CallOption DeleteCustomerRepricingConfig []gax.CallOption GetChannelPartnerRepricingConfig []gax.CallOption ListChannelPartnerRepricingConfigs []gax.CallOption CreateChannelPartnerRepricingConfig []gax.CallOption UpdateChannelPartnerRepricingConfig []gax.CallOption DeleteChannelPartnerRepricingConfig []gax.CallOption ListSkuGroups []gax.CallOption ListSkuGroupBillableSkus []gax.CallOption LookupOffer []gax.CallOption ListProducts []gax.CallOption ListSkus []gax.CallOption ListOffers []gax.CallOption ListPurchasableSkus []gax.CallOption ListPurchasableOffers []gax.CallOption QueryEligibleBillingAccounts []gax.CallOption RegisterSubscriber []gax.CallOption UnregisterSubscriber []gax.CallOption ListSubscribers []gax.CallOption ListEntitlementChanges []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
CloudChannelCallOptions contains the retry settings for each method of CloudChannelClient.
type CloudChannelClient ¶
type CloudChannelClient struct { // The call options for this service. CallOptions *CloudChannelCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
CloudChannelClient is a client for interacting with Cloud Channel API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
CloudChannelService lets Google cloud resellers and distributors manage their customers, channel partners, entitlements, and reports.
Using this service:
Resellers and distributors can manage a customer entity.
Distributors can register an authorized reseller in their channel and provide them with delegated admin access.
Resellers and distributors can manage customer entitlements.
CloudChannelService exposes the following resources:
Customers: An entity-usually an enterprise-managed by a reseller or distributor. Entitlements: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment. ChannelPartnerLinks: An entity that identifies links between distributors and their indirect resellers in a channel.
func NewCloudChannelClient ¶
func NewCloudChannelClient(ctx context.Context, opts ...option.ClientOption) (*CloudChannelClient, error)
NewCloudChannelClient creates a new cloud channel service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
CloudChannelService lets Google cloud resellers and distributors manage their customers, channel partners, entitlements, and reports.
Using this service:
Resellers and distributors can manage a customer entity.
Distributors can register an authorized reseller in their channel and provide them with delegated admin access.
Resellers and distributors can manage customer entitlements.
CloudChannelService exposes the following resources:
Customers: An entity-usually an enterprise-managed by a reseller or distributor. Entitlements: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment. ChannelPartnerLinks: An entity that identifies links between distributors and their indirect resellers in a channel.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewCloudChannelRESTClient ¶ added in v1.11.0
func NewCloudChannelRESTClient(ctx context.Context, opts ...option.ClientOption) (*CloudChannelClient, error)
NewCloudChannelRESTClient creates a new cloud channel service rest client.
CloudChannelService lets Google cloud resellers and distributors manage their customers, channel partners, entitlements, and reports.
Using this service:
Resellers and distributors can manage a customer entity.
Distributors can register an authorized reseller in their channel and provide them with delegated admin access.
Resellers and distributors can manage customer entitlements.
CloudChannelService exposes the following resources:
Customers: An entity-usually an enterprise-managed by a reseller or distributor. Entitlements: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment. ChannelPartnerLinks: An entity that identifies links between distributors and their indirect resellers in a channel.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*CloudChannelClient) ActivateEntitlement ¶
func (c *CloudChannelClient) ActivateEntitlement(ctx context.Context, req *channelpb.ActivateEntitlementRequest, opts ...gax.CallOption) (*ActivateEntitlementOperation, error)
ActivateEntitlement activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can’t be activated using this method.
An entitlement activation is a long-running operation and it updates the state of the customer entitlement.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: Entitlement resource not found. SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS. NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ActivateEntitlementRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ActivateEntitlementRequest. } 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 }
Output:
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: The reseller account making the request is different from the reseller account in the API request. FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement’s Cloud Billing subaccount. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: Entitlement resource not found. DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud’s development platform. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.CancelEntitlementRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#CancelEntitlementRequest. } op, err := c.CancelEntitlement(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
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) CancelOperation ¶ added in v1.7.0
func (c *CloudChannelClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
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 it updates the entitlement as a result of fulfillment.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: Offer or Entitlement resource not found. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ChangeOfferRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ChangeOfferRequest. } 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 }
Output:
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 update is a long-running operation and it updates the entitlement as a result of fulfillment.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan. NOT_FOUND: Entitlement resource not found. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ChangeParametersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ChangeParametersRequest. } 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 }
Output:
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 it updates the entitlement as a result of fulfillment.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: Entitlement resource not found. NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can’t enable or disable renewals for non-commitment plans. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ChangeRenewalSettingsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ChangeRenewalSettingsRequest. } 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 }
Output:
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 if the Cloud Identity accounts are owned by the reseller.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid. INVALID_VALUE: Invalid domain value in the request.
Return value: A list of CloudIdentityCustomerAccount resources for the domain (may be empty)
Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no CloudIdentityCustomerAccount resources match the domain.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.CheckCloudIdentityAccountsExistRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#CheckCloudIdentityAccountsExistRequest. } resp, err := c.CheckCloudIdentityAccountsExist(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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
deprecated
func (c *CloudChannelClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*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. Invited partners need to follow the invite_link_uri provided in the response to accept. After accepting the invitation, a link is set up between the two parties. You must be a distributor to call this method.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid. ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists. NOT_FOUND: No Cloud Identity customer exists for provided domain. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The new ChannelPartnerLink resource.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.CreateChannelPartnerLinkRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#CreateChannelPartnerLinkRequest. } resp, err := c.CreateChannelPartnerLink(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) CreateChannelPartnerRepricingConfig ¶ added in v1.6.0
func (c *CloudChannelClient) CreateChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.CreateChannelPartnerRepricingConfigRequest, opts ...gax.CallOption) (*channelpb.ChannelPartnerRepricingConfig, error)
CreateChannelPartnerRepricingConfig creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner’s bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions.
When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month.
The following restrictions are for creating configs in the current month.
This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. There is a limit of ten configs for any ChannelPartner or RepricingConfig.EntitlementGranularity.entitlement, for any RepricingConfig.effective_invoice_month. The contained ChannelPartnerRepricingConfig.repricing_config value must be different from the value used in the current config for a ChannelPartner.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different. INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated ChannelPartnerRepricingConfig resource, otherwise returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.CreateChannelPartnerRepricingConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#CreateChannelPartnerRepricingConfigRequest. } resp, err := c.CreateChannelPartnerRepricingConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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: The reseller account making the request is different from the reseller account in the API request. You are not authorized to create a customer. See https://support.google.com/channelservices/answer/9759265 (at https://support.google.com/channelservices/answer/9759265) INVALID_ARGUMENT: Required request parameters are missing or invalid. Domain field value doesn’t match the primary email domain.
Return value: The newly created Customer resource.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.CreateCustomerRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#CreateCustomerRequest. } resp, err := c.CreateCustomer(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) CreateCustomerRepricingConfig ¶ added in v1.6.0
func (c *CloudChannelClient) CreateCustomerRepricingConfig(ctx context.Context, req *channelpb.CreateCustomerRepricingConfigRequest, opts ...gax.CallOption) (*channelpb.CustomerRepricingConfig, error)
CreateCustomerRepricingConfig creates a CustomerRepricingConfig. Call this method to set modifications for a specific customer’s bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions.
When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month.
The following restrictions are for creating configs in the current month.
This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. There is a limit of ten configs for any RepricingConfig.EntitlementGranularity.entitlement, for any RepricingConfig.effective_invoice_month. The contained CustomerRepricingConfig.repricing_config value must be different from the value used in the current config for a RepricingConfig.EntitlementGranularity.entitlement.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different. INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.CreateCustomerRepricingConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#CreateCustomerRepricingConfigRequest. } resp, err := c.CreateCustomerRepricingConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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: The customer doesn’t belong to the reseller. The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265 (at https://support.google.com/channelservices/answer/9759265) INVALID_ARGUMENT: Required request parameters are missing or invalid. There is already a customer entitlement for a SKU from the same product family. INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting. NOT_FOUND: The customer or offer resource was not found. ALREADY_EXISTS: The SKU was already purchased for the customer. The customer’s primary email already exists. Retry after changing the customer’s primary contact email. CONDITION_NOT_MET or FAILED_PRECONDITION: The domain required for purchasing a SKU has not been verified. A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive. (Developer accounts only) Reseller and resold domain must meet the following naming requirements: Domain names must start with goog-test. Domain names must include the reseller domain. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.CreateEntitlementRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#CreateEntitlementRequest. } 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 }
Output:
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) DeleteChannelPartnerRepricingConfig ¶ added in v1.6.0
func (c *CloudChannelClient) DeleteChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.DeleteChannelPartnerRepricingConfigRequest, opts ...gax.CallOption) error
DeleteChannelPartnerRepricingConfig deletes the given ChannelPartnerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month.
Possible error codes:
PERMISSION_DENIED: The account making the request does not own this customer. INVALID_ARGUMENT: Required request parameters are missing or invalid. FAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or in the past. NOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the request.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.DeleteChannelPartnerRepricingConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#DeleteChannelPartnerRepricingConfigRequest. } err = c.DeleteChannelPartnerRepricingConfig(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*CloudChannelClient) DeleteCustomer ¶
func (c *CloudChannelClient) DeleteCustomer(ctx context.Context, req *channelpb.DeleteCustomerRequest, opts ...gax.CallOption) error
DeleteCustomer deletes the given Customer permanently.
Possible error codes:
PERMISSION_DENIED: The account making the request does not own this customer. INVALID_ARGUMENT: Required request parameters are missing or invalid. FAILED_PRECONDITION: The customer has existing entitlements. NOT_FOUND: No Customer resource found for the name in the request.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.DeleteCustomerRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#DeleteCustomerRequest. } err = c.DeleteCustomer(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*CloudChannelClient) DeleteCustomerRepricingConfig ¶ added in v1.6.0
func (c *CloudChannelClient) DeleteCustomerRepricingConfig(ctx context.Context, req *channelpb.DeleteCustomerRepricingConfigRequest, opts ...gax.CallOption) error
DeleteCustomerRepricingConfig deletes the given CustomerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month.
Possible error codes:
PERMISSION_DENIED: The account making the request does not own this customer. INVALID_ARGUMENT: Required request parameters are missing or invalid. FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the past. NOT_FOUND: No CustomerRepricingConfig found for the name in the request.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.DeleteCustomerRepricingConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#DeleteCustomerRepricingConfigRequest. } err = c.DeleteCustomerRepricingConfig(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*CloudChannelClient) DeleteOperation ¶ added in v1.7.0
func (c *CloudChannelClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*CloudChannelClient) GetChannelPartnerLink ¶
func (c *CloudChannelClient) GetChannelPartnerLink(ctx context.Context, req *channelpb.GetChannelPartnerLinkRequest, opts ...gax.CallOption) (*channelpb.ChannelPartnerLink, error)
GetChannelPartnerLink returns the requested ChannelPartnerLink resource. You must be a distributor to call this method.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner link name.
Return value: The ChannelPartnerLink resource.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.GetChannelPartnerLinkRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#GetChannelPartnerLinkRequest. } resp, err := c.GetChannelPartnerLink(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) GetChannelPartnerRepricingConfig ¶ added in v1.6.0
func (c *CloudChannelClient) GetChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.GetChannelPartnerRepricingConfigRequest, opts ...gax.CallOption) (*channelpb.ChannelPartnerRepricingConfig, error)
GetChannelPartnerRepricingConfig gets information about how a Distributor modifies their bill before sending it to a ChannelPartner.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different. NOT_FOUND: The ChannelPartnerRepricingConfig was not found. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the ChannelPartnerRepricingConfig resource, otherwise returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.GetChannelPartnerRepricingConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#GetChannelPartnerRepricingConfigRequest. } resp, err := c.GetChannelPartnerRepricingConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) GetCustomer ¶
func (c *CloudChannelClient) GetCustomer(ctx context.Context, req *channelpb.GetCustomerRequest, opts ...gax.CallOption) (*channelpb.Customer, error)
GetCustomer returns the requested Customer resource.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: The customer resource doesn’t exist. Usually the result of an invalid name parameter.
Return value: The Customer resource.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.GetCustomerRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#GetCustomerRequest. } resp, err := c.GetCustomer(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) GetCustomerRepricingConfig ¶ added in v1.6.0
func (c *CloudChannelClient) GetCustomerRepricingConfig(ctx context.Context, req *channelpb.GetCustomerRepricingConfigRequest, opts ...gax.CallOption) (*channelpb.CustomerRepricingConfig, error)
GetCustomerRepricingConfig gets information about how a Reseller modifies their bill before sending it to a Customer.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different. NOT_FOUND: The CustomerRepricingConfig was not found. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the CustomerRepricingConfig resource, otherwise returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.GetCustomerRepricingConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#GetCustomerRepricingConfigRequest. } resp, err := c.GetCustomerRepricingConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) GetEntitlement ¶
func (c *CloudChannelClient) GetEntitlement(ctx context.Context, req *channelpb.GetEntitlementRequest, opts ...gax.CallOption) (*channelpb.Entitlement, error)
GetEntitlement returns the requested Entitlement resource.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: The customer entitlement was not found.
Return value: The requested Entitlement resource.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.GetEntitlementRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#GetEntitlementRequest. } resp, err := c.GetEntitlement(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) GetOperation ¶ added in v1.7.0
func (c *CloudChannelClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) ImportCustomer ¶ added in v0.2.0
func (c *CloudChannelClient) ImportCustomer(ctx context.Context, req *channelpb.ImportCustomerRequest, opts ...gax.CallOption) (*channelpb.Customer, error)
ImportCustomer imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer’s data.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. You are not authorized to import the customer. See https://support.google.com/channelservices/answer/9759265 (at https://support.google.com/channelservices/answer/9759265) NOT_FOUND: Cloud Identity doesn’t exist or was deleted. INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid. ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite.
Return value: The Customer.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ImportCustomerRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ImportCustomerRequest. } resp, err := c.ImportCustomer(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) ListChannelPartnerLinks ¶
func (c *CloudChannelClient) ListChannelPartnerLinks(ctx context.Context, req *channelpb.ListChannelPartnerLinksRequest, opts ...gax.CallOption) *ChannelPartnerLinkIterator
ListChannelPartnerLinks list ChannelPartnerLinks belonging to a distributor. You must be a distributor to call this method.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: The list of the distributor account’s ChannelPartnerLink resources.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListChannelPartnerLinksRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListChannelPartnerLinksRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListChannelPartnerLinksResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListChannelPartnerLinksRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListChannelPartnerLinksRequest. } for resp, err := range c.ListChannelPartnerLinks(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListChannelPartnerRepricingConfigs ¶ added in v1.6.0
func (c *CloudChannelClient) ListChannelPartnerRepricingConfigs(ctx context.Context, req *channelpb.ListChannelPartnerRepricingConfigsRequest, opts ...gax.CallOption) *ChannelPartnerRepricingConfigIterator
ListChannelPartnerRepricingConfigs lists information about how a Reseller modifies their bill before sending it to a ChannelPartner.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different. NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the ChannelPartnerRepricingConfig resources. The data for each resource is displayed in the ascending order of:
Channel Partner ID RepricingConfig.effective_invoice_month ChannelPartnerRepricingConfig.update_time
If unsuccessful, returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListChannelPartnerRepricingConfigsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListChannelPartnerRepricingConfigsRequest. } it := c.ListChannelPartnerRepricingConfigs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListChannelPartnerRepricingConfigsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListChannelPartnerRepricingConfigsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListChannelPartnerRepricingConfigsRequest. } for resp, err := range c.ListChannelPartnerRepricingConfigs(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListCustomerRepricingConfigs ¶ added in v1.6.0
func (c *CloudChannelClient) ListCustomerRepricingConfigs(ctx context.Context, req *channelpb.ListCustomerRepricingConfigsRequest, opts ...gax.CallOption) *CustomerRepricingConfigIterator
ListCustomerRepricingConfigs lists information about how a Reseller modifies their bill before sending it to a Customer.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different. NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the CustomerRepricingConfig resources. The data for each resource is displayed in the ascending order of:
Customer ID RepricingConfig.EntitlementGranularity.entitlement RepricingConfig.effective_invoice_month CustomerRepricingConfig.update_time
If unsuccessful, returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListCustomerRepricingConfigsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListCustomerRepricingConfigsRequest. } it := c.ListCustomerRepricingConfigs(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListCustomerRepricingConfigsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListCustomerRepricingConfigsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListCustomerRepricingConfigsRequest. } for resp, err := range c.ListCustomerRepricingConfigs(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListCustomers ¶
func (c *CloudChannelClient) ListCustomers(ctx context.Context, req *channelpb.ListCustomersRequest, opts ...gax.CallOption) *CustomerIterator
ListCustomers list Customers.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: List of Customers, or an empty list if there are no customers.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListCustomersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListCustomersRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListCustomersResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListCustomersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListCustomersRequest. } for resp, err := range c.ListCustomers(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListEntitlementChanges ¶ added in v1.12.0
func (c *CloudChannelClient) ListEntitlementChanges(ctx context.Context, req *channelpb.ListEntitlementChangesRequest, opts ...gax.CallOption) *EntitlementChangeIterator
ListEntitlementChanges list entitlement history.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different. INVALID_ARGUMENT: Missing or invalid required fields in the request. NOT_FOUND: The parent resource doesn’t exist. Usually the result of an invalid name parameter. INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact CloudChannel 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 EntitlementChanges.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListEntitlementChangesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListEntitlementChangesRequest. } it := c.ListEntitlementChanges(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListEntitlementChangesResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListEntitlementChangesRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListEntitlementChangesRequest. } for resp, err := range c.ListEntitlementChanges(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListEntitlements ¶
func (c *CloudChannelClient) ListEntitlements(ctx context.Context, req *channelpb.ListEntitlementsRequest, opts ...gax.CallOption) *EntitlementIterator
ListEntitlements lists Entitlements belonging to a customer.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: A list of the customer’s Entitlements.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListEntitlementsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListEntitlementsRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListEntitlementsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListEntitlementsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListEntitlementsRequest. } for resp, err := range c.ListEntitlements(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
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: Required request parameters are missing or invalid.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListOffersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListOffersRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListOffersResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListOffersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListOffersRequest. } for resp, err := range c.ListOffers(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListOperations ¶ added in v1.7.0
func (c *CloudChannelClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*longrunningpb.ListOperationsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
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: Required request parameters are missing or invalid.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListProductsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListProductsRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListProductsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListProductsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListProductsRequest. } for resp, err := range c.ListProducts(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListPurchasableOffers ¶
func (c *CloudChannelClient) ListPurchasableOffers(ctx context.Context, req *channelpb.ListPurchasableOffersRequest, opts ...gax.CallOption) *PurchasableOfferIterator
ListPurchasableOffers lists the following:
Offers that you can purchase for a customer. Offers that you can change for an entitlement.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265 (at https://support.google.com/channelservices/answer/9759265) INVALID_ARGUMENT: Required request parameters are missing or invalid.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListPurchasableOffersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListPurchasableOffersRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListPurchasableOffersResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListPurchasableOffersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListPurchasableOffersRequest. } for resp, err := range c.ListPurchasableOffers(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListPurchasableSkus ¶
func (c *CloudChannelClient) ListPurchasableSkus(ctx context.Context, req *channelpb.ListPurchasableSkusRequest, opts ...gax.CallOption) *PurchasableSkuIterator
ListPurchasableSkus lists the following:
SKUs that you can purchase for a customer SKUs that you can upgrade or downgrade for an entitlement.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListPurchasableSkusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListPurchasableSkusRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListPurchasableSkusResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListPurchasableSkusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListPurchasableSkusRequest. } for resp, err := range c.ListPurchasableSkus(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListSkuGroupBillableSkus ¶ added in v1.16.0
func (c *CloudChannelClient) ListSkuGroupBillableSkus(ctx context.Context, req *channelpb.ListSkuGroupBillableSkusRequest, opts ...gax.CallOption) *BillableSkuIterator
ListSkuGroupBillableSkus lists the Billable SKUs in a given SKU group.
Possible error codes: PERMISSION_DENIED: If the account making the request and the account being queried for are different, or the account doesn’t exist. INVALID_ARGUMENT: Missing or invalid required parameters in the request. INTERNAL: Any non-user error related to technical issue in the backend. In this case, contact cloud channel support.
Return Value: If successful, the BillableSku resources. The data for each resource is displayed in the ascending order of:
BillableSku.service_display_name BillableSku.sku_display_name
If unsuccessful, returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListSkuGroupBillableSkusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListSkuGroupBillableSkusRequest. } it := c.ListSkuGroupBillableSkus(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListSkuGroupBillableSkusResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListSkuGroupBillableSkusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListSkuGroupBillableSkusRequest. } for resp, err := range c.ListSkuGroupBillableSkus(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) ListSkuGroups ¶ added in v1.16.0
func (c *CloudChannelClient) ListSkuGroups(ctx context.Context, req *channelpb.ListSkuGroupsRequest, opts ...gax.CallOption) *SkuGroupIterator
ListSkuGroups lists the Rebilling supported SKU groups the account is authorized to sell. Reference: https://cloud.google.com/skus/sku-groups (at https://cloud.google.com/skus/sku-groups)
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different, or the account doesn’t exist. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the SkuGroup resources. The data for each resource is displayed in the alphabetical order of SKU group display name. The data for each resource is displayed in the ascending order of SkuGroup.display_name
If unsuccessful, returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListSkuGroupsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListSkuGroupsRequest. } it := c.ListSkuGroups(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListSkuGroupsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListSkuGroupsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListSkuGroupsRequest. } for resp, err := range c.ListSkuGroups(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
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: Required request parameters are missing or invalid.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListSkusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListSkusRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListSkusResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListSkusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListSkusRequest. } for resp, err := range c.ListSkus(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
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: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: The topic resource doesn’t exist. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: A list of service email addresses.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListSubscribersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListSubscribersRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListSubscribersResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListSubscribersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListSubscribersRequest. } for resp, err := range c.ListSubscribers(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
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.
Use this method when a reseller gets the entitlement information of an unowned customer. The reseller should provide the customer’s Cloud Identity ID or Customer Name.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller and has no auth token. The customer provided incorrect reseller information when generating auth token. The reseller account making the request is different from the reseller account in the query. The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265 (at https://support.google.com/channelservices/answer/9759265) INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: List of TransferableOffer for the given customer and SKU.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListTransferableOffersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListTransferableOffersRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListTransferableOffersResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListTransferableOffersRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListTransferableOffersRequest. } for resp, err := range c.ListTransferableOffers(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
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 the Cloud Identity ID or Customer Name in the request.
Use this method to list the entitlements information of an unowned customer. You should provide the customer’s Cloud Identity ID or Customer Name.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller and has no auth token. The supplied auth token is invalid. The reseller account making the request is different from the reseller account in the query. INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: A list of the customer’s TransferableSku.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListTransferableSkusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListTransferableSkusRequest. } 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 // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListTransferableSkusResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListTransferableSkusRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListTransferableSkusRequest. } for resp, err := range c.ListTransferableSkus(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelClient) LookupOffer ¶
func (c *CloudChannelClient) LookupOffer(ctx context.Context, req *channelpb.LookupOfferRequest, opts ...gax.CallOption) (*channelpb.Offer, error)
LookupOffer returns the requested Offer resource.
Possible error codes:
PERMISSION_DENIED: The entitlement doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: Entitlement or offer was not found.
Return value: The Offer resource.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.LookupOfferRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#LookupOfferRequest. } resp, err := c.LookupOffer(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. You are not authorized to provision cloud identity id. See https://support.google.com/channelservices/answer/9759265 (at https://support.google.com/channelservices/answer/9759265) INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: The customer was not found. ALREADY_EXISTS: The customer’s primary email already exists. Retry after changing the customer’s primary contact email. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ProvisionCloudIdentityRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ProvisionCloudIdentityRequest. } 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 }
Output:
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) QueryEligibleBillingAccounts ¶ added in v1.17.0
func (c *CloudChannelClient) QueryEligibleBillingAccounts(ctx context.Context, req *channelpb.QueryEligibleBillingAccountsRequest, opts ...gax.CallOption) (*channelpb.QueryEligibleBillingAccountsResponse, error)
QueryEligibleBillingAccounts lists the billing accounts that are eligible to purchase particular SKUs for a given customer.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: Based on the provided list of SKUs, returns a list of SKU groups that must be purchased using the same billing account and the billing accounts eligible to purchase each SKU group.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.QueryEligibleBillingAccountsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#QueryEligibleBillingAccountsRequest. } resp, err := c.QueryEligibleBillingAccounts(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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 for this Channel Services account. After you create a subscriber, you get the events through SubscriberEvent
Possible error codes:
PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. INVALID_ARGUMENT: Required request parameters are missing or invalid. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The topic name with the registered service email address.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.RegisterSubscriberRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#RegisterSubscriberRequest. } resp, err := c.RegisterSubscriber(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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 is set up for a trial entitlement but has some trial days remaining.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: Entitlement resource not found. FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.StartPaidServiceRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#StartPaidServiceRequest. } 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 }
Output:
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: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: Entitlement resource not found. NOT_ACTIVE: Entitlement is not active. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.SuspendEntitlementRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#SuspendEntitlementRequest. } 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 }
Output:
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: The customer doesn’t belong to the reseller. The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265 (at https://support.google.com/channelservices/answer/9759265) INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: The customer or offer resource was not found. ALREADY_EXISTS: The SKU was already transferred for the customer. CONDITION_NOT_MET or FAILED_PRECONDITION: The SKU requires domain verification to transfer, but the domain is not verified. An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). (Developer accounts only) Reseller and resold domain must meet the following naming requirements: Domain names must start with goog-test. Domain names must include the reseller domain. Specify all transferring entitlements. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.TransferEntitlementsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#TransferEntitlementsRequest. } 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 }
Output:
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 their current reseller to Google.
Possible error codes:
PERMISSION_DENIED: The customer doesn’t belong to the reseller. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: The customer or offer resource was not found. ALREADY_EXISTS: The SKU was already transferred for the customer. CONDITION_NOT_MET or FAILED_PRECONDITION: The SKU requires domain verification to transfer, but the domain is not verified. An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). (Developer accounts only) Reseller and resold domain must meet the following naming requirements: Domain names must start with goog-test. Domain names must include the reseller domain. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.TransferEntitlementsToGoogleRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#TransferEntitlementsToGoogleRequest. } op, err := c.TransferEntitlementsToGoogle(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
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 service accounts left with subscriber privileges, this deletes the topic. You can call ListSubscribers to check for these accounts.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: The topic resource doesn’t exist. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn’t registered with the topic.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.UnregisterSubscriberRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#UnregisterSubscriberRequest. } resp, err := c.UnregisterSubscriber(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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. Distributors call this method to change a link’s status. For example, to suspend a partner link. You must be a distributor to call this method.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid. Link state cannot change from invited to active or suspended. Cannot send reseller_cloud_identity_id, invite_url, or name in update mask. NOT_FOUND: ChannelPartnerLink resource not found. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The updated ChannelPartnerLink resource.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.UpdateChannelPartnerLinkRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#UpdateChannelPartnerLinkRequest. } resp, err := c.UpdateChannelPartnerLink(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) UpdateChannelPartnerRepricingConfig ¶ added in v1.6.0
func (c *CloudChannelClient) UpdateChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.UpdateChannelPartnerRepricingConfigRequest, opts ...gax.CallOption) (*channelpb.ChannelPartnerRepricingConfig, error)
UpdateChannelPartnerRepricingConfig updates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner’s bill. This method overwrites the existing CustomerRepricingConfig.
You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateChannelPartnerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month.
When updating a config in the future:
This config must already exist.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different. INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated ChannelPartnerRepricingConfig resource, otherwise returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.UpdateChannelPartnerRepricingConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#UpdateChannelPartnerRepricingConfigRequest. } resp, err := c.UpdateChannelPartnerRepricingConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
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 for the reseller or distributor.
Possible error codes:
PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: No Customer resource found for the name in the request.
Return value: The updated Customer resource.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.UpdateCustomerRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#UpdateCustomerRequest. } resp, err := c.UpdateCustomer(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelClient) UpdateCustomerRepricingConfig ¶ added in v1.6.0
func (c *CloudChannelClient) UpdateCustomerRepricingConfig(ctx context.Context, req *channelpb.UpdateCustomerRepricingConfigRequest, opts ...gax.CallOption) (*channelpb.CustomerRepricingConfig, error)
UpdateCustomerRepricingConfig updates a CustomerRepricingConfig. Call this method to set modifications for a specific customer’s bill. This method overwrites the existing CustomerRepricingConfig.
You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateCustomerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month.
When updating a config in the future:
This config must already exist.
Possible Error Codes:
PERMISSION_DENIED: If the account making the request and the account being queried are different. INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.UpdateCustomerRepricingConfigRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#UpdateCustomerRepricingConfigRequest. } resp, err := c.UpdateCustomerRepricingConfig(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
type CloudChannelReportsCallOptions ¶ added in v1.8.0
type CloudChannelReportsCallOptions struct { RunReportJob []gax.CallOption FetchReportResults []gax.CallOption ListReports []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
CloudChannelReportsCallOptions contains the retry settings for each method of CloudChannelReportsClient.
type CloudChannelReportsClient
deprecated
added in
v1.8.0
type CloudChannelReportsClient struct { // The call options for this service. CallOptions *CloudChannelReportsCallOptions // LROClient is used internally to handle long-running operations. // It is exposed so that its CallOptions can be modified if required. // Users should not Close this client. LROClient *lroauto.OperationsClient // contains filtered or unexported fields }
CloudChannelReportsClient 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.
CloudChannelReportsService lets Google Cloud resellers and distributors retrieve and combine a variety of data in Cloud Channel for multiple products (Google Cloud, Google Voice, and Google Workspace.)
Deprecated: This service is being deprecated. Please use Export Channel Services data to BigQuery (at https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
Deprecated: CloudChannelReportsService may be removed in a future version.
func NewCloudChannelReportsClient
deprecated
added in
v1.8.0
func NewCloudChannelReportsClient(ctx context.Context, opts ...option.ClientOption) (*CloudChannelReportsClient, error)
NewCloudChannelReportsClient creates a new cloud channel reports service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
CloudChannelReportsService lets Google Cloud resellers and distributors retrieve and combine a variety of data in Cloud Channel for multiple products (Google Cloud, Google Voice, and Google Workspace.)
Deprecated: This service is being deprecated. Please use Export Channel Services data to BigQuery (at https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
Deprecated: CloudChannelReportsService may be removed in a future version.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func NewCloudChannelReportsRESTClient
deprecated
added in
v1.11.0
func NewCloudChannelReportsRESTClient(ctx context.Context, opts ...option.ClientOption) (*CloudChannelReportsClient, error)
NewCloudChannelReportsRESTClient creates a new cloud channel reports service rest client.
CloudChannelReportsService lets Google Cloud resellers and distributors retrieve and combine a variety of data in Cloud Channel for multiple products (Google Cloud, Google Voice, and Google Workspace.)
Deprecated: This service is being deprecated. Please use Export Channel Services data to BigQuery (at https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
Deprecated: CloudChannelReportsService may be removed in a future version.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsRESTClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*CloudChannelReportsClient) CancelOperation ¶ added in v1.8.0
func (c *CloudChannelReportsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.CancelOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. } err = c.CancelOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*CloudChannelReportsClient) Close ¶ added in v1.8.0
func (c *CloudChannelReportsClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*CloudChannelReportsClient) Connection
deprecated
added in
v1.8.0
func (c *CloudChannelReportsClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*CloudChannelReportsClient) DeleteOperation ¶ added in v1.8.0
func (c *CloudChannelReportsClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.DeleteOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. } err = c.DeleteOperation(ctx, req) if err != nil { // TODO: Handle error. } }
Output:
func (*CloudChannelReportsClient) FetchReportResults
deprecated
added in
v1.8.0
func (c *CloudChannelReportsClient) FetchReportResults(ctx context.Context, req *channelpb.FetchReportResultsRequest, opts ...gax.CallOption) *RowIterator
FetchReportResults retrieves data generated by CloudChannelReportsService.RunReportJob.
Deprecated: Please use Export Channel Services data to BigQuery (at https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
Deprecated: FetchReportResults may be removed in a future version.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.FetchReportResultsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#FetchReportResultsRequest. } it := c.FetchReportResults(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.FetchReportResultsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.FetchReportResultsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#FetchReportResultsRequest. } for resp, err := range c.FetchReportResults(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelReportsClient) GetOperation ¶ added in v1.8.0
func (c *CloudChannelReportsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.GetOperationRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. } resp, err := c.GetOperation(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelReportsClient) ListOperations ¶ added in v1.8.0
func (c *CloudChannelReportsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } it := c.ListOperations(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*longrunningpb.ListOperationsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &longrunningpb.ListOperationsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelReportsClient) ListReports
deprecated
added in
v1.8.0
func (c *CloudChannelReportsClient) ListReports(ctx context.Context, req *channelpb.ListReportsRequest, opts ...gax.CallOption) *ReportIterator
ListReports lists the reports that RunReportJob can run. These reports include an ID, a description, and the list of columns that will be in the result.
Deprecated: Please use Export Channel Services data to BigQuery (at https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
Deprecated: ListReports may be removed in a future version.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" "google.golang.org/api/iterator" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListReportsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListReportsRequest. } it := c.ListReports(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp // If you need to access the underlying RPC response, // you can do so by casting the `Response` as below. // Otherwise, remove this line. Only populated after // first call to Next(). Not safe for concurrent access. _ = it.Response.(*channelpb.ListReportsResponse) } }
Output:
Example (All) ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.ListReportsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#ListReportsRequest. } for resp, err := range c.ListReports(ctx, req).All() { if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*CloudChannelReportsClient) RunReportJob
deprecated
added in
v1.8.0
func (c *CloudChannelReportsClient) RunReportJob(ctx context.Context, req *channelpb.RunReportJobRequest, opts ...gax.CallOption) (*RunReportJobOperation, error)
RunReportJob begins generation of data for a given report. The report identifier is a UID (for example, 613bf59q).
Possible error codes:
PERMISSION_DENIED: The user doesn’t have access to this report. INVALID_ARGUMENT: Required request parameters are missing or invalid. NOT_FOUND: The report identifier was not found. INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.
To get the results of report generation, call CloudChannelReportsService.FetchReportResults with the RunReportJobResponse.report_job.
Deprecated: Please use Export Channel Services data to BigQuery (at https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.
Deprecated: RunReportJob may be removed in a future version.
Example ¶
package main import ( "context" channel "cloud.google.com/go/channel/apiv1" channelpb "cloud.google.com/go/channel/apiv1/channelpb" ) func main() { ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelReportsClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &channelpb.RunReportJobRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/channel/apiv1/channelpb#RunReportJobRequest. } op, err := c.RunReportJob(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*CloudChannelReportsClient) RunReportJobOperation ¶ added in v1.8.0
func (c *CloudChannelReportsClient) RunReportJobOperation(name string) *RunReportJobOperation
RunReportJobOperation returns a new RunReportJobOperation from a given name. The name must be that of a previously created RunReportJobOperation, possibly from a different process.
type 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.
type 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) All ¶ added in v1.18.1
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type CustomerRepricingConfigIterator ¶ added in v1.6.0
type CustomerRepricingConfigIterator 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.CustomerRepricingConfig, nextPageToken string, err error) // contains filtered or unexported fields }
CustomerRepricingConfigIterator manages a stream of *channelpb.CustomerRepricingConfig.
func (*CustomerRepricingConfigIterator) All ¶ added in v1.18.1
func (it *CustomerRepricingConfigIterator) All() iter.Seq2[*channelpb.CustomerRepricingConfig, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*CustomerRepricingConfigIterator) Next ¶ added in v1.6.0
func (it *CustomerRepricingConfigIterator) Next() (*channelpb.CustomerRepricingConfig, 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 (*CustomerRepricingConfigIterator) PageInfo ¶ added in v1.6.0
func (it *CustomerRepricingConfigIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type EntitlementChangeIterator ¶ added in v1.12.0
type EntitlementChangeIterator 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.EntitlementChange, nextPageToken string, err error) // contains filtered or unexported fields }
EntitlementChangeIterator manages a stream of *channelpb.EntitlementChange.
func (*EntitlementChangeIterator) All ¶ added in v1.18.1
func (it *EntitlementChangeIterator) All() iter.Seq2[*channelpb.EntitlementChange, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*EntitlementChangeIterator) Next ¶ added in v1.12.0
func (it *EntitlementChangeIterator) Next() (*channelpb.EntitlementChange, 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 (*EntitlementChangeIterator) PageInfo ¶ added in v1.12.0
func (it *EntitlementChangeIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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) All ¶ added in v1.18.1
func (it *EntitlementIterator) All() iter.Seq2[*channelpb.Entitlement, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type 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) All ¶ added in v1.18.1
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type OperationIterator ¶ added in v1.7.0
type OperationIterator 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 []*longrunningpb.Operation, nextPageToken string, err error) // contains filtered or unexported fields }
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All ¶ added in v1.18.1
func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*OperationIterator) Next ¶ added in v1.7.0
func (it *OperationIterator) Next() (*longrunningpb.Operation, 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 (*OperationIterator) PageInfo ¶ added in v1.7.0
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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) All ¶ added in v1.18.1
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type 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.
type 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) All ¶ added in v1.18.1
func (it *PurchasableOfferIterator) All() iter.Seq2[*channelpb.PurchasableOffer, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type 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) All ¶ added in v1.18.1
func (it *PurchasableSkuIterator) All() iter.Seq2[*channelpb.PurchasableSku, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type ReportIterator ¶ added in v1.8.0
type ReportIterator 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.Report, nextPageToken string, err error) // contains filtered or unexported fields }
ReportIterator manages a stream of *channelpb.Report.
func (*ReportIterator) All ¶ added in v1.18.1
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ReportIterator) Next ¶ added in v1.8.0
func (it *ReportIterator) Next() (*channelpb.Report, 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 (*ReportIterator) PageInfo ¶ added in v1.8.0
func (it *ReportIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type RowIterator ¶ added in v1.8.0
type RowIterator 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.Row, nextPageToken string, err error) // contains filtered or unexported fields }
RowIterator manages a stream of *channelpb.Row.
func (*RowIterator) All ¶ added in v1.18.1
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RowIterator) Next ¶ added in v1.8.0
func (it *RowIterator) Next() (*channelpb.Row, 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 (*RowIterator) PageInfo ¶ added in v1.8.0
func (it *RowIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type RunReportJobOperation ¶ added in v1.8.0
type RunReportJobOperation struct {
// contains filtered or unexported fields
}
RunReportJobOperation manages a long-running operation from RunReportJob.
func (*RunReportJobOperation) Done ¶ added in v1.8.0
func (op *RunReportJobOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RunReportJobOperation) Metadata ¶ added in v1.8.0
func (op *RunReportJobOperation) 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 (*RunReportJobOperation) Name ¶ added in v1.8.0
func (op *RunReportJobOperation) 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 (*RunReportJobOperation) Poll ¶ added in v1.8.0
func (op *RunReportJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*channelpb.RunReportJobResponse, 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 (*RunReportJobOperation) Wait ¶ added in v1.8.0
func (op *RunReportJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*channelpb.RunReportJobResponse, 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.
type SkuGroupIterator ¶ added in v1.16.0
type SkuGroupIterator 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.SkuGroup, nextPageToken string, err error) // contains filtered or unexported fields }
SkuGroupIterator manages a stream of *channelpb.SkuGroup.
func (*SkuGroupIterator) All ¶ added in v1.18.1
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*SkuGroupIterator) Next ¶ added in v1.16.0
func (it *SkuGroupIterator) Next() (*channelpb.SkuGroup, 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 (*SkuGroupIterator) PageInfo ¶ added in v1.16.0
func (it *SkuGroupIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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) All ¶ added in v1.18.1
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type 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.
type 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) All ¶ added in v1.18.1
func (it *StringIterator) All() iter.Seq2[string, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type 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.
type 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.
type 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.
type 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) All ¶ added in v1.18.1
func (it *TransferableOfferIterator) All() iter.Seq2[*channelpb.TransferableOffer, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type 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) All ¶ added in v1.18.1
func (it *TransferableSkuIterator) All() iter.Seq2[*channelpb.TransferableSku, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.