Skip to content
Permalink
Browse files
feat: Update Service Directory v1beta1 protos to include VPC Network …
…field, and create/modify timestamp fields. (#88)

PiperOrigin-RevId: 381234166

Source-Link: googleapis/googleapis@d69baf2

Source-Link: googleapis/googleapis-gen@4111164
  • Loading branch information
gcf-owl-bot committed Jun 26, 2021
1 parent 28ecc8b commit e7fba11e53b85ff25620ba92e8859206fd7884d8
@@ -1,2 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-servicedirectory package uses inline types.
# The google-cloud-service-directory package uses inline types.
@@ -43,6 +43,8 @@ class LookupServiceAsyncClient:

endpoint_path = staticmethod(LookupServiceClient.endpoint_path)
parse_endpoint_path = staticmethod(LookupServiceClient.parse_endpoint_path)
network_path = staticmethod(LookupServiceClient.network_path)
parse_network_path = staticmethod(LookupServiceClient.parse_network_path)
service_path = staticmethod(LookupServiceClient.service_path)
parse_service_path = staticmethod(LookupServiceClient.parse_service_path)
common_billing_account_path = staticmethod(
@@ -175,6 +175,22 @@ def parse_endpoint_path(path: str) -> Dict[str, str]:
)
return m.groupdict() if m else {}

@staticmethod
def network_path(project: str, network: str,) -> str:
"""Returns a fully-qualified network string."""
return "projects/{project}/locations/global/networks/{network}".format(
project=project, network=network,
)

@staticmethod
def parse_network_path(path: str) -> Dict[str, str]:
"""Parses a network path into its component segments."""
m = re.match(
r"^projects/(?P<project>.+?)/locations/global/networks/(?P<network>.+?)$",
path,
)
return m.groupdict() if m else {}

@staticmethod
def service_path(project: str, location: str, namespace: str, service: str,) -> str:
"""Returns a fully-qualified service string."""
@@ -37,6 +37,7 @@
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import RegistrationServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import RegistrationServiceGrpcAsyncIOTransport
from .client import RegistrationServiceClient
@@ -70,6 +71,8 @@ class RegistrationServiceAsyncClient:
parse_endpoint_path = staticmethod(RegistrationServiceClient.parse_endpoint_path)
namespace_path = staticmethod(RegistrationServiceClient.namespace_path)
parse_namespace_path = staticmethod(RegistrationServiceClient.parse_namespace_path)
network_path = staticmethod(RegistrationServiceClient.network_path)
parse_network_path = staticmethod(RegistrationServiceClient.parse_network_path)
service_path = staticmethod(RegistrationServiceClient.service_path)
parse_service_path = staticmethod(RegistrationServiceClient.parse_service_path)
common_billing_account_path = staticmethod(
@@ -202,7 +205,7 @@ async def create_namespace(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_namespace.Namespace:
r"""Creates a namespace, and returns the new Namespace.
r"""Creates a namespace, and returns the new namespace.
Args:
request (:class:`google.cloud.servicedirectory_v1beta1.types.CreateNamespaceRequest`):
@@ -309,7 +312,7 @@ async def list_namespaces(
parent (:class:`str`):
Required. The resource name of the
project and location whose namespaces
we'd like to list.
you'd like to list.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
@@ -604,7 +607,7 @@ async def create_service(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_service.Service:
r"""Creates a service, and returns the new Service.
r"""Creates a service, and returns the new service.
Args:
request (:class:`google.cloud.servicedirectory_v1beta1.types.CreateServiceRequest`):
@@ -709,7 +712,7 @@ async def list_services(
[RegistrationService.ListServices][google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices].
parent (:class:`str`):
Required. The resource name of the
namespace whose services we'd like to
namespace whose services you'd like to
list.
This corresponds to the ``parent`` field
@@ -789,7 +792,7 @@ async def get_service(
The request object. The request message for
[RegistrationService.GetService][google.cloud.servicedirectory.v1beta1.RegistrationService.GetService].
This should not be used for looking up a service.
Insead, use the `resolve` method as it will contain all
Insead, use the `resolve` method as it contains all
endpoints and associated metadata.
name (:class:`str`):
Required. The name of the service to
@@ -1008,7 +1011,7 @@ async def create_endpoint(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_endpoint.Endpoint:
r"""Creates a endpoint, and returns the new Endpoint.
r"""Creates an endpoint, and returns the new endpoint.
Args:
request (:class:`google.cloud.servicedirectory_v1beta1.types.CreateEndpointRequest`):
@@ -1112,7 +1115,7 @@ async def list_endpoints(
[RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints].
parent (:class:`str`):
Required. The resource name of the
service whose endpoints we'd like to
service whose endpoints you'd like to
list.
This corresponds to the ``parent`` field
@@ -1185,7 +1188,7 @@ async def get_endpoint(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> endpoint.Endpoint:
r"""Gets a endpoint.
r"""Gets an endpoint.
Args:
request (:class:`google.cloud.servicedirectory_v1beta1.types.GetEndpointRequest`):
@@ -1260,7 +1263,7 @@ async def update_endpoint(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_endpoint.Endpoint:
r"""Updates a endpoint.
r"""Updates an endpoint.
Args:
request (:class:`google.cloud.servicedirectory_v1beta1.types.UpdateEndpointRequest`):
@@ -1341,7 +1344,7 @@ async def delete_endpoint(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
r"""Deletes a endpoint.
r"""Deletes an endpoint.
Args:
request (:class:`google.cloud.servicedirectory_v1beta1.types.DeleteEndpointRequest`):
@@ -41,6 +41,7 @@
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import RegistrationServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import RegistrationServiceGrpcTransport
from .transports.grpc_asyncio import RegistrationServiceGrpcAsyncIOTransport
@@ -220,6 +221,22 @@ def parse_namespace_path(path: str) -> Dict[str, str]:
)
return m.groupdict() if m else {}

@staticmethod
def network_path(project: str, network: str,) -> str:
"""Returns a fully-qualified network string."""
return "projects/{project}/locations/global/networks/{network}".format(
project=project, network=network,
)

@staticmethod
def parse_network_path(path: str) -> Dict[str, str]:
"""Parses a network path into its component segments."""
m = re.match(
r"^projects/(?P<project>.+?)/locations/global/networks/(?P<network>.+?)$",
path,
)
return m.groupdict() if m else {}

@staticmethod
def service_path(project: str, location: str, namespace: str, service: str,) -> str:
"""Returns a fully-qualified service string."""
@@ -422,7 +439,7 @@ def create_namespace(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_namespace.Namespace:
r"""Creates a namespace, and returns the new Namespace.
r"""Creates a namespace, and returns the new namespace.
Args:
request (google.cloud.servicedirectory_v1beta1.types.CreateNamespaceRequest):
@@ -529,7 +546,7 @@ def list_namespaces(
parent (str):
Required. The resource name of the
project and location whose namespaces
we'd like to list.
you'd like to list.
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
@@ -824,7 +841,7 @@ def create_service(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_service.Service:
r"""Creates a service, and returns the new Service.
r"""Creates a service, and returns the new service.
Args:
request (google.cloud.servicedirectory_v1beta1.types.CreateServiceRequest):
@@ -929,7 +946,7 @@ def list_services(
[RegistrationService.ListServices][google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices].
parent (str):
Required. The resource name of the
namespace whose services we'd like to
namespace whose services you'd like to
list.
This corresponds to the ``parent`` field
@@ -1009,7 +1026,7 @@ def get_service(
The request object. The request message for
[RegistrationService.GetService][google.cloud.servicedirectory.v1beta1.RegistrationService.GetService].
This should not be used for looking up a service.
Insead, use the `resolve` method as it will contain all
Insead, use the `resolve` method as it contains all
endpoints and associated metadata.
name (str):
Required. The name of the service to
@@ -1228,7 +1245,7 @@ def create_endpoint(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_endpoint.Endpoint:
r"""Creates a endpoint, and returns the new Endpoint.
r"""Creates an endpoint, and returns the new endpoint.
Args:
request (google.cloud.servicedirectory_v1beta1.types.CreateEndpointRequest):
@@ -1332,7 +1349,7 @@ def list_endpoints(
[RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints].
parent (str):
Required. The resource name of the
service whose endpoints we'd like to
service whose endpoints you'd like to
list.
This corresponds to the ``parent`` field
@@ -1405,7 +1422,7 @@ def get_endpoint(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> endpoint.Endpoint:
r"""Gets a endpoint.
r"""Gets an endpoint.
Args:
request (google.cloud.servicedirectory_v1beta1.types.GetEndpointRequest):
@@ -1480,7 +1497,7 @@ def update_endpoint(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> gcs_endpoint.Endpoint:
r"""Updates a endpoint.
r"""Updates an endpoint.
Args:
request (google.cloud.servicedirectory_v1beta1.types.UpdateEndpointRequest):
@@ -1561,7 +1578,7 @@ def delete_endpoint(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
r"""Deletes a endpoint.
r"""Deletes an endpoint.
Args:
request (google.cloud.servicedirectory_v1beta1.types.DeleteEndpointRequest):
@@ -254,7 +254,7 @@ def create_namespace(
]:
r"""Return a callable for the create namespace method over gRPC.
Creates a namespace, and returns the new Namespace.
Creates a namespace, and returns the new namespace.
Returns:
Callable[[~.CreateNamespaceRequest],
@@ -390,7 +390,7 @@ def create_service(
) -> Callable[[registration_service.CreateServiceRequest], gcs_service.Service]:
r"""Return a callable for the create service method over gRPC.
Creates a service, and returns the new Service.
Creates a service, and returns the new service.
Returns:
Callable[[~.CreateServiceRequest],
@@ -524,7 +524,7 @@ def create_endpoint(
) -> Callable[[registration_service.CreateEndpointRequest], gcs_endpoint.Endpoint]:
r"""Return a callable for the create endpoint method over gRPC.
Creates a endpoint, and returns the new Endpoint.
Creates an endpoint, and returns the new endpoint.
Returns:
Callable[[~.CreateEndpointRequest],
@@ -579,7 +579,7 @@ def get_endpoint(
) -> Callable[[registration_service.GetEndpointRequest], endpoint.Endpoint]:
r"""Return a callable for the get endpoint method over gRPC.
Gets a endpoint.
Gets an endpoint.
Returns:
Callable[[~.GetEndpointRequest],
@@ -605,7 +605,7 @@ def update_endpoint(
) -> Callable[[registration_service.UpdateEndpointRequest], gcs_endpoint.Endpoint]:
r"""Return a callable for the update endpoint method over gRPC.
Updates a endpoint.
Updates an endpoint.
Returns:
Callable[[~.UpdateEndpointRequest],
@@ -631,7 +631,7 @@ def delete_endpoint(
) -> Callable[[registration_service.DeleteEndpointRequest], empty_pb2.Empty]:
r"""Return a callable for the delete endpoint method over gRPC.
Deletes a endpoint.
Deletes an endpoint.
Returns:
Callable[[~.DeleteEndpointRequest],
@@ -258,7 +258,7 @@ def create_namespace(
]:
r"""Return a callable for the create namespace method over gRPC.
Creates a namespace, and returns the new Namespace.
Creates a namespace, and returns the new namespace.
Returns:
Callable[[~.CreateNamespaceRequest],
@@ -401,7 +401,7 @@ def create_service(
]:
r"""Return a callable for the create service method over gRPC.
Creates a service, and returns the new Service.
Creates a service, and returns the new service.
Returns:
Callable[[~.CreateServiceRequest],
@@ -541,7 +541,7 @@ def create_endpoint(
]:
r"""Return a callable for the create endpoint method over gRPC.
Creates a endpoint, and returns the new Endpoint.
Creates an endpoint, and returns the new endpoint.
Returns:
Callable[[~.CreateEndpointRequest],
@@ -598,7 +598,7 @@ def get_endpoint(
]:
r"""Return a callable for the get endpoint method over gRPC.
Gets a endpoint.
Gets an endpoint.
Returns:
Callable[[~.GetEndpointRequest],
@@ -626,7 +626,7 @@ def update_endpoint(
]:
r"""Return a callable for the update endpoint method over gRPC.
Updates a endpoint.
Updates an endpoint.
Returns:
Callable[[~.UpdateEndpointRequest],
@@ -654,7 +654,7 @@ def delete_endpoint(
]:
r"""Return a callable for the delete endpoint method over gRPC.
Deletes a endpoint.
Deletes an endpoint.
Returns:
Callable[[~.DeleteEndpointRequest],
Loading

0 comments on commit e7fba11

Please sign in to comment.