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