Class Database.Builder (2.48.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.v1.Database

Implements

DatabaseOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The grantees to add.

Returns
TypeDescription
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
NameDescription
valueString

The grantees to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the grantees to add.

Returns
TypeDescription
Database.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Database.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Database.Builder
Overrides

build()

public Database build()
Returns
TypeDescription
Database

buildPartial()

public Database buildPartial()
Returns
TypeDescription
Database

clear()

public Database.Builder clear()
Returns
TypeDescription
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
TypeDescription
Database.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Database.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Database.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Database.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Database.Builder
Overrides

clearQuery()

public Database.Builder clearQuery()

The SQL statement that is associated with the database access.

string query = 4;

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

This builder for chaining.

clone()

public Database.Builder clone()
Returns
TypeDescription
Database.Builder
Overrides

getDefaultInstanceForType()

public Database getDefaultInstanceForType()
Returns
TypeDescription
Database

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

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

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

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

string display_name = 2;

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getQuery()

public String getQuery()

The SQL statement that is associated with the database access.

string query = 4;

Returns
TypeDescription
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

The SQL statement that is associated with the database access.

string query = 4;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
String

The version.

getVersionBytes()

public ByteString getVersionBytes()

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

string version = 6;

Returns
TypeDescription
ByteString

The bytes for version.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Database other)

public Database.Builder mergeFrom(Database other)
Parameter
NameDescription
otherDatabase
Returns
TypeDescription
Database.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Database.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Database.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Database.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Database.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Database.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Database.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The grantees to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valueString

The query to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for query to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Database.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Database.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The userName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for userName to set.

Returns
TypeDescription
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
NameDescription
valueString

The version to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for version to set.

Returns
TypeDescription
Database.Builder

This builder for chaining.