api: google.golang.org/api/licensing/v1 Index | Files

package licensing

import "google.golang.org/api/licensing/v1"

Package licensing provides access to the Enterprise License Manager API.

For product documentation, see: https://developers.google.com/google-apps/licensing/

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 for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use 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 OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
licensingService, err := licensing.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Package Files

licensing-gen.go

Constants

const (
    // View and manage G Suite licenses for your domain
    AppsLicensingScope = "https://www.googleapis.com/auth/apps.licensing"
)

OAuth2 scopes used by this API.

type LicenseAssignment Uses

type LicenseAssignment struct {
    // Etags: ETag of the resource.
    Etags string `json:"etags,omitempty"`

    // Kind: Identifies the resource as a LicenseAssignment.
    Kind string `json:"kind,omitempty"`

    // ProductId: Id of the product.
    ProductId string `json:"productId,omitempty"`

    // ProductName: Display Name of the product.
    ProductName string `json:"productName,omitempty"`

    // SelfLink: Link to this page.
    SelfLink string `json:"selfLink,omitempty"`

    // SkuId: Id of the sku of the product.
    SkuId string `json:"skuId,omitempty"`

    // SkuName: Display Name of the sku of the product.
    SkuName string `json:"skuName,omitempty"`

    // UserId: Email id of the user.
    UserId string `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 values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    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. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

LicenseAssignment: Template for LiscenseAssignment Resource

func (*LicenseAssignment) MarshalJSON Uses

func (s *LicenseAssignment) MarshalJSON() ([]byte, error)

type LicenseAssignmentInsert Uses

type LicenseAssignmentInsert struct {
    // UserId: Email id of the user
    UserId string `json:"userId,omitempty"`

    // ForceSendFields is a list of field names (e.g. "UserId") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    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. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

LicenseAssignmentInsert: Template for LicenseAssignment Insert request

func (*LicenseAssignmentInsert) MarshalJSON Uses

func (s *LicenseAssignmentInsert) MarshalJSON() ([]byte, error)

type LicenseAssignmentList Uses

type LicenseAssignmentList struct {
    // Etag: ETag of the resource.
    Etag string `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.
    Kind string `json:"kind,omitempty"`

    // NextPageToken: The continuation token, used to page through large
    // result sets. Provide this value in a subsequent request to return the
    // next page of results.
    NextPageToken string `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 values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    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. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

LicenseAssignmentList: LicesnseAssignment List for a given product/sku for a customer.

func (*LicenseAssignmentList) MarshalJSON Uses

func (s *LicenseAssignmentList) MarshalJSON() ([]byte, error)

type LicenseAssignmentsDeleteCall Uses

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

func (*LicenseAssignmentsDeleteCall) Context Uses

func (c *LicenseAssignmentsDeleteCall) Context(ctx context.Context) *LicenseAssignmentsDeleteCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LicenseAssignmentsDeleteCall) Do Uses

func (c *LicenseAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) error

Do executes the "licensing.licenseAssignments.delete" call.

func (*LicenseAssignmentsDeleteCall) Fields Uses

func (c *LicenseAssignmentsDeleteCall) Fields(s ...googleapi.Field) *LicenseAssignmentsDeleteCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LicenseAssignmentsDeleteCall) Header Uses

func (c *LicenseAssignmentsDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type LicenseAssignmentsGetCall Uses

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

func (*LicenseAssignmentsGetCall) Context Uses

func (c *LicenseAssignmentsGetCall) Context(ctx context.Context) *LicenseAssignmentsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LicenseAssignmentsGetCall) Do Uses

func (c *LicenseAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error)

Do executes the "licensing.licenseAssignments.get" call. Exactly one of *LicenseAssignment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LicenseAssignment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LicenseAssignmentsGetCall) Fields Uses

func (c *LicenseAssignmentsGetCall) Fields(s ...googleapi.Field) *LicenseAssignmentsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LicenseAssignmentsGetCall) Header Uses

func (c *LicenseAssignmentsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*LicenseAssignmentsGetCall) IfNoneMatch Uses

func (c *LicenseAssignmentsGetCall) IfNoneMatch(entityTag string) *LicenseAssignmentsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type LicenseAssignmentsInsertCall Uses

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

func (*LicenseAssignmentsInsertCall) Context Uses

func (c *LicenseAssignmentsInsertCall) Context(ctx context.Context) *LicenseAssignmentsInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LicenseAssignmentsInsertCall) Do Uses

func (c *LicenseAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error)

Do executes the "licensing.licenseAssignments.insert" call. Exactly one of *LicenseAssignment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LicenseAssignment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LicenseAssignmentsInsertCall) Fields Uses

func (c *LicenseAssignmentsInsertCall) Fields(s ...googleapi.Field) *LicenseAssignmentsInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LicenseAssignmentsInsertCall) Header Uses

func (c *LicenseAssignmentsInsertCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type LicenseAssignmentsListForProductAndSkuCall Uses

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

func (*LicenseAssignmentsListForProductAndSkuCall) Context Uses

func (c *LicenseAssignmentsListForProductAndSkuCall) Context(ctx context.Context) *LicenseAssignmentsListForProductAndSkuCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LicenseAssignmentsListForProductAndSkuCall) Do Uses

func (c *LicenseAssignmentsListForProductAndSkuCall) Do(opts ...googleapi.CallOption) (*LicenseAssignmentList, error)

Do executes the "licensing.licenseAssignments.listForProductAndSku" call. Exactly one of *LicenseAssignmentList or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LicenseAssignmentList.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LicenseAssignmentsListForProductAndSkuCall) Fields Uses

func (c *LicenseAssignmentsListForProductAndSkuCall) Fields(s ...googleapi.Field) *LicenseAssignmentsListForProductAndSkuCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LicenseAssignmentsListForProductAndSkuCall) Header Uses

func (c *LicenseAssignmentsListForProductAndSkuCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*LicenseAssignmentsListForProductAndSkuCall) IfNoneMatch Uses

func (c *LicenseAssignmentsListForProductAndSkuCall) IfNoneMatch(entityTag string) *LicenseAssignmentsListForProductAndSkuCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*LicenseAssignmentsListForProductAndSkuCall) MaxResults Uses

func (c *LicenseAssignmentsListForProductAndSkuCall) MaxResults(maxResults int64) *LicenseAssignmentsListForProductAndSkuCall

MaxResults sets the optional parameter "maxResults": Maximum number of campaigns to return at one time. Must be positive. Default value is 100.

func (*LicenseAssignmentsListForProductAndSkuCall) PageToken Uses

func (c *LicenseAssignmentsListForProductAndSkuCall) PageToken(pageToken string) *LicenseAssignmentsListForProductAndSkuCall

PageToken sets the optional parameter "pageToken": Token to fetch the next page. By default server will return first page

func (*LicenseAssignmentsListForProductAndSkuCall) Pages Uses

func (c *LicenseAssignmentsListForProductAndSkuCall) Pages(ctx context.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.

type LicenseAssignmentsListForProductCall Uses

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

func (*LicenseAssignmentsListForProductCall) Context Uses

func (c *LicenseAssignmentsListForProductCall) Context(ctx context.Context) *LicenseAssignmentsListForProductCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LicenseAssignmentsListForProductCall) Do Uses

func (c *LicenseAssignmentsListForProductCall) Do(opts ...googleapi.CallOption) (*LicenseAssignmentList, error)

Do executes the "licensing.licenseAssignments.listForProduct" call. Exactly one of *LicenseAssignmentList or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LicenseAssignmentList.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LicenseAssignmentsListForProductCall) Fields Uses

func (c *LicenseAssignmentsListForProductCall) Fields(s ...googleapi.Field) *LicenseAssignmentsListForProductCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LicenseAssignmentsListForProductCall) Header Uses

func (c *LicenseAssignmentsListForProductCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*LicenseAssignmentsListForProductCall) IfNoneMatch Uses

func (c *LicenseAssignmentsListForProductCall) IfNoneMatch(entityTag string) *LicenseAssignmentsListForProductCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*LicenseAssignmentsListForProductCall) MaxResults Uses

func (c *LicenseAssignmentsListForProductCall) MaxResults(maxResults int64) *LicenseAssignmentsListForProductCall

MaxResults sets the optional parameter "maxResults": Maximum number of campaigns to return at one time. Must be positive. Default value is 100.

func (*LicenseAssignmentsListForProductCall) PageToken Uses

func (c *LicenseAssignmentsListForProductCall) PageToken(pageToken string) *LicenseAssignmentsListForProductCall

PageToken sets the optional parameter "pageToken": Token to fetch the next page. By default server will return first page

func (*LicenseAssignmentsListForProductCall) Pages Uses

func (c *LicenseAssignmentsListForProductCall) Pages(ctx context.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.

type LicenseAssignmentsPatchCall Uses

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

func (*LicenseAssignmentsPatchCall) Context Uses

func (c *LicenseAssignmentsPatchCall) Context(ctx context.Context) *LicenseAssignmentsPatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LicenseAssignmentsPatchCall) Do Uses

func (c *LicenseAssignmentsPatchCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error)

Do executes the "licensing.licenseAssignments.patch" call. Exactly one of *LicenseAssignment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LicenseAssignment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LicenseAssignmentsPatchCall) Fields Uses

func (c *LicenseAssignmentsPatchCall) Fields(s ...googleapi.Field) *LicenseAssignmentsPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LicenseAssignmentsPatchCall) Header Uses

func (c *LicenseAssignmentsPatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type LicenseAssignmentsService Uses

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

func NewLicenseAssignmentsService Uses

func NewLicenseAssignmentsService(s *Service) *LicenseAssignmentsService

func (*LicenseAssignmentsService) Delete Uses

func (r *LicenseAssignmentsService) Delete(productId string, skuId string, userId string) *LicenseAssignmentsDeleteCall

Delete: Revoke License.

func (*LicenseAssignmentsService) Get Uses

func (r *LicenseAssignmentsService) Get(productId string, skuId string, userId string) *LicenseAssignmentsGetCall

Get: Get license assignment of a particular product and sku for a user

func (*LicenseAssignmentsService) Insert Uses

func (r *LicenseAssignmentsService) Insert(productId string, skuId string, licenseassignmentinsert *LicenseAssignmentInsert) *LicenseAssignmentsInsertCall

Insert: Assign License.

func (*LicenseAssignmentsService) ListForProduct Uses

func (r *LicenseAssignmentsService) ListForProduct(productId string, customerId string) *LicenseAssignmentsListForProductCall

ListForProduct: List license assignments for given product of the customer.

func (*LicenseAssignmentsService) ListForProductAndSku Uses

func (r *LicenseAssignmentsService) ListForProductAndSku(productId string, skuId string, customerId string) *LicenseAssignmentsListForProductAndSkuCall

ListForProductAndSku: List license assignments for given product and sku of the customer.

func (*LicenseAssignmentsService) Patch Uses

func (r *LicenseAssignmentsService) Patch(productId string, skuId string, userId string, licenseassignment *LicenseAssignment) *LicenseAssignmentsPatchCall

Patch: Assign License. This method supports patch semantics.

func (*LicenseAssignmentsService) Update Uses

func (r *LicenseAssignmentsService) Update(productId string, skuId string, userId string, licenseassignment *LicenseAssignment) *LicenseAssignmentsUpdateCall

Update: Assign License.

type LicenseAssignmentsUpdateCall Uses

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

func (*LicenseAssignmentsUpdateCall) Context Uses

func (c *LicenseAssignmentsUpdateCall) Context(ctx context.Context) *LicenseAssignmentsUpdateCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LicenseAssignmentsUpdateCall) Do Uses

func (c *LicenseAssignmentsUpdateCall) Do(opts ...googleapi.CallOption) (*LicenseAssignment, error)

Do executes the "licensing.licenseAssignments.update" call. Exactly one of *LicenseAssignment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *LicenseAssignment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LicenseAssignmentsUpdateCall) Fields Uses

func (c *LicenseAssignmentsUpdateCall) Fields(s ...googleapi.Field) *LicenseAssignmentsUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LicenseAssignmentsUpdateCall) Header Uses

func (c *LicenseAssignmentsUpdateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type Service Uses

type Service struct {
    BasePath  string // API endpoint base URL
    UserAgent string // optional additional User-Agent fragment

    LicenseAssignments *LicenseAssignmentsService
    // contains filtered or unexported fields
}

func New Uses

func New(client *http.Client) (*Service, error)

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.

func NewService Uses

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

Package licensing imports 14 packages (graph). Updated 2019-09-21. Refresh now. Tools for package owners.