Skip to content

Commit c11b7c9

Browse files
yoshi-automationbusunkim96
authored andcommitted
fix(grafeas): deprecate resource name helper methods (via synth) (#9835)
1 parent 13962ab commit c11b7c9

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,24 @@ class GrafeasClient(object):
6767

6868
@classmethod
6969
def note_path(cls, project, note):
70-
"""Return a fully-qualified note string."""
70+
"""DEPRECATED. Return a fully-qualified note string."""
71+
warnings.warn(
72+
"Resource name helper functions are deprecated.",
73+
PendingDeprecationWarning,
74+
stacklevel=1,
75+
)
7176
return google.api_core.path_template.expand(
7277
"projects/{project}/notes/{note}", project=project, note=note,
7378
)
7479

7580
@classmethod
7681
def occurrence_path(cls, project, occurrence):
77-
"""Return a fully-qualified occurrence string."""
82+
"""DEPRECATED. Return a fully-qualified occurrence string."""
83+
warnings.warn(
84+
"Resource name helper functions are deprecated.",
85+
PendingDeprecationWarning,
86+
stacklevel=1,
87+
)
7888
return google.api_core.path_template.expand(
7989
"projects/{project}/occurrences/{occurrence}",
8090
project=project,
@@ -83,7 +93,12 @@ def occurrence_path(cls, project, occurrence):
8393

8494
@classmethod
8595
def project_path(cls, project):
86-
"""Return a fully-qualified project string."""
96+
"""DEPRECATED. Return a fully-qualified project string."""
97+
warnings.warn(
98+
"Resource name helper functions are deprecated.",
99+
PendingDeprecationWarning,
100+
stacklevel=1,
101+
)
87102
return google.api_core.path_template.expand(
88103
"projects/{project}", project=project,
89104
)

packages/grafeas/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-11-12T13:29:30.327145Z",
2+
"updateTime": "2019-11-19T13:24:33.263763Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.41.1",
8-
"dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e"
7+
"version": "0.42.1",
8+
"dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "f69562be0608904932bdcfbc5ad8b9a22d9dceb8",
16-
"internalRef": "279774957"
15+
"sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a",
16+
"internalRef": "281088257"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)