Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
fix(grafeas): deprecate resource name helper methods (via synth) (#9835)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and busunkim96 committed Nov 19, 2019
1 parent 61bb3d3 commit a2c26d9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
21 changes: 18 additions & 3 deletions grafeas/grafeas_v1/gapic/grafeas_client.py
Expand Up @@ -67,14 +67,24 @@ class GrafeasClient(object):

@classmethod
def note_path(cls, project, note):
"""Return a fully-qualified note string."""
"""DEPRECATED. Return a fully-qualified note string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
return google.api_core.path_template.expand(
"projects/{project}/notes/{note}", project=project, note=note,
)

@classmethod
def occurrence_path(cls, project, occurrence):
"""Return a fully-qualified occurrence string."""
"""DEPRECATED. Return a fully-qualified occurrence string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
return google.api_core.path_template.expand(
"projects/{project}/occurrences/{occurrence}",
project=project,
Expand All @@ -83,7 +93,12 @@ def occurrence_path(cls, project, occurrence):

@classmethod
def project_path(cls, project):
"""Return a fully-qualified project string."""
"""DEPRECATED. Return a fully-qualified project string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
return google.api_core.path_template.expand(
"projects/{project}", project=project,
)
Expand Down
10 changes: 5 additions & 5 deletions synth.metadata
@@ -1,19 +1,19 @@
{
"updateTime": "2019-11-12T13:29:30.327145Z",
"updateTime": "2019-11-19T13:24:33.263763Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.41.1",
"dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e"
"version": "0.42.1",
"dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "f69562be0608904932bdcfbc5ad8b9a22d9dceb8",
"internalRef": "279774957"
"sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a",
"internalRef": "281088257"
}
},
{
Expand Down

0 comments on commit a2c26d9

Please sign in to comment.