histogram.proto 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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.talent.v4;
  16. import "google/api/annotations.proto";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4;talent";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "HistogramProto";
  20. option java_package = "com.google.cloud.talent.v4";
  21. option objc_class_prefix = "CTS";
  22. // The histogram request.
  23. message HistogramQuery {
  24. // An expression specifies a histogram request against matching jobs for
  25. // searches.
  26. //
  27. // See [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] for details about syntax.
  28. string histogram_query = 1;
  29. }
  30. // Histogram result that matches [HistogramQuery][google.cloud.talent.v4.HistogramQuery] specified in searches.
  31. message HistogramQueryResult {
  32. // Requested histogram expression.
  33. string histogram_query = 1;
  34. // A map from the values of the facet associated with distinct values to the
  35. // number of matching entries with corresponding value.
  36. //
  37. // The key format is:
  38. //
  39. // * (for string histogram) string values stored in the field.
  40. // * (for named numeric bucket) name specified in `bucket()` function, like
  41. // for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
  42. // * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
  43. // example, `0-1000`, `MIN-0`, and `0-MAX`.
  44. map<string, int64> histogram = 2;
  45. }