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