Class UpdateDatabaseDdlRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, UpdateDatabaseDdlRequestOrBuilder, Cloneable
Enclosing class:
UpdateDatabaseDdlRequest

public static final class UpdateDatabaseDdlRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder> implements UpdateDatabaseDdlRequestOrBuilder
 Enqueues the given DDL statements to be applied, in order but not
 necessarily all at once, to the database schema at some point (or
 points) in the future. The server checks that the statements
 are executable (syntactically valid, name tables that exist, etc.)
 before enqueueing them, but they may still fail upon
 later execution (e.g., if a statement from another batch of
 statements is applied first and it conflicts in some way, or if
 there is some data-related problem like a `NULL` value in a column to
 which `NOT NULL` would be added). If a statement fails, all
 subsequent statements in the batch are automatically cancelled.

 Each batch of statements is assigned a name which can be used with
 the [Operations][google.longrunning.Operations] API to monitor
 progress. See the
 [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more
 details.
 
Protobuf type google.spanner.admin.database.v1.UpdateDatabaseDdlRequest
  • Method Details

    • 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<UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
    • getDefaultInstanceForType

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

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

      public UpdateDatabaseDdlRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<UpdateDatabaseDdlRequest.Builder>
    • setField

      public UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
    • clearField

      public UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
    • clearOneof

      public UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
    • setRepeatedField

      public UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
    • addRepeatedField

      public UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
    • mergeFrom

      public UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
    • mergeFrom

    • isInitialized

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

      public UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
      Throws:
      IOException
    • getDatabase

      public String getDatabase()
       Required. The database to update.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getDatabase in interface UpdateDatabaseDdlRequestOrBuilder
      Returns:
      The database.
    • getDatabaseBytes

      public com.google.protobuf.ByteString getDatabaseBytes()
       Required. The database to update.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getDatabaseBytes in interface UpdateDatabaseDdlRequestOrBuilder
      Returns:
      The bytes for database.
    • setDatabase

      public UpdateDatabaseDdlRequest.Builder setDatabase(String value)
       Required. The database to update.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The database to set.
      Returns:
      This builder for chaining.
    • clearDatabase

      public UpdateDatabaseDdlRequest.Builder clearDatabase()
       Required. The database to update.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setDatabaseBytes

      public UpdateDatabaseDdlRequest.Builder setDatabaseBytes(com.google.protobuf.ByteString value)
       Required. The database to update.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for database to set.
      Returns:
      This builder for chaining.
    • getStatementsList

      public com.google.protobuf.ProtocolStringList getStatementsList()
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getStatementsList in interface UpdateDatabaseDdlRequestOrBuilder
      Returns:
      A list containing the statements.
    • getStatementsCount

      public int getStatementsCount()
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getStatementsCount in interface UpdateDatabaseDdlRequestOrBuilder
      Returns:
      The count of statements.
    • getStatements

      public String getStatements(int index)
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getStatements in interface UpdateDatabaseDdlRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The statements at the given index.
    • getStatementsBytes

      public com.google.protobuf.ByteString getStatementsBytes(int index)
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getStatementsBytes in interface UpdateDatabaseDdlRequestOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the statements at the given index.
    • setStatements

      public UpdateDatabaseDdlRequest.Builder setStatements(int index, String value)
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The statements to set.
      Returns:
      This builder for chaining.
    • addStatements

      public UpdateDatabaseDdlRequest.Builder addStatements(String value)
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The statements to add.
      Returns:
      This builder for chaining.
    • addAllStatements

      public UpdateDatabaseDdlRequest.Builder addAllStatements(Iterable<String> values)
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The statements to add.
      Returns:
      This builder for chaining.
    • clearStatements

      public UpdateDatabaseDdlRequest.Builder clearStatements()
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addStatementsBytes

      public UpdateDatabaseDdlRequest.Builder addStatementsBytes(com.google.protobuf.ByteString value)
       Required. DDL statements to be applied to the database.
       
      repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the statements to add.
      Returns:
      This builder for chaining.
    • getOperationId

      public String getOperationId()
       If empty, the new update request is assigned an
       automatically-generated operation ID. Otherwise, `operation_id`
       is used to construct the name of the resulting
       [Operation][google.longrunning.Operation].
      
       Specifying an explicit operation ID simplifies determining
       whether the statements were executed in the event that the
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
       or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
       `operation_id` fields can be combined to form the
       [name][google.longrunning.Operation.name] of the resulting
       [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
      
       `operation_id` should be unique within the database, and must be
       a valid identifier: `[a-z][a-z0-9_]*`. Note that
       automatically-generated operation IDs always begin with an
       underscore. If the named operation already exists,
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
       `ALREADY_EXISTS`.
       
      string operation_id = 3;
      Specified by:
      getOperationId in interface UpdateDatabaseDdlRequestOrBuilder
      Returns:
      The operationId.
    • getOperationIdBytes

      public com.google.protobuf.ByteString getOperationIdBytes()
       If empty, the new update request is assigned an
       automatically-generated operation ID. Otherwise, `operation_id`
       is used to construct the name of the resulting
       [Operation][google.longrunning.Operation].
      
       Specifying an explicit operation ID simplifies determining
       whether the statements were executed in the event that the
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
       or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
       `operation_id` fields can be combined to form the
       [name][google.longrunning.Operation.name] of the resulting
       [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
      
       `operation_id` should be unique within the database, and must be
       a valid identifier: `[a-z][a-z0-9_]*`. Note that
       automatically-generated operation IDs always begin with an
       underscore. If the named operation already exists,
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
       `ALREADY_EXISTS`.
       
      string operation_id = 3;
      Specified by:
      getOperationIdBytes in interface UpdateDatabaseDdlRequestOrBuilder
      Returns:
      The bytes for operationId.
    • setOperationId

      public UpdateDatabaseDdlRequest.Builder setOperationId(String value)
       If empty, the new update request is assigned an
       automatically-generated operation ID. Otherwise, `operation_id`
       is used to construct the name of the resulting
       [Operation][google.longrunning.Operation].
      
       Specifying an explicit operation ID simplifies determining
       whether the statements were executed in the event that the
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
       or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
       `operation_id` fields can be combined to form the
       [name][google.longrunning.Operation.name] of the resulting
       [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
      
       `operation_id` should be unique within the database, and must be
       a valid identifier: `[a-z][a-z0-9_]*`. Note that
       automatically-generated operation IDs always begin with an
       underscore. If the named operation already exists,
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
       `ALREADY_EXISTS`.
       
      string operation_id = 3;
      Parameters:
      value - The operationId to set.
      Returns:
      This builder for chaining.
    • clearOperationId

      public UpdateDatabaseDdlRequest.Builder clearOperationId()
       If empty, the new update request is assigned an
       automatically-generated operation ID. Otherwise, `operation_id`
       is used to construct the name of the resulting
       [Operation][google.longrunning.Operation].
      
       Specifying an explicit operation ID simplifies determining
       whether the statements were executed in the event that the
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
       or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
       `operation_id` fields can be combined to form the
       [name][google.longrunning.Operation.name] of the resulting
       [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
      
       `operation_id` should be unique within the database, and must be
       a valid identifier: `[a-z][a-z0-9_]*`. Note that
       automatically-generated operation IDs always begin with an
       underscore. If the named operation already exists,
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
       `ALREADY_EXISTS`.
       
      string operation_id = 3;
      Returns:
      This builder for chaining.
    • setOperationIdBytes

      public UpdateDatabaseDdlRequest.Builder setOperationIdBytes(com.google.protobuf.ByteString value)
       If empty, the new update request is assigned an
       automatically-generated operation ID. Otherwise, `operation_id`
       is used to construct the name of the resulting
       [Operation][google.longrunning.Operation].
      
       Specifying an explicit operation ID simplifies determining
       whether the statements were executed in the event that the
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed,
       or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and
       `operation_id` fields can be combined to form the
       [name][google.longrunning.Operation.name] of the resulting
       [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`.
      
       `operation_id` should be unique within the database, and must be
       a valid identifier: `[a-z][a-z0-9_]*`. Note that
       automatically-generated operation IDs always begin with an
       underscore. If the named operation already exists,
       [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
       `ALREADY_EXISTS`.
       
      string operation_id = 3;
      Parameters:
      value - The bytes for operationId to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>
    • mergeUnknownFields

      public final UpdateDatabaseDdlRequest.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<UpdateDatabaseDdlRequest.Builder>