Skip to content

Commit

Permalink
feat: adding project level methods to advisorynotifications.googleapi…
Browse files Browse the repository at this point in the history
…s.com

docs: adding docs for new project level methods

adding GetNotification and ListNotifications methods for notifications parented at the project level

PiperOrigin-RevId: 588795150
  • Loading branch information
Google APIs authored and Copybara-Service committed Dec 7, 2023
1 parent 37b411a commit 967b05b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
4 changes: 1 addition & 3 deletions google/cloud/advisorynotifications/v1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ proto_library_with_info(
name = "advisorynotifications_proto_with_info",
deps = [
":advisorynotifications_proto",
"//google/cloud:common_resources_proto",
],
)

Expand Down Expand Up @@ -314,7 +313,6 @@ load(

csharp_proto_library(
name = "advisorynotifications_csharp_proto",
extra_opts = [],
deps = [":advisorynotifications_proto"],
)

Expand All @@ -327,10 +325,10 @@ csharp_grpc_library(
csharp_gapic_library(
name = "advisorynotifications_csharp_gapic",
srcs = [":advisorynotifications_proto_with_info"],
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = "advisorynotifications_v1_grpc_service_config.json",
rest_numeric_enums = True,
service_yaml = "advisorynotifications_v1.yaml",
transport = "grpc+rest",
deps = [
":advisorynotifications_csharp_grpc",
":advisorynotifications_csharp_proto",
Expand Down
17 changes: 14 additions & 3 deletions google/cloud/advisorynotifications/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ option ruby_package = "Google::Cloud::AdvisoryNotifications::V1";
option (google.api.resource_definition) = {
type: "advisorynotifications.googleapis.com/Location"
pattern: "organizations/{organization}/locations/{location}"
pattern: "projects/{project}/locations/{location}"
};

// Service to manage Security and Privacy Notifications.
Expand All @@ -45,6 +46,9 @@ service AdvisoryNotificationsService {
returns (ListNotificationsResponse) {
option (google.api.http) = {
get: "/v1/{parent=organizations/*/locations/*}/notifications"
additional_bindings {
get: "/v1/{parent=projects/*/locations/*}/notifications"
}
};
option (google.api.method_signature) = "parent";
}
Expand All @@ -53,6 +57,9 @@ service AdvisoryNotificationsService {
rpc GetNotification(GetNotificationRequest) returns (Notification) {
option (google.api.http) = {
get: "/v1/{name=organizations/*/locations/*/notifications/*}"
additional_bindings {
get: "/v1/{name=projects/*/locations/*/notifications/*}"
}
};
option (google.api.method_signature) = "name";
}
Expand Down Expand Up @@ -133,13 +140,15 @@ message Notification {
option (google.api.resource) = {
type: "advisorynotifications.googleapis.com/Notification"
pattern: "organizations/{organization}/locations/{location}/notifications/{notification}"
pattern: "projects/{project}/locations/{location}/notifications/{notification}"
plural: "notifications"
singular: "notification"
};

// The resource name of the notification.
// Format:
// organizations/{organization}/locations/{location}/notifications/{notification}.
// organizations/{organization}/locations/{location}/notifications/{notification}
// or projects/{project}/locations/{location}/notifications/{notification}.
string name = 1;

// The subject line of the notification.
Expand Down Expand Up @@ -228,7 +237,8 @@ message Csv {
// Request for fetching all notifications for a given parent.
message ListNotificationsRequest {
// Required. The parent, which owns this collection of notifications.
// Must be of the form "organizations/{organization}/locations/{location}".
// Must be of the form "organizations/{organization}/locations/{location}"
// or "projects/{project}/locations/{location}"
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -276,7 +286,8 @@ message ListNotificationsResponse {
message GetNotificationRequest {
// Required. A name of the notification to retrieve.
// Format:
// organizations/{organization}/locations/{location}/notifications/{notification}.
// organizations/{organization}/locations/{location}/notifications/{notification}
// or projects/{projects}/locations/{location}/notifications/{notification}.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down

0 comments on commit 967b05b

Please sign in to comment.