Skip to content

Commit

Permalink
feat: add GetSettings and UpdateSettings methods at the Project-level…
Browse files Browse the repository at this point in the history
… to advisorynotifications.googleapis.com

docs: adding docs for new project level settings methods
PiperOrigin-RevId: 621647197
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 3, 2024
1 parent d6037e5 commit 39692d0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
13 changes: 12 additions & 1 deletion google/cloud/advisorynotifications/v1/BUILD.bazel
Expand Up @@ -9,14 +9,17 @@
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.

# buildifier: disable=load-on-top

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
# buildifier: disable=same-origin-load
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "advisorynotifications_proto",
Expand All @@ -42,6 +45,7 @@ proto_library_with_info(
##############################################################################
# Java
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
Expand Down Expand Up @@ -104,6 +108,7 @@ java_gapic_assembly_gradle_pkg(
##############################################################################
# Go
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
Expand Down Expand Up @@ -151,6 +156,7 @@ go_gapic_assembly_pkg(
##############################################################################
# Python
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
Expand Down Expand Up @@ -190,6 +196,7 @@ py_gapic_assembly_pkg(
##############################################################################
# PHP
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
Expand Down Expand Up @@ -227,6 +234,7 @@ php_gapic_assembly_pkg(
##############################################################################
# Node.js
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
Expand Down Expand Up @@ -257,6 +265,7 @@ nodejs_gapic_assembly_pkg(
##############################################################################
# Ruby
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
Expand Down Expand Up @@ -303,6 +312,7 @@ ruby_gapic_assembly_pkg(
##############################################################################
# C#
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
Expand Down Expand Up @@ -348,6 +358,7 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
Expand Down
20 changes: 15 additions & 5 deletions google/cloud/advisorynotifications/v1/service.proto
Expand Up @@ -68,6 +68,7 @@ service AdvisoryNotificationsService {
rpc GetSettings(GetSettingsRequest) returns (Settings) {
option (google.api.http) = {
get: "/v1/{name=organizations/*/locations/*/settings}"
additional_bindings { get: "/v1/{name=projects/*/locations/*/settings}" }
};
option (google.api.method_signature) = "name";
}
Expand All @@ -77,6 +78,10 @@ service AdvisoryNotificationsService {
option (google.api.http) = {
patch: "/v1/{settings.name=organizations/*/locations/*/settings}"
body: "settings"
additional_bindings {
patch: "/v1/{settings.name=projects/*/locations/*/settings}"
body: "settings"
}
};
option (google.api.method_signature) = "settings";
}
Expand Down Expand Up @@ -238,7 +243,7 @@ message Csv {
message ListNotificationsRequest {
// Required. The parent, which owns this collection of notifications.
// Must be of the form "organizations/{organization}/locations/{location}"
// or "projects/{project}/locations/{location}"
// or "projects/{project}/locations/{location}".
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -308,12 +313,16 @@ message Settings {
option (google.api.resource) = {
type: "advisorynotifications.googleapis.com/Settings"
pattern: "organizations/{organization}/locations/{location}/settings"
pattern: "projects/{project}/locations/{location}/settings"
plural: "settings"
singular: "settings"
};

// Output only. The resource name of the settings to retrieve.
// Identifier. The resource name of the settings to retrieve.
// Format:
// organizations/{organization}/locations/{location}/settings.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// organizations/{organization}/locations/{location}/settings or
// projects/{projects}/locations/{location}/settings.
string name = 1 [(google.api.field_behavior) = IDENTIFIER];

// Required. Map of each notification type and its settings to get/set all
// settings at once. The server will validate the value for each notification
Expand All @@ -338,7 +347,8 @@ message NotificationSettings {
message GetSettingsRequest {
// Required. The resource name of the settings to retrieve.
// Format:
// organizations/{organization}/locations/{location}/settings.
// organizations/{organization}/locations/{location}/settings or
// projects/{projects}/locations/{location}/settings.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down

0 comments on commit 39692d0

Please sign in to comment.