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

com.google.api.services.directory.Directory Maven / Gradle / Ivy

There is a newer version: directory_v1-rev20240709-2.0.0
Show newest version
/*
 * 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/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.directory;

/**
 * Service definition for Directory (directory_v1).
 *
 * 

* Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain. *

* *

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

* *

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

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Directory 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 >= 32 || (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 && com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1))) || com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION >= 2, "You are currently running with version %s of google-api-client. " + "You need at least version 1.31.1 of google-api-client to run version " + "2.0.0 of the Admin SDK 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://admin.googleapis.com/"; /** * The default encoded mTLS root URL of the service. This is determined when the library is generated * and normally should not be changed. * * @since 1.31 */ public static final String DEFAULT_MTLS_ROOT_URL = "https://admin.mtls.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 = ""; /** * 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"; /** * 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 Directory(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 */ Directory(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 Asps collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Asps.List request = admin.asps().list(parameters ...)}
   * 
* * @return the resource collection */ public Asps asps() { return new Asps(); } /** * The "asps" collection of methods. */ public class Asps { /** * Deletes an ASP issued by a user. * * Create a request for the method "asps.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param codeId The unique ID of the ASP to be deleted. * @return the request */ public Delete delete(java.lang.String userKey, java.lang.Integer codeId) throws java.io.IOException { Delete result = new Delete(userKey, codeId); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/asps/{codeId}"; /** * Deletes an ASP issued by a user. * * Create a request for the method "asps.delete". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param codeId The unique ID of the ASP to be deleted. * @since 1.13 */ protected Delete(java.lang.String userKey, java.lang.Integer codeId) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); this.codeId = com.google.api.client.util.Preconditions.checkNotNull(codeId, "Required parameter codeId must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public Delete setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } /** The unique ID of the ASP to be deleted. */ @com.google.api.client.util.Key private java.lang.Integer codeId; /** The unique ID of the ASP to be deleted. */ public java.lang.Integer getCodeId() { return codeId; } /** The unique ID of the ASP to be deleted. */ public Delete setCodeId(java.lang.Integer codeId) { this.codeId = codeId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets information about an ASP issued by a user. * * Create a request for the method "asps.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param codeId The unique ID of the ASP. * @return the request */ public Get get(java.lang.String userKey, java.lang.Integer codeId) throws java.io.IOException { Get result = new Get(userKey, codeId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/asps/{codeId}"; /** * Gets information about an ASP issued by a user. * * Create a request for the method "asps.get". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param codeId The unique ID of the ASP. * @since 1.13 */ protected Get(java.lang.String userKey, java.lang.Integer codeId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Asp.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); this.codeId = com.google.api.client.util.Preconditions.checkNotNull(codeId, "Required parameter codeId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public Get setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } /** The unique ID of the ASP. */ @com.google.api.client.util.Key private java.lang.Integer codeId; /** The unique ID of the ASP. */ public java.lang.Integer getCodeId() { return codeId; } /** The unique ID of the ASP. */ public Get setCodeId(java.lang.Integer codeId) { this.codeId = codeId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists the ASPs issued by a user. * * Create a request for the method "asps.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public List list(java.lang.String userKey) throws java.io.IOException { List result = new List(userKey); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/asps"; /** * Lists the ASPs issued by a user. * * Create a request for the method "asps.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected List(java.lang.String userKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Asps.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public List setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Channels collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Channels.List request = admin.channels().list(parameters ...)}
   * 
* * @return the resource collection */ public Channels channels() { return new Channels(); } /** * The "channels" collection of methods. */ public class Channels { /** * Stops watching resources through this channel. * * Create a request for the method "channels.stop". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Stop#execute()} method to invoke the remote operation. * * @param content the {@link com.google.api.services.directory.model.Channel} * @return the request */ public Stop stop(com.google.api.services.directory.model.Channel content) throws java.io.IOException { Stop result = new Stop(content); initialize(result); return result; } public class Stop extends DirectoryRequest { private static final String REST_PATH = "admin/directory_v1/channels/stop"; /** * Stops watching resources through this channel. * * Create a request for the method "channels.stop". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Stop#execute()} method to invoke the remote operation.

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

* * @param content the {@link com.google.api.services.directory.model.Channel} * @since 1.13 */ protected Stop(com.google.api.services.directory.model.Channel content) { super(Directory.this, "POST", REST_PATH, content, Void.class); } @Override public Stop set$Xgafv(java.lang.String $Xgafv) { return (Stop) super.set$Xgafv($Xgafv); } @Override public Stop setAccessToken(java.lang.String accessToken) { return (Stop) super.setAccessToken(accessToken); } @Override public Stop setAlt(java.lang.String alt) { return (Stop) super.setAlt(alt); } @Override public Stop setCallback(java.lang.String callback) { return (Stop) super.setCallback(callback); } @Override public Stop setFields(java.lang.String fields) { return (Stop) super.setFields(fields); } @Override public Stop setKey(java.lang.String key) { return (Stop) super.setKey(key); } @Override public Stop setOauthToken(java.lang.String oauthToken) { return (Stop) super.setOauthToken(oauthToken); } @Override public Stop setPrettyPrint(java.lang.Boolean prettyPrint) { return (Stop) super.setPrettyPrint(prettyPrint); } @Override public Stop setQuotaUser(java.lang.String quotaUser) { return (Stop) super.setQuotaUser(quotaUser); } @Override public Stop setUploadType(java.lang.String uploadType) { return (Stop) super.setUploadType(uploadType); } @Override public Stop setUploadProtocol(java.lang.String uploadProtocol) { return (Stop) super.setUploadProtocol(uploadProtocol); } @Override public Stop set(String parameterName, Object value) { return (Stop) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Chromeosdevices collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Chromeosdevices.List request = admin.chromeosdevices().list(parameters ...)}
   * 
* * @return the resource collection */ public Chromeosdevices chromeosdevices() { return new Chromeosdevices(); } /** * The "chromeosdevices" collection of methods. */ public class Chromeosdevices { /** * Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re- * enabling devices. *Warning:* * Deprovisioning a device will stop device policy syncing and remove * device-level printers. After a device is deprovisioned, it must be wiped before it can be re- * enrolled. * Lost or stolen devices should use the disable action. * Re-enabling a disabled device * will consume a device license. If you do not have sufficient licenses available when completing * the re-enable action, you will receive an error. For more information about deprovisioning and * disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633). * * Create a request for the method "chromeosdevices.action". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Action#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param resourceId The unique ID of the device. The `resourceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. * @param content the {@link com.google.api.services.directory.model.ChromeOsDeviceAction} * @return the request */ public Action action(java.lang.String customerId, java.lang.String resourceId, com.google.api.services.directory.model.ChromeOsDeviceAction content) throws java.io.IOException { Action result = new Action(customerId, resourceId, content); initialize(result); return result; } public class Action extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action"; /** * Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and * re-enabling devices. *Warning:* * Deprovisioning a device will stop device policy syncing and * remove device-level printers. After a device is deprovisioned, it must be wiped before it can * be re-enrolled. * Lost or stolen devices should use the disable action. * Re-enabling a * disabled device will consume a device license. If you do not have sufficient licenses available * when completing the re-enable action, you will receive an error. For more information about * deprovisioning and disabling devices, visit the [help * center](https://support.google.com/chrome/a/answer/3523633). * * Create a request for the method "chromeosdevices.action". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Action#execute()} method to invoke the remote operation.

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

* * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param resourceId The unique ID of the device. The `resourceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. * @param content the {@link com.google.api.services.directory.model.ChromeOsDeviceAction} * @since 1.13 */ protected Action(java.lang.String customerId, java.lang.String resourceId, com.google.api.services.directory.model.ChromeOsDeviceAction content) { super(Directory.this, "POST", REST_PATH, content, Void.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.resourceId = com.google.api.client.util.Preconditions.checkNotNull(resourceId, "Required parameter resourceId must be specified."); } @Override public Action set$Xgafv(java.lang.String $Xgafv) { return (Action) super.set$Xgafv($Xgafv); } @Override public Action setAccessToken(java.lang.String accessToken) { return (Action) super.setAccessToken(accessToken); } @Override public Action setAlt(java.lang.String alt) { return (Action) super.setAlt(alt); } @Override public Action setCallback(java.lang.String callback) { return (Action) super.setCallback(callback); } @Override public Action setFields(java.lang.String fields) { return (Action) super.setFields(fields); } @Override public Action setKey(java.lang.String key) { return (Action) super.setKey(key); } @Override public Action setOauthToken(java.lang.String oauthToken) { return (Action) super.setOauthToken(oauthToken); } @Override public Action setPrettyPrint(java.lang.Boolean prettyPrint) { return (Action) super.setPrettyPrint(prettyPrint); } @Override public Action setQuotaUser(java.lang.String quotaUser) { return (Action) super.setQuotaUser(quotaUser); } @Override public Action setUploadType(java.lang.String uploadType) { return (Action) super.setUploadType(uploadType); } @Override public Action setUploadProtocol(java.lang.String uploadProtocol) { return (Action) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Action setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** * The unique ID of the device. The `resourceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. */ @com.google.api.client.util.Key private java.lang.String resourceId; /** The unique ID of the device. The `resourceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. */ public java.lang.String getResourceId() { return resourceId; } /** * The unique ID of the device. The `resourceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. */ public Action setResourceId(java.lang.String resourceId) { this.resourceId = resourceId; return this; } @Override public Action set(String parameterName, Object value) { return (Action) super.set(parameterName, value); } } /** * Retrieves a Chrome OS device's properties. * * Create a request for the method "chromeosdevices.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param deviceId The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. * @return the request */ public Get get(java.lang.String customerId, java.lang.String deviceId) throws java.io.IOException { Get result = new Get(customerId, deviceId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}"; /** * Retrieves a Chrome OS device's properties. * * Create a request for the method "chromeosdevices.get". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param deviceId The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. * @since 1.13 */ protected Get(java.lang.String customerId, java.lang.String deviceId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.ChromeOsDevice.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.deviceId = com.google.api.client.util.Preconditions.checkNotNull(deviceId, "Required parameter deviceId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Get setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** * The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. */ @com.google.api.client.util.Key private java.lang.String deviceId; /** The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. */ public java.lang.String getDeviceId() { return deviceId; } /** * The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method. */ public Get setDeviceId(java.lang.String deviceId) { this.deviceId = deviceId; return this; } /** Determines whether the response contains the full list of properties or only a subset. */ @com.google.api.client.util.Key private java.lang.String projection; /** Determines whether the response contains the full list of properties or only a subset. */ public java.lang.String getProjection() { return projection; } /** Determines whether the response contains the full list of properties or only a subset. */ public Get setProjection(java.lang.String projection) { this.projection = projection; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a paginated list of Chrome OS devices within an account. * * Create a request for the method "chromeosdevices.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @return the request */ public List list(java.lang.String customerId) throws java.io.IOException { List result = new List(customerId); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/chromeos"; /** * Retrieves a paginated list of Chrome OS devices within an account. * * Create a request for the method "chromeosdevices.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @since 1.13 */ protected List(java.lang.String customerId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.ChromeOsDevices.class); 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public List setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** * Return devices from all child orgunits, as well as the specified org unit. If this is set * to true 'orgUnitPath' must be provided. */ @com.google.api.client.util.Key private java.lang.Boolean includeChildOrgunits; /** Return devices from all child orgunits, as well as the specified org unit. If this is set to true 'orgUnitPath' must be provided. */ public java.lang.Boolean getIncludeChildOrgunits() { return includeChildOrgunits; } /** * Return devices from all child orgunits, as well as the specified org unit. If this is set * to true 'orgUnitPath' must be provided. */ public List setIncludeChildOrgunits(java.lang.Boolean includeChildOrgunits) { this.includeChildOrgunits = includeChildOrgunits; return this; } /** Maximum number of results to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. [default: 100] [minimum: 1] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Device property to use for sorting results. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Device property to use for sorting results. */ public java.lang.String getOrderBy() { return orderBy; } /** Device property to use for sorting results. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ @com.google.api.client.util.Key private java.lang.String orgUnitPath; /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public java.lang.String getOrgUnitPath() { return orgUnitPath; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public List setOrgUnitPath(java.lang.String orgUnitPath) { this.orgUnitPath = orgUnitPath; return this; } /** * The `pageToken` query parameter is used to request the next page of query results. The * follow-on request's `pageToken` query parameter is the `nextPageToken` from your previous * response. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The `pageToken` query parameter is used to request the next page of query results. The follow-on request's `pageToken` query parameter is the `nextPageToken` from your previous response. */ public java.lang.String getPageToken() { return pageToken; } /** * The `pageToken` query parameter is used to request the next page of query results. The * follow-on request's `pageToken` query parameter is the `nextPageToken` from your previous * response. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Restrict information returned to a set of selected fields. */ @com.google.api.client.util.Key private java.lang.String projection; /** Restrict information returned to a set of selected fields. */ public java.lang.String getProjection() { return projection; } /** Restrict information returned to a set of selected fields. */ public List setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Search string in the format given at https://developers.google.com/admin-sdk/directory/v1 * /list-query-operators */ @com.google.api.client.util.Key private java.lang.String query; /** Search string in the format given at https://developers.google.com/admin-sdk/directory/v1/list- query-operators */ public java.lang.String getQuery() { return query; } /** * Search string in the format given at https://developers.google.com/admin-sdk/directory/v1 * /list-query-operators */ public List setQuery(java.lang.String query) { this.query = query; return this; } /** * Whether to return results in ascending or descending order. Must be used with the `orderBy` * parameter. */ @com.google.api.client.util.Key private java.lang.String sortOrder; /** Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter. */ public java.lang.String getSortOrder() { return sortOrder; } /** * Whether to return results in ascending or descending order. Must be used with the `orderBy` * parameter. */ public List setSortOrder(java.lang.String sortOrder) { this.sortOrder = sortOrder; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Moves or inserts multiple Chrome OS devices to an organizational unit. You can move up to 50 * devices at once. * * Create a request for the method "chromeosdevices.moveDevicesToOu". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link MoveDevicesToOu#execute()} method to invoke the remote operation. * * @param customerId Immutable ID of the Google Workspace account * @param orgUnitPath Full path of the target organizational unit or its ID * @param content the {@link com.google.api.services.directory.model.ChromeOsMoveDevicesToOu} * @return the request */ public MoveDevicesToOu moveDevicesToOu(java.lang.String customerId, java.lang.String orgUnitPath, com.google.api.services.directory.model.ChromeOsMoveDevicesToOu content) throws java.io.IOException { MoveDevicesToOu result = new MoveDevicesToOu(customerId, orgUnitPath, content); initialize(result); return result; } public class MoveDevicesToOu extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu"; /** * Moves or inserts multiple Chrome OS devices to an organizational unit. You can move up to 50 * devices at once. * * Create a request for the method "chromeosdevices.moveDevicesToOu". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link MoveDevicesToOu#execute()} method to invoke the remote operation. *

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

* * @param customerId Immutable ID of the Google Workspace account * @param orgUnitPath Full path of the target organizational unit or its ID * @param content the {@link com.google.api.services.directory.model.ChromeOsMoveDevicesToOu} * @since 1.13 */ protected MoveDevicesToOu(java.lang.String customerId, java.lang.String orgUnitPath, com.google.api.services.directory.model.ChromeOsMoveDevicesToOu content) { super(Directory.this, "POST", REST_PATH, content, Void.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.orgUnitPath = com.google.api.client.util.Preconditions.checkNotNull(orgUnitPath, "Required parameter orgUnitPath must be specified."); } @Override public MoveDevicesToOu set$Xgafv(java.lang.String $Xgafv) { return (MoveDevicesToOu) super.set$Xgafv($Xgafv); } @Override public MoveDevicesToOu setAccessToken(java.lang.String accessToken) { return (MoveDevicesToOu) super.setAccessToken(accessToken); } @Override public MoveDevicesToOu setAlt(java.lang.String alt) { return (MoveDevicesToOu) super.setAlt(alt); } @Override public MoveDevicesToOu setCallback(java.lang.String callback) { return (MoveDevicesToOu) super.setCallback(callback); } @Override public MoveDevicesToOu setFields(java.lang.String fields) { return (MoveDevicesToOu) super.setFields(fields); } @Override public MoveDevicesToOu setKey(java.lang.String key) { return (MoveDevicesToOu) super.setKey(key); } @Override public MoveDevicesToOu setOauthToken(java.lang.String oauthToken) { return (MoveDevicesToOu) super.setOauthToken(oauthToken); } @Override public MoveDevicesToOu setPrettyPrint(java.lang.Boolean prettyPrint) { return (MoveDevicesToOu) super.setPrettyPrint(prettyPrint); } @Override public MoveDevicesToOu setQuotaUser(java.lang.String quotaUser) { return (MoveDevicesToOu) super.setQuotaUser(quotaUser); } @Override public MoveDevicesToOu setUploadType(java.lang.String uploadType) { return (MoveDevicesToOu) super.setUploadType(uploadType); } @Override public MoveDevicesToOu setUploadProtocol(java.lang.String uploadProtocol) { return (MoveDevicesToOu) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable ID of the Google Workspace account */ public java.lang.String getCustomerId() { return customerId; } /** Immutable ID of the Google Workspace account */ public MoveDevicesToOu setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** Full path of the target organizational unit or its ID */ @com.google.api.client.util.Key private java.lang.String orgUnitPath; /** Full path of the target organizational unit or its ID */ public java.lang.String getOrgUnitPath() { return orgUnitPath; } /** Full path of the target organizational unit or its ID */ public MoveDevicesToOu setOrgUnitPath(java.lang.String orgUnitPath) { this.orgUnitPath = orgUnitPath; return this; } @Override public MoveDevicesToOu set(String parameterName, Object value) { return (MoveDevicesToOu) super.set(parameterName, value); } } /** * Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, * `orgUnitPath`, or `annotatedAssetId`. This method supports [patch semantics](/admin- * sdk/directory/v1/guides/performance#patch). * * Create a request for the method "chromeosdevices.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param deviceId The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. * @param content the {@link com.google.api.services.directory.model.ChromeOsDevice} * @return the request */ public Patch patch(java.lang.String customerId, java.lang.String deviceId, com.google.api.services.directory.model.ChromeOsDevice content) throws java.io.IOException { Patch result = new Patch(customerId, deviceId, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}"; /** * Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, * `orgUnitPath`, or `annotatedAssetId`. This method supports [patch semantics](/admin- * sdk/directory/v1/guides/performance#patch). * * Create a request for the method "chromeosdevices.patch". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param deviceId The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. * @param content the {@link com.google.api.services.directory.model.ChromeOsDevice} * @since 1.13 */ protected Patch(java.lang.String customerId, java.lang.String deviceId, com.google.api.services.directory.model.ChromeOsDevice content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.ChromeOsDevice.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.deviceId = com.google.api.client.util.Preconditions.checkNotNull(deviceId, "Required parameter deviceId must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Patch setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** * The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. */ @com.google.api.client.util.Key private java.lang.String deviceId; /** The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. */ public java.lang.String getDeviceId() { return deviceId; } /** * The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. */ public Patch setDeviceId(java.lang.String deviceId) { this.deviceId = deviceId; return this; } /** Restrict information returned to a set of selected fields. */ @com.google.api.client.util.Key private java.lang.String projection; /** Restrict information returned to a set of selected fields. */ public java.lang.String getProjection() { return projection; } /** Restrict information returned to a set of selected fields. */ public Patch setProjection(java.lang.String projection) { this.projection = projection; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, * `orgUnitPath`, or `annotatedAssetId`. * * Create a request for the method "chromeosdevices.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param deviceId The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. * @param content the {@link com.google.api.services.directory.model.ChromeOsDevice} * @return the request */ public Update update(java.lang.String customerId, java.lang.String deviceId, com.google.api.services.directory.model.ChromeOsDevice content) throws java.io.IOException { Update result = new Update(customerId, deviceId, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}"; /** * Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, * `orgUnitPath`, or `annotatedAssetId`. * * Create a request for the method "chromeosdevices.update". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param deviceId The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. * @param content the {@link com.google.api.services.directory.model.ChromeOsDevice} * @since 1.13 */ protected Update(java.lang.String customerId, java.lang.String deviceId, com.google.api.services.directory.model.ChromeOsDevice content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.ChromeOsDevice.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.deviceId = com.google.api.client.util.Preconditions.checkNotNull(deviceId, "Required parameter deviceId must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Update setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** * The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. */ @com.google.api.client.util.Key private java.lang.String deviceId; /** The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. */ public java.lang.String getDeviceId() { return deviceId; } /** * The unique ID of the device. The `deviceId`s are returned in the response from the * [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method. */ public Update setDeviceId(java.lang.String deviceId) { this.deviceId = deviceId; return this; } /** Restrict information returned to a set of selected fields. */ @com.google.api.client.util.Key private java.lang.String projection; /** Restrict information returned to a set of selected fields. */ public java.lang.String getProjection() { return projection; } /** Restrict information returned to a set of selected fields. */ public Update setProjection(java.lang.String projection) { this.projection = projection; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Customer collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Customer.List request = admin.customer().list(parameters ...)}
   * 
* * @return the resource collection */ public Customer customer() { return new Customer(); } /** * The "customer" collection of methods. */ public class Customer { /** * An accessor for creating requests from the Devices collection. * *

The typical use is:

*
     *   {@code Directory admin = new Directory(...);}
     *   {@code Directory.Devices.List request = admin.devices().list(parameters ...)}
     * 
* * @return the resource collection */ public Devices devices() { return new Devices(); } /** * The "devices" collection of methods. */ public class Devices { /** * An accessor for creating requests from the Chromeos collection. * *

The typical use is:

*
       *   {@code Directory admin = new Directory(...);}
       *   {@code Directory.Chromeos.List request = admin.chromeos().list(parameters ...)}
       * 
* * @return the resource collection */ public Chromeos chromeos() { return new Chromeos(); } /** * The "chromeos" collection of methods. */ public class Chromeos { /** * Issues a command for the device to execute. * * Create a request for the method "chromeos.issueCommand". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link IssueCommand#execute()} method to invoke the remote operation. * * @param customerId Immutable. Immutable ID of the Google Workspace account. * @param deviceId Immutable. Immutable ID of Chrome OS Device. * @param content the {@link com.google.api.services.directory.model.DirectoryChromeosdevicesIssueCommandRequest} * @return the request */ public IssueCommand issueCommand(java.lang.String customerId, java.lang.String deviceId, com.google.api.services.directory.model.DirectoryChromeosdevicesIssueCommandRequest content) throws java.io.IOException { IssueCommand result = new IssueCommand(customerId, deviceId, content); initialize(result); return result; } public class IssueCommand extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand"; /** * Issues a command for the device to execute. * * Create a request for the method "chromeos.issueCommand". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link IssueCommand#execute()} method to invoke the remote operation.

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

* * @param customerId Immutable. Immutable ID of the Google Workspace account. * @param deviceId Immutable. Immutable ID of Chrome OS Device. * @param content the {@link com.google.api.services.directory.model.DirectoryChromeosdevicesIssueCommandRequest} * @since 1.13 */ protected IssueCommand(java.lang.String customerId, java.lang.String deviceId, com.google.api.services.directory.model.DirectoryChromeosdevicesIssueCommandRequest content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.DirectoryChromeosdevicesIssueCommandResponse.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.deviceId = com.google.api.client.util.Preconditions.checkNotNull(deviceId, "Required parameter deviceId must be specified."); } @Override public IssueCommand set$Xgafv(java.lang.String $Xgafv) { return (IssueCommand) super.set$Xgafv($Xgafv); } @Override public IssueCommand setAccessToken(java.lang.String accessToken) { return (IssueCommand) super.setAccessToken(accessToken); } @Override public IssueCommand setAlt(java.lang.String alt) { return (IssueCommand) super.setAlt(alt); } @Override public IssueCommand setCallback(java.lang.String callback) { return (IssueCommand) super.setCallback(callback); } @Override public IssueCommand setFields(java.lang.String fields) { return (IssueCommand) super.setFields(fields); } @Override public IssueCommand setKey(java.lang.String key) { return (IssueCommand) super.setKey(key); } @Override public IssueCommand setOauthToken(java.lang.String oauthToken) { return (IssueCommand) super.setOauthToken(oauthToken); } @Override public IssueCommand setPrettyPrint(java.lang.Boolean prettyPrint) { return (IssueCommand) super.setPrettyPrint(prettyPrint); } @Override public IssueCommand setQuotaUser(java.lang.String quotaUser) { return (IssueCommand) super.setQuotaUser(quotaUser); } @Override public IssueCommand setUploadType(java.lang.String uploadType) { return (IssueCommand) super.setUploadType(uploadType); } @Override public IssueCommand setUploadProtocol(java.lang.String uploadProtocol) { return (IssueCommand) super.setUploadProtocol(uploadProtocol); } /** Immutable. Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable. Immutable ID of the Google Workspace account. */ public java.lang.String getCustomerId() { return customerId; } /** Immutable. Immutable ID of the Google Workspace account. */ public IssueCommand setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** Immutable. Immutable ID of Chrome OS Device. */ @com.google.api.client.util.Key private java.lang.String deviceId; /** Immutable. Immutable ID of Chrome OS Device. */ public java.lang.String getDeviceId() { return deviceId; } /** Immutable. Immutable ID of Chrome OS Device. */ public IssueCommand setDeviceId(java.lang.String deviceId) { this.deviceId = deviceId; return this; } @Override public IssueCommand set(String parameterName, Object value) { return (IssueCommand) super.set(parameterName, value); } } /** * An accessor for creating requests from the Commands collection. * *

The typical use is:

*
         *   {@code Directory admin = new Directory(...);}
         *   {@code Directory.Commands.List request = admin.commands().list(parameters ...)}
         * 
* * @return the resource collection */ public Commands commands() { return new Commands(); } /** * The "commands" collection of methods. */ public class Commands { /** * Gets command data a specific command issued to the device. * * Create a request for the method "commands.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customerId Immutable. Immutable ID of the Google Workspace account. * @param deviceId Immutable. Immutable ID of Chrome OS Device. * @param commandId Immutable. Immutable ID of Chrome OS Device Command. * @return the request */ public Get get(java.lang.String customerId, java.lang.String deviceId, java.lang.Long commandId) throws java.io.IOException { Get result = new Get(customerId, deviceId, commandId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}"; /** * Gets command data a specific command issued to the device. * * Create a request for the method "commands.get". * * This request holds the parameters needed by the the admin 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 customerId Immutable. Immutable ID of the Google Workspace account. * @param deviceId Immutable. Immutable ID of Chrome OS Device. * @param commandId Immutable. Immutable ID of Chrome OS Device Command. * @since 1.13 */ protected Get(java.lang.String customerId, java.lang.String deviceId, java.lang.Long commandId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.DirectoryChromeosdevicesCommand.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.deviceId = com.google.api.client.util.Preconditions.checkNotNull(deviceId, "Required parameter deviceId must be specified."); this.commandId = com.google.api.client.util.Preconditions.checkNotNull(commandId, "Required parameter commandId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Immutable. Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable. Immutable ID of the Google Workspace account. */ public java.lang.String getCustomerId() { return customerId; } /** Immutable. Immutable ID of the Google Workspace account. */ public Get setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** Immutable. Immutable ID of Chrome OS Device. */ @com.google.api.client.util.Key private java.lang.String deviceId; /** Immutable. Immutable ID of Chrome OS Device. */ public java.lang.String getDeviceId() { return deviceId; } /** Immutable. Immutable ID of Chrome OS Device. */ public Get setDeviceId(java.lang.String deviceId) { this.deviceId = deviceId; return this; } /** Immutable. Immutable ID of Chrome OS Device Command. */ @com.google.api.client.util.Key private java.lang.Long commandId; /** Immutable. Immutable ID of Chrome OS Device Command. */ public java.lang.Long getCommandId() { return commandId; } /** Immutable. Immutable ID of Chrome OS Device Command. */ public Get setCommandId(java.lang.Long commandId) { this.commandId = commandId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } } } } } /** * An accessor for creating requests from the Customers collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Customers.List request = admin.customers().list(parameters ...)}
   * 
* * @return the resource collection */ public Customers customers() { return new Customers(); } /** * The "customers" collection of methods. */ public class Customers { /** * Retrieves a customer. * * Create a request for the method "customers.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customerKey Id of the customer to be retrieved * @return the request */ public Get get(java.lang.String customerKey) throws java.io.IOException { Get result = new Get(customerKey); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customers/{customerKey}"; /** * Retrieves a customer. * * Create a request for the method "customers.get". * * This request holds the parameters needed by the the admin 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 customerKey Id of the customer to be retrieved * @since 1.13 */ protected Get(java.lang.String customerKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Customer.class); this.customerKey = com.google.api.client.util.Preconditions.checkNotNull(customerKey, "Required parameter customerKey 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Id of the customer to be retrieved */ @com.google.api.client.util.Key private java.lang.String customerKey; /** Id of the customer to be retrieved */ public java.lang.String getCustomerKey() { return customerKey; } /** Id of the customer to be retrieved */ public Get setCustomerKey(java.lang.String customerKey) { this.customerKey = customerKey; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Patches a customer. * * Create a request for the method "customers.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param customerKey Id of the customer to be updated * @param content the {@link com.google.api.services.directory.model.Customer} * @return the request */ public Patch patch(java.lang.String customerKey, com.google.api.services.directory.model.Customer content) throws java.io.IOException { Patch result = new Patch(customerKey, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customers/{customerKey}"; /** * Patches a customer. * * Create a request for the method "customers.patch". * * This request holds the parameters needed by the the admin 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 customerKey Id of the customer to be updated * @param content the {@link com.google.api.services.directory.model.Customer} * @since 1.13 */ protected Patch(java.lang.String customerKey, com.google.api.services.directory.model.Customer content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.Customer.class); this.customerKey = com.google.api.client.util.Preconditions.checkNotNull(customerKey, "Required parameter customerKey must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** Id of the customer to be updated */ @com.google.api.client.util.Key private java.lang.String customerKey; /** Id of the customer to be updated */ public java.lang.String getCustomerKey() { return customerKey; } /** Id of the customer to be updated */ public Patch setCustomerKey(java.lang.String customerKey) { this.customerKey = customerKey; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a customer. * * Create a request for the method "customers.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param customerKey Id of the customer to be updated * @param content the {@link com.google.api.services.directory.model.Customer} * @return the request */ public Update update(java.lang.String customerKey, com.google.api.services.directory.model.Customer content) throws java.io.IOException { Update result = new Update(customerKey, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customers/{customerKey}"; /** * Updates a customer. * * Create a request for the method "customers.update". * * This request holds the parameters needed by the the admin 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 customerKey Id of the customer to be updated * @param content the {@link com.google.api.services.directory.model.Customer} * @since 1.13 */ protected Update(java.lang.String customerKey, com.google.api.services.directory.model.Customer content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.Customer.class); this.customerKey = com.google.api.client.util.Preconditions.checkNotNull(customerKey, "Required parameter customerKey must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** Id of the customer to be updated */ @com.google.api.client.util.Key private java.lang.String customerKey; /** Id of the customer to be updated */ public java.lang.String getCustomerKey() { return customerKey; } /** Id of the customer to be updated */ public Update setCustomerKey(java.lang.String customerKey) { this.customerKey = customerKey; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } /** * An accessor for creating requests from the Chrome collection. * *

The typical use is:

*
     *   {@code Directory admin = new Directory(...);}
     *   {@code Directory.Chrome.List request = admin.chrome().list(parameters ...)}
     * 
* * @return the resource collection */ public Chrome chrome() { return new Chrome(); } /** * The "chrome" collection of methods. */ public class Chrome { /** * An accessor for creating requests from the Printers collection. * *

The typical use is:

*
       *   {@code Directory admin = new Directory(...);}
       *   {@code Directory.Printers.List request = admin.printers().list(parameters ...)}
       * 
* * @return the resource collection */ public Printers printers() { return new Printers(); } /** * The "printers" collection of methods. */ public class Printers { /** * Creates printers under given Organization Unit. * * Create a request for the method "printers.batchCreatePrinters". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link BatchCreatePrinters#execute()} method to invoke the remote operation. * * @param parent Required. The name of the customer. Format: customers/{customer_id} * @param content the {@link com.google.api.services.directory.model.BatchCreatePrintersRequest} * @return the request */ public BatchCreatePrinters batchCreatePrinters(java.lang.String parent, com.google.api.services.directory.model.BatchCreatePrintersRequest content) throws java.io.IOException { BatchCreatePrinters result = new BatchCreatePrinters(parent, content); initialize(result); return result; } public class BatchCreatePrinters extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/{+parent}/chrome/printers:batchCreatePrinters"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^customers/[^/]+$"); /** * Creates printers under given Organization Unit. * * Create a request for the method "printers.batchCreatePrinters". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link BatchCreatePrinters#execute()} method to invoke the remote * operation.

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

* * @param parent Required. The name of the customer. Format: customers/{customer_id} * @param content the {@link com.google.api.services.directory.model.BatchCreatePrintersRequest} * @since 1.13 */ protected BatchCreatePrinters(java.lang.String parent, com.google.api.services.directory.model.BatchCreatePrintersRequest content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.BatchCreatePrintersResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } } @Override public BatchCreatePrinters set$Xgafv(java.lang.String $Xgafv) { return (BatchCreatePrinters) super.set$Xgafv($Xgafv); } @Override public BatchCreatePrinters setAccessToken(java.lang.String accessToken) { return (BatchCreatePrinters) super.setAccessToken(accessToken); } @Override public BatchCreatePrinters setAlt(java.lang.String alt) { return (BatchCreatePrinters) super.setAlt(alt); } @Override public BatchCreatePrinters setCallback(java.lang.String callback) { return (BatchCreatePrinters) super.setCallback(callback); } @Override public BatchCreatePrinters setFields(java.lang.String fields) { return (BatchCreatePrinters) super.setFields(fields); } @Override public BatchCreatePrinters setKey(java.lang.String key) { return (BatchCreatePrinters) super.setKey(key); } @Override public BatchCreatePrinters setOauthToken(java.lang.String oauthToken) { return (BatchCreatePrinters) super.setOauthToken(oauthToken); } @Override public BatchCreatePrinters setPrettyPrint(java.lang.Boolean prettyPrint) { return (BatchCreatePrinters) super.setPrettyPrint(prettyPrint); } @Override public BatchCreatePrinters setQuotaUser(java.lang.String quotaUser) { return (BatchCreatePrinters) super.setQuotaUser(quotaUser); } @Override public BatchCreatePrinters setUploadType(java.lang.String uploadType) { return (BatchCreatePrinters) super.setUploadType(uploadType); } @Override public BatchCreatePrinters setUploadProtocol(java.lang.String uploadProtocol) { return (BatchCreatePrinters) super.setUploadProtocol(uploadProtocol); } /** Required. The name of the customer. Format: customers/{customer_id} */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The name of the customer. Format: customers/{customer_id} */ public java.lang.String getParent() { return parent; } /** Required. The name of the customer. Format: customers/{customer_id} */ public BatchCreatePrinters setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } this.parent = parent; return this; } @Override public BatchCreatePrinters set(String parameterName, Object value) { return (BatchCreatePrinters) super.set(parameterName, value); } } /** * Deletes printers in batch. * * Create a request for the method "printers.batchDeletePrinters". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link BatchDeletePrinters#execute()} method to invoke the remote operation. * * @param parent Required. The name of the customer. Format: customers/{customer_id} * @param content the {@link com.google.api.services.directory.model.BatchDeletePrintersRequest} * @return the request */ public BatchDeletePrinters batchDeletePrinters(java.lang.String parent, com.google.api.services.directory.model.BatchDeletePrintersRequest content) throws java.io.IOException { BatchDeletePrinters result = new BatchDeletePrinters(parent, content); initialize(result); return result; } public class BatchDeletePrinters extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/{+parent}/chrome/printers:batchDeletePrinters"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^customers/[^/]+$"); /** * Deletes printers in batch. * * Create a request for the method "printers.batchDeletePrinters". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link BatchDeletePrinters#execute()} method to invoke the remote * operation.

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

* * @param parent Required. The name of the customer. Format: customers/{customer_id} * @param content the {@link com.google.api.services.directory.model.BatchDeletePrintersRequest} * @since 1.13 */ protected BatchDeletePrinters(java.lang.String parent, com.google.api.services.directory.model.BatchDeletePrintersRequest content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.BatchDeletePrintersResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } } @Override public BatchDeletePrinters set$Xgafv(java.lang.String $Xgafv) { return (BatchDeletePrinters) super.set$Xgafv($Xgafv); } @Override public BatchDeletePrinters setAccessToken(java.lang.String accessToken) { return (BatchDeletePrinters) super.setAccessToken(accessToken); } @Override public BatchDeletePrinters setAlt(java.lang.String alt) { return (BatchDeletePrinters) super.setAlt(alt); } @Override public BatchDeletePrinters setCallback(java.lang.String callback) { return (BatchDeletePrinters) super.setCallback(callback); } @Override public BatchDeletePrinters setFields(java.lang.String fields) { return (BatchDeletePrinters) super.setFields(fields); } @Override public BatchDeletePrinters setKey(java.lang.String key) { return (BatchDeletePrinters) super.setKey(key); } @Override public BatchDeletePrinters setOauthToken(java.lang.String oauthToken) { return (BatchDeletePrinters) super.setOauthToken(oauthToken); } @Override public BatchDeletePrinters setPrettyPrint(java.lang.Boolean prettyPrint) { return (BatchDeletePrinters) super.setPrettyPrint(prettyPrint); } @Override public BatchDeletePrinters setQuotaUser(java.lang.String quotaUser) { return (BatchDeletePrinters) super.setQuotaUser(quotaUser); } @Override public BatchDeletePrinters setUploadType(java.lang.String uploadType) { return (BatchDeletePrinters) super.setUploadType(uploadType); } @Override public BatchDeletePrinters setUploadProtocol(java.lang.String uploadProtocol) { return (BatchDeletePrinters) super.setUploadProtocol(uploadProtocol); } /** Required. The name of the customer. Format: customers/{customer_id} */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The name of the customer. Format: customers/{customer_id} */ public java.lang.String getParent() { return parent; } /** Required. The name of the customer. Format: customers/{customer_id} */ public BatchDeletePrinters setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } this.parent = parent; return this; } @Override public BatchDeletePrinters set(String parameterName, Object value) { return (BatchDeletePrinters) super.set(parameterName, value); } } /** * Creates a printer under given Organization Unit. * * Create a request for the method "printers.create". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param parent Required. The name of the customer. Format: customers/{customer_id} * @param content the {@link com.google.api.services.directory.model.Printer} * @return the request */ public Create create(java.lang.String parent, com.google.api.services.directory.model.Printer content) throws java.io.IOException { Create result = new Create(parent, content); initialize(result); return result; } public class Create extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/{+parent}/chrome/printers"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^customers/[^/]+$"); /** * Creates a printer under given Organization Unit. * * Create a request for the method "printers.create". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation.

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

* * @param parent Required. The name of the customer. Format: customers/{customer_id} * @param content the {@link com.google.api.services.directory.model.Printer} * @since 1.13 */ protected Create(java.lang.String parent, com.google.api.services.directory.model.Printer content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Printer.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } } @Override public Create set$Xgafv(java.lang.String $Xgafv) { return (Create) super.set$Xgafv($Xgafv); } @Override public Create setAccessToken(java.lang.String accessToken) { return (Create) super.setAccessToken(accessToken); } @Override public Create setAlt(java.lang.String alt) { return (Create) super.setAlt(alt); } @Override public Create setCallback(java.lang.String callback) { return (Create) super.setCallback(callback); } @Override public Create setFields(java.lang.String fields) { return (Create) super.setFields(fields); } @Override public Create setKey(java.lang.String key) { return (Create) super.setKey(key); } @Override public Create setOauthToken(java.lang.String oauthToken) { return (Create) super.setOauthToken(oauthToken); } @Override public Create setPrettyPrint(java.lang.Boolean prettyPrint) { return (Create) super.setPrettyPrint(prettyPrint); } @Override public Create setQuotaUser(java.lang.String quotaUser) { return (Create) super.setQuotaUser(quotaUser); } @Override public Create setUploadType(java.lang.String uploadType) { return (Create) super.setUploadType(uploadType); } @Override public Create setUploadProtocol(java.lang.String uploadProtocol) { return (Create) super.setUploadProtocol(uploadProtocol); } /** Required. The name of the customer. Format: customers/{customer_id} */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The name of the customer. Format: customers/{customer_id} */ public java.lang.String getParent() { return parent; } /** Required. The name of the customer. Format: customers/{customer_id} */ public Create setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } this.parent = parent; return this; } @Override public Create set(String parameterName, Object value) { return (Create) super.set(parameterName, value); } } /** * Deletes a `Printer`. * * Create a request for the method "printers.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param name Required. The name of the printer to be updated. Format: * customers/{customer_id}/chrome/printers/{printer_id} * @return the request */ public Delete delete(java.lang.String name) throws java.io.IOException { Delete result = new Delete(name); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^customers/[^/]+/chrome/printers/[^/]+$"); /** * Deletes a `Printer`. * * Create a request for the method "printers.delete". * * This request holds the parameters needed by the the admin 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 name Required. The name of the printer to be updated. Format: * customers/{customer_id}/chrome/printers/{printer_id} * @since 1.13 */ protected Delete(java.lang.String name) { super(Directory.this, "DELETE", REST_PATH, null, com.google.api.services.directory.model.Empty.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^customers/[^/]+/chrome/printers/[^/]+$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Required. The name of the printer to be updated. Format: * customers/{customer_id}/chrome/printers/{printer_id} */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The name of the printer to be updated. Format: customers/{customer_id}/chrome/printers/{printer_id} */ public java.lang.String getName() { return name; } /** * Required. The name of the printer to be updated. Format: * customers/{customer_id}/chrome/printers/{printer_id} */ public Delete setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^customers/[^/]+/chrome/printers/[^/]+$"); } this.name = name; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Returns a `Printer` resource (printer's config). * * Create a request for the method "printers.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param name Required. The name of the printer to retrieve. Format: * customers/{customer_id}/chrome/printers/{printer_id} * @return the request */ public Get get(java.lang.String name) throws java.io.IOException { Get result = new Get(name); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^customers/[^/]+/chrome/printers/[^/]+$"); /** * Returns a `Printer` resource (printer's config). * * Create a request for the method "printers.get". * * This request holds the parameters needed by the the admin 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 name Required. The name of the printer to retrieve. Format: * customers/{customer_id}/chrome/printers/{printer_id} * @since 1.13 */ protected Get(java.lang.String name) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Printer.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^customers/[^/]+/chrome/printers/[^/]+$"); } } @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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Required. The name of the printer to retrieve. Format: * customers/{customer_id}/chrome/printers/{printer_id} */ @com.google.api.client.util.Key private java.lang.String name; /** Required. The name of the printer to retrieve. Format: customers/{customer_id}/chrome/printers/{printer_id} */ public java.lang.String getName() { return name; } /** * Required. The name of the printer to retrieve. Format: * customers/{customer_id}/chrome/printers/{printer_id} */ public Get setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^customers/[^/]+/chrome/printers/[^/]+$"); } this.name = name; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * List printers configs. * * Create a request for the method "printers.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param parent Required. The name of the customer who owns this collection of printers. Format: * customers/{customer_id} * @return the request */ public List list(java.lang.String parent) throws java.io.IOException { List result = new List(parent); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/{+parent}/chrome/printers"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^customers/[^/]+$"); /** * List printers configs. * * Create a request for the method "printers.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param parent Required. The name of the customer who owns this collection of printers. Format: * customers/{customer_id} * @since 1.13 */ protected List(java.lang.String parent) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.ListPrintersResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } } @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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Required. The name of the customer who owns this collection of printers. Format: * customers/{customer_id} */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id} */ public java.lang.String getParent() { return parent; } /** * Required. The name of the customer who owns this collection of printers. Format: * customers/{customer_id} */ public List setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } this.parent = parent; return this; } /** * Search query. Search syntax is shared between this api and Admin Console printers * pages. */ @com.google.api.client.util.Key private java.lang.String filter; /** Search query. Search syntax is shared between this api and Admin Console printers pages. */ public java.lang.String getFilter() { return filter; } /** * Search query. Search syntax is shared between this api and Admin Console printers * pages. */ public List setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The order to sort results by. Must be one of display_name, description, make_and_model, * or create_time. Default order is ascending, but descending order can be returned by * appending "desc" to the order_by field. For instance, "description desc" will return * the printers sorted by description in descending order. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** The order to sort results by. Must be one of display_name, description, make_and_model, or create_time. Default order is ascending, but descending order can be returned by appending "desc" to the order_by field. For instance, "description desc" will return the printers sorted by description in descending order. */ public java.lang.String getOrderBy() { return orderBy; } /** * The order to sort results by. Must be one of display_name, description, make_and_model, * or create_time. Default order is ascending, but descending order can be returned by * appending "desc" to the order_by field. For instance, "description desc" will return * the printers sorted by description in descending order. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** * Organization Unit that we want to list the printers for. When org_unit is not present * in the request then all printers of the customer are returned (or filtered). When * org_unit is present in the request then only printers available to this OU will be * returned (owned or inherited). You may see if printer is owned or inherited for this OU * by looking at Printer.org_unit_id. */ @com.google.api.client.util.Key private java.lang.String orgUnitId; /** Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id. */ public java.lang.String getOrgUnitId() { return orgUnitId; } /** * Organization Unit that we want to list the printers for. When org_unit is not present * in the request then all printers of the customer are returned (or filtered). When * org_unit is present in the request then only printers available to this OU will be * returned (owned or inherited). You may see if printer is owned or inherited for this OU * by looking at Printer.org_unit_id. */ public List setOrgUnitId(java.lang.String orgUnitId) { this.orgUnitId = orgUnitId; return this; } /** * The maximum number of objects to return. The service may return fewer than this value. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of objects to return. The service may return fewer than this value. */ public java.lang.Integer getPageSize() { return pageSize; } /** * The maximum number of objects to return. The service may return fewer than this value. */ public List setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** A page token, received from a previous call. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A page token, received from a previous call. */ public java.lang.String getPageToken() { return pageToken; } /** A page token, received from a previous call. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the supported printer models. * * Create a request for the method "printers.listPrinterModels". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link ListPrinterModels#execute()} method to invoke the remote operation. * * @param parent Required. The name of the customer who owns this collection of printers. Format: * customers/{customer_id} * @return the request */ public ListPrinterModels listPrinterModels(java.lang.String parent) throws java.io.IOException { ListPrinterModels result = new ListPrinterModels(parent); initialize(result); return result; } public class ListPrinterModels extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/{+parent}/chrome/printers:listPrinterModels"; private final java.util.regex.Pattern PARENT_PATTERN = java.util.regex.Pattern.compile("^customers/[^/]+$"); /** * Lists the supported printer models. * * Create a request for the method "printers.listPrinterModels". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link ListPrinterModels#execute()} method to invoke the remote operation. *

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

