diff --git a/google/cloud/bigquery/analyticshub/v1/BUILD.bazel b/google/cloud/bigquery/analyticshub/v1/BUILD.bazel index 83e144934c737..a834c59405d1b 100644 --- a/google/cloud/bigquery/analyticshub/v1/BUILD.bazel +++ b/google/cloud/bigquery/analyticshub/v1/BUILD.bazel @@ -9,14 +9,17 @@ # * extra_protoc_file_parameters # The complete list of preserved parameters can be found in the source code. +# buildifier: disable=load-on-top + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## -load("@rules_proto//proto:defs.bzl", "proto_library") +# buildifier: disable=same-origin-load load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") +load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( name = "analyticshub_proto", @@ -49,6 +52,7 @@ proto_library_with_info( ############################################################################## # Java ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "java_gapic_assembly_gradle_pkg", @@ -77,8 +81,8 @@ java_gapic_library( rest_numeric_enums = False, service_yaml = "analyticshub_v1.yaml", test_deps = [ - "//google/iam/v1:iam_java_grpc", ":analyticshub_java_grpc", + "//google/iam/v1:iam_java_grpc", ], transport = "grpc+rest", deps = [ @@ -113,6 +117,7 @@ java_gapic_assembly_gradle_pkg( ############################################################################## # Go ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "go_gapic_assembly_pkg", @@ -166,6 +171,7 @@ go_gapic_assembly_pkg( ############################################################################## # Python ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "py_gapic_assembly_pkg", @@ -210,6 +216,7 @@ py_gapic_assembly_pkg( ############################################################################## # PHP ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "php_gapic_assembly_pkg", @@ -247,6 +254,7 @@ php_gapic_assembly_pkg( ############################################################################## # Node.js ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "nodejs_gapic_assembly_pkg", @@ -277,6 +285,7 @@ nodejs_gapic_assembly_pkg( ############################################################################## # Ruby ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "ruby_cloud_gapic_library", @@ -330,6 +339,7 @@ ruby_gapic_assembly_pkg( ############################################################################## # C# ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "csharp_gapic_assembly_pkg", @@ -340,7 +350,6 @@ load( csharp_proto_library( name = "analyticshub_csharp_proto", - extra_opts = [], deps = [":analyticshub_proto"], ) @@ -357,6 +366,7 @@ csharp_gapic_library( grpc_service_config = "analyticshub_v1_grpc_service_config.json", rest_numeric_enums = False, service_yaml = "analyticshub_v1.yaml", + transport = "grpc+rest", deps = [ ":analyticshub_csharp_grpc", ":analyticshub_csharp_proto", @@ -376,6 +386,7 @@ csharp_gapic_assembly_pkg( ############################################################################## # C++ ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "cc_grpc_library", diff --git a/google/cloud/bigquery/analyticshub/v1/analyticshub.proto b/google/cloud/bigquery/analyticshub/v1/analyticshub.proto index b947b88f3ce1a..5f4d87bb042cd 100644 --- a/google/cloud/bigquery/analyticshub/v1/analyticshub.proto +++ b/google/cloud/bigquery/analyticshub/v1/analyticshub.proto @@ -39,6 +39,10 @@ option (google.api.resource_definition) = { type: "bigquery.googleapis.com/Dataset" pattern: "projects/{project}/datasets/{dataset}" }; +option (google.api.resource_definition) = { + type: "bigquery.googleapis.com/Table" + pattern: "projects/{project}/datasets/{dataset}/tables/{table}" +}; // The `AnalyticsHubService` API facilitates data sharing within and across // organizations. It allows data providers to publish listings that reference @@ -256,6 +260,10 @@ service AnalyticsHubService { post: "/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy" body: "*" } + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/subscriptions/*}:getIamPolicy" + body: "*" + } }; } @@ -269,6 +277,10 @@ service AnalyticsHubService { post: "/v1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy" body: "*" } + additional_bindings { + post: "/v1/{resource=projects/*/locations/*/subscriptions/*}:setIamPolicy" + body: "*" + } }; } @@ -341,7 +353,24 @@ message SharingEnvironmentConfig { message DefaultExchangeConfig {} // Data Clean Room (DCR), used for privacy-safe and secured data sharing. - message DcrExchangeConfig {} + message DcrExchangeConfig { + // Output only. If True, this DCR restricts the contributors to sharing + // only a single resource in a Listing. And no two resources should have the + // same IDs. So if a contributor adds a view with a conflicting name, the + // CreateListing API will reject the request. if False, the data contributor + // can publish an entire dataset (as before). This is not configurable, and + // by default, all new DCRs will have the restriction set to True. + optional bool single_selected_resource_sharing_restriction = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If True, when subscribing to this DCR, it will create only + // one linked dataset containing all resources shared within the + // cleanroom. If False, when subscribing to this DCR, it will + // create 1 linked dataset per listing. This is not configurable, and by + // default, all new DCRs will have the restriction set to True. + optional bool single_linked_dataset_per_cleanroom = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } oneof environment { // Default Analytics Hub data exchange, used for secured data sharing. @@ -428,11 +457,33 @@ message Listing { // the subscriber's project. A Linked dataset is an opaque, read-only BigQuery // dataset that serves as a _symbolic link_ to a shared dataset. message BigQueryDatasetSource { + // Resource in this dataset that are selectively shared. + message SelectedResource { + oneof resource { + // Optional. Format: + // For table: + // `projects/{projectId}/datasets/{datasetId}/tables/{tableId}` + // Example:"projects/test_project/datasets/test_dataset/tables/test_table" + string table = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigquery.googleapis.com/Table" + } + ]; + } + } + // Resource name of the dataset source for this listing. // e.g. `projects/myproject/datasets/123` string dataset = 1 [(google.api.resource_reference) = { type: "bigquery.googleapis.com/Dataset" }]; + + // Optional. Resources in this dataset that are selectively shared. + // If this field is empty, then the entire dataset (all resources) are + // shared. This field is only valid for data clean room exchanges. + repeated SelectedResource selected_resources = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Restricted export config, used to configure restricted export on linked