Class Branch.QualityMetric (2.48.0)

public static final class Branch.QualityMetric extends GeneratedMessageV3 implements Branch.QualityMetricOrBuilder

Metric measured on a group of Products 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

Static Fields

QUALIFIED_PRODUCT_COUNT_FIELD_NUMBER

public static final int QUALIFIED_PRODUCT_COUNT_FIELD_NUMBER
Field Value
Type Description
int

REQUIREMENT_KEY_FIELD_NUMBER

public static final int REQUIREMENT_KEY_FIELD_NUMBER
Field Value
Type Description
int

SUGGESTED_QUALITY_PERCENT_THRESHOLD_FIELD_NUMBER

public static final int SUGGESTED_QUALITY_PERCENT_THRESHOLD_FIELD_NUMBER
Field Value
Type Description
int

UNQUALIFIED_PRODUCT_COUNT_FIELD_NUMBER

public static final int UNQUALIFIED_PRODUCT_COUNT_FIELD_NUMBER
Field Value
Type Description
int

UNQUALIFIED_SAMPLE_PRODUCTS_FIELD_NUMBER

public static final int UNQUALIFIED_SAMPLE_PRODUCTS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Branch.QualityMetric getDefaultInstance()
Returns
Type Description
Branch.QualityMetric

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Branch.QualityMetric.Builder newBuilder()
Returns
Type Description
Branch.QualityMetric.Builder

newBuilder(Branch.QualityMetric prototype)

public static Branch.QualityMetric.Builder newBuilder(Branch.QualityMetric prototype)
Parameter
Name Description
prototype Branch.QualityMetric
Returns
Type Description
Branch.QualityMetric.Builder

parseDelimitedFrom(InputStream input)

public static Branch.QualityMetric parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Branch.QualityMetric parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Branch.QualityMetric parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Branch.QualityMetric parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Branch.QualityMetric parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Branch.QualityMetric parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Branch.QualityMetric parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Branch.QualityMetric parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Branch.QualityMetric parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Branch.QualityMetric parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Branch.QualityMetric parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Branch.QualityMetric parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Branch.QualityMetric
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Branch.QualityMetric> parser()
Returns
Type Description
Parser<QualityMetric>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Branch.QualityMetric getDefaultInstanceForType()
Returns
Type Description
Branch.QualityMetric

getParserForType()

public Parser<Branch.QualityMetric> getParserForType()
Returns
Type Description
Parser<QualityMetric>
Overrides

getQualifiedProductCount()

public int getQualifiedProductCount()

Number of products passing the quality requirement check. We only check searchable products.

int32 qualified_product_count = 2;

Returns
Type Description
int

The qualifiedProductCount.

getRequirementKey()

public String getRequirementKey()

The key that represents a quality requirement rule.

Supported keys:

  • "has-valid-uri": product has a valid and accessible uri.

  • "available-expire-time-conformance": Product.available_time is early than "now", and Product.expire_time is greater than "now".

  • "has-searchable-attributes": product has at least one attribute set to searchable.

  • "has-description": product has non-empty description.

  • "has-at-least-bigram-title": Product title has at least two words. A comprehensive title helps to improve search quality.

  • "variant-has-image": the variant products has at least one image. You may ignore this metric if all your products are at primary level.

  • "variant-has-price-info": the variant products has price_info set. You may ignore this metric if all your products are at primary level.

  • "has-publish-time": product has non-empty publish_time.

string requirement_key = 1;

Returns
Type Description
String

The requirementKey.

getRequirementKeyBytes()

public ByteString getRequirementKeyBytes()

The key that represents a quality requirement rule.

Supported keys:

  • "has-valid-uri": product has a valid and accessible uri.

  • "available-expire-time-conformance": Product.available_time is early than "now", and Product.expire_time is greater than "now".

  • "has-searchable-attributes": product has at least one attribute set to searchable.

  • "has-description": product has non-empty description.

  • "has-at-least-bigram-title": Product title has at least two words. A comprehensive title helps to improve search quality.

  • "variant-has-image": the variant products has at least one image. You may ignore this metric if all your products are at primary level.

  • "variant-has-price-info": the variant products has price_info set. You may ignore this metric if all your products are at primary level.

  • "has-publish-time": product has non-empty publish_time.

string requirement_key = 1;

Returns
Type Description
ByteString

The bytes for requirementKey.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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;

Returns
Type Description
double

The suggestedQualityPercentThreshold.

getUnqualifiedProductCount()

public int getUnqualifiedProductCount()

Number of products failing the quality requirement check. We only check searchable products.

int32 unqualified_product_count = 3;

Returns
Type Description
int

The unqualifiedProductCount.

getUnqualifiedSampleProducts(int index)

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 API, and is always empty for BranchService.ListBranches.

Only the following fields are set in the Product.

  • Product.name
  • Product.id
  • Product.title

repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;

Parameter
Name Description
index int
Returns
Type Description
Product

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 API, and is always empty for BranchService.ListBranches.

Only the following fields are set in the Product.

  • Product.name
  • Product.id
  • Product.title

repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;

Returns
Type Description
int

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 API, and is always empty for BranchService.ListBranches.

Only the following fields are set in the Product.

  • Product.name
  • Product.id
  • Product.title

repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;

Returns
Type Description
List<Product>

getUnqualifiedSampleProductsOrBuilder(int index)

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 API, and is always empty for BranchService.ListBranches.

Only the following fields are set in the Product.

  • Product.name
  • Product.id
  • Product.title

repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;

Parameter
Name Description
index int
Returns
Type Description
ProductOrBuilder

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 API, and is always empty for BranchService.ListBranches.

Only the following fields are set in the Product.

  • Product.name
  • Product.id
  • Product.title

repeated .google.cloud.retail.v2alpha.Product unqualified_sample_products = 5;

Returns
Type Description
List<? extends com.google.cloud.retail.v2alpha.ProductOrBuilder>

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Branch.QualityMetric.Builder newBuilderForType()
Returns
Type Description
Branch.QualityMetric.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Branch.QualityMetric.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Branch.QualityMetric.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Branch.QualityMetric.Builder toBuilder()
Returns
Type Description
Branch.QualityMetric.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException