Class CatalogItem.CategoryHierarchy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CatalogItem.CategoryHierarchy.Builder>
com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy.Builder
All Implemented Interfaces:
CatalogItem.CategoryHierarchyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CatalogItem.CategoryHierarchy

public static final class CatalogItem.CategoryHierarchy.Builder extends com.google.protobuf.GeneratedMessage.Builder<CatalogItem.CategoryHierarchy.Builder> implements CatalogItem.CategoryHierarchyOrBuilder
 Category represents catalog item category hierarchy.
 
Protobuf type google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy
  • 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<CatalogItem.CategoryHierarchy.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<CatalogItem.CategoryHierarchy.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<CatalogItem.CategoryHierarchy.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

      public CatalogItem.CategoryHierarchy.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<CatalogItem.CategoryHierarchy.Builder>
      Throws:
      IOException
    • getCategoriesList

      public com.google.protobuf.ProtocolStringList getCategoriesList()
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCategoriesList in interface CatalogItem.CategoryHierarchyOrBuilder
      Returns:
      A list containing the categories.
    • getCategoriesCount

      public int getCategoriesCount()
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCategoriesCount in interface CatalogItem.CategoryHierarchyOrBuilder
      Returns:
      The count of categories.
    • getCategories

      public String getCategories(int index)
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCategories in interface CatalogItem.CategoryHierarchyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The categories at the given index.
    • getCategoriesBytes

      public com.google.protobuf.ByteString getCategoriesBytes(int index)
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCategoriesBytes in interface CatalogItem.CategoryHierarchyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the categories at the given index.
    • setCategories

      public CatalogItem.CategoryHierarchy.Builder setCategories(int index, String value)
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The categories to set.
      Returns:
      This builder for chaining.
    • addCategories

      public CatalogItem.CategoryHierarchy.Builder addCategories(String value)
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The categories to add.
      Returns:
      This builder for chaining.
    • addAllCategories

      public CatalogItem.CategoryHierarchy.Builder addAllCategories(Iterable<String> values)
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The categories to add.
      Returns:
      This builder for chaining.
    • clearCategories

      public CatalogItem.CategoryHierarchy.Builder clearCategories()
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addCategoriesBytes

      public CatalogItem.CategoryHierarchy.Builder addCategoriesBytes(com.google.protobuf.ByteString value)
       Required. Catalog item categories. Each category should be a UTF-8
       encoded string with a length limit of 2 KiB.
      
       Note that the order in the list denotes the specificity (from least to
       most specific).
       
      repeated string categories = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the categories to add.
      Returns:
      This builder for chaining.