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 15syntax = "proto3"; 16 17package google.cloud.recommender.logging.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/cloud/recommender/v1/insight.proto"; 22import "google/cloud/recommender/v1/recommendation.proto"; 23 24option go_package = "cloud.google.com/go/recommender/logging/apiv1/loggingpb;loggingpb"; 25option java_multiple_files = true; 26option java_outer_classname = "ActionLogProto"; 27option java_package = "com.google.cloud.recommender.logging.v1"; 28 29// Log content of an action on a recommendation. This includes Mark* actions. 30message ActionLog { 31 // Required. User that executed this action. Eg, [email protected] 32 string actor = 1; 33 34 // Required. State change that was made by the actor. Eg, SUCCEEDED. 35 google.cloud.recommender.v1.RecommendationStateInfo.State state = 2; 36 37 // Optional. Metadata that was included with the action that was taken. 38 map<string, string> state_metadata = 3; 39 40 // Required. Name of the recommendation which was acted on. Eg, : 41 // 'projects/123/locations/global/recommenders/roleReco/recommendations/r1' 42 string recommendation_name = 4; 43} 44 45// Log content of an action on an insight. This includes Mark* actions. 46message InsightActionLog { 47 // Required. User that executed this action. Eg, [email protected] 48 string actor = 1 [(google.api.field_behavior) = REQUIRED]; 49 50 // Required. State change that was made by the actor. Eg, ACCEPTED. 51 google.cloud.recommender.v1.InsightStateInfo.State state = 2 [(google.api.field_behavior) = REQUIRED]; 52 53 // Optional. Metadata that was included with the action that was taken. 54 map<string, string> state_metadata = 3 [(google.api.field_behavior) = OPTIONAL]; 55 56 // Required. Name of the insight which was acted on. Eg, : 57 // 'projects/123/locations/global/insightTypes/roleInsight/insights/i1' 58 string insight = 4 [ 59 (google.api.field_behavior) = REQUIRED, 60 (google.api.resource_reference) = { 61 type: "recommender.googleapis.com/Insight" 62 } 63 ]; 64} 65