Skip to content

Commit de741e7

Browse files
authored
fix: add back projectName methods for monitoring clients (#5219)
1 parent c4242a5 commit de741e7

5 files changed

Lines changed: 65 additions & 9 deletions

File tree

Monitoring/owlbot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
src=src,
3535
dest=dest,
3636
copy_excludes=[
37-
src / "*/src/V3/AlertPolicyServiceClient.php"
37+
src / "*/src/V3/AlertPolicyServiceClient.php",
38+
src / "*/src/V3/GroupServiceClient.php",
39+
src / "*/src/V3/NotificationChannelServiceClient.php",
40+
src / "*/src/V3/ServiceMonitoringServiceClient.php",
41+
src / "*/src/V3/UptimeCheckServiceGapicClient.php",
3842
]
3943
)
4044

Monitoring/src/V3/GroupServiceClient.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@
2929
/** {@inheritdoc} */
3030
class GroupServiceClient extends GroupServiceGapicClient
3131
{
32-
// This class is intentionally empty, and is intended to hold manual additions to
33-
// the generated {@see GroupServiceGapicClient} class.
32+
/**
33+
* Formats a string containing the fully-qualified path to represent
34+
* a project resource.
35+
*
36+
* @param string $project
37+
*
38+
* @return string The formatted project resource.
39+
* @deprecated
40+
*/
41+
public static function projectName($project)
42+
{
43+
return (new PathTemplate('projects/{project}'))->render([
44+
'project' => $project,
45+
]);
46+
}
3447
}

Monitoring/src/V3/NotificationChannelServiceClient.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@
2929
/** {@inheritdoc} */
3030
class NotificationChannelServiceClient extends NotificationChannelServiceGapicClient
3131
{
32-
// This class is intentionally empty, and is intended to hold manual additions to
33-
// the generated {@see NotificationChannelServiceGapicClient} class.
32+
/**
33+
* Formats a string containing the fully-qualified path to represent
34+
* a project resource.
35+
*
36+
* @param string $project
37+
*
38+
* @return string The formatted project resource.
39+
* @deprecated
40+
*/
41+
public static function projectName($project)
42+
{
43+
return (new PathTemplate('projects/{project}'))->render([
44+
'project' => $project,
45+
]);
46+
}
3447
}

Monitoring/src/V3/ServiceMonitoringServiceClient.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@
2929
/** {@inheritdoc} */
3030
class ServiceMonitoringServiceClient extends ServiceMonitoringServiceGapicClient
3131
{
32-
// This class is intentionally empty, and is intended to hold manual additions to
33-
// the generated {@see ServiceMonitoringServiceGapicClient} class.
32+
/**
33+
* Formats a string containing the fully-qualified path to represent
34+
* a project resource.
35+
*
36+
* @param string $project
37+
*
38+
* @return string The formatted project resource.
39+
* @deprecated
40+
*/
41+
public static function projectName($project)
42+
{
43+
return (new PathTemplate('projects/{project}'))->render([
44+
'project' => $project,
45+
]);
46+
}
3447
}

Monitoring/src/V3/UptimeCheckServiceClient.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@
2929
/** {@inheritdoc} */
3030
class UptimeCheckServiceClient extends UptimeCheckServiceGapicClient
3131
{
32-
// This class is intentionally empty, and is intended to hold manual additions to
33-
// the generated {@see UptimeCheckServiceGapicClient} class.
32+
/**
33+
* Formats a string containing the fully-qualified path to represent
34+
* a project resource.
35+
*
36+
* @param string $project
37+
*
38+
* @return string The formatted project resource.
39+
* @deprecated
40+
*/
41+
public static function projectName($project)
42+
{
43+
return (new PathTemplate('projects/{project}'))->render([
44+
'project' => $project,
45+
]);
46+
}
3447
}

0 commit comments

Comments
 (0)