licensing
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package licensing provides access to the Enterprise License Manager API.
For product documentation, see:https://developers.google.com/workspace/admin/licensing/
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.
When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.
Creating a client¶
Usage example:
import "google.golang.org/api/licensing/v1"...ctx := context.Background()licensingService, err := licensing.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
licensingService, err := licensing.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)licensingService, err := licensing.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- Constants
- type Empty
- type LicenseAssignment
- type LicenseAssignmentInsert
- type LicenseAssignmentList
- type LicenseAssignmentsDeleteCall
- func (c *LicenseAssignmentsDeleteCall) Context(ctx context.Context) *LicenseAssignmentsDeleteCall
- func (c *LicenseAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)
- func (c *LicenseAssignmentsDeleteCall) Fields(s ...googleapi.Field) *LicenseAssignmentsDeleteCall
- func (c *LicenseAssignmentsDeleteCall) Header() http.Header
- type LicenseAssignmentsGetCall
- func (c *LicenseAssignmentsGetCall) Context(ctx context.Context) *LicenseAssignmentsGetCall
- func (c *LicenseAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error)
- func (c *LicenseAssignmentsGetCall) Fields(s ...googleapi.Field) *LicenseAssignmentsGetCall
- func (c *LicenseAssignmentsGetCall) Header() http.Header
- func (c *LicenseAssignmentsGetCall) IfNoneMatch(entityTag string) *LicenseAssignmentsGetCall
- type LicenseAssignmentsInsertCall
- func (c *LicenseAssignmentsInsertCall) Context(ctx context.Context) *LicenseAssignmentsInsertCall
- func (c *LicenseAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error)
- func (c *LicenseAssignmentsInsertCall) Fields(s ...googleapi.Field) *LicenseAssignmentsInsertCall
- func (c *LicenseAssignmentsInsertCall) Header() http.Header
- type LicenseAssignmentsListForProductAndSkuCall
- func (c *LicenseAssignmentsListForProductAndSkuCall) Context(ctx context.Context) *LicenseAssignmentsListForProductAndSkuCall
- func (c *LicenseAssignmentsListForProductAndSkuCall) Do(opts ...googleapi.CallOption) (*LicenseAssignmentList, error)
- func (c *LicenseAssignmentsListForProductAndSkuCall) Fields(s ...googleapi.Field) *LicenseAssignmentsListForProductAndSkuCall
- func (c *LicenseAssignmentsListForProductAndSkuCall) Header() http.Header
- func (c *LicenseAssignmentsListForProductAndSkuCall) IfNoneMatch(entityTag string) *LicenseAssignmentsListForProductAndSkuCall
- func (c *LicenseAssignmentsListForProductAndSkuCall) MaxResults(maxResults int64) *LicenseAssignmentsListForProductAndSkuCall
- func (c *LicenseAssignmentsListForProductAndSkuCall) PageToken(pageToken string) *LicenseAssignmentsListForProductAndSkuCall
- func (c *LicenseAssignmentsListForProductAndSkuCall) Pages(ctx context.Context, f func(*LicenseAssignmentList) error) error
- type LicenseAssignmentsListForProductCall
- func (c *LicenseAssignmentsListForProductCall) Context(ctx context.Context) *LicenseAssignmentsListForProductCall
- func (c *LicenseAssignmentsListForProductCall) Do(opts ...googleapi.CallOption) (*LicenseAssignmentList, error)
- func (c *LicenseAssignmentsListForProductCall) Fields(s ...googleapi.Field) *LicenseAssignmentsListForProductCall
- func (c *LicenseAssignmentsListForProductCall) Header() http.Header
- func (c *LicenseAssignmentsListForProductCall) IfNoneMatch(entityTag string) *LicenseAssignmentsListForProductCall
- func (c *LicenseAssignmentsListForProductCall) MaxResults(maxResults int64) *LicenseAssignmentsListForProductCall
- func (c *LicenseAssignmentsListForProductCall) PageToken(pageToken string) *LicenseAssignmentsListForProductCall
- func (c *LicenseAssignmentsListForProductCall) Pages(ctx context.Context, f func(*LicenseAssignmentList) error) error
- type LicenseAssignmentsPatchCall
- func (c *LicenseAssignmentsPatchCall) Context(ctx context.Context) *LicenseAssignmentsPatchCall
- func (c *LicenseAssignmentsPatchCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error)
- func (c *LicenseAssignmentsPatchCall) Fields(s ...googleapi.Field) *LicenseAssignmentsPatchCall
- func (c *LicenseAssignmentsPatchCall) Header() http.Header
- type LicenseAssignmentsService
- func (r *LicenseAssignmentsService) Delete(productId string, skuId string, userId string) *LicenseAssignmentsDeleteCall
- func (r *LicenseAssignmentsService) Get(productId string, skuId string, userId string) *LicenseAssignmentsGetCall
- func (r *LicenseAssignmentsService) Insert(productId string, skuId string, ...) *LicenseAssignmentsInsertCall
- func (r *LicenseAssignmentsService) ListForProduct(productId string, customerId string) *LicenseAssignmentsListForProductCall
- func (r *LicenseAssignmentsService) ListForProductAndSku(productId string, skuId string, customerId string) *LicenseAssignmentsListForProductAndSkuCall
- func (r *LicenseAssignmentsService) Patch(productId string, skuId string, userId string, ...) *LicenseAssignmentsPatchCall
- func (r *LicenseAssignmentsService) Update(productId string, skuId string, userId string, ...) *LicenseAssignmentsUpdateCall
- type LicenseAssignmentsUpdateCall
- func (c *LicenseAssignmentsUpdateCall) Context(ctx context.Context) *LicenseAssignmentsUpdateCall
- func (c *LicenseAssignmentsUpdateCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error)
- func (c *LicenseAssignmentsUpdateCall) Fields(s ...googleapi.Field) *LicenseAssignmentsUpdateCall
- func (c *LicenseAssignmentsUpdateCall) Header() http.Header
- type Service
Constants¶
const (// View and manage Google Workspace licenses for your domainAppsLicensingScope = "https://www.googleapis.com/auth/apps.licensing")OAuth2 scopes used by this API.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeEmpty¶added inv0.36.0
type Empty struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}Empty: A generic empty message that you can re-use to avoid definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
typeLicenseAssignment¶
type LicenseAssignment struct {// Etags: ETag of the resource.Etagsstring `json:"etags,omitempty"`// Kind: Identifies the resource as a LicenseAssignment, which is// `licensing#licenseAssignment`.Kindstring `json:"kind,omitempty"`// ProductId: A product's unique identifier. For more information about// products in this version of the API, see Product and SKU IDs.ProductIdstring `json:"productId,omitempty"`// ProductName: Display Name of the product.ProductNamestring `json:"productName,omitempty"`// SelfLink: Link to this page.SelfLinkstring `json:"selfLink,omitempty"`// SkuId: A product SKU's unique identifier. For more information about// available SKUs in this version of the API, see Products and SKUs.SkuIdstring `json:"skuId,omitempty"`// SkuName: Display Name of the sku of the product.SkuNamestring `json:"skuName,omitempty"`// UserId: The user's current primary email address. If the user's email// address changes, use the new email address in your API requests. Since a// `userId` is subject to change, do not use a `userId` value as a key for// persistent data. This key could break if the current user's email address// changes. If the `userId` is suspended, the license status changes.UserIdstring `json:"userId,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Etags") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Etags") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}LicenseAssignment: Representation of a license assignment.
func (LicenseAssignment)MarshalJSON¶
func (sLicenseAssignment) MarshalJSON() ([]byte,error)
typeLicenseAssignmentInsert¶
type LicenseAssignmentInsert struct {// UserId: Email id of the userUserIdstring `json:"userId,omitempty"`// ForceSendFields is a list of field names (e.g. "UserId") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "UserId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}LicenseAssignmentInsert: Representation of a license assignment.
func (LicenseAssignmentInsert)MarshalJSON¶
func (sLicenseAssignmentInsert) MarshalJSON() ([]byte,error)
typeLicenseAssignmentList¶
type LicenseAssignmentList struct {// Etag: ETag of the resource.Etagstring `json:"etag,omitempty"`// Items: The LicenseAssignments in this page of results.Items []*LicenseAssignment `json:"items,omitempty"`// Kind: Identifies the resource as a collection of LicenseAssignments.Kindstring `json:"kind,omitempty"`// NextPageToken: The token that you must submit in a subsequent request to// retrieve additional license results matching your query parameters. The// `maxResults` query string is related to the `nextPageToken` since// `maxResults` determines how many entries are returned on each next page.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Etag") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}func (LicenseAssignmentList)MarshalJSON¶
func (sLicenseAssignmentList) MarshalJSON() ([]byte,error)
typeLicenseAssignmentsDeleteCall¶
type LicenseAssignmentsDeleteCall struct {// contains filtered or unexported fields}func (*LicenseAssignmentsDeleteCall)Context¶
func (c *LicenseAssignmentsDeleteCall) Context(ctxcontext.Context) *LicenseAssignmentsDeleteCall
Context sets the context to be used in this call's Do method.
func (*LicenseAssignmentsDeleteCall)Do¶
func (c *LicenseAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,error)
Do executes the "licensing.licenseAssignments.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.
func (*LicenseAssignmentsDeleteCall)Fields¶
func (c *LicenseAssignmentsDeleteCall) Fields(s ...googleapi.Field) *LicenseAssignmentsDeleteCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*LicenseAssignmentsDeleteCall)Header¶
func (c *LicenseAssignmentsDeleteCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeLicenseAssignmentsGetCall¶
type LicenseAssignmentsGetCall struct {// contains filtered or unexported fields}func (*LicenseAssignmentsGetCall)Context¶
func (c *LicenseAssignmentsGetCall) Context(ctxcontext.Context) *LicenseAssignmentsGetCall
Context sets the context to be used in this call's Do method.
func (*LicenseAssignmentsGetCall)Do¶
func (c *LicenseAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment,error)
Do executes the "licensing.licenseAssignments.get" call.Any non-2xx status code is an error. Response headers are in either*LicenseAssignment.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*LicenseAssignmentsGetCall)Fields¶
func (c *LicenseAssignmentsGetCall) Fields(s ...googleapi.Field) *LicenseAssignmentsGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*LicenseAssignmentsGetCall)Header¶
func (c *LicenseAssignmentsGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*LicenseAssignmentsGetCall)IfNoneMatch¶
func (c *LicenseAssignmentsGetCall) IfNoneMatch(entityTagstring) *LicenseAssignmentsGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeLicenseAssignmentsInsertCall¶
type LicenseAssignmentsInsertCall struct {// contains filtered or unexported fields}func (*LicenseAssignmentsInsertCall)Context¶
func (c *LicenseAssignmentsInsertCall) Context(ctxcontext.Context) *LicenseAssignmentsInsertCall
Context sets the context to be used in this call's Do method.
func (*LicenseAssignmentsInsertCall)Do¶
func (c *LicenseAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment,error)
Do executes the "licensing.licenseAssignments.insert" call.Any non-2xx status code is an error. Response headers are in either*LicenseAssignment.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*LicenseAssignmentsInsertCall)Fields¶
func (c *LicenseAssignmentsInsertCall) Fields(s ...googleapi.Field) *LicenseAssignmentsInsertCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*LicenseAssignmentsInsertCall)Header¶
func (c *LicenseAssignmentsInsertCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeLicenseAssignmentsListForProductAndSkuCall¶
type LicenseAssignmentsListForProductAndSkuCall struct {// contains filtered or unexported fields}func (*LicenseAssignmentsListForProductAndSkuCall)Context¶
func (c *LicenseAssignmentsListForProductAndSkuCall) Context(ctxcontext.Context) *LicenseAssignmentsListForProductAndSkuCall
Context sets the context to be used in this call's Do method.
func (*LicenseAssignmentsListForProductAndSkuCall)Do¶
func (c *LicenseAssignmentsListForProductAndSkuCall) Do(opts ...googleapi.CallOption) (*LicenseAssignmentList,error)
Do executes the "licensing.licenseAssignments.listForProductAndSku" call.Any non-2xx status code is an error. Response headers are in either*LicenseAssignmentList.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*LicenseAssignmentsListForProductAndSkuCall)Fields¶
func (c *LicenseAssignmentsListForProductAndSkuCall) Fields(s ...googleapi.Field) *LicenseAssignmentsListForProductAndSkuCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*LicenseAssignmentsListForProductAndSkuCall)Header¶
func (c *LicenseAssignmentsListForProductAndSkuCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*LicenseAssignmentsListForProductAndSkuCall)IfNoneMatch¶
func (c *LicenseAssignmentsListForProductAndSkuCall) IfNoneMatch(entityTagstring) *LicenseAssignmentsListForProductAndSkuCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*LicenseAssignmentsListForProductAndSkuCall)MaxResults¶
func (c *LicenseAssignmentsListForProductAndSkuCall) MaxResults(maxResultsint64) *LicenseAssignmentsListForProductAndSkuCall
MaxResults sets the optional parameter "maxResults": The `maxResults` querystring determines how many entries are returned on each page of a largeresponse. This is an optional parameter. The value must be a positivenumber.
func (*LicenseAssignmentsListForProductAndSkuCall)PageToken¶
func (c *LicenseAssignmentsListForProductAndSkuCall) PageToken(pageTokenstring) *LicenseAssignmentsListForProductAndSkuCall
PageToken sets the optional parameter "pageToken": Token to fetch the nextpage of data. The `maxResults` query string is related to the `pageToken`since `maxResults` determines how many entries are returned on each page.This is an optional query string. If not specified, the server returns thefirst page.
func (*LicenseAssignmentsListForProductAndSkuCall)Pages¶
func (c *LicenseAssignmentsListForProductAndSkuCall) Pages(ctxcontext.Context, f func(*LicenseAssignmentList)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeLicenseAssignmentsListForProductCall¶
type LicenseAssignmentsListForProductCall struct {// contains filtered or unexported fields}func (*LicenseAssignmentsListForProductCall)Context¶
func (c *LicenseAssignmentsListForProductCall) Context(ctxcontext.Context) *LicenseAssignmentsListForProductCall
Context sets the context to be used in this call's Do method.
func (*LicenseAssignmentsListForProductCall)Do¶
func (c *LicenseAssignmentsListForProductCall) Do(opts ...googleapi.CallOption) (*LicenseAssignmentList,error)
Do executes the "licensing.licenseAssignments.listForProduct" call.Any non-2xx status code is an error. Response headers are in either*LicenseAssignmentList.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*LicenseAssignmentsListForProductCall)Fields¶
func (c *LicenseAssignmentsListForProductCall) Fields(s ...googleapi.Field) *LicenseAssignmentsListForProductCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*LicenseAssignmentsListForProductCall)Header¶
func (c *LicenseAssignmentsListForProductCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*LicenseAssignmentsListForProductCall)IfNoneMatch¶
func (c *LicenseAssignmentsListForProductCall) IfNoneMatch(entityTagstring) *LicenseAssignmentsListForProductCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
func (*LicenseAssignmentsListForProductCall)MaxResults¶
func (c *LicenseAssignmentsListForProductCall) MaxResults(maxResultsint64) *LicenseAssignmentsListForProductCall
MaxResults sets the optional parameter "maxResults": The `maxResults` querystring determines how many entries are returned on each page of a largeresponse. This is an optional parameter. The value must be a positivenumber.
func (*LicenseAssignmentsListForProductCall)PageToken¶
func (c *LicenseAssignmentsListForProductCall) PageToken(pageTokenstring) *LicenseAssignmentsListForProductCall
PageToken sets the optional parameter "pageToken": Token to fetch the nextpage of data. The `maxResults` query string is related to the `pageToken`since `maxResults` determines how many entries are returned on each page.This is an optional query string. If not specified, the server returns thefirst page.
func (*LicenseAssignmentsListForProductCall)Pages¶
func (c *LicenseAssignmentsListForProductCall) Pages(ctxcontext.Context, f func(*LicenseAssignmentList)error)error
Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.
typeLicenseAssignmentsPatchCall¶
type LicenseAssignmentsPatchCall struct {// contains filtered or unexported fields}func (*LicenseAssignmentsPatchCall)Context¶
func (c *LicenseAssignmentsPatchCall) Context(ctxcontext.Context) *LicenseAssignmentsPatchCall
Context sets the context to be used in this call's Do method.
func (*LicenseAssignmentsPatchCall)Do¶
func (c *LicenseAssignmentsPatchCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment,error)
Do executes the "licensing.licenseAssignments.patch" call.Any non-2xx status code is an error. Response headers are in either*LicenseAssignment.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*LicenseAssignmentsPatchCall)Fields¶
func (c *LicenseAssignmentsPatchCall) Fields(s ...googleapi.Field) *LicenseAssignmentsPatchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*LicenseAssignmentsPatchCall)Header¶
func (c *LicenseAssignmentsPatchCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeLicenseAssignmentsService¶
type LicenseAssignmentsService struct {// contains filtered or unexported fields}funcNewLicenseAssignmentsService¶
func NewLicenseAssignmentsService(s *Service) *LicenseAssignmentsService
func (*LicenseAssignmentsService)Delete¶
func (r *LicenseAssignmentsService) Delete(productIdstring, skuIdstring, userIdstring) *LicenseAssignmentsDeleteCall
Delete: Revoke a license.
- productId: A product's unique identifier. For more information aboutproducts in this version of the API, see Products and SKUs.
- skuId: A product SKU's unique identifier. For more information aboutavailable SKUs in this version of the API, see Products and SKUs.
- userId: The user's current primary email address. If the user's emailaddress changes, use the new email address in your API requests. Since a`userId` is subject to change, do not use a `userId` value as a key forpersistent data. This key could break if the current user's email addresschanges. If the `userId` is suspended, the license status changes.
func (*LicenseAssignmentsService)Get¶
func (r *LicenseAssignmentsService) Get(productIdstring, skuIdstring, userIdstring) *LicenseAssignmentsGetCall
Get: Get a specific user's license by product SKU.
- productId: A product's unique identifier. For more information aboutproducts in this version of the API, see Products and SKUs.
- skuId: A product SKU's unique identifier. For more information aboutavailable SKUs in this version of the API, see Products and SKUs.
- userId: The user's current primary email address. If the user's emailaddress changes, use the new email address in your API requests. Since a`userId` is subject to change, do not use a `userId` value as a key forpersistent data. This key could break if the current user's email addresschanges. If the `userId` is suspended, the license status changes.
func (*LicenseAssignmentsService)Insert¶
func (r *LicenseAssignmentsService) Insert(productIdstring, skuIdstring, licenseassignmentinsert *LicenseAssignmentInsert) *LicenseAssignmentsInsertCall
Insert: Assign a license.
- productId: A product's unique identifier. For more information aboutproducts in this version of the API, see Products and SKUs.
- skuId: A product SKU's unique identifier. For more information aboutavailable SKUs in this version of the API, see Products and SKUs.
func (*LicenseAssignmentsService)ListForProduct¶
func (r *LicenseAssignmentsService) ListForProduct(productIdstring, customerIdstring) *LicenseAssignmentsListForProductCall
ListForProduct: List all users assigned licenses for a specific product SKU.
- customerId: The customer's unique ID as defined in the Admin console, suchas `C00000000`. If the customer is suspended, the server returns an error.
- productId: A product's unique identifier. For more information aboutproducts in this version of the API, see Products and SKUs.
func (*LicenseAssignmentsService)ListForProductAndSku¶
func (r *LicenseAssignmentsService) ListForProductAndSku(productIdstring, skuIdstring, customerIdstring) *LicenseAssignmentsListForProductAndSkuCall
ListForProductAndSku: List all users assigned licenses for a specificproduct SKU.
- customerId: The customer's unique ID as defined in the Admin console, suchas `C00000000`. If the customer is suspended, the server returns an error.
- productId: A product's unique identifier. For more information aboutproducts in this version of the API, see Products and SKUs.
- skuId: A product SKU's unique identifier. For more information aboutavailable SKUs in this version of the API, see Products and SKUs.
func (*LicenseAssignmentsService)Patch¶
func (r *LicenseAssignmentsService) Patch(productIdstring, skuIdstring, userIdstring, licenseassignment *LicenseAssignment) *LicenseAssignmentsPatchCall
Patch: Reassign a user's product SKU with a different SKU in the sameproduct. This method supports patch semantics.
- productId: A product's unique identifier. For more information aboutproducts in this version of the API, see Products and SKUs.
- skuId: A product SKU's unique identifier. For more information aboutavailable SKUs in this version of the API, see Products and SKUs.
- userId: The user's current primary email address. If the user's emailaddress changes, use the new email address in your API requests. Since a`userId` is subject to change, do not use a `userId` value as a key forpersistent data. This key could break if the current user's email addresschanges. If the `userId` is suspended, the license status changes.
func (*LicenseAssignmentsService)Update¶
func (r *LicenseAssignmentsService) Update(productIdstring, skuIdstring, userIdstring, licenseassignment *LicenseAssignment) *LicenseAssignmentsUpdateCall
Update: Reassign a user's product SKU with a different SKU in the sameproduct.
- productId: A product's unique identifier. For more information aboutproducts in this version of the API, see Products and SKUs.
- skuId: A product SKU's unique identifier. For more information aboutavailable SKUs in this version of the API, see Products and SKUs.
- userId: The user's current primary email address. If the user's emailaddress changes, use the new email address in your API requests. Since a`userId` is subject to change, do not use a `userId` value as a key forpersistent data. This key could break if the current user's email addresschanges. If the `userId` is suspended, the license status changes.
typeLicenseAssignmentsUpdateCall¶
type LicenseAssignmentsUpdateCall struct {// contains filtered or unexported fields}func (*LicenseAssignmentsUpdateCall)Context¶
func (c *LicenseAssignmentsUpdateCall) Context(ctxcontext.Context) *LicenseAssignmentsUpdateCall
Context sets the context to be used in this call's Do method.
func (*LicenseAssignmentsUpdateCall)Do¶
func (c *LicenseAssignmentsUpdateCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment,error)
Do executes the "licensing.licenseAssignments.update" call.Any non-2xx status code is an error. Response headers are in either*LicenseAssignment.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*LicenseAssignmentsUpdateCall)Fields¶
func (c *LicenseAssignmentsUpdateCall) Fields(s ...googleapi.Field) *LicenseAssignmentsUpdateCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*LicenseAssignmentsUpdateCall)Header¶
func (c *LicenseAssignmentsUpdateCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentLicenseAssignments *LicenseAssignmentsService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶added inv0.3.0
NewService creates a new Service.