recommender_config.proto 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Copyright 2022 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.recommender.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/struct.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option csharp_namespace = "Google.Cloud.Recommender.V1Beta1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/v1beta1;recommender";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "RecommenderConfigProto";
  24. option java_package = "com.google.cloud.recommender.v1beta1";
  25. option objc_class_prefix = "CREC";
  26. // Configuration for a Recommender.
  27. message RecommenderConfig {
  28. option (google.api.resource) = {
  29. type: "recommender.googleapis.com/RecommenderConfig"
  30. pattern: "projects/{project}/locations/{location}/recommenders/{recommender}/config"
  31. pattern: "organizations/{organization}/locations/{location}/recommenders/{recommender}/config"
  32. };
  33. // Name of recommender config.
  34. // Eg,
  35. // projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
  36. string name = 1;
  37. // RecommenderGenerationConfig which configures the Generation of
  38. // recommendations for this recommender.
  39. RecommenderGenerationConfig recommender_generation_config = 2;
  40. // Fingerprint of the RecommenderConfig. Provides optimistic locking when
  41. // updating.
  42. string etag = 3;
  43. // Last time when the config was updated.
  44. google.protobuf.Timestamp update_time = 4;
  45. // Output only. Immutable. The revision ID of the config.
  46. // A new revision is committed whenever the config is changed in any way.
  47. // The format is an 8-character hexadecimal string.
  48. string revision_id = 5 [
  49. (google.api.field_behavior) = IMMUTABLE,
  50. (google.api.field_behavior) = OUTPUT_ONLY
  51. ];
  52. // Allows clients to store small amounts of arbitrary data. Annotations must
  53. // follow the Kubernetes syntax.
  54. // The total size of all keys and values combined is limited to 256k.
  55. // Key can have 2 segments: prefix (optional) and name (required),
  56. // separated by a slash (/).
  57. // Prefix must be a DNS subdomain.
  58. // Name must be 63 characters or less, begin and end with alphanumerics,
  59. // with dashes (-), underscores (_), dots (.), and alphanumerics between.
  60. map<string, string> annotations = 6;
  61. // A user-settable field to provide a human-readable name to be used in user
  62. // interfaces.
  63. string display_name = 7;
  64. }
  65. // A Configuration to customize the generation of recommendations.
  66. // Eg, customizing the lookback period considered when generating a
  67. // recommendation.
  68. message RecommenderGenerationConfig {
  69. // Parameters for this RecommenderGenerationConfig. These configs can be used
  70. // by or are applied to all subtypes.
  71. google.protobuf.Struct params = 1;
  72. }