diff --git a/AdvisoryNotifications/metadata/V1/Service.php b/AdvisoryNotifications/metadata/V1/Service.php
index 1b9b2b5507e0..7c16188aa28f 100644
Binary files a/AdvisoryNotifications/metadata/V1/Service.php and b/AdvisoryNotifications/metadata/V1/Service.php differ
diff --git a/AdvisoryNotifications/samples/V1/AdvisoryNotificationsServiceClient/get_notification.php b/AdvisoryNotifications/samples/V1/AdvisoryNotificationsServiceClient/get_notification.php
index 5496d3614a34..fcd899daed22 100644
--- a/AdvisoryNotifications/samples/V1/AdvisoryNotificationsServiceClient/get_notification.php
+++ b/AdvisoryNotifications/samples/V1/AdvisoryNotificationsServiceClient/get_notification.php
@@ -33,7 +33,8 @@
*
* @param string $formattedName A name of the notification to retrieve.
* Format:
- * organizations/{organization}/locations/{location}/notifications/{notification}. Please see
+ * organizations/{organization}/locations/{location}/notifications/{notification}
+ * or projects/{projects}/locations/{location}/notifications/{notification}. Please see
* {@see AdvisoryNotificationsServiceClient::notificationName()} for help formatting this field.
*/
function get_notification_sample(string $formattedName): void
diff --git a/AdvisoryNotifications/samples/V1/AdvisoryNotificationsServiceClient/list_notifications.php b/AdvisoryNotifications/samples/V1/AdvisoryNotificationsServiceClient/list_notifications.php
index 83c4a13102ce..15ef2e226114 100644
--- a/AdvisoryNotifications/samples/V1/AdvisoryNotificationsServiceClient/list_notifications.php
+++ b/AdvisoryNotifications/samples/V1/AdvisoryNotificationsServiceClient/list_notifications.php
@@ -33,8 +33,9 @@
* Lists notifications under a given parent.
*
* @param string $formattedParent The parent, which owns this collection of notifications.
- * Must be of the form "organizations/{organization}/locations/{location}". Please see
- * {@see AdvisoryNotificationsServiceClient::locationName()} for help formatting this field.
+ * Must be of the form "organizations/{organization}/locations/{location}"
+ * or "projects/{project}/locations/{location}"
+ * Please see {@see AdvisoryNotificationsServiceClient::locationName()} for help formatting this field.
*/
function list_notifications_sample(string $formattedParent): void
{
diff --git a/AdvisoryNotifications/src/V1/Client/AdvisoryNotificationsServiceClient.php b/AdvisoryNotifications/src/V1/Client/AdvisoryNotificationsServiceClient.php
index 9fec0786cf75..bfb3a771ea60 100644
--- a/AdvisoryNotifications/src/V1/Client/AdvisoryNotificationsServiceClient.php
+++ b/AdvisoryNotifications/src/V1/Client/AdvisoryNotificationsServiceClient.php
@@ -140,6 +140,78 @@ public static function notificationName(string $organization, string $location,
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * organization_location resource.
+ *
+ * @param string $organization
+ * @param string $location
+ *
+ * @return string The formatted organization_location resource.
+ */
+ public static function organizationLocationName(string $organization, string $location): string
+ {
+ return self::getPathTemplate('organizationLocation')->render([
+ 'organization' => $organization,
+ 'location' => $location,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * organization_location_notification resource.
+ *
+ * @param string $organization
+ * @param string $location
+ * @param string $notification
+ *
+ * @return string The formatted organization_location_notification resource.
+ */
+ public static function organizationLocationNotificationName(string $organization, string $location, string $notification): string
+ {
+ return self::getPathTemplate('organizationLocationNotification')->render([
+ 'organization' => $organization,
+ 'location' => $location,
+ 'notification' => $notification,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_location resource.
+ *
+ * @param string $project
+ * @param string $location
+ *
+ * @return string The formatted project_location resource.
+ */
+ public static function projectLocationName(string $project, string $location): string
+ {
+ return self::getPathTemplate('projectLocation')->render([
+ 'project' => $project,
+ 'location' => $location,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_location_notification resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $notification
+ *
+ * @return string The formatted project_location_notification resource.
+ */
+ public static function projectLocationNotificationName(string $project, string $location, string $notification): string
+ {
+ return self::getPathTemplate('projectLocationNotification')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'notification' => $notification,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a settings
* resource.
@@ -163,6 +235,10 @@ public static function settingsName(string $organization, string $location): str
* Template: Pattern
* - location: organizations/{organization}/locations/{location}
* - notification: organizations/{organization}/locations/{location}/notifications/{notification}
+ * - organizationLocation: organizations/{organization}/locations/{location}
+ * - organizationLocationNotification: organizations/{organization}/locations/{location}/notifications/{notification}
+ * - projectLocation: projects/{project}/locations/{location}
+ * - projectLocationNotification: projects/{project}/locations/{location}/notifications/{notification}
* - settings: organizations/{organization}/locations/{location}/settings
*
* The optional $template argument can be supplied to specify a particular pattern,
diff --git a/AdvisoryNotifications/src/V1/Gapic/AdvisoryNotificationsServiceGapicClient.php b/AdvisoryNotifications/src/V1/Gapic/AdvisoryNotificationsServiceGapicClient.php
index 18559a7e9493..f3be450e6375 100644
--- a/AdvisoryNotifications/src/V1/Gapic/AdvisoryNotificationsServiceGapicClient.php
+++ b/AdvisoryNotifications/src/V1/Gapic/AdvisoryNotificationsServiceGapicClient.php
@@ -91,6 +91,14 @@ class AdvisoryNotificationsServiceGapicClient
private static $notificationNameTemplate;
+ private static $organizationLocationNameTemplate;
+
+ private static $organizationLocationNotificationNameTemplate;
+
+ private static $projectLocationNameTemplate;
+
+ private static $projectLocationNotificationNameTemplate;
+
private static $settingsNameTemplate;
private static $pathTemplateMap;
@@ -145,6 +153,50 @@ private static function getNotificationNameTemplate()
return self::$notificationNameTemplate;
}
+ private static function getOrganizationLocationNameTemplate()
+ {
+ if (self::$organizationLocationNameTemplate == null) {
+ self::$organizationLocationNameTemplate = new PathTemplate(
+ 'organizations/{organization}/locations/{location}'
+ );
+ }
+
+ return self::$organizationLocationNameTemplate;
+ }
+
+ private static function getOrganizationLocationNotificationNameTemplate()
+ {
+ if (self::$organizationLocationNotificationNameTemplate == null) {
+ self::$organizationLocationNotificationNameTemplate = new PathTemplate(
+ 'organizations/{organization}/locations/{location}/notifications/{notification}'
+ );
+ }
+
+ return self::$organizationLocationNotificationNameTemplate;
+ }
+
+ private static function getProjectLocationNameTemplate()
+ {
+ if (self::$projectLocationNameTemplate == null) {
+ self::$projectLocationNameTemplate = new PathTemplate(
+ 'projects/{project}/locations/{location}'
+ );
+ }
+
+ return self::$projectLocationNameTemplate;
+ }
+
+ private static function getProjectLocationNotificationNameTemplate()
+ {
+ if (self::$projectLocationNotificationNameTemplate == null) {
+ self::$projectLocationNotificationNameTemplate = new PathTemplate(
+ 'projects/{project}/locations/{location}/notifications/{notification}'
+ );
+ }
+
+ return self::$projectLocationNotificationNameTemplate;
+ }
+
private static function getSettingsNameTemplate()
{
if (self::$settingsNameTemplate == null) {
@@ -162,6 +214,10 @@ private static function getPathTemplateMap()
self::$pathTemplateMap = [
'location' => self::getLocationNameTemplate(),
'notification' => self::getNotificationNameTemplate(),
+ 'organizationLocation' => self::getOrganizationLocationNameTemplate(),
+ 'organizationLocationNotification' => self::getOrganizationLocationNotificationNameTemplate(),
+ 'projectLocation' => self::getProjectLocationNameTemplate(),
+ 'projectLocationNotification' => self::getProjectLocationNotificationNameTemplate(),
'settings' => self::getSettingsNameTemplate(),
];
}
@@ -208,6 +264,84 @@ public static function notificationName(
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * organization_location resource.
+ *
+ * @param string $organization
+ * @param string $location
+ *
+ * @return string The formatted organization_location resource.
+ */
+ public static function organizationLocationName($organization, $location)
+ {
+ return self::getOrganizationLocationNameTemplate()->render([
+ 'organization' => $organization,
+ 'location' => $location,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * organization_location_notification resource.
+ *
+ * @param string $organization
+ * @param string $location
+ * @param string $notification
+ *
+ * @return string The formatted organization_location_notification resource.
+ */
+ public static function organizationLocationNotificationName(
+ $organization,
+ $location,
+ $notification
+ ) {
+ return self::getOrganizationLocationNotificationNameTemplate()->render([
+ 'organization' => $organization,
+ 'location' => $location,
+ 'notification' => $notification,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_location resource.
+ *
+ * @param string $project
+ * @param string $location
+ *
+ * @return string The formatted project_location resource.
+ */
+ public static function projectLocationName($project, $location)
+ {
+ return self::getProjectLocationNameTemplate()->render([
+ 'project' => $project,
+ 'location' => $location,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_location_notification resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $notification
+ *
+ * @return string The formatted project_location_notification resource.
+ */
+ public static function projectLocationNotificationName(
+ $project,
+ $location,
+ $notification
+ ) {
+ return self::getProjectLocationNotificationNameTemplate()->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'notification' => $notification,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a settings
* resource.
@@ -231,6 +365,10 @@ public static function settingsName($organization, $location)
* Template: Pattern
* - location: organizations/{organization}/locations/{location}
* - notification: organizations/{organization}/locations/{location}/notifications/{notification}
+ * - organizationLocation: organizations/{organization}/locations/{location}
+ * - organizationLocationNotification: organizations/{organization}/locations/{location}/notifications/{notification}
+ * - projectLocation: projects/{project}/locations/{location}
+ * - projectLocationNotification: projects/{project}/locations/{location}/notifications/{notification}
* - settings: organizations/{organization}/locations/{location}/settings
*
* The optional $template argument can be supplied to specify a particular pattern,
@@ -348,7 +486,8 @@ public function __construct(array $options = [])
*
* @param string $name 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}.
* @param array $optionalArgs {
* Optional.
*
@@ -469,7 +608,8 @@ public function getSettings($name, array $optionalArgs = [])
* ```
*
* @param string $parent 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}"
* @param array $optionalArgs {
* Optional.
*
diff --git a/AdvisoryNotifications/src/V1/GetNotificationRequest.php b/AdvisoryNotifications/src/V1/GetNotificationRequest.php
index bfb43fef07e5..58d3b8a07814 100644
--- a/AdvisoryNotifications/src/V1/GetNotificationRequest.php
+++ b/AdvisoryNotifications/src/V1/GetNotificationRequest.php
@@ -18,7 +18,8 @@ class GetNotificationRequest extends \Google\Protobuf\Internal\Message
/**
* 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}.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -37,7 +38,8 @@ class GetNotificationRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $name Required. A name of the notification to retrieve.
* Format:
- * organizations/{organization}/locations/{location}/notifications/{notification}. Please see
+ * organizations/{organization}/locations/{location}/notifications/{notification}
+ * or projects/{projects}/locations/{location}/notifications/{notification}. Please see
* {@see AdvisoryNotificationsServiceClient::notificationName()} for help formatting this field.
*
* @return \Google\Cloud\AdvisoryNotifications\V1\GetNotificationRequest
@@ -59,7 +61,8 @@ public static function build(string $name): self
* @type string $name
* 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}.
* @type string $language_code
* ISO code for requested localization language. If unset, will be
* interpereted as "en". If the requested language is valid, but not supported
@@ -76,7 +79,8 @@ public function __construct($data = NULL) {
/**
* 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}.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -89,7 +93,8 @@ public function getName()
/**
* 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}.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/AdvisoryNotifications/src/V1/ListNotificationsRequest.php b/AdvisoryNotifications/src/V1/ListNotificationsRequest.php
index 9d9824871e2a..9f6eb8532fb5 100644
--- a/AdvisoryNotifications/src/V1/ListNotificationsRequest.php
+++ b/AdvisoryNotifications/src/V1/ListNotificationsRequest.php
@@ -17,7 +17,8 @@ class ListNotificationsRequest extends \Google\Protobuf\Internal\Message
{
/**
* 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}"
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -59,8 +60,9 @@ class ListNotificationsRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $parent Required. The parent, which owns this collection of notifications.
- * Must be of the form "organizations/{organization}/locations/{location}". Please see
- * {@see AdvisoryNotificationsServiceClient::locationName()} for help formatting this field.
+ * Must be of the form "organizations/{organization}/locations/{location}"
+ * or "projects/{project}/locations/{location}"
+ * Please see {@see AdvisoryNotificationsServiceClient::locationName()} for help formatting this field.
*
* @return \Google\Cloud\AdvisoryNotifications\V1\ListNotificationsRequest
*
@@ -80,7 +82,8 @@ public static function build(string $parent): self
*
* @type string $parent
* 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}"
* @type int $page_size
* The maximum number of notifications to return. The service may return
* fewer than this value. If unspecified or equal to 0, at most 50
@@ -108,7 +111,8 @@ public function __construct($data = NULL) {
/**
* 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}"
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -120,7 +124,8 @@ public function getParent()
/**
* 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}"
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/AdvisoryNotifications/src/V1/Notification.php b/AdvisoryNotifications/src/V1/Notification.php
index b18cabfae52f..76a52ae2a43f 100644
--- a/AdvisoryNotifications/src/V1/Notification.php
+++ b/AdvisoryNotifications/src/V1/Notification.php
@@ -19,7 +19,8 @@ class Notification extends \Google\Protobuf\Internal\Message
/**
* 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}.
*
* Generated from protobuf field string name = 1;
*/
@@ -58,7 +59,8 @@ class Notification extends \Google\Protobuf\Internal\Message
* @type string $name
* 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}.
* @type \Google\Cloud\AdvisoryNotifications\V1\Subject $subject
* The subject line of the notification.
* @type array<\Google\Cloud\AdvisoryNotifications\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages
@@ -77,7 +79,8 @@ public function __construct($data = NULL) {
/**
* 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}.
*
* Generated from protobuf field string name = 1;
* @return string
@@ -90,7 +93,8 @@ public function getName()
/**
* 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}.
*
* Generated from protobuf field string name = 1;
* @param string $var
diff --git a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php
index 550c8936d515..ebb3a6ad425e 100644
--- a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php
+++ b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php
@@ -63,6 +63,10 @@
'templateMap' => [
'location' => 'organizations/{organization}/locations/{location}',
'notification' => 'organizations/{organization}/locations/{location}/notifications/{notification}',
+ 'organizationLocation' => 'organizations/{organization}/locations/{location}',
+ 'organizationLocationNotification' => 'organizations/{organization}/locations/{location}/notifications/{notification}',
+ 'projectLocation' => 'projects/{project}/locations/{location}',
+ 'projectLocationNotification' => 'projects/{project}/locations/{location}/notifications/{notification}',
'settings' => 'organizations/{organization}/locations/{location}/settings',
],
],
diff --git a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php
index d623ce46e74b..5dfef8bb6492 100644
--- a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php
+++ b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php
@@ -6,6 +6,12 @@
'GetNotification' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=organizations/*/locations/*/notifications/*}',
+ 'additionalBindings' => [
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/notifications/*}',
+ ],
+ ],
'placeholders' => [
'name' => [
'getters' => [
@@ -28,6 +34,12 @@
'ListNotifications' => [
'method' => 'get',
'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/notifications',
+ 'additionalBindings' => [
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/notifications',
+ ],
+ ],
'placeholders' => [
'parent' => [
'getters' => [