Skip to content

Commit

Permalink
fix: [google-cloud-edgenetwork] deprecate unimplemented Zone fields a…
Browse files Browse the repository at this point in the history
…nd methods (#12473)

- [ ] Regenerate this pull request now.

---
chore: update go_package and Go importpath

---
chore: update go_package and Go importpath
PiperOrigin-RevId: 616910383

Source-Link:
googleapis/googleapis@d1c64eb

Source-Link:
googleapis/googleapis-gen@f2e8233
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVkZ2VuZXR3b3JrLy5Pd2xCb3QueWFtbCIsImgiOiJmMmU4MjMzY2NlYzQyYjc3YmM4NTZkODY2ZjE0NTk3ZGVkNjRiZDQwIn0=

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
4 people authored Mar 22, 2024
1 parent 8cd9d87 commit 6f26fe8
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
Type,
Union,
)
import warnings

from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
Expand Down Expand Up @@ -388,7 +389,8 @@ async def list_zones(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListZonesAsyncPager:
r"""Lists Zones in a given project and location.
r"""Deprecated: not implemented.
Lists Zones in a given project and location.
.. code-block:: python
Expand Down Expand Up @@ -419,7 +421,8 @@ async def sample_list_zones():
Args:
request (Optional[Union[google.cloud.edgenetwork_v1.types.ListZonesRequest, dict]]):
The request object. Message for requesting list of Zones
The request object. Deprecated: not implemented.
Message for requesting list of Zones
parent (:class:`str`):
Required. Parent value for
ListZonesRequest
Expand All @@ -435,13 +438,18 @@ async def sample_list_zones():
Returns:
google.cloud.edgenetwork_v1.services.edge_network.pagers.ListZonesAsyncPager:
Deprecated: not implemented.
Message for response to listing Zones
Iterating over this object will yield
results and resolve additional pages
automatically.
"""
warnings.warn(
"EdgeNetworkAsyncClient.list_zones is deprecated", DeprecationWarning
)

# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
Expand Down Expand Up @@ -505,7 +513,8 @@ async def get_zone(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> resources.Zone:
r"""Gets details of a single Zone.
r"""Deprecated: not implemented.
Gets details of a single Zone.
.. code-block:: python
Expand Down Expand Up @@ -535,7 +544,8 @@ async def sample_get_zone():
Args:
request (Optional[Union[google.cloud.edgenetwork_v1.types.GetZoneRequest, dict]]):
The request object. Message for getting a Zone
The request object. Deprecated: not implemented.
Message for getting a Zone
name (:class:`str`):
Required. Name of the resource
This corresponds to the ``name`` field
Expand All @@ -551,6 +561,10 @@ async def sample_get_zone():
google.cloud.edgenetwork_v1.types.Zone:
A Google Edge Cloud zone.
"""
warnings.warn(
"EdgeNetworkAsyncClient.get_zone is deprecated", DeprecationWarning
)

# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,8 @@ def list_zones(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListZonesPager:
r"""Lists Zones in a given project and location.
r"""Deprecated: not implemented.
Lists Zones in a given project and location.
.. code-block:: python
Expand Down Expand Up @@ -937,7 +938,8 @@ def sample_list_zones():
Args:
request (Union[google.cloud.edgenetwork_v1.types.ListZonesRequest, dict]):
The request object. Message for requesting list of Zones
The request object. Deprecated: not implemented.
Message for requesting list of Zones
parent (str):
Required. Parent value for
ListZonesRequest
Expand All @@ -953,13 +955,16 @@ def sample_list_zones():
Returns:
google.cloud.edgenetwork_v1.services.edge_network.pagers.ListZonesPager:
Deprecated: not implemented.
Message for response to listing Zones
Iterating over this object will yield
results and resolve additional pages
automatically.
"""
warnings.warn("EdgeNetworkClient.list_zones is deprecated", DeprecationWarning)

# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
Expand Down Expand Up @@ -1023,7 +1028,8 @@ def get_zone(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> resources.Zone:
r"""Gets details of a single Zone.
r"""Deprecated: not implemented.
Gets details of a single Zone.
.. code-block:: python
Expand Down Expand Up @@ -1053,7 +1059,8 @@ def sample_get_zone():
Args:
request (Union[google.cloud.edgenetwork_v1.types.GetZoneRequest, dict]):
The request object. Message for getting a Zone
The request object. Deprecated: not implemented.
Message for getting a Zone
name (str):
Required. Name of the resource
This corresponds to the ``name`` field
Expand All @@ -1069,6 +1076,8 @@ def sample_get_zone():
google.cloud.edgenetwork_v1.types.Zone:
A Google Edge Cloud zone.
"""
warnings.warn("EdgeNetworkClient.get_zone is deprecated", DeprecationWarning)

# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def list_zones(
) -> Callable[[service.ListZonesRequest], service.ListZonesResponse]:
r"""Return a callable for the list zones method over gRPC.
Deprecated: not implemented.
Lists Zones in a given project and location.
Returns:
Expand All @@ -306,6 +307,7 @@ def list_zones(
def get_zone(self) -> Callable[[service.GetZoneRequest], resources.Zone]:
r"""Return a callable for the get zone method over gRPC.
Deprecated: not implemented.
Gets details of a single Zone.
Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ def list_zones(
) -> Callable[[service.ListZonesRequest], Awaitable[service.ListZonesResponse]]:
r"""Return a callable for the list zones method over gRPC.
Deprecated: not implemented.
Lists Zones in a given project and location.
Returns:
Expand All @@ -313,6 +314,7 @@ def list_zones(
def get_zone(self) -> Callable[[service.GetZoneRequest], Awaitable[resources.Zone]]:
r"""Return a callable for the get zone method over gRPC.
Deprecated: not implemented.
Gets details of a single Zone.
Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2597,7 +2597,8 @@ def __call__(
Args:
request (~.service.GetZoneRequest):
The request object. Message for getting a Zone
The request object. Deprecated: not implemented.
Message for getting a Zone
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand Down Expand Up @@ -3220,7 +3221,8 @@ def __call__(
Args:
request (~.service.ListZonesRequest):
The request object. Message for requesting list of Zones
The request object. Deprecated: not implemented.
Message for requesting list of Zones
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand All @@ -3229,7 +3231,9 @@ def __call__(
Returns:
~.service.ListZonesResponse:
Message for response to listing Zones
Deprecated: not implemented.
Message for response to listing Zones
"""

http_options: List[Dict[str, str]] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ class Zone(proto.Message):
Output only. The time when the zone was last
updated.
labels (MutableMapping[str, str]):
Labels as key value pairs
Deprecated: not implemented.
Labels as key value pairs.
layout_name (str):
Deprecated: not implemented.
The deployment layout type.
"""

Expand Down Expand Up @@ -972,7 +974,7 @@ class BgpPeerStatus(proto.Message):
Time this session has been up.
Format:
14 years, 51 weeks, 6 days, 23 hours, 59
14 years, 51 weeks, 6 days, 23 hours, 59
minutes, 59 seconds
uptime_seconds (int):
Time this session has been up, in seconds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@


class ListZonesRequest(proto.Message):
r"""Message for requesting list of Zones
r"""Deprecated: not implemented.
Message for requesting list of Zones
Attributes:
parent (str):
Expand Down Expand Up @@ -109,7 +110,8 @@ class ListZonesRequest(proto.Message):


class ListZonesResponse(proto.Message):
r"""Message for response to listing Zones
r"""Deprecated: not implemented.
Message for response to listing Zones
Attributes:
zones (MutableSequence[google.cloud.edgenetwork_v1.types.Zone]):
Expand Down Expand Up @@ -141,7 +143,8 @@ def raw_page(self):


class GetZoneRequest(proto.Message):
r"""Message for getting a Zone
r"""Deprecated: not implemented.
Message for getting a Zone
Attributes:
name (str):
Expand Down

0 comments on commit 6f26fe8

Please sign in to comment.