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