Skip to content

Commit 5bb7068

Browse files
Google APIscopybara-github
authored andcommitted
feat: added Secret Event proto
PiperOrigin-RevId: 365072980
1 parent ac1edac commit 5bb7068

2 files changed

Lines changed: 229 additions & 0 deletions

File tree

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
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+
"secret_event.proto",
15+
],
16+
deps = [
17+
],
18+
)
19+
20+
##############################################################################
21+
# Java
22+
##############################################################################
23+
load(
24+
"@com_google_googleapis_imports//:imports.bzl",
25+
"java_grpc_library",
26+
"java_proto_library",
27+
)
28+
29+
java_proto_library(
30+
name = "logging_java_proto",
31+
deps = [":logging_proto"],
32+
)
33+
34+
java_grpc_library(
35+
name = "logging_java_grpc",
36+
srcs = [":logging_proto"],
37+
deps = [":logging_java_proto"],
38+
)
39+
40+
##############################################################################
41+
# Go
42+
##############################################################################
43+
load(
44+
"@com_google_googleapis_imports//:imports.bzl",
45+
"go_proto_library",
46+
)
47+
48+
go_proto_library(
49+
name = "logging_go_proto",
50+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
51+
importpath = "google.golang.org/genproto/googleapis/cloud/secretmanager/logging/v1",
52+
protos = [":logging_proto"],
53+
deps = [
54+
],
55+
)
56+
57+
##############################################################################
58+
# Python
59+
##############################################################################
60+
load(
61+
"@com_google_googleapis_imports//:imports.bzl",
62+
"moved_proto_library",
63+
"py_grpc_library",
64+
"py_proto_library",
65+
)
66+
67+
moved_proto_library(
68+
name = "logging_moved_proto",
69+
srcs = [":logging_proto"],
70+
deps = [
71+
],
72+
)
73+
74+
py_proto_library(
75+
name = "logging_py_proto",
76+
plugin = "@protoc_docs_plugin//:docs_plugin",
77+
deps = [":logging_moved_proto"],
78+
)
79+
80+
py_grpc_library(
81+
name = "logging_py_grpc",
82+
srcs = [":logging_moved_proto"],
83+
deps = [":logging_py_proto"],
84+
)
85+
86+
##############################################################################
87+
# PHP
88+
##############################################################################
89+
load(
90+
"@com_google_googleapis_imports//:imports.bzl",
91+
"php_grpc_library",
92+
"php_proto_library",
93+
)
94+
95+
php_proto_library(
96+
name = "logging_php_proto",
97+
deps = [":logging_proto"],
98+
)
99+
100+
php_grpc_library(
101+
name = "logging_php_grpc",
102+
srcs = [":logging_proto"],
103+
deps = [":logging_php_proto"],
104+
)
105+
106+
##############################################################################
107+
# Node.js
108+
##############################################################################
109+
load(
110+
"@com_google_googleapis_imports//:imports.bzl",
111+
"nodejs_gapic_assembly_pkg",
112+
"nodejs_gapic_library",
113+
)
114+
115+
##############################################################################
116+
# Ruby
117+
##############################################################################
118+
load(
119+
"@com_google_googleapis_imports//:imports.bzl",
120+
"ruby_grpc_library",
121+
"ruby_proto_library",
122+
)
123+
124+
ruby_proto_library(
125+
name = "logging_ruby_proto",
126+
deps = [":logging_proto"],
127+
)
128+
129+
ruby_grpc_library(
130+
name = "logging_ruby_grpc",
131+
srcs = [":logging_proto"],
132+
deps = [":logging_ruby_proto"],
133+
)
134+
135+
##############################################################################
136+
# C#
137+
##############################################################################
138+
load(
139+
"@com_google_googleapis_imports//:imports.bzl",
140+
"csharp_grpc_library",
141+
"csharp_proto_library",
142+
)
143+
144+
csharp_proto_library(
145+
name = "logging_csharp_proto",
146+
deps = [":logging_proto"],
147+
)
148+
149+
csharp_grpc_library(
150+
name = "logging_csharp_grpc",
151+
srcs = [":logging_proto"],
152+
deps = [":logging_csharp_proto"],
153+
)
154+
155+
##############################################################################
156+
# C++
157+
##############################################################################
158+
# Put your C++ code here
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Copyright 2021 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.secretmanager.logging.v1;
18+
19+
option go_package = "google.golang.org/genproto/googleapis/cloud/secretmanager/logging/v1;logging";
20+
option java_multiple_files = true;
21+
option java_outer_classname = "SecretEventProto";
22+
option java_package = "com.google.cloud.secretmanager.logging.v1";
23+
option csharp_namespace = "Google.Cloud.SecretManager.Logging.V1";
24+
option php_namespace = "Google\\Cloud\\SecretManager\\Logging\\V1";
25+
option ruby_package = "Google::Cloud::SecretManager::Logging::V1";
26+
27+
// Logged event relating to a specific secret
28+
message SecretEvent {
29+
// Describes the type of event that is being logged. All logs have exactly one
30+
// EventType.
31+
enum EventType {
32+
// An unrecognized event type. Should never be used.
33+
EVENT_TYPE_UNSPECIFIED = 0;
34+
35+
// The secret is scheduled to expire in 30 days.
36+
EXPIRES_IN_30_DAYS = 1;
37+
38+
// The secret is scheduled to expire in 7 days.
39+
EXPIRES_IN_7_DAYS = 2;
40+
41+
// The secret is scheduled to expire in 1 day.
42+
EXPIRES_IN_1_DAY = 3;
43+
44+
// The secret is scheduled to expire in 6 hours.
45+
EXPIRES_IN_6_HOURS = 4;
46+
47+
// The secret is scheduled to expire in 1 hour.
48+
EXPIRES_IN_1_HOUR = 5;
49+
50+
// The secret's expire-time has passed and it has expired.
51+
EXPIRED = 6;
52+
53+
// A Pub/Sub topic configured on the secret could not be found.
54+
TOPIC_NOT_FOUND = 7;
55+
56+
// A Pub/Sub topic configured on the secret does not have the needed
57+
// permissions. The Secret Manager P4SA must be granted
58+
// 'pubsub.topic.publish' permission (or 'roles/pubsub.publisher') on the
59+
// topic.
60+
TOPIC_PERMISSION_DENIED = 8;
61+
}
62+
63+
// Resource name of the secret in the format `projects/*/secrets/*`
64+
string name = 1;
65+
66+
// Type of event that is being logged for the secret
67+
EventType type = 2;
68+
69+
// Human readable message describing the event
70+
string log_message = 3;
71+
}

0 commit comments

Comments
 (0)