### InstanceAdminSettings Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin The InstanceAdminSettings class allows configuration of credentials, endpoints, and retry settings for the InstanceAdminClient. It provides sensible defaults for easy setup. ```APIDOC ## InstanceAdminSettings ### Description Settings class to configure an instance of `InstanceAdminClient`. The default instance has everything set to sensible defaults. ### Settings Class `com.google.cloud.spanner.admin.instance.v1.InstanceAdminSettings` ### Builder `com.google.cloud.spanner.admin.instance.v1.InstanceAdminSettings.Builder` ``` -------------------------------- ### Get Begin Transaction Settings Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.v1 Returns the settings object used for beginning a transaction. This allows customization of request and response handling for this RPC. ```java public UnaryCallSettings beginTransactionSettings() ``` -------------------------------- ### SpannerStubSettings Configuration Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.v1 This section provides an example of how to configure SpannerStubSettings, specifically focusing on setting retry settings for the createSession operation. ```APIDOC ## SpannerStubSettings Configuration ### Description This snippet demonstrates how to configure the retry settings for the `createSession` operation within the `SpannerStubSettings`. ### Method N/A (Configuration using builder pattern) ### Endpoint N/A (Configuration for client-side settings) ### Parameters N/A (Configuration through method calls on builder objects) ### Request Example ```java // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library SpannerStubSettings.Builder spannerSettingsBuilder = SpannerStubSettings.newBuilder(); spannerSettingsBuilder .createSessionSettings() .setRetrySettings( spannerSettingsBuilder .createSessionSettings() .getRetrySettings() .toBuilder() .setInitialRetryDelayDuration(Duration.ofSeconds(1)) .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) .setMaxAttempts(5) .setMaxRetryDelayDuration(Duration.ofSeconds(30)) .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) .setRetryDelayMultiplier(1.3) .setRpcTimeoutMultiplier(1.5) .setTotalTimeoutDuration(Duration.ofSeconds(300)) .build()); SpannerStubSettings spannerSettings = spannerSettingsBuilder.build(); ``` ### Response #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### Get Start Timestamp Builder in Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Obtains a builder for constructing or modifying the start timestamp. This provides a mutable interface for the timestamp object. ```java public Timestamp.Builder getStartTimestampBuilder() { // Implementation details for getting the start timestamp builder return null; // Placeholder for actual implementation } ``` -------------------------------- ### Create HttpJsonDatabaseAdminStub with Settings (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1 This static method creates an instance of HttpJsonDatabaseAdminStub using the provided DatabaseAdminStubSettings. This is another common way to initialize the stub, allowing configuration through a settings object. IOException can be thrown. ```java public static final HttpJsonDatabaseAdminStub create(DatabaseAdminStubSettings settings) ``` ``` -------------------------------- ### Create New InstanceAdminStubSettings Builder with ClientContext Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Returns a new builder instance for `InstanceAdminStubSettings`, initialized with a provided `ClientContext`. This allows for advanced customization of the client's context, including credentials and transport settings. ```java public static InstanceAdminStubSettings.Builder newBuilder(ClientContext clientContext) ``` -------------------------------- ### Get Start Timestamp in Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Retrieves the start timestamp for querying change stream records. This ensures that only records with commit timestamps greater than or equal to this value are returned. ```java public Timestamp getStartTimestamp() { // Implementation details for retrieving start timestamp return null; // Placeholder for actual implementation } ``` -------------------------------- ### InstanceAdminStubSettings Static Methods Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 This section covers the static methods available for creating and configuring InstanceAdminStubSettings, including default providers and builders. ```APIDOC ## Static Methods ### defaultApiClientHeaderProviderBuilder() ```java public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() ``` **Returns** --- **Type** | **Description** `Builder` | ### defaultCredentialsProviderBuilder() ```java public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() ``` Returns a builder for the default credentials for this service. **Returns** --- **Type** | **Description** `Builder` | ### defaultExecutorProviderBuilder() ```java public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() ``` Returns a builder for the default ExecutorProvider for this service. **Returns** --- **Type** | **Description** `Builder` | ### defaultGrpcApiClientHeaderProviderBuilder() ```java public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() ``` **Returns** --- **Type** | **Description** `Builder` | ### defaultGrpcTransportProviderBuilder() ```java public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() ``` Returns a builder for the default gRPC ChannelProvider for this service. **Returns** --- **Type** | **Description** `Builder` | ### defaultHttpJsonApiClientHeaderProviderBuilder() ```java public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() ``` **Returns** --- **Type** | **Description** `Builder` | ### defaultHttpJsonTransportProviderBuilder() ```java public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder() ``` Returns a builder for the default REST ChannelProvider for this service. **Returns** --- **Type** | **Description** `Builder` | ### defaultTransportChannelProvider() ```java public static TransportChannelProvider defaultTransportChannelProvider() ``` **Returns** --- **Type** | **Description** `TransportChannelProvider` | ### getDefaultEndpoint() ```java public static String getDefaultEndpoint() ``` Returns the default service endpoint. **Returns** --- **Type** | **Description** `String` | ### getDefaultMtlsEndpoint() ```java public static String getDefaultMtlsEndpoint() ``` Returns the default mTLS service endpoint. **Returns** --- **Type** | **Description** `String` | ### getDefaultServiceScopes() ```java public static List getDefaultServiceScopes() ``` Returns the default service scopes. **Returns** --- **Type** | **Description** `List` | ### newBuilder() ```java public static InstanceAdminStubSettings.Builder newBuilder() ``` Returns a new gRPC builder for this class. **Returns** --- **Type** | **Description** `InstanceAdminStubSettings.Builder` | ### newBuilder(ClientContext clientContext) ```java public static InstanceAdminStubSettings.Builder newBuilder(ClientContext clientContext) ``` Returns a new builder for this class. **Parameter** --- **Name** | **Description** `clientContext` | `ClientContext` **Returns** --- **Type** | **Description** `InstanceAdminStubSettings.Builder` | ### newHttpJsonBuilder() ```java public static InstanceAdminStubSettings.Builder newHttpJsonBuilder() ``` Returns a new REST builder for this class. **Returns** --- **Type** | **Description** `InstanceAdminStubSettings.Builder` | ``` -------------------------------- ### Get Start Timestamp OrBuilder in Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Retrieves an OrBuilder for the start timestamp, allowing flexible access whether the timestamp is set or not. This is useful for handling optional fields gracefully. ```java public TimestampOrBuilder getStartTimestampOrBuilder() { // Implementation details for getting the start timestamp OrBuilder return null; // Placeholder for actual implementation } ``` -------------------------------- ### Get Default Instance of CommitResponse.CommitStats Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.CommitResponse Retrieves the default, immutable instance of CommitResponse.CommitStats. This is often used as a starting point or for comparisons. ```java public CommitResponse.CommitStats getDefaultInstanceForType() ``` -------------------------------- ### Get Default Instance of PartitionStartRecord (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Retrieves the default, empty instance of the PartitionStartRecord. This is often used as a starting point or for comparison. ```Java public ChangeStreamRecord.PartitionStartRecord getDefaultInstanceForType() ``` -------------------------------- ### Instance Admin Stub Settings Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Provides settings for the Instance Admin API, including methods for creating, deleting, updating, and retrieving instances, instance configurations, and instance partitions. It also includes methods for managing IAM policies and listing operations. ```APIDOC ## Instance Admin API Endpoints ### Description This section details the available methods for managing Google Cloud Spanner instances and related resources using the Java client library. ### Methods #### Instance Management - `createInstanceSettings()`: Configures settings for creating a Spanner instance. - `deleteInstanceSettings()`: Configures settings for deleting a Spanner instance. - `getInstanceSettings()`: Configures settings for retrieving a Spanner instance. - `listInstancesSettings()`: Configures settings for listing Spanner instances. - `moveInstanceSettings()`: Configures settings for moving a Spanner instance. - `updateInstanceSettings()`: Configures settings for updating a Spanner instance. #### Instance Configuration Management - `createInstanceConfigSettings()`: Configures settings for creating an instance configuration. - `deleteInstanceConfigSettings()`: Configures settings for deleting an instance configuration. - `getInstanceConfigSettings()`: Configures settings for retrieving an instance configuration. - `listInstanceConfigsSettings()`: Configures settings for listing instance configurations. - `updateInstanceConfigSettings()`: Configures settings for updating an instance configuration. #### Instance Partition Management - `createInstancePartitionSettings()`: Configures settings for creating an instance partition. - `deleteInstancePartitionSettings()`: Configures settings for deleting an instance partition. - `getInstancePartitionSettings()`: Configures settings for retrieving an instance partition. - `listInstancePartitionsSettings()`: Configures settings for listing instance partitions. - `updateInstancePartitionSettings()`: Configures settings for updating an instance partition. #### IAM Policy Management - `getIamPolicySettings()`: Configures settings for retrieving the IAM policy for a resource. - `setIamPolicySettings()`: Configures settings for setting the IAM policy for a resource. - `testIamPermissionsSettings()`: Configures settings for testing permissions for a resource. #### Operations - `createInstanceOperationSettings()`: Configures settings for the long-running operation of creating an instance. - `createInstancePartitionOperationSettings()`: Configures settings for the long-running operation of creating an instance partition. - `listInstanceConfigOperationsSettings()`: Configures settings for listing instance configuration operations. - `listInstancePartitionOperationsSettings()`: Configures settings for listing instance partition operations. - `moveInstanceOperationSettings()`: Configures settings for the long-running operation of moving an instance. - `updateInstanceConfigOperationSettings()`: Configures settings for the long-running operation of updating an instance configuration. - `updateInstanceOperationSettings()`: Configures settings for the long-running operation of updating an instance. - `updateInstancePartitionOperationSettings()`: Configures settings for the long-running operation of updating an instance partition. ### Constructors - `InstanceAdminStubSettings(InstanceAdminStubSettings.Builder settingsBuilder)`: Constructs an `InstanceAdminStubSettings` object using a builder. ### Static Methods - `defaultInstanceAdminClientBuilder()`: Returns a default builder for creating an Instance Admin client. - `newBuilder()`: Returns a new builder for creating `InstanceAdminStubSettings`. - `newBuilder(ClientContext clientContext)`: Returns a new builder for creating `InstanceAdminStubSettings` with a specified client context. - `newHttpJsonBuilder()`: Returns a new builder for creating `InstanceAdminStubSettings` using HTTP/JSON transport. ### Other Methods - `createStub()`: Creates a stub for the Instance Admin API. - `getDefaultEndpoint()`: Gets the default endpoint for the Instance Admin API. - `getDefaultMtlsEndpoint()`: Gets the default mTLS endpoint for the Instance Admin API. - `getDefaultServiceScopes()`: Gets the default service scopes for the Instance Admin API. - `getServiceName()`: Gets the service name for the Instance Admin API. - `toBuilder()`: Returns a builder initialized with the settings of this `InstanceAdminStubSettings` object. ``` -------------------------------- ### Get Instance Admin Stub Settings Builder (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner Returns the InstanceAdminStubSettings.Builder used for building the SpannerRpc, enabling custom RetrySettings for gRPC methods. Defaults from spanner_admin_instance_gapic.yaml are used if custom settings are not provided. An example demonstrates applying custom retry settings to all unary methods. ```java public InstanceAdminStubSettings.Builder getInstanceAdminStubSettingsBuilder() ``` ```java builder .getInstanceAdminStubSettingsBuilder() .applyToAllUnaryMethods( new ApiFunction, Void>() { public Void apply(Builder input) { input.setRetrySettings(retrySettings); return null; } }); ``` -------------------------------- ### Protected Constructor for HttpJsonDatabaseAdminStub (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1 This protected constructor initializes an HttpJsonDatabaseAdminStub instance with the given DatabaseAdminStubSettings and ClientContext. It's intended for subclassing, with static factory methods being the preferred way to create instances for general use. An IOException may be thrown. ```java protected HttpJsonDatabaseAdminStub(DatabaseAdminStubSettings settings, ClientContext clientContext) ``` ``` -------------------------------- ### Get Database Admin Stub Settings Builder (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner Returns the DatabaseAdminStubSettings.Builder, which is used to build the SpannerRpc. This allows for custom RetrySettings for individual gRPC methods. If not set, default settings from spanner_admin_database_gapic.yaml are used. Example provided shows how to apply custom retry settings to all unary methods. ```java public DatabaseAdminStubSettings.Builder getDatabaseAdminStubSettingsBuilder() ``` ```java builder .getDatabaseAdminStubSettingsBuilder() .applyToAllUnaryMethods( new ApiFunction, Void>() { public Void apply(Builder input) { input.setRetrySettings(retrySettings); return null; } }); ``` -------------------------------- ### InstanceAdminStubSettings Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Settings for the InstanceAdminStub, allowing customization of API call behavior. ```APIDOC ## InstanceAdminStubSettings Constructor ### Description Constructs an `InstanceAdminStubSettings` object with the provided builder. ### Method `protected` constructor ### Endpoint N/A (Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "settingsBuilder": "InstanceAdminStubSettings.Builder" } ``` ### Response #### Success Response (N/A for constructor) N/A #### Response Example N/A ``` -------------------------------- ### DatabaseAdminStubSettings.Builder Class Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1.stub Details the DatabaseAdminStubSettings.Builder class, its constructors, methods, and inheritance. ```APIDOC ## Class DatabaseAdminStubSettings.Builder ### Description Builder for DatabaseAdminStubSettings. ### Inheritance java.lang.Object > StubSettings.Builder > DatabaseAdminStubSettings.Builder ### Constructors * `Builder()` * `Builder(ClientContext clientContext)` * `Builder(DatabaseAdminStubSettings settings)` ### Methods * `addSplitPointsSettings()` * `applyToAllUnaryMethods(ApiFunction,Void> settingsUpdater)` * `build()` * `copyBackupOperationSettings()` * `copyBackupSettings()` * `createBackupOperationSettings()` * `createBackupScheduleSettings()` * `createBackupSettings()` * `createDatabaseOperationSettings()` * `createDatabaseSettings()` * `deleteBackupScheduleSettings()` * `deleteBackupSettings()` * `dropDatabaseSettings()` * `getBackupScheduleSettings()` * `getBackupSettings()` * `getDatabaseDdlSettings()` * `getDatabaseSettings()` * `getIamPolicySettings()` * `internalUpdateGraphOperationSettings()` * `listBackupOperationsSettings()` * `listBackupSchedulesSettings()` * `listBackupsSettings()` * `listDatabaseOperationsSettings()` * `listDatabaseRolesSettings()` * `listDatabasesSettings()` * `restoreDatabaseOperationSettings()` * `restoreDatabaseSettings()` * `setIamPolicySettings()` * `testIamPermissionsSettings()` * `unaryMethodSettingsBuilders()` * `updateBackupScheduleSettings()` * `updateBackupSettings()` * `updateDatabaseDdlOperationSettings()` * `updateDatabaseDdlSettings()` * `updateDatabaseOperationSettings()` * `updateDatabaseSettings()` ``` -------------------------------- ### Get Session Settings Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.v1 Retrieves the settings used for getting session information. ```APIDOC ## getSessionSettings() ### Description Returns the object with the settings used for calls to getSession. ### Method GET ### Endpoint /websites/cloud_google_java_reference_google-cloud-spanner ### Parameters None ### Request Example None ### Response #### Success Response (200) - **settings** (UnaryCallSettings) - The settings object for getSession. #### Response Example ```json { "settings": "UnaryCallSettings" } ``` ``` -------------------------------- ### Java: Update Spanner Graph example timestamps Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/history This documentation update modifies the example timestamps within the Spanner Graph Java sample code. It aims to provide more accurate or relevant examples for developers using Spanner Graph. This change affects documentation and code examples, not the core library functionality. ```java // Change the example timestamps in Spanner Graph java sample code (#3295) (b6490b6) ``` -------------------------------- ### Build DatabaseAdminStubSettings in Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1.stub This Java snippet represents the build method for DatabaseAdminStubSettings.Builder. It constructs and returns a fully configured DatabaseAdminStubSettings object, which can then be used to create a Spanner client. This method may throw an IOException if there are issues during the build process. ```java public DatabaseAdminStubSettings build() throws IOException ``` -------------------------------- ### updateInstanceSettings API Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Provides settings for calls to updateInstance. ```APIDOC ## updateInstanceSettings() ### Description Returns the object with the settings used for calls to updateInstance. ### Method N/A (This is a getter for settings) ### Endpoint N/A ### Parameters None ### Request Example ```json // No request body for this getter ``` ### Response #### Success Response - **return value** (UnaryCallSettings) - The settings for updateInstance calls. ``` -------------------------------- ### Get Default Instance for Type - Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ExecuteSqlRequest The `getDefaultInstanceForType()` method returns the default instance of `ExecuteSqlRequest.QueryOptions`. This is often used to get a baseline configuration. ```java public ExecuteSqlRequest.QueryOptions getDefaultInstanceForType() ``` -------------------------------- ### Get Child Partition Builder Metadata (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.executor.v1.ChildPartitionsRecord Methods to obtain metadata about the ChildPartitionsRecord.ChildPartition builder and its default instance. Includes getting the descriptor for the type and the default instance itself. ```java public ChildPartitionsRecord.ChildPartition getDefaultInstanceForType() public Descriptors.Descriptor getDescriptorForType() ``` -------------------------------- ### List Instance Partitions Settings - Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Provides the PagedCallSettings object for the listInstancePartitions method. This configures the settings for retrieving a list of instance partitions, including the types for requests, responses, and paged responses. ```java public PagedCallSettings listInstancePartitionsSettings() Returns the object with the settings used for calls to listInstancePartitions. ``` -------------------------------- ### Set Start Timestamp Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Sets the start timestamp for querying change stream records. Records with commit timestamps greater than or equal to this timestamp will be returned. ```APIDOC ## setStartTimestamp(Timestamp value) ### Description Sets the start timestamp at which the partitions should be queried to return change stream records with timestamps greater than or equal to `start_timestamp`. The `start_timestamp` can be the same across various record types within the same partition. ### Method `public ChangeStreamRecord.PartitionStartRecord.Builder setStartTimestamp(Timestamp value)` ### Parameters #### Request Body - **value** (Timestamp) - Required - The timestamp value to set. ### Response #### Success Response (200) - **ChangeStreamRecord.PartitionStartRecord.Builder** - The builder instance. ### Request Example ```json { "value": { "seconds": 1678886400, "nanos": 0 } } ``` ### Response Example ```json { "builder": "ChangeStreamRecord.PartitionStartRecord.Builder" } ``` ## setStartTimestamp(Timestamp.Builder builderForValue) ### Description Sets the start timestamp for querying change stream records using a builder. ### Method `public ChangeStreamRecord.PartitionStartRecord.Builder setStartTimestamp(Timestamp.Builder builderForValue)` ### Parameters #### Request Body - **builderForValue** (Builder) - Required - The builder for the timestamp value. ### Response #### Success Response (200) - **ChangeStreamRecord.PartitionStartRecord.Builder** - The builder instance. ### Request Example ```json { "builderForValue": "Timestamp.Builder" } ``` ### Response Example ```json { "builder": "ChangeStreamRecord.PartitionStartRecord.Builder" } ``` ``` -------------------------------- ### Builder Constructor for DatabaseAdminStubSettings Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1.stub This snippet shows the protected constructor for creating a Builder instance for DatabaseAdminStubSettings. It can be initialized with a ClientContext or another DatabaseAdminStubSettings object. The ClientContext is used for establishing the connection and managing client-side state, while the other settings object allows for copying existing configurations. ```java protected Builder() ``` ```java protected Builder(ClientContext clientContext) ``` ```java protected Builder(DatabaseAdminStubSettings settings) ``` -------------------------------- ### Database Management Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1.stub Provides settings for creating, dropping, and retrieving database information. ```APIDOC ## createDatabaseOperationSettings() ### Description Returns the builder for the settings used for calls to createDatabase. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (OperationCallSettings.Builder) - The settings builder for createDatabase. #### Response Example N/A ``` ```APIDOC ## createDatabaseSettings() ### Description Returns the builder for the settings used for calls to createDatabase. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (Builder) - The settings builder for createDatabase. #### Response Example N/A ``` ```APIDOC ## dropDatabaseSettings() ### Description Returns the builder for the settings used for calls to dropDatabase. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (Builder) - The settings builder for dropDatabase. #### Response Example N/A ``` ```APIDOC ## getDatabaseDdlSettings() ### Description Returns the builder for the settings used for calls to getDatabaseDdl. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (Builder) - The settings builder for getDatabaseDdl. #### Response Example N/A ``` ```APIDOC ## getDatabaseSettings() ### Description Returns the builder for the settings used for calls to getDatabase. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (Builder) - The settings builder for getDatabase. #### Response Example N/A ``` -------------------------------- ### Check if Start Timestamp is Set in Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Determines whether the start timestamp field has been set. This boolean check is essential for conditional logic based on the presence of the timestamp. ```java public boolean hasStartTimestamp() { // Implementation details for checking if start timestamp is set return false; // Placeholder for actual implementation } ``` -------------------------------- ### To Builder Settings - Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Returns a builder instance populated with the current settings of the InstanceAdminStubSettings. This is useful for creating modified copies of the settings. ```java public InstanceAdminStubSettings.Builder toBuilder() Returns a builder containing all the values of this settings class. ``` -------------------------------- ### Clear Start Timestamp from PartitionStartRecord Builder (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Clears the start timestamp from the PartitionStartRecord builder. This timestamp defines the lower bound for querying change stream records. ```Java public ChangeStreamRecord.PartitionStartRecord.Builder clearStartTimestamp() ``` -------------------------------- ### Merge Start Timestamp in Java Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Merges a Timestamp value into the builder, setting the start_timestamp field. This timestamp indicates the inclusive start time for querying change stream records within a partition. ```java public ChangeStreamRecord.PartitionStartRecord.Builder mergeStartTimestamp(Timestamp value) ``` -------------------------------- ### Protected Constructor with CallableFactory for HttpJsonDatabaseAdminStub (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1 This protected constructor initializes an HttpJsonDatabaseAdminStub instance with settings, a client context, and a callable factory. Like other protected constructors, it's primarily for creating subclasses, and static factory methods are recommended for regular instantiation. IOException may occur. ```java protected HttpJsonDatabaseAdminStub(DatabaseAdminStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) ``` ``` -------------------------------- ### Instance Admin API Methods Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Provides details on various methods available for managing Cloud Spanner instances and their configurations. ```APIDOC ## createInstanceConfigOperationSettings() ### Description Returns the settings used for calls to `createInstanceConfig`. ### Method `public OperationCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **OperationCallSettings** (`OperationCallSettings`): The settings for the `createInstanceConfig` operation. #### Response Example N/A ``` ```APIDOC ## createInstanceConfigSettings() ### Description Returns the settings used for calls to `createInstanceConfig`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `createInstanceConfig` call. #### Response Example N/A ``` ```APIDOC ## createInstanceOperationSettings() ### Description Returns the settings used for calls to `createInstance`. ### Method `public OperationCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **OperationCallSettings** (`OperationCallSettings`): The settings for the `createInstance` operation. #### Response Example N/A ``` ```APIDOC ## createInstancePartitionOperationSettings() ### Description Returns the settings used for calls to `createInstancePartition`. ### Method `public OperationCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **OperationCallSettings** (`OperationCallSettings`): The settings for the `createInstancePartition` operation. #### Response Example N/A ``` ```APIDOC ## createInstancePartitionSettings() ### Description Returns the settings used for calls to `createInstancePartition`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `createInstancePartition` call. #### Response Example N/A ``` ```APIDOC ## createInstanceSettings() ### Description Returns the settings used for calls to `createInstance`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `createInstance` call. #### Response Example N/A ``` ```APIDOC ## createStub() ### Description Creates a stub for the Instance Admin API. ### Method `public InstanceAdminStub` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **InstanceAdminStub**: An instance of the `InstanceAdminStub`. #### Response Example N/A ### Exceptions - **IOException**: If an I/O error occurs during stub creation. ``` ```APIDOC ## deleteInstanceConfigSettings() ### Description Returns the settings used for calls to `deleteInstanceConfig`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `deleteInstanceConfig` call. #### Response Example N/A ``` ```APIDOC ## deleteInstancePartitionSettings() ### Description Returns the settings used for calls to `deleteInstancePartition`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `deleteInstancePartition` call. #### Response Example N/A ``` ```APIDOC ## deleteInstanceSettings() ### Description Returns the settings used for calls to `deleteInstance`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `deleteInstance` call. #### Response Example N/A ``` ```APIDOC ## getIamPolicySettings() ### Description Returns the settings used for calls to `getIamPolicy`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `getIamPolicy` call. #### Response Example N/A ``` ```APIDOC ## getInstanceConfigSettings() ### Description Returns the settings used for calls to `getInstanceConfig`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `getInstanceConfig` call. #### Response Example N/A ``` ```APIDOC ## getInstancePartitionSettings() ### Description Returns the settings used for calls to `getInstancePartition`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `getInstancePartition` call. #### Response Example N/A ``` ```APIDOC ## getInstanceSettings() ### Description Returns the settings used for calls to `getInstance`. ### Method `public UnaryCallSettings` ### Endpoint N/A (Method) ### Parameters None ### Request Example N/A ### Response #### Success Response - **UnaryCallSettings** (`UnaryCallSettings`): The settings for the `getInstance` call. #### Response Example N/A ``` -------------------------------- ### Set Start Timestamp for Change Stream Record (Java) Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.ChangeStreamRecord Sets the start timestamp for querying change stream records. Records with commit timestamps greater than or equal to this value will be returned. This is applicable for various change stream record types. ```Java public ChangeStreamRecord.PartitionStartRecord.Builder setStartTimestamp(Timestamp value) ``` ```Java public ChangeStreamRecord.PartitionStartRecord.Builder setStartTimestamp(Timestamp.Builder builderForValue) ``` -------------------------------- ### getDatabaseCallable() Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1 Returns a callable object for the get database operation. ```APIDOC ## getDatabaseCallable() ### Description Returns a callable object for the get database operation. ### Method N/A (Method signature for Java) ### Endpoint N/A (Method signature for Java) ### Parameters N/A ### Request Example N/A ### Response #### Success Response (N/A) - **UnaryCallable** - The callable object for the get database operation. #### Response Example N/A ``` -------------------------------- ### Static Methods for SpannerStubSettings Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.v1 Details the static methods available on the SpannerStubSettings class, including methods for building default providers and creating new instances. ```APIDOC ## Static Methods for SpannerStubSettings ### defaultApiClientHeaderProviderBuilder() #### Description Returns a builder for the default API client header provider. #### Method `GET` #### Endpoint N/A #### Parameters None #### Request Body None ### Request Example None #### Success Response (200) - **Builder** (ApiClientHeaderProvider.Builder) - A builder for the default API client header provider. #### Response Example ```java ApiClientHeaderProvider.Builder builder = SpannerStubSettings.defaultApiClientHeaderProviderBuilder(); ``` ### defaultCredentialsProviderBuilder() #### Description Returns a builder for the default credentials for this service. #### Method `GET` #### Endpoint N/A #### Parameters None #### Request Body None ### Request Example None #### Success Response (200) - **Builder** (GoogleCredentialsProvider.Builder) - A builder for the default credentials. #### Response Example ```java GoogleCredentialsProvider.Builder credentialsBuilder = SpannerStubSettings.defaultCredentialsProviderBuilder(); ``` ``` -------------------------------- ### getBackupCallable() Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1 Returns a callable object for the get backup operation. ```APIDOC ## getBackupCallable() ### Description Returns a callable object for the get backup operation. ### Method N/A (Method signature for Java) ### Endpoint N/A (Method signature for Java) ### Parameters N/A ### Request Example N/A ### Response #### Success Response (N/A) - **UnaryCallable** - The callable object for the get backup operation. #### Response Example N/A ``` -------------------------------- ### Backup Management Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1.stub Provides settings for creating, deleting, and retrieving backups. ```APIDOC ## createBackupSettings() ### Description Returns the builder for the settings used for calls to createBackup. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (Builder) - The settings builder for createBackup. #### Response Example N/A ``` ```APIDOC ## deleteBackupSettings() ### Description Returns the builder for the settings used for calls to deleteBackup. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (Builder) - The settings builder for deleteBackup. #### Response Example N/A ``` ```APIDOC ## getBackupSettings() ### Description Returns the builder for the settings used for calls to getBackup. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (Builder) - The settings builder for getBackup. #### Response Example N/A ``` ```APIDOC ## listBackupOperationsSettings() ### Description Returns the builder for the settings used for calls to listBackupOperations. ### Method N/A (Java Method) ### Endpoint N/A (Java Method) ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **Builder** (PagedCallSettings.Builder) - The settings builder for listBackupOperations. #### Response Example N/A ``` -------------------------------- ### getDatabaseDdlCallable() Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.database.v1 Returns a callable object for the get database DDL operation. ```APIDOC ## getDatabaseDdlCallable() ### Description Returns a callable object for the get database DDL operation. ### Method N/A (Method signature for Java) ### Endpoint N/A (Method signature for Java) ### Parameters N/A ### Request Example N/A ### Response #### Success Response (N/A) - **UnaryCallable** - The callable object for the get database DDL operation. #### Response Example N/A ``` -------------------------------- ### updateInstanceConfigSettings API Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Provides settings for calls to updateInstanceConfig. ```APIDOC ## updateInstanceConfigSettings() ### Description Returns the object with the settings used for calls to updateInstanceConfig. ### Method N/A (This is a getter for settings) ### Endpoint N/A ### Parameters None ### Request Example ```json // No request body for this getter ``` ### Response #### Success Response - **return value** (UnaryCallSettings) - The settings for updateInstanceConfig calls. ``` -------------------------------- ### Get Service Name Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.v1 Retrieves the default service name for the Spanner client. ```APIDOC ## getServiceName() ### Description Returns the default service name. ### Method GET ### Endpoint /websites/cloud_google_java_reference_google-cloud-spanner ### Parameters None ### Request Example None ### Response #### Success Response (200) - **serviceName** (String) - The default service name. #### Response Example ```json { "serviceName": "spanner.googleapis.com" } ``` ``` -------------------------------- ### Create New InstanceAdminStubSettings Builder Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.cloud.spanner.admin.instance.v1 Returns a new builder instance for `InstanceAdminStubSettings` to configure stub settings programmatically. This is the primary way to create custom configurations for the Spanner instance admin client. ```java public static InstanceAdminStubSettings.Builder newBuilder() ``` -------------------------------- ### Get Partition Token Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.executor.v1.ChildPartitionsRecord Provides methods to retrieve the partition token string and its byte representation. ```APIDOC ## Get Partition Token ### Description Methods for retrieving the partition token string and its byte representation. ### Endpoints #### `getToken()` - **Method**: GET - **Description**: Retrieves the partition token string used to identify the child partition. - **Returns**: - `String` - The token. #### `getTokenBytes()` - **Method**: GET - **Description**: Retrieves the partition token as bytes. - **Returns**: - `ByteString` - The bytes for token. ``` -------------------------------- ### Get Session API Source: https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google Retrieves information about a specific session. Used to check the status or details of an existing session. ```APIDOC ## GET /v1/{name} ### Description Gets a session. Returns a `google.spanner.v1.Session` object if the session exists. ### Method GET ### Endpoint /v1/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the session to retrieve. Format: `projects/{project}/instances/{instance}/databases/{database}/sessions/{session}`. #### Query Parameters None #### Request Body None ### Request Example ```json { "name": "projects/my-project/instances/my-instance/databases/my-database/sessions/session-id" } ``` ### Response #### Success Response (200) - **name** (string) - The name of the session. - **labels** (object) - User-specified system variables for the session. - **create_time** (timestamp) - The timestamp at which the session was created. - **approximate_dialect** (enum) - The dialect of the database. #### Response Example ```json { "name": "projects/my-project/instances/my-instance/databases/my-database/sessions/session-id", "labels": { "client_app": "myapp1" }, "create_time": "2023-10-27T10:00:00Z", "approximate_dialect": "GOOGLE_STANDARD_SQL" } ``` ```