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

com.google.api.services.drive.Drive Maven / Gradle / Ivy

There is a newer version: v3-rev20241206-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.drive;

/**
 * Service definition for Drive (v2).
 *
 * 

* The Google Drive API allows clients to access resources from Google Drive. *

* *

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

* *

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

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Drive 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 Google Drive API library.", com.google.api.client.googleapis.GoogleUtils.VERSION); } /** * The default encoded root URL of the service. This is determined when the library is generated * and normally should not be changed. * * @since 1.7 */ public static final String DEFAULT_ROOT_URL = "https://www.googleapis.com/"; /** * The default encoded 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://www.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 = "drive/v2/"; /** * 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/drive/v2"; /** * 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 Drive(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 */ Drive(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 About collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.About.List request = drive.about().list(parameters ...)}
   * 
* * @return the resource collection */ public About about() { return new About(); } /** * The "about" collection of methods. */ public class About { /** * Gets the information about the current user along with Drive API settings * * Create a request for the method "about.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @return the request */ public Get get() throws java.io.IOException { Get result = new Get(); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "about"; /** * Gets the information about the current user along with Drive API settings * * Create a request for the method "about.get". * * This request holds the parameters needed by the the drive 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.

* * @since 1.13 */ protected Get() { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.About.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 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); } /** * Whether to count changes outside the My Drive hierarchy. When set to false, changes to * files such as those in the Application Data folder or shared files which have not been * added to My Drive will be omitted from the `maxChangeIdCount`. */ @com.google.api.client.util.Key private java.lang.Boolean includeSubscribed; /** Whether to count changes outside the My Drive hierarchy. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the `maxChangeIdCount`. [default: true] */ public java.lang.Boolean getIncludeSubscribed() { return includeSubscribed; } /** * Whether to count changes outside the My Drive hierarchy. When set to false, changes to * files such as those in the Application Data folder or shared files which have not been * added to My Drive will be omitted from the `maxChangeIdCount`. */ public Get setIncludeSubscribed(java.lang.Boolean includeSubscribed) { this.includeSubscribed = includeSubscribed; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to count changes outside the My Drive hierarchy. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the `maxChangeIdCount`. *

*/ public boolean isIncludeSubscribed() { if (includeSubscribed == null || includeSubscribed == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return includeSubscribed; } /** Maximum number of remaining change IDs to count */ @com.google.api.client.util.Key private java.lang.Long maxChangeIdCount; /** Maximum number of remaining change IDs to count [default: 1] */ public java.lang.Long getMaxChangeIdCount() { return maxChangeIdCount; } /** Maximum number of remaining change IDs to count */ public Get setMaxChangeIdCount(java.lang.Long maxChangeIdCount) { this.maxChangeIdCount = maxChangeIdCount; return this; } /** Change ID to start counting from when calculating number of remaining change IDs */ @com.google.api.client.util.Key private java.lang.Long startChangeId; /** Change ID to start counting from when calculating number of remaining change IDs */ public java.lang.Long getStartChangeId() { return startChangeId; } /** Change ID to start counting from when calculating number of remaining change IDs */ public Get setStartChangeId(java.lang.Long startChangeId) { this.startChangeId = startChangeId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Apps collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Apps.List request = drive.apps().list(parameters ...)}
   * 
* * @return the resource collection */ public Apps apps() { return new Apps(); } /** * The "apps" collection of methods. */ public class Apps { /** * Gets a specific app. * * Create a request for the method "apps.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param appId The ID of the app. * @return the request */ public Get get(java.lang.String appId) throws java.io.IOException { Get result = new Get(appId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "apps/{appId}"; /** * Gets a specific app. * * Create a request for the method "apps.get". * * This request holds the parameters needed by the the drive 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 appId The ID of the app. * @since 1.13 */ protected Get(java.lang.String appId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.App.class); this.appId = com.google.api.client.util.Preconditions.checkNotNull(appId, "Required parameter appId 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 ID of the app. */ @com.google.api.client.util.Key private java.lang.String appId; /** The ID of the app. */ public java.lang.String getAppId() { return appId; } /** The ID of the app. */ public Get setAppId(java.lang.String appId) { this.appId = appId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists a user's installed apps. * * Create a request for the method "apps.list". * * This request holds the parameters needed by the drive 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 DriveRequest { private static final String REST_PATH = "apps"; /** * Lists a user's installed apps. * * Create a request for the method "apps.list". * * This request holds the parameters needed by the the drive 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(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.AppList.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 file extensions for open with filtering. All apps within the * given app query scope which can open any of the given file extensions will be included in * the response. If `appFilterMimeTypes` are provided as well, the result is a union of the * two resulting app lists. */ @com.google.api.client.util.Key private java.lang.String appFilterExtensions; /** A comma-separated list of file extensions for open with filtering. All apps within the given app query scope which can open any of the given file extensions will be included in the response. If `appFilterMimeTypes` are provided as well, the result is a union of the two resulting app lists. */ public java.lang.String getAppFilterExtensions() { return appFilterExtensions; } /** * A comma-separated list of file extensions for open with filtering. All apps within the * given app query scope which can open any of the given file extensions will be included in * the response. If `appFilterMimeTypes` are provided as well, the result is a union of the * two resulting app lists. */ public List setAppFilterExtensions(java.lang.String appFilterExtensions) { this.appFilterExtensions = appFilterExtensions; return this; } /** * A comma-separated list of MIME types for open with filtering. All apps within the given app * query scope which can open any of the given MIME types will be included in the response. If * `appFilterExtensions` are provided as well, the result is a union of the two resulting app * lists. */ @com.google.api.client.util.Key private java.lang.String appFilterMimeTypes; /** A comma-separated list of MIME types for open with filtering. All apps within the given app query scope which can open any of the given MIME types will be included in the response. If `appFilterExtensions` are provided as well, the result is a union of the two resulting app lists. */ public java.lang.String getAppFilterMimeTypes() { return appFilterMimeTypes; } /** * A comma-separated list of MIME types for open with filtering. All apps within the given app * query scope which can open any of the given MIME types will be included in the response. If * `appFilterExtensions` are provided as well, the result is a union of the two resulting app * lists. */ public List setAppFilterMimeTypes(java.lang.String appFilterMimeTypes) { this.appFilterMimeTypes = appFilterMimeTypes; return this; } /** * A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML * format (http://www.unicode.org/reports/tr35/). */ @com.google.api.client.util.Key private java.lang.String languageCode; /** A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/). */ public java.lang.String getLanguageCode() { return languageCode; } /** * A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML * format (http://www.unicode.org/reports/tr35/). */ public List setLanguageCode(java.lang.String languageCode) { this.languageCode = languageCode; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Changes collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Changes.List request = drive.changes().list(parameters ...)}
   * 
* * @return the resource collection */ public Changes changes() { return new Changes(); } /** * The "changes" collection of methods. */ public class Changes { /** * Deprecated: Use `changes.getStartPageToken` and `changes.list` to retrieve recent changes. * * Create a request for the method "changes.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param changeId The ID of the change. * @return the request */ public Get get(java.lang.String changeId) throws java.io.IOException { Get result = new Get(changeId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "changes/{changeId}"; /** * Deprecated: Use `changes.getStartPageToken` and `changes.list` to retrieve recent changes. * * Create a request for the method "changes.get". * * This request holds the parameters needed by the the drive 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 changeId The ID of the change. * @since 1.13 */ protected Get(java.lang.String changeId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.Change.class); this.changeId = com.google.api.client.util.Preconditions.checkNotNull(changeId, "Required parameter changeId 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 ID of the change. */ @com.google.api.client.util.Key private java.lang.String changeId; /** The ID of the change. */ public java.lang.String getChangeId() { return changeId; } /** The ID of the change. */ public Get setChangeId(java.lang.String changeId) { this.changeId = changeId; return this; } /** The shared drive from which the change will be returned. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The shared drive from which the change will be returned. */ public java.lang.String getDriveId() { return driveId; } /** The shared drive from which the change will be returned. */ public Get setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Get setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Get setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** Deprecated: Use `driveId` instead. */ @com.google.api.client.util.Key private java.lang.String teamDriveId; /** Deprecated: Use `driveId` instead. */ public java.lang.String getTeamDriveId() { return teamDriveId; } /** Deprecated: Use `driveId` instead. */ public Get setTeamDriveId(java.lang.String teamDriveId) { this.teamDriveId = teamDriveId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Gets the starting pageToken for listing future changes. * * Create a request for the method "changes.getStartPageToken". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link GetStartPageToken#execute()} method to invoke the remote operation. * * @return the request */ public GetStartPageToken getStartPageToken() throws java.io.IOException { GetStartPageToken result = new GetStartPageToken(); initialize(result); return result; } public class GetStartPageToken extends DriveRequest { private static final String REST_PATH = "changes/startPageToken"; /** * Gets the starting pageToken for listing future changes. * * Create a request for the method "changes.getStartPageToken". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link GetStartPageToken#execute()} method to invoke the remote operation. *

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

* * @since 1.13 */ protected GetStartPageToken() { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.StartPageToken.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 GetStartPageToken set$Xgafv(java.lang.String $Xgafv) { return (GetStartPageToken) super.set$Xgafv($Xgafv); } @Override public GetStartPageToken setAccessToken(java.lang.String accessToken) { return (GetStartPageToken) super.setAccessToken(accessToken); } @Override public GetStartPageToken setAlt(java.lang.String alt) { return (GetStartPageToken) super.setAlt(alt); } @Override public GetStartPageToken setCallback(java.lang.String callback) { return (GetStartPageToken) super.setCallback(callback); } @Override public GetStartPageToken setFields(java.lang.String fields) { return (GetStartPageToken) super.setFields(fields); } @Override public GetStartPageToken setKey(java.lang.String key) { return (GetStartPageToken) super.setKey(key); } @Override public GetStartPageToken setOauthToken(java.lang.String oauthToken) { return (GetStartPageToken) super.setOauthToken(oauthToken); } @Override public GetStartPageToken setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetStartPageToken) super.setPrettyPrint(prettyPrint); } @Override public GetStartPageToken setQuotaUser(java.lang.String quotaUser) { return (GetStartPageToken) super.setQuotaUser(quotaUser); } @Override public GetStartPageToken setUploadType(java.lang.String uploadType) { return (GetStartPageToken) super.setUploadType(uploadType); } @Override public GetStartPageToken setUploadProtocol(java.lang.String uploadProtocol) { return (GetStartPageToken) super.setUploadProtocol(uploadProtocol); } /** * The ID of the shared drive for which the starting pageToken for listing future changes from * that shared drive will be returned. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned. */ public java.lang.String getDriveId() { return driveId; } /** * The ID of the shared drive for which the starting pageToken for listing future changes from * that shared drive will be returned. */ public GetStartPageToken setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public GetStartPageToken setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public GetStartPageToken setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** Deprecated: Use `driveId` instead. */ @com.google.api.client.util.Key private java.lang.String teamDriveId; /** Deprecated: Use `driveId` instead. */ public java.lang.String getTeamDriveId() { return teamDriveId; } /** Deprecated: Use `driveId` instead. */ public GetStartPageToken setTeamDriveId(java.lang.String teamDriveId) { this.teamDriveId = teamDriveId; return this; } @Override public GetStartPageToken set(String parameterName, Object value) { return (GetStartPageToken) super.set(parameterName, value); } } /** * Lists the changes for a user or shared drive. * * Create a request for the method "changes.list". * * This request holds the parameters needed by the drive 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 DriveRequest { private static final String REST_PATH = "changes"; /** * Lists the changes for a user or shared drive. * * Create a request for the method "changes.list". * * This request holds the parameters needed by the the drive 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(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.ChangeList.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 shared drive from which changes will be returned. If specified the change IDs will be * reflective of the shared drive; use the combined drive ID and change ID as an identifier. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier. */ public java.lang.String getDriveId() { return driveId; } /** * The shared drive from which changes will be returned. If specified the change IDs will be * reflective of the shared drive; use the combined drive ID and change ID as an identifier. */ public List setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** * Whether changes should include the file resource if the file is still accessible by the * user at the time of the request, even when a file was removed from the list of changes and * there will be no further change entries for this file. */ @com.google.api.client.util.Key private java.lang.Boolean includeCorpusRemovals; /** Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. [default: false] */ public java.lang.Boolean getIncludeCorpusRemovals() { return includeCorpusRemovals; } /** * Whether changes should include the file resource if the file is still accessible by the * user at the time of the request, even when a file was removed from the list of changes and * there will be no further change entries for this file. */ public List setIncludeCorpusRemovals(java.lang.Boolean includeCorpusRemovals) { this.includeCorpusRemovals = includeCorpusRemovals; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. *

*/ public boolean isIncludeCorpusRemovals() { if (includeCorpusRemovals == null || includeCorpusRemovals == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeCorpusRemovals; } /** * Whether to include changes indicating that items have been removed from the list of * changes, for example by deletion or loss of access. */ @com.google.api.client.util.Key private java.lang.Boolean includeDeleted; /** Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. [default: true] */ public java.lang.Boolean getIncludeDeleted() { return includeDeleted; } /** * Whether to include changes indicating that items have been removed from the list of * changes, for example by deletion or loss of access. */ public List setIncludeDeleted(java.lang.Boolean includeDeleted) { this.includeDeleted = includeDeleted; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. *

*/ public boolean isIncludeDeleted() { if (includeDeleted == null || includeDeleted == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return includeDeleted; } /** Whether both My Drive and shared drive items should be included in results. */ @com.google.api.client.util.Key private java.lang.Boolean includeItemsFromAllDrives; /** Whether both My Drive and shared drive items should be included in results. [default: false] */ public java.lang.Boolean getIncludeItemsFromAllDrives() { return includeItemsFromAllDrives; } /** Whether both My Drive and shared drive items should be included in results. */ public List setIncludeItemsFromAllDrives(java.lang.Boolean includeItemsFromAllDrives) { this.includeItemsFromAllDrives = includeItemsFromAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether both My Drive and shared drive items should be included in results. *

*/ public boolean isIncludeItemsFromAllDrives() { if (includeItemsFromAllDrives == null || includeItemsFromAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeItemsFromAllDrives; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public List setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public List setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** * Whether to include changes outside the My Drive hierarchy in the result. When set to false, * changes to files such as those in the Application Data folder or shared files which have * not been added to My Drive will be omitted from the result. */ @com.google.api.client.util.Key private java.lang.Boolean includeSubscribed; /** Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result. [default: true] */ public java.lang.Boolean getIncludeSubscribed() { return includeSubscribed; } /** * Whether to include changes outside the My Drive hierarchy in the result. When set to false, * changes to files such as those in the Application Data folder or shared files which have * not been added to My Drive will be omitted from the result. */ public List setIncludeSubscribed(java.lang.Boolean includeSubscribed) { this.includeSubscribed = includeSubscribed; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result. *

*/ public boolean isIncludeSubscribed() { if (includeSubscribed == null || includeSubscribed == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return includeSubscribed; } /** Deprecated: Use `includeItemsFromAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean includeTeamDriveItems; /** Deprecated: Use `includeItemsFromAllDrives` instead. [default: false] */ public java.lang.Boolean getIncludeTeamDriveItems() { return includeTeamDriveItems; } /** Deprecated: Use `includeItemsFromAllDrives` instead. */ public List setIncludeTeamDriveItems(java.lang.Boolean includeTeamDriveItems) { this.includeTeamDriveItems = includeTeamDriveItems; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `includeItemsFromAllDrives` instead. *

*/ public boolean isIncludeTeamDriveItems() { if (includeTeamDriveItems == null || includeTeamDriveItems == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeTeamDriveItems; } /** Maximum number of changes to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of changes to return. [default: 100] [minimum: 1] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of changes to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * The token for continuing a previous list request on the next page. This should be set to * the value of `nextPageToken` from the previous response or to the response from the * getStartPageToken method. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response or to the response from the getStartPageToken method. */ public java.lang.String getPageToken() { return pageToken; } /** * The token for continuing a previous list request on the next page. This should be set to * the value of `nextPageToken` from the previous response or to the response from the * getStartPageToken method. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * A comma-separated list of spaces to query. Supported values are `drive`, `appDataFolder` * and `photos`. */ @com.google.api.client.util.Key private java.lang.String spaces; /** A comma-separated list of spaces to query. Supported values are `drive`, `appDataFolder` and `photos`. */ public java.lang.String getSpaces() { return spaces; } /** * A comma-separated list of spaces to query. Supported values are `drive`, `appDataFolder` * and `photos`. */ public List setSpaces(java.lang.String spaces) { this.spaces = spaces; return this; } /** Deprecated: Use `pageToken` instead. */ @com.google.api.client.util.Key private java.lang.Long startChangeId; /** Deprecated: Use `pageToken` instead. */ public java.lang.Long getStartChangeId() { return startChangeId; } /** Deprecated: Use `pageToken` instead. */ public List setStartChangeId(java.lang.Long startChangeId) { this.startChangeId = startChangeId; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public List setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public List setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** Deprecated: Use `driveId` instead. */ @com.google.api.client.util.Key private java.lang.String teamDriveId; /** Deprecated: Use `driveId` instead. */ public java.lang.String getTeamDriveId() { return teamDriveId; } /** Deprecated: Use `driveId` instead. */ public List setTeamDriveId(java.lang.String teamDriveId) { this.teamDriveId = teamDriveId; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Subscribe to changes for a user. * * Create a request for the method "changes.watch". * * This request holds the parameters needed by the drive 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.drive.model.Channel} * @return the request */ public Watch watch(com.google.api.services.drive.model.Channel content) throws java.io.IOException { Watch result = new Watch(content); initialize(result); return result; } public class Watch extends DriveRequest { private static final String REST_PATH = "changes/watch"; /** * Subscribe to changes for a user. * * Create a request for the method "changes.watch". * * This request holds the parameters needed by the the drive 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.drive.model.Channel} * @since 1.13 */ protected Watch(com.google.api.services.drive.model.Channel content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.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); } /** * The shared drive from which changes will be returned. If specified the change IDs will be * reflective of the shared drive; use the combined drive ID and change ID as an identifier. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier. */ public java.lang.String getDriveId() { return driveId; } /** * The shared drive from which changes will be returned. If specified the change IDs will be * reflective of the shared drive; use the combined drive ID and change ID as an identifier. */ public Watch setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** * Whether changes should include the file resource if the file is still accessible by the * user at the time of the request, even when a file was removed from the list of changes and * there will be no further change entries for this file. */ @com.google.api.client.util.Key private java.lang.Boolean includeCorpusRemovals; /** Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. [default: false] */ public java.lang.Boolean getIncludeCorpusRemovals() { return includeCorpusRemovals; } /** * Whether changes should include the file resource if the file is still accessible by the * user at the time of the request, even when a file was removed from the list of changes and * there will be no further change entries for this file. */ public Watch setIncludeCorpusRemovals(java.lang.Boolean includeCorpusRemovals) { this.includeCorpusRemovals = includeCorpusRemovals; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. *

*/ public boolean isIncludeCorpusRemovals() { if (includeCorpusRemovals == null || includeCorpusRemovals == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeCorpusRemovals; } /** * Whether to include changes indicating that items have been removed from the list of * changes, for example by deletion or loss of access. */ @com.google.api.client.util.Key private java.lang.Boolean includeDeleted; /** Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. [default: true] */ public java.lang.Boolean getIncludeDeleted() { return includeDeleted; } /** * Whether to include changes indicating that items have been removed from the list of * changes, for example by deletion or loss of access. */ public Watch setIncludeDeleted(java.lang.Boolean includeDeleted) { this.includeDeleted = includeDeleted; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. *

*/ public boolean isIncludeDeleted() { if (includeDeleted == null || includeDeleted == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return includeDeleted; } /** Whether both My Drive and shared drive items should be included in results. */ @com.google.api.client.util.Key private java.lang.Boolean includeItemsFromAllDrives; /** Whether both My Drive and shared drive items should be included in results. [default: false] */ public java.lang.Boolean getIncludeItemsFromAllDrives() { return includeItemsFromAllDrives; } /** Whether both My Drive and shared drive items should be included in results. */ public Watch setIncludeItemsFromAllDrives(java.lang.Boolean includeItemsFromAllDrives) { this.includeItemsFromAllDrives = includeItemsFromAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether both My Drive and shared drive items should be included in results. *

*/ public boolean isIncludeItemsFromAllDrives() { if (includeItemsFromAllDrives == null || includeItemsFromAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeItemsFromAllDrives; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Watch setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Watch setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** * Whether to include changes outside the My Drive hierarchy in the result. When set to false, * changes to files such as those in the Application Data folder or shared files which have * not been added to My Drive will be omitted from the result. */ @com.google.api.client.util.Key private java.lang.Boolean includeSubscribed; /** Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result. [default: true] */ public java.lang.Boolean getIncludeSubscribed() { return includeSubscribed; } /** * Whether to include changes outside the My Drive hierarchy in the result. When set to false, * changes to files such as those in the Application Data folder or shared files which have * not been added to My Drive will be omitted from the result. */ public Watch setIncludeSubscribed(java.lang.Boolean includeSubscribed) { this.includeSubscribed = includeSubscribed; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to include changes outside the My Drive hierarchy in the result. When set to false, changes to files such as those in the Application Data folder or shared files which have not been added to My Drive will be omitted from the result. *

*/ public boolean isIncludeSubscribed() { if (includeSubscribed == null || includeSubscribed == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return includeSubscribed; } /** Deprecated: Use `includeItemsFromAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean includeTeamDriveItems; /** Deprecated: Use `includeItemsFromAllDrives` instead. [default: false] */ public java.lang.Boolean getIncludeTeamDriveItems() { return includeTeamDriveItems; } /** Deprecated: Use `includeItemsFromAllDrives` instead. */ public Watch setIncludeTeamDriveItems(java.lang.Boolean includeTeamDriveItems) { this.includeTeamDriveItems = includeTeamDriveItems; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `includeItemsFromAllDrives` instead. *

*/ public boolean isIncludeTeamDriveItems() { if (includeTeamDriveItems == null || includeTeamDriveItems == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeTeamDriveItems; } /** Maximum number of changes to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of changes to return. [default: 100] [minimum: 1] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of changes to return. */ public Watch setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * The token for continuing a previous list request on the next page. This should be set to * the value of `nextPageToken` from the previous response or to the response from the * getStartPageToken method. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response or to the response from the getStartPageToken method. */ public java.lang.String getPageToken() { return pageToken; } /** * The token for continuing a previous list request on the next page. This should be set to * the value of `nextPageToken` from the previous response or to the response from the * getStartPageToken method. */ public Watch setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * A comma-separated list of spaces to query. Supported values are `drive`, `appDataFolder` * and `photos`. */ @com.google.api.client.util.Key private java.lang.String spaces; /** A comma-separated list of spaces to query. Supported values are `drive`, `appDataFolder` and `photos`. */ public java.lang.String getSpaces() { return spaces; } /** * A comma-separated list of spaces to query. Supported values are `drive`, `appDataFolder` * and `photos`. */ public Watch setSpaces(java.lang.String spaces) { this.spaces = spaces; return this; } /** Deprecated: Use `pageToken` instead. */ @com.google.api.client.util.Key private java.lang.Long startChangeId; /** Deprecated: Use `pageToken` instead. */ public java.lang.Long getStartChangeId() { return startChangeId; } /** Deprecated: Use `pageToken` instead. */ public Watch setStartChangeId(java.lang.Long startChangeId) { this.startChangeId = startChangeId; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Watch setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Watch setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** Deprecated: Use `driveId` instead. */ @com.google.api.client.util.Key private java.lang.String teamDriveId; /** Deprecated: Use `driveId` instead. */ public java.lang.String getTeamDriveId() { return teamDriveId; } /** Deprecated: Use `driveId` instead. */ public Watch setTeamDriveId(java.lang.String teamDriveId) { this.teamDriveId = teamDriveId; return this; } @Override public Watch set(String parameterName, Object value) { return (Watch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Channels collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Channels.List request = drive.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 drive 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.drive.model.Channel} * @return the request */ public Stop stop(com.google.api.services.drive.model.Channel content) throws java.io.IOException { Stop result = new Stop(content); initialize(result); return result; } public class Stop extends DriveRequest { private static final String REST_PATH = "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 drive 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.drive.model.Channel} * @since 1.13 */ protected Stop(com.google.api.services.drive.model.Channel content) { super(Drive.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 Children collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Children.List request = drive.children().list(parameters ...)}
   * 
* * @return the resource collection */ public Children children() { return new Children(); } /** * The "children" collection of methods. */ public class Children { /** * Removes a child from a folder. * * Create a request for the method "children.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param folderId The ID of the folder. * @param childId The ID of the child. * @return the request */ public Delete delete(java.lang.String folderId, java.lang.String childId) throws java.io.IOException { Delete result = new Delete(folderId, childId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "files/{folderId}/children/{childId}"; /** * Removes a child from a folder. * * Create a request for the method "children.delete". * * This request holds the parameters needed by the the drive 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 folderId The ID of the folder. * @param childId The ID of the child. * @since 1.13 */ protected Delete(java.lang.String folderId, java.lang.String childId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.folderId = com.google.api.client.util.Preconditions.checkNotNull(folderId, "Required parameter folderId must be specified."); this.childId = com.google.api.client.util.Preconditions.checkNotNull(childId, "Required parameter childId 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 ID of the folder. */ @com.google.api.client.util.Key private java.lang.String folderId; /** The ID of the folder. */ public java.lang.String getFolderId() { return folderId; } /** The ID of the folder. */ public Delete setFolderId(java.lang.String folderId) { this.folderId = folderId; return this; } /** The ID of the child. */ @com.google.api.client.util.Key private java.lang.String childId; /** The ID of the child. */ public java.lang.String getChildId() { return childId; } /** The ID of the child. */ public Delete setChildId(java.lang.String childId) { this.childId = childId; return this; } /** * Deprecated: If an item is not in a shared drive and its last parent is removed, the item is * placed under its owner's root. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: If an item is not in a shared drive and its last parent is removed, the item is placed under its owner's root. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: If an item is not in a shared drive and its last parent is removed, the item is * placed under its owner's root. */ public Delete setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: If an item is not in a shared drive and its last parent is removed, the item is placed under its owner's root. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a specific child reference. * * Create a request for the method "children.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param folderId The ID of the folder. * @param childId The ID of the child. * @return the request */ public Get get(java.lang.String folderId, java.lang.String childId) throws java.io.IOException { Get result = new Get(folderId, childId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "files/{folderId}/children/{childId}"; /** * Gets a specific child reference. * * Create a request for the method "children.get". * * This request holds the parameters needed by the the drive 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 folderId The ID of the folder. * @param childId The ID of the child. * @since 1.13 */ protected Get(java.lang.String folderId, java.lang.String childId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.ChildReference.class); this.folderId = com.google.api.client.util.Preconditions.checkNotNull(folderId, "Required parameter folderId must be specified."); this.childId = com.google.api.client.util.Preconditions.checkNotNull(childId, "Required parameter childId 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 ID of the folder. */ @com.google.api.client.util.Key private java.lang.String folderId; /** The ID of the folder. */ public java.lang.String getFolderId() { return folderId; } /** The ID of the folder. */ public Get setFolderId(java.lang.String folderId) { this.folderId = folderId; return this; } /** The ID of the child. */ @com.google.api.client.util.Key private java.lang.String childId; /** The ID of the child. */ public java.lang.String getChildId() { return childId; } /** The ID of the child. */ public Get setChildId(java.lang.String childId) { this.childId = childId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Inserts a file into a folder. * * Create a request for the method "children.insert". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param folderId The ID of the folder. * @param content the {@link com.google.api.services.drive.model.ChildReference} * @return the request */ public Insert insert(java.lang.String folderId, com.google.api.services.drive.model.ChildReference content) throws java.io.IOException { Insert result = new Insert(folderId, content); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "files/{folderId}/children"; /** * Inserts a file into a folder. * * Create a request for the method "children.insert". * * This request holds the parameters needed by the the drive 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 folderId The ID of the folder. * @param content the {@link com.google.api.services.drive.model.ChildReference} * @since 1.13 */ protected Insert(java.lang.String folderId, com.google.api.services.drive.model.ChildReference content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.ChildReference.class); this.folderId = com.google.api.client.util.Preconditions.checkNotNull(folderId, "Required parameter folderId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getId(), "ChildReference.getId()"); } @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 ID of the folder. */ @com.google.api.client.util.Key private java.lang.String folderId; /** The ID of the folder. */ public java.lang.String getFolderId() { return folderId; } /** The ID of the folder. */ public Insert setFolderId(java.lang.String folderId) { this.folderId = folderId; return this; } /** * Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` * instead. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` instead. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` * instead. */ public Insert setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` instead. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Insert setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Insert setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists a folder's children. * * Create a request for the method "children.list". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param folderId The ID of the folder. * @return the request */ public List list(java.lang.String folderId) throws java.io.IOException { List result = new List(folderId); initialize(result); return result; } public class List extends DriveRequest { private static final String REST_PATH = "files/{folderId}/children"; /** * Lists a folder's children. * * Create a request for the method "children.list". * * This request holds the parameters needed by the the drive 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 folderId The ID of the folder. * @since 1.13 */ protected List(java.lang.String folderId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.ChildList.class); this.folderId = com.google.api.client.util.Preconditions.checkNotNull(folderId, "Required parameter folderId 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 ID of the folder. */ @com.google.api.client.util.Key private java.lang.String folderId; /** The ID of the folder. */ public java.lang.String getFolderId() { return folderId; } /** The ID of the folder. */ public List setFolderId(java.lang.String folderId) { this.folderId = folderId; return this; } /** Maximum number of children to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of children to return. [default: 100] [minimum: 0] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of children to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, * `lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`, * `sharedWithMeDate`, `starred`, and `title`. Each key sorts ascending by default, but may be * reversed with the `desc` modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. * Please note that there is a current limitation for users with approximately one million * files in which the requested sort order is ignored. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, `lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`, `sharedWithMeDate`, `starred`, and `title`. Each key sorts ascending by default, but may be reversed with the `desc` modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored. */ public java.lang.String getOrderBy() { return orderBy; } /** * A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, * `lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`, * `sharedWithMeDate`, `starred`, and `title`. Each key sorts ascending by default, but may be * reversed with the `desc` modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. * Please note that there is a current limitation for users with approximately one million * files in which the requested sort order is ignored. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** Page token for children. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Page token for children. */ public java.lang.String getPageToken() { return pageToken; } /** Page token for children. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Query string for searching children. */ @com.google.api.client.util.Key private java.lang.String q; /** Query string for searching children. */ public java.lang.String getQ() { return q; } /** Query string for searching children. */ public List setQ(java.lang.String q) { this.q = q; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Comments collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Comments.List request = drive.comments().list(parameters ...)}
   * 
* * @return the resource collection */ public Comments comments() { return new Comments(); } /** * The "comments" collection of methods. */ public class Comments { /** * Deletes a comment. * * Create a request for the method "comments.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @return the request */ public Delete delete(java.lang.String fileId, java.lang.String commentId) throws java.io.IOException { Delete result = new Delete(fileId, commentId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}"; /** * Deletes a comment. * * Create a request for the method "comments.delete". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @since 1.13 */ protected Delete(java.lang.String fileId, java.lang.String commentId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Delete setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Delete setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a comment by ID. * * Create a request for the method "comments.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @return the request */ public Get get(java.lang.String fileId, java.lang.String commentId) throws java.io.IOException { Get result = new Get(fileId, commentId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}"; /** * Gets a comment by ID. * * Create a request for the method "comments.get". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @since 1.13 */ protected Get(java.lang.String fileId, java.lang.String commentId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.Comment.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Get setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Get setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } /** * If set, this will succeed when retrieving a deleted comment, and will include any deleted * replies. */ @com.google.api.client.util.Key private java.lang.Boolean includeDeleted; /** If set, this will succeed when retrieving a deleted comment, and will include any deleted replies. [default: false] */ public java.lang.Boolean getIncludeDeleted() { return includeDeleted; } /** * If set, this will succeed when retrieving a deleted comment, and will include any deleted * replies. */ public Get setIncludeDeleted(java.lang.Boolean includeDeleted) { this.includeDeleted = includeDeleted; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* If set, this will succeed when retrieving a deleted comment, and will include any deleted replies. *

*/ public boolean isIncludeDeleted() { if (includeDeleted == null || includeDeleted == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeDeleted; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new comment on the given file. * * Create a request for the method "comments.insert". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param content the {@link com.google.api.services.drive.model.Comment} * @return the request */ public Insert insert(java.lang.String fileId, com.google.api.services.drive.model.Comment content) throws java.io.IOException { Insert result = new Insert(fileId, content); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments"; /** * Creates a new comment on the given file. * * Create a request for the method "comments.insert". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param content the {@link com.google.api.services.drive.model.Comment} * @since 1.13 */ protected Insert(java.lang.String fileId, com.google.api.services.drive.model.Comment content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.Comment.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getContent(), "Comment.getContent()"); } @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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Insert setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists a file's comments. * * Create a request for the method "comments.list". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @return the request */ public List list(java.lang.String fileId) throws java.io.IOException { List result = new List(fileId); initialize(result); return result; } public class List extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments"; /** * Lists a file's comments. * * Create a request for the method "comments.list". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @since 1.13 */ protected List(java.lang.String fileId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.CommentList.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public List setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * If set, all comments and replies, including deleted comments and replies (with content * stripped) will be returned. */ @com.google.api.client.util.Key private java.lang.Boolean includeDeleted; /** If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned. [default: false] */ public java.lang.Boolean getIncludeDeleted() { return includeDeleted; } /** * If set, all comments and replies, including deleted comments and replies (with content * stripped) will be returned. */ public List setIncludeDeleted(java.lang.Boolean includeDeleted) { this.includeDeleted = includeDeleted; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned. *

*/ public boolean isIncludeDeleted() { if (includeDeleted == null || includeDeleted == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeDeleted; } /** The maximum number of discussions to include in the response, used for paging. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** The maximum number of discussions to include in the response, used for paging. [default: 20] [minimum: 0] [maximum: 100] */ public java.lang.Integer getMaxResults() { return maxResults; } /** The maximum number of discussions to include in the response, used for paging. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * The continuation token, used to page through large result sets. To get the next page of * results, set this parameter to the value of "nextPageToken" from the previous response. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. */ public java.lang.String getPageToken() { return pageToken; } /** * The continuation token, used to page through large result sets. To get the next page of * results, set this parameter to the value of "nextPageToken" from the previous response. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** * Only discussions that were updated after this timestamp will be returned. Formatted as an * RFC 3339 timestamp. */ @com.google.api.client.util.Key private java.lang.String updatedMin; /** Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp. */ public java.lang.String getUpdatedMin() { return updatedMin; } /** * Only discussions that were updated after this timestamp will be returned. Formatted as an * RFC 3339 timestamp. */ public List setUpdatedMin(java.lang.String updatedMin) { this.updatedMin = updatedMin; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates an existing comment. * * Create a request for the method "comments.patch". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @param content the {@link com.google.api.services.drive.model.Comment} * @return the request */ public Patch patch(java.lang.String fileId, java.lang.String commentId, com.google.api.services.drive.model.Comment content) throws java.io.IOException { Patch result = new Patch(fileId, commentId, content); initialize(result); return result; } public class Patch extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}"; /** * Updates an existing comment. * * Create a request for the method "comments.patch". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @param content the {@link com.google.api.services.drive.model.Comment} * @since 1.13 */ protected Patch(java.lang.String fileId, java.lang.String commentId, com.google.api.services.drive.model.Comment content) { super(Drive.this, "PATCH", REST_PATH, content, com.google.api.services.drive.model.Comment.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getContent(), "Comment.getContent()"); } @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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Patch setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Patch setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates an existing comment. * * Create a request for the method "comments.update". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @param content the {@link com.google.api.services.drive.model.Comment} * @return the request */ public Update update(java.lang.String fileId, java.lang.String commentId, com.google.api.services.drive.model.Comment content) throws java.io.IOException { Update result = new Update(fileId, commentId, content); initialize(result); return result; } public class Update extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}"; /** * Updates an existing comment. * * Create a request for the method "comments.update". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @param content the {@link com.google.api.services.drive.model.Comment} * @since 1.13 */ protected Update(java.lang.String fileId, java.lang.String commentId, com.google.api.services.drive.model.Comment content) { super(Drive.this, "PUT", REST_PATH, content, com.google.api.services.drive.model.Comment.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getContent(), "Comment.getContent()"); } @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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Update setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Update setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Drives collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Drives.List request = drive.drives().list(parameters ...)}
   * 
* * @return the resource collection */ public Drives drives() { return new Drives(); } /** * The "drives" collection of methods. */ public class Drives { /** * Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot * contain any untrashed items. * * Create a request for the method "drives.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param driveId The ID of the shared drive. * @return the request */ public Delete delete(java.lang.String driveId) throws java.io.IOException { Delete result = new Delete(driveId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "drives/{driveId}"; /** * Permanently deletes a shared drive for which the user is an `organizer`. The shared drive * cannot contain any untrashed items. * * Create a request for the method "drives.delete". * * This request holds the parameters needed by the the drive 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 driveId The ID of the shared drive. * @since 1.13 */ protected Delete(java.lang.String driveId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.driveId = com.google.api.client.util.Preconditions.checkNotNull(driveId, "Required parameter driveId 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 ID of the shared drive. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The ID of the shared drive. */ public java.lang.String getDriveId() { return driveId; } /** The ID of the shared drive. */ public Delete setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** * Whether any items inside the shared drive should also be deleted. This option is only * supported when `useDomainAdminAccess` is also set to `true`. */ @com.google.api.client.util.Key private java.lang.Boolean allowItemDeletion; /** Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`. [default: false] */ public java.lang.Boolean getAllowItemDeletion() { return allowItemDeletion; } /** * Whether any items inside the shared drive should also be deleted. This option is only * supported when `useDomainAdminAccess` is also set to `true`. */ public Delete setAllowItemDeletion(java.lang.Boolean allowItemDeletion) { this.allowItemDeletion = allowItemDeletion; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`. *

*/ public boolean isAllowItemDeletion() { if (allowItemDeletion == null || allowItemDeletion == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return allowItemDeletion; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the shared drive * belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the shared drive * belongs. */ public Delete setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a shared drive's metadata by ID. * * Create a request for the method "drives.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param driveId The ID of the shared drive. * @return the request */ public Get get(java.lang.String driveId) throws java.io.IOException { Get result = new Get(driveId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "drives/{driveId}"; /** * Gets a shared drive's metadata by ID. * * Create a request for the method "drives.get". * * This request holds the parameters needed by the the drive 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 driveId The ID of the shared drive. * @since 1.13 */ protected Get(java.lang.String driveId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.Drive.class); this.driveId = com.google.api.client.util.Preconditions.checkNotNull(driveId, "Required parameter driveId 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 ID of the shared drive. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The ID of the shared drive. */ public java.lang.String getDriveId() { return driveId; } /** The ID of the shared drive. */ public Get setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the shared drive * belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the shared drive * belongs. */ public Get setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Hides a shared drive from the default view. * * Create a request for the method "drives.hide". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Hide#execute()} method to invoke the remote operation. * * @param driveId The ID of the shared drive. * @return the request */ public Hide hide(java.lang.String driveId) throws java.io.IOException { Hide result = new Hide(driveId); initialize(result); return result; } public class Hide extends DriveRequest { private static final String REST_PATH = "drives/{driveId}/hide"; /** * Hides a shared drive from the default view. * * Create a request for the method "drives.hide". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Hide#execute()} method to invoke the remote operation.

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

* * @param driveId The ID of the shared drive. * @since 1.13 */ protected Hide(java.lang.String driveId) { super(Drive.this, "POST", REST_PATH, null, com.google.api.services.drive.model.Drive.class); this.driveId = com.google.api.client.util.Preconditions.checkNotNull(driveId, "Required parameter driveId must be specified."); } @Override public Hide set$Xgafv(java.lang.String $Xgafv) { return (Hide) super.set$Xgafv($Xgafv); } @Override public Hide setAccessToken(java.lang.String accessToken) { return (Hide) super.setAccessToken(accessToken); } @Override public Hide setAlt(java.lang.String alt) { return (Hide) super.setAlt(alt); } @Override public Hide setCallback(java.lang.String callback) { return (Hide) super.setCallback(callback); } @Override public Hide setFields(java.lang.String fields) { return (Hide) super.setFields(fields); } @Override public Hide setKey(java.lang.String key) { return (Hide) super.setKey(key); } @Override public Hide setOauthToken(java.lang.String oauthToken) { return (Hide) super.setOauthToken(oauthToken); } @Override public Hide setPrettyPrint(java.lang.Boolean prettyPrint) { return (Hide) super.setPrettyPrint(prettyPrint); } @Override public Hide setQuotaUser(java.lang.String quotaUser) { return (Hide) super.setQuotaUser(quotaUser); } @Override public Hide setUploadType(java.lang.String uploadType) { return (Hide) super.setUploadType(uploadType); } @Override public Hide setUploadProtocol(java.lang.String uploadProtocol) { return (Hide) super.setUploadProtocol(uploadProtocol); } /** The ID of the shared drive. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The ID of the shared drive. */ public java.lang.String getDriveId() { return driveId; } /** The ID of the shared drive. */ public Hide setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } @Override public Hide set(String parameterName, Object value) { return (Hide) super.set(parameterName, value); } } /** * Creates a new shared drive. * * Create a request for the method "drives.insert". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param requestId Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent * creation of a shared drive. A repeated request by the same user and with the same request * ID will avoid creating duplicates by attempting to create the same shared drive. If the * shared drive already exists a 409 error will be returned. * @param content the {@link com.google.api.services.drive.model.Drive} * @return the request */ public Insert insert(java.lang.String requestId, com.google.api.services.drive.model.Drive content) throws java.io.IOException { Insert result = new Insert(requestId, content); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "drives"; /** * Creates a new shared drive. * * Create a request for the method "drives.insert". * * This request holds the parameters needed by the the drive 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 requestId Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent * creation of a shared drive. A repeated request by the same user and with the same request * ID will avoid creating duplicates by attempting to create the same shared drive. If the * shared drive already exists a 409 error will be returned. * @param content the {@link com.google.api.services.drive.model.Drive} * @since 1.13 */ protected Insert(java.lang.String requestId, com.google.api.services.drive.model.Drive content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.Drive.class); this.requestId = com.google.api.client.util.Preconditions.checkNotNull(requestId, "Required parameter requestId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getName(), "Drive.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); } /** * Required. An ID, such as a random UUID, which uniquely identifies this user's request for * idempotent creation of a shared drive. A repeated request by the same user and with the * same request ID will avoid creating duplicates by attempting to create the same shared * drive. If the shared drive already exists a 409 error will be returned. */ @com.google.api.client.util.Key private java.lang.String requestId; /** Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same shared drive. If the shared drive already exists a 409 error will be returned. */ public java.lang.String getRequestId() { return requestId; } /** * Required. An ID, such as a random UUID, which uniquely identifies this user's request for * idempotent creation of a shared drive. A repeated request by the same user and with the * same request ID will avoid creating duplicates by attempting to create the same shared * drive. If the shared drive already exists a 409 error will be returned. */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the user's shared drives. This method accepts the `q` parameter, which is a search query * combining one or more search terms. For more information, see the [Search for shared * drives](/drive/api/guides/search-shareddrives) guide. * * Create a request for the method "drives.list". * * This request holds the parameters needed by the drive 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 DriveRequest { private static final String REST_PATH = "drives"; /** * Lists the user's shared drives. This method accepts the `q` parameter, which is a search query * combining one or more search terms. For more information, see the [Search for shared * drives](/drive/api/guides/search-shareddrives) guide. * * Create a request for the method "drives.list". * * This request holds the parameters needed by the the drive 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(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.DriveList.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); } /** Maximum number of shared drives to return per page. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of shared drives to return per page. [default: 10] [minimum: 1] [maximum: 100] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of shared drives to return per page. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Page token for shared drives. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Page token for shared drives. */ public java.lang.String getPageToken() { return pageToken; } /** Page token for shared drives. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Query string for searching shared drives. */ @com.google.api.client.util.Key private java.lang.String q; /** Query string for searching shared drives. */ public java.lang.String getQ() { return q; } /** Query string for searching shared drives. */ public List setQ(java.lang.String q) { this.q = q; return this; } /** * Issue the request as a domain administrator; if set to true, then all shared drives of the * domain in which the requester is an administrator are returned. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then all shared drives of the * domain in which the requester is an administrator are returned. */ public List setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Restores a shared drive to the default view. * * Create a request for the method "drives.unhide". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Unhide#execute()} method to invoke the remote operation. * * @param driveId The ID of the shared drive. * @return the request */ public Unhide unhide(java.lang.String driveId) throws java.io.IOException { Unhide result = new Unhide(driveId); initialize(result); return result; } public class Unhide extends DriveRequest { private static final String REST_PATH = "drives/{driveId}/unhide"; /** * Restores a shared drive to the default view. * * Create a request for the method "drives.unhide". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Unhide#execute()} method to invoke the remote operation.

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

* * @param driveId The ID of the shared drive. * @since 1.13 */ protected Unhide(java.lang.String driveId) { super(Drive.this, "POST", REST_PATH, null, com.google.api.services.drive.model.Drive.class); this.driveId = com.google.api.client.util.Preconditions.checkNotNull(driveId, "Required parameter driveId must be specified."); } @Override public Unhide set$Xgafv(java.lang.String $Xgafv) { return (Unhide) super.set$Xgafv($Xgafv); } @Override public Unhide setAccessToken(java.lang.String accessToken) { return (Unhide) super.setAccessToken(accessToken); } @Override public Unhide setAlt(java.lang.String alt) { return (Unhide) super.setAlt(alt); } @Override public Unhide setCallback(java.lang.String callback) { return (Unhide) super.setCallback(callback); } @Override public Unhide setFields(java.lang.String fields) { return (Unhide) super.setFields(fields); } @Override public Unhide setKey(java.lang.String key) { return (Unhide) super.setKey(key); } @Override public Unhide setOauthToken(java.lang.String oauthToken) { return (Unhide) super.setOauthToken(oauthToken); } @Override public Unhide setPrettyPrint(java.lang.Boolean prettyPrint) { return (Unhide) super.setPrettyPrint(prettyPrint); } @Override public Unhide setQuotaUser(java.lang.String quotaUser) { return (Unhide) super.setQuotaUser(quotaUser); } @Override public Unhide setUploadType(java.lang.String uploadType) { return (Unhide) super.setUploadType(uploadType); } @Override public Unhide setUploadProtocol(java.lang.String uploadProtocol) { return (Unhide) super.setUploadProtocol(uploadProtocol); } /** The ID of the shared drive. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The ID of the shared drive. */ public java.lang.String getDriveId() { return driveId; } /** The ID of the shared drive. */ public Unhide setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } @Override public Unhide set(String parameterName, Object value) { return (Unhide) super.set(parameterName, value); } } /** * Updates the metadata for a shared drive. * * Create a request for the method "drives.update". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param driveId The ID of the shared drive. * @param content the {@link com.google.api.services.drive.model.Drive} * @return the request */ public Update update(java.lang.String driveId, com.google.api.services.drive.model.Drive content) throws java.io.IOException { Update result = new Update(driveId, content); initialize(result); return result; } public class Update extends DriveRequest { private static final String REST_PATH = "drives/{driveId}"; /** * Updates the metadata for a shared drive. * * Create a request for the method "drives.update". * * This request holds the parameters needed by the the drive 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 driveId The ID of the shared drive. * @param content the {@link com.google.api.services.drive.model.Drive} * @since 1.13 */ protected Update(java.lang.String driveId, com.google.api.services.drive.model.Drive content) { super(Drive.this, "PUT", REST_PATH, content, com.google.api.services.drive.model.Drive.class); this.driveId = com.google.api.client.util.Preconditions.checkNotNull(driveId, "Required parameter driveId 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 ID of the shared drive. */ @com.google.api.client.util.Key private java.lang.String driveId; /** The ID of the shared drive. */ public java.lang.String getDriveId() { return driveId; } /** The ID of the shared drive. */ public Update setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the shared drive * belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the shared drive * belongs. */ public Update setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Files collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Files.List request = drive.files().list(parameters ...)}
   * 
* * @return the resource collection */ public Files files() { return new Files(); } /** * The "files" collection of methods. */ public class Files { /** * Creates a copy of the specified file. * * Create a request for the method "files.copy". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Copy#execute()} method to invoke the remote operation. * * @param fileId The ID of the file to copy. * @param content the {@link com.google.api.services.drive.model.File} * @return the request */ public Copy copy(java.lang.String fileId, com.google.api.services.drive.model.File content) throws java.io.IOException { Copy result = new Copy(fileId, content); initialize(result); return result; } public class Copy extends DriveRequest { private static final String REST_PATH = "files/{fileId}/copy"; /** * Creates a copy of the specified file. * * Create a request for the method "files.copy". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Copy#execute()} method to invoke the remote operation.

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

* * @param fileId The ID of the file to copy. * @param content the {@link com.google.api.services.drive.model.File} * @since 1.13 */ protected Copy(java.lang.String fileId, com.google.api.services.drive.model.File content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.File.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); } @Override public Copy set$Xgafv(java.lang.String $Xgafv) { return (Copy) super.set$Xgafv($Xgafv); } @Override public Copy setAccessToken(java.lang.String accessToken) { return (Copy) super.setAccessToken(accessToken); } @Override public Copy setAlt(java.lang.String alt) { return (Copy) super.setAlt(alt); } @Override public Copy setCallback(java.lang.String callback) { return (Copy) super.setCallback(callback); } @Override public Copy setFields(java.lang.String fields) { return (Copy) super.setFields(fields); } @Override public Copy setKey(java.lang.String key) { return (Copy) super.setKey(key); } @Override public Copy setOauthToken(java.lang.String oauthToken) { return (Copy) super.setOauthToken(oauthToken); } @Override public Copy setPrettyPrint(java.lang.Boolean prettyPrint) { return (Copy) super.setPrettyPrint(prettyPrint); } @Override public Copy setQuotaUser(java.lang.String quotaUser) { return (Copy) super.setQuotaUser(quotaUser); } @Override public Copy setUploadType(java.lang.String uploadType) { return (Copy) super.setUploadType(uploadType); } @Override public Copy setUploadProtocol(java.lang.String uploadProtocol) { return (Copy) super.setUploadProtocol(uploadProtocol); } /** The ID of the file to copy. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file to copy. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file to copy. */ public Copy setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** Whether to convert this file to the corresponding Docs Editors format. */ @com.google.api.client.util.Key private java.lang.Boolean convert; /** Whether to convert this file to the corresponding Docs Editors format. [default: false] */ public java.lang.Boolean getConvert() { return convert; } /** Whether to convert this file to the corresponding Docs Editors format. */ public Copy setConvert(java.lang.Boolean convert) { this.convert = convert; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to convert this file to the corresponding Docs Editors format. *

*/ public boolean isConvert() { if (convert == null || convert == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return convert; } /** * Deprecated: Copying files into multiple folders is no longer supported. Use shortcuts * instead. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: Copying files into multiple folders is no longer supported. Use shortcuts instead. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: Copying files into multiple folders is no longer supported. Use shortcuts * instead. */ public Copy setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Copying files into multiple folders is no longer supported. Use shortcuts instead. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Copy setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Copy setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ @com.google.api.client.util.Key private java.lang.Boolean ocr; /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. [default: false] */ public java.lang.Boolean getOcr() { return ocr; } /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ public Copy setOcr(java.lang.Boolean ocr) { this.ocr = ocr; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. *

*/ public boolean isOcr() { if (ocr == null || ocr == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return ocr; } /** If `ocr` is true, hints at the language to use. Valid values are BCP 47 codes. */ @com.google.api.client.util.Key private java.lang.String ocrLanguage; /** If `ocr` is true, hints at the language to use. Valid values are BCP 47 codes. */ public java.lang.String getOcrLanguage() { return ocrLanguage; } /** If `ocr` is true, hints at the language to use. Valid values are BCP 47 codes. */ public Copy setOcrLanguage(java.lang.String ocrLanguage) { this.ocrLanguage = ocrLanguage; return this; } /** * Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned * revisions. */ @com.google.api.client.util.Key private java.lang.Boolean pinned; /** Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions. [default: false] */ public java.lang.Boolean getPinned() { return pinned; } /** * Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned * revisions. */ public Copy setPinned(java.lang.Boolean pinned) { this.pinned = pinned; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned revisions. *

*/ public boolean isPinned() { if (pinned == null || pinned == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return pinned; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Copy setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Copy setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** The language of the timed text. */ @com.google.api.client.util.Key private java.lang.String timedTextLanguage; /** The language of the timed text. */ public java.lang.String getTimedTextLanguage() { return timedTextLanguage; } /** The language of the timed text. */ public Copy setTimedTextLanguage(java.lang.String timedTextLanguage) { this.timedTextLanguage = timedTextLanguage; return this; } /** The timed text track name. */ @com.google.api.client.util.Key private java.lang.String timedTextTrackName; /** The timed text track name. */ public java.lang.String getTimedTextTrackName() { return timedTextTrackName; } /** The timed text track name. */ public Copy setTimedTextTrackName(java.lang.String timedTextTrackName) { this.timedTextTrackName = timedTextTrackName; return this; } /** * The visibility of the new file. This parameter is only relevant when the source is not a * native Google Doc and convert=false. */ @com.google.api.client.util.Key private java.lang.String visibility; /** The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false. [default: DEFAULT] */ public java.lang.String getVisibility() { return visibility; } /** * The visibility of the new file. This parameter is only relevant when the source is not a * native Google Doc and convert=false. */ public Copy setVisibility(java.lang.String visibility) { this.visibility = visibility; return this; } @Override public Copy set(String parameterName, Object value) { return (Copy) super.set(parameterName, value); } } /** * Permanently deletes a file owned by the user without moving it to the trash. If the file belongs * to a shared drive, the user must be an `organizer` on the parent folder. If the target is a * folder, all descendants owned by the user are also deleted. * * Create a request for the method "files.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param fileId The ID of the file to delete. * @return the request */ public Delete delete(java.lang.String fileId) throws java.io.IOException { Delete result = new Delete(fileId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "files/{fileId}"; /** * Permanently deletes a file owned by the user without moving it to the trash. If the file * belongs to a shared drive, the user must be an `organizer` on the parent folder. If the target * is a folder, all descendants owned by the user are also deleted. * * Create a request for the method "files.delete". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file to delete. * @since 1.13 */ protected Delete(java.lang.String fileId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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 ID of the file to delete. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file to delete. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file to delete. */ public Delete setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * Deprecated: If an item is not in a shared drive and its last parent is deleted but the item * itself is not, the item is placed under its owner's root. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item is placed under its owner's root. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: If an item is not in a shared drive and its last parent is deleted but the item * itself is not, the item is placed under its owner's root. */ public Delete setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item is placed under its owner's root. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Delete setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Delete setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Permanently deletes all of the user's trashed files. * * Create a request for the method "files.emptyTrash". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link EmptyTrash#execute()} method to invoke the remote operation. * * @return the request */ public EmptyTrash emptyTrash() throws java.io.IOException { EmptyTrash result = new EmptyTrash(); initialize(result); return result; } public class EmptyTrash extends DriveRequest { private static final String REST_PATH = "files/trash"; /** * Permanently deletes all of the user's trashed files. * * Create a request for the method "files.emptyTrash". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link EmptyTrash#execute()} method to invoke the remote operation.

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

* * @since 1.13 */ protected EmptyTrash() { super(Drive.this, "DELETE", REST_PATH, null, Void.class); } @Override public EmptyTrash set$Xgafv(java.lang.String $Xgafv) { return (EmptyTrash) super.set$Xgafv($Xgafv); } @Override public EmptyTrash setAccessToken(java.lang.String accessToken) { return (EmptyTrash) super.setAccessToken(accessToken); } @Override public EmptyTrash setAlt(java.lang.String alt) { return (EmptyTrash) super.setAlt(alt); } @Override public EmptyTrash setCallback(java.lang.String callback) { return (EmptyTrash) super.setCallback(callback); } @Override public EmptyTrash setFields(java.lang.String fields) { return (EmptyTrash) super.setFields(fields); } @Override public EmptyTrash setKey(java.lang.String key) { return (EmptyTrash) super.setKey(key); } @Override public EmptyTrash setOauthToken(java.lang.String oauthToken) { return (EmptyTrash) super.setOauthToken(oauthToken); } @Override public EmptyTrash setPrettyPrint(java.lang.Boolean prettyPrint) { return (EmptyTrash) super.setPrettyPrint(prettyPrint); } @Override public EmptyTrash setQuotaUser(java.lang.String quotaUser) { return (EmptyTrash) super.setQuotaUser(quotaUser); } @Override public EmptyTrash setUploadType(java.lang.String uploadType) { return (EmptyTrash) super.setUploadType(uploadType); } @Override public EmptyTrash setUploadProtocol(java.lang.String uploadProtocol) { return (EmptyTrash) super.setUploadProtocol(uploadProtocol); } /** If set, empties the trash of the provided shared drive. */ @com.google.api.client.util.Key private java.lang.String driveId; /** If set, empties the trash of the provided shared drive. */ public java.lang.String getDriveId() { return driveId; } /** If set, empties the trash of the provided shared drive. */ public EmptyTrash setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** * Deprecated: If an item is not in a shared drive and its last parent is deleted but the item * itself is not, the item is placed under its owner's root. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item is placed under its owner's root. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: If an item is not in a shared drive and its last parent is deleted but the item * itself is not, the item is placed under its owner's root. */ public EmptyTrash setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item is placed under its owner's root. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } @Override public EmptyTrash set(String parameterName, Object value) { return (EmptyTrash) super.set(parameterName, value); } } /** * Exports a Google Workspace document to the requested MIME type and returns exported byte content. * Note that the exported content is limited to 10MB. * * Create a request for the method "files.export". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Export#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param mimeType Required. The MIME type of the format requested for this export. * @return the request */ public Export export(java.lang.String fileId, java.lang.String mimeType) throws java.io.IOException { Export result = new Export(fileId, mimeType); initialize(result); return result; } public class Export extends DriveRequest { private static final String REST_PATH = "files/{fileId}/export"; /** * Exports a Google Workspace document to the requested MIME type and returns exported byte * content. Note that the exported content is limited to 10MB. * * Create a request for the method "files.export". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Export#execute()} method to invoke the remote operation.

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

* * @param fileId The ID of the file. * @param mimeType Required. The MIME type of the format requested for this export. * @since 1.13 */ protected Export(java.lang.String fileId, java.lang.String mimeType) { super(Drive.this, "GET", REST_PATH, null, Void.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.mimeType = com.google.api.client.util.Preconditions.checkNotNull(mimeType, "Required parameter mimeType must be specified."); initializeMediaDownload(); } @Override public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { super.executeMediaAndDownloadTo(outputStream); } @Override public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { return super.executeMediaAsInputStream(); } @Override public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { return super.executeMedia(); } @Override public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); return new com.google.api.client.http.GenericUrl( com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); } @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 Export set$Xgafv(java.lang.String $Xgafv) { return (Export) super.set$Xgafv($Xgafv); } @Override public Export setAccessToken(java.lang.String accessToken) { return (Export) super.setAccessToken(accessToken); } @Override public Export setAlt(java.lang.String alt) { return (Export) super.setAlt(alt); } @Override public Export setCallback(java.lang.String callback) { return (Export) super.setCallback(callback); } @Override public Export setFields(java.lang.String fields) { return (Export) super.setFields(fields); } @Override public Export setKey(java.lang.String key) { return (Export) super.setKey(key); } @Override public Export setOauthToken(java.lang.String oauthToken) { return (Export) super.setOauthToken(oauthToken); } @Override public Export setPrettyPrint(java.lang.Boolean prettyPrint) { return (Export) super.setPrettyPrint(prettyPrint); } @Override public Export setQuotaUser(java.lang.String quotaUser) { return (Export) super.setQuotaUser(quotaUser); } @Override public Export setUploadType(java.lang.String uploadType) { return (Export) super.setUploadType(uploadType); } @Override public Export setUploadProtocol(java.lang.String uploadProtocol) { return (Export) super.setUploadProtocol(uploadProtocol); } /** The ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Export setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** Required. The MIME type of the format requested for this export. */ @com.google.api.client.util.Key private java.lang.String mimeType; /** Required. The MIME type of the format requested for this export. */ public java.lang.String getMimeType() { return mimeType; } /** Required. The MIME type of the format requested for this export. */ public Export setMimeType(java.lang.String mimeType) { this.mimeType = mimeType; return this; } @Override public Export set(String parameterName, Object value) { return (Export) super.set(parameterName, value); } } /** * Generates a set of file IDs which can be provided in insert or copy requests. * * Create a request for the method "files.generateIds". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link GenerateIds#execute()} method to invoke the remote operation. * * @return the request */ public GenerateIds generateIds() throws java.io.IOException { GenerateIds result = new GenerateIds(); initialize(result); return result; } public class GenerateIds extends DriveRequest { private static final String REST_PATH = "files/generateIds"; /** * Generates a set of file IDs which can be provided in insert or copy requests. * * Create a request for the method "files.generateIds". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link GenerateIds#execute()} method to invoke the remote operation.

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

* * @since 1.13 */ protected GenerateIds() { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.GeneratedIds.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 GenerateIds set$Xgafv(java.lang.String $Xgafv) { return (GenerateIds) super.set$Xgafv($Xgafv); } @Override public GenerateIds setAccessToken(java.lang.String accessToken) { return (GenerateIds) super.setAccessToken(accessToken); } @Override public GenerateIds setAlt(java.lang.String alt) { return (GenerateIds) super.setAlt(alt); } @Override public GenerateIds setCallback(java.lang.String callback) { return (GenerateIds) super.setCallback(callback); } @Override public GenerateIds setFields(java.lang.String fields) { return (GenerateIds) super.setFields(fields); } @Override public GenerateIds setKey(java.lang.String key) { return (GenerateIds) super.setKey(key); } @Override public GenerateIds setOauthToken(java.lang.String oauthToken) { return (GenerateIds) super.setOauthToken(oauthToken); } @Override public GenerateIds setPrettyPrint(java.lang.Boolean prettyPrint) { return (GenerateIds) super.setPrettyPrint(prettyPrint); } @Override public GenerateIds setQuotaUser(java.lang.String quotaUser) { return (GenerateIds) super.setQuotaUser(quotaUser); } @Override public GenerateIds setUploadType(java.lang.String uploadType) { return (GenerateIds) super.setUploadType(uploadType); } @Override public GenerateIds setUploadProtocol(java.lang.String uploadProtocol) { return (GenerateIds) super.setUploadProtocol(uploadProtocol); } /** Maximum number of IDs to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of IDs to return. [default: 10] [minimum: 1] [maximum: 1000] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of IDs to return. */ public GenerateIds setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * The space in which the IDs can be used to create new files. Supported values are `drive` * and `appDataFolder`. (Default: `drive`) */ @com.google.api.client.util.Key private java.lang.String space; /** The space in which the IDs can be used to create new files. Supported values are `drive` and `appDataFolder`. (Default: `drive`) [default: drive] */ public java.lang.String getSpace() { return space; } /** * The space in which the IDs can be used to create new files. Supported values are `drive` * and `appDataFolder`. (Default: `drive`) */ public GenerateIds setSpace(java.lang.String space) { this.space = space; return this; } /** * The type of items which the IDs can be used for. Supported values are `files` and * `shortcuts`. Note that `shortcuts` are only supported in the `drive` `space`. (Default: * `files`) */ @com.google.api.client.util.Key private java.lang.String type; /** The type of items which the IDs can be used for. Supported values are `files` and `shortcuts`. Note that `shortcuts` are only supported in the `drive` `space`. (Default: `files`) [default: files] */ public java.lang.String getType() { return type; } /** * The type of items which the IDs can be used for. Supported values are `files` and * `shortcuts`. Note that `shortcuts` are only supported in the `drive` `space`. (Default: * `files`) */ public GenerateIds setType(java.lang.String type) { this.type = type; return this; } @Override public GenerateIds set(String parameterName, Object value) { return (GenerateIds) super.set(parameterName, value); } } /** * Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the * response includes the file contents in the response body. Downloading content with `alt=media` * only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use * [`files.export`](/drive/api/reference/rest/v2/files/export) instead. For more information, see * [Download & export files](/drive/api/guides/manage-downloads). * * Create a request for the method "files.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param fileId The ID for the file in question. * @return the request */ public Get get(java.lang.String fileId) throws java.io.IOException { Get result = new Get(fileId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "files/{fileId}"; /** * Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the * response includes the file contents in the response body. Downloading content with `alt=media` * only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use * [`files.export`](/drive/api/reference/rest/v2/files/export) instead. For more information, see * [Download & export files](/drive/api/guides/manage-downloads). * * Create a request for the method "files.get". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file in question. * @since 1.13 */ protected Get(java.lang.String fileId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.File.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); initializeMediaDownload(); } @Override public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { super.executeMediaAndDownloadTo(outputStream); } @Override public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { return super.executeMediaAsInputStream(); } @Override public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { return super.executeMedia(); } @Override public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); return new com.google.api.client.http.GenericUrl( com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); } @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 ID for the file in question. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file in question. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file in question. */ public Get setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * Whether the user is acknowledging the risk of downloading known malware or other abusive * files. This is only applicable when the `alt` parameter is set to `media` and the user is * the owner of the file or an organizer of the shared drive in which the file resides. */ @com.google.api.client.util.Key private java.lang.Boolean acknowledgeAbuse; /** Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `media` and the user is the owner of the file or an organizer of the shared drive in which the file resides. [default: false] */ public java.lang.Boolean getAcknowledgeAbuse() { return acknowledgeAbuse; } /** * Whether the user is acknowledging the risk of downloading known malware or other abusive * files. This is only applicable when the `alt` parameter is set to `media` and the user is * the owner of the file or an organizer of the shared drive in which the file resides. */ public Get setAcknowledgeAbuse(java.lang.Boolean acknowledgeAbuse) { this.acknowledgeAbuse = acknowledgeAbuse; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `media` and the user is the owner of the file or an organizer of the shared drive in which the file resides. *

*/ public boolean isAcknowledgeAbuse() { if (acknowledgeAbuse == null || acknowledgeAbuse == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return acknowledgeAbuse; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Get setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Get setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** Deprecated: This parameter has no function. */ @com.google.api.client.util.Key private java.lang.String projection; /** Deprecated: This parameter has no function. */ public java.lang.String getProjection() { return projection; } /** Deprecated: This parameter has no function. */ public Get setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. */ @com.google.api.client.util.Key private java.lang.String revisionId; /** Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. */ public java.lang.String getRevisionId() { return revisionId; } /** * Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. */ public Get setRevisionId(java.lang.String revisionId) { this.revisionId = revisionId; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Get setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Get setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** * Deprecated: Use `files.update` with `modifiedDateBehavior=noChange, updateViewedDate=true` * and an empty request body. */ @com.google.api.client.util.Key private java.lang.Boolean updateViewedDate; /** Deprecated: Use `files.update` with `modifiedDateBehavior=noChange, updateViewedDate=true` and an empty request body. [default: false] */ public java.lang.Boolean getUpdateViewedDate() { return updateViewedDate; } /** * Deprecated: Use `files.update` with `modifiedDateBehavior=noChange, updateViewedDate=true` * and an empty request body. */ public Get setUpdateViewedDate(java.lang.Boolean updateViewedDate) { this.updateViewedDate = updateViewedDate; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `files.update` with `modifiedDateBehavior=noChange, updateViewedDate=true` and an empty request body. *

*/ public boolean isUpdateViewedDate() { if (updateViewedDate == null || updateViewedDate == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return updateViewedDate; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Inserts a new file. This method supports an upload* URI and accepts uploaded media with the * following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*` * Note: Specify a valid MIME type, rather than the literal `*` value. The literal `*` is only used * to indicate that any valid MIME type can be uploaded. For more information on uploading files, * see [Upload file data](/drive/api/guides/manage-uploads). Apps creating shortcuts with * `files.insert` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should * specify a file extension in the `title` property when inserting files with the API. For example, * an operation to insert a JPEG file should specify something like `"title": "cat.jpg"` in the * metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with * the extension originally specified in the `title` property. When a Google Drive user requests to * download a file, or when the file is downloaded through the sync client, Drive builds a full * filename (with extension) based on the title. In cases where the extension is missing, Drive * attempts to determine the extension based on the file's MIME type. * * Create a request for the method "files.insert". * * This request holds the parameters needed by the drive 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.drive.model.File} * @return the request */ public Insert insert(com.google.api.services.drive.model.File content) throws java.io.IOException { Insert result = new Insert(content); initialize(result); return result; } /** * Inserts a new file. This method supports an upload* URI and accepts uploaded media with the * following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*` * Note: Specify a valid MIME type, rather than the literal `*` value. The literal `*` is only used * to indicate that any valid MIME type can be uploaded. For more information on uploading files, * see [Upload file data](/drive/api/guides/manage-uploads). Apps creating shortcuts with * `files.insert` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should * specify a file extension in the `title` property when inserting files with the API. For example, * an operation to insert a JPEG file should specify something like `"title": "cat.jpg"` in the * metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with * the extension originally specified in the `title` property. When a Google Drive user requests to * download a file, or when the file is downloaded through the sync client, Drive builds a full * filename (with extension) based on the title. In cases where the extension is missing, Drive * attempts to determine the extension based on the file's MIME type. * * Create a request for the method "files.insert". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * *

* This method should be used for uploading media content. *

* * * @param content the {@link com.google.api.services.drive.model.File} media metadata or {@code null} if none * @param mediaContent The media HTTP content. * @return the request * @throws java.io.IOException if the initialization of the request fails */ public Insert insert(com.google.api.services.drive.model.File content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws java.io.IOException { Insert result = new Insert(content, mediaContent); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "files"; /** * Inserts a new file. This method supports an upload* URI and accepts uploaded media with the * following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*` * Note: Specify a valid MIME type, rather than the literal `*` value. The literal `*` is only * used to indicate that any valid MIME type can be uploaded. For more information on uploading * files, see [Upload file data](/drive/api/guides/manage-uploads). Apps creating shortcuts with * `files.insert` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should * specify a file extension in the `title` property when inserting files with the API. For * example, an operation to insert a JPEG file should specify something like `"title": "cat.jpg"` * in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property * populated with the extension originally specified in the `title` property. When a Google Drive * user requests to download a file, or when the file is downloaded through the sync client, Drive * builds a full filename (with extension) based on the title. In cases where the extension is * missing, Drive attempts to determine the extension based on the file's MIME type. * * Create a request for the method "files.insert". * * This request holds the parameters needed by the the drive 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.drive.model.File} * @since 1.13 */ protected Insert(com.google.api.services.drive.model.File content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.File.class); } /** * Inserts a new file. This method supports an upload* URI and accepts uploaded media with the * following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*` * Note: Specify a valid MIME type, rather than the literal `*` value. The literal `*` is only * used to indicate that any valid MIME type can be uploaded. For more information on uploading * files, see [Upload file data](/drive/api/guides/manage-uploads). Apps creating shortcuts with * `files.insert` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should * specify a file extension in the `title` property when inserting files with the API. For * example, an operation to insert a JPEG file should specify something like `"title": "cat.jpg"` * in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property * populated with the extension originally specified in the `title` property. When a Google Drive * user requests to download a file, or when the file is downloaded through the sync client, Drive * builds a full filename (with extension) based on the title. In cases where the extension is * missing, Drive attempts to determine the extension based on the file's MIME type. * * Create a request for the method "files.insert". * * This request holds the parameters needed by the the drive 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.

* *

* This constructor should be used for uploading media content. *

* * * @param content the {@link com.google.api.services.drive.model.File} media metadata or {@code null} if none * @param mediaContent The media HTTP content. * @since 1.13 */ protected Insert(com.google.api.services.drive.model.File content, com.google.api.client.http.AbstractInputStreamContent mediaContent) { super(Drive.this, "POST", "/upload/" + getServicePath() + REST_PATH, content, com.google.api.services.drive.model.File.class); com.google.api.client.util.Preconditions.checkNotNull(mediaContent, "Required parameter mediaContent must be specified."); initializeMediaUpload(mediaContent); } @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); } /** Whether to convert this file to the corresponding Docs Editors format. */ @com.google.api.client.util.Key private java.lang.Boolean convert; /** Whether to convert this file to the corresponding Docs Editors format. [default: false] */ public java.lang.Boolean getConvert() { return convert; } /** Whether to convert this file to the corresponding Docs Editors format. */ public Insert setConvert(java.lang.Boolean convert) { this.convert = convert; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to convert this file to the corresponding Docs Editors format. *

*/ public boolean isConvert() { if (convert == null || convert == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return convert; } /** Deprecated: Creating files in multiple folders is no longer supported. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: Creating files in multiple folders is no longer supported. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** Deprecated: Creating files in multiple folders is no longer supported. */ public Insert setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Creating files in multiple folders is no longer supported. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Insert setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Insert setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ @com.google.api.client.util.Key private java.lang.Boolean ocr; /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. [default: false] */ public java.lang.Boolean getOcr() { return ocr; } /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ public Insert setOcr(java.lang.Boolean ocr) { this.ocr = ocr; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. *

*/ public boolean isOcr() { if (ocr == null || ocr == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return ocr; } /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ @com.google.api.client.util.Key private java.lang.String ocrLanguage; /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ public java.lang.String getOcrLanguage() { return ocrLanguage; } /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ public Insert setOcrLanguage(java.lang.String ocrLanguage) { this.ocrLanguage = ocrLanguage; return this; } /** * Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 * pinned revisions. */ @com.google.api.client.util.Key private java.lang.Boolean pinned; /** Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions. [default: false] */ public java.lang.Boolean getPinned() { return pinned; } /** * Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 * pinned revisions. */ public Insert setPinned(java.lang.Boolean pinned) { this.pinned = pinned; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions. *

*/ public boolean isPinned() { if (pinned == null || pinned == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return pinned; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Insert setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Insert setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** The language of the timed text. */ @com.google.api.client.util.Key private java.lang.String timedTextLanguage; /** The language of the timed text. */ public java.lang.String getTimedTextLanguage() { return timedTextLanguage; } /** The language of the timed text. */ public Insert setTimedTextLanguage(java.lang.String timedTextLanguage) { this.timedTextLanguage = timedTextLanguage; return this; } /** The timed text track name. */ @com.google.api.client.util.Key private java.lang.String timedTextTrackName; /** The timed text track name. */ public java.lang.String getTimedTextTrackName() { return timedTextTrackName; } /** The timed text track name. */ public Insert setTimedTextTrackName(java.lang.String timedTextTrackName) { this.timedTextTrackName = timedTextTrackName; return this; } /** Whether to use the content as indexable text. */ @com.google.api.client.util.Key private java.lang.Boolean useContentAsIndexableText; /** Whether to use the content as indexable text. [default: false] */ public java.lang.Boolean getUseContentAsIndexableText() { return useContentAsIndexableText; } /** Whether to use the content as indexable text. */ public Insert setUseContentAsIndexableText(java.lang.Boolean useContentAsIndexableText) { this.useContentAsIndexableText = useContentAsIndexableText; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to use the content as indexable text. *

*/ public boolean isUseContentAsIndexableText() { if (useContentAsIndexableText == null || useContentAsIndexableText == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useContentAsIndexableText; } /** The visibility of the new file. This parameter is only relevant when convert=false. */ @com.google.api.client.util.Key private java.lang.String visibility; /** The visibility of the new file. This parameter is only relevant when convert=false. [default: DEFAULT] */ public java.lang.String getVisibility() { return visibility; } /** The visibility of the new file. This parameter is only relevant when convert=false. */ public Insert setVisibility(java.lang.String visibility) { this.visibility = visibility; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists the user's files. This method accepts the `q` parameter, which is a search query combining * one or more search terms. For more information, see the [Search for files & * folders](/drive/api/guides/search-files) guide. *Note:* This method returns *all* files by * default, including trashed files. If you don't want trashed files to appear in the list, use the * `trashed=false` query parameter to remove trashed files from the results. * * Create a request for the method "files.list". * * This request holds the parameters needed by the drive 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 DriveRequest { private static final String REST_PATH = "files"; /** * Lists the user's files. This method accepts the `q` parameter, which is a search query * combining one or more search terms. For more information, see the [Search for files & * folders](/drive/api/guides/search-files) guide. *Note:* This method returns *all* files by * default, including trashed files. If you don't want trashed files to appear in the list, use * the `trashed=false` query parameter to remove trashed files from the results. * * Create a request for the method "files.list". * * This request holds the parameters needed by the the drive 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(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.FileList.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); } /** * Bodies of items (files/documents) to which the query applies. Supported bodies are * `default`, `domain`, `drive` and `allDrives`. Prefer `default` or `drive` to `allDrives` * for efficiency. */ @com.google.api.client.util.Key private java.lang.String corpora; /** Bodies of items (files/documents) to which the query applies. Supported bodies are `default`, `domain`, `drive` and `allDrives`. Prefer `default` or `drive` to `allDrives` for efficiency. */ public java.lang.String getCorpora() { return corpora; } /** * Bodies of items (files/documents) to which the query applies. Supported bodies are * `default`, `domain`, `drive` and `allDrives`. Prefer `default` or `drive` to `allDrives` * for efficiency. */ public List setCorpora(java.lang.String corpora) { this.corpora = corpora; return this; } /** * Deprecated: The body of items (files/documents) to which the query applies. Use `corpora` * instead. */ @com.google.api.client.util.Key private java.lang.String corpus; /** Deprecated: The body of items (files/documents) to which the query applies. Use `corpora` instead. */ public java.lang.String getCorpus() { return corpus; } /** * Deprecated: The body of items (files/documents) to which the query applies. Use `corpora` * instead. */ public List setCorpus(java.lang.String corpus) { this.corpus = corpus; return this; } /** ID of the shared drive to search. */ @com.google.api.client.util.Key private java.lang.String driveId; /** ID of the shared drive to search. */ public java.lang.String getDriveId() { return driveId; } /** ID of the shared drive to search. */ public List setDriveId(java.lang.String driveId) { this.driveId = driveId; return this; } /** Whether both My Drive and shared drive items should be included in results. */ @com.google.api.client.util.Key private java.lang.Boolean includeItemsFromAllDrives; /** Whether both My Drive and shared drive items should be included in results. [default: false] */ public java.lang.Boolean getIncludeItemsFromAllDrives() { return includeItemsFromAllDrives; } /** Whether both My Drive and shared drive items should be included in results. */ public List setIncludeItemsFromAllDrives(java.lang.Boolean includeItemsFromAllDrives) { this.includeItemsFromAllDrives = includeItemsFromAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether both My Drive and shared drive items should be included in results. *

*/ public boolean isIncludeItemsFromAllDrives() { if (includeItemsFromAllDrives == null || includeItemsFromAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeItemsFromAllDrives; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public List setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public List setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** Deprecated: Use `includeItemsFromAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean includeTeamDriveItems; /** Deprecated: Use `includeItemsFromAllDrives` instead. [default: false] */ public java.lang.Boolean getIncludeTeamDriveItems() { return includeTeamDriveItems; } /** Deprecated: Use `includeItemsFromAllDrives` instead. */ public List setIncludeTeamDriveItems(java.lang.Boolean includeTeamDriveItems) { this.includeTeamDriveItems = includeTeamDriveItems; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `includeItemsFromAllDrives` instead. *

*/ public boolean isIncludeTeamDriveItems() { if (includeTeamDriveItems == null || includeTeamDriveItems == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeTeamDriveItems; } /** * The maximum number of files to return per page. Partial or empty result pages are possible * even before the end of the files list has been reached. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached. [default: 100] [minimum: 0] */ public java.lang.Integer getMaxResults() { return maxResults; } /** * The maximum number of files to return per page. Partial or empty result pages are possible * even before the end of the files list has been reached. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, * `lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`, * `sharedWithMeDate`, `starred`, `title`, and `title_natural`. Each key sorts ascending by * default, but may be reversed with the `desc` modifier. Example usage: * ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for * users with approximately one million files in which the requested sort order is ignored. */ @com.google.api.client.util.Key private java.lang.String orderBy; /** A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, `lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`, `sharedWithMeDate`, `starred`, `title`, and `title_natural`. Each key sorts ascending by default, but may be reversed with the `desc` modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored. */ public java.lang.String getOrderBy() { return orderBy; } /** * A comma-separated list of sort keys. Valid keys are `createdDate`, `folder`, * `lastViewedByMeDate`, `modifiedByMeDate`, `modifiedDate`, `quotaBytesUsed`, `recency`, * `sharedWithMeDate`, `starred`, `title`, and `title_natural`. Each key sorts ascending by * default, but may be reversed with the `desc` modifier. Example usage: * ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for * users with approximately one million files in which the requested sort order is ignored. */ public List setOrderBy(java.lang.String orderBy) { this.orderBy = orderBy; return this; } /** Page token for files. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Page token for files. */ public java.lang.String getPageToken() { return pageToken; } /** Page token for files. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Deprecated: This parameter has no function. */ @com.google.api.client.util.Key private java.lang.String projection; /** Deprecated: This parameter has no function. */ public java.lang.String getProjection() { return projection; } /** Deprecated: This parameter has no function. */ public List setProjection(java.lang.String projection) { this.projection = projection; return this; } /** Query string for searching files. */ @com.google.api.client.util.Key private java.lang.String q; /** Query string for searching files. */ public java.lang.String getQ() { return q; } /** Query string for searching files. */ public List setQ(java.lang.String q) { this.q = q; return this; } /** * A comma-separated list of spaces to query. Supported values are `drive`, and * `appDataFolder`. */ @com.google.api.client.util.Key private java.lang.String spaces; /** A comma-separated list of spaces to query. Supported values are `drive`, and `appDataFolder`. */ public java.lang.String getSpaces() { return spaces; } /** * A comma-separated list of spaces to query. Supported values are `drive`, and * `appDataFolder`. */ public List setSpaces(java.lang.String spaces) { this.spaces = spaces; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public List setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public List setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** Deprecated: Use `driveId` instead. */ @com.google.api.client.util.Key private java.lang.String teamDriveId; /** Deprecated: Use `driveId` instead. */ public java.lang.String getTeamDriveId() { return teamDriveId; } /** Deprecated: Use `driveId` instead. */ public List setTeamDriveId(java.lang.String teamDriveId) { this.teamDriveId = teamDriveId; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Lists the labels on a file. * * Create a request for the method "files.listLabels". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link ListLabels#execute()} method to invoke the remote operation. * * @param fileId The ID for the file. * @return the request */ public ListLabels listLabels(java.lang.String fileId) throws java.io.IOException { ListLabels result = new ListLabels(fileId); initialize(result); return result; } public class ListLabels extends DriveRequest { private static final String REST_PATH = "files/{fileId}/listLabels"; /** * Lists the labels on a file. * * Create a request for the method "files.listLabels". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link ListLabels#execute()} method to invoke the remote operation.

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

* * @param fileId The ID for the file. * @since 1.13 */ protected ListLabels(java.lang.String fileId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.LabelList.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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 ListLabels set$Xgafv(java.lang.String $Xgafv) { return (ListLabels) super.set$Xgafv($Xgafv); } @Override public ListLabels setAccessToken(java.lang.String accessToken) { return (ListLabels) super.setAccessToken(accessToken); } @Override public ListLabels setAlt(java.lang.String alt) { return (ListLabels) super.setAlt(alt); } @Override public ListLabels setCallback(java.lang.String callback) { return (ListLabels) super.setCallback(callback); } @Override public ListLabels setFields(java.lang.String fields) { return (ListLabels) super.setFields(fields); } @Override public ListLabels setKey(java.lang.String key) { return (ListLabels) super.setKey(key); } @Override public ListLabels setOauthToken(java.lang.String oauthToken) { return (ListLabels) super.setOauthToken(oauthToken); } @Override public ListLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListLabels) super.setPrettyPrint(prettyPrint); } @Override public ListLabels setQuotaUser(java.lang.String quotaUser) { return (ListLabels) super.setQuotaUser(quotaUser); } @Override public ListLabels setUploadType(java.lang.String uploadType) { return (ListLabels) super.setUploadType(uploadType); } @Override public ListLabels setUploadProtocol(java.lang.String uploadProtocol) { return (ListLabels) super.setUploadProtocol(uploadProtocol); } /** The ID for the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file. */ public ListLabels setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The maximum number of labels to return per page. When not set, defaults to 100. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** The maximum number of labels to return per page. When not set, defaults to 100. [default: 100] [minimum: 1] [maximum: 100] */ public java.lang.Integer getMaxResults() { return maxResults; } /** The maximum number of labels to return per page. When not set, defaults to 100. */ public ListLabels setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * The token for continuing a previous list request on the next page. This should be set to * the value of `nextPageToken` from the previous response. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response. */ public java.lang.String getPageToken() { return pageToken; } /** * The token for continuing a previous list request on the next page. This should be set to * the value of `nextPageToken` from the previous response. */ public ListLabels setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } @Override public ListLabels set(String parameterName, Object value) { return (ListLabels) super.set(parameterName, value); } } /** * Modifies the set of labels applied to a file. Returns a list of the labels that were added or * modified. * * Create a request for the method "files.modifyLabels". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link ModifyLabels#execute()} method to invoke the remote operation. * * @param fileId The ID of the file to which the labels belong. * @param content the {@link com.google.api.services.drive.model.ModifyLabelsRequest} * @return the request */ public ModifyLabels modifyLabels(java.lang.String fileId, com.google.api.services.drive.model.ModifyLabelsRequest content) throws java.io.IOException { ModifyLabels result = new ModifyLabels(fileId, content); initialize(result); return result; } public class ModifyLabels extends DriveRequest { private static final String REST_PATH = "files/{fileId}/modifyLabels"; /** * Modifies the set of labels applied to a file. Returns a list of the labels that were added or * modified. * * Create a request for the method "files.modifyLabels". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link ModifyLabels#execute()} method to invoke the remote operation.

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

* * @param fileId The ID of the file to which the labels belong. * @param content the {@link com.google.api.services.drive.model.ModifyLabelsRequest} * @since 1.13 */ protected ModifyLabels(java.lang.String fileId, com.google.api.services.drive.model.ModifyLabelsRequest content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.ModifyLabelsResponse.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); } @Override public ModifyLabels set$Xgafv(java.lang.String $Xgafv) { return (ModifyLabels) super.set$Xgafv($Xgafv); } @Override public ModifyLabels setAccessToken(java.lang.String accessToken) { return (ModifyLabels) super.setAccessToken(accessToken); } @Override public ModifyLabels setAlt(java.lang.String alt) { return (ModifyLabels) super.setAlt(alt); } @Override public ModifyLabels setCallback(java.lang.String callback) { return (ModifyLabels) super.setCallback(callback); } @Override public ModifyLabels setFields(java.lang.String fields) { return (ModifyLabels) super.setFields(fields); } @Override public ModifyLabels setKey(java.lang.String key) { return (ModifyLabels) super.setKey(key); } @Override public ModifyLabels setOauthToken(java.lang.String oauthToken) { return (ModifyLabels) super.setOauthToken(oauthToken); } @Override public ModifyLabels setPrettyPrint(java.lang.Boolean prettyPrint) { return (ModifyLabels) super.setPrettyPrint(prettyPrint); } @Override public ModifyLabels setQuotaUser(java.lang.String quotaUser) { return (ModifyLabels) super.setQuotaUser(quotaUser); } @Override public ModifyLabels setUploadType(java.lang.String uploadType) { return (ModifyLabels) super.setUploadType(uploadType); } @Override public ModifyLabels setUploadProtocol(java.lang.String uploadProtocol) { return (ModifyLabels) super.setUploadProtocol(uploadProtocol); } /** The ID of the file to which the labels belong. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file to which the labels belong. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file to which the labels belong. */ public ModifyLabels setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } @Override public ModifyLabels set(String parameterName, Object value) { return (ModifyLabels) super.set(parameterName, value); } } /** * Updates a file's metadata and/or content. When calling this method, only populate fields in the * request that you want to modify. When updating fields, some fields might change automatically, * such as modifiedDate. This method supports patch semantics. * * Create a request for the method "files.patch". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param fileId The ID of the file to update. * @param content the {@link com.google.api.services.drive.model.File} * @return the request */ public Patch patch(java.lang.String fileId, com.google.api.services.drive.model.File content) throws java.io.IOException { Patch result = new Patch(fileId, content); initialize(result); return result; } public class Patch extends DriveRequest { private static final String REST_PATH = "files/{fileId}"; /** * Updates a file's metadata and/or content. When calling this method, only populate fields in the * request that you want to modify. When updating fields, some fields might change automatically, * such as modifiedDate. This method supports patch semantics. * * Create a request for the method "files.patch". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file to update. * @param content the {@link com.google.api.services.drive.model.File} * @since 1.13 */ protected Patch(java.lang.String fileId, com.google.api.services.drive.model.File content) { super(Drive.this, "PATCH", REST_PATH, content, com.google.api.services.drive.model.File.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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 ID of the file to update. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file to update. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file to update. */ public Patch setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** Comma-separated list of parent IDs to add. */ @com.google.api.client.util.Key private java.lang.String addParents; /** Comma-separated list of parent IDs to add. */ public java.lang.String getAddParents() { return addParents; } /** Comma-separated list of parent IDs to add. */ public Patch setAddParents(java.lang.String addParents) { this.addParents = addParents; return this; } /** Deprecated: This parameter has no function. */ @com.google.api.client.util.Key private java.lang.Boolean convert; /** Deprecated: This parameter has no function. [default: false] */ public java.lang.Boolean getConvert() { return convert; } /** Deprecated: This parameter has no function. */ public Patch setConvert(java.lang.Boolean convert) { this.convert = convert; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: This parameter has no function. *

*/ public boolean isConvert() { if (convert == null || convert == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return convert; } /** * Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` * instead. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` instead. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` * instead. */ public Patch setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` instead. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Patch setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Patch setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** * Determines the behavior in which `modifiedDate` is updated. This overrides * `setModifiedDate`. */ @com.google.api.client.util.Key private java.lang.String modifiedDateBehavior; /** Determines the behavior in which `modifiedDate` is updated. This overrides `setModifiedDate`. */ public java.lang.String getModifiedDateBehavior() { return modifiedDateBehavior; } /** * Determines the behavior in which `modifiedDate` is updated. This overrides * `setModifiedDate`. */ public Patch setModifiedDateBehavior(java.lang.String modifiedDateBehavior) { this.modifiedDateBehavior = modifiedDateBehavior; return this; } /** * Whether a blob upload should create a new revision. If false, the blob data in the current * head revision is replaced. If true or not set, a new blob is created as head revision, and * previous unpinned revisions are preserved for a short period of time. Pinned revisions are * stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For * details on how revisions are retained, see the [Drive Help * Center](https://support.google.com/drive/answer/2409045). Note that this field is ignored * if there is no payload in the request. */ @com.google.api.client.util.Key private java.lang.Boolean newRevision; /** Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the [Drive Help Center](https://support.google.com/drive/answer/2409045). Note that this field is ignored if there is no payload in the request. [default: true] */ public java.lang.Boolean getNewRevision() { return newRevision; } /** * Whether a blob upload should create a new revision. If false, the blob data in the current * head revision is replaced. If true or not set, a new blob is created as head revision, and * previous unpinned revisions are preserved for a short period of time. Pinned revisions are * stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For * details on how revisions are retained, see the [Drive Help * Center](https://support.google.com/drive/answer/2409045). Note that this field is ignored * if there is no payload in the request. */ public Patch setNewRevision(java.lang.Boolean newRevision) { this.newRevision = newRevision; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the [Drive Help Center](https://support.google.com/drive/answer/2409045). Note that this field is ignored if there is no payload in the request. *

*/ public boolean isNewRevision() { if (newRevision == null || newRevision == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return newRevision; } /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ @com.google.api.client.util.Key private java.lang.Boolean ocr; /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. [default: false] */ public java.lang.Boolean getOcr() { return ocr; } /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ public Patch setOcr(java.lang.Boolean ocr) { this.ocr = ocr; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. *

*/ public boolean isOcr() { if (ocr == null || ocr == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return ocr; } /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ @com.google.api.client.util.Key private java.lang.String ocrLanguage; /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ public java.lang.String getOcrLanguage() { return ocrLanguage; } /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ public Patch setOcrLanguage(java.lang.String ocrLanguage) { this.ocrLanguage = ocrLanguage; return this; } /** * Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note * that this field is ignored if there is no payload in the request. */ @com.google.api.client.util.Key private java.lang.Boolean pinned; /** Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note that this field is ignored if there is no payload in the request. [default: false] */ public java.lang.Boolean getPinned() { return pinned; } /** * Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note * that this field is ignored if there is no payload in the request. */ public Patch setPinned(java.lang.Boolean pinned) { this.pinned = pinned; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. Note that this field is ignored if there is no payload in the request. *

*/ public boolean isPinned() { if (pinned == null || pinned == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return pinned; } /** Comma-separated list of parent IDs to remove. */ @com.google.api.client.util.Key private java.lang.String removeParents; /** Comma-separated list of parent IDs to remove. */ public java.lang.String getRemoveParents() { return removeParents; } /** Comma-separated list of parent IDs to remove. */ public Patch setRemoveParents(java.lang.String removeParents) { this.removeParents = removeParents; return this; } /** * Whether to set the modified date using the value supplied in the request body. Setting this * field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`, and `false` is * equivalent to `modifiedDateBehavior=now`. To prevent any changes to the modified date set * `modifiedDateBehavior=noChange`. */ @com.google.api.client.util.Key private java.lang.Boolean setModifiedDate; /** Whether to set the modified date using the value supplied in the request body. Setting this field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`, and `false` is equivalent to `modifiedDateBehavior=now`. To prevent any changes to the modified date set `modifiedDateBehavior=noChange`. [default: false] */ public java.lang.Boolean getSetModifiedDate() { return setModifiedDate; } /** * Whether to set the modified date using the value supplied in the request body. Setting this * field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`, and `false` is * equivalent to `modifiedDateBehavior=now`. To prevent any changes to the modified date set * `modifiedDateBehavior=noChange`. */ public Patch setSetModifiedDate(java.lang.Boolean setModifiedDate) { this.setModifiedDate = setModifiedDate; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to set the modified date using the value supplied in the request body. Setting this field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`, and `false` is equivalent to `modifiedDateBehavior=now`. To prevent any changes to the modified date set `modifiedDateBehavior=noChange`. *

*/ public boolean isSetModifiedDate() { if (setModifiedDate == null || setModifiedDate == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return setModifiedDate; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Patch setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Patch setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** The language of the timed text. */ @com.google.api.client.util.Key private java.lang.String timedTextLanguage; /** The language of the timed text. */ public java.lang.String getTimedTextLanguage() { return timedTextLanguage; } /** The language of the timed text. */ public Patch setTimedTextLanguage(java.lang.String timedTextLanguage) { this.timedTextLanguage = timedTextLanguage; return this; } /** The timed text track name. */ @com.google.api.client.util.Key private java.lang.String timedTextTrackName; /** The timed text track name. */ public java.lang.String getTimedTextTrackName() { return timedTextTrackName; } /** The timed text track name. */ public Patch setTimedTextTrackName(java.lang.String timedTextTrackName) { this.timedTextTrackName = timedTextTrackName; return this; } /** Whether to update the view date after successfully updating the file. */ @com.google.api.client.util.Key private java.lang.Boolean updateViewedDate; /** Whether to update the view date after successfully updating the file. [default: true] */ public java.lang.Boolean getUpdateViewedDate() { return updateViewedDate; } /** Whether to update the view date after successfully updating the file. */ public Patch setUpdateViewedDate(java.lang.Boolean updateViewedDate) { this.updateViewedDate = updateViewedDate; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to update the view date after successfully updating the file. *

*/ public boolean isUpdateViewedDate() { if (updateViewedDate == null || updateViewedDate == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return updateViewedDate; } /** Whether to use the content as indexable text. */ @com.google.api.client.util.Key private java.lang.Boolean useContentAsIndexableText; /** Whether to use the content as indexable text. [default: false] */ public java.lang.Boolean getUseContentAsIndexableText() { return useContentAsIndexableText; } /** Whether to use the content as indexable text. */ public Patch setUseContentAsIndexableText(java.lang.Boolean useContentAsIndexableText) { this.useContentAsIndexableText = useContentAsIndexableText; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to use the content as indexable text. *

*/ public boolean isUseContentAsIndexableText() { if (useContentAsIndexableText == null || useContentAsIndexableText == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useContentAsIndexableText; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Set the file's updated time to the current server time. * * Create a request for the method "files.touch". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Touch#execute()} method to invoke the remote operation. * * @param fileId The ID of the file to update. * @return the request */ public Touch touch(java.lang.String fileId) throws java.io.IOException { Touch result = new Touch(fileId); initialize(result); return result; } public class Touch extends DriveRequest { private static final String REST_PATH = "files/{fileId}/touch"; /** * Set the file's updated time to the current server time. * * Create a request for the method "files.touch". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Touch#execute()} method to invoke the remote operation.

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

* * @param fileId The ID of the file to update. * @since 1.13 */ protected Touch(java.lang.String fileId) { super(Drive.this, "POST", REST_PATH, null, com.google.api.services.drive.model.File.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); } @Override public Touch set$Xgafv(java.lang.String $Xgafv) { return (Touch) super.set$Xgafv($Xgafv); } @Override public Touch setAccessToken(java.lang.String accessToken) { return (Touch) super.setAccessToken(accessToken); } @Override public Touch setAlt(java.lang.String alt) { return (Touch) super.setAlt(alt); } @Override public Touch setCallback(java.lang.String callback) { return (Touch) super.setCallback(callback); } @Override public Touch setFields(java.lang.String fields) { return (Touch) super.setFields(fields); } @Override public Touch setKey(java.lang.String key) { return (Touch) super.setKey(key); } @Override public Touch setOauthToken(java.lang.String oauthToken) { return (Touch) super.setOauthToken(oauthToken); } @Override public Touch setPrettyPrint(java.lang.Boolean prettyPrint) { return (Touch) super.setPrettyPrint(prettyPrint); } @Override public Touch setQuotaUser(java.lang.String quotaUser) { return (Touch) super.setQuotaUser(quotaUser); } @Override public Touch setUploadType(java.lang.String uploadType) { return (Touch) super.setUploadType(uploadType); } @Override public Touch setUploadProtocol(java.lang.String uploadProtocol) { return (Touch) super.setUploadProtocol(uploadProtocol); } /** The ID of the file to update. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file to update. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file to update. */ public Touch setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Touch setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Touch setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Touch setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Touch setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } @Override public Touch set(String parameterName, Object value) { return (Touch) super.set(parameterName, value); } } /** * Moves a file to the trash. The currently authenticated user must own the file or be at least a * `fileOrganizer` on the parent for shared drive files. * * Create a request for the method "files.trash". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Trash#execute()} method to invoke the remote operation. * * @param fileId The ID of the file to trash. * @return the request */ public Trash trash(java.lang.String fileId) throws java.io.IOException { Trash result = new Trash(fileId); initialize(result); return result; } public class Trash extends DriveRequest { private static final String REST_PATH = "files/{fileId}/trash"; /** * Moves a file to the trash. The currently authenticated user must own the file or be at least a * `fileOrganizer` on the parent for shared drive files. * * Create a request for the method "files.trash". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Trash#execute()} method to invoke the remote operation.

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

* * @param fileId The ID of the file to trash. * @since 1.13 */ protected Trash(java.lang.String fileId) { super(Drive.this, "POST", REST_PATH, null, com.google.api.services.drive.model.File.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); } @Override public Trash set$Xgafv(java.lang.String $Xgafv) { return (Trash) super.set$Xgafv($Xgafv); } @Override public Trash setAccessToken(java.lang.String accessToken) { return (Trash) super.setAccessToken(accessToken); } @Override public Trash setAlt(java.lang.String alt) { return (Trash) super.setAlt(alt); } @Override public Trash setCallback(java.lang.String callback) { return (Trash) super.setCallback(callback); } @Override public Trash setFields(java.lang.String fields) { return (Trash) super.setFields(fields); } @Override public Trash setKey(java.lang.String key) { return (Trash) super.setKey(key); } @Override public Trash setOauthToken(java.lang.String oauthToken) { return (Trash) super.setOauthToken(oauthToken); } @Override public Trash setPrettyPrint(java.lang.Boolean prettyPrint) { return (Trash) super.setPrettyPrint(prettyPrint); } @Override public Trash setQuotaUser(java.lang.String quotaUser) { return (Trash) super.setQuotaUser(quotaUser); } @Override public Trash setUploadType(java.lang.String uploadType) { return (Trash) super.setUploadType(uploadType); } @Override public Trash setUploadProtocol(java.lang.String uploadProtocol) { return (Trash) super.setUploadProtocol(uploadProtocol); } /** The ID of the file to trash. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file to trash. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file to trash. */ public Trash setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Trash setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Trash setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Trash setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Trash setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } @Override public Trash set(String parameterName, Object value) { return (Trash) super.set(parameterName, value); } } /** * Restores a file from the trash. The currently authenticated user must own the file or be at least * a `fileOrganizer` on the parent for shared drive files. * * Create a request for the method "files.untrash". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Untrash#execute()} method to invoke the remote operation. * * @param fileId The ID of the file to untrash. * @return the request */ public Untrash untrash(java.lang.String fileId) throws java.io.IOException { Untrash result = new Untrash(fileId); initialize(result); return result; } public class Untrash extends DriveRequest { private static final String REST_PATH = "files/{fileId}/untrash"; /** * Restores a file from the trash. The currently authenticated user must own the file or be at * least a `fileOrganizer` on the parent for shared drive files. * * Create a request for the method "files.untrash". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Untrash#execute()} method to invoke the remote operation.

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

* * @param fileId The ID of the file to untrash. * @since 1.13 */ protected Untrash(java.lang.String fileId) { super(Drive.this, "POST", REST_PATH, null, com.google.api.services.drive.model.File.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); } @Override public Untrash set$Xgafv(java.lang.String $Xgafv) { return (Untrash) super.set$Xgafv($Xgafv); } @Override public Untrash setAccessToken(java.lang.String accessToken) { return (Untrash) super.setAccessToken(accessToken); } @Override public Untrash setAlt(java.lang.String alt) { return (Untrash) super.setAlt(alt); } @Override public Untrash setCallback(java.lang.String callback) { return (Untrash) super.setCallback(callback); } @Override public Untrash setFields(java.lang.String fields) { return (Untrash) super.setFields(fields); } @Override public Untrash setKey(java.lang.String key) { return (Untrash) super.setKey(key); } @Override public Untrash setOauthToken(java.lang.String oauthToken) { return (Untrash) super.setOauthToken(oauthToken); } @Override public Untrash setPrettyPrint(java.lang.Boolean prettyPrint) { return (Untrash) super.setPrettyPrint(prettyPrint); } @Override public Untrash setQuotaUser(java.lang.String quotaUser) { return (Untrash) super.setQuotaUser(quotaUser); } @Override public Untrash setUploadType(java.lang.String uploadType) { return (Untrash) super.setUploadType(uploadType); } @Override public Untrash setUploadProtocol(java.lang.String uploadProtocol) { return (Untrash) super.setUploadProtocol(uploadProtocol); } /** The ID of the file to untrash. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file to untrash. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file to untrash. */ public Untrash setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Untrash setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Untrash setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Untrash setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Untrash setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } @Override public Untrash set(String parameterName, Object value) { return (Untrash) super.set(parameterName, value); } } /** * Updates a file's metadata and/or content. When calling this method, only populate fields in the * request that you want to modify. When updating fields, some fields might be changed * automatically, such as `modifiedDate`. This method supports patch semantics. This method supports * an upload* URI and accepts uploaded media with the following characteristics: - *Maximum file * size:* 5,120 GB - *Accepted Media MIME types:*`*` Note: Specify a valid MIME type, rather than * the literal `*` value. The literal `*` is only used to indicate that any valid MIME type can be * uploaded. For more information on uploading files, see [Upload file * data](/drive/api/guides/manage-uploads). * * Create a request for the method "files.update". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param fileId The ID of the file to update. * @param content the {@link com.google.api.services.drive.model.File} * @return the request */ public Update update(java.lang.String fileId, com.google.api.services.drive.model.File content) throws java.io.IOException { Update result = new Update(fileId, content); initialize(result); return result; } /** * Updates a file's metadata and/or content. When calling this method, only populate fields in the * request that you want to modify. When updating fields, some fields might be changed * automatically, such as `modifiedDate`. This method supports patch semantics. This method supports * an upload* URI and accepts uploaded media with the following characteristics: - *Maximum file * size:* 5,120 GB - *Accepted Media MIME types:*`*` Note: Specify a valid MIME type, rather than * the literal `*` value. The literal `*` is only used to indicate that any valid MIME type can be * uploaded. For more information on uploading files, see [Upload file * data](/drive/api/guides/manage-uploads). * * Create a request for the method "files.update". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * *

* This method should be used for uploading media content. *

* * @param fileId The ID of the file to update. * @param content the {@link com.google.api.services.drive.model.File} media metadata or {@code null} if none * @param mediaContent The media HTTP content. * @return the request * @throws java.io.IOException if the initialization of the request fails */ public Update update(java.lang.String fileId, com.google.api.services.drive.model.File content, com.google.api.client.http.AbstractInputStreamContent mediaContent) throws java.io.IOException { Update result = new Update(fileId, content, mediaContent); initialize(result); return result; } public class Update extends DriveRequest { private static final String REST_PATH = "files/{fileId}"; /** * Updates a file's metadata and/or content. When calling this method, only populate fields in the * request that you want to modify. When updating fields, some fields might be changed * automatically, such as `modifiedDate`. This method supports patch semantics. This method * supports an upload* URI and accepts uploaded media with the following characteristics: - * *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*` Note: Specify a valid MIME * type, rather than the literal `*` value. The literal `*` is only used to indicate that any * valid MIME type can be uploaded. For more information on uploading files, see [Upload file * data](/drive/api/guides/manage-uploads). * * Create a request for the method "files.update". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file to update. * @param content the {@link com.google.api.services.drive.model.File} * @since 1.13 */ protected Update(java.lang.String fileId, com.google.api.services.drive.model.File content) { super(Drive.this, "PUT", REST_PATH, content, com.google.api.services.drive.model.File.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); } /** * Updates a file's metadata and/or content. When calling this method, only populate fields in the * request that you want to modify. When updating fields, some fields might be changed * automatically, such as `modifiedDate`. This method supports patch semantics. This method * supports an upload* URI and accepts uploaded media with the following characteristics: - * *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*` Note: Specify a valid MIME * type, rather than the literal `*` value. The literal `*` is only used to indicate that any * valid MIME type can be uploaded. For more information on uploading files, see [Upload file * data](/drive/api/guides/manage-uploads). * * Create a request for the method "files.update". * * This request holds the parameters needed by the the drive 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.

* *

* This constructor should be used for uploading media content. *

* * @param fileId The ID of the file to update. * @param content the {@link com.google.api.services.drive.model.File} media metadata or {@code null} if none * @param mediaContent The media HTTP content. * @since 1.13 */ protected Update(java.lang.String fileId, com.google.api.services.drive.model.File content, com.google.api.client.http.AbstractInputStreamContent mediaContent) { super(Drive.this, "PUT", "/upload/" + getServicePath() + REST_PATH, content, com.google.api.services.drive.model.File.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); com.google.api.client.util.Preconditions.checkNotNull(mediaContent, "Required parameter mediaContent must be specified."); initializeMediaUpload(mediaContent); } @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 ID of the file to update. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file to update. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file to update. */ public Update setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** Comma-separated list of parent IDs to add. */ @com.google.api.client.util.Key private java.lang.String addParents; /** Comma-separated list of parent IDs to add. */ public java.lang.String getAddParents() { return addParents; } /** Comma-separated list of parent IDs to add. */ public Update setAddParents(java.lang.String addParents) { this.addParents = addParents; return this; } /** Deprecated: This parameter has no function. */ @com.google.api.client.util.Key private java.lang.Boolean convert; /** Deprecated: This parameter has no function. [default: false] */ public java.lang.Boolean getConvert() { return convert; } /** Deprecated: This parameter has no function. */ public Update setConvert(java.lang.Boolean convert) { this.convert = convert; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: This parameter has no function. *

*/ public boolean isConvert() { if (convert == null || convert == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return convert; } /** * Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` * instead. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` instead. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` * instead. */ public Update setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` instead. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Update setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Update setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** * Determines the behavior in which `modifiedDate` is updated. This overrides * `setModifiedDate`. */ @com.google.api.client.util.Key private java.lang.String modifiedDateBehavior; /** Determines the behavior in which `modifiedDate` is updated. This overrides `setModifiedDate`. */ public java.lang.String getModifiedDateBehavior() { return modifiedDateBehavior; } /** * Determines the behavior in which `modifiedDate` is updated. This overrides * `setModifiedDate`. */ public Update setModifiedDateBehavior(java.lang.String modifiedDateBehavior) { this.modifiedDateBehavior = modifiedDateBehavior; return this; } /** * Whether a blob upload should create a new revision. If false, the blob data in the current * head revision is replaced. If true or not set, a new blob is created as head revision, and * previous unpinned revisions are preserved for a short period of time. Pinned revisions are * stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For * details on how revisions are retained, see the [Drive Help * Center](https://support.google.com/drive/answer/2409045). */ @com.google.api.client.util.Key private java.lang.Boolean newRevision; /** Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the [Drive Help Center](https://support.google.com/drive/answer/2409045). [default: true] */ public java.lang.Boolean getNewRevision() { return newRevision; } /** * Whether a blob upload should create a new revision. If false, the blob data in the current * head revision is replaced. If true or not set, a new blob is created as head revision, and * previous unpinned revisions are preserved for a short period of time. Pinned revisions are * stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For * details on how revisions are retained, see the [Drive Help * Center](https://support.google.com/drive/answer/2409045). */ public Update setNewRevision(java.lang.Boolean newRevision) { this.newRevision = newRevision; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the [Drive Help Center](https://support.google.com/drive/answer/2409045). *

*/ public boolean isNewRevision() { if (newRevision == null || newRevision == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return newRevision; } /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ @com.google.api.client.util.Key private java.lang.Boolean ocr; /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. [default: false] */ public java.lang.Boolean getOcr() { return ocr; } /** Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ public Update setOcr(java.lang.Boolean ocr) { this.ocr = ocr; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. *

*/ public boolean isOcr() { if (ocr == null || ocr == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return ocr; } /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ @com.google.api.client.util.Key private java.lang.String ocrLanguage; /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ public java.lang.String getOcrLanguage() { return ocrLanguage; } /** If ocr is true, hints at the language to use. Valid values are BCP 47 codes. */ public Update setOcrLanguage(java.lang.String ocrLanguage) { this.ocrLanguage = ocrLanguage; return this; } /** Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. */ @com.google.api.client.util.Key private java.lang.Boolean pinned; /** Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. [default: false] */ public java.lang.Boolean getPinned() { return pinned; } /** Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. */ public Update setPinned(java.lang.Boolean pinned) { this.pinned = pinned; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to pin the new revision. A file can have a maximum of 200 pinned revisions. *

*/ public boolean isPinned() { if (pinned == null || pinned == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return pinned; } /** Comma-separated list of parent IDs to remove. */ @com.google.api.client.util.Key private java.lang.String removeParents; /** Comma-separated list of parent IDs to remove. */ public java.lang.String getRemoveParents() { return removeParents; } /** Comma-separated list of parent IDs to remove. */ public Update setRemoveParents(java.lang.String removeParents) { this.removeParents = removeParents; return this; } /** * Whether to set the modified date using the value supplied in the request body. Setting this * field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`, and `false` is * equivalent to `modifiedDateBehavior=now`. To prevent any changes to the modified date set * `modifiedDateBehavior=noChange`. */ @com.google.api.client.util.Key private java.lang.Boolean setModifiedDate; /** Whether to set the modified date using the value supplied in the request body. Setting this field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`, and `false` is equivalent to `modifiedDateBehavior=now`. To prevent any changes to the modified date set `modifiedDateBehavior=noChange`. [default: false] */ public java.lang.Boolean getSetModifiedDate() { return setModifiedDate; } /** * Whether to set the modified date using the value supplied in the request body. Setting this * field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`, and `false` is * equivalent to `modifiedDateBehavior=now`. To prevent any changes to the modified date set * `modifiedDateBehavior=noChange`. */ public Update setSetModifiedDate(java.lang.Boolean setModifiedDate) { this.setModifiedDate = setModifiedDate; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to set the modified date using the value supplied in the request body. Setting this field to `true` is equivalent to `modifiedDateBehavior=fromBodyOrNow`, and `false` is equivalent to `modifiedDateBehavior=now`. To prevent any changes to the modified date set `modifiedDateBehavior=noChange`. *

*/ public boolean isSetModifiedDate() { if (setModifiedDate == null || setModifiedDate == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return setModifiedDate; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Update setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Update setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** The language of the timed text. */ @com.google.api.client.util.Key private java.lang.String timedTextLanguage; /** The language of the timed text. */ public java.lang.String getTimedTextLanguage() { return timedTextLanguage; } /** The language of the timed text. */ public Update setTimedTextLanguage(java.lang.String timedTextLanguage) { this.timedTextLanguage = timedTextLanguage; return this; } /** The timed text track name. */ @com.google.api.client.util.Key private java.lang.String timedTextTrackName; /** The timed text track name. */ public java.lang.String getTimedTextTrackName() { return timedTextTrackName; } /** The timed text track name. */ public Update setTimedTextTrackName(java.lang.String timedTextTrackName) { this.timedTextTrackName = timedTextTrackName; return this; } /** Whether to update the view date after successfully updating the file. */ @com.google.api.client.util.Key private java.lang.Boolean updateViewedDate; /** Whether to update the view date after successfully updating the file. [default: true] */ public java.lang.Boolean getUpdateViewedDate() { return updateViewedDate; } /** Whether to update the view date after successfully updating the file. */ public Update setUpdateViewedDate(java.lang.Boolean updateViewedDate) { this.updateViewedDate = updateViewedDate; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to update the view date after successfully updating the file. *

*/ public boolean isUpdateViewedDate() { if (updateViewedDate == null || updateViewedDate == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return updateViewedDate; } /** Whether to use the content as indexable text. */ @com.google.api.client.util.Key private java.lang.Boolean useContentAsIndexableText; /** Whether to use the content as indexable text. [default: false] */ public java.lang.Boolean getUseContentAsIndexableText() { return useContentAsIndexableText; } /** Whether to use the content as indexable text. */ public Update setUseContentAsIndexableText(java.lang.Boolean useContentAsIndexableText) { this.useContentAsIndexableText = useContentAsIndexableText; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to use the content as indexable text. *

*/ public boolean isUseContentAsIndexableText() { if (useContentAsIndexableText == null || useContentAsIndexableText == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useContentAsIndexableText; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } /** * Subscribes to changes to a file. * * Create a request for the method "files.watch". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Watch#execute()} method to invoke the remote operation. * * @param fileId The ID for the file in question. * @param content the {@link com.google.api.services.drive.model.Channel} * @return the request */ public Watch watch(java.lang.String fileId, com.google.api.services.drive.model.Channel content) throws java.io.IOException { Watch result = new Watch(fileId, content); initialize(result); return result; } public class Watch extends DriveRequest { private static final String REST_PATH = "files/{fileId}/watch"; /** * Subscribes to changes to a file. * * Create a request for the method "files.watch". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file in question. * @param content the {@link com.google.api.services.drive.model.Channel} * @since 1.13 */ protected Watch(java.lang.String fileId, com.google.api.services.drive.model.Channel content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.Channel.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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); } /** The ID for the file in question. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file in question. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file in question. */ public Watch setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * Whether the user is acknowledging the risk of downloading known malware or other abusive * files. This is only applicable when the `alt` parameter is set to `media` and the user is * the owner of the file or an organizer of the shared drive in which the file resides. */ @com.google.api.client.util.Key private java.lang.Boolean acknowledgeAbuse; /** Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `media` and the user is the owner of the file or an organizer of the shared drive in which the file resides. [default: false] */ public java.lang.Boolean getAcknowledgeAbuse() { return acknowledgeAbuse; } /** * Whether the user is acknowledging the risk of downloading known malware or other abusive * files. This is only applicable when the `alt` parameter is set to `media` and the user is * the owner of the file or an organizer of the shared drive in which the file resides. */ public Watch setAcknowledgeAbuse(java.lang.Boolean acknowledgeAbuse) { this.acknowledgeAbuse = acknowledgeAbuse; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `media` and the user is the owner of the file or an organizer of the shared drive in which the file resides. *

*/ public boolean isAcknowledgeAbuse() { if (acknowledgeAbuse == null || acknowledgeAbuse == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return acknowledgeAbuse; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ @com.google.api.client.util.Key private java.lang.String includeLabels; /** A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public java.lang.String getIncludeLabels() { return includeLabels; } /** * A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. */ public Watch setIncludeLabels(java.lang.String includeLabels) { this.includeLabels = includeLabels; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public Watch setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** Deprecated: This parameter has no function. */ @com.google.api.client.util.Key private java.lang.String projection; /** Deprecated: This parameter has no function. */ public java.lang.String getProjection() { return projection; } /** Deprecated: This parameter has no function. */ public Watch setProjection(java.lang.String projection) { this.projection = projection; return this; } /** * Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. */ @com.google.api.client.util.Key private java.lang.String revisionId; /** Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. */ public java.lang.String getRevisionId() { return revisionId; } /** * Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified. */ public Watch setRevisionId(java.lang.String revisionId) { this.revisionId = revisionId; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Watch setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Watch setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** * Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and * an empty request body. */ @com.google.api.client.util.Key private java.lang.Boolean updateViewedDate; /** Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body. [default: false] */ public java.lang.Boolean getUpdateViewedDate() { return updateViewedDate; } /** * Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and * an empty request body. */ public Watch setUpdateViewedDate(java.lang.Boolean updateViewedDate) { this.updateViewedDate = updateViewedDate; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body. *

*/ public boolean isUpdateViewedDate() { if (updateViewedDate == null || updateViewedDate == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return updateViewedDate; } @Override public Watch set(String parameterName, Object value) { return (Watch) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Parents collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Parents.List request = drive.parents().list(parameters ...)}
   * 
* * @return the resource collection */ public Parents parents() { return new Parents(); } /** * The "parents" collection of methods. */ public class Parents { /** * Removes a parent from a file. * * Create a request for the method "parents.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param parentId The ID of the parent. * @return the request */ public Delete delete(java.lang.String fileId, java.lang.String parentId) throws java.io.IOException { Delete result = new Delete(fileId, parentId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "files/{fileId}/parents/{parentId}"; /** * Removes a parent from a file. * * Create a request for the method "parents.delete". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param parentId The ID of the parent. * @since 1.13 */ protected Delete(java.lang.String fileId, java.lang.String parentId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.parentId = com.google.api.client.util.Preconditions.checkNotNull(parentId, "Required parameter parentId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Delete setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the parent. */ @com.google.api.client.util.Key private java.lang.String parentId; /** The ID of the parent. */ public java.lang.String getParentId() { return parentId; } /** The ID of the parent. */ public Delete setParentId(java.lang.String parentId) { this.parentId = parentId; return this; } /** * Deprecated: If an item is not in a shared drive and its last parent is removed, the item is * placed under its owner's root. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: If an item is not in a shared drive and its last parent is removed, the item is placed under its owner's root. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: If an item is not in a shared drive and its last parent is removed, the item is * placed under its owner's root. */ public Delete setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: If an item is not in a shared drive and its last parent is removed, the item is placed under its owner's root. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a specific parent reference. * * Create a request for the method "parents.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param parentId The ID of the parent. * @return the request */ public Get get(java.lang.String fileId, java.lang.String parentId) throws java.io.IOException { Get result = new Get(fileId, parentId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "files/{fileId}/parents/{parentId}"; /** * Gets a specific parent reference. * * Create a request for the method "parents.get". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param parentId The ID of the parent. * @since 1.13 */ protected Get(java.lang.String fileId, java.lang.String parentId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.ParentReference.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.parentId = com.google.api.client.util.Preconditions.checkNotNull(parentId, "Required parameter parentId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Get setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the parent. */ @com.google.api.client.util.Key private java.lang.String parentId; /** The ID of the parent. */ public java.lang.String getParentId() { return parentId; } /** The ID of the parent. */ public Get setParentId(java.lang.String parentId) { this.parentId = parentId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Adds a parent folder for a file. * * Create a request for the method "parents.insert". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param content the {@link com.google.api.services.drive.model.ParentReference} * @return the request */ public Insert insert(java.lang.String fileId, com.google.api.services.drive.model.ParentReference content) throws java.io.IOException { Insert result = new Insert(fileId, content); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "files/{fileId}/parents"; /** * Adds a parent folder for a file. * * Create a request for the method "parents.insert". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param content the {@link com.google.api.services.drive.model.ParentReference} * @since 1.13 */ protected Insert(java.lang.String fileId, com.google.api.services.drive.model.ParentReference content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.ParentReference.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getId(), "ParentReference.getId()"); } @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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Insert setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` * instead. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` instead. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** * Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` * instead. */ public Insert setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Adding files to multiple folders is no longer supported. Use `shortcuts` instead. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Insert setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Insert setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists a file's parents. * * Create a request for the method "parents.list". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @return the request */ public List list(java.lang.String fileId) throws java.io.IOException { List result = new List(fileId); initialize(result); return result; } public class List extends DriveRequest { private static final String REST_PATH = "files/{fileId}/parents"; /** * Lists a file's parents. * * Create a request for the method "parents.list". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @since 1.13 */ protected List(java.lang.String fileId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.ParentList.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public List setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Permissions collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Permissions.List request = drive.permissions().list(parameters ...)}
   * 
* * @return the resource collection */ public Permissions permissions() { return new Permissions(); } /** * The "permissions" collection of methods. */ public class Permissions { /** * Deletes a permission from a file or shared drive. **Warning:** Concurrent permissions operations * on the same file are not supported; only the last update is applied. * * Create a request for the method "permissions.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param fileId The ID for the file or shared drive. * @param permissionId The ID for the permission. * @return the request */ public Delete delete(java.lang.String fileId, java.lang.String permissionId) throws java.io.IOException { Delete result = new Delete(fileId, permissionId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "files/{fileId}/permissions/{permissionId}"; /** * Deletes a permission from a file or shared drive. **Warning:** Concurrent permissions * operations on the same file are not supported; only the last update is applied. * * Create a request for the method "permissions.delete". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file or shared drive. * @param permissionId The ID for the permission. * @since 1.13 */ protected Delete(java.lang.String fileId, java.lang.String permissionId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.permissionId = com.google.api.client.util.Preconditions.checkNotNull(permissionId, "Required parameter permissionId 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 ID for the file or shared drive. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file or shared drive. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file or shared drive. */ public Delete setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID for the permission. */ @com.google.api.client.util.Key private java.lang.String permissionId; /** The ID for the permission. */ public java.lang.String getPermissionId() { return permissionId; } /** The ID for the permission. */ public Delete setPermissionId(java.lang.String permissionId) { this.permissionId = permissionId; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Delete setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Delete setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ public Delete setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a permission by ID. * * Create a request for the method "permissions.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param fileId The ID for the file or shared drive. * @param permissionId The ID for the permission. * @return the request */ public Get get(java.lang.String fileId, java.lang.String permissionId) throws java.io.IOException { Get result = new Get(fileId, permissionId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "files/{fileId}/permissions/{permissionId}"; /** * Gets a permission by ID. * * Create a request for the method "permissions.get". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file or shared drive. * @param permissionId The ID for the permission. * @since 1.13 */ protected Get(java.lang.String fileId, java.lang.String permissionId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.Permission.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.permissionId = com.google.api.client.util.Preconditions.checkNotNull(permissionId, "Required parameter permissionId 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 ID for the file or shared drive. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file or shared drive. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file or shared drive. */ public Get setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID for the permission. */ @com.google.api.client.util.Key private java.lang.String permissionId; /** The ID for the permission. */ public java.lang.String getPermissionId() { return permissionId; } /** The ID for the permission. */ public Get setPermissionId(java.lang.String permissionId) { this.permissionId = permissionId; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Get setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Get setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ public Get setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Returns the permission ID for an email address. * * Create a request for the method "permissions.getIdForEmail". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link GetIdForEmail#execute()} method to invoke the remote operation. * * @param email The email address for which to return a permission ID * @return the request */ public GetIdForEmail getIdForEmail(java.lang.String email) throws java.io.IOException { GetIdForEmail result = new GetIdForEmail(email); initialize(result); return result; } public class GetIdForEmail extends DriveRequest { private static final String REST_PATH = "permissionIds/{email}"; /** * Returns the permission ID for an email address. * * Create a request for the method "permissions.getIdForEmail". * * This request holds the parameters needed by the the drive server. After setting any optional * parameters, call the {@link GetIdForEmail#execute()} method to invoke the remote operation.

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

* * @param email The email address for which to return a permission ID * @since 1.13 */ protected GetIdForEmail(java.lang.String email) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.PermissionId.class); this.email = com.google.api.client.util.Preconditions.checkNotNull(email, "Required parameter email 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 GetIdForEmail set$Xgafv(java.lang.String $Xgafv) { return (GetIdForEmail) super.set$Xgafv($Xgafv); } @Override public GetIdForEmail setAccessToken(java.lang.String accessToken) { return (GetIdForEmail) super.setAccessToken(accessToken); } @Override public GetIdForEmail setAlt(java.lang.String alt) { return (GetIdForEmail) super.setAlt(alt); } @Override public GetIdForEmail setCallback(java.lang.String callback) { return (GetIdForEmail) super.setCallback(callback); } @Override public GetIdForEmail setFields(java.lang.String fields) { return (GetIdForEmail) super.setFields(fields); } @Override public GetIdForEmail setKey(java.lang.String key) { return (GetIdForEmail) super.setKey(key); } @Override public GetIdForEmail setOauthToken(java.lang.String oauthToken) { return (GetIdForEmail) super.setOauthToken(oauthToken); } @Override public GetIdForEmail setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetIdForEmail) super.setPrettyPrint(prettyPrint); } @Override public GetIdForEmail setQuotaUser(java.lang.String quotaUser) { return (GetIdForEmail) super.setQuotaUser(quotaUser); } @Override public GetIdForEmail setUploadType(java.lang.String uploadType) { return (GetIdForEmail) super.setUploadType(uploadType); } @Override public GetIdForEmail setUploadProtocol(java.lang.String uploadProtocol) { return (GetIdForEmail) super.setUploadProtocol(uploadProtocol); } /** The email address for which to return a permission ID */ @com.google.api.client.util.Key private java.lang.String email; /** The email address for which to return a permission ID */ public java.lang.String getEmail() { return email; } /** The email address for which to return a permission ID */ public GetIdForEmail setEmail(java.lang.String email) { this.email = email; return this; } @Override public GetIdForEmail set(String parameterName, Object value) { return (GetIdForEmail) super.set(parameterName, value); } } /** * Inserts a permission for a file or shared drive. **Warning:** Concurrent permissions operations * on the same file are not supported; only the last update is applied. * * Create a request for the method "permissions.insert". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param fileId The ID for the file or shared drive. * @param content the {@link com.google.api.services.drive.model.Permission} * @return the request */ public Insert insert(java.lang.String fileId, com.google.api.services.drive.model.Permission content) throws java.io.IOException { Insert result = new Insert(fileId, content); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "files/{fileId}/permissions"; /** * Inserts a permission for a file or shared drive. **Warning:** Concurrent permissions operations * on the same file are not supported; only the last update is applied. * * Create a request for the method "permissions.insert". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file or shared drive. * @param content the {@link com.google.api.services.drive.model.Permission} * @since 1.13 */ protected Insert(java.lang.String fileId, com.google.api.services.drive.model.Permission content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.Permission.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getRole(), "Permission.getRole()"); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getType(), "Permission.getType()"); } @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 ID for the file or shared drive. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file or shared drive. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file or shared drive. */ public Insert setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** A plain text custom message to include in notification emails. */ @com.google.api.client.util.Key private java.lang.String emailMessage; /** A plain text custom message to include in notification emails. */ public java.lang.String getEmailMessage() { return emailMessage; } /** A plain text custom message to include in notification emails. */ public Insert setEmailMessage(java.lang.String emailMessage) { this.emailMessage = emailMessage; return this; } /** Deprecated: See `moveToNewOwnersRoot` for details. */ @com.google.api.client.util.Key private java.lang.Boolean enforceSingleParent; /** Deprecated: See `moveToNewOwnersRoot` for details. [default: false] */ public java.lang.Boolean getEnforceSingleParent() { return enforceSingleParent; } /** Deprecated: See `moveToNewOwnersRoot` for details. */ public Insert setEnforceSingleParent(java.lang.Boolean enforceSingleParent) { this.enforceSingleParent = enforceSingleParent; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: See `moveToNewOwnersRoot` for details. *

*/ public boolean isEnforceSingleParent() { if (enforceSingleParent == null || enforceSingleParent == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return enforceSingleParent; } /** * This parameter will only take effect if the item is not in a shared drive and the request * is attempting to transfer the ownership of the item. If set to `true`, the item will be * moved to the new owner's My Drive root folder and all prior parents removed. If set to * `false`, parents are not changed. */ @com.google.api.client.util.Key private java.lang.Boolean moveToNewOwnersRoot; /** This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to `false`, parents are not changed. [default: false] */ public java.lang.Boolean getMoveToNewOwnersRoot() { return moveToNewOwnersRoot; } /** * This parameter will only take effect if the item is not in a shared drive and the request * is attempting to transfer the ownership of the item. If set to `true`, the item will be * moved to the new owner's My Drive root folder and all prior parents removed. If set to * `false`, parents are not changed. */ public Insert setMoveToNewOwnersRoot(java.lang.Boolean moveToNewOwnersRoot) { this.moveToNewOwnersRoot = moveToNewOwnersRoot; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to `false`, parents are not changed. *

*/ public boolean isMoveToNewOwnersRoot() { if (moveToNewOwnersRoot == null || moveToNewOwnersRoot == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return moveToNewOwnersRoot; } /** * Whether to send notification emails when sharing to users or groups. This parameter is * ignored and an email is sent if the `role` is `owner`. */ @com.google.api.client.util.Key private java.lang.Boolean sendNotificationEmails; /** Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the `role` is `owner`. [default: true] */ public java.lang.Boolean getSendNotificationEmails() { return sendNotificationEmails; } /** * Whether to send notification emails when sharing to users or groups. This parameter is * ignored and an email is sent if the `role` is `owner`. */ public Insert setSendNotificationEmails(java.lang.Boolean sendNotificationEmails) { this.sendNotificationEmails = sendNotificationEmails; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the `role` is `owner`. *

*/ public boolean isSendNotificationEmails() { if (sendNotificationEmails == null || sendNotificationEmails == com.google.api.client.util.Data.NULL_BOOLEAN) { return true; } return sendNotificationEmails; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Insert setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Insert setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ public Insert setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists a file's or shared drive's permissions. * * Create a request for the method "permissions.list". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param fileId The ID for the file or shared drive. * @return the request */ public List list(java.lang.String fileId) throws java.io.IOException { List result = new List(fileId); initialize(result); return result; } public class List extends DriveRequest { private static final String REST_PATH = "files/{fileId}/permissions"; /** * Lists a file's or shared drive's permissions. * * Create a request for the method "permissions.list". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file or shared drive. * @since 1.13 */ protected List(java.lang.String fileId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.PermissionList.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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 ID for the file or shared drive. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file or shared drive. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file or shared drive. */ public List setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ @com.google.api.client.util.Key private java.lang.String includePermissionsForView; /** Specifies which additional view's permissions to include in the response. Only `published` is supported. */ public java.lang.String getIncludePermissionsForView() { return includePermissionsForView; } /** * Specifies which additional view's permissions to include in the response. Only `published` * is supported. */ public List setIncludePermissionsForView(java.lang.String includePermissionsForView) { this.includePermissionsForView = includePermissionsForView; return this; } /** * The maximum number of permissions to return per page. When not set for files in a shared * drive, at most 100 results will be returned. When not set for files that are not in a * shared drive, the entire list will be returned. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned. [minimum: 1] [maximum: 100] */ public java.lang.Integer getMaxResults() { return maxResults; } /** * The maximum number of permissions to return per page. When not set for files in a shared * drive, at most 100 results will be returned. When not set for files that are not in a * shared drive, the entire list will be returned. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * The token for continuing a previous list request on the next page. This should be set to * the value of `nextPageToken` from the previous response. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response. */ public java.lang.String getPageToken() { return pageToken; } /** * The token for continuing a previous list request on the next page. This should be set to * the value of `nextPageToken` from the previous response. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public List setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public List setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ public List setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a permission using patch semantics. **Warning:** Concurrent permissions operations on the * same file are not supported; only the last update is applied. * * Create a request for the method "permissions.patch". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param fileId The ID for the file or shared drive. * @param permissionId The ID for the permission. * @param content the {@link com.google.api.services.drive.model.Permission} * @return the request */ public Patch patch(java.lang.String fileId, java.lang.String permissionId, com.google.api.services.drive.model.Permission content) throws java.io.IOException { Patch result = new Patch(fileId, permissionId, content); initialize(result); return result; } public class Patch extends DriveRequest { private static final String REST_PATH = "files/{fileId}/permissions/{permissionId}"; /** * Updates a permission using patch semantics. **Warning:** Concurrent permissions operations on * the same file are not supported; only the last update is applied. * * Create a request for the method "permissions.patch". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file or shared drive. * @param permissionId The ID for the permission. * @param content the {@link com.google.api.services.drive.model.Permission} * @since 1.13 */ protected Patch(java.lang.String fileId, java.lang.String permissionId, com.google.api.services.drive.model.Permission content) { super(Drive.this, "PATCH", REST_PATH, content, com.google.api.services.drive.model.Permission.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.permissionId = com.google.api.client.util.Preconditions.checkNotNull(permissionId, "Required parameter permissionId 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 ID for the file or shared drive. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file or shared drive. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file or shared drive. */ public Patch setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID for the permission. */ @com.google.api.client.util.Key private java.lang.String permissionId; /** The ID for the permission. */ public java.lang.String getPermissionId() { return permissionId; } /** The ID for the permission. */ public Patch setPermissionId(java.lang.String permissionId) { this.permissionId = permissionId; return this; } /** Whether to remove the expiration date. */ @com.google.api.client.util.Key private java.lang.Boolean removeExpiration; /** Whether to remove the expiration date. [default: false] */ public java.lang.Boolean getRemoveExpiration() { return removeExpiration; } /** Whether to remove the expiration date. */ public Patch setRemoveExpiration(java.lang.Boolean removeExpiration) { this.removeExpiration = removeExpiration; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to remove the expiration date. *

*/ public boolean isRemoveExpiration() { if (removeExpiration == null || removeExpiration == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return removeExpiration; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Patch setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Patch setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** * Whether changing a role to `owner` downgrades the current owners to writers. Does nothing * if the specified role is not `owner`. */ @com.google.api.client.util.Key private java.lang.Boolean transferOwnership; /** Whether changing a role to `owner` downgrades the current owners to writers. Does nothing if the specified role is not `owner`. [default: false] */ public java.lang.Boolean getTransferOwnership() { return transferOwnership; } /** * Whether changing a role to `owner` downgrades the current owners to writers. Does nothing * if the specified role is not `owner`. */ public Patch setTransferOwnership(java.lang.Boolean transferOwnership) { this.transferOwnership = transferOwnership; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether changing a role to `owner` downgrades the current owners to writers. Does nothing if the specified role is not `owner`. *

*/ public boolean isTransferOwnership() { if (transferOwnership == null || transferOwnership == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return transferOwnership; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ public Patch setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a permission. **Warning:** Concurrent permissions operations on the same file are not * supported; only the last update is applied. * * Create a request for the method "permissions.update". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param fileId The ID for the file or shared drive. * @param permissionId The ID for the permission. * @param content the {@link com.google.api.services.drive.model.Permission} * @return the request */ public Update update(java.lang.String fileId, java.lang.String permissionId, com.google.api.services.drive.model.Permission content) throws java.io.IOException { Update result = new Update(fileId, permissionId, content); initialize(result); return result; } public class Update extends DriveRequest { private static final String REST_PATH = "files/{fileId}/permissions/{permissionId}"; /** * Updates a permission. **Warning:** Concurrent permissions operations on the same file are not * supported; only the last update is applied. * * Create a request for the method "permissions.update". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file or shared drive. * @param permissionId The ID for the permission. * @param content the {@link com.google.api.services.drive.model.Permission} * @since 1.13 */ protected Update(java.lang.String fileId, java.lang.String permissionId, com.google.api.services.drive.model.Permission content) { super(Drive.this, "PUT", REST_PATH, content, com.google.api.services.drive.model.Permission.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.permissionId = com.google.api.client.util.Preconditions.checkNotNull(permissionId, "Required parameter permissionId 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 ID for the file or shared drive. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file or shared drive. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file or shared drive. */ public Update setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID for the permission. */ @com.google.api.client.util.Key private java.lang.String permissionId; /** The ID for the permission. */ public java.lang.String getPermissionId() { return permissionId; } /** The ID for the permission. */ public Update setPermissionId(java.lang.String permissionId) { this.permissionId = permissionId; return this; } /** Whether to remove the expiration date. */ @com.google.api.client.util.Key private java.lang.Boolean removeExpiration; /** Whether to remove the expiration date. [default: false] */ public java.lang.Boolean getRemoveExpiration() { return removeExpiration; } /** Whether to remove the expiration date. */ public Update setRemoveExpiration(java.lang.Boolean removeExpiration) { this.removeExpiration = removeExpiration; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether to remove the expiration date. *

*/ public boolean isRemoveExpiration() { if (removeExpiration == null || removeExpiration == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return removeExpiration; } /** Whether the requesting application supports both My Drives and shared drives. */ @com.google.api.client.util.Key private java.lang.Boolean supportsAllDrives; /** Whether the requesting application supports both My Drives and shared drives. [default: false] */ public java.lang.Boolean getSupportsAllDrives() { return supportsAllDrives; } /** Whether the requesting application supports both My Drives and shared drives. */ public Update setSupportsAllDrives(java.lang.Boolean supportsAllDrives) { this.supportsAllDrives = supportsAllDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether the requesting application supports both My Drives and shared drives. *

*/ public boolean isSupportsAllDrives() { if (supportsAllDrives == null || supportsAllDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsAllDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ @com.google.api.client.util.Key private java.lang.Boolean supportsTeamDrives; /** Deprecated: Use `supportsAllDrives` instead. [default: false] */ public java.lang.Boolean getSupportsTeamDrives() { return supportsTeamDrives; } /** Deprecated: Use `supportsAllDrives` instead. */ public Update setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives) { this.supportsTeamDrives = supportsTeamDrives; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Deprecated: Use `supportsAllDrives` instead. *

*/ public boolean isSupportsTeamDrives() { if (supportsTeamDrives == null || supportsTeamDrives == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return supportsTeamDrives; } /** * Whether changing a role to `owner` downgrades the current owners to writers. Does nothing * if the specified role is not `owner`. */ @com.google.api.client.util.Key private java.lang.Boolean transferOwnership; /** Whether changing a role to `owner` downgrades the current owners to writers. Does nothing if the specified role is not `owner`. [default: false] */ public java.lang.Boolean getTransferOwnership() { return transferOwnership; } /** * Whether changing a role to `owner` downgrades the current owners to writers. Does nothing * if the specified role is not `owner`. */ public Update setTransferOwnership(java.lang.Boolean transferOwnership) { this.transferOwnership = transferOwnership; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Whether changing a role to `owner` downgrades the current owners to writers. Does nothing if the specified role is not `owner`. *

*/ public boolean isTransferOwnership() { if (transferOwnership == null || transferOwnership == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return transferOwnership; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if the file ID parameter refers to a shared drive and the requester is an * administrator of the domain to which the shared drive belongs. */ public Update setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Properties collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Properties.List request = drive.properties().list(parameters ...)}
   * 
* * @return the resource collection */ public Properties properties() { return new Properties(); } /** * The "properties" collection of methods. */ public class Properties { /** * Deletes a property. * * Create a request for the method "properties.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param propertyKey The key of the property. * @return the request */ public Delete delete(java.lang.String fileId, java.lang.String propertyKey) throws java.io.IOException { Delete result = new Delete(fileId, propertyKey); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "files/{fileId}/properties/{propertyKey}"; /** * Deletes a property. * * Create a request for the method "properties.delete". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param propertyKey The key of the property. * @since 1.13 */ protected Delete(java.lang.String fileId, java.lang.String propertyKey) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.propertyKey = com.google.api.client.util.Preconditions.checkNotNull(propertyKey, "Required parameter propertyKey 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Delete setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The key of the property. */ @com.google.api.client.util.Key private java.lang.String propertyKey; /** The key of the property. */ public java.lang.String getPropertyKey() { return propertyKey; } /** The key of the property. */ public Delete setPropertyKey(java.lang.String propertyKey) { this.propertyKey = propertyKey; return this; } /** The visibility of the property. */ @com.google.api.client.util.Key private java.lang.String visibility; /** The visibility of the property. [default: private] */ public java.lang.String getVisibility() { return visibility; } /** The visibility of the property. */ public Delete setVisibility(java.lang.String visibility) { this.visibility = visibility; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a property by its key. * * Create a request for the method "properties.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param propertyKey The key of the property. * @return the request */ public Get get(java.lang.String fileId, java.lang.String propertyKey) throws java.io.IOException { Get result = new Get(fileId, propertyKey); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "files/{fileId}/properties/{propertyKey}"; /** * Gets a property by its key. * * Create a request for the method "properties.get". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param propertyKey The key of the property. * @since 1.13 */ protected Get(java.lang.String fileId, java.lang.String propertyKey) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.Property.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.propertyKey = com.google.api.client.util.Preconditions.checkNotNull(propertyKey, "Required parameter propertyKey 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Get setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The key of the property. */ @com.google.api.client.util.Key private java.lang.String propertyKey; /** The key of the property. */ public java.lang.String getPropertyKey() { return propertyKey; } /** The key of the property. */ public Get setPropertyKey(java.lang.String propertyKey) { this.propertyKey = propertyKey; return this; } /** The visibility of the property. */ @com.google.api.client.util.Key private java.lang.String visibility; /** The visibility of the property. [default: private] */ public java.lang.String getVisibility() { return visibility; } /** The visibility of the property. */ public Get setVisibility(java.lang.String visibility) { this.visibility = visibility; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Adds a property to a file, or updates it if it already exists. * * Create a request for the method "properties.insert". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param content the {@link com.google.api.services.drive.model.Property} * @return the request */ public Insert insert(java.lang.String fileId, com.google.api.services.drive.model.Property content) throws java.io.IOException { Insert result = new Insert(fileId, content); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "files/{fileId}/properties"; /** * Adds a property to a file, or updates it if it already exists. * * Create a request for the method "properties.insert". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param content the {@link com.google.api.services.drive.model.Property} * @since 1.13 */ protected Insert(java.lang.String fileId, com.google.api.services.drive.model.Property content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.Property.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getKey(), "Property.getKey()"); } @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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Insert setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists a file's properties. * * Create a request for the method "properties.list". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @return the request */ public List list(java.lang.String fileId) throws java.io.IOException { List result = new List(fileId); initialize(result); return result; } public class List extends DriveRequest { private static final String REST_PATH = "files/{fileId}/properties"; /** * Lists a file's properties. * * Create a request for the method "properties.list". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @since 1.13 */ protected List(java.lang.String fileId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.PropertyList.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public List setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Updates a property. * * Create a request for the method "properties.patch". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param propertyKey The key of the property. * @param content the {@link com.google.api.services.drive.model.Property} * @return the request */ public Patch patch(java.lang.String fileId, java.lang.String propertyKey, com.google.api.services.drive.model.Property content) throws java.io.IOException { Patch result = new Patch(fileId, propertyKey, content); initialize(result); return result; } public class Patch extends DriveRequest { private static final String REST_PATH = "files/{fileId}/properties/{propertyKey}"; /** * Updates a property. * * Create a request for the method "properties.patch". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param propertyKey The key of the property. * @param content the {@link com.google.api.services.drive.model.Property} * @since 1.13 */ protected Patch(java.lang.String fileId, java.lang.String propertyKey, com.google.api.services.drive.model.Property content) { super(Drive.this, "PATCH", REST_PATH, content, com.google.api.services.drive.model.Property.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.propertyKey = com.google.api.client.util.Preconditions.checkNotNull(propertyKey, "Required parameter propertyKey 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Patch setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The key of the property. */ @com.google.api.client.util.Key private java.lang.String propertyKey; /** The key of the property. */ public java.lang.String getPropertyKey() { return propertyKey; } /** The key of the property. */ public Patch setPropertyKey(java.lang.String propertyKey) { this.propertyKey = propertyKey; return this; } /** * The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) */ @com.google.api.client.util.Key private java.lang.String visibility; /** The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) [default: private] */ public java.lang.String getVisibility() { return visibility; } /** * The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) */ public Patch setVisibility(java.lang.String visibility) { this.visibility = visibility; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a property. * * Create a request for the method "properties.update". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param propertyKey The key of the property. * @param content the {@link com.google.api.services.drive.model.Property} * @return the request */ public Update update(java.lang.String fileId, java.lang.String propertyKey, com.google.api.services.drive.model.Property content) throws java.io.IOException { Update result = new Update(fileId, propertyKey, content); initialize(result); return result; } public class Update extends DriveRequest { private static final String REST_PATH = "files/{fileId}/properties/{propertyKey}"; /** * Updates a property. * * Create a request for the method "properties.update". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param propertyKey The key of the property. * @param content the {@link com.google.api.services.drive.model.Property} * @since 1.13 */ protected Update(java.lang.String fileId, java.lang.String propertyKey, com.google.api.services.drive.model.Property content) { super(Drive.this, "PUT", REST_PATH, content, com.google.api.services.drive.model.Property.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.propertyKey = com.google.api.client.util.Preconditions.checkNotNull(propertyKey, "Required parameter propertyKey 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Update setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The key of the property. */ @com.google.api.client.util.Key private java.lang.String propertyKey; /** The key of the property. */ public java.lang.String getPropertyKey() { return propertyKey; } /** The key of the property. */ public Update setPropertyKey(java.lang.String propertyKey) { this.propertyKey = propertyKey; return this; } /** * The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) */ @com.google.api.client.util.Key private java.lang.String visibility; /** The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) [default: private] */ public java.lang.String getVisibility() { return visibility; } /** * The visibility of the property. Allowed values are PRIVATE and PUBLIC. (Default: PRIVATE) */ public Update setVisibility(java.lang.String visibility) { this.visibility = visibility; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Replies collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Replies.List request = drive.replies().list(parameters ...)}
   * 
* * @return the resource collection */ public Replies replies() { return new Replies(); } /** * The "replies" collection of methods. */ public class Replies { /** * Deletes a reply. * * Create a request for the method "replies.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @param replyId The ID of the reply. * @return the request */ public Delete delete(java.lang.String fileId, java.lang.String commentId, java.lang.String replyId) throws java.io.IOException { Delete result = new Delete(fileId, commentId, replyId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}/replies/{replyId}"; /** * Deletes a reply. * * Create a request for the method "replies.delete". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @param replyId The ID of the reply. * @since 1.13 */ protected Delete(java.lang.String fileId, java.lang.String commentId, java.lang.String replyId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId must be specified."); this.replyId = com.google.api.client.util.Preconditions.checkNotNull(replyId, "Required parameter replyId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Delete setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Delete setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } /** The ID of the reply. */ @com.google.api.client.util.Key private java.lang.String replyId; /** The ID of the reply. */ public java.lang.String getReplyId() { return replyId; } /** The ID of the reply. */ public Delete setReplyId(java.lang.String replyId) { this.replyId = replyId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a reply. * * Create a request for the method "replies.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @param replyId The ID of the reply. * @return the request */ public Get get(java.lang.String fileId, java.lang.String commentId, java.lang.String replyId) throws java.io.IOException { Get result = new Get(fileId, commentId, replyId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}/replies/{replyId}"; /** * Gets a reply. * * Create a request for the method "replies.get". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @param replyId The ID of the reply. * @since 1.13 */ protected Get(java.lang.String fileId, java.lang.String commentId, java.lang.String replyId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.CommentReply.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId must be specified."); this.replyId = com.google.api.client.util.Preconditions.checkNotNull(replyId, "Required parameter replyId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Get setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Get setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } /** The ID of the reply. */ @com.google.api.client.util.Key private java.lang.String replyId; /** The ID of the reply. */ public java.lang.String getReplyId() { return replyId; } /** The ID of the reply. */ public Get setReplyId(java.lang.String replyId) { this.replyId = replyId; return this; } /** If set, this will succeed when retrieving a deleted reply. */ @com.google.api.client.util.Key private java.lang.Boolean includeDeleted; /** If set, this will succeed when retrieving a deleted reply. [default: false] */ public java.lang.Boolean getIncludeDeleted() { return includeDeleted; } /** If set, this will succeed when retrieving a deleted reply. */ public Get setIncludeDeleted(java.lang.Boolean includeDeleted) { this.includeDeleted = includeDeleted; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* If set, this will succeed when retrieving a deleted reply. *

*/ public boolean isIncludeDeleted() { if (includeDeleted == null || includeDeleted == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeDeleted; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Creates a new reply to the given comment. * * Create a request for the method "replies.insert". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @param content the {@link com.google.api.services.drive.model.CommentReply} * @return the request */ public Insert insert(java.lang.String fileId, java.lang.String commentId, com.google.api.services.drive.model.CommentReply content) throws java.io.IOException { Insert result = new Insert(fileId, commentId, content); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}/replies"; /** * Creates a new reply to the given comment. * * Create a request for the method "replies.insert". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @param content the {@link com.google.api.services.drive.model.CommentReply} * @since 1.13 */ protected Insert(java.lang.String fileId, java.lang.String commentId, com.google.api.services.drive.model.CommentReply content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.CommentReply.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Insert setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Insert setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Lists all of the replies to a comment. * * Create a request for the method "replies.list". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @return the request */ public List list(java.lang.String fileId, java.lang.String commentId) throws java.io.IOException { List result = new List(fileId, commentId); initialize(result); return result; } public class List extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}/replies"; /** * Lists all of the replies to a comment. * * Create a request for the method "replies.list". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @since 1.13 */ protected List(java.lang.String fileId, java.lang.String commentId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.CommentReplyList.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public List setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public List setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } /** * If set, all replies, including deleted replies (with content stripped) will be returned. */ @com.google.api.client.util.Key private java.lang.Boolean includeDeleted; /** If set, all replies, including deleted replies (with content stripped) will be returned. [default: false] */ public java.lang.Boolean getIncludeDeleted() { return includeDeleted; } /** * If set, all replies, including deleted replies (with content stripped) will be returned. */ public List setIncludeDeleted(java.lang.Boolean includeDeleted) { this.includeDeleted = includeDeleted; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* If set, all replies, including deleted replies (with content stripped) will be returned. *

*/ public boolean isIncludeDeleted() { if (includeDeleted == null || includeDeleted == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return includeDeleted; } /** The maximum number of replies to include in the response, used for paging. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** The maximum number of replies to include in the response, used for paging. [default: 20] [minimum: 0] [maximum: 100] */ public java.lang.Integer getMaxResults() { return maxResults; } /** The maximum number of replies to include in the response, used for paging. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * The continuation token, used to page through large result sets. To get the next page of * results, set this parameter to the value of "nextPageToken" from the previous response. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. */ public java.lang.String getPageToken() { return pageToken; } /** * The continuation token, used to page through large result sets. To get the next page of * results, set this parameter to the value of "nextPageToken" from the previous response. */ 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); } } /** * Updates an existing reply. * * Create a request for the method "replies.patch". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @param replyId The ID of the reply. * @param content the {@link com.google.api.services.drive.model.CommentReply} * @return the request */ public Patch patch(java.lang.String fileId, java.lang.String commentId, java.lang.String replyId, com.google.api.services.drive.model.CommentReply content) throws java.io.IOException { Patch result = new Patch(fileId, commentId, replyId, content); initialize(result); return result; } public class Patch extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}/replies/{replyId}"; /** * Updates an existing reply. * * Create a request for the method "replies.patch". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @param replyId The ID of the reply. * @param content the {@link com.google.api.services.drive.model.CommentReply} * @since 1.13 */ protected Patch(java.lang.String fileId, java.lang.String commentId, java.lang.String replyId, com.google.api.services.drive.model.CommentReply content) { super(Drive.this, "PATCH", REST_PATH, content, com.google.api.services.drive.model.CommentReply.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId must be specified."); this.replyId = com.google.api.client.util.Preconditions.checkNotNull(replyId, "Required parameter replyId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getContent(), "CommentReply.getContent()"); } @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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Patch setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Patch setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } /** The ID of the reply. */ @com.google.api.client.util.Key private java.lang.String replyId; /** The ID of the reply. */ public java.lang.String getReplyId() { return replyId; } /** The ID of the reply. */ public Patch setReplyId(java.lang.String replyId) { this.replyId = replyId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates an existing reply. * * Create a request for the method "replies.update". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param commentId The ID of the comment. * @param replyId The ID of the reply. * @param content the {@link com.google.api.services.drive.model.CommentReply} * @return the request */ public Update update(java.lang.String fileId, java.lang.String commentId, java.lang.String replyId, com.google.api.services.drive.model.CommentReply content) throws java.io.IOException { Update result = new Update(fileId, commentId, replyId, content); initialize(result); return result; } public class Update extends DriveRequest { private static final String REST_PATH = "files/{fileId}/comments/{commentId}/replies/{replyId}"; /** * Updates an existing reply. * * Create a request for the method "replies.update". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param commentId The ID of the comment. * @param replyId The ID of the reply. * @param content the {@link com.google.api.services.drive.model.CommentReply} * @since 1.13 */ protected Update(java.lang.String fileId, java.lang.String commentId, java.lang.String replyId, com.google.api.services.drive.model.CommentReply content) { super(Drive.this, "PUT", REST_PATH, content, com.google.api.services.drive.model.CommentReply.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.commentId = com.google.api.client.util.Preconditions.checkNotNull(commentId, "Required parameter commentId must be specified."); this.replyId = com.google.api.client.util.Preconditions.checkNotNull(replyId, "Required parameter replyId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getContent(), "CommentReply.getContent()"); } @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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Update setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the comment. */ @com.google.api.client.util.Key private java.lang.String commentId; /** The ID of the comment. */ public java.lang.String getCommentId() { return commentId; } /** The ID of the comment. */ public Update setCommentId(java.lang.String commentId) { this.commentId = commentId; return this; } /** The ID of the reply. */ @com.google.api.client.util.Key private java.lang.String replyId; /** The ID of the reply. */ public java.lang.String getReplyId() { return replyId; } /** The ID of the reply. */ public Update setReplyId(java.lang.String replyId) { this.replyId = replyId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Revisions collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Revisions.List request = drive.revisions().list(parameters ...)}
   * 
* * @return the resource collection */ public Revisions revisions() { return new Revisions(); } /** * The "revisions" collection of methods. */ public class Revisions { /** * Permanently deletes a file version. You can only delete revisions for files with binary content, * like images or videos. Revisions for other files, like Google Docs or Sheets, and the last * remaining file version can't be deleted. * * Create a request for the method "revisions.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param revisionId The ID of the revision. * @return the request */ public Delete delete(java.lang.String fileId, java.lang.String revisionId) throws java.io.IOException { Delete result = new Delete(fileId, revisionId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "files/{fileId}/revisions/{revisionId}"; /** * Permanently deletes a file version. You can only delete revisions for files with binary * content, like images or videos. Revisions for other files, like Google Docs or Sheets, and the * last remaining file version can't be deleted. * * Create a request for the method "revisions.delete". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param revisionId The ID of the revision. * @since 1.13 */ protected Delete(java.lang.String fileId, java.lang.String revisionId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.revisionId = com.google.api.client.util.Preconditions.checkNotNull(revisionId, "Required parameter revisionId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Delete setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the revision. */ @com.google.api.client.util.Key private java.lang.String revisionId; /** The ID of the revision. */ public java.lang.String getRevisionId() { return revisionId; } /** The ID of the revision. */ public Delete setRevisionId(java.lang.String revisionId) { this.revisionId = revisionId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Gets a specific revision. * * Create a request for the method "revisions.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @param revisionId The ID of the revision. * @return the request */ public Get get(java.lang.String fileId, java.lang.String revisionId) throws java.io.IOException { Get result = new Get(fileId, revisionId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "files/{fileId}/revisions/{revisionId}"; /** * Gets a specific revision. * * Create a request for the method "revisions.get". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @param revisionId The ID of the revision. * @since 1.13 */ protected Get(java.lang.String fileId, java.lang.String revisionId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.Revision.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.revisionId = com.google.api.client.util.Preconditions.checkNotNull(revisionId, "Required parameter revisionId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public Get setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID of the revision. */ @com.google.api.client.util.Key private java.lang.String revisionId; /** The ID of the revision. */ public java.lang.String getRevisionId() { return revisionId; } /** The ID of the revision. */ public Get setRevisionId(java.lang.String revisionId) { this.revisionId = revisionId; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists a file's revisions. * * Create a request for the method "revisions.list". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param fileId The ID of the file. * @return the request */ public List list(java.lang.String fileId) throws java.io.IOException { List result = new List(fileId); initialize(result); return result; } public class List extends DriveRequest { private static final String REST_PATH = "files/{fileId}/revisions"; /** * Lists a file's revisions. * * Create a request for the method "revisions.list". * * This request holds the parameters needed by the the drive 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 fileId The ID of the file. * @since 1.13 */ protected List(java.lang.String fileId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.RevisionList.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId 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 ID of the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID of the file. */ public java.lang.String getFileId() { return fileId; } /** The ID of the file. */ public List setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** Maximum number of revisions to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of revisions to return. [default: 200] [minimum: 1] [maximum: 1000] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of revisions to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** * Page token for revisions. To get the next page of results, set this parameter to the value * of "nextPageToken" from the previous response. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Page token for revisions. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. */ public java.lang.String getPageToken() { return pageToken; } /** * Page token for revisions. To get the next page of results, set this parameter to the value * of "nextPageToken" from the previous response. */ 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); } } /** * Updates a revision. * * Create a request for the method "revisions.patch". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Patch#execute()} method to invoke the remote operation. * * @param fileId The ID for the file. * @param revisionId The ID for the revision. * @param content the {@link com.google.api.services.drive.model.Revision} * @return the request */ public Patch patch(java.lang.String fileId, java.lang.String revisionId, com.google.api.services.drive.model.Revision content) throws java.io.IOException { Patch result = new Patch(fileId, revisionId, content); initialize(result); return result; } public class Patch extends DriveRequest { private static final String REST_PATH = "files/{fileId}/revisions/{revisionId}"; /** * Updates a revision. * * Create a request for the method "revisions.patch". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file. * @param revisionId The ID for the revision. * @param content the {@link com.google.api.services.drive.model.Revision} * @since 1.13 */ protected Patch(java.lang.String fileId, java.lang.String revisionId, com.google.api.services.drive.model.Revision content) { super(Drive.this, "PATCH", REST_PATH, content, com.google.api.services.drive.model.Revision.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.revisionId = com.google.api.client.util.Preconditions.checkNotNull(revisionId, "Required parameter revisionId 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 ID for the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file. */ public Patch setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID for the revision. */ @com.google.api.client.util.Key private java.lang.String revisionId; /** The ID for the revision. */ public java.lang.String getRevisionId() { return revisionId; } /** The ID for the revision. */ public Patch setRevisionId(java.lang.String revisionId) { this.revisionId = revisionId; return this; } @Override public Patch set(String parameterName, Object value) { return (Patch) super.set(parameterName, value); } } /** * Updates a revision. * * Create a request for the method "revisions.update". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param fileId The ID for the file. * @param revisionId The ID for the revision. * @param content the {@link com.google.api.services.drive.model.Revision} * @return the request */ public Update update(java.lang.String fileId, java.lang.String revisionId, com.google.api.services.drive.model.Revision content) throws java.io.IOException { Update result = new Update(fileId, revisionId, content); initialize(result); return result; } public class Update extends DriveRequest { private static final String REST_PATH = "files/{fileId}/revisions/{revisionId}"; /** * Updates a revision. * * Create a request for the method "revisions.update". * * This request holds the parameters needed by the the drive 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 fileId The ID for the file. * @param revisionId The ID for the revision. * @param content the {@link com.google.api.services.drive.model.Revision} * @since 1.13 */ protected Update(java.lang.String fileId, java.lang.String revisionId, com.google.api.services.drive.model.Revision content) { super(Drive.this, "PUT", REST_PATH, content, com.google.api.services.drive.model.Revision.class); this.fileId = com.google.api.client.util.Preconditions.checkNotNull(fileId, "Required parameter fileId must be specified."); this.revisionId = com.google.api.client.util.Preconditions.checkNotNull(revisionId, "Required parameter revisionId 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 ID for the file. */ @com.google.api.client.util.Key private java.lang.String fileId; /** The ID for the file. */ public java.lang.String getFileId() { return fileId; } /** The ID for the file. */ public Update setFileId(java.lang.String fileId) { this.fileId = fileId; return this; } /** The ID for the revision. */ @com.google.api.client.util.Key private java.lang.String revisionId; /** The ID for the revision. */ public java.lang.String getRevisionId() { return revisionId; } /** The ID for the revision. */ public Update setRevisionId(java.lang.String revisionId) { this.revisionId = revisionId; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Teamdrives collection. * *

The typical use is:

*
   *   {@code Drive drive = new Drive(...);}
   *   {@code Drive.Teamdrives.List request = drive.teamdrives().list(parameters ...)}
   * 
* * @return the resource collection */ public Teamdrives teamdrives() { return new Teamdrives(); } /** * The "teamdrives" collection of methods. */ public class Teamdrives { /** * Deprecated: Use `drives.delete` instead. * * Create a request for the method "teamdrives.delete". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param teamDriveId The ID of the Team Drive * @return the request */ public Delete delete(java.lang.String teamDriveId) throws java.io.IOException { Delete result = new Delete(teamDriveId); initialize(result); return result; } public class Delete extends DriveRequest { private static final String REST_PATH = "teamdrives/{teamDriveId}"; /** * Deprecated: Use `drives.delete` instead. * * Create a request for the method "teamdrives.delete". * * This request holds the parameters needed by the the drive 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 teamDriveId The ID of the Team Drive * @since 1.13 */ protected Delete(java.lang.String teamDriveId) { super(Drive.this, "DELETE", REST_PATH, null, Void.class); this.teamDriveId = com.google.api.client.util.Preconditions.checkNotNull(teamDriveId, "Required parameter teamDriveId 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 ID of the Team Drive */ @com.google.api.client.util.Key private java.lang.String teamDriveId; /** The ID of the Team Drive */ public java.lang.String getTeamDriveId() { return teamDriveId; } /** The ID of the Team Drive */ public Delete setTeamDriveId(java.lang.String teamDriveId) { this.teamDriveId = teamDriveId; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Deprecated: Use `drives.get` instead. * * Create a request for the method "teamdrives.get". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param teamDriveId The ID of the Team Drive * @return the request */ public Get get(java.lang.String teamDriveId) throws java.io.IOException { Get result = new Get(teamDriveId); initialize(result); return result; } public class Get extends DriveRequest { private static final String REST_PATH = "teamdrives/{teamDriveId}"; /** * Deprecated: Use `drives.get` instead. * * Create a request for the method "teamdrives.get". * * This request holds the parameters needed by the the drive 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 teamDriveId The ID of the Team Drive * @since 1.13 */ protected Get(java.lang.String teamDriveId) { super(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.TeamDrive.class); this.teamDriveId = com.google.api.client.util.Preconditions.checkNotNull(teamDriveId, "Required parameter teamDriveId 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 ID of the Team Drive */ @com.google.api.client.util.Key private java.lang.String teamDriveId; /** The ID of the Team Drive */ public java.lang.String getTeamDriveId() { return teamDriveId; } /** The ID of the Team Drive */ public Get setTeamDriveId(java.lang.String teamDriveId) { this.teamDriveId = teamDriveId; return this; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the Team Drive belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the Team Drive belongs. */ public Get setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Deprecated: Use `drives.insert` instead. * * Create a request for the method "teamdrives.insert". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param requestId Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent * creation of a Team Drive. A repeated request by the same user and with the same request ID * will avoid creating duplicates by attempting to create the same Team Drive. If the Team * Drive already exists a 409 error will be returned. * @param content the {@link com.google.api.services.drive.model.TeamDrive} * @return the request */ public Insert insert(java.lang.String requestId, com.google.api.services.drive.model.TeamDrive content) throws java.io.IOException { Insert result = new Insert(requestId, content); initialize(result); return result; } public class Insert extends DriveRequest { private static final String REST_PATH = "teamdrives"; /** * Deprecated: Use `drives.insert` instead. * * Create a request for the method "teamdrives.insert". * * This request holds the parameters needed by the the drive 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 requestId Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent * creation of a Team Drive. A repeated request by the same user and with the same request ID * will avoid creating duplicates by attempting to create the same Team Drive. If the Team * Drive already exists a 409 error will be returned. * @param content the {@link com.google.api.services.drive.model.TeamDrive} * @since 1.13 */ protected Insert(java.lang.String requestId, com.google.api.services.drive.model.TeamDrive content) { super(Drive.this, "POST", REST_PATH, content, com.google.api.services.drive.model.TeamDrive.class); this.requestId = com.google.api.client.util.Preconditions.checkNotNull(requestId, "Required parameter requestId must be specified."); checkRequiredParameter(content, "content"); checkRequiredParameter(content.getName(), "TeamDrive.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); } /** * Required. An ID, such as a random UUID, which uniquely identifies this user's request for * idempotent creation of a Team Drive. A repeated request by the same user and with the same * request ID will avoid creating duplicates by attempting to create the same Team Drive. If * the Team Drive already exists a 409 error will be returned. */ @com.google.api.client.util.Key private java.lang.String requestId; /** Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned. */ public java.lang.String getRequestId() { return requestId; } /** * Required. An ID, such as a random UUID, which uniquely identifies this user's request for * idempotent creation of a Team Drive. A repeated request by the same user and with the same * request ID will avoid creating duplicates by attempting to create the same Team Drive. If * the Team Drive already exists a 409 error will be returned. */ public Insert setRequestId(java.lang.String requestId) { this.requestId = requestId; return this; } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * Deprecated: Use `drives.list` instead. * * Create a request for the method "teamdrives.list". * * This request holds the parameters needed by the drive 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 DriveRequest { private static final String REST_PATH = "teamdrives"; /** * Deprecated: Use `drives.list` instead. * * Create a request for the method "teamdrives.list". * * This request holds the parameters needed by the the drive 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(Drive.this, "GET", REST_PATH, null, com.google.api.services.drive.model.TeamDriveList.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); } /** Maximum number of Team Drives to return. */ @com.google.api.client.util.Key private java.lang.Integer maxResults; /** Maximum number of Team Drives to return. [default: 10] [minimum: 1] [maximum: 100] */ public java.lang.Integer getMaxResults() { return maxResults; } /** Maximum number of Team Drives to return. */ public List setMaxResults(java.lang.Integer maxResults) { this.maxResults = maxResults; return this; } /** Page token for Team Drives. */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Page token for Team Drives. */ public java.lang.String getPageToken() { return pageToken; } /** Page token for Team Drives. */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Query string for searching Team Drives. */ @com.google.api.client.util.Key private java.lang.String q; /** Query string for searching Team Drives. */ public java.lang.String getQ() { return q; } /** Query string for searching Team Drives. */ public List setQ(java.lang.String q) { this.q = q; return this; } /** * Issue the request as a domain administrator; if set to true, then all Team Drives of the * domain in which the requester is an administrator are returned. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then all Team Drives of the * domain in which the requester is an administrator are returned. */ public List setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Deprecated: Use `drives.update` instead. * * Create a request for the method "teamdrives.update". * * This request holds the parameters needed by the drive server. After setting any optional * parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param teamDriveId The ID of the Team Drive * @param content the {@link com.google.api.services.drive.model.TeamDrive} * @return the request */ public Update update(java.lang.String teamDriveId, com.google.api.services.drive.model.TeamDrive content) throws java.io.IOException { Update result = new Update(teamDriveId, content); initialize(result); return result; } public class Update extends DriveRequest { private static final String REST_PATH = "teamdrives/{teamDriveId}"; /** * Deprecated: Use `drives.update` instead. * * Create a request for the method "teamdrives.update". * * This request holds the parameters needed by the the drive 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 teamDriveId The ID of the Team Drive * @param content the {@link com.google.api.services.drive.model.TeamDrive} * @since 1.13 */ protected Update(java.lang.String teamDriveId, com.google.api.services.drive.model.TeamDrive content) { super(Drive.this, "PUT", REST_PATH, content, com.google.api.services.drive.model.TeamDrive.class); this.teamDriveId = com.google.api.client.util.Preconditions.checkNotNull(teamDriveId, "Required parameter teamDriveId 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 ID of the Team Drive */ @com.google.api.client.util.Key private java.lang.String teamDriveId; /** The ID of the Team Drive */ public java.lang.String getTeamDriveId() { return teamDriveId; } /** The ID of the Team Drive */ public Update setTeamDriveId(java.lang.String teamDriveId) { this.teamDriveId = teamDriveId; return this; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the Team Drive belongs. */ @com.google.api.client.util.Key private java.lang.Boolean useDomainAdminAccess; /** Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs. [default: false] */ public java.lang.Boolean getUseDomainAdminAccess() { return useDomainAdminAccess; } /** * Issue the request as a domain administrator; if set to true, then the requester will be * granted access if they are an administrator of the domain to which the Team Drive belongs. */ public Update setUseDomainAdminAccess(java.lang.Boolean useDomainAdminAccess) { this.useDomainAdminAccess = useDomainAdminAccess; return this; } /** * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. * *

* Boolean properties can have four possible values: * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} * or {@link Boolean#FALSE}. *

* *

* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. *

* *

* Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs. *

*/ public boolean isUseDomainAdminAccess() { if (useDomainAdminAccess == null || useDomainAdminAccess == com.google.api.client.util.Data.NULL_BOOLEAN) { return false; } return useDomainAdminAccess; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * Builder for {@link Drive}. * *

* 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 Drive}. */ @Override public Drive build() { return new Drive(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 DriveRequestInitializer}. * * @since 1.12 */ public Builder setDriveRequestInitializer( DriveRequestInitializer driveRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(driveRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } @Override public Builder setUniverseDomain(String universeDomain) { return (Builder) super.setUniverseDomain(universeDomain); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy