Class ServiceConfig.Gdrive

java.lang.Object
org.apache.opendal.ServiceConfig.Gdrive
All Implemented Interfaces:
ServiceConfig
Enclosing interface:
ServiceConfig

public static class ServiceConfig.Gdrive extends Object implements ServiceConfig
Configuration for service gdrive.
  • Field Details

    • accessToken

      public final String accessToken

      Access token for gdrive.

    • clientId

      public final String clientId

      Client id for gdrive.

    • clientSecret

      public final String clientSecret

      Client secret for gdrive.

    • credential

      public final String credential

      Base64-encoded Google credentials JSON for OAuth 2.0 authentication.

    • credentialPath

      public final String credentialPath

      Local path to the Google credentials JSON file for OAuth 2.0 authentication.

    • driveId

      public final String driveId

      Shared drive (formerly Team Drive) id for gdrive.

      When set, gdrive resolves root inside this shared drive instead of the user's My Drive.

    • refreshToken

      public final String refreshToken

      Refresh token for gdrive.

    • root

      public final String root

      The root for gdrive

    • scope

      public final String scope

      OAuth 2.0 scope to request when obtaining Drive access tokens. Defaults to https://www.googleapis.com/auth/drive.

  • Constructor Details

    • Gdrive

      public Gdrive()
  • Method Details

    • scheme

      public String scheme()
      Description copied from interface: ServiceConfig
      The scheme of the service.
      Specified by:
      scheme in interface ServiceConfig
      Returns:
      the scheme
    • configMap

      public Map<String,String> configMap()
      Description copied from interface: ServiceConfig
      Convert the structured config to a type erased config map.

      A map-valued field becomes one entry, under the field's option name, whose value is a JSON object string, such as assume_role_session_tags = {"Team":"data"}. The map's entries are not flattened into top-level entries. Its keys are sorted, an empty map becomes {}, and an unset field has no entry.

      Specified by:
      configMap in interface ServiceConfig
      Returns:
      the config map