Class Database.Builder

  • All Implemented Interfaces:
    DatabaseOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Database

    public static final class Database.Builder
    extends com.google.protobuf.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](https://google.aip.dev/122#full-resource-names) 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.
     Some database resources may not have the [full resource
     name](https://google.aip.dev/122#full-resource-names) 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.
     
    Protobuf type google.cloud.securitycenter.v1.Database
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Database.Builder addAllGrantees​(Iterable<String> values)
      The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.
      Database.Builder addGrantees​(String value)
      The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.
      Database.Builder addGranteesBytes​(com.google.protobuf.ByteString value)
      The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.
      Database.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Database build()  
      Database buildPartial()  
      Database.Builder clear()  
      Database.Builder clearDisplayName()
      The human-readable name of the database that the user connected to.
      Database.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)  
      Database.Builder clearGrantees()
      The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.
      Database.Builder clearName()
      The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.
      Database.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)  
      Database.Builder clearQuery()
      The SQL statement that is associated with the database access.
      Database.Builder clearUserName()
      The username used to connect to the database.
      Database.Builder clone()  
      Database getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      String getDisplayName()
      The human-readable name of the database that the user connected to.
      com.google.protobuf.ByteString getDisplayNameBytes()
      The human-readable name of the database that the user connected to.
      String getGrantees​(int index)
      The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.
      com.google.protobuf.ByteString getGranteesBytes​(int index)
      The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.
      int getGranteesCount()
      The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.
      com.google.protobuf.ProtocolStringList getGranteesList()
      The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.
      String getName()
      The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.
      com.google.protobuf.ByteString getNameBytes()
      The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.
      String getQuery()
      The SQL statement that is associated with the database access.
      com.google.protobuf.ByteString getQueryBytes()
      The SQL statement that is associated with the database access.
      String getUserName()
      The username used to connect to the database.
      com.google.protobuf.ByteString getUserNameBytes()
      The username used to connect to the database.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      Database.Builder mergeFrom​(Database other)  
      Database.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      Database.Builder mergeFrom​(com.google.protobuf.Message other)  
      Database.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Database.Builder setDisplayName​(String value)
      The human-readable name of the database that the user connected to.
      Database.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
      The human-readable name of the database that the user connected to.
      Database.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      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.
      Database.Builder setName​(String value)
      The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.
      Database.Builder setNameBytes​(com.google.protobuf.ByteString value)
      The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.
      Database.Builder setQuery​(String value)
      The SQL statement that is associated with the database access.
      Database.Builder setQueryBytes​(com.google.protobuf.ByteString value)
      The SQL statement that is associated with the database access.
      Database.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)  
      Database.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Database.Builder setUserName​(String value)
      The username used to connect to the database.
      Database.Builder setUserNameBytes​(com.google.protobuf.ByteString value)
      The username used to connect to the database.
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

        getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • clear

        public Database.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • getDefaultInstanceForType

        public Database getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Database build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Database buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Database.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • setField

        public Database.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                         Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • clearField

        public Database.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • clearOneof

        public Database.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • setRepeatedField

        public Database.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 int index,
                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • addRepeatedField

        public Database.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • mergeFrom

        public Database.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Database.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • mergeFrom

        public Database.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Database.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         The [full resource name](https://google.aip.dev/122#full-resource-names) of
         the database that the user connected to, if it is supported by Cloud Asset
         Inventory.
         
        string name = 1;
        Specified by:
        getName in interface DatabaseOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The [full resource name](https://google.aip.dev/122#full-resource-names) of
         the database that the user connected to, if it is supported by Cloud Asset
         Inventory.
         
        string name = 1;
        Specified by:
        getNameBytes in interface DatabaseOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Database.Builder setName​(String value)
         The [full resource name](https://google.aip.dev/122#full-resource-names) of
         the database that the user connected to, if it is supported by Cloud Asset
         Inventory.
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Database.Builder clearName()
         The [full resource name](https://google.aip.dev/122#full-resource-names) of
         the database that the user connected to, if it is supported by Cloud Asset
         Inventory.
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Database.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The [full resource name](https://google.aip.dev/122#full-resource-names) of
         the database that the user connected to, if it is supported by Cloud Asset
         Inventory.
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDisplayName

        public String getDisplayName()
         The human-readable name of the database that the user connected to.
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface DatabaseOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         The human-readable name of the database that the user connected to.
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface DatabaseOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public Database.Builder setDisplayName​(String value)
         The human-readable name of the database that the user connected to.
         
        string display_name = 2;
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public Database.Builder clearDisplayName()
         The human-readable name of the database that the user connected to.
         
        string display_name = 2;
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public Database.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         The human-readable name of the database that the user connected to.
         
        string display_name = 2;
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • 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;
        Specified by:
        getUserName in interface DatabaseOrBuilder
        Returns:
        The userName.
      • getUserNameBytes

        public com.google.protobuf.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;
        Specified by:
        getUserNameBytes in interface DatabaseOrBuilder
        Returns:
        The bytes for userName.
      • setUserName

        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;
        Parameters:
        value - The userName to set.
        Returns:
        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:
        This builder for chaining.
      • setUserNameBytes

        public Database.Builder setUserNameBytes​(com.google.protobuf.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;
        Parameters:
        value - The bytes for userName to set.
        Returns:
        This builder for chaining.
      • getQuery

        public String getQuery()
         The SQL statement that is associated with the database access.
         
        string query = 4;
        Specified by:
        getQuery in interface DatabaseOrBuilder
        Returns:
        The query.
      • getQueryBytes

        public com.google.protobuf.ByteString getQueryBytes()
         The SQL statement that is associated with the database access.
         
        string query = 4;
        Specified by:
        getQueryBytes in interface DatabaseOrBuilder
        Returns:
        The bytes for query.
      • setQuery

        public Database.Builder setQuery​(String value)
         The SQL statement that is associated with the database access.
         
        string query = 4;
        Parameters:
        value - The query to set.
        Returns:
        This builder for chaining.
      • clearQuery

        public Database.Builder clearQuery()
         The SQL statement that is associated with the database access.
         
        string query = 4;
        Returns:
        This builder for chaining.
      • setQueryBytes

        public Database.Builder setQueryBytes​(com.google.protobuf.ByteString value)
         The SQL statement that is associated with the database access.
         
        string query = 4;
        Parameters:
        value - The bytes for query to set.
        Returns:
        This builder for chaining.
      • getGranteesList

        public com.google.protobuf.ProtocolStringList getGranteesList()
         The target usernames, roles, or groups of an SQL privilege grant, which is
         not an IAM policy change.
         
        repeated string grantees = 5;
        Specified by:
        getGranteesList in interface DatabaseOrBuilder
        Returns:
        A list containing the grantees.
      • 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;
        Specified by:
        getGranteesCount in interface DatabaseOrBuilder
        Returns:
        The count of grantees.
      • getGrantees

        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;
        Specified by:
        getGrantees in interface DatabaseOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The grantees at the given index.
      • getGranteesBytes

        public com.google.protobuf.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;
        Specified by:
        getGranteesBytes in interface DatabaseOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the grantees at the given index.
      • setGrantees

        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:
        index - The index to set the value at.
        value - The grantees to set.
        Returns:
        This builder for chaining.
      • addGrantees

        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;
        Parameters:
        value - The grantees to add.
        Returns:
        This builder for chaining.
      • addAllGrantees

        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;
        Parameters:
        values - The grantees to add.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • addGranteesBytes

        public Database.Builder addGranteesBytes​(com.google.protobuf.ByteString value)
         The target usernames, roles, or groups of an SQL privilege grant, which is
         not an IAM policy change.
         
        repeated string grantees = 5;
        Parameters:
        value - The bytes of the grantees to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Database.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>
      • mergeUnknownFields

        public final Database.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Database.Builder>