Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.65.2 (#5)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.65.2

PiperOrigin-RevId: 444333013

Source-Link: googleapis/googleapis@f91b6cf

Source-Link: googleapis/googleapis-gen@16eb360
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9

* 🦉 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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Apr 27, 2022
1 parent 9358606 commit 586d550
Show file tree
Hide file tree
Showing 14 changed files with 1,534 additions and 355 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -599,7 +599,6 @@ def list_org_data_exchanges(
r"""Lists DataExchanges from projects in a given
organization and location.
.. code-block:: python
from google.cloud import bigquery_data_exchange_v1beta1
Expand Down Expand Up @@ -812,7 +811,6 @@ def create_data_exchange(
r"""Creates a new DataExchange in a given project and
location.
.. code-block:: python
from google.cloud import bigquery_data_exchange_v1beta1
Expand Down Expand Up @@ -1325,7 +1323,6 @@ def create_listing(
r"""Creates a new Listing in a given project and
location.
.. code-block:: python
from google.cloud import bigquery_data_exchange_v1beta1
Expand Down Expand Up @@ -1551,7 +1548,6 @@ def delete_listing(
subscriptions associated with the source of this
Listing.
.. code-block:: python
from google.cloud import bigquery_data_exchange_v1beta1
Expand Down Expand Up @@ -1638,7 +1634,6 @@ def subscribe_listing(
BigQuery dataset, Data Exchange creates a linked dataset
in the subscriber's project.
.. code-block:: python
from google.cloud import bigquery_data_exchange_v1beta1
Expand Down Expand Up @@ -1742,13 +1737,14 @@ def get_iam_policy(
.. code-block:: python
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_get_iam_policy():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.GetIamPolicyRequest(
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)
Expand All @@ -1770,21 +1766,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": [
Expand All @@ -1799,17 +1800,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 -
Expand All @@ -1820,11 +1821,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.
Expand Down Expand Up @@ -1870,13 +1872,14 @@ def set_iam_policy(
.. code-block:: python
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_set_iam_policy():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.SetIamPolicyRequest(
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)
Expand All @@ -1898,21 +1901,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": [
Expand All @@ -1927,17 +1935,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 -
Expand All @@ -1948,11 +1956,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.
Expand Down Expand Up @@ -1996,17 +2005,17 @@ def test_iam_permissions(
r"""Returns the permissions that a caller has on a
specified dataExchange or listing.
.. code-block:: python
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore
def sample_test_iam_permissions():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()
# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.TestIamPermissionsRequest(
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value_1', 'permissions_value_2'],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,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"
Expand Down Expand Up @@ -362,5 +363,9 @@ def test_iam_permissions(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("AnalyticsHubServiceTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -650,5 +650,9 @@ def test_iam_permissions(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("AnalyticsHubServiceGrpcTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class DestinationDataset(proto.Message):
description (google.protobuf.wrappers_pb2.StringValue):
Optional. A user-friendly description of the
dataset.
labels (Sequence[google.cloud.bigquery_data_exchange_v1beta1.types.DestinationDataset.LabelsEntry]):
labels (Mapping[str, str]):
Optional. The labels associated with this
dataset. You can use these to organize and group
your datasets. You can set this property when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@

# [START analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_async]
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore


async def sample_get_iam_policy():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()

# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.GetIamPolicyRequest(
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@

# [START analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync]
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore


def sample_get_iam_policy():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()

# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.GetIamPolicyRequest(
request = iam_policy_pb2.GetIamPolicyRequest(
resource="resource_value",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@

# [START analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_async]
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore


async def sample_set_iam_policy():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()

# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.SetIamPolicyRequest(
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@

# [START analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync]
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore


def sample_set_iam_policy():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()

# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.SetIamPolicyRequest(
request = iam_policy_pb2.SetIamPolicyRequest(
resource="resource_value",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@

# [START analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_async]
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore


async def sample_test_iam_permissions():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceAsyncClient()

# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.TestIamPermissionsRequest(
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value_1', 'permissions_value_2'],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@

# [START analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync]
from google.cloud import bigquery_data_exchange_v1beta1
from google.iam.v1 import iam_policy_pb2 # type: ignore


def sample_test_iam_permissions():
# Create a client
client = bigquery_data_exchange_v1beta1.AnalyticsHubServiceClient()

# Initialize request argument(s)
request = bigquery_data_exchange_v1beta1.TestIamPermissionsRequest(
request = iam_policy_pb2.TestIamPermissionsRequest(
resource="resource_value",
permissions=['permissions_value_1', 'permissions_value_2'],
)
Expand Down
Loading

0 comments on commit 586d550

Please sign in to comment.