Skip to content

Commit 967b05b

Browse files
Google APIscopybara-github
authored andcommitted
feat: adding project level methods to advisorynotifications.googleapis.com
docs: adding docs for new project level methods adding GetNotification and ListNotifications methods for notifications parented at the project level PiperOrigin-RevId: 588795150
1 parent 37b411a commit 967b05b

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

google/cloud/advisorynotifications/v1/BUILD.bazel

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ proto_library_with_info(
3636
name = "advisorynotifications_proto_with_info",
3737
deps = [
3838
":advisorynotifications_proto",
39-
"//google/cloud:common_resources_proto",
4039
],
4140
)
4241

@@ -314,7 +313,6 @@ load(
314313

315314
csharp_proto_library(
316315
name = "advisorynotifications_csharp_proto",
317-
extra_opts = [],
318316
deps = [":advisorynotifications_proto"],
319317
)
320318

@@ -327,10 +325,10 @@ csharp_grpc_library(
327325
csharp_gapic_library(
328326
name = "advisorynotifications_csharp_gapic",
329327
srcs = [":advisorynotifications_proto_with_info"],
330-
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
331328
grpc_service_config = "advisorynotifications_v1_grpc_service_config.json",
332329
rest_numeric_enums = True,
333330
service_yaml = "advisorynotifications_v1.yaml",
331+
transport = "grpc+rest",
334332
deps = [
335333
":advisorynotifications_csharp_grpc",
336334
":advisorynotifications_csharp_proto",

google/cloud/advisorynotifications/v1/service.proto

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ option ruby_package = "Google::Cloud::AdvisoryNotifications::V1";
3232
option (google.api.resource_definition) = {
3333
type: "advisorynotifications.googleapis.com/Location"
3434
pattern: "organizations/{organization}/locations/{location}"
35+
pattern: "projects/{project}/locations/{location}"
3536
};
3637

3738
// Service to manage Security and Privacy Notifications.
@@ -45,6 +46,9 @@ service AdvisoryNotificationsService {
4546
returns (ListNotificationsResponse) {
4647
option (google.api.http) = {
4748
get: "/v1/{parent=organizations/*/locations/*}/notifications"
49+
additional_bindings {
50+
get: "/v1/{parent=projects/*/locations/*}/notifications"
51+
}
4852
};
4953
option (google.api.method_signature) = "parent";
5054
}
@@ -53,6 +57,9 @@ service AdvisoryNotificationsService {
5357
rpc GetNotification(GetNotificationRequest) returns (Notification) {
5458
option (google.api.http) = {
5559
get: "/v1/{name=organizations/*/locations/*/notifications/*}"
60+
additional_bindings {
61+
get: "/v1/{name=projects/*/locations/*/notifications/*}"
62+
}
5663
};
5764
option (google.api.method_signature) = "name";
5865
}
@@ -133,13 +140,15 @@ message Notification {
133140
option (google.api.resource) = {
134141
type: "advisorynotifications.googleapis.com/Notification"
135142
pattern: "organizations/{organization}/locations/{location}/notifications/{notification}"
143+
pattern: "projects/{project}/locations/{location}/notifications/{notification}"
136144
plural: "notifications"
137145
singular: "notification"
138146
};
139147

140148
// The resource name of the notification.
141149
// Format:
142-
// organizations/{organization}/locations/{location}/notifications/{notification}.
150+
// organizations/{organization}/locations/{location}/notifications/{notification}
151+
// or projects/{project}/locations/{location}/notifications/{notification}.
143152
string name = 1;
144153

145154
// The subject line of the notification.
@@ -228,7 +237,8 @@ message Csv {
228237
// Request for fetching all notifications for a given parent.
229238
message ListNotificationsRequest {
230239
// Required. The parent, which owns this collection of notifications.
231-
// Must be of the form "organizations/{organization}/locations/{location}".
240+
// Must be of the form "organizations/{organization}/locations/{location}"
241+
// or "projects/{project}/locations/{location}"
232242
string parent = 1 [
233243
(google.api.field_behavior) = REQUIRED,
234244
(google.api.resource_reference) = {
@@ -276,7 +286,8 @@ message ListNotificationsResponse {
276286
message GetNotificationRequest {
277287
// Required. A name of the notification to retrieve.
278288
// Format:
279-
// organizations/{organization}/locations/{location}/notifications/{notification}.
289+
// organizations/{organization}/locations/{location}/notifications/{notification}
290+
// or projects/{projects}/locations/{location}/notifications/{notification}.
280291
string name = 1 [
281292
(google.api.field_behavior) = REQUIRED,
282293
(google.api.resource_reference) = {

0 commit comments

Comments
 (0)