diff --git a/packages/google-cloud-bigquery-analyticshub/README.rst b/packages/google-cloud-bigquery-analyticshub/README.rst index 98c3233555d6..5d28c6aee488 100644 --- a/packages/google-cloud-bigquery-analyticshub/README.rst +++ b/packages/google-cloud-bigquery-analyticshub/README.rst @@ -15,7 +15,7 @@ Python Client for BigQuery Analytics Hub .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-bigquery-analyticshub.svg :target: https://pypi.org/project/google-cloud-bigquery-analyticshub/ .. _BigQuery Analytics Hub: https://cloud.google.com/analytics-hub -.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/analyticshub/latest +.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/analyticshub/latest/summary_overview .. _Product Documentation: https://cloud.google.com/analytics-hub Quick Start diff --git a/packages/google-cloud-bigquery-analyticshub/docs/index.rst b/packages/google-cloud-bigquery-analyticshub/docs/index.rst index 42d88b6d9626..8429653d3be3 100644 --- a/packages/google-cloud-bigquery-analyticshub/docs/index.rst +++ b/packages/google-cloud-bigquery-analyticshub/docs/index.rst @@ -21,3 +21,8 @@ For a list of all ``google-cloud-bigquery-analyticshub`` releases: :maxdepth: 2 CHANGELOG + +.. toctree:: + :hidden: + + summary_overview.md diff --git a/packages/google-cloud-bigquery-analyticshub/docs/summary_overview.md b/packages/google-cloud-bigquery-analyticshub/docs/summary_overview.md new file mode 100644 index 000000000000..620b8182e80a --- /dev/null +++ b/packages/google-cloud-bigquery-analyticshub/docs/summary_overview.md @@ -0,0 +1,22 @@ +[ +This is a templated file. Adding content to this file may result in it being +reverted. Instead, if you want to place additional content, create an +"overview_content.md" file in `docs/` directory. The Sphinx tool will +pick up on the content and merge the content. +]: # + +# BigQuery Analytics Hub API + +Overview of the APIs available for BigQuery Analytics Hub API. + +## All entries + +Classes, methods and properties & attributes for +BigQuery Analytics Hub API. + +[classes](https://cloud.google.com/python/docs/reference/analyticshub/latest/summary_class.html) + +[methods](https://cloud.google.com/python/docs/reference/analyticshub/latest/summary_method.html) + +[properties and +attributes](https://cloud.google.com/python/docs/reference/analyticshub/latest/summary_property.html) diff --git a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/__init__.py b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/__init__.py index c85d1c17a9ae..5053fd835dce 100644 --- a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/__init__.py +++ b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub/__init__.py @@ -34,6 +34,7 @@ DeleteSubscriptionRequest, DestinationDataset, DestinationDatasetReference, + DiscoveryType, GetDataExchangeRequest, GetListingRequest, GetSubscriptionRequest, @@ -104,4 +105,5 @@ "Subscription", "UpdateDataExchangeRequest", "UpdateListingRequest", + "DiscoveryType", ) diff --git a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/__init__.py b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/__init__.py index c45ff3e63780..815d5dc9366b 100644 --- a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/__init__.py +++ b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/__init__.py @@ -32,6 +32,7 @@ DeleteSubscriptionRequest, DestinationDataset, DestinationDatasetReference, + DiscoveryType, GetDataExchangeRequest, GetListingRequest, GetSubscriptionRequest, @@ -74,6 +75,7 @@ "DeleteSubscriptionRequest", "DestinationDataset", "DestinationDatasetReference", + "DiscoveryType", "GetDataExchangeRequest", "GetListingRequest", "GetSubscriptionRequest", diff --git a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/__init__.py b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/__init__.py index 16f2fa543f5a..81fb071de147 100644 --- a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/__init__.py +++ b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/__init__.py @@ -23,6 +23,7 @@ DeleteSubscriptionRequest, DestinationDataset, DestinationDatasetReference, + DiscoveryType, GetDataExchangeRequest, GetListingRequest, GetSubscriptionRequest, @@ -91,4 +92,5 @@ "Subscription", "UpdateDataExchangeRequest", "UpdateListingRequest", + "DiscoveryType", ) diff --git a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/analyticshub.py b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/analyticshub.py index dab608263fb0..673bc1391824 100644 --- a/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/analyticshub.py +++ b/packages/google-cloud-bigquery-analyticshub/google/cloud/bigquery_analyticshub_v1/types/analyticshub.py @@ -25,6 +25,7 @@ __protobuf__ = proto.module( package="google.cloud.bigquery.analyticshub.v1", manifest={ + "DiscoveryType", "DataExchange", "SharingEnvironmentConfig", "DataProvider", @@ -66,11 +67,34 @@ ) +class DiscoveryType(proto.Enum): + r"""Specifies the type of discovery on the discovery page. Note + that this does not control the visibility of the + exchange/listing which is defined by IAM permission. + + Values: + DISCOVERY_TYPE_UNSPECIFIED (0): + Unspecified. Defaults to DISCOVERY_TYPE_PRIVATE. + DISCOVERY_TYPE_PRIVATE (1): + The Data exchange/listing can be discovered + in the 'Private' results list. + DISCOVERY_TYPE_PUBLIC (2): + The Data exchange/listing can be discovered + in the 'Public' results list. + """ + DISCOVERY_TYPE_UNSPECIFIED = 0 + DISCOVERY_TYPE_PRIVATE = 1 + DISCOVERY_TYPE_PUBLIC = 2 + + class DataExchange(proto.Message): r"""A data exchange is a container that lets you share data. Along with the descriptive information about the data exchange, it contains listings that reference shared datasets. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: name (str): Output only. The resource name of the data exchange. e.g. @@ -111,6 +135,13 @@ class DataExchange(proto.Message): sharing_environment_config (google.cloud.bigquery_analyticshub_v1.types.SharingEnvironmentConfig): Optional. Configurable data sharing environment option for a data exchange. + discovery_type (google.cloud.bigquery_analyticshub_v1.types.DiscoveryType): + Optional. Type of discovery on the discovery page for all + the listings under this exchange. Updating this field also + updates (overwrites) the discovery_type field for all the + listings under this exchange. + + This field is a member of `oneof`_ ``_discovery_type``. """ name: str = proto.Field( @@ -146,6 +177,12 @@ class DataExchange(proto.Message): number=8, message="SharingEnvironmentConfig", ) + discovery_type: "DiscoveryType" = proto.Field( + proto.ENUM, + number=9, + optional=True, + enum="DiscoveryType", + ) class SharingEnvironmentConfig(proto.Message): @@ -425,6 +462,11 @@ class Listing(proto.Message): Optional. If set, restricted export configuration will be propagated and enforced on the linked dataset. + discovery_type (google.cloud.bigquery_analyticshub_v1.types.DiscoveryType): + Optional. Type of discovery of the listing on + the discovery page. + + This field is a member of `oneof`_ ``_discovery_type``. """ class State(proto.Enum): @@ -525,6 +567,10 @@ class BigQueryDatasetSource(proto.Message): the entire dataset (all resources) are shared. This field is only valid for data clean room exchanges. + restricted_export_policy (google.cloud.bigquery_analyticshub_v1.types.Listing.BigQueryDatasetSource.RestrictedExportPolicy): + Optional. If set, restricted export policy + will be propagated and enforced on the linked + dataset. """ class SelectedResource(proto.Message): @@ -547,6 +593,39 @@ class SelectedResource(proto.Message): oneof="resource", ) + class RestrictedExportPolicy(proto.Message): + r"""Restricted export policy used to configure restricted export + on linked dataset. + + Attributes: + enabled (google.protobuf.wrappers_pb2.BoolValue): + Optional. If true, enable restricted export. + restrict_direct_table_access (google.protobuf.wrappers_pb2.BoolValue): + Optional. If true, restrict direct table + access (read api/tabledata.list) on linked + table. + restrict_query_result (google.protobuf.wrappers_pb2.BoolValue): + Optional. If true, restrict export of query + result derived from restricted linked dataset + table. + """ + + enabled: wrappers_pb2.BoolValue = proto.Field( + proto.MESSAGE, + number=1, + message=wrappers_pb2.BoolValue, + ) + restrict_direct_table_access: wrappers_pb2.BoolValue = proto.Field( + proto.MESSAGE, + number=2, + message=wrappers_pb2.BoolValue, + ) + restrict_query_result: wrappers_pb2.BoolValue = proto.Field( + proto.MESSAGE, + number=3, + message=wrappers_pb2.BoolValue, + ) + dataset: str = proto.Field( proto.STRING, number=1, @@ -558,6 +637,11 @@ class SelectedResource(proto.Message): number=2, message="Listing.BigQueryDatasetSource.SelectedResource", ) + restricted_export_policy: "Listing.BigQueryDatasetSource.RestrictedExportPolicy" = proto.Field( + proto.MESSAGE, + number=3, + message="Listing.BigQueryDatasetSource.RestrictedExportPolicy", + ) class RestrictedExportConfig(proto.Message): r"""Restricted export config, used to configure restricted export @@ -647,6 +731,12 @@ class RestrictedExportConfig(proto.Message): number=13, message=RestrictedExportConfig, ) + discovery_type: "DiscoveryType" = proto.Field( + proto.ENUM, + number=14, + optional=True, + enum="DiscoveryType", + ) class Subscription(proto.Message): @@ -1142,8 +1232,8 @@ class SubscribeListingRequest(proto.Message): Attributes: destination_dataset (google.cloud.bigquery_analyticshub_v1.types.DestinationDataset): - BigQuery destination dataset to create for - the subscriber. + Input only. BigQuery destination dataset to + create for the subscriber. This field is a member of `oneof`_ ``destination``. name (str): @@ -1285,8 +1375,22 @@ class ListSubscriptionsRequest(proto.Message): subscription. e.g. projects/myproject/locations/US filter (str): - The filter expression may be used to filter - by Data Exchange or Listing. + An expression for filtering the results of the request. + Eligible fields for filtering are: + + - ``listing`` + - ``data_exchange`` + + Alternatively, a literal wrapped in double quotes may be + provided. This will be checked for an exact match against + both fields above. + + In all cases, the full Data Exchange or Listing resource + name must be provided. Some example of using filters: + + - data_exchange="projects/myproject/locations/us/dataExchanges/123" + - listing="projects/123/locations/us/dataExchanges/456/listings/789" + - "projects/myproject/locations/us/dataExchanges/123". page_size (int): The maximum number of results to return in a single response page. diff --git a/packages/google-cloud-bigquery-analyticshub/noxfile.py b/packages/google-cloud-bigquery-analyticshub/noxfile.py index 1e6cd48d0529..67b7265f7586 100644 --- a/packages/google-cloud-bigquery-analyticshub/noxfile.py +++ b/packages/google-cloud-bigquery-analyticshub/noxfile.py @@ -160,14 +160,28 @@ def install_unittest_dependencies(session, *constraints): session.install("-e", ".", *constraints) -def default(session): +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) +@nox.parametrize( + "protobuf_implementation", + ["python", "upb", "cpp"], +) +def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"): + session.skip("cpp implementation is not supported in python 3.11+") + constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) + # TODO(https://github.com/googleapis/synthtool/issues/1976): + # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. + # The 'cpp' implementation requires Protobuf<4. + if protobuf_implementation == "cpp": + session.install("protobuf<4") + # Run py.test against the unit tests. session.run( "py.test", @@ -181,15 +195,12 @@ def default(session): "--cov-fail-under=0", os.path.join("tests", "unit"), *session.posargs, + env={ + "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, + }, ) -@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) -def unit(session): - """Run the unit test suite.""" - default(session) - - def install_systemtest_dependencies(session, *constraints): # Use pre-release gRPC for system tests. # Exclude version 1.52.0rc1 which has a known issue. @@ -358,9 +369,16 @@ def docfx(session): @nox.session(python="3.12") -def prerelease_deps(session): +@nox.parametrize( + "protobuf_implementation", + ["python", "upb", "cpp"], +) +def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"): + session.skip("cpp implementation is not supported in python 3.11+") + # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES @@ -397,9 +415,9 @@ def prerelease_deps(session): "protobuf", # dependency of grpc "six", + "grpc-google-iam-v1", "googleapis-common-protos", - # Exclude version 1.52.0rc1 which has a known issue. See https://github.com/grpc/grpc/issues/32163 - "grpcio!=1.52.0rc1", + "grpcio", "grpcio-status", "google-api-core", "google-auth", @@ -425,4 +443,10 @@ def prerelease_deps(session): session.run("python", "-c", "import grpc; print(grpc.__version__)") session.run("python", "-c", "import google.auth; print(google.auth.__version__)") - session.run("py.test", "tests/unit") + session.run( + "py.test", + "tests/unit", + env={ + "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, + }, + ) diff --git a/packages/google-cloud-bigquery-analyticshub/tests/unit/gapic/bigquery_analyticshub_v1/test_analytics_hub_service.py b/packages/google-cloud-bigquery-analyticshub/tests/unit/gapic/bigquery_analyticshub_v1/test_analytics_hub_service.py index efe5a591efd4..451524badc80 100644 --- a/packages/google-cloud-bigquery-analyticshub/tests/unit/gapic/bigquery_analyticshub_v1/test_analytics_hub_service.py +++ b/packages/google-cloud-bigquery-analyticshub/tests/unit/gapic/bigquery_analyticshub_v1/test_analytics_hub_service.py @@ -2369,6 +2369,7 @@ def test_get_data_exchange(request_type, transport: str = "grpc"): documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) response = client.get_data_exchange(request) @@ -2387,6 +2388,7 @@ def test_get_data_exchange(request_type, transport: str = "grpc"): assert response.documentation == "documentation_value" assert response.listing_count == 1410 assert response.icon == b"icon_blob" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE def test_get_data_exchange_empty_call(): @@ -2500,6 +2502,7 @@ async def test_get_data_exchange_empty_call_async(): documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.get_data_exchange() @@ -2581,6 +2584,7 @@ async def test_get_data_exchange_async( documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.get_data_exchange(request) @@ -2600,6 +2604,7 @@ async def test_get_data_exchange_async( assert response.documentation == "documentation_value" assert response.listing_count == 1410 assert response.icon == b"icon_blob" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE @pytest.mark.asyncio @@ -2788,6 +2793,7 @@ def test_create_data_exchange(request_type, transport: str = "grpc"): documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) response = client.create_data_exchange(request) @@ -2806,6 +2812,7 @@ def test_create_data_exchange(request_type, transport: str = "grpc"): assert response.documentation == "documentation_value" assert response.listing_count == 1410 assert response.icon == b"icon_blob" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE def test_create_data_exchange_empty_call(): @@ -2923,6 +2930,7 @@ async def test_create_data_exchange_empty_call_async(): documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.create_data_exchange() @@ -3004,6 +3012,7 @@ async def test_create_data_exchange_async( documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.create_data_exchange(request) @@ -3023,6 +3032,7 @@ async def test_create_data_exchange_async( assert response.documentation == "documentation_value" assert response.listing_count == 1410 assert response.icon == b"icon_blob" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE @pytest.mark.asyncio @@ -3221,6 +3231,7 @@ def test_update_data_exchange(request_type, transport: str = "grpc"): documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) response = client.update_data_exchange(request) @@ -3239,6 +3250,7 @@ def test_update_data_exchange(request_type, transport: str = "grpc"): assert response.documentation == "documentation_value" assert response.listing_count == 1410 assert response.icon == b"icon_blob" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE def test_update_data_exchange_empty_call(): @@ -3350,6 +3362,7 @@ async def test_update_data_exchange_empty_call_async(): documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.update_data_exchange() @@ -3431,6 +3444,7 @@ async def test_update_data_exchange_async( documentation="documentation_value", listing_count=1410, icon=b"icon_blob", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.update_data_exchange(request) @@ -3450,6 +3464,7 @@ async def test_update_data_exchange_async( assert response.documentation == "documentation_value" assert response.listing_count == 1410 assert response.icon == b"icon_blob" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE @pytest.mark.asyncio @@ -4584,6 +4599,7 @@ def test_get_listing(request_type, transport: str = "grpc"): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) response = client.get_listing(request) @@ -4604,6 +4620,7 @@ def test_get_listing(request_type, transport: str = "grpc"): assert response.icon == b"icon_blob" assert response.categories == [analyticshub.Listing.Category.CATEGORY_OTHERS] assert response.request_access == "request_access_value" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE def test_get_listing_empty_call(): @@ -4711,6 +4728,7 @@ async def test_get_listing_empty_call_async(): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.get_listing() @@ -4792,6 +4810,7 @@ async def test_get_listing_async( icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.get_listing(request) @@ -4813,6 +4832,7 @@ async def test_get_listing_async( assert response.icon == b"icon_blob" assert response.categories == [analyticshub.Listing.Category.CATEGORY_OTHERS] assert response.request_access == "request_access_value" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE @pytest.mark.asyncio @@ -4993,6 +5013,7 @@ def test_create_listing(request_type, transport: str = "grpc"): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) response = client.create_listing(request) @@ -5013,6 +5034,7 @@ def test_create_listing(request_type, transport: str = "grpc"): assert response.icon == b"icon_blob" assert response.categories == [analyticshub.Listing.Category.CATEGORY_OTHERS] assert response.request_access == "request_access_value" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE def test_create_listing_empty_call(): @@ -5122,6 +5144,7 @@ async def test_create_listing_empty_call_async(): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.create_listing() @@ -5203,6 +5226,7 @@ async def test_create_listing_async( icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.create_listing(request) @@ -5224,6 +5248,7 @@ async def test_create_listing_async( assert response.icon == b"icon_blob" assert response.categories == [analyticshub.Listing.Category.CATEGORY_OTHERS] assert response.request_access == "request_access_value" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE @pytest.mark.asyncio @@ -5438,6 +5463,7 @@ def test_update_listing(request_type, transport: str = "grpc"): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) response = client.update_listing(request) @@ -5458,6 +5484,7 @@ def test_update_listing(request_type, transport: str = "grpc"): assert response.icon == b"icon_blob" assert response.categories == [analyticshub.Listing.Category.CATEGORY_OTHERS] assert response.request_access == "request_access_value" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE def test_update_listing_empty_call(): @@ -5561,6 +5588,7 @@ async def test_update_listing_empty_call_async(): icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.update_listing() @@ -5642,6 +5670,7 @@ async def test_update_listing_async( icon=b"icon_blob", categories=[analyticshub.Listing.Category.CATEGORY_OTHERS], request_access="request_access_value", + discovery_type=analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE, ) ) response = await client.update_listing(request) @@ -5663,6 +5692,7 @@ async def test_update_listing_async( assert response.icon == b"icon_blob" assert response.categories == [analyticshub.Listing.Category.CATEGORY_OTHERS] assert response.request_access == "request_access_value" + assert response.discovery_type == analyticshub.DiscoveryType.DISCOVERY_TYPE_PRIVATE @pytest.mark.asyncio