Skip to content

Commit a17e9d5

Browse files
Google APIscopybara-github
authored andcommitted
feat: add Workstations platform logging schema
PiperOrigin-RevId: 517239411
1 parent 98c303c commit a17e9d5

2 files changed

Lines changed: 233 additions & 0 deletions

File tree

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# This file was automatically generated by BuildFileGenerator
2+
3+
# This is an API workspace, having public visibility by default makes perfect sense.
4+
package(default_visibility = ["//visibility:public"])
5+
6+
##############################################################################
7+
# Common
8+
##############################################################################
9+
load("@rules_proto//proto:defs.bzl", "proto_library")
10+
11+
proto_library(
12+
name = "logging_proto",
13+
srcs = [
14+
"platform_logs.proto",
15+
],
16+
deps = [],
17+
)
18+
19+
##############################################################################
20+
# Java
21+
##############################################################################
22+
load(
23+
"@com_google_googleapis_imports//:imports.bzl",
24+
"java_grpc_library",
25+
"java_proto_library",
26+
)
27+
28+
java_proto_library(
29+
name = "logging_java_proto",
30+
deps = [":logging_proto"],
31+
)
32+
33+
java_grpc_library(
34+
name = "logging_java_grpc",
35+
srcs = [":logging_proto"],
36+
deps = [":logging_java_proto"],
37+
)
38+
39+
##############################################################################
40+
# Go
41+
##############################################################################
42+
load(
43+
"@com_google_googleapis_imports//:imports.bzl",
44+
"go_proto_library",
45+
"go_gapic_assembly_pkg",
46+
)
47+
48+
go_proto_library(
49+
name = "logging_go_proto",
50+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
51+
importpath = "cloud.google.com/go/workstations/logging/apiv1/loggingpb",
52+
protos = [":logging_proto"],
53+
deps = [],
54+
)
55+
56+
go_gapic_assembly_pkg(
57+
name = "logging-v1-go",
58+
deps = [
59+
":logging_go_proto",
60+
],
61+
)
62+
63+
##############################################################################
64+
# Python
65+
##############################################################################
66+
load(
67+
"@com_google_googleapis_imports//:imports.bzl",
68+
"moved_proto_library",
69+
"py_grpc_library",
70+
"py_proto_library",
71+
)
72+
73+
moved_proto_library(
74+
name = "logging_moved_proto",
75+
srcs = [":logging_proto"],
76+
deps = [],
77+
)
78+
79+
py_proto_library(
80+
name = "logging_py_proto",
81+
deps = [":logging_moved_proto"],
82+
)
83+
84+
py_grpc_library(
85+
name = "logging_py_grpc",
86+
srcs = [":logging_moved_proto"],
87+
deps = [":logging_py_proto"],
88+
)
89+
90+
##############################################################################
91+
# PHP
92+
##############################################################################
93+
load(
94+
"@com_google_googleapis_imports//:imports.bzl",
95+
"php_gapic_assembly_pkg",
96+
"php_grpc_library",
97+
"php_proto_library",
98+
)
99+
100+
php_proto_library(
101+
name = "logging_php_proto",
102+
deps = [":logging_proto"],
103+
)
104+
105+
php_grpc_library(
106+
name = "logging_php_grpc",
107+
srcs = [":logging_proto"],
108+
deps = [":logging_php_proto"],
109+
)
110+
111+
php_gapic_assembly_pkg(
112+
name = "logging-v1-php",
113+
deps = [
114+
":logging_php_proto",
115+
],
116+
)
117+
118+
##############################################################################
119+
# Node.js
120+
##############################################################################
121+
load(
122+
"@com_google_googleapis_imports//:imports.bzl",
123+
"nodejs_gapic_assembly_pkg",
124+
"nodejs_gapic_library",
125+
)
126+
127+
128+
##############################################################################
129+
# Ruby
130+
##############################################################################
131+
load(
132+
"@com_google_googleapis_imports//:imports.bzl",
133+
"ruby_grpc_library",
134+
"ruby_proto_library",
135+
)
136+
137+
ruby_proto_library(
138+
name = "logging_ruby_proto",
139+
deps = [":logging_proto"],
140+
)
141+
142+
ruby_grpc_library(
143+
name = "logging_ruby_grpc",
144+
srcs = [":logging_proto"],
145+
deps = [":logging_ruby_proto"],
146+
)
147+
148+
##############################################################################
149+
# C#
150+
##############################################################################
151+
load(
152+
"@com_google_googleapis_imports//:imports.bzl",
153+
"csharp_grpc_library",
154+
"csharp_proto_library",
155+
)
156+
157+
csharp_proto_library(
158+
name = "logging_csharp_proto",
159+
deps = [":logging_proto"],
160+
)
161+
162+
csharp_grpc_library(
163+
name = "logging_csharp_grpc",
164+
srcs = [":logging_proto"],
165+
deps = [":logging_csharp_proto"],
166+
)
167+
168+
##############################################################################
169+
# C++
170+
##############################################################################
171+
load(
172+
"@com_google_googleapis_imports//:imports.bzl",
173+
"cc_grpc_library",
174+
"cc_proto_library",
175+
)
176+
177+
cc_proto_library(
178+
name = "logging_cc_proto",
179+
deps = [":logging_proto"],
180+
)
181+
182+
cc_grpc_library(
183+
name = "logging_cc_grpc",
184+
srcs = [":logging_proto"],
185+
grpc_only = True,
186+
deps = [":logging_cc_proto"],
187+
)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
15+
syntax = "proto3";
16+
17+
package google.cloud.workstations.logging.v1;
18+
19+
option go_package = "cloud.google.com/go/workstations/logging/apiv1/loggingpb;loggingpb";
20+
option java_multiple_files = true;
21+
option java_outer_classname = "PlatformLogsProto";
22+
option java_package = "com.google.cloud.workstations.logging.v1";
23+
24+
// JSON payload for the Cloud Logging event:
25+
// `workstations.googleapis.com%2Fworkstation_events`
26+
message WorkstationEvent {
27+
oneof event_type {
28+
// Vm assignment event.
29+
VmAssignmentEvent vm_assignment_event = 1;
30+
31+
// Disk assignment event.
32+
DiskAssignmentEvent disk_assignment_event = 2;
33+
}
34+
}
35+
36+
// Vm assignment event.
37+
message VmAssignmentEvent {
38+
// Name of the VM assigned to this workstation.
39+
string vm = 1;
40+
}
41+
42+
// Disk assignment event.
43+
message DiskAssignmentEvent {
44+
// Name of the disk assigned to this workstation.
45+
string disk = 1;
46+
}

0 commit comments

Comments
 (0)