Class Database (2.50.0)

public final class Database extends GeneratedMessageV3 implements DatabaseOrBuilder

Represents database access information, such as queries. A database may be a sub-resource of an instance (as in the case of Cloud SQL instances or Cloud Spanner instances), or the database instance itself. Some database resources might not have the full resource name populated because these resource types, such as Cloud SQL databases, are not yet supported by Cloud Asset Inventory. In these cases only the display name is provided.

Protobuf type google.cloud.securitycenter.v1.Database

Implements

DatabaseOrBuilder

Static Fields

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

GRANTEES_FIELD_NUMBER

public static final int GRANTEES_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

USER_NAME_FIELD_NUMBER

public static final int USER_NAME_FIELD_NUMBER
Field Value
Type Description
int

VERSION_FIELD_NUMBER

public static final int VERSION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Database getDefaultInstance()
Returns
Type Description
Database

getDescriptor()

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

newBuilder()

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

newBuilder(Database prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public Database getDefaultInstanceForType()
Returns
Type Description
Database

getDisplayName()

public String getDisplayName()

The human-readable name of the database that the user connected to.

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The human-readable name of the database that the user connected to.

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getGrantees(int index)

public String getGrantees(int index)

The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.

repeated string grantees = 5;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The grantees at the given index.

getGranteesBytes(int index)

public ByteString getGranteesBytes(int index)

The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.

repeated string grantees = 5;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the grantees at the given index.

getGranteesCount()

public int getGranteesCount()

The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.

repeated string grantees = 5;

Returns
Type Description
int

The count of grantees.

getGranteesList()

public ProtocolStringList getGranteesList()

The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.

repeated string grantees = 5;

Returns
Type Description
ProtocolStringList

A list containing the grantees.

getName()

public String getName()

Some database resources may not have the full resource name populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud SQL databases). In these cases only the display name will be provided. The full resource name of the database that the user connected to, if it is supported by Cloud Asset Inventory.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Some database resources may not have the full resource name populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud SQL databases). In these cases only the display name will be provided. The full resource name of the database that the user connected to, if it is supported by Cloud Asset Inventory.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getQuery()

public String getQuery()

The SQL statement that is associated with the database access.

string query = 4;

Returns
Type Description
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

The SQL statement that is associated with the database access.

string query = 4;

Returns
Type Description
ByteString

The bytes for query.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUserName()

public String getUserName()

The username used to connect to the database. The username might not be an IAM principal and does not have a set format.

string user_name = 3;

Returns
Type Description
String

The userName.

getUserNameBytes()

public ByteString getUserNameBytes()

The username used to connect to the database. The username might not be an IAM principal and does not have a set format.

string user_name = 3;

Returns
Type Description
ByteString

The bytes for userName.

getVersion()

public String getVersion()

The version of the database, for example, POSTGRES_14. See the complete list.

string version = 6;

Returns
Type Description
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

The version of the database, for example, POSTGRES_14. See the complete list.

string version = 6;

Returns
Type Description
ByteString

The bytes for version.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Database.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Database.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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