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

target.apidocs.com.google.api.services.drive.Drive.Files.Get.html Maven / Gradle / Ivy

There is a newer version: v3-rev20240903-2.0.0
Show newest version






Drive.Files.Get (Drive API v2-rev20180830-1.26.0)












com.google.api.services.drive

Class Drive.Files.Get

    • Constructor Detail

      • Get

        protected Get(String fileId)
        Gets a file's metadata by ID. 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 AbstractGoogleClientRequest.execute() method to invoke the remote operation.

        Drive.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest) must be called to initialize this instance immediately after invoking the constructor.

        Parameters:
        fileId - The ID for the file in question.
        Since:
        1.13
    • Method Detail

      • executeMediaAndDownloadTo

        public void executeMediaAndDownloadTo(OutputStream outputStream)
                                       throws IOException
        Overrides:
        executeMediaAndDownloadTo in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<File>
        Throws:
        IOException
      • executeMediaAsInputStream

        public InputStream executeMediaAsInputStream()
                                              throws IOException
        Overrides:
        executeMediaAsInputStream in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<File>
        Throws:
        IOException
      • executeMedia

        public com.google.api.client.http.HttpResponse executeMedia()
                                                             throws IOException
        Overrides:
        executeMedia in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<File>
        Throws:
        IOException
      • buildHttpRequestUrl

        public com.google.api.client.http.GenericUrl buildHttpRequestUrl()
        Overrides:
        buildHttpRequestUrl in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<File>
      • executeUsingHead

        public com.google.api.client.http.HttpResponse executeUsingHead()
                                                                 throws IOException
        Overrides:
        executeUsingHead in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<File>
        Throws:
        IOException
      • buildHttpRequestUsingHead

        public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead()
                                                                         throws IOException
        Overrides:
        buildHttpRequestUsingHead in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<File>
        Throws:
        IOException
      • setKey

        public Drive.Files.Get setKey(String key)
        Description copied from class: DriveRequest
        API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        Overrides:
        setKey in class DriveRequest<File>
      • getFileId

        public String getFileId()
        The ID for the file in question.
      • getAcknowledgeAbuse

        public Boolean getAcknowledgeAbuse()
        Whether the user is acknowledging the risk of downloading known malware or other abusive files. [default: false]
      • setAcknowledgeAbuse

        public Drive.Files.Get setAcknowledgeAbuse(Boolean acknowledgeAbuse)
        Whether the user is acknowledging the risk of downloading known malware or other abusive files.
      • isAcknowledgeAbuse

        public boolean isAcknowledgeAbuse()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

        Whether the user is acknowledging the risk of downloading known malware or other abusive files.

      • getProjection

        public String getProjection()
        This parameter is deprecated and has no function.
      • setProjection

        public Drive.Files.Get setProjection(String projection)
        This parameter is deprecated and has no function.
      • getRevisionId

        public String getRevisionId()
        Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
      • setRevisionId

        public Drive.Files.Get setRevisionId(String revisionId)
        Specifies the Revision ID that should be downloaded. Ignored unless alt=media is specified.
      • getSupportsTeamDrives

        public Boolean getSupportsTeamDrives()
        Whether the requesting application supports Team Drives. [default: false]
      • setSupportsTeamDrives

        public Drive.Files.Get setSupportsTeamDrives(Boolean supportsTeamDrives)
        Whether the requesting application supports Team Drives.
      • isSupportsTeamDrives

        public boolean isSupportsTeamDrives()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

        Whether the requesting application supports Team Drives.

      • getUpdateViewedDate

        public Boolean getUpdateViewedDate()
        Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body. [default: false]
      • setUpdateViewedDate

        public Drive.Files.Get setUpdateViewedDate(Boolean updateViewedDate)
        Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an empty request body.
      • isUpdateViewedDate

        public boolean isUpdateViewedDate()
        Convenience method that returns only Boolean.TRUE or Boolean.FALSE.

        Boolean properties can have four possible values: null, Data.NULL_BOOLEAN, Boolean.TRUE or Boolean.FALSE.

        This method returns Boolean.TRUE if the default of the property is Boolean.TRUE and it is null or Data.NULL_BOOLEAN. Boolean.FALSE is returned if the default of the property is Boolean.FALSE and it is null or Data.NULL_BOOLEAN.

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

Copyright © 2011–2018 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy