From 317ee9f06a65d5379d7d5338e81badd35b3f171e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 06:55:22 -0400 Subject: [PATCH 1/4] chore(python): add license header to auto-label.yaml (#5) Source-Link: https://github.com/googleapis/synthtool/commit/eb78c980b52c7c6746d2edb77d9cf7aaa99a2aab Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 6 +++--- .github/auto-label.yaml | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 63f5f43..bc893c9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -4,14 +4,14 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:9ce2de2e0a59b6ae3b1eb216f441ee0dea59b1cfc08109d03613916d09d25a35 + digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 +# created: 2022-04-06T10:30:21.687684602Z diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml index 09c8d73..41bff0b 100644 --- a/.github/auto-label.yaml +++ b/.github/auto-label.yaml @@ -1,2 +1,15 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. requestsize: enabled: true From 43244bc4aba7e70e21348dc3c3b78c430b2bedb9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 23:54:12 +0000 Subject: [PATCH 2/4] chore: Use gapic-generator-python 0.65.0 (#7) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 440970084 Source-Link: https://github.com/googleapis/googleapis/commit/5e0a3d57254ab9857ccac77fc6ffade7b69a2dc7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b0c628a3fade768f225d76992791ea1ba2a881be Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9 feat: AuditConfig for IAM v1 fix(deps): require grpc-google-iam-v1 >=0.12.4 docs: fix type in docstring for map fields --- .../run_v2/services/revisions/async_client.py | 3 +- .../cloud/run_v2/services/revisions/client.py | 3 +- .../services/revisions/transports/base.py | 5 + .../services/revisions/transports/grpc.py | 4 + .../run_v2/services/services/async_client.py | 99 ++++++++++--------- .../cloud/run_v2/services/services/client.py | 95 +++++++++--------- .../services/services/transports/base.py | 9 +- .../services/services/transports/grpc.py | 4 + google/cloud/run_v2/types/__init__.py | 8 +- google/cloud/run_v2/types/k8s_min.py | 2 +- google/cloud/run_v2/types/revision.py | 4 +- .../cloud/run_v2/types/revision_template.py | 4 +- google/cloud/run_v2/types/service.py | 4 +- scripts/fixup_run_v2_keywords.py | 2 +- setup.py | 2 +- testing/constraints-3.6.txt | 2 +- tests/unit/gapic/run_v2/test_revisions.py | 21 ++++ tests/unit/gapic/run_v2/test_services.py | 22 +++++ 18 files changed, 185 insertions(+), 108 deletions(-) diff --git a/google/cloud/run_v2/services/revisions/async_client.py b/google/cloud/run_v2/services/revisions/async_client.py index 3455cb5..1f4e6cc 100644 --- a/google/cloud/run_v2/services/revisions/async_client.py +++ b/google/cloud/run_v2/services/revisions/async_client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import functools import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions @@ -325,7 +325,6 @@ async def list_revisions( r"""List Revisions from a given Service, or from a given location. - .. code-block:: python from google.cloud import run_v2 diff --git a/google/cloud/run_v2/services/revisions/client.py b/google/cloud/run_v2/services/revisions/client.py index 56e7433..378aa58 100644 --- a/google/cloud/run_v2/services/revisions/client.py +++ b/google/cloud/run_v2/services/revisions/client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import os import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib @@ -652,7 +652,6 @@ def list_revisions( r"""List Revisions from a given Service, or from a given location. - .. code-block:: python from google.cloud import run_v2 diff --git a/google/cloud/run_v2/services/revisions/transports/base.py b/google/cloud/run_v2/services/revisions/transports/base.py index 063378e..af36691 100644 --- a/google/cloud/run_v2/services/revisions/transports/base.py +++ b/google/cloud/run_v2/services/revisions/transports/base.py @@ -82,6 +82,7 @@ def __init__( always_use_jwt_access (Optional[bool]): Whether self signed JWT should be used for service account credentials. """ + # Save the hostname. Default to port 443 (HTTPS) if none is specified. if ":" not in host: host += ":443" @@ -182,5 +183,9 @@ def delete_revision( ]: raise NotImplementedError() + @property + def kind(self) -> str: + raise NotImplementedError() + __all__ = ("RevisionsTransport",) diff --git a/google/cloud/run_v2/services/revisions/transports/grpc.py b/google/cloud/run_v2/services/revisions/transports/grpc.py index 1f9bbd5..0755113 100644 --- a/google/cloud/run_v2/services/revisions/transports/grpc.py +++ b/google/cloud/run_v2/services/revisions/transports/grpc.py @@ -326,5 +326,9 @@ def delete_revision( def close(self): self.grpc_channel.close() + @property + def kind(self) -> str: + return "grpc" + __all__ = ("RevisionsGrpcTransport",) diff --git a/google/cloud/run_v2/services/services/async_client.py b/google/cloud/run_v2/services/services/async_client.py index c229069..5ba28db 100644 --- a/google/cloud/run_v2/services/services/async_client.py +++ b/google/cloud/run_v2/services/services/async_client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import functools import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions @@ -230,7 +230,6 @@ async def create_service( r"""Creates a new Service in a given project and location. - .. code-block:: python from google.cloud import run_v2 @@ -443,7 +442,7 @@ def sample_get_service(): maximum=10.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.ServiceUnavailable, + core_exceptions.GoogleAPICallError, ), deadline=10.0, ), @@ -554,7 +553,7 @@ def sample_list_services(): maximum=10.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.ServiceUnavailable, + core_exceptions.GoogleAPICallError, ), deadline=10.0, ), @@ -722,7 +721,6 @@ async def delete_service( This will cause the Service to stop serving traffic and will delete all revisions. - .. code-block:: python from google.cloud import run_v2 @@ -839,7 +837,6 @@ async def get_iam_policy( for the given Cloud Run Service. This result does not include any inherited policies. - .. code-block:: python from google.cloud import run_v2 @@ -871,21 +868,26 @@ def sample_get_iam_policy(): Returns: google.iam.v1.policy_pb2.Policy: - Defines an Identity and Access Management (IAM) policy. It is used to - specify access control policies for Cloud Platform - resources. + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds - one or more members to a single role. Members can be - user accounts, service accounts, Google groups, and - domains (such as G Suite). A role is a named list of - permissions (defined by IAM or configured by users). - A binding can optionally specify a condition, which - is a logic expression that further constrains the - role binding based on attributes about the request - and/or target resource. - - **JSON Example** + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** { "bindings": [ @@ -900,17 +902,17 @@ def sample_get_iam_policy(): }, { "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], + "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } - ] + ], "etag": "BwWWja0YfJA=", "version": 3 } - **YAML Example** + **YAML example:** bindings: - members: - user:\ mike@example.com - group:\ admins@example.com - domain:google.com - @@ -921,11 +923,12 @@ def sample_get_iam_policy(): condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < - timestamp('2020-10-01T00:00:00.000Z') + timestamp('2020-10-01T00:00:00.000Z') etag: + BwWWja0YfJA= version: 3 For a description of IAM and its features, see the - [IAM developer's - guide](\ https://cloud.google.com/iam/docs). + [IAM + documentation](\ https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -970,7 +973,6 @@ async def set_iam_policy( r"""Sets the IAM Access control policy for the specified Service. Overwrites any existing policy. - .. code-block:: python from google.cloud import run_v2 @@ -1002,21 +1004,26 @@ def sample_set_iam_policy(): Returns: google.iam.v1.policy_pb2.Policy: - Defines an Identity and Access Management (IAM) policy. It is used to - specify access control policies for Cloud Platform - resources. + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds - one or more members to a single role. Members can be - user accounts, service accounts, Google groups, and - domains (such as G Suite). A role is a named list of - permissions (defined by IAM or configured by users). - A binding can optionally specify a condition, which - is a logic expression that further constrains the - role binding based on attributes about the request - and/or target resource. - - **JSON Example** + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** { "bindings": [ @@ -1031,17 +1038,17 @@ def sample_set_iam_policy(): }, { "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], + "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } - ] + ], "etag": "BwWWja0YfJA=", "version": 3 } - **YAML Example** + **YAML example:** bindings: - members: - user:\ mike@example.com - group:\ admins@example.com - domain:google.com - @@ -1052,11 +1059,12 @@ def sample_set_iam_policy(): condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < - timestamp('2020-10-01T00:00:00.000Z') + timestamp('2020-10-01T00:00:00.000Z') etag: + BwWWja0YfJA= version: 3 For a description of IAM and its features, see the - [IAM developer's - guide](\ https://cloud.google.com/iam/docs). + [IAM + documentation](\ https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1103,7 +1111,6 @@ async def test_iam_permissions( There are no permissions required for making this API call. - .. code-block:: python from google.cloud import run_v2 diff --git a/google/cloud/run_v2/services/services/client.py b/google/cloud/run_v2/services/services/client.py index 2e52170..21522ed 100644 --- a/google/cloud/run_v2/services/services/client.py +++ b/google/cloud/run_v2/services/services/client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import os import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib @@ -559,7 +559,6 @@ def create_service( r"""Creates a new Service in a given project and location. - .. code-block:: python from google.cloud import run_v2 @@ -1033,7 +1032,6 @@ def delete_service( This will cause the Service to stop serving traffic and will delete all revisions. - .. code-block:: python from google.cloud import run_v2 @@ -1150,7 +1148,6 @@ def get_iam_policy( for the given Cloud Run Service. This result does not include any inherited policies. - .. code-block:: python from google.cloud import run_v2 @@ -1182,21 +1179,26 @@ def sample_get_iam_policy(): Returns: google.iam.v1.policy_pb2.Policy: - Defines an Identity and Access Management (IAM) policy. It is used to - specify access control policies for Cloud Platform - resources. + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds - one or more members to a single role. Members can be - user accounts, service accounts, Google groups, and - domains (such as G Suite). A role is a named list of - permissions (defined by IAM or configured by users). - A binding can optionally specify a condition, which - is a logic expression that further constrains the - role binding based on attributes about the request - and/or target resource. - - **JSON Example** + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** { "bindings": [ @@ -1211,17 +1213,17 @@ def sample_get_iam_policy(): }, { "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], + "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } - ] + ], "etag": "BwWWja0YfJA=", "version": 3 } - **YAML Example** + **YAML example:** bindings: - members: - user:\ mike@example.com - group:\ admins@example.com - domain:google.com - @@ -1232,11 +1234,12 @@ def sample_get_iam_policy(): condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < - timestamp('2020-10-01T00:00:00.000Z') + timestamp('2020-10-01T00:00:00.000Z') etag: + BwWWja0YfJA= version: 3 For a description of IAM and its features, see the - [IAM developer's - guide](\ https://cloud.google.com/iam/docs). + [IAM + documentation](\ https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1280,7 +1283,6 @@ def set_iam_policy( r"""Sets the IAM Access control policy for the specified Service. Overwrites any existing policy. - .. code-block:: python from google.cloud import run_v2 @@ -1312,21 +1314,26 @@ def sample_set_iam_policy(): Returns: google.iam.v1.policy_pb2.Policy: - Defines an Identity and Access Management (IAM) policy. It is used to - specify access control policies for Cloud Platform - resources. + An Identity and Access Management (IAM) policy, which specifies access + controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds - one or more members to a single role. Members can be - user accounts, service accounts, Google groups, and - domains (such as G Suite). A role is a named list of - permissions (defined by IAM or configured by users). - A binding can optionally specify a condition, which - is a logic expression that further constrains the - role binding based on attributes about the request - and/or target resource. - - **JSON Example** + one or more members, or principals, to a single role. + Principals can be user accounts, service accounts, + Google groups, and domains (such as G Suite). A role + is a named list of permissions; each role can be an + IAM predefined role or a user-created custom role. + + For some types of Google Cloud resources, a binding + can also specify a condition, which is a logical + expression that allows access to a resource only if + the expression evaluates to true. A condition can add + constraints based on attributes of the request, the + resource, or both. To learn which resources support + conditions in their IAM policies, see the [IAM + documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). + + **JSON example:** { "bindings": [ @@ -1341,17 +1348,17 @@ def sample_set_iam_policy(): }, { "role": "roles/resourcemanager.organizationViewer", - "members": ["user:eve@example.com"], + "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } - ] + ], "etag": "BwWWja0YfJA=", "version": 3 } - **YAML Example** + **YAML example:** bindings: - members: - user:\ mike@example.com - group:\ admins@example.com - domain:google.com - @@ -1362,11 +1369,12 @@ def sample_set_iam_policy(): condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < - timestamp('2020-10-01T00:00:00.000Z') + timestamp('2020-10-01T00:00:00.000Z') etag: + BwWWja0YfJA= version: 3 For a description of IAM and its features, see the - [IAM developer's - guide](\ https://cloud.google.com/iam/docs). + [IAM + documentation](\ https://cloud.google.com/iam/docs/). """ # Create or coerce a protobuf request object. @@ -1412,7 +1420,6 @@ def test_iam_permissions( There are no permissions required for making this API call. - .. code-block:: python from google.cloud import run_v2 diff --git a/google/cloud/run_v2/services/services/transports/base.py b/google/cloud/run_v2/services/services/transports/base.py index fb9473e..79866ea 100644 --- a/google/cloud/run_v2/services/services/transports/base.py +++ b/google/cloud/run_v2/services/services/transports/base.py @@ -85,6 +85,7 @@ def __init__( always_use_jwt_access (Optional[bool]): Whether self signed JWT should be used for service account credentials. """ + # Save the hostname. Default to port 443 (HTTPS) if none is specified. if ":" not in host: host += ":443" @@ -137,7 +138,7 @@ def _prep_wrapped_messages(self, client_info): maximum=10.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.ServiceUnavailable, + core_exceptions.GoogleAPICallError, ), deadline=10.0, ), @@ -151,7 +152,7 @@ def _prep_wrapped_messages(self, client_info): maximum=10.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.ServiceUnavailable, + core_exceptions.GoogleAPICallError, ), deadline=10.0, ), @@ -273,5 +274,9 @@ def test_iam_permissions( ]: raise NotImplementedError() + @property + def kind(self) -> str: + raise NotImplementedError() + __all__ = ("ServicesTransport",) diff --git a/google/cloud/run_v2/services/services/transports/grpc.py b/google/cloud/run_v2/services/services/transports/grpc.py index e77332d..0c0daf0 100644 --- a/google/cloud/run_v2/services/services/transports/grpc.py +++ b/google/cloud/run_v2/services/services/transports/grpc.py @@ -468,5 +468,9 @@ def test_iam_permissions( def close(self): self.grpc_channel.close() + @property + def kind(self) -> str: + return "grpc" + __all__ = ("ServicesGrpcTransport",) diff --git a/google/cloud/run_v2/types/__init__.py b/google/cloud/run_v2/types/__init__.py index 4ab6c3f..5a6b804 100644 --- a/google/cloud/run_v2/types/__init__.py +++ b/google/cloud/run_v2/types/__init__.py @@ -13,7 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .condition import Condition +from .condition import ( + Condition, +) from .k8s_min import ( CloudSqlInstance, Container, @@ -34,7 +36,9 @@ ListRevisionsResponse, Revision, ) -from .revision_template import RevisionTemplate +from .revision_template import ( + RevisionTemplate, +) from .service import ( CreateServiceRequest, DeleteServiceRequest, diff --git a/google/cloud/run_v2/types/k8s_min.py b/google/cloud/run_v2/types/k8s_min.py index 2ed4a37..e1be020 100644 --- a/google/cloud/run_v2/types/k8s_min.py +++ b/google/cloud/run_v2/types/k8s_min.py @@ -133,7 +133,7 @@ class ResourceRequirements(proto.Message): requirements. Attributes: - limits (Sequence[google.cloud.run_v2.types.ResourceRequirements.LimitsEntry]): + limits (Mapping[str, str]): Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', and '4'. Setting 4 CPU requires at least 2Gi of diff --git a/google/cloud/run_v2/types/revision.py b/google/cloud/run_v2/types/revision.py index dd2f6d0..d0670ec 100644 --- a/google/cloud/run_v2/types/revision.py +++ b/google/cloud/run_v2/types/revision.py @@ -169,7 +169,7 @@ class Revision(proto.Message): Output only. A number that monotonically increases every time the user modifies the desired state. - labels (Sequence[google.cloud.run_v2.types.Revision.LabelsEntry]): + labels (Mapping[str, str]): KRM-style labels for the resource. User-provided labels are shared with Google's billing system, so they can be used to filter, @@ -183,7 +183,7 @@ class Revision(proto.Message): 'run.googleapis.com' or 'serving.knative.dev' namespaces. Those labels are read-only, and user changes will not be preserved. - annotations (Sequence[google.cloud.run_v2.types.Revision.AnnotationsEntry]): + annotations (Mapping[str, str]): KRM-style annotations for the resource. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The creation time. diff --git a/google/cloud/run_v2/types/revision_template.py b/google/cloud/run_v2/types/revision_template.py index 22066b2..a526b82 100644 --- a/google/cloud/run_v2/types/revision_template.py +++ b/google/cloud/run_v2/types/revision_template.py @@ -37,9 +37,9 @@ class RevisionTemplate(proto.Message): The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name. - labels (Sequence[google.cloud.run_v2.types.RevisionTemplate.LabelsEntry]): + labels (Mapping[str, str]): KRM-style labels for the resource. - annotations (Sequence[google.cloud.run_v2.types.RevisionTemplate.AnnotationsEntry]): + annotations (Mapping[str, str]): KRM-style annotations for the resource. scaling (google.cloud.run_v2.types.RevisionScaling): Scaling settings for this Revision. diff --git a/google/cloud/run_v2/types/service.py b/google/cloud/run_v2/types/service.py index bd8e1dd..3a77ee4 100644 --- a/google/cloud/run_v2/types/service.py +++ b/google/cloud/run_v2/types/service.py @@ -258,7 +258,7 @@ class Service(proto.Message): Output only. A number that monotonically increases every time the user modifies the desired state. - labels (Sequence[google.cloud.run_v2.types.Service.LabelsEntry]): + labels (Mapping[str, str]): Map of string keys and values that can be used to organize and categorize objects. User-provided labels are shared with Google's @@ -273,7 +273,7 @@ class Service(proto.Message): 'run.googleapis.com' or 'serving.knative.dev' namespaces. Those labels are read-only, and user changes will not be preserved. - annotations (Sequence[google.cloud.run_v2.types.Service.AnnotationsEntry]): + annotations (Mapping[str, str]): Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved diff --git a/scripts/fixup_run_v2_keywords.py b/scripts/fixup_run_v2_keywords.py index 18d2094..aef6ae6 100644 --- a/scripts/fixup_run_v2_keywords.py +++ b/scripts/fixup_run_v2_keywords.py @@ -47,7 +47,7 @@ class runCallTransformer(cst.CSTTransformer): 'get_service': ('name', ), 'list_revisions': ('parent', 'page_size', 'page_token', 'show_deleted', ), 'list_services': ('parent', 'page_size', 'page_token', 'show_deleted', ), - 'set_iam_policy': ('resource', 'policy', ), + 'set_iam_policy': ('resource', 'policy', 'update_mask', ), 'test_iam_permissions': ('resource', 'permissions', ), 'update_service': ('service', 'update_mask', 'validate_only', 'allow_missing', ), } diff --git a/setup.py b/setup.py index dd11da3..0d667ac 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "proto-plus >= 1.15.0", "googleapis-common-protos >= 1.56.0", - "grpc-google-iam-v1 >= 0.12.3, < 0.13dev", + "grpc-google-iam-v1 >= 0.12.4, <1.0.0dev", ] package_root = os.path.abspath(os.path.dirname(__file__)) diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index c1b4ea6..a0c021a 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -7,4 +7,4 @@ google-api-core==1.31.5 proto-plus==1.15.0 googleapis-common-protos==1.56.0 -grpc-google-iam-v1==0.12.3 +grpc-google-iam-v1==0.12.4 diff --git a/tests/unit/gapic/run_v2/test_revisions.py b/tests/unit/gapic/run_v2/test_revisions.py index a6a9c7c..7a67476 100644 --- a/tests/unit/gapic/run_v2/test_revisions.py +++ b/tests/unit/gapic/run_v2/test_revisions.py @@ -1652,6 +1652,19 @@ def test_transport_adc(transport_class): adc.assert_called_once() +@pytest.mark.parametrize( + "transport_name", + [ + "grpc", + ], +) +def test_transport_kind(transport_name): + transport = RevisionsClient.get_transport_class(transport_name)( + credentials=ga_credentials.AnonymousCredentials(), + ) + assert transport.kind == transport_name + + def test_transport_grpc_default(): # A client should use the gRPC transport by default. client = RevisionsClient( @@ -1701,6 +1714,14 @@ def test_revisions_base_transport(): with pytest.raises(NotImplementedError): transport.operations_client + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + def test_revisions_base_transport_with_credentials_file(): # Instantiate the base transport with a credentials file diff --git a/tests/unit/gapic/run_v2/test_services.py b/tests/unit/gapic/run_v2/test_services.py index 788855a..79098db 100644 --- a/tests/unit/gapic/run_v2/test_services.py +++ b/tests/unit/gapic/run_v2/test_services.py @@ -2378,6 +2378,7 @@ def test_set_iam_policy_from_dict_foreign(): request={ "resource": "resource_value", "policy": policy_pb2.Policy(version=774), + "update_mask": field_mask_pb2.FieldMask(paths=["paths_value"]), } ) call.assert_called() @@ -2654,6 +2655,19 @@ def test_transport_adc(transport_class): adc.assert_called_once() +@pytest.mark.parametrize( + "transport_name", + [ + "grpc", + ], +) +def test_transport_kind(transport_name): + transport = ServicesClient.get_transport_class(transport_name)( + credentials=ga_credentials.AnonymousCredentials(), + ) + assert transport.kind == transport_name + + def test_transport_grpc_default(): # A client should use the gRPC transport by default. client = ServicesClient( @@ -2708,6 +2722,14 @@ def test_services_base_transport(): with pytest.raises(NotImplementedError): transport.operations_client + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + def test_services_base_transport_with_credentials_file(): # Instantiate the base transport with a credentials file From c2dd825bc23d65218866ee49342fa9665fad73b9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 11:14:05 -0400 Subject: [PATCH 3/4] chore: use gapic-generator-python 0.65.1 (#9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.65.1 PiperOrigin-RevId: 441524537 Source-Link: https://github.com/googleapis/googleapis/commit/2a273915b3f70fe86c9d2a75470a0b83e48d0abf Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab6756a48c89b5bcb9fb73443cb8e55d574f4643 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../run_v2/services/services/async_client.py | 13 +- .../cloud/run_v2/services/services/client.py | 9 +- .../services/services/transports/base.py | 4 +- ...generated_services_get_iam_policy_async.py | 3 +- ..._generated_services_get_iam_policy_sync.py | 3 +- ...generated_services_set_iam_policy_async.py | 3 +- ..._generated_services_set_iam_policy_sync.py | 3 +- ...ted_services_test_iam_permissions_async.py | 3 +- ...ated_services_test_iam_permissions_sync.py | 3 +- .../snippet_metadata_run_v2.json | 1010 +++++++++++++++-- 10 files changed, 934 insertions(+), 120 deletions(-) diff --git a/google/cloud/run_v2/services/services/async_client.py b/google/cloud/run_v2/services/services/async_client.py index 5ba28db..c1d5c92 100644 --- a/google/cloud/run_v2/services/services/async_client.py +++ b/google/cloud/run_v2/services/services/async_client.py @@ -442,7 +442,7 @@ def sample_get_service(): maximum=10.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.GoogleAPICallError, + core_exceptions.ServiceUnavailable, ), deadline=10.0, ), @@ -553,7 +553,7 @@ def sample_list_services(): maximum=10.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.GoogleAPICallError, + core_exceptions.ServiceUnavailable, ), deadline=10.0, ), @@ -840,13 +840,14 @@ async def get_iam_policy( .. code-block:: python from google.cloud import run_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_get_iam_policy(): # Create a client client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.GetIamPolicyRequest( + request = iam_policy_pb2.GetIamPolicyRequest( resource="resource_value", ) @@ -976,13 +977,14 @@ async def set_iam_policy( .. code-block:: python from google.cloud import run_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_set_iam_policy(): # Create a client client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.SetIamPolicyRequest( + request = iam_policy_pb2.SetIamPolicyRequest( resource="resource_value", ) @@ -1114,13 +1116,14 @@ async def test_iam_permissions( .. code-block:: python from google.cloud import run_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_test_iam_permissions(): # Create a client client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.TestIamPermissionsRequest( + request = iam_policy_pb2.TestIamPermissionsRequest( resource="resource_value", permissions=['permissions_value_1', 'permissions_value_2'], ) diff --git a/google/cloud/run_v2/services/services/client.py b/google/cloud/run_v2/services/services/client.py index 21522ed..8bce853 100644 --- a/google/cloud/run_v2/services/services/client.py +++ b/google/cloud/run_v2/services/services/client.py @@ -1151,13 +1151,14 @@ def get_iam_policy( .. code-block:: python from google.cloud import run_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_get_iam_policy(): # Create a client client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.GetIamPolicyRequest( + request = iam_policy_pb2.GetIamPolicyRequest( resource="resource_value", ) @@ -1286,13 +1287,14 @@ def set_iam_policy( .. code-block:: python from google.cloud import run_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_set_iam_policy(): # Create a client client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.SetIamPolicyRequest( + request = iam_policy_pb2.SetIamPolicyRequest( resource="resource_value", ) @@ -1423,13 +1425,14 @@ def test_iam_permissions( .. code-block:: python from google.cloud import run_v2 + from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_test_iam_permissions(): # Create a client client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.TestIamPermissionsRequest( + request = iam_policy_pb2.TestIamPermissionsRequest( resource="resource_value", permissions=['permissions_value_1', 'permissions_value_2'], ) diff --git a/google/cloud/run_v2/services/services/transports/base.py b/google/cloud/run_v2/services/services/transports/base.py index 79866ea..0dd32fc 100644 --- a/google/cloud/run_v2/services/services/transports/base.py +++ b/google/cloud/run_v2/services/services/transports/base.py @@ -138,7 +138,7 @@ def _prep_wrapped_messages(self, client_info): maximum=10.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.GoogleAPICallError, + core_exceptions.ServiceUnavailable, ), deadline=10.0, ), @@ -152,7 +152,7 @@ def _prep_wrapped_messages(self, client_info): maximum=10.0, multiplier=1.3, predicate=retries.if_exception_type( - core_exceptions.GoogleAPICallError, + core_exceptions.ServiceUnavailable, ), deadline=10.0, ), diff --git a/samples/generated_samples/run_v2_generated_services_get_iam_policy_async.py b/samples/generated_samples/run_v2_generated_services_get_iam_policy_async.py index a492b45..870c7ba 100644 --- a/samples/generated_samples/run_v2_generated_services_get_iam_policy_async.py +++ b/samples/generated_samples/run_v2_generated_services_get_iam_policy_async.py @@ -25,6 +25,7 @@ # [START run_v2_generated_Services_GetIamPolicy_async] from google.cloud import run_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore async def sample_get_iam_policy(): @@ -32,7 +33,7 @@ async def sample_get_iam_policy(): client = run_v2.ServicesAsyncClient() # Initialize request argument(s) - request = run_v2.GetIamPolicyRequest( + request = iam_policy_pb2.GetIamPolicyRequest( resource="resource_value", ) diff --git a/samples/generated_samples/run_v2_generated_services_get_iam_policy_sync.py b/samples/generated_samples/run_v2_generated_services_get_iam_policy_sync.py index b30e6fb..26b6392 100644 --- a/samples/generated_samples/run_v2_generated_services_get_iam_policy_sync.py +++ b/samples/generated_samples/run_v2_generated_services_get_iam_policy_sync.py @@ -25,6 +25,7 @@ # [START run_v2_generated_Services_GetIamPolicy_sync] from google.cloud import run_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_get_iam_policy(): @@ -32,7 +33,7 @@ def sample_get_iam_policy(): client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.GetIamPolicyRequest( + request = iam_policy_pb2.GetIamPolicyRequest( resource="resource_value", ) diff --git a/samples/generated_samples/run_v2_generated_services_set_iam_policy_async.py b/samples/generated_samples/run_v2_generated_services_set_iam_policy_async.py index a39cadd..a2ed3fe 100644 --- a/samples/generated_samples/run_v2_generated_services_set_iam_policy_async.py +++ b/samples/generated_samples/run_v2_generated_services_set_iam_policy_async.py @@ -25,6 +25,7 @@ # [START run_v2_generated_Services_SetIamPolicy_async] from google.cloud import run_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore async def sample_set_iam_policy(): @@ -32,7 +33,7 @@ async def sample_set_iam_policy(): client = run_v2.ServicesAsyncClient() # Initialize request argument(s) - request = run_v2.SetIamPolicyRequest( + request = iam_policy_pb2.SetIamPolicyRequest( resource="resource_value", ) diff --git a/samples/generated_samples/run_v2_generated_services_set_iam_policy_sync.py b/samples/generated_samples/run_v2_generated_services_set_iam_policy_sync.py index fac34da..543c41e 100644 --- a/samples/generated_samples/run_v2_generated_services_set_iam_policy_sync.py +++ b/samples/generated_samples/run_v2_generated_services_set_iam_policy_sync.py @@ -25,6 +25,7 @@ # [START run_v2_generated_Services_SetIamPolicy_sync] from google.cloud import run_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_set_iam_policy(): @@ -32,7 +33,7 @@ def sample_set_iam_policy(): client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.SetIamPolicyRequest( + request = iam_policy_pb2.SetIamPolicyRequest( resource="resource_value", ) diff --git a/samples/generated_samples/run_v2_generated_services_test_iam_permissions_async.py b/samples/generated_samples/run_v2_generated_services_test_iam_permissions_async.py index 74ee78f..12eee70 100644 --- a/samples/generated_samples/run_v2_generated_services_test_iam_permissions_async.py +++ b/samples/generated_samples/run_v2_generated_services_test_iam_permissions_async.py @@ -25,6 +25,7 @@ # [START run_v2_generated_Services_TestIamPermissions_async] from google.cloud import run_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore async def sample_test_iam_permissions(): @@ -32,7 +33,7 @@ async def sample_test_iam_permissions(): client = run_v2.ServicesAsyncClient() # Initialize request argument(s) - request = run_v2.TestIamPermissionsRequest( + request = iam_policy_pb2.TestIamPermissionsRequest( resource="resource_value", permissions=['permissions_value_1', 'permissions_value_2'], ) diff --git a/samples/generated_samples/run_v2_generated_services_test_iam_permissions_sync.py b/samples/generated_samples/run_v2_generated_services_test_iam_permissions_sync.py index a33107a..230717a 100644 --- a/samples/generated_samples/run_v2_generated_services_test_iam_permissions_sync.py +++ b/samples/generated_samples/run_v2_generated_services_test_iam_permissions_sync.py @@ -25,6 +25,7 @@ # [START run_v2_generated_Services_TestIamPermissions_sync] from google.cloud import run_v2 +from google.iam.v1 import iam_policy_pb2 # type: ignore def sample_test_iam_permissions(): @@ -32,7 +33,7 @@ def sample_test_iam_permissions(): client = run_v2.ServicesClient() # Initialize request argument(s) - request = run_v2.TestIamPermissionsRequest( + request = iam_policy_pb2.TestIamPermissionsRequest( resource="resource_value", permissions=['permissions_value_1', 'permissions_value_2'], ) diff --git a/samples/generated_samples/snippet_metadata_run_v2.json b/samples/generated_samples/snippet_metadata_run_v2.json index 240cdb5..8b95cfc 100644 --- a/samples/generated_samples/snippet_metadata_run_v2.json +++ b/samples/generated_samples/snippet_metadata_run_v2.json @@ -1,16 +1,61 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.run.v2", + "version": "v2" + } + ], + "language": "PYTHON", + "name": "google-cloud-run" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.RevisionsAsyncClient", + "shortName": "RevisionsAsyncClient" + }, + "fullName": "google.cloud.run_v2.RevisionsAsyncClient.delete_revision", "method": { + "fullName": "google.cloud.run.v2.Revisions.DeleteRevision", "service": { + "fullName": "google.cloud.run.v2.Revisions", "shortName": "Revisions" }, "shortName": "DeleteRevision" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.DeleteRevisionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_revision" }, + "description": "Sample for DeleteRevision", "file": "run_v2_generated_revisions_delete_revision_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Revisions_DeleteRevision_async", "segments": [ { @@ -43,18 +88,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_revisions_delete_revision_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.RevisionsClient", + "shortName": "RevisionsClient" + }, + "fullName": "google.cloud.run_v2.RevisionsClient.delete_revision", "method": { + "fullName": "google.cloud.run.v2.Revisions.DeleteRevision", "service": { + "fullName": "google.cloud.run.v2.Revisions", "shortName": "Revisions" }, "shortName": "DeleteRevision" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.DeleteRevisionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_revision" }, + "description": "Sample for DeleteRevision", "file": "run_v2_generated_revisions_delete_revision_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Revisions_DeleteRevision_sync", "segments": [ { @@ -87,19 +168,55 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_revisions_delete_revision_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.RevisionsAsyncClient", + "shortName": "RevisionsAsyncClient" + }, + "fullName": "google.cloud.run_v2.RevisionsAsyncClient.get_revision", "method": { + "fullName": "google.cloud.run.v2.Revisions.GetRevision", "service": { + "fullName": "google.cloud.run.v2.Revisions", "shortName": "Revisions" }, "shortName": "GetRevision" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.GetRevisionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.run_v2.types.Revision", + "shortName": "get_revision" }, + "description": "Sample for GetRevision", "file": "run_v2_generated_revisions_get_revision_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Revisions_GetRevision_async", "segments": [ { @@ -132,18 +249,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_revisions_get_revision_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.RevisionsClient", + "shortName": "RevisionsClient" + }, + "fullName": "google.cloud.run_v2.RevisionsClient.get_revision", "method": { + "fullName": "google.cloud.run.v2.Revisions.GetRevision", "service": { + "fullName": "google.cloud.run.v2.Revisions", "shortName": "Revisions" }, "shortName": "GetRevision" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.GetRevisionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.run_v2.types.Revision", + "shortName": "get_revision" }, + "description": "Sample for GetRevision", "file": "run_v2_generated_revisions_get_revision_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Revisions_GetRevision_sync", "segments": [ { @@ -176,19 +329,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_revisions_get_revision_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.RevisionsAsyncClient", + "shortName": "RevisionsAsyncClient" + }, + "fullName": "google.cloud.run_v2.RevisionsAsyncClient.list_revisions", "method": { + "fullName": "google.cloud.run.v2.Revisions.ListRevisions", "service": { + "fullName": "google.cloud.run.v2.Revisions", "shortName": "Revisions" }, "shortName": "ListRevisions" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.ListRevisionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.run_v2.services.revisions.pagers.ListRevisionsAsyncPager", + "shortName": "list_revisions" }, + "description": "Sample for ListRevisions", "file": "run_v2_generated_revisions_list_revisions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Revisions_ListRevisions_async", "segments": [ { @@ -221,18 +410,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_revisions_list_revisions_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.RevisionsClient", + "shortName": "RevisionsClient" + }, + "fullName": "google.cloud.run_v2.RevisionsClient.list_revisions", "method": { + "fullName": "google.cloud.run.v2.Revisions.ListRevisions", "service": { + "fullName": "google.cloud.run.v2.Revisions", "shortName": "Revisions" }, "shortName": "ListRevisions" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.ListRevisionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.run_v2.services.revisions.pagers.ListRevisionsPager", + "shortName": "list_revisions" }, + "description": "Sample for ListRevisions", "file": "run_v2_generated_revisions_list_revisions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Revisions_ListRevisions_sync", "segments": [ { @@ -265,19 +490,63 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_revisions_list_revisions_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.ServicesAsyncClient", + "shortName": "ServicesAsyncClient" + }, + "fullName": "google.cloud.run_v2.ServicesAsyncClient.create_service", "method": { + "fullName": "google.cloud.run.v2.Services.CreateService", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "CreateService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.CreateServiceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "service", + "type": "google.cloud.run_v2.types.Service" + }, + { + "name": "service_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_service" }, + "description": "Sample for CreateService", "file": "run_v2_generated_services_create_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_CreateService_async", "segments": [ { @@ -310,18 +579,62 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_create_service_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.ServicesClient", + "shortName": "ServicesClient" + }, + "fullName": "google.cloud.run_v2.ServicesClient.create_service", "method": { + "fullName": "google.cloud.run.v2.Services.CreateService", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "CreateService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.CreateServiceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "service", + "type": "google.cloud.run_v2.types.Service" + }, + { + "name": "service_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_service" }, + "description": "Sample for CreateService", "file": "run_v2_generated_services_create_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_CreateService_sync", "segments": [ { @@ -354,19 +667,55 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_create_service_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.ServicesAsyncClient", + "shortName": "ServicesAsyncClient" + }, + "fullName": "google.cloud.run_v2.ServicesAsyncClient.delete_service", "method": { + "fullName": "google.cloud.run.v2.Services.DeleteService", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "DeleteService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.DeleteServiceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_service" }, + "description": "Sample for DeleteService", "file": "run_v2_generated_services_delete_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_DeleteService_async", "segments": [ { @@ -399,18 +748,54 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_delete_service_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.ServicesClient", + "shortName": "ServicesClient" + }, + "fullName": "google.cloud.run_v2.ServicesClient.delete_service", "method": { + "fullName": "google.cloud.run.v2.Services.DeleteService", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "DeleteService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.DeleteServiceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_service" }, + "description": "Sample for DeleteService", "file": "run_v2_generated_services_delete_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_DeleteService_sync", "segments": [ { @@ -443,108 +828,208 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_delete_service_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.ServicesAsyncClient", + "shortName": "ServicesAsyncClient" + }, + "fullName": "google.cloud.run_v2.ServicesAsyncClient.get_iam_policy", "method": { + "fullName": "google.cloud.run.v2.Services.GetIamPolicy", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "GetIamPolicy" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" }, + "description": "Sample for GetIamPolicy", "file": "run_v2_generated_services_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_GetIamPolicy_async", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 34, + "start": 32, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 39, + "start": 35, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_get_iam_policy_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.ServicesClient", + "shortName": "ServicesClient" + }, + "fullName": "google.cloud.run_v2.ServicesClient.get_iam_policy", "method": { + "fullName": "google.cloud.run.v2.Services.GetIamPolicy", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "GetIamPolicy" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" }, + "description": "Sample for GetIamPolicy", "file": "run_v2_generated_services_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_GetIamPolicy_sync", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 34, + "start": 32, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 39, + "start": 35, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_get_iam_policy_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.ServicesAsyncClient", + "shortName": "ServicesAsyncClient" + }, + "fullName": "google.cloud.run_v2.ServicesAsyncClient.get_service", "method": { + "fullName": "google.cloud.run.v2.Services.GetService", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "GetService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.GetServiceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.run_v2.types.Service", + "shortName": "get_service" }, + "description": "Sample for GetService", "file": "run_v2_generated_services_get_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_GetService_async", "segments": [ { @@ -577,18 +1062,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_get_service_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.ServicesClient", + "shortName": "ServicesClient" + }, + "fullName": "google.cloud.run_v2.ServicesClient.get_service", "method": { + "fullName": "google.cloud.run.v2.Services.GetService", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "GetService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.GetServiceRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.run_v2.types.Service", + "shortName": "get_service" }, + "description": "Sample for GetService", "file": "run_v2_generated_services_get_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_GetService_sync", "segments": [ { @@ -621,19 +1142,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_get_service_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.ServicesAsyncClient", + "shortName": "ServicesAsyncClient" + }, + "fullName": "google.cloud.run_v2.ServicesAsyncClient.list_services", "method": { + "fullName": "google.cloud.run.v2.Services.ListServices", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "ListServices" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.ListServicesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.run_v2.services.services.pagers.ListServicesAsyncPager", + "shortName": "list_services" }, + "description": "Sample for ListServices", "file": "run_v2_generated_services_list_services_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_ListServices_async", "segments": [ { @@ -666,18 +1223,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_list_services_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.ServicesClient", + "shortName": "ServicesClient" + }, + "fullName": "google.cloud.run_v2.ServicesClient.list_services", "method": { + "fullName": "google.cloud.run.v2.Services.ListServices", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "ListServices" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.ListServicesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.run_v2.services.services.pagers.ListServicesPager", + "shortName": "list_services" }, + "description": "Sample for ListServices", "file": "run_v2_generated_services_list_services_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_ListServices_sync", "segments": [ { @@ -710,197 +1303,365 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_list_services_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.ServicesAsyncClient", + "shortName": "ServicesAsyncClient" + }, + "fullName": "google.cloud.run_v2.ServicesAsyncClient.set_iam_policy", "method": { + "fullName": "google.cloud.run.v2.Services.SetIamPolicy", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "SetIamPolicy" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" }, + "description": "Sample for SetIamPolicy", "file": "run_v2_generated_services_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_SetIamPolicy_async", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 34, + "start": 32, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 39, + "start": 35, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_set_iam_policy_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.ServicesClient", + "shortName": "ServicesClient" + }, + "fullName": "google.cloud.run_v2.ServicesClient.set_iam_policy", "method": { + "fullName": "google.cloud.run.v2.Services.SetIamPolicy", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "SetIamPolicy" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" }, + "description": "Sample for SetIamPolicy", "file": "run_v2_generated_services_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_SetIamPolicy_sync", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 34, + "start": 32, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 39, + "start": 35, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_set_iam_policy_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.ServicesAsyncClient", + "shortName": "ServicesAsyncClient" + }, + "fullName": "google.cloud.run_v2.ServicesAsyncClient.test_iam_permissions", "method": { + "fullName": "google.cloud.run.v2.Services.TestIamPermissions", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "TestIamPermissions" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" }, + "description": "Sample for TestIamPermissions", "file": "run_v2_generated_services_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_TestIamPermissions_async", "segments": [ { - "end": 45, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 46, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 34, + "start": 32, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 40, + "start": 35, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 43, + "start": 41, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 47, + "start": 44, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_test_iam_permissions_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.ServicesClient", + "shortName": "ServicesClient" + }, + "fullName": "google.cloud.run_v2.ServicesClient.test_iam_permissions", "method": { + "fullName": "google.cloud.run.v2.Services.TestIamPermissions", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "TestIamPermissions" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" }, + "description": "Sample for TestIamPermissions", "file": "run_v2_generated_services_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_TestIamPermissions_sync", "segments": [ { - "end": 45, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 46, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 34, + "start": 32, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 40, + "start": 35, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 43, + "start": 41, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 47, + "start": 44, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_test_iam_permissions_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.run_v2.ServicesAsyncClient", + "shortName": "ServicesAsyncClient" + }, + "fullName": "google.cloud.run_v2.ServicesAsyncClient.update_service", "method": { + "fullName": "google.cloud.run.v2.Services.UpdateService", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "UpdateService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.UpdateServiceRequest" + }, + { + "name": "service", + "type": "google.cloud.run_v2.types.Service" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_service" }, + "description": "Sample for UpdateService", "file": "run_v2_generated_services_update_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_UpdateService_async", "segments": [ { @@ -933,18 +1694,58 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_update_service_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.run_v2.ServicesClient", + "shortName": "ServicesClient" + }, + "fullName": "google.cloud.run_v2.ServicesClient.update_service", "method": { + "fullName": "google.cloud.run.v2.Services.UpdateService", "service": { + "fullName": "google.cloud.run.v2.Services", "shortName": "Services" }, "shortName": "UpdateService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.run_v2.types.UpdateServiceRequest" + }, + { + "name": "service", + "type": "google.cloud.run_v2.types.Service" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_service" }, + "description": "Sample for UpdateService", "file": "run_v2_generated_services_update_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "run_v2_generated_Services_UpdateService_sync", "segments": [ { @@ -977,7 +1778,8 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "run_v2_generated_services_update_service_sync.py" } ] } From fb904730ab73177c531afd0d5b246a6d6fc73612 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 11:56:55 -0700 Subject: [PATCH 4/4] chore(main): release 0.2.0 (#8) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 17 +++++++++++++++++ setup.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2280b34..9cc8035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [0.2.0](https://github.com/googleapis/python-run/compare/v0.1.0...v0.2.0) (2022-04-14) + + +### Features + +* AuditConfig for IAM v1 ([43244bc](https://github.com/googleapis/python-run/commit/43244bc4aba7e70e21348dc3c3b78c430b2bedb9)) + + +### Bug Fixes + +* **deps:** require grpc-google-iam-v1 >=0.12.4 ([43244bc](https://github.com/googleapis/python-run/commit/43244bc4aba7e70e21348dc3c3b78c430b2bedb9)) + + +### Documentation + +* fix type in docstring for map fields ([43244bc](https://github.com/googleapis/python-run/commit/43244bc4aba7e70e21348dc3c3b78c430b2bedb9)) + ## 0.1.0 (2022-04-03) diff --git a/setup.py b/setup.py index 0d667ac..78e1636 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-run" description = "Cloud Run API client library" -version = "0.1.0" +version = "0.2.0" release_status = "Development Status :: 4 - Beta" url = "https://github.com/googleapis/python-run" dependencies = [