Class SpannerProfile.Builder (1.102.0)

public static final class SpannerProfile.Builder extends GeneratedMessage.Builder<SpannerProfile.Builder> implements SpannerProfileOrBuilder

Profile for connecting to a Spanner source.

Protobuf type google.cloud.datastream.v1.SpannerProfile

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public SpannerProfile build()
Returns
Type Description
SpannerProfile

buildPartial()

public SpannerProfile buildPartial()
Returns
Type Description
SpannerProfile

clear()

public SpannerProfile.Builder clear()
Returns
Type Description
SpannerProfile.Builder
Overrides

clearDatabase()

public SpannerProfile.Builder clearDatabase()

Required. Immutable. Cloud Spanner database resource. This field is immutable. Must be in the format: projects/{project}/instances/{instance}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
SpannerProfile.Builder

This builder for chaining.

clearHost()

public SpannerProfile.Builder clearHost()

Optional. The Spanner endpoint to connect to. Defaults to the global endpoint (https://spanner.googleapis.com). Must be in the format: https://spanner.{region}.rep.googleapis.com.

string host = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SpannerProfile.Builder

This builder for chaining.

getDatabase()

public String getDatabase()

Required. Immutable. Cloud Spanner database resource. This field is immutable. Must be in the format: projects/{project}/instances/{instance}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The database.

getDatabaseBytes()

public ByteString getDatabaseBytes()

Required. Immutable. Cloud Spanner database resource. This field is immutable. Must be in the format: projects/{project}/instances/{instance}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for database.

getDefaultInstanceForType()

public SpannerProfile getDefaultInstanceForType()
Returns
Type Description
SpannerProfile

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHost()

public String getHost()

Optional. The Spanner endpoint to connect to. Defaults to the global endpoint (https://spanner.googleapis.com). Must be in the format: https://spanner.{region}.rep.googleapis.com.

string host = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The host.

getHostBytes()

public ByteString getHostBytes()

Optional. The Spanner endpoint to connect to. Defaults to the global endpoint (https://spanner.googleapis.com). Must be in the format: https://spanner.{region}.rep.googleapis.com.

string host = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for host.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SpannerProfile other)

public SpannerProfile.Builder mergeFrom(SpannerProfile other)
Parameter
Name Description
other SpannerProfile
Returns
Type Description
SpannerProfile.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SpannerProfile.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SpannerProfile.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SpannerProfile.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SpannerProfile.Builder
Overrides

setDatabase(String value)

public SpannerProfile.Builder setDatabase(String value)

Required. Immutable. Cloud Spanner database resource. This field is immutable. Must be in the format: projects/{project}/instances/{instance}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The database to set.

Returns
Type Description
SpannerProfile.Builder

This builder for chaining.

setDatabaseBytes(ByteString value)

public SpannerProfile.Builder setDatabaseBytes(ByteString value)

Required. Immutable. Cloud Spanner database resource. This field is immutable. Must be in the format: projects/{project}/instances/{instance}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for database to set.

Returns
Type Description
SpannerProfile.Builder

This builder for chaining.

setHost(String value)

public SpannerProfile.Builder setHost(String value)

Optional. The Spanner endpoint to connect to. Defaults to the global endpoint (https://spanner.googleapis.com). Must be in the format: https://spanner.{region}.rep.googleapis.com.

string host = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The host to set.

Returns
Type Description
SpannerProfile.Builder

This builder for chaining.

setHostBytes(ByteString value)

public SpannerProfile.Builder setHostBytes(ByteString value)

Optional. The Spanner endpoint to connect to. Defaults to the global endpoint (https://spanner.googleapis.com). Must be in the format: https://spanner.{region}.rep.googleapis.com.

string host = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for host to set.

Returns
Type Description
SpannerProfile.Builder

This builder for chaining.