Class DatabaseConnection (0.52.0)

public final class DatabaseConnection extends GeneratedMessage implements DatabaseConnectionOrBuilder

Represents DatabaseConnection resource.

Protobuf type google.cloud.oracledatabase.v1.DatabaseConnection

Static Fields

CONNECTION_STRING_FIELD_NUMBER

public static final int CONNECTION_STRING_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

LIFECYCLE_DETAILS_FIELD_NUMBER

public static final int LIFECYCLE_DETAILS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

ODB_NETWORK_FIELD_NUMBER

public static final int ODB_NETWORK_FIELD_NUMBER
Field Value
Type Description
int

PASSWORD_SECRET_VERSION_FIELD_NUMBER

public static final int PASSWORD_SECRET_VERSION_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

USERNAME_FIELD_NUMBER

public static final int USERNAME_FIELD_NUMBER
Field Value
Type Description
int

WALLET_SECRET_VERSION_FIELD_NUMBER

public static final int WALLET_SECRET_VERSION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DatabaseConnection getDefaultInstance()
Returns
Type Description
DatabaseConnection

getDescriptor()

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

newBuilder()

public static DatabaseConnection.Builder newBuilder()
Returns
Type Description
DatabaseConnection.Builder

newBuilder(DatabaseConnection prototype)

public static DatabaseConnection.Builder newBuilder(DatabaseConnection prototype)
Parameter
Name Description
prototype DatabaseConnection
Returns
Type Description
DatabaseConnection.Builder

parseDelimitedFrom(InputStream input)

public static DatabaseConnection parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DatabaseConnection parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static DatabaseConnection parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DatabaseConnection parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DatabaseConnection parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DatabaseConnection parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DatabaseConnection parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DatabaseConnection parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static DatabaseConnection parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DatabaseConnection parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static DatabaseConnection parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DatabaseConnection parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DatabaseConnection
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<DatabaseConnection> parser()
Returns
Type Description
Parser<DatabaseConnection>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Optional. Optional: Labels as key-value pairs to organize the resource.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getConnectionString()

public String getConnectionString()

Required. Immutable. Oracle Easy Connect or TNS connection string. Example: "your-db-host.example.com:1521/YOUR_SERVICE_NAME"

string connection_string = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The connectionString.

getConnectionStringBytes()

public ByteString getConnectionStringBytes()

Required. Immutable. Oracle Easy Connect or TNS connection string. Example: "your-db-host.example.com:1521/YOUR_SERVICE_NAME"

string connection_string = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for connectionString.

getCreateTime()

public Timestamp getCreateTime()

Output only. The create time of the resource.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The create time of the resource.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public DatabaseConnection getDefaultInstanceForType()
Returns
Type Description
DatabaseConnection

getDisplayName()

public String getDisplayName()

Optional. Immutable. User-friendly display name for the connection.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. Immutable. User-friendly display name for the connection.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for displayName.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. Optional: Labels as key-value pairs to organize the resource.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. Optional: Labels as key-value pairs to organize the resource.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. Optional: Labels as key-value pairs to organize the resource.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. Optional: Labels as key-value pairs to organize the resource.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getLifecycleDetails()

public String getLifecycleDetails()

Output only. Additional information about the current state of the connection.

string lifecycle_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The lifecycleDetails.

getLifecycleDetailsBytes()

public ByteString getLifecycleDetailsBytes()

Output only. Additional information about the current state of the connection.

string lifecycle_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for lifecycleDetails.

getName()

public String getName()

Identifier. The resource name of the DatabaseConnection. Format: projects/{project}/locations/{location}/databaseConnections/{database_connection}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the DatabaseConnection. Format: projects/{project}/locations/{location}/databaseConnections/{database_connection}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getNetworkConfigurationCase()

public DatabaseConnection.NetworkConfigurationCase getNetworkConfigurationCase()
Returns
Type Description
DatabaseConnection.NetworkConfigurationCase

getOdbNetwork()

public String getOdbNetwork()

Optional. Immutable. For Oracle Database@Google cloud resources. Format: projects/{project}/locations/{location}/odbNetworks/{odbNetwork}

string odb_network = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The odbNetwork.

getOdbNetworkBytes()

