Class Database.Builder (2.60.0)

public static final class Database.Builder extends GeneratedMessageV3.Builder<Database.Builder> 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.v2.Database

Implements

DatabaseOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllGrantees(Iterable<String> values)

public Database.Builder addAllGrantees(Iterable<String> values)

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
values Iterable<String>

The grantees to add.

Returns
Type Description
Database.Builder

This builder for chaining.

addGrantees(String value)

public Database.Builder addGrantees(String value)

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
value String

The grantees to add.

Returns
Type Description
Database.Builder

This builder for chaining.

addGranteesBytes(ByteString value)

public Database.Builder addGranteesBytes(ByteString value)

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
value ByteString

The bytes of the grantees to add.

Returns
Type Description
Database.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Database.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Database.Builder
Overrides

build()

public Database build()
Returns
Type Description
Database

buildPartial()

public Database buildPartial()
Returns
Type Description
Database

clear()

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

clearDisplayName()

public Database.Builder clearDisplayName()

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

string display_name = 2;

Returns
Type Description
Database.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Database.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Database.Builder
Overrides

clearGrantees()

public Database.Builder clearGrantees()

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
Database.Builder

This builder for chaining.

clearName()

public Database.Builder clearName()

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
Database.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Database.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Database.Builder
Overrides

clearQuery()

public Database.Builder clearQuery()

The SQL statement that is associated with the database access.

string query = 4;

Returns
Type Description
Database.Builder

This builder for chaining.

clearUserName()

public Database.Builder clearUserName()

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
Database.Builder

This builder for chaining.

clearVersion()

public Database.Builder clearVersion()

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

string version = 6;

Returns
Type Description
Database.Builder

This builder for chaining.

clone()

public Database.Builder clone()
Returns
Type Description
Database.Builder
Overrides

getDefaultInstanceForType()

public Database getDefaultInstanceForType()
Returns
Type Description
Database

getDescriptorForType()

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

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.

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Database other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Database.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Database.Builder
Overrides

setDisplayName(String value)

public Database.Builder setDisplayName(String value)

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

string display_name = 2;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Database.Builder setDisplayNameBytes(ByteString value)

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

string display_name = 2;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Database.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Database.Builder
Overrides

setGrantees(int index, String value)

public Database.Builder setGrantees(int index, String value)

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

repeated string grantees = 5;

Parameters
Name Description
index int

The index to set the value at.

value String

The grantees to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setName(String value)

public Database.Builder setName(String value)

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;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Database.Builder setNameBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setQuery(String value)

public Database.Builder setQuery(String value)

The SQL statement that is associated with the database access.

string query = 4;

Parameter
Name Description
value String

The query to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setQueryBytes(ByteString value)

public Database.Builder setQueryBytes(ByteString value)

The SQL statement that is associated with the database access.

string query = 4;

Parameter
Name Description
value ByteString

The bytes for query to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Database.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Database.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Database.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Database.Builder
Overrides

setUserName(String value)

public Database.Builder setUserName(String value)

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;

Parameter
Name Description
value String

The userName to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setUserNameBytes(ByteString value)

public Database.Builder setUserNameBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for userName to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setVersion(String value)

public Database.Builder setVersion(String value)

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

string version = 6;

Parameter
Name Description
value String

The version to set.

Returns
Type Description
Database.Builder

This builder for chaining.

setVersionBytes(ByteString value)

public Database.Builder setVersionBytes(ByteString value)

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

string version = 6;

Parameter
Name Description
value ByteString

The bytes for version to set.

Returns
Type Description
Database.Builder

This builder for chaining.