All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.licensing.Licensing Maven / Gradle / Ivy

There is a newer version: v1-rev20220430-2.0.0
Show newest version
/*
 * Copyright 2010 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/google/apis-client-generator/
 * (build: 2018-10-08 17:45:39 UTC)
 * on 2019-03-21 at 03:36:06 UTC 
 * Modify at your own risk.
 */

package com.google.api.services.licensing;

/**
 * Service definition for Licensing (v1).
 *
 * 

* Views and manages licenses for your domain. *

* *

* For more information about this service, see the * API Documentation *

* *

* This service uses {@link LicensingRequestInitializer} to initialize global parameters via its * {@link Builder}. *

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Licensing extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { // Note: Leave this static initializer at the top of the file. static { com.google.api.client.util.Preconditions.checkState( com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15, "You are currently running with version %s of google-api-client. " + "You need at least version 1.15 of google-api-client to run version " + "1.23.0 of the Enterprise License Manager API library.", com.google.api.client.googleapis.GoogleUtils.VERSION); } /** * The default encoded root URL of the service. This is determined when the library is generated * and normally should not be changed. * * @since 1.7 */ public static final String DEFAULT_ROOT_URL = "https://www.googleapis.com/"; /** * The default encoded service path of the service. This is determined when the library is * generated and normally should not be changed. * * @since 1.7 */ public static final String DEFAULT_SERVICE_PATH = "apps/licensing/v1/product/"; /** * The default encoded batch path of the service. This is determined when the library is * generated and normally should not be changed. * * @since 1.23 */ public static final String DEFAULT_BATCH_PATH = "batch/licensing/v1"; /** * The default encoded base URL of the service. This is determined when the library is generated * and normally should not be changed. */ public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; /** * Constructor. * *

* Use {@link Builder} if you need to specify any of the optional parameters. *

* * @param transport HTTP transport, which should normally be: *
    *
  • Google App Engine: * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • *
  • Android: {@code newCompatibleTransport} from * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} *
  • *
* @param jsonFactory JSON factory, which may be: *
    *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • *
  • Android Honeycomb or higher: * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • *
* @param httpRequestInitializer HTTP request initializer or {@code null} for none * @since 1.7 */ public Licensing(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { this(new Builder(transport, jsonFactory, httpRequestInitializer)); } /** * @param builder builder */ Licensing(Builder builder) { super(builder); } @Override protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { super.initialize(httpClientRequest); } /** * An accessor for creating requests from the LicenseAssignments collection. * *

The typical use is:

*
   *   {@code Licensing licensing = new Licensing(...);}
   *   {@code Licensing.LicenseAssignments.List request = licensing.licenseAssignments().list(parameters ...)}
   * 
* * @return the resource collection */ public LicenseAssignments licenseAssignments() { return new LicenseAssignments(); } /** * The "licenseAssignments" collection of methods. */ public class LicenseAssignments { /** * Revoke License. * * Create a request for the method "licenseAssignments.delete". * * This request holds the parameters needed by the licensing server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param productId Name for product * @param skuId Name for sku * @param userId email id or unique Id of the user * @return the request */ public Delete delete(java.lang.String productId, java.lang.String skuId, java.lang.String userId) throws java.io.IOException { Delete result = new Delete(productId, skuId, userId); initialize(result); return result; } public class Delete extends LicensingRequest { private static final String REST_PATH = "{productId}/sku/{skuId}/user/{userId}"; /** * Revoke License. * * Create a request for the method "licenseAssignments.delete". * * This request holds the parameters needed by the the licensing server. After setting any * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation. *

{@link * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param productId Name for product * @param skuId Name for sku * @param userId email id or unique Id of the user * @since 1.13 */ protected Delete(java.lang.String productId, java.lang.String skuId, java.lang.String userId) { super(Licensing.this, "DELETE", REST_PATH, null, Void.class); this.productId = com.google.api.client.util.Preconditions.checkNotNull(productId, "Required parameter productId must be specified."); this.skuId = com.google.api.client.util.Preconditions.checkNotNull(skuId, "Required parameter skuId must be specified."); this.userId = com.google.api.client.util.Preconditions.checkNotNull(userId, "Required parameter userId must be specified."); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** Name for product */ @com.google.api.client.util.Key private java.lang.String productId; /** Name for product */ public java.lang.String getProductId() { return productId; } /** Name for product */ public Delete setProductId(java.lang.String productId) { this.productId = productId; return this; } /** Name for sku */ @com.google.api.client.util.Key private java.lang.String skuId; /** Name for sku */ public java.lang.String getSkuId() { return skuId; } /** Name for sku */ public Delete setSkuId(java.lang.String skuId) { this.skuId = skuId; return this; } /** email id or unique Id of the user */ @com.google.api.client.util.Key private java.lang.String userId; /** email id or unique Id of the user */ public java.lang.String getUserId() { return userId; } /** email id or unique Id of the user */ public Delete setUserId(java.lang.String userId) { this.userId = userId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Get license assignment of a particular product and sku for a user * * Create a request for the method "licenseAssignments.get". * * This request holds the parameters needed by the licensing server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param productId Name for product * @param skuId Name for sku * @param userId email id or unique Id of the user * @return the request */ public Get get(java.lang.String productId, java.lang.String skuId, java.lang.String userId) throws java.io.IOException { Get result = new Get(productId, skuId, userId); initialize(result); return result; } public class Get extends LicensingRequest { private static final String REST_PATH = "{productId}/sku/{skuId}/user/{userId}"; /** * Get license assignment of a particular product and sku for a user * * Create a request for the method "licenseAssignments.get". * * This request holds the parameters needed by the the licensing server. After setting any * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} * must be called to initialize this instance immediately after invoking the constructor.

* * @param productId Name for product * @param skuId Name for sku * @param userId email id or unique Id of the user * @since 1.13 */ protected Get(java.lang.String productId, java.lang.String skuId, java.lang.String userId) { super(Licensing.this, "GET", REST_PATH, null, com.google.api.services.licensing.model.LicenseAssignment.class); this.productId = com.google.api.client.util.Preconditions.checkNotNull(productId, "Required parameter productId must be specified."); this.skuId = com.google.api.client.util.Preconditions.checkNotNull(skuId, "Required parameter skuId must be specified."); this.userId = com.google.api.client.util.Preconditions.checkNotNull(userId, "Required parameter userId must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** Name for product */ @com.google.api.client.util.Key private java.lang.String productId; /** Name for product */ public java.lang.String getProductId() { return productId; } /** Name for product */ public Get setProductId(java.lang.String productId) { this.productId = productId; return this; } /** Name for sku */ @com.google.api.client.util.Key private java.lang.String skuId; /** Name for sku */ public java.lang.String getSkuId() { return skuId; } /** Name for sku */ public Get setSkuId(java.lang.String skuId) { this.skuId = skuId; return this; } /** email id or unique Id of the user */ @com.google.api.client.util.Key private java.lang.String userId; /** email id or unique Id of the user */ public java.lang.String getUserId() { return userId; } /** email id or unique Id of the user */ public Get setUserId(java.lang.String userId) { this.userId = userId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Assign License. * * Create a request for the method "licenseAssignments.insert". * * This request holds the parameters needed by the licensing server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param productId Name for product * @param skuId Name for sku * @param content the {@link com.google.api.services.licensing.model.LicenseAssignmentInsert} * @return the request */ public Insert insert(java.lang.String productId, java.lang.String skuId, com.google.api.services.licensing.model.LicenseAssignmentInsert content) throws java.io.IOException { Insert result = new Insert(productId, skuId, content); initialize(result); return result; } public class Insert extends LicensingRequest { private static final String REST_PATH = "{productId}/sku/{skuId}/user"; /** * Assign License. * * Create a request for the method "licenseAssignments.insert". * * This request holds the parameters needed by the the licensing server. After setting any * optional parameters, call the {@link Insert#execute()} method to invoke the remote operation. *

{@link * Insert#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param productId Name for product * @param skuId Name for sku * @param content the {@link com.google.api.services.licensing.model.LicenseAssignmentInsert} * @since 1.13 */ protected Insert(java.lang.String productId, java.lang.String skuId, com.google.api.services.licensing.model.LicenseAssignmentInsert content) { super(Licensing.this, "POST", REST_PATH, content, com.google.api.services.licensing.model.LicenseAssignment.class); this.productId = com.google.api.client.util.Preconditions.checkNotNull(productId, "Required parameter productId must be specified."); this.skuId = com.google.api.client.util.Preconditions.checkNotNull(skuId, "Required parameter skuId must be specified."); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } /** Name for product */ @com.google.api.client.util.Key private java.lang.String productId; /** Name for product */ public java.lang.String getProductId() { return productId; } /** Name for product */ public Insert setProductId(java.lang.String productId) { this.productId = productId; return this; } /** Name for sku */ @com.google.api.client.util.Key private java.lang.String skuId; /** Name for sku */ public java.lang.String getSkuId() { return skuId; } /** Name for sku */ public Insert setSkuId(java.lang.String skuId) { this.skuId = skuId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * List license assignments for given product of the customer. * * Create a request for the method "licenseAssignments.listForProduct". * * This request holds the parameters needed by the licensing server. After setting any optional * parameters, call the {@link ListForProduct#execute()} method to invoke the remote operation. * * @param productId Name for product * @param customerId CustomerId represents the customer for whom licenseassignments are queried * @return the request */ public ListForProduct listForProduct(java.lang.String productId, java.lang.String customerId) throws java.io.IOException { ListForProduct result = new ListForProduct(productId, customerId); initialize(result); return result; } public class ListForProduct extends LicensingRequest { private static final String REST_PATH = "{productId}/users"; /** * List license assignments for given product of the customer. * * Create a request for the method "licenseAssignments.listForProduct". * * This request holds the parameters needed by the the licensing server. After setting any * optional parameters, call the {@link ListForProduct#execute()} method to invoke the remote * operation.

{@link ListForProduct#initialize(com.google.api.client.googleapis.services.Abstr * actGoogleClientRequest)} must be called to initialize this instance immediately after invoking * the constructor.

* * @param productId Name for product * @param customerId CustomerId represents the customer for whom licenseassignments are queried * @since 1.13 */ protected ListForProduct(java.lang.String productId, java.lang.String customerId) { super(Licensing.this, "GET", REST_PATH, null, com.google.api.services.licensing.model.LicenseAssignmentList.class); this.productId = com.google.api.client.util.Preconditions.checkNotNull(productId, "Required parameter productId must be specified."); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public ListForProduct setAlt(java.lang.String alt) { return (ListForProduct) super.setAlt(alt); } @Override public ListForProduct setFields(java.lang.String fields) { return (ListForProduct) super.setFields(fields); } @Override public ListForProduct setKey(java.lang.String key) { return (ListForProduct) super.setKey(key); } @Override public ListForProduct setOauthToken(java.lang.String oauthToken) { return (ListForProduct) super.setOauthToken(oauthToken); } @Override public ListForProduct setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListForProduct) super.setPrettyPrint(prettyPrint); } @Override public ListForProduct setQuotaUser(java.lang.String quotaUser) { return (ListForProduct) super.setQuotaUser(quotaUser); } @Override public ListForProduct setUserIp(java.lang.String userIp) { return (ListForProduct) super.setUserIp(userIp); } /** Name for product */ @com.google.api.client.util.Key private java.lang.String productId; /** Name for product */ public java.lang.String getProductId() { return productId; } /** Name for product */ public ListForProduct setProductId(java.lang.String productId) { this.productId = productId; return this; } /** CustomerId represents the customer for whom licenseassignments are queried */ @com.google.api.client.util.Key private java.lang.String customerId; /** CustomerId represents the customer for whom licenseassignments are queried */ public java.lang.String getCustomerId() { return customerId; } /** CustomerId represents the customer for whom licenseassignments are queried */ public ListForProduct setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** * Maximum number of campaigns to return at one time. Must be positive. Optional. Default * value is 100. */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 100. [default: 100] [minimum: 1] [maximum: 1000] */ public java.lang.Long getMaxResults() { return maxResults; } /** * Maximum number of campaigns to return at one time. Must be positive. Optional. Default * value is 100. */ public ListForProduct setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** Token to fetch the next page.Optional. By default server will return first page */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to fetch the next page.Optional. By default server will return first page */ public java.lang.String getPageToken() { return pageToken; } /** Token to fetch the next page.Optional. By default server will return first page */ public ListForProduct setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public ListForProduct set(String parameterName, Object value) { return (ListForProduct) super.set(parameterName, value); } } /** * List license assignments for given product and sku of the customer. * * Create a request for the method "licenseAssignments.listForProductAndSku". * * This request holds the parameters needed by the licensing server. After setting any optional * parameters, call the {@link ListForProductAndSku#execute()} method to invoke the remote * operation. * * @param productId Name for product * @param skuId Name for sku * @param customerId CustomerId represents the customer for whom licenseassignments are queried * @return the request */ public ListForProductAndSku listForProductAndSku(java.lang.String productId, java.lang.String skuId, java.lang.String customerId) throws java.io.IOException { ListForProductAndSku result = new ListForProductAndSku(productId, skuId, customerId); initialize(result); return result; } public class ListForProductAndSku extends LicensingRequest { private static final String REST_PATH = "{productId}/sku/{skuId}/users"; /** * List license assignments for given product and sku of the customer. * * Create a request for the method "licenseAssignments.listForProductAndSku". * * This request holds the parameters needed by the the licensing server. After setting any * optional parameters, call the {@link ListForProductAndSku#execute()} method to invoke the * remote operation.

{@link ListForProductAndSku#initialize(com.google.api.client.googleapis.s * ervices.AbstractGoogleClientRequest)} must be called to initialize this instance immediately * after invoking the constructor.

* * @param productId Name for product * @param skuId Name for sku * @param customerId CustomerId represents the customer for whom licenseassignments are queried * @since 1.13 */ protected ListForProductAndSku(java.lang.String productId, java.lang.String skuId, java.lang.String customerId) { super(Licensing.this, "GET", REST_PATH, null, com.google.api.services.licensing.model.LicenseAssignmentList.class); this.productId = com.google.api.client.util.Preconditions.checkNotNull(productId, "Required parameter productId must be specified."); this.skuId = com.google.api.client.util.Preconditions.checkNotNull(skuId, "Required parameter skuId must be specified."); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); } @Override public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { return super.executeUsingHead(); } @Override public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { return super.buildHttpRequestUsingHead(); } @Override public ListForProductAndSku setAlt(java.lang.String alt) { return (ListForProductAndSku) super.setAlt(alt); } @Override public ListForProductAndSku setFields(java.lang.String fields) { return (ListForProductAndSku) super.setFields(fields); } @Override public ListForProductAndSku setKey(java.lang.String key) { return (ListForProductAndSku) super.setKey(key); } @Override public ListForProductAndSku setOauthToken(java.lang.String oauthToken) { return (ListForProductAndSku) super.setOauthToken(oauthToken); } @Override public ListForProductAndSku setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListForProductAndSku) super.setPrettyPrint(prettyPrint); } @Override public ListForProductAndSku setQuotaUser(java.lang.String quotaUser) { return (ListForProductAndSku) super.setQuotaUser(quotaUser); } @Override public ListForProductAndSku setUserIp(java.lang.String userIp) { return (ListForProductAndSku) super.setUserIp(userIp); } /** Name for product */ @com.google.api.client.util.Key private java.lang.String productId; /** Name for product */ public java.lang.String getProductId() { return productId; } /** Name for product */ public ListForProductAndSku setProductId(java.lang.String productId) { this.productId = productId; return this; } /** Name for sku */ @com.google.api.client.util.Key private java.lang.String skuId; /** Name for sku */ public java.lang.String getSkuId() { return skuId; } /** Name for sku */ public ListForProductAndSku setSkuId(java.lang.String skuId) { this.skuId = skuId; return this; } /** CustomerId represents the customer for whom licenseassignments are queried */ @com.google.api.client.util.Key private java.lang.String customerId; /** CustomerId represents the customer for whom licenseassignments are queried */ public java.lang.String getCustomerId() { return customerId; } /** CustomerId represents the customer for whom licenseassignments are queried */ public ListForProductAndSku setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** * Maximum number of campaigns to return at one time. Must be positive. Optional. Default * value is 100. */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 100. [default: 100] [minimum: 1] [maximum: 1000] */ public java.lang.Long getMaxResults() { return maxResults; } /** * Maximum number of campaigns to return at one time. Must be positive. Optional. Default * value is 100. */ public ListForProductAndSku setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } /** Token to fetch the next page.Optional. By default server will return first page */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to fetch the next page.Optional. By default server will return first page */ public java.lang.String getPageToken() { return pageToken; } /** Token to fetch the next page.Optional. By default server will return first page */ public ListForProductAndSku setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public ListForProductAndSku set(String parameterName, Object value) { return (ListForProductAndSku) super.set(parameterName, value); } } /** * Assign License. This method supports patch semantics. * * Create a request for the method "licenseAssignments.patch". * * This request holds the parameters needed by the licensing server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param productId Name for product * @param skuId Name for sku for which license would be revoked * @param userId email id or unique Id of the user * @param content the {@link com.google.api.services.licensing.model.LicenseAssignment} * @return the request */ public Patch patch(java.lang.String productId, java.lang.String skuId, java.lang.String userId, com.google.api.services.licensing.model.LicenseAssignment content) throws java.io.IOException { Patch result = new Patch(productId, skuId, userId, content); initialize(result); return result; } public class Patch extends LicensingRequest { private static final String REST_PATH = "{productId}/sku/{skuId}/user/{userId}"; /** * Assign License. This method supports patch semantics. * * Create a request for the method "licenseAssignments.patch". * * This request holds the parameters needed by the the licensing server. After setting any * optional parameters, call the {@link Patch#execute()} method to invoke the remote operation. *

{@link * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param productId Name for product * @param skuId Name for sku for which license would be revoked * @param userId email id or unique Id of the user * @param content the {@link com.google.api.services.licensing.model.LicenseAssignment} * @since 1.13 */ protected Patch(java.lang.String productId, java.lang.String skuId, java.lang.String userId, com.google.api.services.licensing.model.LicenseAssignment content) { super(Licensing.this, "PATCH", REST_PATH, content, com.google.api.services.licensing.model.LicenseAssignment.class); this.productId = com.google.api.client.util.Preconditions.checkNotNull(productId, "Required parameter productId must be specified."); this.skuId = com.google.api.client.util.Preconditions.checkNotNull(skuId, "Required parameter skuId must be specified."); this.userId = com.google.api.client.util.Preconditions.checkNotNull(userId, "Required parameter userId must be specified."); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setFields(java.lang.String fields) { return (Patch) super.setFields(fields); } @Override public Patch setKey(java.lang.String key) { return (Patch) super.setKey(key); } @Override public Patch setOauthToken(java.lang.String oauthToken) { return (Patch) super.setOauthToken(oauthToken); } @Override public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Patch) super.setPrettyPrint(prettyPrint); } @Override public Patch setQuotaUser(java.lang.String quotaUser) { return (Patch) super.setQuotaUser(quotaUser); } @Override public Patch setUserIp(java.lang.String userIp) { return (Patch) super.setUserIp(userIp); } /** Name for product */ @com.google.api.client.util.Key private java.lang.String productId; /** Name for product */ public java.lang.String getProductId() { return productId; } /** Name for product */ public Patch setProductId(java.lang.String productId) { this.productId = productId; return this; } /** Name for sku for which license would be revoked */ @com.google.api.client.util.Key private java.lang.String skuId; /** Name for sku for which license would be revoked */ public java.lang.String getSkuId() { return skuId; } /** Name for sku for which license would be revoked */ public Patch setSkuId(java.lang.String skuId) { this.skuId = skuId; return this; } /** email id or unique Id of the user */ @com.google.api.client.util.Key private java.lang.String userId; /** email id or unique Id of the user */ public java.lang.String getUserId() { return userId; } /** email id or unique Id of the user */ public Patch setUserId(java.lang.String userId) { this.userId = userId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Assign License. * * Create a request for the method "licenseAssignments.update". * * This request holds the parameters needed by the licensing server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param productId Name for product * @param skuId Name for sku for which license would be revoked * @param userId email id or unique Id of the user * @param content the {@link com.google.api.services.licensing.model.LicenseAssignment} * @return the request */ public Update update(java.lang.String productId, java.lang.String skuId, java.lang.String userId, com.google.api.services.licensing.model.LicenseAssignment content) throws java.io.IOException { Update result = new Update(productId, skuId, userId, content); initialize(result); return result; } public class Update extends LicensingRequest { private static final String REST_PATH = "{productId}/sku/{skuId}/user/{userId}"; /** * Assign License. * * Create a request for the method "licenseAssignments.update". * * This request holds the parameters needed by the the licensing server. After setting any * optional parameters, call the {@link Update#execute()} method to invoke the remote operation. *

{@link * Update#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param productId Name for product * @param skuId Name for sku for which license would be revoked * @param userId email id or unique Id of the user * @param content the {@link com.google.api.services.licensing.model.LicenseAssignment} * @since 1.13 */ protected Update(java.lang.String productId, java.lang.String skuId, java.lang.String userId, com.google.api.services.licensing.model.LicenseAssignment content) { super(Licensing.this, "PUT", REST_PATH, content, com.google.api.services.licensing.model.LicenseAssignment.class); this.productId = com.google.api.client.util.Preconditions.checkNotNull(productId, "Required parameter productId must be specified."); this.skuId = com.google.api.client.util.Preconditions.checkNotNull(skuId, "Required parameter skuId must be specified."); this.userId = com.google.api.client.util.Preconditions.checkNotNull(userId, "Required parameter userId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getProductId(), "LicenseAssignment.getProductId()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getSkuId(), "LicenseAssignment.getSkuId()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getUserId(), "LicenseAssignment.getUserId()"); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** Name for product */ @com.google.api.client.util.Key private java.lang.String productId; /** Name for product */ public java.lang.String getProductId() { return productId; } /** Name for product */ public Update setProductId(java.lang.String productId) { this.productId = productId; return this; } /** Name for sku for which license would be revoked */ @com.google.api.client.util.Key private java.lang.String skuId; /** Name for sku for which license would be revoked */ public java.lang.String getSkuId() { return skuId; } /** Name for sku for which license would be revoked */ public Update setSkuId(java.lang.String skuId) { this.skuId = skuId; return this; } /** email id or unique Id of the user */ @com.google.api.client.util.Key private java.lang.String userId; /** email id or unique Id of the user */ public java.lang.String getUserId() { return userId; } /** email id or unique Id of the user */ public Update setUserId(java.lang.String userId) { this.userId = userId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * Builder for {@link Licensing}. * *

* Implementation is not thread-safe. *

* * @since 1.3.0 */ public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { /** * Returns an instance of a new builder. * * @param transport HTTP transport, which should normally be: *
    *
  • Google App Engine: * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • *
  • Android: {@code newCompatibleTransport} from * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} *
  • *
* @param jsonFactory JSON factory, which may be: *
    *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • *
  • Android Honeycomb or higher: * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • *
* @param httpRequestInitializer HTTP request initializer or {@code null} for none * @since 1.7 */ public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { super( transport, jsonFactory, DEFAULT_ROOT_URL, DEFAULT_SERVICE_PATH, httpRequestInitializer, false); setBatchPath(DEFAULT_BATCH_PATH); } /** Builds a new instance of {@link Licensing}. */ @Override public Licensing build() { return new Licensing(this); } @Override public Builder setRootUrl(String rootUrl) { return (Builder) super.setRootUrl(rootUrl); } @Override public Builder setServicePath(String servicePath) { return (Builder) super.setServicePath(servicePath); } @Override public Builder setBatchPath(String batchPath) { return (Builder) super.setBatchPath(batchPath); } @Override public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); } @Override public Builder setApplicationName(String applicationName) { return (Builder) super.setApplicationName(applicationName); } @Override public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); } @Override public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); } @Override public Builder setSuppressAllChecks(boolean suppressAllChecks) { return (Builder) super.setSuppressAllChecks(suppressAllChecks); } /** * Set the {@link LicensingRequestInitializer}. * * @since 1.12 */ public Builder setLicensingRequestInitializer( LicensingRequestInitializer licensingRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(licensingRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy