Class SetDefaultBranchRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SetDefaultBranchRequest.Builder>
com.google.cloud.retail.v2alpha.SetDefaultBranchRequest.Builder
All Implemented Interfaces:
SetDefaultBranchRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SetDefaultBranchRequest

public static final class SetDefaultBranchRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<SetDefaultBranchRequest.Builder> implements SetDefaultBranchRequestOrBuilder
 Request message to set a specified branch as new default_branch.
 
Protobuf type google.cloud.retail.v2alpha.SetDefaultBranchRequest
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    The final component of the resource name of a branch.
    Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
    If set to true, it permits switching to a branch with [branch_id][google.cloud.retail.v2alpha.SetDefaultBranchRequest.branch_id] even if it has no sufficient active products.
    Some note on this request, this can be retrieved by [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch] before next valid default branch set occurs.
    The final component of the resource name of a branch.
    com.google.protobuf.ByteString
    The final component of the resource name of a branch.
    Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
    com.google.protobuf.ByteString
    Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    boolean
    If set to true, it permits switching to a branch with [branch_id][google.cloud.retail.v2alpha.SetDefaultBranchRequest.branch_id] even if it has no sufficient active products.
    Some note on this request, this can be retrieved by [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch] before next valid default branch set occurs.
    com.google.protobuf.ByteString
    Some note on this request, this can be retrieved by [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch] before next valid default branch set occurs.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    The final component of the resource name of a branch.
    setBranchIdBytes(com.google.protobuf.ByteString value)
    The final component of the resource name of a branch.
    Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
    setCatalogBytes(com.google.protobuf.ByteString value)
    Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
    setForce(boolean value)
    If set to true, it permits switching to a branch with [branch_id][google.cloud.retail.v2alpha.SetDefaultBranchRequest.branch_id] even if it has no sufficient active products.
    setNote(String value)
    Some note on this request, this can be retrieved by [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch] before next valid default branch set occurs.
    setNoteBytes(com.google.protobuf.ByteString value)
    Some note on this request, this can be retrieved by [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch] before next valid default branch set occurs.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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 class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    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 Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SetDefaultBranchRequest.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.GeneratedMessage.Builder<SetDefaultBranchRequest.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.GeneratedMessage.Builder<SetDefaultBranchRequest.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

      public SetDefaultBranchRequest.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<SetDefaultBranchRequest.Builder>
      Throws:
      IOException
    • getCatalog

      public String getCatalog()
       Full resource name of the catalog, such as
       `projects/*/locations/global/catalogs/default_catalog`.
       
      string catalog = 1 [(.google.api.resource_reference) = { ... }
      Specified by:
      getCatalog in interface SetDefaultBranchRequestOrBuilder
      Returns:
      The catalog.
    • getCatalogBytes

      public com.google.protobuf.ByteString getCatalogBytes()
       Full resource name of the catalog, such as
       `projects/*/locations/global/catalogs/default_catalog`.
       
      string catalog = 1 [(.google.api.resource_reference) = { ... }
      Specified by:
      getCatalogBytes in interface SetDefaultBranchRequestOrBuilder
      Returns:
      The bytes for catalog.
    • setCatalog

      public SetDefaultBranchRequest.Builder setCatalog(String value)
       Full resource name of the catalog, such as
       `projects/*/locations/global/catalogs/default_catalog`.
       
      string catalog = 1 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The catalog to set.
      Returns:
      This builder for chaining.
    • clearCatalog

      public SetDefaultBranchRequest.Builder clearCatalog()
       Full resource name of the catalog, such as
       `projects/*/locations/global/catalogs/default_catalog`.
       
      string catalog = 1 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setCatalogBytes

      public SetDefaultBranchRequest.Builder setCatalogBytes(com.google.protobuf.ByteString value)
       Full resource name of the catalog, such as
       `projects/*/locations/global/catalogs/default_catalog`.
       
      string catalog = 1 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for catalog to set.
      Returns:
      This builder for chaining.
    • getBranchId

      public String getBranchId()
       The final component of the resource name of a branch.
      
       This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
       error is returned.
      
       If there are no sufficient active products in the targeted branch and
       [force][google.cloud.retail.v2alpha.SetDefaultBranchRequest.force] is not
       set, a FAILED_PRECONDITION error is returned.
       
      string branch_id = 2 [(.google.api.resource_reference) = { ... }
      Specified by:
      getBranchId in interface SetDefaultBranchRequestOrBuilder
      Returns:
      The branchId.
    • getBranchIdBytes

      public com.google.protobuf.ByteString getBranchIdBytes()
       The final component of the resource name of a branch.
      
       This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
       error is returned.
      
       If there are no sufficient active products in the targeted branch and
       [force][google.cloud.retail.v2alpha.SetDefaultBranchRequest.force] is not
       set, a FAILED_PRECONDITION error is returned.
       
      string branch_id = 2 [(.google.api.resource_reference) = { ... }
      Specified by:
      getBranchIdBytes in interface SetDefaultBranchRequestOrBuilder
      Returns:
      The bytes for branchId.
    • setBranchId

      public SetDefaultBranchRequest.Builder setBranchId(String value)
       The final component of the resource name of a branch.
      
       This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
       error is returned.
      
       If there are no sufficient active products in the targeted branch and
       [force][google.cloud.retail.v2alpha.SetDefaultBranchRequest.force] is not
       set, a FAILED_PRECONDITION error is returned.
       
      string branch_id = 2 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The branchId to set.
      Returns:
      This builder for chaining.
    • clearBranchId

      public SetDefaultBranchRequest.Builder clearBranchId()
       The final component of the resource name of a branch.
      
       This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
       error is returned.
      
       If there are no sufficient active products in the targeted branch and
       [force][google.cloud.retail.v2alpha.SetDefaultBranchRequest.force] is not
       set, a FAILED_PRECONDITION error is returned.
       
      string branch_id = 2 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setBranchIdBytes

      public SetDefaultBranchRequest.Builder setBranchIdBytes(com.google.protobuf.ByteString value)
       The final component of the resource name of a branch.
      
       This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
       error is returned.
      
       If there are no sufficient active products in the targeted branch and
       [force][google.cloud.retail.v2alpha.SetDefaultBranchRequest.force] is not
       set, a FAILED_PRECONDITION error is returned.
       
      string branch_id = 2 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for branchId to set.
      Returns:
      This builder for chaining.
    • getNote

      public String getNote()
       Some note on this request, this can be retrieved by
       [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch]
       before next valid default branch set occurs.
      
       This field must be a UTF-8 encoded string with a length limit of 1,000
       characters. Otherwise, an INVALID_ARGUMENT error is returned.
       
      string note = 3;
      Specified by:
      getNote in interface SetDefaultBranchRequestOrBuilder
      Returns:
      The note.
    • getNoteBytes

      public com.google.protobuf.ByteString getNoteBytes()
       Some note on this request, this can be retrieved by
       [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch]
       before next valid default branch set occurs.
      
       This field must be a UTF-8 encoded string with a length limit of 1,000
       characters. Otherwise, an INVALID_ARGUMENT error is returned.
       
      string note = 3;
      Specified by:
      getNoteBytes in interface SetDefaultBranchRequestOrBuilder
      Returns:
      The bytes for note.
    • setNote

      public SetDefaultBranchRequest.Builder setNote(String value)
       Some note on this request, this can be retrieved by
       [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch]
       before next valid default branch set occurs.
      
       This field must be a UTF-8 encoded string with a length limit of 1,000
       characters. Otherwise, an INVALID_ARGUMENT error is returned.
       
      string note = 3;
      Parameters:
      value - The note to set.
      Returns:
      This builder for chaining.
    • clearNote

      public SetDefaultBranchRequest.Builder clearNote()
       Some note on this request, this can be retrieved by
       [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch]
       before next valid default branch set occurs.
      
       This field must be a UTF-8 encoded string with a length limit of 1,000
       characters. Otherwise, an INVALID_ARGUMENT error is returned.
       
      string note = 3;
      Returns:
      This builder for chaining.
    • setNoteBytes

      public SetDefaultBranchRequest.Builder setNoteBytes(com.google.protobuf.ByteString value)
       Some note on this request, this can be retrieved by
       [CatalogService.GetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.GetDefaultBranch]
       before next valid default branch set occurs.
      
       This field must be a UTF-8 encoded string with a length limit of 1,000
       characters. Otherwise, an INVALID_ARGUMENT error is returned.
       
      string note = 3;
      Parameters:
      value - The bytes for note to set.
      Returns:
      This builder for chaining.
    • getForce

      public boolean getForce()
       If set to true, it permits switching to a branch with
       [branch_id][google.cloud.retail.v2alpha.SetDefaultBranchRequest.branch_id]
       even if it has no sufficient active products.
       
      bool force = 4;
      Specified by:
      getForce in interface SetDefaultBranchRequestOrBuilder
      Returns:
      The force.
    • setForce

      public SetDefaultBranchRequest.Builder setForce(boolean value)
       If set to true, it permits switching to a branch with
       [branch_id][google.cloud.retail.v2alpha.SetDefaultBranchRequest.branch_id]
       even if it has no sufficient active products.
       
      bool force = 4;
      Parameters:
      value - The force to set.
      Returns:
      This builder for chaining.
    • clearForce

      public SetDefaultBranchRequest.Builder clearForce()
       If set to true, it permits switching to a branch with
       [branch_id][google.cloud.retail.v2alpha.SetDefaultBranchRequest.branch_id]
       even if it has no sufficient active products.
       
      bool force = 4;
      Returns:
      This builder for chaining.