Skip to content

Commit

Permalink
feat(datacatalog): undeprecate resource name helper methods, bump cop…
Browse files Browse the repository at this point in the history
…yright year to 2020, tweak docstring formatting (via synth) (#10228)
  • Loading branch information
yoshi-automation authored Jan 29, 2020
1 parent aa9c717 commit 2b75ee3
Show file tree
Hide file tree
Showing 26 changed files with 144 additions and 3,464 deletions.
2 changes: 1 addition & 1 deletion datacatalog/google/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion datacatalog/google/cloud/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion datacatalog/google/cloud/datacatalog.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -87,12 +87,7 @@ def from_service_account_file(cls, filename, *args, **kwargs):

@classmethod
def entry_path(cls, project, location, entry_group, entry):
"""DEPRECATED. Return a fully-qualified entry string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified entry string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}",
project=project,
Expand All @@ -103,12 +98,7 @@ def entry_path(cls, project, location, entry_group, entry):

@classmethod
def entry_group_path(cls, project, location, entry_group):
"""DEPRECATED. Return a fully-qualified entry_group string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified entry_group string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/entryGroups/{entry_group}",
project=project,
Expand All @@ -118,12 +108,7 @@ def entry_group_path(cls, project, location, entry_group):

@classmethod
def field_path(cls, project, location, tag_template, field):
"""DEPRECATED. Return a fully-qualified field string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified field string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}",
project=project,
Expand All @@ -134,12 +119,7 @@ def field_path(cls, project, location, tag_template, field):

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

@classmethod
def tag_path(cls, project, location, entry_group, entry, tag):
"""DEPRECATED. Return a fully-qualified tag string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified tag string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}",
project=project,
Expand All @@ -165,12 +140,7 @@ def tag_path(cls, project, location, entry_group, entry, tag):

@classmethod
def tag_template_path(cls, project, location, tag_template):
"""DEPRECATED. Return a fully-qualified tag_template string."""
warnings.warn(
"Resource name helper functions are deprecated.",
PendingDeprecationWarning,
stacklevel=1,
)
"""Return a fully-qualified tag_template string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/tagTemplates/{tag_template}",
project=project,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions datacatalog/google/cloud/datacatalog_v1beta1/proto/tags_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion datacatalog/google/cloud/datacatalog_v1beta1/types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion datacatalog/samples/v1beta1/datacatalog_get_entry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion datacatalog/samples/v1beta1/datacatalog_lookup_entry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion datacatalog/samples/v1beta1/datacatalog_search.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 2b75ee3

Please sign in to comment.