common.proto 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.recommendationengine.v1beta1;
  16. import "google/api/annotations.proto";
  17. option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1";
  18. option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine";
  19. option java_multiple_files = true;
  20. option java_package = "com.google.cloud.recommendationengine.v1beta1";
  21. option objc_class_prefix = "RECAI";
  22. option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1";
  23. option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1";
  24. // FeatureMap represents extra features that customers want to include in the
  25. // recommendation model for catalogs/user events as categorical/numerical
  26. // features.
  27. message FeatureMap {
  28. // A list of string features.
  29. message StringList {
  30. // String feature value with a length limit of 128 bytes.
  31. repeated string value = 1;
  32. }
  33. // A list of float features.
  34. message FloatList {
  35. // Float feature value.
  36. repeated float value = 1;
  37. }
  38. // Categorical features that can take on one of a limited number of possible
  39. // values. Some examples would be the brand/maker of a product, or country of
  40. // a customer.
  41. //
  42. // Feature names and values must be UTF-8 encoded strings.
  43. //
  44. // For example: `{ "colors": {"value": ["yellow", "green"]},
  45. // "sizes": {"value":["S", "M"]}`
  46. map<string, StringList> categorical_features = 1;
  47. // Numerical features. Some examples would be the height/weight of a product,
  48. // or age of a customer.
  49. //
  50. // Feature names must be UTF-8 encoded strings.
  51. //
  52. // For example: `{ "lengths_cm": {"value":[2.3, 15.4]},
  53. // "heights_cm": {"value":[8.1, 6.4]} }`
  54. map<string, FloatList> numerical_features = 2;
  55. }