common.proto 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. option csharp_namespace = "Google.Cloud.RecommendationEngine.V1Beta1";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/recommendationengine/v1beta1;recommendationengine";
  18. option java_multiple_files = true;
  19. option java_package = "com.google.cloud.recommendationengine.v1beta1";
  20. option objc_class_prefix = "RECAI";
  21. option php_namespace = "Google\\Cloud\\RecommendationEngine\\V1beta1";
  22. option ruby_package = "Google::Cloud::RecommendationEngine::V1beta1";
  23. // FeatureMap represents extra features that customers want to include in the
  24. // recommendation model for catalogs/user events as categorical/numerical
  25. // features.
  26. message FeatureMap {
  27. // A list of string features.
  28. message StringList {
  29. // String feature value with a length limit of 128 bytes.
  30. repeated string value = 1;
  31. }
  32. // A list of float features.
  33. message FloatList {
  34. // Float feature value.
  35. repeated float value = 1;
  36. }
  37. // Categorical features that can take on one of a limited number of possible
  38. // values. Some examples would be the brand/maker of a product, or country of
  39. // a customer.
  40. //
  41. // Feature names and values must be UTF-8 encoded strings.
  42. //
  43. // For example: `{ "colors": {"value": ["yellow", "green"]},
  44. // "sizes": {"value":["S", "M"]}`
  45. map<string, StringList> categorical_features = 1;
  46. // Numerical features. Some examples would be the height/weight of a product,
  47. // or age of a customer.
  48. //
  49. // Feature names must be UTF-8 encoded strings.
  50. //
  51. // For example: `{ "lengths_cm": {"value":[2.3, 15.4]},
  52. // "heights_cm": {"value":[8.1, 6.4]} }`
  53. map<string, FloatList> numerical_features = 2;
  54. }