// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package optimization_guide.proto;
import "components/optimization_guide/proto/features/common_quality_data.proto";
option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.optimization_guide.features.proto";
option java_outer_classname = "ProductSpecificationsProto";
// DO NOT EDIT THIS FILE DIRECTLY!
//
// This file is generated in g3 and then synced to Chrome. Instead, please
// refer to http://go/chrome-intelligence-feature-protos (Google-internal link),
// and then changes will be synced with Chrome automatically.
message ProductSpecificationsLoggingData {
ProductSpecificationsQuality quality = 3;
}
// Protos for the AiData representing the Product Specifications inference flow.
// Please note that this feature doesn't not use MES so there is no proto for
// request and response. Part of the model request and response are stored in
// the quality proto by Chrome client.
// Data logged for each Product Specifications table by client.
// Next ID: 4
message ProductSpecificationsQuality {
// The identifiers of the products that user is requesting product
// specifications for.
repeated ProductIdentifier product_identifiers = 1;
// The product specifications data returned from server that is used to render
// the product specifications table.
ProductSpecificationData product_specification_data = 2;
// Whether the user thumbs upped or downed the Product Specifications table.
UserFeedback user_feedback = 3;
}
// Information needed to identify a product.
// Next ID: 3
message ProductIdentifier {
// The GPC ID of the product.
uint64 gpc_id = 1;
// The URL of the product.
string product_url = 2;
}
// Next ID: 3
message ProductSpecificationData {
// List of specification section titles and their associated keys.
repeated ProductSpecificationSection product_specification_sections = 1;
// List of ProductSpecifications.
repeated ProductSpecification product_specifications = 2;
}
// Next ID: 3
message ProductSpecificationSection {
// Key identifying the section.
string key = 1;
// Title of the section.
string title = 2;
}
// Product metadata and per-product specifications.
// Next ID: 6
message ProductSpecification {
// Available identifier of the product specification.
ProductSpecificationIdentifiers identifiers = 1;
// Title of the product.
string title = 2;
// Image URL for the product thumbnail.
string image_url = 3;
// List of product specification values.
repeated ProductSpecificationValue product_specification_values = 4;
// Generated summary description for the product.
repeated DescriptionText summary_description = 5;
}
// Can contain any available identifiers for the product specification.
// Next ID: 3
message ProductSpecificationIdentifiers {
// Global Product Cluster ID.
uint64 gpc_id = 1;
// KG entity identifier (mid).
string mid = 2;
}
// Product specifications grouped into a Key-Factor with an optional summary.
// Next ID: 4
message ProductSpecificationValue {
// Key identifying the associated section.
string key = 1;
// List of specification descriptions. Preferred over "descriptions".
repeated ProductSpecificationDescription specification_descriptions = 2;
// Summary description across entire Key-Factor. Preferred over "summary".
repeated DescriptionText summary_description = 3;
}
// Descriptive text and associated metadata for a product specification value.
// Next ID: 5
message ProductSpecificationDescription {
repeated Option options = 1;
// Optional associated label or title for the text.
string label = 2;
// Optional alternative text with additional context for this description.
string alternative_text = 3;
// Associated attribute ID of the descriptive text.
string attribute_id = 4;
// Products can have several options available for an attribute.
// Examples are: Color, Installed Memory, Drive Capacity, Screen Size, etc.
message Option {
// Description texts for this product option. Multiple texts may be present.
// Substrings may have different citation URLs but these are typically 1:1.
repeated DescriptionText description = 1;
}
}
// Next ID: 3
message DescriptionText {
// Text to display.
string text = 1;
// Optional resource URLs for additional contexts related to this text.
// Citation URLs are one example.
repeated ReferenceUrl urls = 2;
message ReferenceUrl {
// URL of the reference, source, or citation.
string url = 1;
// Optional title text associated with the URL.
string title = 2;
// Optional favicon URL.
string favicon_url = 3;
// Optional thumbmnail image URL.
string thumbail_image_url = 4;
}
}