* * @param parent Required. The name of the customer who owns this collection of printers. Format: * customers/{customer_id} * @since 1.13 */ protected ListPrinterModels(java.lang.String parent) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.ListPrinterModelsResponse.class); this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } } @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 ListPrinterModels set$Xgafv(java.lang.String $Xgafv) { return (ListPrinterModels) super.set$Xgafv($Xgafv); } @Override public ListPrinterModels setAccessToken(java.lang.String accessToken) { return (ListPrinterModels) super.setAccessToken(accessToken); } @Override public ListPrinterModels setAlt(java.lang.String alt) { return (ListPrinterModels) super.setAlt(alt); } @Override public ListPrinterModels setCallback(java.lang.String callback) { return (ListPrinterModels) super.setCallback(callback); } @Override public ListPrinterModels setFields(java.lang.String fields) { return (ListPrinterModels) super.setFields(fields); } @Override public ListPrinterModels setKey(java.lang.String key) { return (ListPrinterModels) super.setKey(key); } @Override public ListPrinterModels setOauthToken(java.lang.String oauthToken) { return (ListPrinterModels) super.setOauthToken(oauthToken); } @Override public ListPrinterModels setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListPrinterModels) super.setPrettyPrint(prettyPrint); } @Override public ListPrinterModels setQuotaUser(java.lang.String quotaUser) { return (ListPrinterModels) super.setQuotaUser(quotaUser); } @Override public ListPrinterModels setUploadType(java.lang.String uploadType) { return (ListPrinterModels) super.setUploadType(uploadType); } @Override public ListPrinterModels setUploadProtocol(java.lang.String uploadProtocol) { return (ListPrinterModels) super.setUploadProtocol(uploadProtocol); } /** * Required. The name of the customer who owns this collection of printers. Format: * customers/{customer_id} */ @com.google.api.client.util.Key private java.lang.String parent; /** Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id} */ public java.lang.String getParent() { return parent; } /** * Required. The name of the customer who owns this collection of printers. Format: * customers/{customer_id} */ public ListPrinterModels setParent(java.lang.String parent) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), "Parameter parent must conform to the pattern " + "^customers/[^/]+$"); } this.parent = parent; return this; } /** * Filer to list only models by a given manufacturer in format: "manufacturer:Brother". * Search syntax is shared between this api and Admin Console printers pages. */ @com.google.api.client.util.Key private java.lang.String filter; /** Filer to list only models by a given manufacturer in format: "manufacturer:Brother". Search syntax is shared between this api and Admin Console printers pages. */ public java.lang.String getFilter() { return filter; } /** * Filer to list only models by a given manufacturer in format: "manufacturer:Brother". * Search syntax is shared between this api and Admin Console printers pages. */ public ListPrinterModels setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * The maximum number of objects to return. The service may return fewer than this value. */ @com.google.api.client.util.Key private java.lang.Integer pageSize; /** The maximum number of objects to return. The service may return fewer than this value. */ public java.lang.Integer getPageSize() { return pageSize; } /** * The maximum number of objects to return. The service may return fewer than this value. */ public ListPrinterModels setPageSize(java.lang.Integer pageSize) { this.pageSize = pageSize; return this; } /** A page token, received from a previous call. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** A page token, received from a previous call. */ public java.lang.String getPageToken() { return pageToken; } /** A page token, received from a previous call. */ public ListPrinterModels setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public ListPrinterModels set(String parameterName, Object value) { return (ListPrinterModels) super.set(parameterName, value); } } /** * Updates a `Printer` resource. * * Create a request for the method "printers.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param name The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} * (During printer creation leave empty) * @param content the {@link com.google.api.services.directory.model.Printer} * @return the request */ public Patch patch(java.lang.String name, com.google.api.services.directory.model.Printer content) throws java.io.IOException { Patch result = new Patch(name, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/{+name}"; private final java.util.regex.Pattern NAME_PATTERN = java.util.regex.Pattern.compile("^customers/[^/]+/chrome/printers/[^/]+$"); /** * Updates a `Printer` resource. * * Create a request for the method "printers.patch". * * This request holds the parameters needed by the the admin 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 name The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} * (During printer creation leave empty) * @param content the {@link com.google.api.services.directory.model.Printer} * @since 1.13 */ protected Patch(java.lang.String name, com.google.api.services.directory.model.Printer content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.Printer.class); this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^customers/[^/]+/chrome/printers/[^/]+$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * The resource name of the Printer object, in the format customers/{customer-id}/printers * /{printer-id} (During printer creation leave empty) */ @com.google.api.client.util.Key private java.lang.String name; /** The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer- id} (During printer creation leave empty) */ public java.lang.String getName() { return name; } /** * The resource name of the Printer object, in the format customers/{customer-id}/printers * /{printer-id} (During printer creation leave empty) */ public Patch setName(java.lang.String name) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), "Parameter name must conform to the pattern " + "^customers/[^/]+/chrome/printers/[^/]+$"); } this.name = name; return this; } /** * The list of fields to be cleared. Note, some of the fields are read only and cannot be * updated. Values for not specified fields will be patched. */ @com.google.api.client.util.Key private String clearMask; /** The list of fields to be cleared. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched. */ public String getClearMask() { return clearMask; } /** * The list of fields to be cleared. Note, some of the fields are read only and cannot be * updated. Values for not specified fields will be patched. */ public Patch setClearMask(String clearMask) { this.clearMask = clearMask; return this; } /** * The list of fields to be updated. Note, some of the fields are read only and cannot be * updated. Values for not specified fields will be patched. */ @com.google.api.client.util.Key private String updateMask; /** The list of fields to be updated. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched. */ public String getUpdateMask() { return updateMask; } /** * The list of fields to be updated. Note, some of the fields are read only and cannot be * updated. Values for not specified fields will be patched. */ public Patch setUpdateMask(String updateMask) { this.updateMask = updateMask; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } } } } /** * An accessor for creating requests from the DomainAliases collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.DomainAliases.List request = admin.domainAliases().list(parameters ...)}
   * 
* * @return the resource collection */ public DomainAliases domainAliases() { return new DomainAliases(); } /** * The "domainAliases" collection of methods. */ public class DomainAliases { /** * Deletes a domain Alias of the customer. * * Create a request for the method "domainAliases.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param domainAliasName Name of domain alias to be retrieved. * @return the request */ public Delete delete(java.lang.String customer, java.lang.String domainAliasName) throws java.io.IOException { Delete result = new Delete(customer, domainAliasName); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}"; /** * Deletes a domain Alias of the customer. * * Create a request for the method "domainAliases.delete". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param domainAliasName Name of domain alias to be retrieved. * @since 1.13 */ protected Delete(java.lang.String customer, java.lang.String domainAliasName) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.domainAliasName = com.google.api.client.util.Preconditions.checkNotNull(domainAliasName, "Required parameter domainAliasName must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Delete setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Name of domain alias to be retrieved. */ @com.google.api.client.util.Key private java.lang.String domainAliasName; /** Name of domain alias to be retrieved. */ public java.lang.String getDomainAliasName() { return domainAliasName; } /** Name of domain alias to be retrieved. */ public Delete setDomainAliasName(java.lang.String domainAliasName) { this.domainAliasName = domainAliasName; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a domain alias of the customer. * * Create a request for the method "domainAliases.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param domainAliasName Name of domain alias to be retrieved. * @return the request */ public Get get(java.lang.String customer, java.lang.String domainAliasName) throws java.io.IOException { Get result = new Get(customer, domainAliasName); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}"; /** * Retrieves a domain alias of the customer. * * Create a request for the method "domainAliases.get". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param domainAliasName Name of domain alias to be retrieved. * @since 1.13 */ protected Get(java.lang.String customer, java.lang.String domainAliasName) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.DomainAlias.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.domainAliasName = com.google.api.client.util.Preconditions.checkNotNull(domainAliasName, "Required parameter domainAliasName 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Get setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Name of domain alias to be retrieved. */ @com.google.api.client.util.Key private java.lang.String domainAliasName; /** Name of domain alias to be retrieved. */ public java.lang.String getDomainAliasName() { return domainAliasName; } /** Name of domain alias to be retrieved. */ public Get setDomainAliasName(java.lang.String domainAliasName) { this.domainAliasName = domainAliasName; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Inserts a domain alias of the customer. * * Create a request for the method "domainAliases.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.DomainAlias} * @return the request */ public Insert insert(java.lang.String customer, com.google.api.services.directory.model.DomainAlias content) throws java.io.IOException { Insert result = new Insert(customer, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/domainaliases"; /** * Inserts a domain alias of the customer. * * Create a request for the method "domainAliases.insert". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.DomainAlias} * @since 1.13 */ protected Insert(java.lang.String customer, com.google.api.services.directory.model.DomainAlias content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.DomainAlias.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Insert setCustomer(java.lang.String customer) { this.customer = customer; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the domain aliases of the customer. * * Create a request for the method "domainAliases.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @return the request */ public List list(java.lang.String customer) throws java.io.IOException { List result = new List(customer); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/domainaliases"; /** * Lists the domain aliases of the customer. * * Create a request for the method "domainAliases.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customer Immutable ID of the Google Workspace account. * @since 1.13 */ protected List(java.lang.String customer) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.DomainAliases.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Name of the parent domain for which domain aliases are to be fetched. */ @com.google.api.client.util.Key private java.lang.String parentDomainName; /** Name of the parent domain for which domain aliases are to be fetched. */ public java.lang.String getParentDomainName() { return parentDomainName; } /** Name of the parent domain for which domain aliases are to be fetched. */ public List setParentDomainName(java.lang.String parentDomainName) { this.parentDomainName = parentDomainName; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Domains collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Domains.List request = admin.domains().list(parameters ...)}
   * 
* * @return the resource collection */ public Domains domains() { return new Domains(); } /** * The "domains" collection of methods. */ public class Domains { /** * Deletes a domain of the customer. * * Create a request for the method "domains.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param domainName Name of domain to be deleted * @return the request */ public Delete delete(java.lang.String customer, java.lang.String domainName) throws java.io.IOException { Delete result = new Delete(customer, domainName); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/domains/{domainName}"; /** * Deletes a domain of the customer. * * Create a request for the method "domains.delete". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param domainName Name of domain to be deleted * @since 1.13 */ protected Delete(java.lang.String customer, java.lang.String domainName) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.domainName = com.google.api.client.util.Preconditions.checkNotNull(domainName, "Required parameter domainName must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Delete setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Name of domain to be deleted */ @com.google.api.client.util.Key private java.lang.String domainName; /** Name of domain to be deleted */ public java.lang.String getDomainName() { return domainName; } /** Name of domain to be deleted */ public Delete setDomainName(java.lang.String domainName) { this.domainName = domainName; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a domain of the customer. * * Create a request for the method "domains.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param domainName Name of domain to be retrieved * @return the request */ public Get get(java.lang.String customer, java.lang.String domainName) throws java.io.IOException { Get result = new Get(customer, domainName); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/domains/{domainName}"; /** * Retrieves a domain of the customer. * * Create a request for the method "domains.get". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param domainName Name of domain to be retrieved * @since 1.13 */ protected Get(java.lang.String customer, java.lang.String domainName) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Domains.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.domainName = com.google.api.client.util.Preconditions.checkNotNull(domainName, "Required parameter domainName 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Get setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Name of domain to be retrieved */ @com.google.api.client.util.Key private java.lang.String domainName; /** Name of domain to be retrieved */ public java.lang.String getDomainName() { return domainName; } /** Name of domain to be retrieved */ public Get setDomainName(java.lang.String domainName) { this.domainName = domainName; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Inserts a domain of the customer. * * Create a request for the method "domains.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.Domains} * @return the request */ public Insert insert(java.lang.String customer, com.google.api.services.directory.model.Domains content) throws java.io.IOException { Insert result = new Insert(customer, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/domains"; /** * Inserts a domain of the customer. * * Create a request for the method "domains.insert". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.Domains} * @since 1.13 */ protected Insert(java.lang.String customer, com.google.api.services.directory.model.Domains content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Domains.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getDomainName(), "Domains.getDomainName()"); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Insert setCustomer(java.lang.String customer) { this.customer = customer; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the domains of the customer. * * Create a request for the method "domains.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @return the request */ public List list(java.lang.String customer) throws java.io.IOException { List result = new List(customer); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/domains"; /** * Lists the domains of the customer. * * Create a request for the method "domains.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customer Immutable ID of the Google Workspace account. * @since 1.13 */ protected List(java.lang.String customer) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Domains2.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Groups collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Groups.List request = admin.groups().list(parameters ...)}
   * 
* * @return the resource collection */ public Groups groups() { return new Groups(); } /** * The "groups" collection of methods. */ public class Groups { /** * Deletes a group. * * Create a request for the method "groups.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @return the request */ public Delete delete(java.lang.String groupKey) throws java.io.IOException { Delete result = new Delete(groupKey); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}"; /** * Deletes a group. * * Create a request for the method "groups.delete". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @since 1.13 */ protected Delete(java.lang.String groupKey) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Delete setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a group's properties. * * Create a request for the method "groups.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @return the request */ public Get get(java.lang.String groupKey) throws java.io.IOException { Get result = new Get(groupKey); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}"; /** * Retrieves a group's properties. * * Create a request for the method "groups.get". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @since 1.13 */ protected Get(java.lang.String groupKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Group.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Get setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a group. * * Create a request for the method "groups.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param content the {@link com.google.api.services.directory.model.Group} * @return the request */ public Insert insert(com.google.api.services.directory.model.Group content) throws java.io.IOException { Insert result = new Insert(content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups"; /** * Creates a group. * * Create a request for the method "groups.insert". * * This request holds the parameters needed by the the admin 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 content the {@link com.google.api.services.directory.model.Group} * @since 1.13 */ protected Insert(com.google.api.services.directory.model.Group content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Group.class); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getEmail(), "Group.getEmail()"); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves all groups of a domain or of a user given a userKey (paginated). * * Create a request for the method "groups.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @return the request */ public List list() throws java.io.IOException { List result = new List(); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups"; /** * Retrieves all groups of a domain or of a user given a userKey (paginated). * * Create a request for the method "groups.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @since 1.13 */ protected List() { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Groups.class); } @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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. In case of a multi-domain * account, to fetch all groups for a customer, fill in this field instead of `domain`. You * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users](/admin- * sdk/directory/v1/reference/users) resource. Either the `customer` or the `domain` parameter * must be provided. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, fill in this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users) resource. Either the `customer` or the `domain` parameter must be provided. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. In case of a multi-domain * account, to fetch all groups for a customer, fill in this field instead of `domain`. You * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users](/admin- * sdk/directory/v1/reference/users) resource. Either the `customer` or the `domain` parameter * must be provided. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** * The domain name. Use this field to get groups from only one domain. To return all domains * for a customer account, use the `customer` query parameter instead. */ @com.google.api.client.util.Key private java.lang.String domain; /** The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the `customer` query parameter instead. */ public java.lang.String getDomain() { return domain; } /** * The domain name. Use this field to get groups from only one domain. To return all domains * for a customer account, use the `customer` query parameter instead. */ public List setDomain(java.lang.String domain) { this.domain = domain; return this; } /** Maximum number of results to return. Max allowed value is 200. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. Max allowed value is 200. [default: 200] [minimum: 1] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. Max allowed value is 200. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Column to use for sorting results */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Column to use for sorting results */ public java.lang.String getOrderBy() { return orderBy; } /** Column to use for sorting results */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** Token to specify next page in the list */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify next page in the list */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify next page in the list */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Query string search. Should be of the form "". Complete documentation is at https: * //developers.google.com/admin-sdk/directory/v1/guides/search-groups */ @com.google.api.client.util.Key private java.lang.String query; /** Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-groups */ public java.lang.String getQuery() { return query; } /** * Query string search. Should be of the form "". Complete documentation is at https: * //developers.google.com/admin-sdk/directory/v1/guides/search-groups */ public List setQuery(java.lang.String query) { this.query = query; return this; } /** * Whether to return results in ascending or descending order. Only of use when orderBy is * also used */ @com.google.api.client.util.Key private java.lang.String sortOrder; /** Whether to return results in ascending or descending order. Only of use when orderBy is also used */ public java.lang.String getSortOrder() { return sortOrder; } /** * Whether to return results in ascending or descending order. Only of use when orderBy is * also used */ public List setSortOrder(java.lang.String sortOrder) { this.sortOrder = sortOrder; return this; } /** * Email or immutable ID of the user if only those groups are to be listed, the given user is * a member of. If it's an ID, it should match with the ID of the user object. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object. */ public java.lang.String getUserKey() { return userKey; } /** * Email or immutable ID of the user if only those groups are to be listed, the given user is * a member of. If it's an ID, it should match with the ID of the user object. */ public List setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a group's properties. This method supports [patch semantics](/admin- * sdk/directory/v1/guides/performance#patch). * * Create a request for the method "groups.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param content the {@link com.google.api.services.directory.model.Group} * @return the request */ public Patch patch(java.lang.String groupKey, com.google.api.services.directory.model.Group content) throws java.io.IOException { Patch result = new Patch(groupKey, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}"; /** * Updates a group's properties. This method supports [patch semantics](/admin- * sdk/directory/v1/guides/performance#patch). * * Create a request for the method "groups.patch". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param content the {@link com.google.api.services.directory.model.Group} * @since 1.13 */ protected Patch(java.lang.String groupKey, com.google.api.services.directory.model.Group content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.Group.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Patch setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a group's properties. * * Create a request for the method "groups.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param content the {@link com.google.api.services.directory.model.Group} * @return the request */ public Update update(java.lang.String groupKey, com.google.api.services.directory.model.Group content) throws java.io.IOException { Update result = new Update(groupKey, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}"; /** * Updates a group's properties. * * Create a request for the method "groups.update". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param content the {@link com.google.api.services.directory.model.Group} * @since 1.13 */ protected Update(java.lang.String groupKey, com.google.api.services.directory.model.Group content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.Group.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Update setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } /** * An accessor for creating requests from the Aliases collection. * *

The typical use is:

*
     *   {@code Directory admin = new Directory(...);}
     *   {@code Directory.Aliases.List request = admin.aliases().list(parameters ...)}
     * 
* * @return the resource collection */ public Aliases aliases() { return new Aliases(); } /** * The "aliases" collection of methods. */ public class Aliases { /** * Removes an alias. * * Create a request for the method "aliases.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param alias The alias to be removed * @return the request */ public Delete delete(java.lang.String groupKey, java.lang.String alias) throws java.io.IOException { Delete result = new Delete(groupKey, alias); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/aliases/{alias}"; /** * Removes an alias. * * Create a request for the method "aliases.delete". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param alias The alias to be removed * @since 1.13 */ protected Delete(java.lang.String groupKey, java.lang.String alias) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); this.alias = com.google.api.client.util.Preconditions.checkNotNull(alias, "Required parameter alias must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, * group alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, * group alias, or the unique group ID. */ public Delete setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } /** The alias to be removed */ @com.google.api.client.util.Key private java.lang.String alias; /** The alias to be removed */ public java.lang.String getAlias() { return alias; } /** The alias to be removed */ public Delete setAlias(java.lang.String alias) { this.alias = alias; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Adds an alias for the group. * * Create a request for the method "aliases.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param content the {@link com.google.api.services.directory.model.Alias} * @return the request */ public Insert insert(java.lang.String groupKey, com.google.api.services.directory.model.Alias content) throws java.io.IOException { Insert result = new Insert(groupKey, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/aliases"; /** * Adds an alias for the group. * * Create a request for the method "aliases.insert". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param content the {@link com.google.api.services.directory.model.Alias} * @since 1.13 */ protected Insert(java.lang.String groupKey, com.google.api.services.directory.model.Alias content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Alias.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, * group alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, * group alias, or the unique group ID. */ public Insert setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all aliases for a group. * * Create a request for the method "aliases.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @return the request */ public List list(java.lang.String groupKey) throws java.io.IOException { List result = new List(groupKey); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/aliases"; /** * Lists all aliases for a group. * * Create a request for the method "aliases.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @since 1.13 */ protected List(java.lang.String groupKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Aliases.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, * group alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, * group alias, or the unique group ID. */ public List setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } } /** * An accessor for creating requests from the Members collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Members.List request = admin.members().list(parameters ...)}
   * 
* * @return the resource collection */ public Members members() { return new Members(); } /** * The "members" collection of methods. */ public class Members { /** * Removes a member from a group. * * Create a request for the method "members.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the group member in the API request. A group member can be a user or another group. The * value can be the member's (group or user) primary email address, alias, or unique ID. * @return the request */ public Delete delete(java.lang.String groupKey, java.lang.String memberKey) throws java.io.IOException { Delete result = new Delete(groupKey, memberKey); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/members/{memberKey}"; /** * Removes a member from a group. * * Create a request for the method "members.delete". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the group member in the API request. A group member can be a user or another group. The * value can be the member's (group or user) primary email address, alias, or unique ID. * @since 1.13 */ protected Delete(java.lang.String groupKey, java.lang.String memberKey) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); this.memberKey = com.google.api.client.util.Preconditions.checkNotNull(memberKey, "Required parameter memberKey must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Delete setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } /** * Identifies the group member in the API request. A group member can be a user or another * group. The value can be the member's (group or user) primary email address, alias, or * unique ID. */ @com.google.api.client.util.Key private java.lang.String memberKey; /** Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID. */ public java.lang.String getMemberKey() { return memberKey; } /** * Identifies the group member in the API request. A group member can be a user or another * group. The value can be the member's (group or user) primary email address, alias, or * unique ID. */ public Delete setMemberKey(java.lang.String memberKey) { this.memberKey = memberKey; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a group member's properties. * * Create a request for the method "members.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the group member in the API request. A group member can be a user or another group. The * value can be the member's (group or user) primary email address, alias, or unique ID. * @return the request */ public Get get(java.lang.String groupKey, java.lang.String memberKey) throws java.io.IOException { Get result = new Get(groupKey, memberKey); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/members/{memberKey}"; /** * Retrieves a group member's properties. * * Create a request for the method "members.get". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the group member in the API request. A group member can be a user or another group. The * value can be the member's (group or user) primary email address, alias, or unique ID. * @since 1.13 */ protected Get(java.lang.String groupKey, java.lang.String memberKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Member.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); this.memberKey = com.google.api.client.util.Preconditions.checkNotNull(memberKey, "Required parameter memberKey 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Get setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } /** * Identifies the group member in the API request. A group member can be a user or another * group. The value can be the member's (group or user) primary email address, alias, or * unique ID. */ @com.google.api.client.util.Key private java.lang.String memberKey; /** Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID. */ public java.lang.String getMemberKey() { return memberKey; } /** * Identifies the group member in the API request. A group member can be a user or another * group. The value can be the member's (group or user) primary email address, alias, or * unique ID. */ public Get setMemberKey(java.lang.String memberKey) { this.memberKey = memberKey; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Checks whether the given user is a member of the group. Membership can be direct or nested. * * Create a request for the method "members.hasMember". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link HasMember#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the user member in the API request. The value can be the user's primary email address, * alias, or unique ID. * @return the request */ public HasMember hasMember(java.lang.String groupKey, java.lang.String memberKey) throws java.io.IOException { HasMember result = new HasMember(groupKey, memberKey); initialize(result); return result; } public class HasMember extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}"; /** * Checks whether the given user is a member of the group. Membership can be direct or nested. * * Create a request for the method "members.hasMember". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link HasMember#execute()} method to invoke the remote operation.

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

* * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the user member in the API request. The value can be the user's primary email address, * alias, or unique ID. * @since 1.13 */ protected HasMember(java.lang.String groupKey, java.lang.String memberKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.MembersHasMember.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); this.memberKey = com.google.api.client.util.Preconditions.checkNotNull(memberKey, "Required parameter memberKey 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 HasMember set$Xgafv(java.lang.String $Xgafv) { return (HasMember) super.set$Xgafv($Xgafv); } @Override public HasMember setAccessToken(java.lang.String accessToken) { return (HasMember) super.setAccessToken(accessToken); } @Override public HasMember setAlt(java.lang.String alt) { return (HasMember) super.setAlt(alt); } @Override public HasMember setCallback(java.lang.String callback) { return (HasMember) super.setCallback(callback); } @Override public HasMember setFields(java.lang.String fields) { return (HasMember) super.setFields(fields); } @Override public HasMember setKey(java.lang.String key) { return (HasMember) super.setKey(key); } @Override public HasMember setOauthToken(java.lang.String oauthToken) { return (HasMember) super.setOauthToken(oauthToken); } @Override public HasMember setPrettyPrint(java.lang.Boolean prettyPrint) { return (HasMember) super.setPrettyPrint(prettyPrint); } @Override public HasMember setQuotaUser(java.lang.String quotaUser) { return (HasMember) super.setQuotaUser(quotaUser); } @Override public HasMember setUploadType(java.lang.String uploadType) { return (HasMember) super.setUploadType(uploadType); } @Override public HasMember setUploadProtocol(java.lang.String uploadProtocol) { return (HasMember) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public HasMember setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } /** * Identifies the user member in the API request. The value can be the user's primary email * address, alias, or unique ID. */ @com.google.api.client.util.Key private java.lang.String memberKey; /** Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID. */ public java.lang.String getMemberKey() { return memberKey; } /** * Identifies the user member in the API request. The value can be the user's primary email * address, alias, or unique ID. */ public HasMember setMemberKey(java.lang.String memberKey) { this.memberKey = memberKey; return this; } @Override public HasMember set(String parameterName, Object value) { return (HasMember) super.set(parameterName, value); } } /** * Adds a user to the specified group. * * Create a request for the method "members.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param content the {@link com.google.api.services.directory.model.Member} * @return the request */ public Insert insert(java.lang.String groupKey, com.google.api.services.directory.model.Member content) throws java.io.IOException { Insert result = new Insert(groupKey, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/members"; /** * Adds a user to the specified group. * * Create a request for the method "members.insert". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param content the {@link com.google.api.services.directory.model.Member} * @since 1.13 */ protected Insert(java.lang.String groupKey, com.google.api.services.directory.model.Member content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Member.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Insert setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a paginated list of all members in a group. * * Create a request for the method "members.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @return the request */ public List list(java.lang.String groupKey) throws java.io.IOException { List result = new List(groupKey); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/members"; /** * Retrieves a paginated list of all members in a group. * * Create a request for the method "members.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @since 1.13 */ protected List(java.lang.String groupKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Members.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public List setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } /** Whether to list indirect memberships. Default: false. */ @com.google.api.client.util.Key private java.lang.Boolean includeDerivedMembership; /** Whether to list indirect memberships. Default: false. */ public java.lang.Boolean getIncludeDerivedMembership() { return includeDerivedMembership; } /** Whether to list indirect memberships. Default: false. */ public List setIncludeDerivedMembership(java.lang.Boolean includeDerivedMembership) { this.includeDerivedMembership = includeDerivedMembership; return this; } /** Maximum number of results to return. Max allowed value is 200. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. Max allowed value is 200. [default: 200] [minimum: 1] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. Max allowed value is 200. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Token to specify next page in the list. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify next page in the list. */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify next page in the list. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * The `roles` query parameter allows you to retrieve group members by role. Allowed values * are `OWNER`, `MANAGER`, and `MEMBER`. */ @com.google.api.client.util.Key private java.lang.String roles; /** The `roles` query parameter allows you to retrieve group members by role. Allowed values are `OWNER`, `MANAGER`, and `MEMBER`. */ public java.lang.String getRoles() { return roles; } /** * The `roles` query parameter allows you to retrieve group members by role. Allowed values * are `OWNER`, `MANAGER`, and `MEMBER`. */ public List setRoles(java.lang.String roles) { this.roles = roles; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates the membership properties of a user in the specified group. This method supports [patch * semantics](/admin-sdk/directory/v1/guides/performance#patch). * * Create a request for the method "members.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the group member in the API request. A group member can be a user or another group. The * value can be the member's (group or user) primary email address, alias, or unique ID. * @param content the {@link com.google.api.services.directory.model.Member} * @return the request */ public Patch patch(java.lang.String groupKey, java.lang.String memberKey, com.google.api.services.directory.model.Member content) throws java.io.IOException { Patch result = new Patch(groupKey, memberKey, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/members/{memberKey}"; /** * Updates the membership properties of a user in the specified group. This method supports [patch * semantics](/admin-sdk/directory/v1/guides/performance#patch). * * Create a request for the method "members.patch". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the group member in the API request. A group member can be a user or another group. The * value can be the member's (group or user) primary email address, alias, or unique ID. * @param content the {@link com.google.api.services.directory.model.Member} * @since 1.13 */ protected Patch(java.lang.String groupKey, java.lang.String memberKey, com.google.api.services.directory.model.Member content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.Member.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); this.memberKey = com.google.api.client.util.Preconditions.checkNotNull(memberKey, "Required parameter memberKey must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Patch setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } /** * Identifies the group member in the API request. A group member can be a user or another * group. The value can be the member's (group or user) primary email address, alias, or * unique ID. */ @com.google.api.client.util.Key private java.lang.String memberKey; /** Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID. */ public java.lang.String getMemberKey() { return memberKey; } /** * Identifies the group member in the API request. A group member can be a user or another * group. The value can be the member's (group or user) primary email address, alias, or * unique ID. */ public Patch setMemberKey(java.lang.String memberKey) { this.memberKey = memberKey; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates the membership of a user in the specified group. * * Create a request for the method "members.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the group member in the API request. A group member can be a user or another group. The * value can be the member's (group or user) primary email address, alias, or unique ID. * @param content the {@link com.google.api.services.directory.model.Member} * @return the request */ public Update update(java.lang.String groupKey, java.lang.String memberKey, com.google.api.services.directory.model.Member content) throws java.io.IOException { Update result = new Update(groupKey, memberKey, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/groups/{groupKey}/members/{memberKey}"; /** * Updates the membership of a user in the specified group. * * Create a request for the method "members.update". * * This request holds the parameters needed by the the admin 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 groupKey Identifies the group in the API request. The value can be the group's email address, group alias, or * the unique group ID. * @param memberKey Identifies the group member in the API request. A group member can be a user or another group. The * value can be the member's (group or user) primary email address, alias, or unique ID. * @param content the {@link com.google.api.services.directory.model.Member} * @since 1.13 */ protected Update(java.lang.String groupKey, java.lang.String memberKey, com.google.api.services.directory.model.Member content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.Member.class); this.groupKey = com.google.api.client.util.Preconditions.checkNotNull(groupKey, "Required parameter groupKey must be specified."); this.memberKey = com.google.api.client.util.Preconditions.checkNotNull(memberKey, "Required parameter memberKey must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ @com.google.api.client.util.Key private java.lang.String groupKey; /** Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID. */ public java.lang.String getGroupKey() { return groupKey; } /** * Identifies the group in the API request. The value can be the group's email address, group * alias, or the unique group ID. */ public Update setGroupKey(java.lang.String groupKey) { this.groupKey = groupKey; return this; } /** * Identifies the group member in the API request. A group member can be a user or another * group. The value can be the member's (group or user) primary email address, alias, or * unique ID. */ @com.google.api.client.util.Key private java.lang.String memberKey; /** Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID. */ public java.lang.String getMemberKey() { return memberKey; } /** * Identifies the group member in the API request. A group member can be a user or another * group. The value can be the member's (group or user) primary email address, alias, or * unique ID. */ public Update setMemberKey(java.lang.String memberKey) { this.memberKey = memberKey; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Mobiledevices collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Mobiledevices.List request = admin.mobiledevices().list(parameters ...)}
   * 
* * @return the resource collection */ public Mobiledevices mobiledevices() { return new Mobiledevices(); } /** * The "mobiledevices" collection of methods. */ public class Mobiledevices { /** * Takes an action that affects a mobile device. For example, remotely wiping a device. * * Create a request for the method "mobiledevices.action". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Action#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param resourceId The unique ID the API service uses to identify the mobile device. * @param content the {@link com.google.api.services.directory.model.MobileDeviceAction} * @return the request */ public Action action(java.lang.String customerId, java.lang.String resourceId, com.google.api.services.directory.model.MobileDeviceAction content) throws java.io.IOException { Action result = new Action(customerId, resourceId, content); initialize(result); return result; } public class Action extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action"; /** * Takes an action that affects a mobile device. For example, remotely wiping a device. * * Create a request for the method "mobiledevices.action". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Action#execute()} method to invoke the remote operation.

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

* * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param resourceId The unique ID the API service uses to identify the mobile device. * @param content the {@link com.google.api.services.directory.model.MobileDeviceAction} * @since 1.13 */ protected Action(java.lang.String customerId, java.lang.String resourceId, com.google.api.services.directory.model.MobileDeviceAction content) { super(Directory.this, "POST", REST_PATH, content, Void.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.resourceId = com.google.api.client.util.Preconditions.checkNotNull(resourceId, "Required parameter resourceId must be specified."); } @Override public Action set$Xgafv(java.lang.String $Xgafv) { return (Action) super.set$Xgafv($Xgafv); } @Override public Action setAccessToken(java.lang.String accessToken) { return (Action) super.setAccessToken(accessToken); } @Override public Action setAlt(java.lang.String alt) { return (Action) super.setAlt(alt); } @Override public Action setCallback(java.lang.String callback) { return (Action) super.setCallback(callback); } @Override public Action setFields(java.lang.String fields) { return (Action) super.setFields(fields); } @Override public Action setKey(java.lang.String key) { return (Action) super.setKey(key); } @Override public Action setOauthToken(java.lang.String oauthToken) { return (Action) super.setOauthToken(oauthToken); } @Override public Action setPrettyPrint(java.lang.Boolean prettyPrint) { return (Action) super.setPrettyPrint(prettyPrint); } @Override public Action setQuotaUser(java.lang.String quotaUser) { return (Action) super.setQuotaUser(quotaUser); } @Override public Action setUploadType(java.lang.String uploadType) { return (Action) super.setUploadType(uploadType); } @Override public Action setUploadProtocol(java.lang.String uploadProtocol) { return (Action) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Action setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** The unique ID the API service uses to identify the mobile device. */ @com.google.api.client.util.Key private java.lang.String resourceId; /** The unique ID the API service uses to identify the mobile device. */ public java.lang.String getResourceId() { return resourceId; } /** The unique ID the API service uses to identify the mobile device. */ public Action setResourceId(java.lang.String resourceId) { this.resourceId = resourceId; return this; } @Override public Action set(String parameterName, Object value) { return (Action) super.set(parameterName, value); } } /** * Removes a mobile device. * * Create a request for the method "mobiledevices.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param resourceId The unique ID the API service uses to identify the mobile device. * @return the request */ public Delete delete(java.lang.String customerId, java.lang.String resourceId) throws java.io.IOException { Delete result = new Delete(customerId, resourceId); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}"; /** * Removes a mobile device. * * Create a request for the method "mobiledevices.delete". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param resourceId The unique ID the API service uses to identify the mobile device. * @since 1.13 */ protected Delete(java.lang.String customerId, java.lang.String resourceId) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.resourceId = com.google.api.client.util.Preconditions.checkNotNull(resourceId, "Required parameter resourceId must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Delete setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** The unique ID the API service uses to identify the mobile device. */ @com.google.api.client.util.Key private java.lang.String resourceId; /** The unique ID the API service uses to identify the mobile device. */ public java.lang.String getResourceId() { return resourceId; } /** The unique ID the API service uses to identify the mobile device. */ public Delete setResourceId(java.lang.String resourceId) { this.resourceId = resourceId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a mobile device's properties. * * Create a request for the method "mobiledevices.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param resourceId The unique ID the API service uses to identify the mobile device. * @return the request */ public Get get(java.lang.String customerId, java.lang.String resourceId) throws java.io.IOException { Get result = new Get(customerId, resourceId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}"; /** * Retrieves a mobile device's properties. * * Create a request for the method "mobiledevices.get". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param resourceId The unique ID the API service uses to identify the mobile device. * @since 1.13 */ protected Get(java.lang.String customerId, java.lang.String resourceId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.MobileDevice.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.resourceId = com.google.api.client.util.Preconditions.checkNotNull(resourceId, "Required parameter resourceId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Get setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** The unique ID the API service uses to identify the mobile device. */ @com.google.api.client.util.Key private java.lang.String resourceId; /** The unique ID the API service uses to identify the mobile device. */ public java.lang.String getResourceId() { return resourceId; } /** The unique ID the API service uses to identify the mobile device. */ public Get setResourceId(java.lang.String resourceId) { this.resourceId = resourceId; return this; } /** Restrict information returned to a set of selected fields. */ @com.google.api.client.util.Key private java.lang.String projection; /** Restrict information returned to a set of selected fields. */ public java.lang.String getProjection() { return projection; } /** Restrict information returned to a set of selected fields. */ public Get setProjection(java.lang.String projection) { this.projection = projection; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Retrieves a paginated list of all user-owned mobile devices for an account. To retrieve a list * that includes company-owned devices, use the Cloud Identity [Devices * API](https://cloud.google.com/identity/docs/concepts/overview-devices) instead. * * Create a request for the method "mobiledevices.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @return the request */ public List list(java.lang.String customerId) throws java.io.IOException { List result = new List(customerId); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/devices/mobile"; /** * Retrieves a paginated list of all user-owned mobile devices for an account. To retrieve a list * that includes company-owned devices, use the Cloud Identity [Devices * API](https://cloud.google.com/identity/docs/concepts/overview-devices) instead. * * Create a request for the method "mobiledevices.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @since 1.13 */ protected List(java.lang.String customerId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.MobileDevices.class); 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public List setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** Maximum number of results to return. Max allowed value is 100. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. Max allowed value is 100. [default: 100] [minimum: 1] [maximum: 100] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. Max allowed value is 100. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Device property to use for sorting results. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Device property to use for sorting results. */ public java.lang.String getOrderBy() { return orderBy; } /** Device property to use for sorting results. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** Token to specify next page in the list */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify next page in the list */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify next page in the list */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Restrict information returned to a set of selected fields. */ @com.google.api.client.util.Key private java.lang.String projection; /** Restrict information returned to a set of selected fields. */ public java.lang.String getProjection() { return projection; } /** Restrict information returned to a set of selected fields. */ public List setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Search string in the format given at https://developers.google.com/admin-sdk/directory/v1 * /search-operators */ @com.google.api.client.util.Key private java.lang.String query; /** Search string in the format given at https://developers.google.com/admin-sdk/directory/v1/search- operators */ public java.lang.String getQuery() { return query; } /** * Search string in the format given at https://developers.google.com/admin-sdk/directory/v1 * /search-operators */ public List setQuery(java.lang.String query) { this.query = query; return this; } /** * Whether to return results in ascending or descending order. Must be used with the `orderBy` * parameter. */ @com.google.api.client.util.Key private java.lang.String sortOrder; /** Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter. */ public java.lang.String getSortOrder() { return sortOrder; } /** * Whether to return results in ascending or descending order. Must be used with the `orderBy` * parameter. */ public List setSortOrder(java.lang.String sortOrder) { this.sortOrder = sortOrder; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Orgunits collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Orgunits.List request = admin.orgunits().list(parameters ...)}
   * 
* * @return the resource collection */ public Orgunits orgunits() { return new Orgunits(); } /** * The "orgunits" collection of methods. */ public class Orgunits { /** * Removes an organizational unit. * * Create a request for the method "orgunits.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param orgUnitPath The full path of the organizational unit (minus the leading `/`) or its unique ID. * @return the request */ public Delete delete(java.lang.String customerId, java.lang.String orgUnitPath) throws java.io.IOException { Delete result = new Delete(customerId, orgUnitPath); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}"; private final java.util.regex.Pattern ORG_UNIT_PATH_PATTERN = java.util.regex.Pattern.compile("^.*$"); /** * Removes an organizational unit. * * Create a request for the method "orgunits.delete". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param orgUnitPath The full path of the organizational unit (minus the leading `/`) or its unique ID. * @since 1.13 */ protected Delete(java.lang.String customerId, java.lang.String orgUnitPath) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.orgUnitPath = com.google.api.client.util.Preconditions.checkNotNull(orgUnitPath, "Required parameter orgUnitPath must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ORG_UNIT_PATH_PATTERN.matcher(orgUnitPath).matches(), "Parameter orgUnitPath must conform to the pattern " + "^.*$"); } } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Delete setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ @com.google.api.client.util.Key private java.lang.String orgUnitPath; /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public java.lang.String getOrgUnitPath() { return orgUnitPath; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public Delete setOrgUnitPath(java.lang.String orgUnitPath) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ORG_UNIT_PATH_PATTERN.matcher(orgUnitPath).matches(), "Parameter orgUnitPath must conform to the pattern " + "^.*$"); } this.orgUnitPath = orgUnitPath; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves an organizational unit. * * Create a request for the method "orgunits.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param orgUnitPath The full path of the organizational unit (minus the leading `/`) or its unique ID. * @return the request */ public Get get(java.lang.String customerId, java.lang.String orgUnitPath) throws java.io.IOException { Get result = new Get(customerId, orgUnitPath); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}"; private final java.util.regex.Pattern ORG_UNIT_PATH_PATTERN = java.util.regex.Pattern.compile("^.*$"); /** * Retrieves an organizational unit. * * Create a request for the method "orgunits.get". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param orgUnitPath The full path of the organizational unit (minus the leading `/`) or its unique ID. * @since 1.13 */ protected Get(java.lang.String customerId, java.lang.String orgUnitPath) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.OrgUnit.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.orgUnitPath = com.google.api.client.util.Preconditions.checkNotNull(orgUnitPath, "Required parameter orgUnitPath must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ORG_UNIT_PATH_PATTERN.matcher(orgUnitPath).matches(), "Parameter orgUnitPath must conform to the pattern " + "^.*$"); } } @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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Get setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ @com.google.api.client.util.Key private java.lang.String orgUnitPath; /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public java.lang.String getOrgUnitPath() { return orgUnitPath; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public Get setOrgUnitPath(java.lang.String orgUnitPath) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ORG_UNIT_PATH_PATTERN.matcher(orgUnitPath).matches(), "Parameter orgUnitPath must conform to the pattern " + "^.*$"); } this.orgUnitPath = orgUnitPath; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Adds an organizational unit. * * Create a request for the method "orgunits.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param content the {@link com.google.api.services.directory.model.OrgUnit} * @return the request */ public Insert insert(java.lang.String customerId, com.google.api.services.directory.model.OrgUnit content) throws java.io.IOException { Insert result = new Insert(customerId, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/orgunits"; /** * Adds an organizational unit. * * Create a request for the method "orgunits.insert". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param content the {@link com.google.api.services.directory.model.OrgUnit} * @since 1.13 */ protected Insert(java.lang.String customerId, com.google.api.services.directory.model.OrgUnit content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.OrgUnit.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getName(), "OrgUnit.getName()"); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Insert setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of all organizational units for an account. * * Create a request for the method "orgunits.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @return the request */ public List list(java.lang.String customerId) throws java.io.IOException { List result = new List(customerId); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/orgunits"; /** * Retrieves a list of all organizational units for an account. * * Create a request for the method "orgunits.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @since 1.13 */ protected List(java.lang.String customerId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.OrgUnits.class); 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public List setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** * The full path to the organizational unit or its unique ID. Returns the children of the * specified organizational unit. */ @com.google.api.client.util.Key private java.lang.String orgUnitPath; /** The full path to the organizational unit or its unique ID. Returns the children of the specified organizational unit. */ public java.lang.String getOrgUnitPath() { return orgUnitPath; } /** * The full path to the organizational unit or its unique ID. Returns the children of the * specified organizational unit. */ public List setOrgUnitPath(java.lang.String orgUnitPath) { this.orgUnitPath = orgUnitPath; return this; } /** Whether to return all sub-organizations or just immediate children. */ @com.google.api.client.util.Key private java.lang.String type; /** Whether to return all sub-organizations or just immediate children. */ public java.lang.String getType() { return type; } /** Whether to return all sub-organizations or just immediate children. */ public List setType(java.lang.String type) { this.type = type; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates an organizational unit. This method supports [patch semantics](/admin- * sdk/directory/v1/guides/performance#patch) * * Create a request for the method "orgunits.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param orgUnitPath The full path of the organizational unit (minus the leading `/`) or its unique ID. * @param content the {@link com.google.api.services.directory.model.OrgUnit} * @return the request */ public Patch patch(java.lang.String customerId, java.lang.String orgUnitPath, com.google.api.services.directory.model.OrgUnit content) throws java.io.IOException { Patch result = new Patch(customerId, orgUnitPath, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}"; private final java.util.regex.Pattern ORG_UNIT_PATH_PATTERN = java.util.regex.Pattern.compile("^.*$"); /** * Updates an organizational unit. This method supports [patch semantics](/admin- * sdk/directory/v1/guides/performance#patch) * * Create a request for the method "orgunits.patch". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param orgUnitPath The full path of the organizational unit (minus the leading `/`) or its unique ID. * @param content the {@link com.google.api.services.directory.model.OrgUnit} * @since 1.13 */ protected Patch(java.lang.String customerId, java.lang.String orgUnitPath, com.google.api.services.directory.model.OrgUnit content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.OrgUnit.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.orgUnitPath = com.google.api.client.util.Preconditions.checkNotNull(orgUnitPath, "Required parameter orgUnitPath must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ORG_UNIT_PATH_PATTERN.matcher(orgUnitPath).matches(), "Parameter orgUnitPath must conform to the pattern " + "^.*$"); } } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Patch setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ @com.google.api.client.util.Key private java.lang.String orgUnitPath; /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public java.lang.String getOrgUnitPath() { return orgUnitPath; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public Patch setOrgUnitPath(java.lang.String orgUnitPath) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ORG_UNIT_PATH_PATTERN.matcher(orgUnitPath).matches(), "Parameter orgUnitPath must conform to the pattern " + "^.*$"); } this.orgUnitPath = orgUnitPath; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates an organizational unit. * * Create a request for the method "orgunits.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param orgUnitPath The full path of the organizational unit (minus the leading `/`) or its unique ID. * @param content the {@link com.google.api.services.directory.model.OrgUnit} * @return the request */ public Update update(java.lang.String customerId, java.lang.String orgUnitPath, com.google.api.services.directory.model.OrgUnit content) throws java.io.IOException { Update result = new Update(customerId, orgUnitPath, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}"; private final java.util.regex.Pattern ORG_UNIT_PATH_PATTERN = java.util.regex.Pattern.compile("^.*$"); /** * Updates an organizational unit. * * Create a request for the method "orgunits.update". * * This request holds the parameters needed by the the admin 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 customerId The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's `customerId`. The `customerId` is * also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * @param orgUnitPath The full path of the organizational unit (minus the leading `/`) or its unique ID. * @param content the {@link com.google.api.services.directory.model.OrgUnit} * @since 1.13 */ protected Update(java.lang.String customerId, java.lang.String orgUnitPath, com.google.api.services.directory.model.OrgUnit content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.OrgUnit.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.orgUnitPath = com.google.api.client.util.Preconditions.checkNotNull(orgUnitPath, "Required parameter orgUnitPath must be specified."); if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ORG_UNIT_PATH_PATTERN.matcher(orgUnitPath).matches(), "Parameter orgUnitPath must conform to the pattern " + "^.*$"); } } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ @com.google.api.client.util.Key private java.lang.String customerId; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). */ public java.lang.String getCustomerId() { return customerId; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, you * can also use the `my_customer` alias to represent your account's `customerId`. The * `customerId` is also returned as part of the [Users resource](/admin- * sdk/directory/v1/reference/users). */ public Update setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ @com.google.api.client.util.Key private java.lang.String orgUnitPath; /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public java.lang.String getOrgUnitPath() { return orgUnitPath; } /** The full path of the organizational unit (minus the leading `/`) or its unique ID. */ public Update setOrgUnitPath(java.lang.String orgUnitPath) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(ORG_UNIT_PATH_PATTERN.matcher(orgUnitPath).matches(), "Parameter orgUnitPath must conform to the pattern " + "^.*$"); } this.orgUnitPath = orgUnitPath; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Privileges collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Privileges.List request = admin.privileges().list(parameters ...)}
   * 
* * @return the resource collection */ public Privileges privileges() { return new Privileges(); } /** * The "privileges" collection of methods. */ public class Privileges { /** * Retrieves a paginated list of all privileges for a customer. * * Create a request for the method "privileges.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @return the request */ public List list(java.lang.String customer) throws java.io.IOException { List result = new List(customer); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roles/ALL/privileges"; /** * Retrieves a paginated list of all privileges for a customer. * * Create a request for the method "privileges.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customer Immutable ID of the Google Workspace account. * @since 1.13 */ protected List(java.lang.String customer) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Privileges.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Resources collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Resources.List request = admin.resources().list(parameters ...)}
   * 
* * @return the resource collection */ public Resources resources() { return new Resources(); } /** * The "resources" collection of methods. */ public class Resources { /** * An accessor for creating requests from the Buildings collection. * *

The typical use is:

*
     *   {@code Directory admin = new Directory(...);}
     *   {@code Directory.Buildings.List request = admin.buildings().list(parameters ...)}
     * 
* * @return the resource collection */ public Buildings buildings() { return new Buildings(); } /** * The "buildings" collection of methods. */ public class Buildings { /** * Deletes a building. * * Create a request for the method "buildings.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param buildingId The id of the building to delete. * @return the request */ public Delete delete(java.lang.String customer, java.lang.String buildingId) throws java.io.IOException { Delete result = new Delete(customer, buildingId); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}"; /** * Deletes a building. * * Create a request for the method "buildings.delete". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param buildingId The id of the building to delete. * @since 1.13 */ protected Delete(java.lang.String customer, java.lang.String buildingId) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.buildingId = com.google.api.client.util.Preconditions.checkNotNull(buildingId, "Required parameter buildingId must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Delete setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The id of the building to delete. */ @com.google.api.client.util.Key private java.lang.String buildingId; /** The id of the building to delete. */ public java.lang.String getBuildingId() { return buildingId; } /** The id of the building to delete. */ public Delete setBuildingId(java.lang.String buildingId) { this.buildingId = buildingId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a building. * * Create a request for the method "buildings.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param buildingId The unique ID of the building to retrieve. * @return the request */ public Get get(java.lang.String customer, java.lang.String buildingId) throws java.io.IOException { Get result = new Get(customer, buildingId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}"; /** * Retrieves a building. * * Create a request for the method "buildings.get". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param buildingId The unique ID of the building to retrieve. * @since 1.13 */ protected Get(java.lang.String customer, java.lang.String buildingId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Building.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.buildingId = com.google.api.client.util.Preconditions.checkNotNull(buildingId, "Required parameter buildingId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Get setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the building to retrieve. */ @com.google.api.client.util.Key private java.lang.String buildingId; /** The unique ID of the building to retrieve. */ public java.lang.String getBuildingId() { return buildingId; } /** The unique ID of the building to retrieve. */ public Get setBuildingId(java.lang.String buildingId) { this.buildingId = buildingId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Inserts a building. * * Create a request for the method "buildings.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param content the {@link com.google.api.services.directory.model.Building} * @return the request */ public Insert insert(java.lang.String customer, com.google.api.services.directory.model.Building content) throws java.io.IOException { Insert result = new Insert(customer, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/buildings"; /** * Inserts a building. * * Create a request for the method "buildings.insert". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param content the {@link com.google.api.services.directory.model.Building} * @since 1.13 */ protected Insert(java.lang.String customer, com.google.api.services.directory.model.Building content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Building.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Insert setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Source from which Building.coordinates are derived. */ @com.google.api.client.util.Key private java.lang.String coordinatesSource; /** Source from which Building.coordinates are derived. [default: SOURCE_UNSPECIFIED] */ public java.lang.String getCoordinatesSource() { return coordinatesSource; } /** Source from which Building.coordinates are derived. */ public Insert setCoordinatesSource(java.lang.String coordinatesSource) { this.coordinatesSource = coordinatesSource; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of buildings for an account. * * Create a request for the method "buildings.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @return the request */ public List list(java.lang.String customer) throws java.io.IOException { List result = new List(customer); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/buildings"; /** * Retrieves a list of buildings for an account. * * Create a request for the method "buildings.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @since 1.13 */ protected List(java.lang.String customer) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Buildings.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Maximum number of results to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. [minimum: 1] [maximum: 500] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Token to specify the next page in the list. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify the next page in the list. */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify the next page in the list. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches a building. * * Create a request for the method "buildings.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param buildingId The id of the building to update. * @param content the {@link com.google.api.services.directory.model.Building} * @return the request */ public Patch patch(java.lang.String customer, java.lang.String buildingId, com.google.api.services.directory.model.Building content) throws java.io.IOException { Patch result = new Patch(customer, buildingId, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}"; /** * Patches a building. * * Create a request for the method "buildings.patch". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param buildingId The id of the building to update. * @param content the {@link com.google.api.services.directory.model.Building} * @since 1.13 */ protected Patch(java.lang.String customer, java.lang.String buildingId, com.google.api.services.directory.model.Building content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.Building.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.buildingId = com.google.api.client.util.Preconditions.checkNotNull(buildingId, "Required parameter buildingId must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Patch setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The id of the building to update. */ @com.google.api.client.util.Key private java.lang.String buildingId; /** The id of the building to update. */ public java.lang.String getBuildingId() { return buildingId; } /** The id of the building to update. */ public Patch setBuildingId(java.lang.String buildingId) { this.buildingId = buildingId; return this; } /** Source from which Building.coordinates are derived. */ @com.google.api.client.util.Key private java.lang.String coordinatesSource; /** Source from which Building.coordinates are derived. [default: SOURCE_UNSPECIFIED] */ public java.lang.String getCoordinatesSource() { return coordinatesSource; } /** Source from which Building.coordinates are derived. */ public Patch setCoordinatesSource(java.lang.String coordinatesSource) { this.coordinatesSource = coordinatesSource; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a building. * * Create a request for the method "buildings.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param buildingId The id of the building to update. * @param content the {@link com.google.api.services.directory.model.Building} * @return the request */ public Update update(java.lang.String customer, java.lang.String buildingId, com.google.api.services.directory.model.Building content) throws java.io.IOException { Update result = new Update(customer, buildingId, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}"; /** * Updates a building. * * Create a request for the method "buildings.update". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param buildingId The id of the building to update. * @param content the {@link com.google.api.services.directory.model.Building} * @since 1.13 */ protected Update(java.lang.String customer, java.lang.String buildingId, com.google.api.services.directory.model.Building content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.Building.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.buildingId = com.google.api.client.util.Preconditions.checkNotNull(buildingId, "Required parameter buildingId must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Update setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The id of the building to update. */ @com.google.api.client.util.Key private java.lang.String buildingId; /** The id of the building to update. */ public java.lang.String getBuildingId() { return buildingId; } /** The id of the building to update. */ public Update setBuildingId(java.lang.String buildingId) { this.buildingId = buildingId; return this; } /** Source from which Building.coordinates are derived. */ @com.google.api.client.util.Key private java.lang.String coordinatesSource; /** Source from which Building.coordinates are derived. [default: SOURCE_UNSPECIFIED] */ public java.lang.String getCoordinatesSource() { return coordinatesSource; } /** Source from which Building.coordinates are derived. */ public Update setCoordinatesSource(java.lang.String coordinatesSource) { this.coordinatesSource = coordinatesSource; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Calendars collection. * *

The typical use is:

*
     *   {@code Directory admin = new Directory(...);}
     *   {@code Directory.Calendars.List request = admin.calendars().list(parameters ...)}
     * 
* * @return the resource collection */ public Calendars calendars() { return new Calendars(); } /** * The "calendars" collection of methods. */ public class Calendars { /** * Deletes a calendar resource. * * Create a request for the method "calendars.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param calendarResourceId The unique ID of the calendar resource to delete. * @return the request */ public Delete delete(java.lang.String customer, java.lang.String calendarResourceId) throws java.io.IOException { Delete result = new Delete(customer, calendarResourceId); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}"; /** * Deletes a calendar resource. * * Create a request for the method "calendars.delete". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param calendarResourceId The unique ID of the calendar resource to delete. * @since 1.13 */ protected Delete(java.lang.String customer, java.lang.String calendarResourceId) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.calendarResourceId = com.google.api.client.util.Preconditions.checkNotNull(calendarResourceId, "Required parameter calendarResourceId must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Delete setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the calendar resource to delete. */ @com.google.api.client.util.Key private java.lang.String calendarResourceId; /** The unique ID of the calendar resource to delete. */ public java.lang.String getCalendarResourceId() { return calendarResourceId; } /** The unique ID of the calendar resource to delete. */ public Delete setCalendarResourceId(java.lang.String calendarResourceId) { this.calendarResourceId = calendarResourceId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a calendar resource. * * Create a request for the method "calendars.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param calendarResourceId The unique ID of the calendar resource to retrieve. * @return the request */ public Get get(java.lang.String customer, java.lang.String calendarResourceId) throws java.io.IOException { Get result = new Get(customer, calendarResourceId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}"; /** * Retrieves a calendar resource. * * Create a request for the method "calendars.get". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param calendarResourceId The unique ID of the calendar resource to retrieve. * @since 1.13 */ protected Get(java.lang.String customer, java.lang.String calendarResourceId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.CalendarResource.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.calendarResourceId = com.google.api.client.util.Preconditions.checkNotNull(calendarResourceId, "Required parameter calendarResourceId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Get setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the calendar resource to retrieve. */ @com.google.api.client.util.Key private java.lang.String calendarResourceId; /** The unique ID of the calendar resource to retrieve. */ public java.lang.String getCalendarResourceId() { return calendarResourceId; } /** The unique ID of the calendar resource to retrieve. */ public Get setCalendarResourceId(java.lang.String calendarResourceId) { this.calendarResourceId = calendarResourceId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Inserts a calendar resource. * * Create a request for the method "calendars.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param content the {@link com.google.api.services.directory.model.CalendarResource} * @return the request */ public Insert insert(java.lang.String customer, com.google.api.services.directory.model.CalendarResource content) throws java.io.IOException { Insert result = new Insert(customer, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/calendars"; /** * Inserts a calendar resource. * * Create a request for the method "calendars.insert". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param content the {@link com.google.api.services.directory.model.CalendarResource} * @since 1.13 */ protected Insert(java.lang.String customer, com.google.api.services.directory.model.CalendarResource content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.CalendarResource.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getResourceId(), "CalendarResource.getResourceId()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getResourceName(), "CalendarResource.getResourceName()"); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Insert setCustomer(java.lang.String customer) { this.customer = customer; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of calendar resources for an account. * * Create a request for the method "calendars.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @return the request */ public List list(java.lang.String customer) throws java.io.IOException { List result = new List(customer); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/calendars"; /** * Retrieves a list of calendar resources for an account. * * Create a request for the method "calendars.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @since 1.13 */ protected List(java.lang.String customer) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.CalendarResources.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Maximum number of results to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. [minimum: 1] [maximum: 500] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * Field(s) to sort results by in either ascending or descending order. Supported fields * include `resourceId`, `resourceName`, `capacity`, `buildingId`, and `floorName`. If no * order is specified, defaults to ascending. Should be of the form "field [asc|desc], field * [asc|desc], ...". For example `buildingId, capacity desc` would return results sorted * first by `buildingId` in ascending order then by `capacity` in descending order. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Field(s) to sort results by in either ascending or descending order. Supported fields include `resourceId`, `resourceName`, `capacity`, `buildingId`, and `floorName`. If no order is specified, defaults to ascending. Should be of the form "field [asc|desc], field [asc|desc], ...". For example `buildingId, capacity desc` would return results sorted first by `buildingId` in ascending order then by `capacity` in descending order. */ public java.lang.String getOrderBy() { return orderBy; } /** * Field(s) to sort results by in either ascending or descending order. Supported fields * include `resourceId`, `resourceName`, `capacity`, `buildingId`, and `floorName`. If no * order is specified, defaults to ascending. Should be of the form "field [asc|desc], field * [asc|desc], ...". For example `buildingId, capacity desc` would return results sorted * first by `buildingId` in ascending order then by `capacity` in descending order. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** Token to specify the next page in the list. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify the next page in the list. */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify the next page in the list. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * String query used to filter results. Should be of the form "field operator value" where * field can be any of supported fields and operators can be any of supported operations. * Operators include '=' for exact match, '!=' for mismatch and ':' for prefix match or HAS * match where applicable. For prefix match, the value should always be followed by a *. * Logical operators NOT and AND are supported (in this order of precedence). Supported * fields include `generatedResourceName`, `name`, `buildingId`, `floor_name`, `capacity`, * `featureInstances.feature.name`, `resourceEmail`, `resourceCategory`. For example * `buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone`. */ @com.google.api.client.util.Key private java.lang.String query; /** String query used to filter results. Should be of the form "field operator value" where field can be any of supported fields and operators can be any of supported operations. Operators include '=' for exact match, '!=' for mismatch and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Logical operators NOT and AND are supported (in this order of precedence). Supported fields include `generatedResourceName`, `name`, `buildingId`, `floor_name`, `capacity`, `featureInstances.feature.name`, `resourceEmail`, `resourceCategory`. For example `buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone`. */ public java.lang.String getQuery() { return query; } /** * String query used to filter results. Should be of the form "field operator value" where * field can be any of supported fields and operators can be any of supported operations. * Operators include '=' for exact match, '!=' for mismatch and ':' for prefix match or HAS * match where applicable. For prefix match, the value should always be followed by a *. * Logical operators NOT and AND are supported (in this order of precedence). Supported * fields include `generatedResourceName`, `name`, `buildingId`, `floor_name`, `capacity`, * `featureInstances.feature.name`, `resourceEmail`, `resourceCategory`. For example * `buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone`. */ public List setQuery(java.lang.String query) { this.query = query; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches a calendar resource. * * Create a request for the method "calendars.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param calendarResourceId The unique ID of the calendar resource to update. * @param content the {@link com.google.api.services.directory.model.CalendarResource} * @return the request */ public Patch patch(java.lang.String customer, java.lang.String calendarResourceId, com.google.api.services.directory.model.CalendarResource content) throws java.io.IOException { Patch result = new Patch(customer, calendarResourceId, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}"; /** * Patches a calendar resource. * * Create a request for the method "calendars.patch". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param calendarResourceId The unique ID of the calendar resource to update. * @param content the {@link com.google.api.services.directory.model.CalendarResource} * @since 1.13 */ protected Patch(java.lang.String customer, java.lang.String calendarResourceId, com.google.api.services.directory.model.CalendarResource content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.CalendarResource.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.calendarResourceId = com.google.api.client.util.Preconditions.checkNotNull(calendarResourceId, "Required parameter calendarResourceId must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Patch setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the calendar resource to update. */ @com.google.api.client.util.Key private java.lang.String calendarResourceId; /** The unique ID of the calendar resource to update. */ public java.lang.String getCalendarResourceId() { return calendarResourceId; } /** The unique ID of the calendar resource to update. */ public Patch setCalendarResourceId(java.lang.String calendarResourceId) { this.calendarResourceId = calendarResourceId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a calendar resource. This method supports patch semantics, meaning you only need to * include the fields you wish to update. Fields that are not present in the request will be * preserved. * * Create a request for the method "calendars.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param calendarResourceId The unique ID of the calendar resource to update. * @param content the {@link com.google.api.services.directory.model.CalendarResource} * @return the request */ public Update update(java.lang.String customer, java.lang.String calendarResourceId, com.google.api.services.directory.model.CalendarResource content) throws java.io.IOException { Update result = new Update(customer, calendarResourceId, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}"; /** * Updates a calendar resource. This method supports patch semantics, meaning you only need to * include the fields you wish to update. Fields that are not present in the request will be * preserved. * * Create a request for the method "calendars.update". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param calendarResourceId The unique ID of the calendar resource to update. * @param content the {@link com.google.api.services.directory.model.CalendarResource} * @since 1.13 */ protected Update(java.lang.String customer, java.lang.String calendarResourceId, com.google.api.services.directory.model.CalendarResource content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.CalendarResource.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.calendarResourceId = com.google.api.client.util.Preconditions.checkNotNull(calendarResourceId, "Required parameter calendarResourceId must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Update setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the calendar resource to update. */ @com.google.api.client.util.Key private java.lang.String calendarResourceId; /** The unique ID of the calendar resource to update. */ public java.lang.String getCalendarResourceId() { return calendarResourceId; } /** The unique ID of the calendar resource to update. */ public Update setCalendarResourceId(java.lang.String calendarResourceId) { this.calendarResourceId = calendarResourceId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Features collection. * *

The typical use is:

*
     *   {@code Directory admin = new Directory(...);}
     *   {@code Directory.Features.List request = admin.features().list(parameters ...)}
     * 
* * @return the resource collection */ public Features features() { return new Features(); } /** * The "features" collection of methods. */ public class Features { /** * Deletes a feature. * * Create a request for the method "features.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param featureKey The unique ID of the feature to delete. * @return the request */ public Delete delete(java.lang.String customer, java.lang.String featureKey) throws java.io.IOException { Delete result = new Delete(customer, featureKey); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/features/{featureKey}"; /** * Deletes a feature. * * Create a request for the method "features.delete". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param featureKey The unique ID of the feature to delete. * @since 1.13 */ protected Delete(java.lang.String customer, java.lang.String featureKey) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.featureKey = com.google.api.client.util.Preconditions.checkNotNull(featureKey, "Required parameter featureKey must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Delete setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the feature to delete. */ @com.google.api.client.util.Key private java.lang.String featureKey; /** The unique ID of the feature to delete. */ public java.lang.String getFeatureKey() { return featureKey; } /** The unique ID of the feature to delete. */ public Delete setFeatureKey(java.lang.String featureKey) { this.featureKey = featureKey; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a feature. * * Create a request for the method "features.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param featureKey The unique ID of the feature to retrieve. * @return the request */ public Get get(java.lang.String customer, java.lang.String featureKey) throws java.io.IOException { Get result = new Get(customer, featureKey); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/features/{featureKey}"; /** * Retrieves a feature. * * Create a request for the method "features.get". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param featureKey The unique ID of the feature to retrieve. * @since 1.13 */ protected Get(java.lang.String customer, java.lang.String featureKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Feature.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.featureKey = com.google.api.client.util.Preconditions.checkNotNull(featureKey, "Required parameter featureKey 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Get setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the feature to retrieve. */ @com.google.api.client.util.Key private java.lang.String featureKey; /** The unique ID of the feature to retrieve. */ public java.lang.String getFeatureKey() { return featureKey; } /** The unique ID of the feature to retrieve. */ public Get setFeatureKey(java.lang.String featureKey) { this.featureKey = featureKey; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Inserts a feature. * * Create a request for the method "features.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param content the {@link com.google.api.services.directory.model.Feature} * @return the request */ public Insert insert(java.lang.String customer, com.google.api.services.directory.model.Feature content) throws java.io.IOException { Insert result = new Insert(customer, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/features"; /** * Inserts a feature. * * Create a request for the method "features.insert". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param content the {@link com.google.api.services.directory.model.Feature} * @since 1.13 */ protected Insert(java.lang.String customer, com.google.api.services.directory.model.Feature content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Feature.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getName(), "Feature.getName()"); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Insert setCustomer(java.lang.String customer) { this.customer = customer; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a list of features for an account. * * Create a request for the method "features.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @return the request */ public List list(java.lang.String customer) throws java.io.IOException { List result = new List(customer); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/features"; /** * Retrieves a list of features for an account. * * Create a request for the method "features.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @since 1.13 */ protected List(java.lang.String customer) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Features.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Maximum number of results to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. [minimum: 1] [maximum: 500] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Token to specify the next page in the list. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify the next page in the list. */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify the next page in the list. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches a feature. * * Create a request for the method "features.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param featureKey The unique ID of the feature to update. * @param content the {@link com.google.api.services.directory.model.Feature} * @return the request */ public Patch patch(java.lang.String customer, java.lang.String featureKey, com.google.api.services.directory.model.Feature content) throws java.io.IOException { Patch result = new Patch(customer, featureKey, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/features/{featureKey}"; /** * Patches a feature. * * Create a request for the method "features.patch". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param featureKey The unique ID of the feature to update. * @param content the {@link com.google.api.services.directory.model.Feature} * @since 1.13 */ protected Patch(java.lang.String customer, java.lang.String featureKey, com.google.api.services.directory.model.Feature content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.Feature.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.featureKey = com.google.api.client.util.Preconditions.checkNotNull(featureKey, "Required parameter featureKey must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Patch setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the feature to update. */ @com.google.api.client.util.Key private java.lang.String featureKey; /** The unique ID of the feature to update. */ public java.lang.String getFeatureKey() { return featureKey; } /** The unique ID of the feature to update. */ public Patch setFeatureKey(java.lang.String featureKey) { this.featureKey = featureKey; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Renames a feature. * * Create a request for the method "features.rename". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Rename#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param oldName The unique ID of the feature to rename. * @param content the {@link com.google.api.services.directory.model.FeatureRename} * @return the request */ public Rename rename(java.lang.String customer, java.lang.String oldName, com.google.api.services.directory.model.FeatureRename content) throws java.io.IOException { Rename result = new Rename(customer, oldName, content); initialize(result); return result; } public class Rename extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename"; /** * Renames a feature. * * Create a request for the method "features.rename". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Rename#execute()} method to invoke the remote operation.

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

* * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param oldName The unique ID of the feature to rename. * @param content the {@link com.google.api.services.directory.model.FeatureRename} * @since 1.13 */ protected Rename(java.lang.String customer, java.lang.String oldName, com.google.api.services.directory.model.FeatureRename content) { super(Directory.this, "POST", REST_PATH, content, Void.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.oldName = com.google.api.client.util.Preconditions.checkNotNull(oldName, "Required parameter oldName must be specified."); } @Override public Rename set$Xgafv(java.lang.String $Xgafv) { return (Rename) super.set$Xgafv($Xgafv); } @Override public Rename setAccessToken(java.lang.String accessToken) { return (Rename) super.setAccessToken(accessToken); } @Override public Rename setAlt(java.lang.String alt) { return (Rename) super.setAlt(alt); } @Override public Rename setCallback(java.lang.String callback) { return (Rename) super.setCallback(callback); } @Override public Rename setFields(java.lang.String fields) { return (Rename) super.setFields(fields); } @Override public Rename setKey(java.lang.String key) { return (Rename) super.setKey(key); } @Override public Rename setOauthToken(java.lang.String oauthToken) { return (Rename) super.setOauthToken(oauthToken); } @Override public Rename setPrettyPrint(java.lang.Boolean prettyPrint) { return (Rename) super.setPrettyPrint(prettyPrint); } @Override public Rename setQuotaUser(java.lang.String quotaUser) { return (Rename) super.setQuotaUser(quotaUser); } @Override public Rename setUploadType(java.lang.String uploadType) { return (Rename) super.setUploadType(uploadType); } @Override public Rename setUploadProtocol(java.lang.String uploadProtocol) { return (Rename) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Rename setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the feature to rename. */ @com.google.api.client.util.Key private java.lang.String oldName; /** The unique ID of the feature to rename. */ public java.lang.String getOldName() { return oldName; } /** The unique ID of the feature to rename. */ public Rename setOldName(java.lang.String oldName) { this.oldName = oldName; return this; } @Override public Rename set(String parameterName, Object value) { return (Rename) super.set(parameterName, value); } } /** * Updates a feature. * * Create a request for the method "features.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param featureKey The unique ID of the feature to update. * @param content the {@link com.google.api.services.directory.model.Feature} * @return the request */ public Update update(java.lang.String customer, java.lang.String featureKey, com.google.api.services.directory.model.Feature content) throws java.io.IOException { Update result = new Update(customer, featureKey, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/resources/features/{featureKey}"; /** * Updates a feature. * * Create a request for the method "features.update". * * This request holds the parameters needed by the the admin 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 customer The unique ID for the customer's Google Workspace account. As an account administrator, you can also * use the `my_customer` alias to represent your account's customer ID. * @param featureKey The unique ID of the feature to update. * @param content the {@link com.google.api.services.directory.model.Feature} * @since 1.13 */ protected Update(java.lang.String customer, java.lang.String featureKey, com.google.api.services.directory.model.Feature content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.Feature.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.featureKey = com.google.api.client.util.Preconditions.checkNotNull(featureKey, "Required parameter featureKey must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. As an account administrator, * you can also use the `my_customer` alias to represent your account's customer ID. */ public Update setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** The unique ID of the feature to update. */ @com.google.api.client.util.Key private java.lang.String featureKey; /** The unique ID of the feature to update. */ public java.lang.String getFeatureKey() { return featureKey; } /** The unique ID of the feature to update. */ public Update setFeatureKey(java.lang.String featureKey) { this.featureKey = featureKey; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } } /** * An accessor for creating requests from the RoleAssignments collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.RoleAssignments.List request = admin.roleAssignments().list(parameters ...)}
   * 
* * @return the resource collection */ public RoleAssignments roleAssignments() { return new RoleAssignments(); } /** * The "roleAssignments" collection of methods. */ public class RoleAssignments { /** * Deletes a role assignment. * * Create a request for the method "roleAssignments.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param roleAssignmentId Immutable ID of the role assignment. * @return the request */ public Delete delete(java.lang.String customer, java.lang.String roleAssignmentId) throws java.io.IOException { Delete result = new Delete(customer, roleAssignmentId); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}"; /** * Deletes a role assignment. * * Create a request for the method "roleAssignments.delete". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param roleAssignmentId Immutable ID of the role assignment. * @since 1.13 */ protected Delete(java.lang.String customer, java.lang.String roleAssignmentId) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.roleAssignmentId = com.google.api.client.util.Preconditions.checkNotNull(roleAssignmentId, "Required parameter roleAssignmentId must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Delete setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Immutable ID of the role assignment. */ @com.google.api.client.util.Key private java.lang.String roleAssignmentId; /** Immutable ID of the role assignment. */ public java.lang.String getRoleAssignmentId() { return roleAssignmentId; } /** Immutable ID of the role assignment. */ public Delete setRoleAssignmentId(java.lang.String roleAssignmentId) { this.roleAssignmentId = roleAssignmentId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a role assignment. * * Create a request for the method "roleAssignments.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param roleAssignmentId Immutable ID of the role assignment. * @return the request */ public Get get(java.lang.String customer, java.lang.String roleAssignmentId) throws java.io.IOException { Get result = new Get(customer, roleAssignmentId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}"; /** * Retrieves a role assignment. * * Create a request for the method "roleAssignments.get". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param roleAssignmentId Immutable ID of the role assignment. * @since 1.13 */ protected Get(java.lang.String customer, java.lang.String roleAssignmentId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.RoleAssignment.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.roleAssignmentId = com.google.api.client.util.Preconditions.checkNotNull(roleAssignmentId, "Required parameter roleAssignmentId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Get setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Immutable ID of the role assignment. */ @com.google.api.client.util.Key private java.lang.String roleAssignmentId; /** Immutable ID of the role assignment. */ public java.lang.String getRoleAssignmentId() { return roleAssignmentId; } /** Immutable ID of the role assignment. */ public Get setRoleAssignmentId(java.lang.String roleAssignmentId) { this.roleAssignmentId = roleAssignmentId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a role assignment. * * Create a request for the method "roleAssignments.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.RoleAssignment} * @return the request */ public Insert insert(java.lang.String customer, com.google.api.services.directory.model.RoleAssignment content) throws java.io.IOException { Insert result = new Insert(customer, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roleassignments"; /** * Creates a role assignment. * * Create a request for the method "roleAssignments.insert". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.RoleAssignment} * @since 1.13 */ protected Insert(java.lang.String customer, com.google.api.services.directory.model.RoleAssignment content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.RoleAssignment.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Insert setCustomer(java.lang.String customer) { this.customer = customer; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a paginated list of all roleAssignments. * * Create a request for the method "roleAssignments.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @return the request */ public List list(java.lang.String customer) throws java.io.IOException { List result = new List(customer); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roleassignments"; /** * Retrieves a paginated list of all roleAssignments. * * Create a request for the method "roleAssignments.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customer Immutable ID of the Google Workspace account. * @since 1.13 */ protected List(java.lang.String customer) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.RoleAssignments.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Maximum number of results to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. [minimum: 1] [maximum: 200] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Token to specify the next page in the list. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify the next page in the list. */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify the next page in the list. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Immutable ID of a role. If included in the request, returns only role assignments * containing this role ID. */ @com.google.api.client.util.Key private java.lang.String roleId; /** Immutable ID of a role. If included in the request, returns only role assignments containing this role ID. */ public java.lang.String getRoleId() { return roleId; } /** * Immutable ID of a role. If included in the request, returns only role assignments * containing this role ID. */ public List setRoleId(java.lang.String roleId) { this.roleId = roleId; return this; } /** * The user's primary email address, alias email address, or unique user ID. If included in * the request, returns role assignments only for this user. */ @com.google.api.client.util.Key private java.lang.String userKey; /** The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user. */ public java.lang.String getUserKey() { return userKey; } /** * The user's primary email address, alias email address, or unique user ID. If included in * the request, returns role assignments only for this user. */ public List setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Roles collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Roles.List request = admin.roles().list(parameters ...)}
   * 
* * @return the resource collection */ public Roles roles() { return new Roles(); } /** * The "roles" collection of methods. */ public class Roles { /** * Deletes a role. * * Create a request for the method "roles.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param roleId Immutable ID of the role. * @return the request */ public Delete delete(java.lang.String customer, java.lang.String roleId) throws java.io.IOException { Delete result = new Delete(customer, roleId); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roles/{roleId}"; /** * Deletes a role. * * Create a request for the method "roles.delete". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param roleId Immutable ID of the role. * @since 1.13 */ protected Delete(java.lang.String customer, java.lang.String roleId) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.roleId = com.google.api.client.util.Preconditions.checkNotNull(roleId, "Required parameter roleId must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Delete setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Immutable ID of the role. */ @com.google.api.client.util.Key private java.lang.String roleId; /** Immutable ID of the role. */ public java.lang.String getRoleId() { return roleId; } /** Immutable ID of the role. */ public Delete setRoleId(java.lang.String roleId) { this.roleId = roleId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a role. * * Create a request for the method "roles.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param roleId Immutable ID of the role. * @return the request */ public Get get(java.lang.String customer, java.lang.String roleId) throws java.io.IOException { Get result = new Get(customer, roleId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roles/{roleId}"; /** * Retrieves a role. * * Create a request for the method "roles.get". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param roleId Immutable ID of the role. * @since 1.13 */ protected Get(java.lang.String customer, java.lang.String roleId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Role.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.roleId = com.google.api.client.util.Preconditions.checkNotNull(roleId, "Required parameter roleId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Get setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Immutable ID of the role. */ @com.google.api.client.util.Key private java.lang.String roleId; /** Immutable ID of the role. */ public java.lang.String getRoleId() { return roleId; } /** Immutable ID of the role. */ public Get setRoleId(java.lang.String roleId) { this.roleId = roleId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a role. * * Create a request for the method "roles.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.Role} * @return the request */ public Insert insert(java.lang.String customer, com.google.api.services.directory.model.Role content) throws java.io.IOException { Insert result = new Insert(customer, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roles"; /** * Creates a role. * * Create a request for the method "roles.insert". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.Role} * @since 1.13 */ protected Insert(java.lang.String customer, com.google.api.services.directory.model.Role content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Role.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getRoleName(), "Role.getRoleName()"); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Insert setCustomer(java.lang.String customer) { this.customer = customer; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a paginated list of all the roles in a domain. * * Create a request for the method "roles.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @return the request */ public List list(java.lang.String customer) throws java.io.IOException { List result = new List(customer); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roles"; /** * Retrieves a paginated list of all the roles in a domain. * * Create a request for the method "roles.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customer Immutable ID of the Google Workspace account. * @since 1.13 */ protected List(java.lang.String customer) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Roles.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Maximum number of results to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. [minimum: 1] [maximum: 100] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Token to specify the next page in the list. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify the next page in the list. */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify the next page in the list. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches a role. * * Create a request for the method "roles.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param roleId Immutable ID of the role. * @param content the {@link com.google.api.services.directory.model.Role} * @return the request */ public Patch patch(java.lang.String customer, java.lang.String roleId, com.google.api.services.directory.model.Role content) throws java.io.IOException { Patch result = new Patch(customer, roleId, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roles/{roleId}"; /** * Patches a role. * * Create a request for the method "roles.patch". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param roleId Immutable ID of the role. * @param content the {@link com.google.api.services.directory.model.Role} * @since 1.13 */ protected Patch(java.lang.String customer, java.lang.String roleId, com.google.api.services.directory.model.Role content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.Role.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.roleId = com.google.api.client.util.Preconditions.checkNotNull(roleId, "Required parameter roleId must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Patch setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Immutable ID of the role. */ @com.google.api.client.util.Key private java.lang.String roleId; /** Immutable ID of the role. */ public java.lang.String getRoleId() { return roleId; } /** Immutable ID of the role. */ public Patch setRoleId(java.lang.String roleId) { this.roleId = roleId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a role. * * Create a request for the method "roles.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param customer Immutable ID of the Google Workspace account. * @param roleId Immutable ID of the role. * @param content the {@link com.google.api.services.directory.model.Role} * @return the request */ public Update update(java.lang.String customer, java.lang.String roleId, com.google.api.services.directory.model.Role content) throws java.io.IOException { Update result = new Update(customer, roleId, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customer}/roles/{roleId}"; /** * Updates a role. * * Create a request for the method "roles.update". * * This request holds the parameters needed by the the admin 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 customer Immutable ID of the Google Workspace account. * @param roleId Immutable ID of the role. * @param content the {@link com.google.api.services.directory.model.Role} * @since 1.13 */ protected Update(java.lang.String customer, java.lang.String roleId, com.google.api.services.directory.model.Role content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.Role.class); this.customer = com.google.api.client.util.Preconditions.checkNotNull(customer, "Required parameter customer must be specified."); this.roleId = com.google.api.client.util.Preconditions.checkNotNull(roleId, "Required parameter roleId must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomer() { return customer; } /** Immutable ID of the Google Workspace account. */ public Update setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** Immutable ID of the role. */ @com.google.api.client.util.Key private java.lang.String roleId; /** Immutable ID of the role. */ public java.lang.String getRoleId() { return roleId; } /** Immutable ID of the role. */ public Update setRoleId(java.lang.String roleId) { this.roleId = roleId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Schemas collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Schemas.List request = admin.schemas().list(parameters ...)}
   * 
* * @return the resource collection */ public Schemas schemas() { return new Schemas(); } /** * The "schemas" collection of methods. */ public class Schemas { /** * Deletes a schema. * * Create a request for the method "schemas.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param customerId Immutable ID of the Google Workspace account. * @param schemaKey Name or immutable ID of the schema. * @return the request */ public Delete delete(java.lang.String customerId, java.lang.String schemaKey) throws java.io.IOException { Delete result = new Delete(customerId, schemaKey); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}"; /** * Deletes a schema. * * Create a request for the method "schemas.delete". * * This request holds the parameters needed by the the admin 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 customerId Immutable ID of the Google Workspace account. * @param schemaKey Name or immutable ID of the schema. * @since 1.13 */ protected Delete(java.lang.String customerId, java.lang.String schemaKey) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.schemaKey = com.google.api.client.util.Preconditions.checkNotNull(schemaKey, "Required parameter schemaKey must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomerId() { return customerId; } /** Immutable ID of the Google Workspace account. */ public Delete setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** Name or immutable ID of the schema. */ @com.google.api.client.util.Key private java.lang.String schemaKey; /** Name or immutable ID of the schema. */ public java.lang.String getSchemaKey() { return schemaKey; } /** Name or immutable ID of the schema. */ public Delete setSchemaKey(java.lang.String schemaKey) { this.schemaKey = schemaKey; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a schema. * * Create a request for the method "schemas.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param customerId Immutable ID of the Google Workspace account. * @param schemaKey Name or immutable ID of the schema. * @return the request */ public Get get(java.lang.String customerId, java.lang.String schemaKey) throws java.io.IOException { Get result = new Get(customerId, schemaKey); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}"; /** * Retrieves a schema. * * Create a request for the method "schemas.get". * * This request holds the parameters needed by the the admin 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 customerId Immutable ID of the Google Workspace account. * @param schemaKey Name or immutable ID of the schema. * @since 1.13 */ protected Get(java.lang.String customerId, java.lang.String schemaKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Schema.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.schemaKey = com.google.api.client.util.Preconditions.checkNotNull(schemaKey, "Required parameter schemaKey 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomerId() { return customerId; } /** Immutable ID of the Google Workspace account. */ public Get setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** Name or immutable ID of the schema. */ @com.google.api.client.util.Key private java.lang.String schemaKey; /** Name or immutable ID of the schema. */ public java.lang.String getSchemaKey() { return schemaKey; } /** Name or immutable ID of the schema. */ public Get setSchemaKey(java.lang.String schemaKey) { this.schemaKey = schemaKey; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a schema. * * Create a request for the method "schemas.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param customerId Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.Schema} * @return the request */ public Insert insert(java.lang.String customerId, com.google.api.services.directory.model.Schema content) throws java.io.IOException { Insert result = new Insert(customerId, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/schemas"; /** * Creates a schema. * * Create a request for the method "schemas.insert". * * This request holds the parameters needed by the the admin 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 customerId Immutable ID of the Google Workspace account. * @param content the {@link com.google.api.services.directory.model.Schema} * @since 1.13 */ protected Insert(java.lang.String customerId, com.google.api.services.directory.model.Schema content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Schema.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getDisplayName(), "Schema.getDisplayName()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getSchemaName(), "Schema.getSchemaName()"); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomerId() { return customerId; } /** Immutable ID of the Google Workspace account. */ public Insert setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves all schemas for a customer. * * Create a request for the method "schemas.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param customerId Immutable ID of the Google Workspace account. * @return the request */ public List list(java.lang.String customerId) throws java.io.IOException { List result = new List(customerId); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/schemas"; /** * Retrieves all schemas for a customer. * * Create a request for the method "schemas.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param customerId Immutable ID of the Google Workspace account. * @since 1.13 */ protected List(java.lang.String customerId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Schemas.class); 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomerId() { return customerId; } /** Immutable ID of the Google Workspace account. */ public List setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Patches a schema. * * Create a request for the method "schemas.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param customerId Immutable ID of the Google Workspace account. * @param schemaKey Name or immutable ID of the schema. * @param content the {@link com.google.api.services.directory.model.Schema} * @return the request */ public Patch patch(java.lang.String customerId, java.lang.String schemaKey, com.google.api.services.directory.model.Schema content) throws java.io.IOException { Patch result = new Patch(customerId, schemaKey, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}"; /** * Patches a schema. * * Create a request for the method "schemas.patch". * * This request holds the parameters needed by the the admin 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 customerId Immutable ID of the Google Workspace account. * @param schemaKey Name or immutable ID of the schema. * @param content the {@link com.google.api.services.directory.model.Schema} * @since 1.13 */ protected Patch(java.lang.String customerId, java.lang.String schemaKey, com.google.api.services.directory.model.Schema content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.Schema.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.schemaKey = com.google.api.client.util.Preconditions.checkNotNull(schemaKey, "Required parameter schemaKey must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomerId() { return customerId; } /** Immutable ID of the Google Workspace account. */ public Patch setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** Name or immutable ID of the schema. */ @com.google.api.client.util.Key private java.lang.String schemaKey; /** Name or immutable ID of the schema. */ public java.lang.String getSchemaKey() { return schemaKey; } /** Name or immutable ID of the schema. */ public Patch setSchemaKey(java.lang.String schemaKey) { this.schemaKey = schemaKey; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a schema. * * Create a request for the method "schemas.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param customerId Immutable ID of the Google Workspace account. * @param schemaKey Name or immutable ID of the schema. * @param content the {@link com.google.api.services.directory.model.Schema} * @return the request */ public Update update(java.lang.String customerId, java.lang.String schemaKey, com.google.api.services.directory.model.Schema content) throws java.io.IOException { Update result = new Update(customerId, schemaKey, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}"; /** * Updates a schema. * * Create a request for the method "schemas.update". * * This request holds the parameters needed by the the admin 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 customerId Immutable ID of the Google Workspace account. * @param schemaKey Name or immutable ID of the schema. * @param content the {@link com.google.api.services.directory.model.Schema} * @since 1.13 */ protected Update(java.lang.String customerId, java.lang.String schemaKey, com.google.api.services.directory.model.Schema content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.Schema.class); this.customerId = com.google.api.client.util.Preconditions.checkNotNull(customerId, "Required parameter customerId must be specified."); this.schemaKey = com.google.api.client.util.Preconditions.checkNotNull(schemaKey, "Required parameter schemaKey must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** Immutable ID of the Google Workspace account. */ @com.google.api.client.util.Key private java.lang.String customerId; /** Immutable ID of the Google Workspace account. */ public java.lang.String getCustomerId() { return customerId; } /** Immutable ID of the Google Workspace account. */ public Update setCustomerId(java.lang.String customerId) { this.customerId = customerId; return this; } /** Name or immutable ID of the schema. */ @com.google.api.client.util.Key private java.lang.String schemaKey; /** Name or immutable ID of the schema. */ public java.lang.String getSchemaKey() { return schemaKey; } /** Name or immutable ID of the schema. */ public Update setSchemaKey(java.lang.String schemaKey) { this.schemaKey = schemaKey; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Tokens collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Tokens.List request = admin.tokens().list(parameters ...)}
   * 
* * @return the resource collection */ public Tokens tokens() { return new Tokens(); } /** * The "tokens" collection of methods. */ public class Tokens { /** * Deletes all access tokens issued by a user for an application. * * Create a request for the method "tokens.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param clientId The Client ID of the application the token is issued to. * @return the request */ public Delete delete(java.lang.String userKey, java.lang.String clientId) throws java.io.IOException { Delete result = new Delete(userKey, clientId); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/tokens/{clientId}"; /** * Deletes all access tokens issued by a user for an application. * * Create a request for the method "tokens.delete". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param clientId The Client ID of the application the token is issued to. * @since 1.13 */ protected Delete(java.lang.String userKey, java.lang.String clientId) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); this.clientId = com.google.api.client.util.Preconditions.checkNotNull(clientId, "Required parameter clientId must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public Delete setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } /** The Client ID of the application the token is issued to. */ @com.google.api.client.util.Key private java.lang.String clientId; /** The Client ID of the application the token is issued to. */ public java.lang.String getClientId() { return clientId; } /** The Client ID of the application the token is issued to. */ public Delete setClientId(java.lang.String clientId) { this.clientId = clientId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets information about an access token issued by a user. * * Create a request for the method "tokens.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param clientId The Client ID of the application the token is issued to. * @return the request */ public Get get(java.lang.String userKey, java.lang.String clientId) throws java.io.IOException { Get result = new Get(userKey, clientId); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/tokens/{clientId}"; /** * Gets information about an access token issued by a user. * * Create a request for the method "tokens.get". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param clientId The Client ID of the application the token is issued to. * @since 1.13 */ protected Get(java.lang.String userKey, java.lang.String clientId) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Token.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); this.clientId = com.google.api.client.util.Preconditions.checkNotNull(clientId, "Required parameter clientId 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public Get setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } /** The Client ID of the application the token is issued to. */ @com.google.api.client.util.Key private java.lang.String clientId; /** The Client ID of the application the token is issued to. */ public java.lang.String getClientId() { return clientId; } /** The Client ID of the application the token is issued to. */ public Get setClientId(java.lang.String clientId) { this.clientId = clientId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns the set of tokens specified user has issued to 3rd party applications. * * Create a request for the method "tokens.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public List list(java.lang.String userKey) throws java.io.IOException { List result = new List(userKey); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/tokens"; /** * Returns the set of tokens specified user has issued to 3rd party applications. * * Create a request for the method "tokens.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected List(java.lang.String userKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Tokens.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public List setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the TwoStepVerification collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.TwoStepVerification.List request = admin.twoStepVerification().list(parameters ...)}
   * 
* * @return the resource collection */ public TwoStepVerification twoStepVerification() { return new TwoStepVerification(); } /** * The "twoStepVerification" collection of methods. */ public class TwoStepVerification { /** * Turns off 2-Step Verification for user. * * Create a request for the method "twoStepVerification.turnOff". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link TurnOff#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public TurnOff turnOff(java.lang.String userKey) throws java.io.IOException { TurnOff result = new TurnOff(userKey); initialize(result); return result; } public class TurnOff extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/twoStepVerification/turnOff"; /** * Turns off 2-Step Verification for user. * * Create a request for the method "twoStepVerification.turnOff". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link TurnOff#execute()} method to invoke the remote operation.

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

* * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected TurnOff(java.lang.String userKey) { super(Directory.this, "POST", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public TurnOff set$Xgafv(java.lang.String $Xgafv) { return (TurnOff) super.set$Xgafv($Xgafv); } @Override public TurnOff setAccessToken(java.lang.String accessToken) { return (TurnOff) super.setAccessToken(accessToken); } @Override public TurnOff setAlt(java.lang.String alt) { return (TurnOff) super.setAlt(alt); } @Override public TurnOff setCallback(java.lang.String callback) { return (TurnOff) super.setCallback(callback); } @Override public TurnOff setFields(java.lang.String fields) { return (TurnOff) super.setFields(fields); } @Override public TurnOff setKey(java.lang.String key) { return (TurnOff) super.setKey(key); } @Override public TurnOff setOauthToken(java.lang.String oauthToken) { return (TurnOff) super.setOauthToken(oauthToken); } @Override public TurnOff setPrettyPrint(java.lang.Boolean prettyPrint) { return (TurnOff) super.setPrettyPrint(prettyPrint); } @Override public TurnOff setQuotaUser(java.lang.String quotaUser) { return (TurnOff) super.setQuotaUser(quotaUser); } @Override public TurnOff setUploadType(java.lang.String uploadType) { return (TurnOff) super.setUploadType(uploadType); } @Override public TurnOff setUploadProtocol(java.lang.String uploadProtocol) { return (TurnOff) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public TurnOff setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public TurnOff set(String parameterName, Object value) { return (TurnOff) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Users collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.Users.List request = admin.users().list(parameters ...)}
   * 
* * @return the resource collection */ public Users users() { return new Users(); } /** * The "users" collection of methods. */ public class Users { /** * Deletes a user. * * Create a request for the method "users.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public Delete delete(java.lang.String userKey) throws java.io.IOException { Delete result = new Delete(userKey); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}"; /** * Deletes a user. * * Create a request for the method "users.delete". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected Delete(java.lang.String userKey) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public Delete setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves a user. * * Create a request for the method "users.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public Get get(java.lang.String userKey) throws java.io.IOException { Get result = new Get(userKey); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}"; /** * Retrieves a user. * * Create a request for the method "users.get". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected Get(java.lang.String userKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.User.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public Get setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } /** * A comma-separated list of schema names. All fields from these schemas are fetched. This * should only be set when `projection=custom`. */ @com.google.api.client.util.Key private java.lang.String customFieldMask; /** A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`. */ public java.lang.String getCustomFieldMask() { return customFieldMask; } /** * A comma-separated list of schema names. All fields from these schemas are fetched. This * should only be set when `projection=custom`. */ public Get setCustomFieldMask(java.lang.String customFieldMask) { this.customFieldMask = customFieldMask; return this; } /** What subset of fields to fetch for this user. */ @com.google.api.client.util.Key private java.lang.String projection; /** What subset of fields to fetch for this user. [default: basic] */ public java.lang.String getProjection() { return projection; } /** What subset of fields to fetch for this user. */ public Get setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Whether to fetch the administrator-only or domain-wide public view of the user. For more * information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides * /manage-users#retrieve_users_non_admin). */ @com.google.api.client.util.Key private java.lang.String viewType; /** Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage- users#retrieve_users_non_admin). [default: admin_view] */ public java.lang.String getViewType() { return viewType; } /** * Whether to fetch the administrator-only or domain-wide public view of the user. For more * information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides * /manage-users#retrieve_users_non_admin). */ public Get setViewType(java.lang.String viewType) { this.viewType = viewType; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a user. * * Create a request for the method "users.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param content the {@link com.google.api.services.directory.model.User} * @return the request */ public Insert insert(com.google.api.services.directory.model.User content) throws java.io.IOException { Insert result = new Insert(content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users"; /** * Creates a user. * * Create a request for the method "users.insert". * * This request holds the parameters needed by the the admin 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 content the {@link com.google.api.services.directory.model.User} * @since 1.13 */ protected Insert(com.google.api.services.directory.model.User content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.User.class); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getPassword(), "User.getPassword()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getPrimaryEmail(), "User.getPrimaryEmail()"); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Retrieves a paginated list of either deleted users or all users in a domain. * * Create a request for the method "users.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @return the request */ public List list() throws java.io.IOException { List result = new List(); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users"; /** * Retrieves a paginated list of either deleted users or all users in a domain. * * Create a request for the method "users.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @since 1.13 */ protected List() { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Users.class); } @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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * A comma-separated list of schema names. All fields from these schemas are fetched. This * should only be set when `projection=custom`. */ @com.google.api.client.util.Key private java.lang.String customFieldMask; /** A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`. */ public java.lang.String getCustomFieldMask() { return customFieldMask; } /** * A comma-separated list of schema names. All fields from these schemas are fetched. This * should only be set when `projection=custom`. */ public List setCustomFieldMask(java.lang.String customFieldMask) { this.customFieldMask = customFieldMask; return this; } /** * The unique ID for the customer's Google Workspace account. In case of a multi-domain * account, to fetch all groups for a customer, fill this field instead of domain. You can * also use the `my_customer` alias to represent your account's `customerId`. The `customerId` * is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * Either the `customer` or the `domain` parameter must be provided. */ @com.google.api.client.util.Key private java.lang.String customer; /** The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). Either the `customer` or the `domain` parameter must be provided. */ public java.lang.String getCustomer() { return customer; } /** * The unique ID for the customer's Google Workspace account. In case of a multi-domain * account, to fetch all groups for a customer, fill this field instead of domain. You can * also use the `my_customer` alias to represent your account's `customerId`. The `customerId` * is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). * Either the `customer` or the `domain` parameter must be provided. */ public List setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** * The domain name. Use this field to get groups from only one domain. To return all domains * for a customer account, use the `customer` query parameter instead. Either the `customer` * or the `domain` parameter must be provided. */ @com.google.api.client.util.Key private java.lang.String domain; /** The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the `customer` query parameter instead. Either the `customer` or the `domain` parameter must be provided. */ public java.lang.String getDomain() { return domain; } /** * The domain name. Use this field to get groups from only one domain. To return all domains * for a customer account, use the `customer` query parameter instead. Either the `customer` * or the `domain` parameter must be provided. */ public List setDomain(java.lang.String domain) { this.domain = domain; return this; } /** Event on which subscription is intended (if subscribing) */ @com.google.api.client.util.Key private java.lang.String event; /** Event on which subscription is intended (if subscribing) */ public java.lang.String getEvent() { return event; } /** Event on which subscription is intended (if subscribing) */ public List setEvent(java.lang.String event) { this.event = event; return this; } /** Maximum number of results to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. [default: 100] [minimum: 1] [maximum: 500] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Property to use for sorting results. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Property to use for sorting results. */ public java.lang.String getOrderBy() { return orderBy; } /** Property to use for sorting results. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** Token to specify next page in the list */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify next page in the list */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify next page in the list */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** What subset of fields to fetch for this user. */ @com.google.api.client.util.Key private java.lang.String projection; /** What subset of fields to fetch for this user. [default: basic] */ public java.lang.String getProjection() { return projection; } /** What subset of fields to fetch for this user. */ public List setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Query string for searching user fields. For more information on constructing user queries, * see [Search for Users](/admin-sdk/directory/v1/guides/search-users). */ @com.google.api.client.util.Key private java.lang.String query; /** Query string for searching user fields. For more information on constructing user queries, see [Search for Users](/admin-sdk/directory/v1/guides/search-users). */ public java.lang.String getQuery() { return query; } /** * Query string for searching user fields. For more information on constructing user queries, * see [Search for Users](/admin-sdk/directory/v1/guides/search-users). */ public List setQuery(java.lang.String query) { this.query = query; return this; } /** If set to `true`, retrieves the list of deleted users. (Default: `false`) */ @com.google.api.client.util.Key private java.lang.String showDeleted; /** If set to `true`, retrieves the list of deleted users. (Default: `false`) */ public java.lang.String getShowDeleted() { return showDeleted; } /** If set to `true`, retrieves the list of deleted users. (Default: `false`) */ public List setShowDeleted(java.lang.String showDeleted) { this.showDeleted = showDeleted; return this; } /** Whether to return results in ascending or descending order, ignoring case. */ @com.google.api.client.util.Key private java.lang.String sortOrder; /** Whether to return results in ascending or descending order, ignoring case. */ public java.lang.String getSortOrder() { return sortOrder; } /** Whether to return results in ascending or descending order, ignoring case. */ public List setSortOrder(java.lang.String sortOrder) { this.sortOrder = sortOrder; return this; } /** * Whether to fetch the administrator-only or domain-wide public view of the user. For more * information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides * /manage-users#retrieve_users_non_admin). */ @com.google.api.client.util.Key private java.lang.String viewType; /** Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage- users#retrieve_users_non_admin). [default: admin_view] */ public java.lang.String getViewType() { return viewType; } /** * Whether to fetch the administrator-only or domain-wide public view of the user. For more * information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides * /manage-users#retrieve_users_non_admin). */ public List setViewType(java.lang.String viewType) { this.viewType = viewType; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Makes a user a super administrator. * * Create a request for the method "users.makeAdmin". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link MakeAdmin#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.UserMakeAdmin} * @return the request */ public MakeAdmin makeAdmin(java.lang.String userKey, com.google.api.services.directory.model.UserMakeAdmin content) throws java.io.IOException { MakeAdmin result = new MakeAdmin(userKey, content); initialize(result); return result; } public class MakeAdmin extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/makeAdmin"; /** * Makes a user a super administrator. * * Create a request for the method "users.makeAdmin". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link MakeAdmin#execute()} method to invoke the remote operation.

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

* * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.UserMakeAdmin} * @since 1.13 */ protected MakeAdmin(java.lang.String userKey, com.google.api.services.directory.model.UserMakeAdmin content) { super(Directory.this, "POST", REST_PATH, content, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public MakeAdmin set$Xgafv(java.lang.String $Xgafv) { return (MakeAdmin) super.set$Xgafv($Xgafv); } @Override public MakeAdmin setAccessToken(java.lang.String accessToken) { return (MakeAdmin) super.setAccessToken(accessToken); } @Override public MakeAdmin setAlt(java.lang.String alt) { return (MakeAdmin) super.setAlt(alt); } @Override public MakeAdmin setCallback(java.lang.String callback) { return (MakeAdmin) super.setCallback(callback); } @Override public MakeAdmin setFields(java.lang.String fields) { return (MakeAdmin) super.setFields(fields); } @Override public MakeAdmin setKey(java.lang.String key) { return (MakeAdmin) super.setKey(key); } @Override public MakeAdmin setOauthToken(java.lang.String oauthToken) { return (MakeAdmin) super.setOauthToken(oauthToken); } @Override public MakeAdmin setPrettyPrint(java.lang.Boolean prettyPrint) { return (MakeAdmin) super.setPrettyPrint(prettyPrint); } @Override public MakeAdmin setQuotaUser(java.lang.String quotaUser) { return (MakeAdmin) super.setQuotaUser(quotaUser); } @Override public MakeAdmin setUploadType(java.lang.String uploadType) { return (MakeAdmin) super.setUploadType(uploadType); } @Override public MakeAdmin setUploadProtocol(java.lang.String uploadProtocol) { return (MakeAdmin) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public MakeAdmin setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public MakeAdmin set(String parameterName, Object value) { return (MakeAdmin) super.set(parameterName, value); } } /** * Updates a user using patch semantics. The update method should be used instead, since it also * supports patch semantics and has better performance. This method is unable to clear fields that * contain repeated objects (`addresses`, `phones`, etc). Use the update method instead. * * Create a request for the method "users.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.User} * @return the request */ public Patch patch(java.lang.String userKey, com.google.api.services.directory.model.User content) throws java.io.IOException { Patch result = new Patch(userKey, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}"; /** * Updates a user using patch semantics. The update method should be used instead, since it also * supports patch semantics and has better performance. This method is unable to clear fields that * contain repeated objects (`addresses`, `phones`, etc). Use the update method instead. * * Create a request for the method "users.patch". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.User} * @since 1.13 */ protected Patch(java.lang.String userKey, com.google.api.services.directory.model.User content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.User.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public Patch setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Signs a user out of all web and device sessions and reset their sign-in cookies. User will have * to sign in by authenticating again. * * Create a request for the method "users.signOut". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link SignOut#execute()} method to invoke the remote operation. * * @param userKey Identifies the target user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. * @return the request */ public SignOut signOut(java.lang.String userKey) throws java.io.IOException { SignOut result = new SignOut(userKey); initialize(result); return result; } public class SignOut extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/signOut"; /** * Signs a user out of all web and device sessions and reset their sign-in cookies. User will have * to sign in by authenticating again. * * Create a request for the method "users.signOut". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link SignOut#execute()} method to invoke the remote operation.

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

* * @param userKey Identifies the target user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. * @since 1.13 */ protected SignOut(java.lang.String userKey) { super(Directory.this, "POST", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public SignOut set$Xgafv(java.lang.String $Xgafv) { return (SignOut) super.set$Xgafv($Xgafv); } @Override public SignOut setAccessToken(java.lang.String accessToken) { return (SignOut) super.setAccessToken(accessToken); } @Override public SignOut setAlt(java.lang.String alt) { return (SignOut) super.setAlt(alt); } @Override public SignOut setCallback(java.lang.String callback) { return (SignOut) super.setCallback(callback); } @Override public SignOut setFields(java.lang.String fields) { return (SignOut) super.setFields(fields); } @Override public SignOut setKey(java.lang.String key) { return (SignOut) super.setKey(key); } @Override public SignOut setOauthToken(java.lang.String oauthToken) { return (SignOut) super.setOauthToken(oauthToken); } @Override public SignOut setPrettyPrint(java.lang.Boolean prettyPrint) { return (SignOut) super.setPrettyPrint(prettyPrint); } @Override public SignOut setQuotaUser(java.lang.String quotaUser) { return (SignOut) super.setQuotaUser(quotaUser); } @Override public SignOut setUploadType(java.lang.String uploadType) { return (SignOut) super.setUploadType(uploadType); } @Override public SignOut setUploadProtocol(java.lang.String uploadProtocol) { return (SignOut) super.setUploadProtocol(uploadProtocol); } /** * Identifies the target user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the target user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the target user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ public SignOut setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public SignOut set(String parameterName, Object value) { return (SignOut) super.set(parameterName, value); } } /** * Undeletes a deleted user. * * Create a request for the method "users.undelete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Undelete#execute()} method to invoke the remote operation. * * @param userKey The immutable id of the user * @param content the {@link com.google.api.services.directory.model.UserUndelete} * @return the request */ public Undelete undelete(java.lang.String userKey, com.google.api.services.directory.model.UserUndelete content) throws java.io.IOException { Undelete result = new Undelete(userKey, content); initialize(result); return result; } public class Undelete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/undelete"; /** * Undeletes a deleted user. * * Create a request for the method "users.undelete". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Undelete#execute()} method to invoke the remote operation.

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

* * @param userKey The immutable id of the user * @param content the {@link com.google.api.services.directory.model.UserUndelete} * @since 1.13 */ protected Undelete(java.lang.String userKey, com.google.api.services.directory.model.UserUndelete content) { super(Directory.this, "POST", REST_PATH, content, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Undelete set$Xgafv(java.lang.String $Xgafv) { return (Undelete) super.set$Xgafv($Xgafv); } @Override public Undelete setAccessToken(java.lang.String accessToken) { return (Undelete) super.setAccessToken(accessToken); } @Override public Undelete setAlt(java.lang.String alt) { return (Undelete) super.setAlt(alt); } @Override public Undelete setCallback(java.lang.String callback) { return (Undelete) super.setCallback(callback); } @Override public Undelete setFields(java.lang.String fields) { return (Undelete) super.setFields(fields); } @Override public Undelete setKey(java.lang.String key) { return (Undelete) super.setKey(key); } @Override public Undelete setOauthToken(java.lang.String oauthToken) { return (Undelete) super.setOauthToken(oauthToken); } @Override public Undelete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Undelete) super.setPrettyPrint(prettyPrint); } @Override public Undelete setQuotaUser(java.lang.String quotaUser) { return (Undelete) super.setQuotaUser(quotaUser); } @Override public Undelete setUploadType(java.lang.String uploadType) { return (Undelete) super.setUploadType(uploadType); } @Override public Undelete setUploadProtocol(java.lang.String uploadProtocol) { return (Undelete) super.setUploadProtocol(uploadProtocol); } /** The immutable id of the user */ @com.google.api.client.util.Key private java.lang.String userKey; /** The immutable id of the user */ public java.lang.String getUserKey() { return userKey; } /** The immutable id of the user */ public Undelete setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Undelete set(String parameterName, Object value) { return (Undelete) super.set(parameterName, value); } } /** * Updates a user. This method supports patch semantics, meaning you only need to include the fields * you wish to update. Fields that are not present in the request will be preserved, and fields set * to `null` will be cleared. * * Create a request for the method "users.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.User} * @return the request */ public Update update(java.lang.String userKey, com.google.api.services.directory.model.User content) throws java.io.IOException { Update result = new Update(userKey, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}"; /** * Updates a user. This method supports patch semantics, meaning you only need to include the * fields you wish to update. Fields that are not present in the request will be preserved, and * fields set to `null` will be cleared. * * Create a request for the method "users.update". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.User} * @since 1.13 */ protected Update(java.lang.String userKey, com.google.api.services.directory.model.User content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.User.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public Update setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } /** * Watches for changes in users list. * * Create a request for the method "users.watch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Watch#execute()} method to invoke the remote operation. * * @param content the {@link com.google.api.services.directory.model.Channel} * @return the request */ public Watch watch(com.google.api.services.directory.model.Channel content) throws java.io.IOException { Watch result = new Watch(content); initialize(result); return result; } public class Watch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/watch"; /** * Watches for changes in users list. * * Create a request for the method "users.watch". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Watch#execute()} method to invoke the remote operation.

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

* * @param content the {@link com.google.api.services.directory.model.Channel} * @since 1.13 */ protected Watch(com.google.api.services.directory.model.Channel content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Channel.class); } @Override public Watch set$Xgafv(java.lang.String $Xgafv) { return (Watch) super.set$Xgafv($Xgafv); } @Override public Watch setAccessToken(java.lang.String accessToken) { return (Watch) super.setAccessToken(accessToken); } @Override public Watch setAlt(java.lang.String alt) { return (Watch) super.setAlt(alt); } @Override public Watch setCallback(java.lang.String callback) { return (Watch) super.setCallback(callback); } @Override public Watch setFields(java.lang.String fields) { return (Watch) super.setFields(fields); } @Override public Watch setKey(java.lang.String key) { return (Watch) super.setKey(key); } @Override public Watch setOauthToken(java.lang.String oauthToken) { return (Watch) super.setOauthToken(oauthToken); } @Override public Watch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Watch) super.setPrettyPrint(prettyPrint); } @Override public Watch setQuotaUser(java.lang.String quotaUser) { return (Watch) super.setQuotaUser(quotaUser); } @Override public Watch setUploadType(java.lang.String uploadType) { return (Watch) super.setUploadType(uploadType); } @Override public Watch setUploadProtocol(java.lang.String uploadProtocol) { return (Watch) super.setUploadProtocol(uploadProtocol); } /** * Comma-separated list of schema names. All fields from these schemas are fetched. This * should only be set when projection=custom. */ @com.google.api.client.util.Key private java.lang.String customFieldMask; /** Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. */ public java.lang.String getCustomFieldMask() { return customFieldMask; } /** * Comma-separated list of schema names. All fields from these schemas are fetched. This * should only be set when projection=custom. */ public Watch setCustomFieldMask(java.lang.String customFieldMask) { this.customFieldMask = customFieldMask; return this; } /** * Immutable ID of the Google Workspace account. In case of multi-domain, to fetch all users * for a customer, fill this field instead of domain. */ @com.google.api.client.util.Key private java.lang.String customer; /** Immutable ID of the Google Workspace account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain. */ public java.lang.String getCustomer() { return customer; } /** * Immutable ID of the Google Workspace account. In case of multi-domain, to fetch all users * for a customer, fill this field instead of domain. */ public Watch setCustomer(java.lang.String customer) { this.customer = customer; return this; } /** * Name of the domain. Fill this field to get users from only this domain. To return all users * in a multi-domain fill customer field instead." */ @com.google.api.client.util.Key private java.lang.String domain; /** Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead." */ public java.lang.String getDomain() { return domain; } /** * Name of the domain. Fill this field to get users from only this domain. To return all users * in a multi-domain fill customer field instead." */ public Watch setDomain(java.lang.String domain) { this.domain = domain; return this; } /** Events to watch for. */ @com.google.api.client.util.Key private java.lang.String event; /** Events to watch for. */ public java.lang.String getEvent() { return event; } /** Events to watch for. */ public Watch setEvent(java.lang.String event) { this.event = event; return this; } /** Maximum number of results to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of results to return. [default: 100] [minimum: 1] [maximum: 500] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of results to return. */ public Watch setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Column to use for sorting results */ @com.google.api.client.util.Key private java.lang.String orderBy; /** Column to use for sorting results */ public java.lang.String getOrderBy() { return orderBy; } /** Column to use for sorting results */ public Watch setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** Token to specify next page in the list */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Token to specify next page in the list */ public java.lang.String getPageToken() { return pageToken; } /** Token to specify next page in the list */ public Watch setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** What subset of fields to fetch for this user. */ @com.google.api.client.util.Key private java.lang.String projection; /** What subset of fields to fetch for this user. [default: basic] */ public java.lang.String getProjection() { return projection; } /** What subset of fields to fetch for this user. */ public Watch setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Query string search. Should be of the form "". Complete documentation is at https: * //developers.google.com/admin-sdk/directory/v1/guides/search-users */ @com.google.api.client.util.Key private java.lang.String query; /** Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-users */ public java.lang.String getQuery() { return query; } /** * Query string search. Should be of the form "". Complete documentation is at https: * //developers.google.com/admin-sdk/directory/v1/guides/search-users */ public Watch setQuery(java.lang.String query) { this.query = query; return this; } /** If set to true, retrieves the list of deleted users. (Default: false) */ @com.google.api.client.util.Key private java.lang.String showDeleted; /** If set to true, retrieves the list of deleted users. (Default: false) */ public java.lang.String getShowDeleted() { return showDeleted; } /** If set to true, retrieves the list of deleted users. (Default: false) */ public Watch setShowDeleted(java.lang.String showDeleted) { this.showDeleted = showDeleted; return this; } /** Whether to return results in ascending or descending order. */ @com.google.api.client.util.Key private java.lang.String sortOrder; /** Whether to return results in ascending or descending order. */ public java.lang.String getSortOrder() { return sortOrder; } /** Whether to return results in ascending or descending order. */ public Watch setSortOrder(java.lang.String sortOrder) { this.sortOrder = sortOrder; return this; } /** * Whether to fetch the administrator-only or domain-wide public view of the user. For more * information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides * /manage-users#retrieve_users_non_admin). */ @com.google.api.client.util.Key private java.lang.String viewType; /** Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage- users#retrieve_users_non_admin). [default: admin_view] */ public java.lang.String getViewType() { return viewType; } /** * Whether to fetch the administrator-only or domain-wide public view of the user. For more * information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides * /manage-users#retrieve_users_non_admin). */ public Watch setViewType(java.lang.String viewType) { this.viewType = viewType; return this; } @Override public Watch set(String parameterName, Object value) { return (Watch) super.set(parameterName, value); } } /** * An accessor for creating requests from the Aliases collection. * *

The typical use is:

*
     *   {@code Directory admin = new Directory(...);}
     *   {@code Directory.Aliases.List request = admin.aliases().list(parameters ...)}
     * 
* * @return the resource collection */ public Aliases aliases() { return new Aliases(); } /** * The "aliases" collection of methods. */ public class Aliases { /** * Removes an alias. * * Create a request for the method "aliases.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param alias The alias to be removed. * @return the request */ public Delete delete(java.lang.String userKey, java.lang.String alias) throws java.io.IOException { Delete result = new Delete(userKey, alias); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/aliases/{alias}"; /** * Removes an alias. * * Create a request for the method "aliases.delete". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param alias The alias to be removed. * @since 1.13 */ protected Delete(java.lang.String userKey, java.lang.String alias) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); this.alias = com.google.api.client.util.Preconditions.checkNotNull(alias, "Required parameter alias must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ public Delete setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } /** The alias to be removed. */ @com.google.api.client.util.Key private java.lang.String alias; /** The alias to be removed. */ public java.lang.String getAlias() { return alias; } /** The alias to be removed. */ public Delete setAlias(java.lang.String alias) { this.alias = alias; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Adds an alias. * * Create a request for the method "aliases.insert". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.Alias} * @return the request */ public Insert insert(java.lang.String userKey, com.google.api.services.directory.model.Alias content) throws java.io.IOException { Insert result = new Insert(userKey, content); initialize(result); return result; } public class Insert extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/aliases"; /** * Adds an alias. * * Create a request for the method "aliases.insert". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.Alias} * @since 1.13 */ protected Insert(java.lang.String userKey, com.google.api.services.directory.model.Alias content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Alias.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Insert set$Xgafv(java.lang.String $Xgafv) { return (Insert) super.set$Xgafv($Xgafv); } @Override public Insert setAccessToken(java.lang.String accessToken) { return (Insert) super.setAccessToken(accessToken); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setCallback(java.lang.String callback) { return (Insert) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Insert) super.setUploadType(uploadType); } @Override public Insert setUploadProtocol(java.lang.String uploadProtocol) { return (Insert) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ public Insert setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all aliases for a user. * * Create a request for the method "aliases.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public List list(java.lang.String userKey) throws java.io.IOException { List result = new List(userKey); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/aliases"; /** * Lists all aliases for a user. * * Create a request for the method "aliases.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected List(java.lang.String userKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.Aliases.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ public List setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } /** Events to watch for. */ @com.google.api.client.util.Key private java.lang.String event; /** Events to watch for. */ public java.lang.String getEvent() { return event; } /** Events to watch for. */ public List setEvent(java.lang.String event) { this.event = event; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Watches for changes in users list. * * Create a request for the method "aliases.watch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Watch#execute()} method to invoke the remote operation. * * @param userKey Email or immutable ID of the user * @param content the {@link com.google.api.services.directory.model.Channel} * @return the request */ public Watch watch(java.lang.String userKey, com.google.api.services.directory.model.Channel content) throws java.io.IOException { Watch result = new Watch(userKey, content); initialize(result); return result; } public class Watch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/aliases/watch"; /** * Watches for changes in users list. * * Create a request for the method "aliases.watch". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Watch#execute()} method to invoke the remote operation.

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

* * @param userKey Email or immutable ID of the user * @param content the {@link com.google.api.services.directory.model.Channel} * @since 1.13 */ protected Watch(java.lang.String userKey, com.google.api.services.directory.model.Channel content) { super(Directory.this, "POST", REST_PATH, content, com.google.api.services.directory.model.Channel.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Watch set$Xgafv(java.lang.String $Xgafv) { return (Watch) super.set$Xgafv($Xgafv); } @Override public Watch setAccessToken(java.lang.String accessToken) { return (Watch) super.setAccessToken(accessToken); } @Override public Watch setAlt(java.lang.String alt) { return (Watch) super.setAlt(alt); } @Override public Watch setCallback(java.lang.String callback) { return (Watch) super.setCallback(callback); } @Override public Watch setFields(java.lang.String fields) { return (Watch) super.setFields(fields); } @Override public Watch setKey(java.lang.String key) { return (Watch) super.setKey(key); } @Override public Watch setOauthToken(java.lang.String oauthToken) { return (Watch) super.setOauthToken(oauthToken); } @Override public Watch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Watch) super.setPrettyPrint(prettyPrint); } @Override public Watch setQuotaUser(java.lang.String quotaUser) { return (Watch) super.setQuotaUser(quotaUser); } @Override public Watch setUploadType(java.lang.String uploadType) { return (Watch) super.setUploadType(uploadType); } @Override public Watch setUploadProtocol(java.lang.String uploadProtocol) { return (Watch) super.setUploadProtocol(uploadProtocol); } /** Email or immutable ID of the user */ @com.google.api.client.util.Key private java.lang.String userKey; /** Email or immutable ID of the user */ public java.lang.String getUserKey() { return userKey; } /** Email or immutable ID of the user */ public Watch setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } /** Events to watch for. */ @com.google.api.client.util.Key private java.lang.String event; /** Events to watch for. */ public java.lang.String getEvent() { return event; } /** Events to watch for. */ public Watch setEvent(java.lang.String event) { this.event = event; return this; } @Override public Watch set(String parameterName, Object value) { return (Watch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Photos collection. * *

The typical use is:

*
     *   {@code Directory admin = new Directory(...);}
     *   {@code Directory.Photos.List request = admin.photos().list(parameters ...)}
     * 
* * @return the resource collection */ public Photos photos() { return new Photos(); } /** * The "photos" collection of methods. */ public class Photos { /** * Removes the user's photo. * * Create a request for the method "photos.delete". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public Delete delete(java.lang.String userKey) throws java.io.IOException { Delete result = new Delete(userKey); initialize(result); return result; } public class Delete extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/photos/thumbnail"; /** * Removes the user's photo. * * Create a request for the method "photos.delete". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected Delete(java.lang.String userKey) { super(Directory.this, "DELETE", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Delete set$Xgafv(java.lang.String $Xgafv) { return (Delete) super.set$Xgafv($Xgafv); } @Override public Delete setAccessToken(java.lang.String accessToken) { return (Delete) super.setAccessToken(accessToken); } @Override public Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setCallback(java.lang.String callback) { return (Delete) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Delete) super.setUploadType(uploadType); } @Override public Delete setUploadProtocol(java.lang.String uploadProtocol) { return (Delete) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ public Delete setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves the user's photo. * * Create a request for the method "photos.get". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public Get get(java.lang.String userKey) throws java.io.IOException { Get result = new Get(userKey); initialize(result); return result; } public class Get extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/photos/thumbnail"; /** * Retrieves the user's photo. * * Create a request for the method "photos.get". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected Get(java.lang.String userKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.UserPhoto.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey 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 set$Xgafv(java.lang.String $Xgafv) { return (Get) super.set$Xgafv($Xgafv); } @Override public Get setAccessToken(java.lang.String accessToken) { return (Get) super.setAccessToken(accessToken); } @Override public Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setCallback(java.lang.String callback) { return (Get) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Get) super.setUploadType(uploadType); } @Override public Get setUploadProtocol(java.lang.String uploadProtocol) { return (Get) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ public Get setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Adds a photo for the user. This method supports [patch semantics](/admin- * sdk/directory/v1/guides/performance#patch). * * Create a request for the method "photos.patch". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.UserPhoto} * @return the request */ public Patch patch(java.lang.String userKey, com.google.api.services.directory.model.UserPhoto content) throws java.io.IOException { Patch result = new Patch(userKey, content); initialize(result); return result; } public class Patch extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/photos/thumbnail"; /** * Adds a photo for the user. This method supports [patch semantics](/admin- * sdk/directory/v1/guides/performance#patch). * * Create a request for the method "photos.patch". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.UserPhoto} * @since 1.13 */ protected Patch(java.lang.String userKey, com.google.api.services.directory.model.UserPhoto content) { super(Directory.this, "PATCH", REST_PATH, content, com.google.api.services.directory.model.UserPhoto.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Patch set$Xgafv(java.lang.String $Xgafv) { return (Patch) super.set$Xgafv($Xgafv); } @Override public Patch setAccessToken(java.lang.String accessToken) { return (Patch) super.setAccessToken(accessToken); } @Override public Patch setAlt(java.lang.String alt) { return (Patch) super.setAlt(alt); } @Override public Patch setCallback(java.lang.String callback) { return (Patch) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Patch) super.setUploadType(uploadType); } @Override public Patch setUploadProtocol(java.lang.String uploadProtocol) { return (Patch) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ public Patch setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Adds a photo for the user. * * Create a request for the method "photos.update". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.UserPhoto} * @return the request */ public Update update(java.lang.String userKey, com.google.api.services.directory.model.UserPhoto content) throws java.io.IOException { Update result = new Update(userKey, content); initialize(result); return result; } public class Update extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/photos/thumbnail"; /** * Adds a photo for the user. * * Create a request for the method "photos.update". * * This request holds the parameters needed by the the admin 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 userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @param content the {@link com.google.api.services.directory.model.UserPhoto} * @since 1.13 */ protected Update(java.lang.String userKey, com.google.api.services.directory.model.UserPhoto content) { super(Directory.this, "PUT", REST_PATH, content, com.google.api.services.directory.model.UserPhoto.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getPhotoData(), "UserPhoto.getPhotoData()"); } @Override public Update set$Xgafv(java.lang.String $Xgafv) { return (Update) super.set$Xgafv($Xgafv); } @Override public Update setAccessToken(java.lang.String accessToken) { return (Update) super.setAccessToken(accessToken); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setCallback(java.lang.String callback) { return (Update) super.setCallback(callback); } @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 setUploadType(java.lang.String uploadType) { return (Update) super.setUploadType(uploadType); } @Override public Update setUploadProtocol(java.lang.String uploadProtocol) { return (Update) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email * address, alias email address, or unique user ID. */ public Update setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } } /** * An accessor for creating requests from the VerificationCodes collection. * *

The typical use is:

*
   *   {@code Directory admin = new Directory(...);}
   *   {@code Directory.VerificationCodes.List request = admin.verificationCodes().list(parameters ...)}
   * 
* * @return the resource collection */ public VerificationCodes verificationCodes() { return new VerificationCodes(); } /** * The "verificationCodes" collection of methods. */ public class VerificationCodes { /** * Generates new backup verification codes for the user. * * Create a request for the method "verificationCodes.generate". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Generate#execute()} method to invoke the remote operation. * * @param userKey Email or immutable ID of the user * @return the request */ public Generate generate(java.lang.String userKey) throws java.io.IOException { Generate result = new Generate(userKey); initialize(result); return result; } public class Generate extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/verificationCodes/generate"; /** * Generates new backup verification codes for the user. * * Create a request for the method "verificationCodes.generate". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Generate#execute()} method to invoke the remote operation.

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

* * @param userKey Email or immutable ID of the user * @since 1.13 */ protected Generate(java.lang.String userKey) { super(Directory.this, "POST", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Generate set$Xgafv(java.lang.String $Xgafv) { return (Generate) super.set$Xgafv($Xgafv); } @Override public Generate setAccessToken(java.lang.String accessToken) { return (Generate) super.setAccessToken(accessToken); } @Override public Generate setAlt(java.lang.String alt) { return (Generate) super.setAlt(alt); } @Override public Generate setCallback(java.lang.String callback) { return (Generate) super.setCallback(callback); } @Override public Generate setFields(java.lang.String fields) { return (Generate) super.setFields(fields); } @Override public Generate setKey(java.lang.String key) { return (Generate) super.setKey(key); } @Override public Generate setOauthToken(java.lang.String oauthToken) { return (Generate) super.setOauthToken(oauthToken); } @Override public Generate setPrettyPrint(java.lang.Boolean prettyPrint) { return (Generate) super.setPrettyPrint(prettyPrint); } @Override public Generate setQuotaUser(java.lang.String quotaUser) { return (Generate) super.setQuotaUser(quotaUser); } @Override public Generate setUploadType(java.lang.String uploadType) { return (Generate) super.setUploadType(uploadType); } @Override public Generate setUploadProtocol(java.lang.String uploadProtocol) { return (Generate) super.setUploadProtocol(uploadProtocol); } /** Email or immutable ID of the user */ @com.google.api.client.util.Key private java.lang.String userKey; /** Email or immutable ID of the user */ public java.lang.String getUserKey() { return userKey; } /** Email or immutable ID of the user */ public Generate setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Generate set(String parameterName, Object value) { return (Generate) super.set(parameterName, value); } } /** * Invalidates the current backup verification codes for the user. * * Create a request for the method "verificationCodes.invalidate". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link Invalidate#execute()} method to invoke the remote operation. * * @param userKey Email or immutable ID of the user * @return the request */ public Invalidate invalidate(java.lang.String userKey) throws java.io.IOException { Invalidate result = new Invalidate(userKey); initialize(result); return result; } public class Invalidate extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/verificationCodes/invalidate"; /** * Invalidates the current backup verification codes for the user. * * Create a request for the method "verificationCodes.invalidate". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link Invalidate#execute()} method to invoke the remote operation.

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

* * @param userKey Email or immutable ID of the user * @since 1.13 */ protected Invalidate(java.lang.String userKey) { super(Directory.this, "POST", REST_PATH, null, Void.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey must be specified."); } @Override public Invalidate set$Xgafv(java.lang.String $Xgafv) { return (Invalidate) super.set$Xgafv($Xgafv); } @Override public Invalidate setAccessToken(java.lang.String accessToken) { return (Invalidate) super.setAccessToken(accessToken); } @Override public Invalidate setAlt(java.lang.String alt) { return (Invalidate) super.setAlt(alt); } @Override public Invalidate setCallback(java.lang.String callback) { return (Invalidate) super.setCallback(callback); } @Override public Invalidate setFields(java.lang.String fields) { return (Invalidate) super.setFields(fields); } @Override public Invalidate setKey(java.lang.String key) { return (Invalidate) super.setKey(key); } @Override public Invalidate setOauthToken(java.lang.String oauthToken) { return (Invalidate) super.setOauthToken(oauthToken); } @Override public Invalidate setPrettyPrint(java.lang.Boolean prettyPrint) { return (Invalidate) super.setPrettyPrint(prettyPrint); } @Override public Invalidate setQuotaUser(java.lang.String quotaUser) { return (Invalidate) super.setQuotaUser(quotaUser); } @Override public Invalidate setUploadType(java.lang.String uploadType) { return (Invalidate) super.setUploadType(uploadType); } @Override public Invalidate setUploadProtocol(java.lang.String uploadProtocol) { return (Invalidate) super.setUploadProtocol(uploadProtocol); } /** Email or immutable ID of the user */ @com.google.api.client.util.Key private java.lang.String userKey; /** Email or immutable ID of the user */ public java.lang.String getUserKey() { return userKey; } /** Email or immutable ID of the user */ public Invalidate setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public Invalidate set(String parameterName, Object value) { return (Invalidate) super.set(parameterName, value); } } /** * Returns the current set of valid backup verification codes for the specified user. * * Create a request for the method "verificationCodes.list". * * This request holds the parameters needed by the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @return the request */ public List list(java.lang.String userKey) throws java.io.IOException { List result = new List(userKey); initialize(result); return result; } public class List extends DirectoryRequest { private static final String REST_PATH = "admin/directory/v1/users/{userKey}/verificationCodes"; /** * Returns the current set of valid backup verification codes for the specified user. * * Create a request for the method "verificationCodes.list". * * This request holds the parameters needed by the the admin server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation.

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

* * @param userKey Identifies the user in the API request. The value can be the user's primary email address, alias * email address, or unique user ID. * @since 1.13 */ protected List(java.lang.String userKey) { super(Directory.this, "GET", REST_PATH, null, com.google.api.services.directory.model.VerificationCodes.class); this.userKey = com.google.api.client.util.Preconditions.checkNotNull(userKey, "Required parameter userKey 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 List set$Xgafv(java.lang.String $Xgafv) { return (List) super.set$Xgafv($Xgafv); } @Override public List setAccessToken(java.lang.String accessToken) { return (List) super.setAccessToken(accessToken); } @Override public List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setCallback(java.lang.String callback) { return (List) super.setCallback(callback); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUploadType(java.lang.String uploadType) { return (List) super.setUploadType(uploadType); } @Override public List setUploadProtocol(java.lang.String uploadProtocol) { return (List) super.setUploadProtocol(uploadProtocol); } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ @com.google.api.client.util.Key private java.lang.String userKey; /** Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. */ public java.lang.String getUserKey() { return userKey; } /** * Identifies the user in the API request. The value can be the user's primary email address, * alias email address, or unique user ID. */ public List setUserKey(java.lang.String userKey) { this.userKey = userKey; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * Builder for {@link Directory}. * *

* Implementation is not thread-safe. *

* * @since 1.3.0 */ public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) { // If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint. // If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS. // Use the regular endpoint for all other cases. String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT"); useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint; if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) { return DEFAULT_MTLS_ROOT_URL; } return DEFAULT_ROOT_URL; } /** * 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, Builder.chooseEndpoint(transport), DEFAULT_SERVICE_PATH, httpRequestInitializer, false); setBatchPath(DEFAULT_BATCH_PATH); } /** Builds a new instance of {@link Directory}. */ @Override public Directory build() { return new Directory(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 DirectoryRequestInitializer}. * * @since 1.12 */ public Builder setDirectoryRequestInitializer( DirectoryRequestInitializer directoryRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(directoryRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy