Skip to content

Commit

Permalink
chore: add template for metadata (#2253)
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea authored Nov 19, 2024
1 parent 515dc8a commit 5a37094
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> operations_pb2.ListOperationsResponse:
r"""Lists operations that match the specified filter in the request.

Expand All @@ -20,8 +20,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
~.operations_pb2.ListOperationsResponse:
Response message for ``ListOperations`` method.
Expand Down Expand Up @@ -62,7 +61,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> operations_pb2.Operation:
r"""Gets the latest state of a long-running operation.

Expand All @@ -73,8 +72,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
~.operations_pb2.Operation:
An ``Operation`` object.
Expand Down Expand Up @@ -114,7 +112,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> None:
r"""Deletes a long-running operation.

Expand All @@ -130,8 +128,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
None
"""
Expand Down Expand Up @@ -166,7 +163,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> None:
r"""Starts asynchronous cancellation on a long-running operation.

Expand All @@ -181,8 +178,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
None
"""
Expand Down Expand Up @@ -217,7 +213,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> operations_pb2.Operation:
r"""Waits until the specified long-running operation is done or reaches at most
a specified timeout, returning the latest state.
Expand All @@ -234,8 +230,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
~.operations_pb2.Operation:
An ``Operation`` object.
Expand Down Expand Up @@ -280,7 +275,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> policy_pb2.Policy:
r"""Sets the IAM access control policy on the specified function.

Expand All @@ -293,8 +288,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
~.policy_pb2.Policy:
Defines an Identity and Access Management (IAM) policy.
Expand Down Expand Up @@ -398,7 +392,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> policy_pb2.Policy:
r"""Gets the IAM access control policy for a function.

Expand All @@ -412,8 +406,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if
any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
~.policy_pb2.Policy:
Defines an Identity and Access Management (IAM) policy.
Expand Down Expand Up @@ -517,7 +510,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> iam_policy_pb2.TestIamPermissionsResponse:
r"""Tests the specified IAM permissions against the IAM access control
policy for a function.
Expand All @@ -532,8 +525,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
~.iam_policy_pb2.TestIamPermissionsResponse:
Response message for ``TestIamPermissions`` method.
Expand Down Expand Up @@ -578,7 +570,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> locations_pb2.Location:
r"""Gets information about a location.

Expand All @@ -589,8 +581,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
~.location_pb2.Location:
Location object.
Expand Down Expand Up @@ -630,7 +621,7 @@
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
) -> locations_pb2.ListLocationsResponse:
r"""Lists information about the supported locations for this service.

Expand All @@ -641,8 +632,7 @@
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
Returns:
~.location_pb2.ListLocationsResponse:
Response message for ``ListLocations`` method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{% endif %}
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
{{ shared_macros.client_method_metadata_argument()|indent(8) }} = {{ shared_macros.client_method_metadata_default_value() }},
{% if method.extended_lro and not full_extended_lro %}{# This is a hack to preserve backwards compatibility with the "unary" surfaces #}
) -> {{ method.extended_lro.operation_type.ident }}:
{% elif not method.server_streaming %}
Expand Down Expand Up @@ -68,8 +68,7 @@
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
{{ shared_macros.client_method_metadata_argument_doc()|indent(4) }}
{% if not method.void %}

Returns:
Expand Down
Loading

0 comments on commit 5a37094

Please sign in to comment.