Add logging protos for Recommender v1beta1.
PiperOrigin-RevId: 303426030
This commit is contained in:
parent
48a166ce9f
commit
8eb444cf5f
|
|
@ -0,0 +1,162 @@
|
|||
# This file was automatically generated by BuildFileGenerator
|
||||
|
||||
# This is an API workspace, having public visibility by default makes perfect sense.
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
##############################################################################
|
||||
# Common
|
||||
##############################################################################
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
proto_library(
|
||||
name = "logging_proto",
|
||||
srcs = [
|
||||
"action_log.proto",
|
||||
],
|
||||
deps = [
|
||||
"//google/cloud/recommender/v1:recommender_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Java
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"java_grpc_library",
|
||||
"java_proto_library",
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "logging_java_proto",
|
||||
deps = [":logging_proto"],
|
||||
)
|
||||
|
||||
java_grpc_library(
|
||||
name = "logging_java_grpc",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [":logging_java_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Go
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"go_proto_library",
|
||||
)
|
||||
|
||||
go_proto_library(
|
||||
name = "logging_go_proto",
|
||||
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||
importpath = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1",
|
||||
protos = [":logging_proto"],
|
||||
deps = [
|
||||
"//google/cloud/recommender/v1:recommender_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Python
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"moved_proto_library",
|
||||
"py_grpc_library",
|
||||
"py_proto_library",
|
||||
)
|
||||
|
||||
moved_proto_library(
|
||||
name = "logging_moved_proto",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [
|
||||
"//google/cloud/recommender/v1:recommender_proto",
|
||||
],
|
||||
)
|
||||
|
||||
py_proto_library(
|
||||
name = "logging_py_proto",
|
||||
plugin = "@protoc_docs_plugin//:docs_plugin",
|
||||
deps = [":logging_moved_proto"],
|
||||
)
|
||||
|
||||
py_grpc_library(
|
||||
name = "logging_py_grpc",
|
||||
srcs = [":logging_moved_proto"],
|
||||
deps = [":logging_py_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# PHP
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"php_grpc_library",
|
||||
"php_proto_library",
|
||||
)
|
||||
|
||||
php_proto_library(
|
||||
name = "logging_php_proto",
|
||||
deps = [":logging_proto"],
|
||||
)
|
||||
|
||||
php_grpc_library(
|
||||
name = "logging_php_grpc",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [":logging_php_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Node.js
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"nodejs_gapic_assembly_pkg",
|
||||
"nodejs_gapic_library",
|
||||
)
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Ruby
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"ruby_grpc_library",
|
||||
"ruby_proto_library",
|
||||
)
|
||||
|
||||
ruby_proto_library(
|
||||
name = "logging_ruby_proto",
|
||||
deps = [":logging_proto"],
|
||||
)
|
||||
|
||||
ruby_grpc_library(
|
||||
name = "logging_ruby_grpc",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [":logging_ruby_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C#
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"csharp_grpc_library",
|
||||
"csharp_proto_library",
|
||||
)
|
||||
|
||||
csharp_proto_library(
|
||||
name = "logging_csharp_proto",
|
||||
deps = [":logging_proto"],
|
||||
)
|
||||
|
||||
csharp_grpc_library(
|
||||
name = "logging_csharp_grpc",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [":logging_csharp_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C++
|
||||
##############################################################################
|
||||
# Put your C++ code here
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
# This file was automatically generated by BuildFileGenerator
|
||||
|
||||
# This is an API workspace, having public visibility by default makes perfect sense.
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
##############################################################################
|
||||
# Common
|
||||
##############################################################################
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
proto_library(
|
||||
name = "logging_proto",
|
||||
srcs = [
|
||||
"action_log.proto",
|
||||
],
|
||||
deps = [
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/cloud/recommender/v1beta1:recommender_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Java
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"java_grpc_library",
|
||||
"java_proto_library",
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "logging_java_proto",
|
||||
deps = [":logging_proto"],
|
||||
)
|
||||
|
||||
java_grpc_library(
|
||||
name = "logging_java_grpc",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [":logging_java_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Go
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"go_proto_library",
|
||||
)
|
||||
|
||||
go_proto_library(
|
||||
name = "logging_go_proto",
|
||||
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||
importpath = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1beta1",
|
||||
protos = [":logging_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_go_proto",
|
||||
"//google/cloud/recommender/v1beta1:recommender_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Python
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"moved_proto_library",
|
||||
"py_grpc_library",
|
||||
"py_proto_library",
|
||||
)
|
||||
|
||||
moved_proto_library(
|
||||
name = "logging_moved_proto",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/cloud/recommender/v1beta1:recommender_proto",
|
||||
],
|
||||
)
|
||||
|
||||
py_proto_library(
|
||||
name = "logging_py_proto",
|
||||
plugin = "@protoc_docs_plugin//:docs_plugin",
|
||||
deps = [":logging_moved_proto"],
|
||||
)
|
||||
|
||||
py_grpc_library(
|
||||
name = "logging_py_grpc",
|
||||
srcs = [":logging_moved_proto"],
|
||||
deps = [":logging_py_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# PHP
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"php_grpc_library",
|
||||
"php_proto_library",
|
||||
)
|
||||
|
||||
php_proto_library(
|
||||
name = "logging_php_proto",
|
||||
deps = [":logging_proto"],
|
||||
)
|
||||
|
||||
php_grpc_library(
|
||||
name = "logging_php_grpc",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [":logging_php_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Node.js
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"nodejs_gapic_assembly_pkg",
|
||||
"nodejs_gapic_library",
|
||||
)
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Ruby
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"ruby_grpc_library",
|
||||
"ruby_proto_library",
|
||||
)
|
||||
|
||||
ruby_proto_library(
|
||||
name = "logging_ruby_proto",
|
||||
deps = [":logging_proto"],
|
||||
)
|
||||
|
||||
ruby_grpc_library(
|
||||
name = "logging_ruby_grpc",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [":logging_ruby_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C#
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"csharp_grpc_library",
|
||||
"csharp_proto_library",
|
||||
)
|
||||
|
||||
csharp_proto_library(
|
||||
name = "logging_csharp_proto",
|
||||
deps = [":logging_proto"],
|
||||
)
|
||||
|
||||
csharp_grpc_library(
|
||||
name = "logging_csharp_grpc",
|
||||
srcs = [":logging_proto"],
|
||||
deps = [":logging_csharp_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C++
|
||||
##############################################################################
|
||||
# Put your C++ code here
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.recommender.logging.v1beta1;
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/cloud/recommender/v1beta1/insight.proto";
|
||||
import "google/cloud/recommender/v1beta1/recommendation.proto";
|
||||
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/recommender/logging/v1beta1;logging";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ActionLogProto";
|
||||
option java_package = "com.google.cloud.recommender.logging.v1beta1";
|
||||
|
||||
// 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. State change that was made by the actor. Eg, SUCCEEDED.
|
||||
google.cloud.recommender.v1beta1.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'
|
||||
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.v1beta1.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/foo/locations/global/insightTypes/roleInsight/insights/i1'
|
||||
string insight = 4 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
type: google.api.Service
|
||||
config_version: 3
|
||||
name: recommender.googleapis.com
|
||||
title: Recommender API Logging
|
||||
|
||||
types:
|
||||
- name: google.cloud.recommender.logging.v1beta1.ActionLog
|
||||
- name: google.cloud.recommender.logging.v1beta1.InsightActionLog
|
||||
Loading…
Reference in New Issue