Skip to content

Commit 2b6185d

Browse files
Google APIscopybara-github
authored andcommitted
feat: Publish Notification Service logging proto for documentation
PiperOrigin-RevId: 382838994
1 parent 8bdca74 commit 2b6185d

3 files changed

Lines changed: 74 additions & 3 deletions

File tree

google/cloud/saasaccelerator/management/logs/v1/BUILD.bazel

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ load("@rules_proto//proto:defs.bzl", "proto_library")
1111
proto_library(
1212
name = "logs_proto",
1313
srcs = [
14+
"notification_service_payload.proto",
1415
"saas_instance_payload.proto",
1516
],
16-
deps = [],
17+
deps = [
18+
"@com_google_protobuf//:timestamp_proto",
19+
],
1720
)
1821

1922
##############################################################################
@@ -65,7 +68,9 @@ load(
6568
moved_proto_library(
6669
name = "logs_moved_proto",
6770
srcs = [":logs_proto"],
68-
deps = [],
71+
deps = [
72+
"@com_google_protobuf//:timestamp_proto",
73+
],
6974
)
7075

7176
py_proto_library(
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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.saasaccelerator.management.logs.v1;
18+
19+
import "google/protobuf/timestamp.proto";
20+
21+
option go_package = "google.golang.org/genproto/googleapis/cloud/saasaccelerator/management/logs/v1;logs";
22+
option java_multiple_files = true;
23+
option java_outer_classname = "NotificationServicePayloadProto";
24+
option java_package = "com.google.cloud.saasaccelerator.management.logs.v1";
25+
26+
// Payload proto for Notification logs.
27+
message NotificationStage {
28+
// Types of Notification Status.
29+
enum Stage {
30+
// Default.
31+
STAGE_UNSPECIFIED = 0;
32+
33+
// Notification was sent.
34+
SENT = 1;
35+
36+
// Notification failed to send.
37+
SEND_FAILURE = 2;
38+
39+
// Notification was dropped.
40+
DROPPED = 3;
41+
}
42+
43+
// Event that triggered the notification.
44+
enum Event {
45+
// Default value.
46+
EVENT_UNSPECIFIED = 0;
47+
48+
// When a health status has been changed.
49+
HEALTH_STATUS_CHANGE = 1;
50+
}
51+
52+
// The type of the Notification Service event.
53+
Stage stage = 1;
54+
55+
// Time of the NotificationServiceEvent.
56+
google.protobuf.Timestamp event_time = 2;
57+
58+
// The id of the notification.
59+
string notification_id = 3;
60+
61+
// The event that triggered the notification.
62+
Event event = 4;
63+
64+
// Message to denote the error related to the event if applicable.
65+
string message = 5;
66+
}

google/cloud/saasaccelerator/management/logs/v1/saas_instance_payload.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)