Add insight logging protos to Recommender v1.

PiperOrigin-RevId: 320124233
This commit is contained in:
Google APIs 2020-07-07 21:55:34 -07:00 committed by Copybara-Service
parent c29c4c5196
commit 07460951fc
3 changed files with 33 additions and 4 deletions

View File

@ -14,6 +14,8 @@ proto_library(
"action_log.proto",
],
deps = [
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/cloud/recommender/v1:recommender_proto",
],
)
@ -52,6 +54,7 @@ go_proto_library(
importpath = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1",
protos = [":logging_proto"],
deps = [
"//google/api:annotations_go_proto",
"//google/cloud/recommender/v1:recommender_go_proto",
],
)
@ -70,6 +73,8 @@ moved_proto_library(
name = "logging_moved_proto",
srcs = [":logging_proto"],
deps = [
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/cloud/recommender/v1:recommender_proto",
],
)

View File

@ -16,6 +16,9 @@ syntax = "proto3";
package google.cloud.recommender.logging.v1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/recommender/v1/insight.proto";
import "google/cloud/recommender/v1/recommendation.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1;logging";
@ -23,19 +26,39 @@ option java_multiple_files = true;
option java_outer_classname = "ActionLogProto";
option java_package = "com.google.cloud.recommender.logging.v1";
// Log content of an action on a recommendation. This includes Mark* actions, as
// well as ApplyRule actions.
// Log content of an action on a recommendation. This includes Mark* actions.
message ActionLog {
// Required. User that executed this action. Eg, foo@gmail.com
string actor = 1;
// Required. Action that was taken by the actor. Eg, MarkCompleted.
// Required. State change that was made by the actor. Eg, SUCCEEDED.
google.cloud.recommender.v1.RecommendationStateInfo.State state = 2;
// Optional. Metadata that was included with the action that was taken.
map<string, string> state_metadata = 3;
// Required. Name of the recommendation which was acted on. Eg, :
// 'projects/foo/locations/global/recommenders/roleReco/recommendations/r1'
// 'projects/123/locations/global/recommenders/roleReco/recommendations/r1'
string recommendation_name = 4;
}
// Log content of an action on an insight. This includes Mark* actions.
message InsightActionLog {
// Required. User that executed this action. Eg, foo@gmail.com
string actor = 1 [(google.api.field_behavior) = REQUIRED];
// Required. State change that was made by the actor. Eg, ACCEPTED.
google.cloud.recommender.v1.InsightStateInfo.State state = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. Metadata that was included with the action that was taken.
map<string, string> state_metadata = 3 [(google.api.field_behavior) = OPTIONAL];
// Required. Name of the insight which was acted on. Eg, :
// 'projects/123/locations/global/insightTypes/roleInsight/insights/i1'
string insight = 4 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "recommender.googleapis.com/Insight"
}
];
}

View File

@ -5,3 +5,4 @@ title: Recommender API Logging
types:
- name: google.cloud.recommender.logging.v1.ActionLog
- name: google.cloud.recommender.logging.v1.InsightActionLog