public ByteString getOdbNetworkBytes()

Optional. Immutable. For Oracle Database@Google cloud resources. Format: projects/{project}/locations/{location}/odbNetworks/{odbNetwork}

string odb_network = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for odbNetwork.

getParserForType()

public Parser<DatabaseConnection> getParserForType()
Returns
Type Description
Parser<DatabaseConnection>
Overrides

getPasswordSecretVersion()

public String getPasswordSecretVersion()

Optional. The resource name of the GCP Secret Manager secret version containing the password for the specified username. Format: projects/{project}/secrets/{secret_id}/versions/{version_id} The service's Per-Product Per-Project Service Account (P4SA) must have the 'secretmanager.secretAccessor' permission on this secret.

string password_secret_version = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The passwordSecretVersion.

getPasswordSecretVersionBytes()

public ByteString getPasswordSecretVersionBytes()

Optional. The resource name of the GCP Secret Manager secret version containing the password for the specified username. Format: projects/{project}/secrets/{secret_id}/versions/{version_id} The service's Per-Product Per-Project Service Account (P4SA) must have the 'secretmanager.secretAccessor' permission on this secret.

string password_secret_version = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for passwordSecretVersion.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState()

public DatabaseConnection.State getState()

Output only. The current state of the connection.

.google.cloud.oracledatabase.v1.DatabaseConnection.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DatabaseConnection.State

The state.

getStateValue()

public int getStateValue()

Output only. The current state of the connection.

.google.cloud.oracledatabase.v1.DatabaseConnection.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The update time of the resource.

.google.protobuf.Timestamp update_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The update time of the resource.

.google.protobuf.Timestamp update_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getUsername()

public String getUsername()

Optional. Immutable. The default database username to use for connections.

string username = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The username.

getUsernameBytes()

public ByteString getUsernameBytes()

Optional. Immutable. The default database username to use for connections.

string username = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for username.

getWalletSecretVersion()

public String getWalletSecretVersion()

Optional. Optional: The resource name of the GCP Secret Manager secret version containing base64 encoded content of the Oracle Wallet ZIP file required for mTLS/TLS connections. Format: projects/{project}/secrets/{secret_id}/versions/{version_id} The service's Per-Product Per-Project Service Account (P4SA) must have the 'secretmanager.secretAccessor' permission on this secret.

string wallet_secret_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The walletSecretVersion.

getWalletSecretVersionBytes()

public ByteString getWalletSecretVersionBytes()

Optional. Optional: The resource name of the GCP Secret Manager secret version containing base64 encoded content of the Oracle Wallet ZIP file required for mTLS/TLS connections. Format: projects/{project}/secrets/{secret_id}/versions/{version_id} The service's Per-Product Per-Project Service Account (P4SA) must have the 'secretmanager.secretAccessor' permission on this secret.

string wallet_secret_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for walletSecretVersion.

getWalletSourceCase()

public DatabaseConnection.WalletSourceCase getWalletSourceCase()
Returns
Type Description
DatabaseConnection.WalletSourceCase

hasCreateTime()

public boolean hasCreateTime()

Output only. The create time of the resource.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasOdbNetwork()

public boolean hasOdbNetwork()

Optional. Immutable. For Oracle Database@Google cloud resources. Format: projects/{project}/locations/{location}/odbNetworks/{odbNetwork}

string odb_network = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the odbNetwork field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The update time of the resource.

.google.protobuf.Timestamp update_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hasWalletSecretVersion()

public boolean hasWalletSecretVersion()

Optional. Optional: The resource name of the GCP Secret Manager secret version containing base64 encoded content of the Oracle Wallet ZIP file required for mTLS/TLS connections. Format: projects/{project}/secrets/{secret_id}/versions/{version_id} The service's Per-Product Per-Project Service Account (P4SA) must have the 'secretmanager.secretAccessor' permission on this secret.

string wallet_secret_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the walletSecretVersion field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public DatabaseConnection.Builder newBuilderForType()
Returns
Type Description
DatabaseConnection.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected DatabaseConnection.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
DatabaseConnection.Builder
Overrides

toBuilder()

public DatabaseConnection.Builder toBuilder()
Returns
Type Description
DatabaseConnection.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException