Class Branch.QualityMetric

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.retail.v2alpha.Branch.QualityMetric
All Implemented Interfaces:
Branch.QualityMetricOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
Branch

public static final class Branch.QualityMetric extends com.google.protobuf.GeneratedMessage implements Branch.QualityMetricOrBuilder
 Metric measured on a group of
 [Product][google.cloud.retail.v2alpha.Product]s against a certain quality
 requirement. Contains the number of products that pass the check and the
 number of products that don't.
 
Protobuf type google.cloud.retail.v2alpha.Branch.QualityMetric
See Also:
  • Field Details

    • REQUIREMENT_KEY_FIELD_NUMBER

      public static final int REQUIREMENT_KEY_FIELD_NUMBER
      See Also:
    • QUALIFIED_PRODUCT_COUNT_FIELD_NUMBER

      public static final int QUALIFIED_PRODUCT_COUNT_FIELD_NUMBER
      See Also:
    • UNQUALIFIED_PRODUCT_COUNT_FIELD_NUMBER

      public static final int UNQUALIFIED_PRODUCT_COUNT_FIELD_NUMBER
      See Also:
    • SUGGESTED_QUALITY_PERCENT_THRESHOLD_FIELD_NUMBER

      public static final int SUGGESTED_QUALITY_PERCENT_THRESHOLD_FIELD_NUMBER
      See Also:
    • UNQUALIFIED_SAMPLE_PRODUCTS_FIELD_NUMBER

      public static final int UNQUALIFIED_SAMPLE_PRODUCTS_FIELD_NUMBER
      See Also:
  • 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
    • getRequirementKey

      public String getRequirementKey()
       The key that represents a quality requirement rule.
      
       Supported keys:
       * "has-valid-uri": product has a valid and accessible
       [uri][google.cloud.retail.v2alpha.Product.uri].
      
       * "available-expire-time-conformance":
       [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
       is early than "now", and
       [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
       greater than "now".
      
       * "has-searchable-attributes": product has at least one
       [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
       searchable.
      
       * "has-description": product has non-empty
       [description][google.cloud.retail.v2alpha.Product.description].
      
       * "has-at-least-bigram-title": Product
       [title][google.cloud.retail.v2alpha.Product.title] has at least two
       words. A comprehensive title helps to improve search quality.
      
       * "variant-has-image": the
       [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
       at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
       ignore this metric if all your products are at
       [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
      
       * "variant-has-price-info": the
       [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
       [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
       ignore this metric if all your products are at
       [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
      
       * "has-publish-time": product has non-empty
       [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
       
      string requirement_key = 1;
      Specified by:
      getRequirementKey in interface Branch.QualityMetricOrBuilder
      Returns:
      The requirementKey.
    • getRequirementKeyBytes

      public com.google.protobuf.ByteString getRequirementKeyBytes()
       The key that represents a quality requirement rule.
      
       Supported keys:
       * "has-valid-uri": product has a valid and accessible
       [uri][google.cloud.retail.v2alpha.Product.uri].
      
       * "available-expire-time-conformance":
       [Product.available_time][google.cloud.retail.v2alpha.Product.available_time]
       is early than "now", and
       [Product.expire_time][google.cloud.retail.v2alpha.Product.expire_time] is
       greater than "now".
      
       * "has-searchable-attributes": product has at least one
       [attribute][google.cloud.retail.v2alpha.Product.attributes] set to
       searchable.
      
       * "has-description": product has non-empty
       [description][google.cloud.retail.v2alpha.Product.description].
      
       * "has-at-least-bigram-title": Product
       [title][google.cloud.retail.v2alpha.Product.title] has at least two
       words. A comprehensive title helps to improve search quality.
      
       * "variant-has-image": the
       [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
       at least one [image][google.cloud.retail.v2alpha.Product.images]. You may
       ignore this metric if all your products are at
       [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
      
       * "variant-has-price-info": the
       [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] products has
       [price_info][google.cloud.retail.v2alpha.Product.price_info] set. You may
       ignore this metric if all your products are at
       [primary][google.cloud.retail.v2alpha.Product.Type.PRIMARY] level.
      
       * "has-publish-time": product has non-empty
       [publish_time][google.cloud.retail.v2alpha.Product.publish_time].
       
      string requirement_key = 1;
      Specified by:
      getRequirementKeyBytes in interface Branch.QualityMetricOrBuilder
      Returns:
      The bytes for requirementKey.
    • getQualifiedProductCount

      public int getQualifiedProductCount()
       Number of products passing the quality requirement check. We only check
       searchable products.
       
      int32 qualified_product_count = 2;
      Specified by:
      getQualifiedProductCount in interface Branch.QualityMetricOrBuilder
      Returns:
      The qualifiedProductCount.
    • getUnqualifiedProductCount

      public int getUnqualifiedProductCount()
       Number of products failing the quality requirement check. We only check
       searchable products.
       
      int32 unqualified_product_count = 3;
      Specified by:
      getUnqualifiedProductCount in interface Branch.QualityMetricOrBuilder
      Returns:
      The unqualifiedProductCount.
    • getSuggestedQualityPercentThreshold

      public double getSuggestedQualityPercentThreshold()
       Value from 0 to 100 representing the suggested percentage of products
       that meet the quality requirements to get good search and recommendation
       performance. 100 * (qualified_product_count) /
       (qualified_product_count + unqualified_product_count) should be greater
       or equal to this suggestion.
       
      double suggested_quality_percent_threshold = 4;
      Specified by:
      getSuggestedQualityPercentThreshold in interface Branch.QualityMetricOrBuilder
      Returns:
      The suggestedQualityPercentThreshold.
    • getUnqualifiedSampleProductsList

      public List<Product> getUnqualifiedSampleProductsList()
       A list of a maximum of 100 sample products that do not qualify for
       this requirement.
      
       This field is only populated in the response to
       [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
       API, and is always empty for
       [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
      
       Only the following fields are set in the
       [Product][google.cloud.retail.v2alpha.Product].
      
       * [Product.name][google.cloud.retail.v2alpha.Product.name]
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
       * [Product.title][google.cloud.retail.v2alpha.Product.title]
       
      repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;
      Specified by:
      getUnqualifiedSampleProductsList in interface Branch.QualityMetricOrBuilder
    • getUnqualifiedSampleProductsOrBuilderList

      public List<? extends ProductOrBuilder> getUnqualifiedSampleProductsOrBuilderList()
       A list of a maximum of 100 sample products that do not qualify for
       this requirement.
      
       This field is only populated in the response to
       [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
       API, and is always empty for
       [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
      
       Only the following fields are set in the
       [Product][google.cloud.retail.v2alpha.Product].
      
       * [Product.name][google.cloud.retail.v2alpha.Product.name]
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
       * [Product.title][google.cloud.retail.v2alpha.Product.title]
       
      repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;
      Specified by:
      getUnqualifiedSampleProductsOrBuilderList in interface Branch.QualityMetricOrBuilder
    • getUnqualifiedSampleProductsCount

      public int getUnqualifiedSampleProductsCount()
       A list of a maximum of 100 sample products that do not qualify for
       this requirement.
      
       This field is only populated in the response to
       [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
       API, and is always empty for
       [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
      
       Only the following fields are set in the
       [Product][google.cloud.retail.v2alpha.Product].
      
       * [Product.name][google.cloud.retail.v2alpha.Product.name]
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
       * [Product.title][google.cloud.retail.v2alpha.Product.title]
       
      repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;
      Specified by:
      getUnqualifiedSampleProductsCount in interface Branch.QualityMetricOrBuilder
    • getUnqualifiedSampleProducts

      public Product getUnqualifiedSampleProducts(int index)
       A list of a maximum of 100 sample products that do not qualify for
       this requirement.
      
       This field is only populated in the response to
       [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
       API, and is always empty for
       [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
      
       Only the following fields are set in the
       [Product][google.cloud.retail.v2alpha.Product].
      
       * [Product.name][google.cloud.retail.v2alpha.Product.name]
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
       * [Product.title][google.cloud.retail.v2alpha.Product.title]
       
      repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;
      Specified by:
      getUnqualifiedSampleProducts in interface Branch.QualityMetricOrBuilder
    • getUnqualifiedSampleProductsOrBuilder

      public ProductOrBuilder getUnqualifiedSampleProductsOrBuilder(int index)
       A list of a maximum of 100 sample products that do not qualify for
       this requirement.
      
       This field is only populated in the response to
       [BranchService.GetBranch][google.cloud.retail.v2alpha.BranchService.GetBranch]
       API, and is always empty for
       [BranchService.ListBranches][google.cloud.retail.v2alpha.BranchService.ListBranches].
      
       Only the following fields are set in the
       [Product][google.cloud.retail.v2alpha.Product].
      
       * [Product.name][google.cloud.retail.v2alpha.Product.name]
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
       * [Product.title][google.cloud.retail.v2alpha.Product.title]
       
      repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;
      Specified by:
      getUnqualifiedSampleProductsOrBuilder in interface Branch.QualityMetricOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Branch.QualityMetric parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Branch.QualityMetric parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Branch.QualityMetric parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Branch.QualityMetric parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Branch.QualityMetric parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Branch.QualityMetric parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Branch.QualityMetric parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Branch.QualityMetric parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Branch.QualityMetric parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Branch.QualityMetric parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Branch.QualityMetric parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Branch.QualityMetric parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Branch.QualityMetric.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Branch.QualityMetric.Builder newBuilder()
    • newBuilder

      public static Branch.QualityMetric.Builder newBuilder(Branch.QualityMetric prototype)
    • toBuilder

      public Branch.QualityMetric.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Branch.QualityMetric.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Branch.QualityMetric getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Branch.QualityMetric> parser()
    • getParserForType

      public com.google.protobuf.Parser<Branch.QualityMetric> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Branch.QualityMetric getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder