Skip to content

Commit

Permalink
build: [advisorynotifications] update typescript generator version to…
Browse files Browse the repository at this point in the history
… publish in dual format (ESM) (#4698)

* feat: add new RPCs GetSettings, UpdateSettings and new messages Settings, NotificationSettings, GetSettingsRequest, UpdateSettingsRequest

PiperOrigin-RevId: 568252764

Source-Link: googleapis/googleapis@c981bf5

Source-Link: googleapis/googleapis-gen@a37d28d
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFkdmlzb3J5bm90aWZpY2F0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiYTM3ZDI4ZGFjYmNkMThmYWY1Mjk3ZDJmZGZhZTI5ZmVhMDBkOTZiZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* build: update typescript generator version to publish in dual format (ESM)

PiperOrigin-RevId: 568643156

Source-Link: googleapis/googleapis@f95afc0

Source-Link: googleapis/googleapis-gen@bbd2c49
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFkdmlzb3J5bm90aWZpY2F0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiYmJkMmM0OWQyZTQyM2E4Y2U1Y2M4NTYyNzQwMmQ1MTJhZWVmYzU4YiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Sep 27, 2023
1 parent ffec6b4 commit 986a114
Show file tree
Hide file tree
Showing 13 changed files with 2,430 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/google-cloud-advisorynotifications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Advisory_notifications_service.get_notification | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_notification.js,packages/google-cloud-advisorynotifications/samples/README.md) |
| Advisory_notifications_service.get_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.get_settings.js,packages/google-cloud-advisorynotifications/samples/README.md) |
| Advisory_notifications_service.list_notifications | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.list_notifications.js,packages/google-cloud-advisorynotifications/samples/README.md) |
| Advisory_notifications_service.update_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.update_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/generated/v1/advisory_notifications_service.update_settings.js,packages/google-cloud-advisorynotifications/samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-advisorynotifications/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-advisorynotifications/samples/quickstart.js,packages/google-cloud-advisorynotifications/samples/README.md) |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,23 @@ service AdvisoryNotificationsService {
};
option (google.api.method_signature) = "name";
}

// Get notification settings.
rpc GetSettings(GetSettingsRequest) returns (Settings) {
option (google.api.http) = {
get: "/v1/{name=organizations/*/locations/*/settings}"
};
option (google.api.method_signature) = "name";
}

// Update notification settings.
rpc UpdateSettings(UpdateSettingsRequest) returns (Settings) {
option (google.api.http) = {
patch: "/v1/{settings.name=organizations/*/locations/*/settings}"
body: "settings"
};
option (google.api.method_signature) = "settings";
}
}

// Notification view.
Expand Down Expand Up @@ -274,3 +291,53 @@ message GetNotificationRequest {
// this RPC will throw an error.
string language_code = 5;
}

// Settings for Advisory Notifications.
message Settings {
option (google.api.resource) = {
type: "advisorynotifications.googleapis.com/Settings"
pattern: "organizations/{organization}/locations/{location}/settings"
};

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

// 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
// type.
map<string, NotificationSettings> notification_settings = 2
[(google.api.field_behavior) = REQUIRED];

// Required. Fingerprint for optimistic concurrency returned in Get requests.
// Must be provided for Update requests. If the value provided does not match
// the value known to the server, ABORTED will be thrown, and the client
// should retry the read-modify-write cycle.
string etag = 3 [(google.api.field_behavior) = REQUIRED];
}

// Settings for each NotificationType.
message NotificationSettings {
// Whether the associated NotificationType is enabled.
bool enabled = 1;
}

// Request of GetSettings endpoint.
message GetSettingsRequest {
// Required. The resource name of the settings to retrieve.
// Format:
// organizations/{organization}/locations/{location}/settings.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "advisorynotifications.googleapis.com/Settings"
}
];
}

// Request of UpdateSettings endpoint.
message UpdateSettingsRequest {
// Required. New settings.
Settings settings = 1 [(google.api.field_behavior) = REQUIRED];
}
Loading

0 comments on commit 986a114

Please sign in to comment.