From af45288e4ace0b786618ba5d0575b0a238805deb Mon Sep 17 00:00:00 2001 From: tison Date: Sun, 26 Jan 2025 11:19:18 +0800 Subject: [PATCH] docs(bindings/java): better javadoc Signed-off-by: tison --- .../org/apache/opendal/ServiceConfig.java | 657 +++++++++--------- core/src/services/mysql/config.rs | 7 +- core/src/services/s3/config.rs | 8 +- core/src/services/sqlite/config.rs | 6 +- dev/src/generate/java.rs | 2 +- 5 files changed, 342 insertions(+), 338 deletions(-) diff --git a/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java b/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java index c9ce3b507d55..3f6ae11b4334 100644 --- a/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java +++ b/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java @@ -63,34 +63,34 @@ class AliyunDrive implements ServiceConfig { *

Available values are default, backup and resource.

*

Fallback to default if not set or no other drives can be found.

*/ - private final @NonNull String driveType; + public final @NonNull String driveType; /** *

The Root of this backend.

*

All operations will happen under this root.

*

Default to / if not set.

*/ - private final String root; + public final String root; /** *

The access_token of this backend.

*

Solution for client-only purpose. #4733

*

Required if no client_id, client_secret and refresh_token are provided.

*/ - private final String accessToken; + public final String accessToken; /** *

The client_id of this backend.

*

Required if no access_token is provided.

*/ - private final String clientId; + public final String clientId; /** *

The client_secret of this backend.

*

Required if no access_token is provided.

*/ - private final String clientSecret; + public final String clientSecret; /** *

The refresh_token of this backend.

*

Required if no access_token is provided.

*/ - private final String refreshToken; + public final String refreshToken; @Override public String scheme() { @@ -132,12 +132,12 @@ class Alluxio implements ServiceConfig { *

All operations will happen under this root.

*

default to / if not set.

*/ - private final String root; + public final String root; /** *

endpoint of this backend.

*

Endpoint must be full uri, mostly like http://127.0.0.1:39999.

*/ - private final String endpoint; + public final String endpoint; @Override public String scheme() { @@ -167,23 +167,23 @@ class Atomicserver implements ServiceConfig { /** *

work dir of this backend

*/ - private final String root; + public final String root; /** *

endpoint of this backend

*/ - private final String endpoint; + public final String endpoint; /** *

private_key of this backend

*/ - private final String privateKey; + public final String privateKey; /** *

public_key of this backend

*/ - private final String publicKey; + public final String publicKey; /** *

parent_resource_id of this backend

*/ - private final String parentResourceId; + public final String parentResourceId; @Override public String scheme() { @@ -222,12 +222,12 @@ class Azblob implements ServiceConfig { /** *

The container name of Azblob service backend.

*/ - private final @NonNull String container; + public final @NonNull String container; /** *

The root of Azblob service backend.

*

All operations will happen under this root.

*/ - private final String root; + public final String root; /** *

The endpoint of Azblob service backend.

*

Endpoint must be full uri, e.g.

@@ -236,35 +236,35 @@ class Azblob implements ServiceConfig { *
  • Azurite: http://127.0.0.1:10000/devstoreaccount1
  • * */ - private final String endpoint; + public final String endpoint; /** *

    The account name of Azblob service backend.

    */ - private final String accountName; + public final String accountName; /** *

    The account key of Azblob service backend.

    */ - private final String accountKey; + public final String accountKey; /** *

    The encryption key of Azblob service backend.

    */ - private final String encryptionKey; + public final String encryptionKey; /** *

    The encryption key sha256 of Azblob service backend.

    */ - private final String encryptionKeySha256; + public final String encryptionKeySha256; /** *

    The encryption algorithm of Azblob service backend.

    */ - private final String encryptionAlgorithm; + public final String encryptionAlgorithm; /** *

    The sas token of Azblob service backend.

    */ - private final String sasToken; + public final String sasToken; /** *

    The maximum batch operations of Azblob service backend.

    */ - private final Long batchMaxOperations; + public final Long batchMaxOperations; @Override public String scheme() { @@ -316,23 +316,23 @@ class Azdls implements ServiceConfig { /** *

    Filesystem name of this backend.

    */ - private final @NonNull String filesystem; + public final @NonNull String filesystem; /** *

    Root of this backend.

    */ - private final String root; + public final String root; /** *

    Endpoint of this backend.

    */ - private final String endpoint; + public final String endpoint; /** *

    Account name of this backend.

    */ - private final String accountName; + public final String accountName; /** *

    Account key of this backend.

    */ - private final String accountKey; + public final String accountKey; @Override public String scheme() { @@ -369,27 +369,27 @@ class Azfile implements ServiceConfig { /** *

    The share name for azfile.

    */ - private final @NonNull String shareName; + public final @NonNull String shareName; /** *

    The root path for azfile.

    */ - private final String root; + public final String root; /** *

    The endpoint for azfile.

    */ - private final String endpoint; + public final String endpoint; /** *

    The account name for azfile.

    */ - private final String accountName; + public final String accountName; /** *

    The account key for azfile.

    */ - private final String accountKey; + public final String accountKey; /** *

    The sas token for azfile.

    */ - private final String sasToken; + public final String sasToken; @Override public String scheme() { @@ -430,17 +430,17 @@ class B2 implements ServiceConfig { *

    bucket of this backend.

    *

    required.

    */ - private final @NonNull String bucket; + public final @NonNull String bucket; /** *

    bucket id of this backend.

    *

    required.

    */ - private final @NonNull String bucketId; + public final @NonNull String bucketId; /** *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; /** *

    keyID of this backend.

    * */ - private final String applicationKeyId; + public final String applicationKeyId; /** *

    applicationKey of this backend.

    * */ - private final String applicationKey; + public final String applicationKey; @Override public String scheme() { @@ -491,7 +491,7 @@ class Cacache implements ServiceConfig { /** *

    That path to the cacache data directory.

    */ - private final String datadir; + public final String datadir; @Override public String scheme() { @@ -519,16 +519,16 @@ class Chainsafe implements ServiceConfig { *

    bucket_id of this backend.

    *

    required.

    */ - private final @NonNull String bucketId; + public final @NonNull String bucketId; /** *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; /** *

    api_key of this backend.

    */ - private final String apiKey; + public final String apiKey; @Override public String scheme() { @@ -559,19 +559,19 @@ class CloudflareKv implements ServiceConfig { /** *

    The token used to authenticate with CloudFlare.

    */ - private final String token; + public final String token; /** *

    The account ID used to authenticate with CloudFlare. Used as URI path parameter.

    */ - private final String accountId; + public final String accountId; /** *

    The namespace ID. Used as URI path parameter.

    */ - private final String namespaceId; + public final String namespaceId; /** *

    Root within this backend.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -608,7 +608,7 @@ class Compfs implements ServiceConfig { *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -635,27 +635,31 @@ class Cos implements ServiceConfig { /** *

    Root of this backend.

    */ - private final String root; + public final String root; /** *

    Endpoint of this backend.

    */ - private final String endpoint; + public final String endpoint; /** *

    Secret ID of this backend.

    */ - private final String secretId; + public final String secretId; /** *

    Secret key of this backend.

    */ - private final String secretKey; + public final String secretKey; /** *

    Bucket of this backend.

    */ - private final String bucket; + public final String bucket; + /** + *

    is bucket versioning enabled for this bucket

    + */ + public final Boolean enableVersioning; /** *

    Disable config load so that opendal will not load config from

    */ - private final Boolean disableConfigLoad; + public final Boolean disableConfigLoad; @Override public String scheme() { @@ -680,6 +684,9 @@ public Map configMap() { if (bucket != null) { map.put("bucket", bucket); } + if (enableVersioning != null) { + map.put("enable_versioning", String.valueOf(enableVersioning)); + } if (disableConfigLoad != null) { map.put("disable_config_load", String.valueOf(disableConfigLoad)); } @@ -697,31 +704,31 @@ class D1 implements ServiceConfig { /** *

    Set the token of cloudflare api.

    */ - private final String token; + public final String token; /** *

    Set the account id of cloudflare api.

    */ - private final String accountId; + public final String accountId; /** *

    Set the database id of cloudflare api.

    */ - private final String databaseId; + public final String databaseId; /** *

    Set the working directory of OpenDAL.

    */ - private final String root; + public final String root; /** *

    Set the table of D1 Database.

    */ - private final String table; + public final String table; /** *

    Set the key field of D1 Database.

    */ - private final String keyField; + public final String keyField; /** *

    Set the value field of D1 Database.

    */ - private final String valueField; + public final String valueField; @Override public String scheme() { @@ -766,7 +773,7 @@ class Dashmap implements ServiceConfig { /** *

    The root path for dashmap.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -793,15 +800,15 @@ class Dbfs implements ServiceConfig { /** *

    The root for dbfs.

    */ - private final String root; + public final String root; /** *

    The endpoint for dbfs.

    */ - private final String endpoint; + public final String endpoint; /** *

    The token for dbfs.

    */ - private final String token; + public final String token; @Override public String scheme() { @@ -834,23 +841,23 @@ class Dropbox implements ServiceConfig { /** *

    root path for dropbox.

    */ - private final String root; + public final String root; /** *

    access token for dropbox.

    */ - private final String accessToken; + public final String accessToken; /** *

    refresh_token for dropbox.

    */ - private final String refreshToken; + public final String refreshToken; /** *

    client_id for dropbox.

    */ - private final String clientId; + public final String clientId; /** *

    client_secret for dropbox.

    */ - private final String clientSecret; + public final String clientSecret; @Override public String scheme() { @@ -892,37 +899,37 @@ class Etcd implements ServiceConfig { * e.g. "127.0.0.1:23790,127.0.0.1:23791,127.0.0.1:23792" or "http://127.0.0.1:23790,http://127.0.0.1:23791,http://127.0.0.1:23792" or "https://127.0.0.1:23790,https://127.0.0.1:23791,https://127.0.0.1:23792"

    *

    default is "http://127.0.0.1:2379"

    */ - private final String endpoints; + public final String endpoints; /** *

    the username to connect etcd service.

    *

    default is None

    */ - private final String username; + public final String username; /** *

    the password for authentication

    *

    default is None

    */ - private final String password; + public final String password; /** *

    the working directory of the etcd service. Can be "/path/to/dir"

    *

    default is "/"

    */ - private final String root; + public final String root; /** *

    certificate authority file path

    *

    default is None

    */ - private final String caPath; + public final String caPath; /** *

    cert path

    *

    default is None

    */ - private final String certPath; + public final String certPath; /** *

    key path

    *

    default is None

    */ - private final String keyPath; + public final String keyPath; @Override public String scheme() { @@ -967,11 +974,11 @@ class Fs implements ServiceConfig { /** *

    root dir for backend

    */ - private final String root; + public final String root; /** *

    tmp dir for atomic write

    */ - private final String atomicWriteDir; + public final String atomicWriteDir; @Override public String scheme() { @@ -1001,59 +1008,59 @@ class Gcs implements ServiceConfig { /** *

    bucket name

    */ - private final @NonNull String bucket; + public final @NonNull String bucket; /** *

    root URI, all operations happens under root

    */ - private final String root; + public final String root; /** *

    endpoint URI of GCS service, * default is https://storage.googleapis.com

    */ - private final String endpoint; + public final String endpoint; /** *

    Scope for gcs.

    */ - private final String scope; + public final String scope; /** *

    Service Account for gcs.

    */ - private final String serviceAccount; + public final String serviceAccount; /** *

    Credentials string for GCS service OAuth2 authentication.

    */ - private final String credential; + public final String credential; /** *

    Local path to credentials file for GCS service OAuth2 authentication.

    */ - private final String credentialPath; + public final String credentialPath; /** *

    The predefined acl for GCS.

    */ - private final String predefinedAcl; + public final String predefinedAcl; /** *

    The default storage class used by gcs.

    */ - private final String defaultStorageClass; + public final String defaultStorageClass; /** *

    Allow opendal to send requests without signing when credentials are not * loaded.

    */ - private final Boolean allowAnonymous; + public final Boolean allowAnonymous; /** *

    Disable attempting to load credentials from the GCE metadata server when * running within Google Cloud.

    */ - private final Boolean disableVmMetadata; + public final Boolean disableVmMetadata; /** *

    Disable loading configuration from the environment.

    */ - private final Boolean disableConfigLoad; + public final Boolean disableConfigLoad; /** *

    A Google Cloud OAuth2 token.

    *

    Takes precedence over credential and credential_path.

    */ - private final String token; + public final String token; @Override public String scheme() { @@ -1114,23 +1121,23 @@ class Gdrive implements ServiceConfig { /** *

    The root for gdrive

    */ - private final String root; + public final String root; /** *

    Access token for gdrive.

    */ - private final String accessToken; + public final String accessToken; /** *

    Refresh token for gdrive.

    */ - private final String refreshToken; + public final String refreshToken; /** *

    Client id for gdrive.

    */ - private final String clientId; + public final String clientId; /** *

    Client secret for gdrive.

    */ - private final String clientSecret; + public final String clientSecret; @Override public String scheme() { @@ -1169,19 +1176,19 @@ class Ghac implements ServiceConfig { /** *

    The root path for ghac.

    */ - private final String root; + public final String root; /** *

    The version that used by cache.

    */ - private final String version; + public final String version; /** *

    The endpoint for ghac service.

    */ - private final String endpoint; + public final String endpoint; /** *

    The runtime token for ghac service.

    */ - private final String runtimeToken; + public final String runtimeToken; @Override public String scheme() { @@ -1218,24 +1225,24 @@ class Github implements ServiceConfig { *

    GitHub repo owner.

    *

    required.

    */ - private final @NonNull String owner; + public final @NonNull String owner; /** *

    GitHub repo name.

    *

    required.

    */ - private final @NonNull String repo; + public final @NonNull String repo; /** *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; /** *

    GitHub access_token.

    *

    optional. * If not provided, the backend will only support read operations for public repositories. * And rate limit will be limited to 60 requests per hour.

    */ - private final String token; + public final String token; @Override public String scheme() { @@ -1267,23 +1274,23 @@ class Gridfs implements ServiceConfig { /** *

    The connection string of the MongoDB service.

    */ - private final String connectionString; + public final String connectionString; /** *

    The database name of the MongoDB GridFs service to read/write.

    */ - private final String database; + public final String database; /** *

    The bucket name of the MongoDB GridFs service to read/write.

    */ - private final String bucket; + public final String bucket; /** *

    The chunk size of the MongoDB GridFs service used to break the user file into chunks.

    */ - private final Integer chunkSize; + public final Integer chunkSize; /** *

    The working directory, all operations will be performed under it.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -1322,15 +1329,15 @@ class HdfsNative implements ServiceConfig { /** *

    work dir of this backend

    */ - private final String root; + public final String root; /** *

    url of this backend

    */ - private final String url; + public final String url; /** *

    enable the append capacity

    */ - private final Boolean enableAppend; + public final Boolean enableAppend; @Override public String scheme() { @@ -1363,23 +1370,23 @@ class Http implements ServiceConfig { /** *

    endpoint of this backend

    */ - private final String endpoint; + public final String endpoint; /** *

    username of this backend

    */ - private final String username; + public final String username; /** *

    password of this backend

    */ - private final String password; + public final String password; /** *

    token of this backend

    */ - private final String token; + public final String token; /** *

    root of this backend

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -1423,27 +1430,27 @@ class Huggingface implements ServiceConfig { *
  • dataset
  • * */ - private final String repoType; + public final String repoType; /** *

    Repo id of this backend.

    *

    This is required.

    */ - private final String repoId; + public final String repoId; /** *

    Revision of this backend.

    *

    Default is main.

    */ - private final String revision; + public final String revision; /** *

    Root of this backend. Can be "/path/to/dir".

    *

    Default is "/".

    */ - private final String root; + public final String root; /** *

    Token of this backend.

    *

    This is optional.

    */ - private final String token; + public final String token; @Override public String scheme() { @@ -1484,32 +1491,32 @@ class Icloud implements ServiceConfig { *

    All operations will happen under this root.

    *

    default to / if not set.

    */ - private final String root; + public final String root; /** *

    apple_id of this backend.

    *

    apple_id must be full, mostly like example@gmail.com.

    */ - private final String appleId; + public final String appleId; /** *

    password of this backend.

    *

    password must be full.

    */ - private final String password; + public final String password; /** *

    Session

    *

    token must be valid.

    */ - private final String trustToken; + public final String trustToken; /** *

    ds_web_auth_token must be set in Session

    */ - private final String dsWebAuthToken; + public final String dsWebAuthToken; /** *

    enable the china origin * China region origin Header needs to be set to "https://www.icloud.com.cn".

    *

    otherwise Apple server will return 302.

    */ - private final Boolean isChinaMainland; + public final Boolean isChinaMainland; @Override public String scheme() { @@ -1551,11 +1558,11 @@ class Ipfs implements ServiceConfig { /** *

    IPFS gateway endpoint.

    */ - private final String endpoint; + public final String endpoint; /** *

    IPFS root.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -1585,11 +1592,11 @@ class Ipmfs implements ServiceConfig { /** *

    Root for ipfs.

    */ - private final String root; + public final String root; /** *

    Endpoint for ipfs.

    */ - private final String endpoint; + public final String endpoint; @Override public String scheme() { @@ -1619,20 +1626,20 @@ class Koofr implements ServiceConfig { /** *

    Koofr endpoint.

    */ - private final @NonNull String endpoint; + public final @NonNull String endpoint; /** *

    Koofr email.

    */ - private final @NonNull String email; + public final @NonNull String email; /** *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; /** *

    password of this backend. (Must be the application password)

    */ - private final String password; + public final String password; @Override public String scheme() { @@ -1665,32 +1672,32 @@ class Lakefs implements ServiceConfig { *

    Base url.

    *

    This is required.

    */ - private final String endpoint; + public final String endpoint; /** *

    Username for Lakefs basic authentication.

    *

    This is required.

    */ - private final String username; + public final String username; /** *

    Password for Lakefs basic authentication.

    *

    This is required.

    */ - private final String password; + public final String password; /** *

    Root of this backend. Can be "/path/to/dir".

    *

    Default is "/".

    */ - private final String root; + public final String root; /** *

    The repository name

    *

    This is required.

    */ - private final String repository; + public final String repository; /** *

    Name of the branch or a commit ID. Default is main.

    *

    This is optional.

    */ - private final String branch; + public final String branch; @Override public String scheme() { @@ -1732,27 +1739,27 @@ class Libsql implements ServiceConfig { /** *

    Connection string for libsql service.

    */ - private final String connectionString; + public final String connectionString; /** *

    Authentication token for libsql service.

    */ - private final String authToken; + public final String authToken; /** *

    Table name for libsql service.

    */ - private final String table; + public final String table; /** *

    Key field name for libsql service.

    */ - private final String keyField; + public final String keyField; /** *

    Value field name for libsql service.

    */ - private final String valueField; + public final String valueField; /** *

    Root for libsql service.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -1795,24 +1802,24 @@ class Memcached implements ServiceConfig { *

    network address of the memcached service.

    *

    For example: "tcp://localhost:11211"

    */ - private final String endpoint; + public final String endpoint; /** *

    the working directory of the service. Can be "/path/to/dir"

    *

    default is "/"

    */ - private final String root; + public final String root; /** *

    Memcached username, optional.

    */ - private final String username; + public final String username; /** *

    Memcached password, optional.

    */ - private final String password; + public final String password; /** *

    The default ttl for put operations.

    */ - private final Duration defaultTtl; + public final Duration defaultTtl; @Override public String scheme() { @@ -1851,7 +1858,7 @@ class Memory implements ServiceConfig { /** *

    root of the backend.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -1879,21 +1886,21 @@ class MiniMoka implements ServiceConfig { *

    Sets the max capacity of the cache.

    *

    Refer to mini-moka::sync::CacheBuilder::max_capacity

    */ - private final Long maxCapacity; + public final Long maxCapacity; /** *

    Sets the time to live of the cache.

    *

    Refer to mini-moka::sync::CacheBuilder::time_to_live

    */ - private final Duration timeToLive; + public final Duration timeToLive; /** *

    Sets the time to idle of the cache.

    *

    Refer to mini-moka::sync::CacheBuilder::time_to_idle

    */ - private final Duration timeToIdle; + public final Duration timeToIdle; /** *

    root path of this backend

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -1929,31 +1936,31 @@ class Moka implements ServiceConfig { /** *

    Name for this cache instance.

    */ - private final String name; + public final String name; /** *

    Sets the max capacity of the cache.

    *

    Refer to moka::sync::CacheBuilder::max_capacity

    */ - private final Long maxCapacity; + public final Long maxCapacity; /** *

    Sets the time to live of the cache.

    *

    Refer to moka::sync::CacheBuilder::time_to_live

    */ - private final Duration timeToLive; + public final Duration timeToLive; /** *

    Sets the time to idle of the cache.

    *

    Refer to moka::sync::CacheBuilder::time_to_idle

    */ - private final Duration timeToIdle; + public final Duration timeToIdle; /** *

    Sets the segments number of the cache.

    *

    Refer to moka::sync::CacheBuilder::segments

    */ - private final Long numSegments; + public final Long numSegments; /** *

    root path of this backend

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -1995,27 +2002,27 @@ class Mongodb implements ServiceConfig { /** *

    connection string of this backend

    */ - private final String connectionString; + public final String connectionString; /** *

    database of this backend

    */ - private final String database; + public final String database; /** *

    collection of this backend

    */ - private final String collection; + public final String collection; /** *

    root of this backend

    */ - private final String root; + public final String root; /** *

    key field of this backend

    */ - private final String keyField; + public final String keyField; /** *

    value field of this backend

    */ - private final String valueField; + public final String valueField; @Override public String scheme() { @@ -2059,7 +2066,7 @@ class Monoiofs implements ServiceConfig { *

    All operations will happen under this root.

    *

    Builder::build will return error if not set.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -2084,9 +2091,9 @@ public Map configMap() { @RequiredArgsConstructor(access = AccessLevel.PRIVATE) class Mysql implements ServiceConfig { /** - *

    This connection string is used to connect to the mysql service. There are url based formats:

    - *

    Url

    - *

    This format resembles the url format of the mysql client. The format is: [scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...

    + *

    This connection string is used to connect to the mysql service. There are url based formats.

    + *

    The format of connect string resembles the url format of the mysql client. + * The format is: [scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...

    *
      *
    • mysql://user@localhost
    • *
    • mysql://user:password@localhost
    • @@ -2095,23 +2102,23 @@ class Mysql implements ServiceConfig { *
    *

    For more information, please refer to https://docs.rs/sqlx/latest/sqlx/mysql/struct.MySqlConnectOptions.html.

    */ - private final String connectionString; + public final String connectionString; /** *

    The table name for mysql.

    */ - private final String table; + public final String table; /** *

    The key field name for mysql.

    */ - private final String keyField; + public final String keyField; /** *

    The value field name for mysql.

    */ - private final String valueField; + public final String valueField; /** *

    The root for mysql.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -2150,39 +2157,39 @@ class NebulaGraph implements ServiceConfig { /** *

    The host addr of nebulagraph's graphd server

    */ - private final String host; + public final String host; /** *

    The host port of nebulagraph's graphd server

    */ - private final Integer port; + public final Integer port; /** *

    The username of nebulagraph's graphd server

    */ - private final String username; + public final String username; /** *

    The password of nebulagraph's graphd server

    */ - private final String password; + public final String password; /** *

    The space name of nebulagraph's graphd server

    */ - private final String space; + public final String space; /** *

    The tag name of nebulagraph's graphd server

    */ - private final String tag; + public final String tag; /** *

    The key field name of the NebulaGraph service to read/write.

    */ - private final String keyField; + public final String keyField; /** *

    The value field name of the NebulaGraph service to read/write.

    */ - private final String valueField; + public final String valueField; /** *

    The root for NebulaGraph

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -2233,23 +2240,23 @@ class Obs implements ServiceConfig { /** *

    Root for obs.

    */ - private final String root; + public final String root; /** *

    Endpoint for obs.

    */ - private final String endpoint; + public final String endpoint; /** *

    Access key id for obs.

    */ - private final String accessKeyId; + public final String accessKeyId; /** *

    Secret access key for obs.

    */ - private final String secretAccessKey; + public final String secretAccessKey; /** *

    Bucket for obs.

    */ - private final String bucket; + public final String bucket; @Override public String scheme() { @@ -2288,11 +2295,11 @@ class Onedrive implements ServiceConfig { /** *

    bearer access token for OneDrive

    */ - private final String accessToken; + public final String accessToken; /** *

    root path of OneDrive folder.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -2322,58 +2329,62 @@ class Oss implements ServiceConfig { /** *

    Bucket for oss.

    */ - private final @NonNull String bucket; + public final @NonNull String bucket; /** *

    Root for oss.

    */ - private final String root; + public final String root; /** *

    Endpoint for oss.

    */ - private final String endpoint; + public final String endpoint; /** *

    Presign endpoint for oss.

    */ - private final String presignEndpoint; + public final String presignEndpoint; + /** + *

    is bucket versioning enabled for this bucket

    + */ + public final Boolean enableVersioning; /** *

    Server side encryption for oss.

    */ - private final String serverSideEncryption; + public final String serverSideEncryption; /** *

    Server side encryption key id for oss.

    */ - private final String serverSideEncryptionKeyId; + public final String serverSideEncryptionKeyId; /** *

    Allow anonymous for oss.

    */ - private final Boolean allowAnonymous; + public final Boolean allowAnonymous; /** *

    Access key id for oss.

    */ - private final String accessKeyId; + public final String accessKeyId; /** *

    Access key secret for oss.

    */ - private final String accessKeySecret; + public final String accessKeySecret; /** *

    The size of max batch operations.

    * * @deprecated Please use `delete_max_size` instead of `batch_max_operations` */ - private final Long batchMaxOperations; + public final Long batchMaxOperations; /** *

    The size of max delete operations.

    */ - private final Long deleteMaxSize; + public final Long deleteMaxSize; /** *

    If role_arn is set, we will use already known config as source * credential to assume role with role_arn.

    */ - private final String roleArn; + public final String roleArn; /** *

    role_session_name for this backend.

    */ - private final String roleSessionName; + public final String roleSessionName; /** *

    oidc_provider_arn will be loaded from

    *
      @@ -2381,7 +2392,7 @@ class Oss implements ServiceConfig { *
    • env value: [ALIBABA_CLOUD_OIDC_PROVIDER_ARN]
    • *
    */ - private final String oidcProviderArn; + public final String oidcProviderArn; /** *

    oidc_token_file will be loaded from

    *
      @@ -2389,7 +2400,7 @@ class Oss implements ServiceConfig { *
    • env value: [ALIBABA_CLOUD_OIDC_TOKEN_FILE]
    • *
    */ - private final String oidcTokenFile; + public final String oidcTokenFile; /** *

    sts_endpoint will be loaded from

    *
      @@ -2397,7 +2408,7 @@ class Oss implements ServiceConfig { *
    • env value: [ALIBABA_CLOUD_STS_ENDPOINT]
    • *
    */ - private final String stsEndpoint; + public final String stsEndpoint; @Override public String scheme() { @@ -2417,6 +2428,9 @@ public Map configMap() { if (presignEndpoint != null) { map.put("presign_endpoint", presignEndpoint); } + if (enableVersioning != null) { + map.put("enable_versioning", String.valueOf(enableVersioning)); + } if (serverSideEncryption != null) { map.put("server_side_encryption", serverSideEncryption); } @@ -2467,20 +2481,20 @@ class Pcloud implements ServiceConfig { /** *

    pCloud endpoint address.

    */ - private final @NonNull String endpoint; + public final @NonNull String endpoint; /** *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; /** *

    pCloud username.

    */ - private final String username; + public final String username; /** *

    pCloud password.

    */ - private final String password; + public final String password; @Override public String scheme() { @@ -2514,15 +2528,15 @@ class Persy implements ServiceConfig { /** *

    That path to the persy data file. The directory in the path must already exist.

    */ - private final String datafile; + public final String datafile; /** *

    That name of the persy segment.

    */ - private final String segment; + public final String segment; /** *

    That name of the persy index.

    */ - private final String index; + public final String index; @Override public String scheme() { @@ -2557,7 +2571,7 @@ class Postgresql implements ServiceConfig { *

    All operations will happen under this root.

    *

    Default to / if not set.

    */ - private final String root; + public final String root; /** *

    The URL should be with a scheme of either postgres:// or postgresql://.

    *
      @@ -2568,19 +2582,19 @@ class Postgresql implements ServiceConfig { *
    *

    For more information, please visit https://docs.rs/sqlx/latest/sqlx/postgres/struct.PgConnectOptions.html.

    */ - private final String connectionString; + public final String connectionString; /** *

    the table of postgresql

    */ - private final String table; + public final String table; /** *

    the key field of postgresql

    */ - private final String keyField; + public final String keyField; /** *

    the value field of postgresql

    */ - private final String valueField; + public final String valueField; @Override public String scheme() { @@ -2619,15 +2633,15 @@ class Redb implements ServiceConfig { /** *

    path to the redb data directory.

    */ - private final String datadir; + public final String datadir; /** *

    The root for redb.

    */ - private final String root; + public final String root; /** *

    The table name for redb.

    */ - private final String table; + public final String table; @Override public String scheme() { @@ -2661,36 +2675,36 @@ class Redis implements ServiceConfig { *

    the number of DBs redis can take is unlimited

    *

    default is db 0

    */ - private final long db; + public final long db; /** *

    network address of the Redis service. Can be "tcp://127.0.0.1:6379", e.g.

    *

    default is "tcp://127.0.0.1:6379"

    */ - private final String endpoint; + public final String endpoint; /** *

    network address of the Redis cluster service. Can be "tcp://127.0.0.1:6379,tcp://127.0.0.1:6380,tcp://127.0.0.1:6381", e.g.

    *

    default is None

    */ - private final String clusterEndpoints; + public final String clusterEndpoints; /** *

    the username to connect redis service.

    *

    default is None

    */ - private final String username; + public final String username; /** *

    the password for authentication

    *

    default is None

    */ - private final String password; + public final String password; /** *

    the working directory of the Redis service. Can be "/path/to/dir"

    *

    default is "/"

    */ - private final String root; + public final String root; /** *

    The default ttl for put operations.

    */ - private final Duration defaultTtl; + public final Duration defaultTtl; @Override public String scheme() { @@ -2734,17 +2748,17 @@ class S3 implements ServiceConfig { *

    bucket name of this backend.

    *

    required.

    */ - private final @NonNull String bucket; + public final @NonNull String bucket; /** *

    root of this backend.

    *

    All operations will happen under this root.

    *

    default to / if not set.

    */ - private final String root; + public final String root; /** *

    is bucket versioning enabled for this bucket

    */ - private final Boolean enableVersioning; + public final Boolean enableVersioning; /** *

    endpoint of this backend.

    *

    Endpoint must be full uri, e.g.

    @@ -2763,7 +2777,7 @@ class S3 implements ServiceConfig { *
  • If still not set, default to https://s3.amazonaws.com.
  • * */ - private final String endpoint; + public final String endpoint; /** *

    Region represent the signing region of this endpoint. This is required * if you are using the default AWS S3 endpoint.

    @@ -2773,7 +2787,7 @@ class S3 implements ServiceConfig { *
  • If not, we will try to load it from environment.
  • * */ - private final String region; + public final String region; /** *

    access_key_id of this backend.

    *
      @@ -2781,7 +2795,7 @@ class S3 implements ServiceConfig { *
    • If not, we will try to load it from environment.
    • *
    */ - private final String accessKeyId; + public final String accessKeyId; /** *

    secret_access_key of this backend.

    *
      @@ -2789,27 +2803,27 @@ class S3 implements ServiceConfig { *
    • If not, we will try to load it from environment.
    • *
    */ - private final String secretAccessKey; + public final String secretAccessKey; /** *

    session_token (aka, security token) of this backend.

    *

    This token will expire after sometime, it's recommended to set session_token * by hand.

    */ - private final String sessionToken; + public final String sessionToken; /** *

    role_arn for this backend.

    *

    If role_arn is set, we will use already known config as source * credential to assume role with role_arn.

    */ - private final String roleArn; + public final String roleArn; /** *

    external_id for this backend.

    */ - private final String externalId; + public final String externalId; /** *

    role_session_name for this backend.

    */ - private final String roleSessionName; + public final String roleSessionName; /** *

    Disable config load so that opendal will not load config from * environment.

    @@ -2819,23 +2833,23 @@ class S3 implements ServiceConfig { *
  • files like ~/.aws/config
  • * */ - private final Boolean disableConfigLoad; + public final Boolean disableConfigLoad; /** *

    Disable load credential from ec2 metadata.

    *

    This option is used to disable the default behavior of opendal * to load credential from ec2 metadata, a.k.a, IMDSv2

    */ - private final Boolean disableEc2Metadata; + public final Boolean disableEc2Metadata; /** *

    Allow anonymous will allow opendal to send request without signing * when credential is not loaded.

    */ - private final Boolean allowAnonymous; + public final Boolean allowAnonymous; /** *

    server_side_encryption for this backend.

    *

    Available values: AES256, aws:kms.

    */ - private final String serverSideEncryption; + public final String serverSideEncryption; /** *

    server_side_encryption_aws_kms_key_id for this backend

    *
      @@ -2849,25 +2863,23 @@ class S3 implements ServiceConfig { * is a noop. *
    */ - private final String serverSideEncryptionAwsKmsKeyId; + public final String serverSideEncryptionAwsKmsKeyId; /** *

    server_side_encryption_customer_algorithm for this backend.

    *

    Available values: AES256.

    */ - private final String serverSideEncryptionCustomerAlgorithm; + public final String serverSideEncryptionCustomerAlgorithm; /** *

    server_side_encryption_customer_key for this backend.

    - *

    Value

    - *

    base64 encoded key that matches algorithm specified in + *

    Value: BASE64-encoded key that matches algorithm specified in * server_side_encryption_customer_algorithm.

    */ - private final String serverSideEncryptionCustomerKey; + public final String serverSideEncryptionCustomerKey; /** *

    Set server_side_encryption_customer_key_md5 for this backend.

    - *

    Value

    - *

    MD5 digest of key specified in server_side_encryption_customer_key.

    + *

    Value: MD5 digest of key specified in server_side_encryption_customer_key.

    */ - private final String serverSideEncryptionCustomerKeyMd5; + public final String serverSideEncryptionCustomerKeyMd5; /** *

    default storage_class for this backend.

    *

    Available values:

    @@ -2884,7 +2896,7 @@ class S3 implements ServiceConfig { * *

    S3 compatible services don't support all of them

    */ - private final String defaultStorageClass; + public final String defaultStorageClass; /** *

    Enable virtual host style so that opendal will send API requests * in virtual host style instead of path style.

    @@ -2893,7 +2905,7 @@ class S3 implements ServiceConfig { *
  • Enabled, opendal will send API to https://bucket_name.s3.us-east-1.amazonaws.com
  • * */ - private final Boolean enableVirtualHostStyle; + public final Boolean enableVirtualHostStyle; /** *

    Set maximum batch operations of this backend.

    *

    Some compatible services have a limit on the number of operations in a batch request. @@ -2902,19 +2914,19 @@ class S3 implements ServiceConfig { * * @deprecated Please use `delete_max_size` instead of `batch_max_operations` */ - private final Long batchMaxOperations; + public final Long batchMaxOperations; /** *

    Set the maximum delete size of this backend.

    *

    Some compatible services have a limit on the number of operations in a batch request. * For example, R2 could return Internal Error while batch delete 1000 files.

    *

    Please tune this value based on services' document.

    */ - private final Long deleteMaxSize; + public final Long deleteMaxSize; /** *

    Disable stat with override so that opendal will not send stat request with override queries.

    *

    For example, R2 doesn't support stat with response_content_type query.

    */ - private final Boolean disableStatWithOverride; + public final Boolean disableStatWithOverride; /** *

    Checksum Algorithm to use when sending checksums in HTTP headers. * This is necessary when writing to AWS S3 Buckets with Object Lock enabled for example.

    @@ -2923,12 +2935,12 @@ class S3 implements ServiceConfig { *
  • "crc32c"
  • * */ - private final String checksumAlgorithm; + public final String checksumAlgorithm; /** *

    Disable write with if match so that opendal will not send write request with if match headers.

    *

    For example, Ceph RADOS S3 doesn't support write with if match.

    */ - private final Boolean disableWriteWithIfMatch; + public final Boolean disableWriteWithIfMatch; @Override public String scheme() { @@ -3029,24 +3041,24 @@ class Seafile implements ServiceConfig { *

    repo_name of this backend.

    *

    required.

    */ - private final @NonNull String repoName; + public final @NonNull String repoName; /** *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; /** *

    endpoint address of this backend.

    */ - private final String endpoint; + public final String endpoint; /** *

    username of this backend.

    */ - private final String username; + public final String username; /** *

    password of this backend.

    */ - private final String password; + public final String password; @Override public String scheme() { @@ -3083,27 +3095,27 @@ class Sftp implements ServiceConfig { /** *

    endpoint of this backend

    */ - private final String endpoint; + public final String endpoint; /** *

    root of this backend

    */ - private final String root; + public final String root; /** *

    user of this backend

    */ - private final String user; + public final String user; /** *

    key of this backend

    */ - private final String key; + public final String key; /** *

    known_hosts_strategy of this backend

    */ - private final String knownHostsStrategy; + public final String knownHostsStrategy; /** *

    enable_copy of this backend

    */ - private final Boolean enableCopy; + public final Boolean enableCopy; @Override public String scheme() { @@ -3145,15 +3157,15 @@ class Sled implements ServiceConfig { /** *

    That path to the sled data directory.

    */ - private final String datadir; + public final String datadir; /** *

    The root for sled.

    */ - private final String root; + public final String root; /** *

    The tree for sled.

    */ - private final String tree; + public final String tree; @Override public String scheme() { @@ -3185,9 +3197,8 @@ public Map configMap() { class Sqlite implements ServiceConfig { /** *

    Set the connection_string of the sqlite service.

    - *

    This connection string is used to connect to the sqlite service. There are url based formats:

    - *

    Url

    - *

    This format resembles the url format of the sqlite client:

    + *

    This connection string is used to connect to the sqlite service.

    + *

    The format of connect string resembles the url format of the sqlite client:

    *
      *
    • sqlite::memory:
    • *
    • sqlite:data.db
    • @@ -3195,26 +3206,26 @@ class Sqlite implements ServiceConfig { *
    *

    For more information, please visit https://docs.rs/sqlx/latest/sqlx/sqlite/struct.SqliteConnectOptions.html.

    */ - private final String connectionString; + public final String connectionString; /** *

    Set the table name of the sqlite service to read/write.

    */ - private final String table; + public final String table; /** *

    Set the key field name of the sqlite service to read/write.

    *

    Default to key if not specified.

    */ - private final String keyField; + public final String keyField; /** *

    Set the value field name of the sqlite service to read/write.

    *

    Default to value if not specified.

    */ - private final String valueField; + public final String valueField; /** *

    set the working directory, all operations will be performed under it.

    *

    default: "/"

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -3253,19 +3264,19 @@ class Supabase implements ServiceConfig { /** *

    The bucket for supabase service.

    */ - private final @NonNull String bucket; + public final @NonNull String bucket; /** *

    The root for supabase service.

    */ - private final String root; + public final String root; /** *

    The endpoint for supabase service.

    */ - private final String endpoint; + public final String endpoint; /** *

    The key for supabase service.

    */ - private final String key; + public final String key; @Override public String scheme() { @@ -3299,39 +3310,39 @@ class Surrealdb implements ServiceConfig { /** *

    The connection string for surrealdb.

    */ - private final String connectionString; + public final String connectionString; /** *

    The username for surrealdb.

    */ - private final String username; + public final String username; /** *

    The password for surrealdb.

    */ - private final String password; + public final String password; /** *

    The namespace for surrealdb.

    */ - private final String namespace; + public final String namespace; /** *

    The database for surrealdb.

    */ - private final String database; + public final String database; /** *

    The table for surrealdb.

    */ - private final String table; + public final String table; /** *

    The key field for surrealdb.

    */ - private final String keyField; + public final String keyField; /** *

    The value field for surrealdb.

    */ - private final String valueField; + public final String valueField; /** *

    The root for surrealdb.

    */ - private final String root; + public final String root; @Override public String scheme() { @@ -3382,19 +3393,19 @@ class Swift implements ServiceConfig { /** *

    The endpoint for Swift.

    */ - private final String endpoint; + public final String endpoint; /** *

    The container for Swift.

    */ - private final String container; + public final String container; /** *

    The root for Swift.

    */ - private final String root; + public final String root; /** *

    The token for Swift.

    */ - private final String token; + public final String token; @Override public String scheme() { @@ -3430,20 +3441,20 @@ class Upyun implements ServiceConfig { /** *

    bucket address of this backend.

    */ - private final @NonNull String bucket; + public final @NonNull String bucket; /** *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; /** *

    username of this backend.

    */ - private final String operator; + public final String operator; /** *

    password of this backend.

    */ - private final String password; + public final String password; @Override public String scheme() { @@ -3477,7 +3488,7 @@ class VercelArtifacts implements ServiceConfig { /** *

    The access token for Vercel.

    */ - private final String accessToken; + public final String accessToken; @Override public String scheme() { @@ -3505,11 +3516,11 @@ class VercelBlob implements ServiceConfig { *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; /** *

    vercel blob token.

    */ - private final String token; + public final String token; @Override public String scheme() { @@ -3539,27 +3550,27 @@ class Webdav implements ServiceConfig { /** *

    endpoint of this backend

    */ - private final String endpoint; + public final String endpoint; /** *

    username of this backend

    */ - private final String username; + public final String username; /** *

    password of this backend

    */ - private final String password; + public final String password; /** *

    token of this backend

    */ - private final String token; + public final String token; /** *

    root of this backend

    */ - private final String root; + public final String root; /** *

    WebDAV Service doesn't support copy.

    */ - private final Boolean disableCopy; + public final Boolean disableCopy; @Override public String scheme() { @@ -3601,23 +3612,23 @@ class Webhdfs implements ServiceConfig { /** *

    Root for webhdfs.

    */ - private final String root; + public final String root; /** *

    Endpoint for webhdfs.

    */ - private final String endpoint; + public final String endpoint; /** *

    Delegation token for webhdfs.

    */ - private final String delegation; + public final String delegation; /** *

    Disable batch listing

    */ - private final Boolean disableListBatch; + public final Boolean disableListBatch; /** *

    atomic_write_dir of this backend

    */ - private final String atomicWriteDir; + public final String atomicWriteDir; @Override public String scheme() { @@ -3656,12 +3667,12 @@ class YandexDisk implements ServiceConfig { /** *

    yandex disk oauth access_token.

    */ - private final @NonNull String accessToken; + public final @NonNull String accessToken; /** *

    root of this backend.

    *

    All operations will happen under this root.

    */ - private final String root; + public final String root; @Override public String scheme() { diff --git a/core/src/services/mysql/config.rs b/core/src/services/mysql/config.rs index f9cdcc74c273..71754ce2e15d 100644 --- a/core/src/services/mysql/config.rs +++ b/core/src/services/mysql/config.rs @@ -26,11 +26,10 @@ use serde::Serialize; #[serde(default)] #[non_exhaustive] pub struct MysqlConfig { - /// This connection string is used to connect to the mysql service. There are url based formats: + /// This connection string is used to connect to the mysql service. There are url based formats. /// - /// ## Url - /// - /// This format resembles the url format of the mysql client. The format is: `[scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...` + /// The format of connect string resembles the url format of the mysql client. + /// The format is: `[scheme://][user[:[password]]@]host[:port][/schema][?attribute1=value1&attribute2=value2...` /// /// - `mysql://user@localhost` /// - `mysql://user:password@localhost` diff --git a/core/src/services/s3/config.rs b/core/src/services/s3/config.rs index 41899e9e4b90..0c40d73f85fd 100644 --- a/core/src/services/s3/config.rs +++ b/core/src/services/s3/config.rs @@ -124,16 +124,12 @@ pub struct S3Config { pub server_side_encryption_customer_algorithm: Option, /// server_side_encryption_customer_key for this backend. /// - /// # Value - /// - /// base64 encoded key that matches algorithm specified in + /// Value: BASE64-encoded key that matches algorithm specified in /// `server_side_encryption_customer_algorithm`. pub server_side_encryption_customer_key: Option, /// Set server_side_encryption_customer_key_md5 for this backend. /// - /// # Value - /// - /// MD5 digest of key specified in `server_side_encryption_customer_key`. + /// Value: MD5 digest of key specified in `server_side_encryption_customer_key`. pub server_side_encryption_customer_key_md5: Option, /// default storage_class for this backend. /// diff --git a/core/src/services/sqlite/config.rs b/core/src/services/sqlite/config.rs index 79e4b8fd9cd2..869e3e0cdf23 100644 --- a/core/src/services/sqlite/config.rs +++ b/core/src/services/sqlite/config.rs @@ -28,11 +28,9 @@ use serde::Serialize; pub struct SqliteConfig { /// Set the connection_string of the sqlite service. /// - /// This connection string is used to connect to the sqlite service. There are url based formats: + /// This connection string is used to connect to the sqlite service. /// - /// ## Url - /// - /// This format resembles the url format of the sqlite client: + /// The format of connect string resembles the url format of the sqlite client: /// /// - `sqlite::memory:` /// - `sqlite:data.db` diff --git a/dev/src/generate/java.rs b/dev/src/generate/java.rs index 5dfdb898224c..58f019f46816 100644 --- a/dev/src/generate/java.rs +++ b/dev/src/generate/java.rs @@ -95,7 +95,7 @@ fn make_field(field: ViaDeserialize) -> Result writeln!( w, - "private final {} {};", + "public final {} {};", field_type, case_java_field_name(&field.name) )?;