dataexchange.proto 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.bigquery.dataexchange.v1beta1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/iam/v1/iam_policy.proto";
  21. import "google/iam/v1/policy.proto";
  22. import "google/protobuf/empty.proto";
  23. import "google/protobuf/field_mask.proto";
  24. import "google/protobuf/wrappers.proto";
  25. option csharp_namespace = "Google.Cloud.BigQuery.DataExchange.V1Beta1";
  26. option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/dataexchange/v1beta1;dataexchange";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "DataExchangeProto";
  29. option java_package = "com.google.cloud.bigquery.dataexchange.v1beta1";
  30. option php_namespace = "Google\\Cloud\\BigQuery\\DataExchange\\V1beta1";
  31. option ruby_package = "Google::Cloud::Bigquery::DataExchange::V1beta1";
  32. option (google.api.resource_definition) = {
  33. type: "bigquery.googleapis.com/Dataset"
  34. pattern: "projects/{project}/datasets/{dataset}"
  35. };
  36. // The `AnalyticsHubService` API facilitates data sharing within and across
  37. // organizations. It allows data providers to publish listings that reference
  38. // shared datasets. With Analytics Hub, users can discover and search for
  39. // listings that they have access to. Subscribers can view and subscribe to
  40. // listings. When you subscribe to a listing, Analytics Hub creates a linked
  41. // dataset in your project.
  42. service AnalyticsHubService {
  43. option (google.api.default_host) = "analyticshub.googleapis.com";
  44. option (google.api.oauth_scopes) =
  45. "https://www.googleapis.com/auth/bigquery,"
  46. "https://www.googleapis.com/auth/cloud-platform";
  47. // Lists all data exchanges in a given project and location.
  48. rpc ListDataExchanges(ListDataExchangesRequest) returns (ListDataExchangesResponse) {
  49. option (google.api.http) = {
  50. get: "/v1beta1/{parent=projects/*/locations/*}/dataExchanges"
  51. };
  52. option (google.api.method_signature) = "parent";
  53. }
  54. // Lists all data exchanges from projects in a given organization and
  55. // location.
  56. rpc ListOrgDataExchanges(ListOrgDataExchangesRequest) returns (ListOrgDataExchangesResponse) {
  57. option (google.api.http) = {
  58. get: "/v1beta1/{organization=organizations/*/locations/*}/dataExchanges"
  59. };
  60. option (google.api.method_signature) = "organization";
  61. }
  62. // Gets the details of a data exchange.
  63. rpc GetDataExchange(GetDataExchangeRequest) returns (DataExchange) {
  64. option (google.api.http) = {
  65. get: "/v1beta1/{name=projects/*/locations/*/dataExchanges/*}"
  66. };
  67. option (google.api.method_signature) = "name";
  68. }
  69. // Creates a new data exchange.
  70. rpc CreateDataExchange(CreateDataExchangeRequest) returns (DataExchange) {
  71. option (google.api.http) = {
  72. post: "/v1beta1/{parent=projects/*/locations/*}/dataExchanges"
  73. body: "data_exchange"
  74. };
  75. option (google.api.method_signature) = "parent,data_exchange";
  76. }
  77. // Updates an existing data exchange.
  78. rpc UpdateDataExchange(UpdateDataExchangeRequest) returns (DataExchange) {
  79. option (google.api.http) = {
  80. patch: "/v1beta1/{data_exchange.name=projects/*/locations/*/dataExchanges/*}"
  81. body: "data_exchange"
  82. };
  83. option (google.api.method_signature) = "data_exchange,update_mask";
  84. }
  85. // Deletes an existing data exchange.
  86. rpc DeleteDataExchange(DeleteDataExchangeRequest) returns (google.protobuf.Empty) {
  87. option (google.api.http) = {
  88. delete: "/v1beta1/{name=projects/*/locations/*/dataExchanges/*}"
  89. };
  90. option (google.api.method_signature) = "name";
  91. }
  92. // Lists all listings in a given project and location.
  93. rpc ListListings(ListListingsRequest) returns (ListListingsResponse) {
  94. option (google.api.http) = {
  95. get: "/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings"
  96. };
  97. option (google.api.method_signature) = "parent";
  98. }
  99. // Gets the details of a listing.
  100. rpc GetListing(GetListingRequest) returns (Listing) {
  101. option (google.api.http) = {
  102. get: "/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}"
  103. };
  104. option (google.api.method_signature) = "name";
  105. }
  106. // Creates a new listing.
  107. rpc CreateListing(CreateListingRequest) returns (Listing) {
  108. option (google.api.http) = {
  109. post: "/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings"
  110. body: "listing"
  111. };
  112. option (google.api.method_signature) = "parent,listing";
  113. }
  114. // Updates an existing listing.
  115. rpc UpdateListing(UpdateListingRequest) returns (Listing) {
  116. option (google.api.http) = {
  117. patch: "/v1beta1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}"
  118. body: "listing"
  119. };
  120. option (google.api.method_signature) = "listing,update_mask";
  121. }
  122. // Deletes a listing.
  123. rpc DeleteListing(DeleteListingRequest) returns (google.protobuf.Empty) {
  124. option (google.api.http) = {
  125. delete: "/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}"
  126. };
  127. option (google.api.method_signature) = "name";
  128. }
  129. // Subscribes to a listing.
  130. //
  131. // Currently, with Analytics Hub, you can create listings that
  132. // reference only BigQuery datasets.
  133. // Upon subscription to a listing for a BigQuery dataset, Analytics Hub
  134. // creates a linked dataset in the subscriber's project.
  135. rpc SubscribeListing(SubscribeListingRequest) returns (SubscribeListingResponse) {
  136. option (google.api.http) = {
  137. post: "/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe"
  138. body: "*"
  139. };
  140. option (google.api.method_signature) = "name";
  141. }
  142. // Gets the IAM policy.
  143. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  144. option (google.api.http) = {
  145. post: "/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy"
  146. body: "*"
  147. additional_bindings {
  148. post: "/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy"
  149. body: "*"
  150. }
  151. };
  152. }
  153. // Sets the IAM policy.
  154. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  155. option (google.api.http) = {
  156. post: "/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy"
  157. body: "*"
  158. additional_bindings {
  159. post: "/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy"
  160. body: "*"
  161. }
  162. };
  163. }
  164. // Returns the permissions that a caller has.
  165. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  166. option (google.api.http) = {
  167. post: "/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions"
  168. body: "*"
  169. additional_bindings {
  170. post: "/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions"
  171. body: "*"
  172. }
  173. };
  174. }
  175. }
  176. // A data exchange is a container that lets you share data. Along with the
  177. // descriptive information about the data exchange, it contains listings that
  178. // reference shared datasets.
  179. message DataExchange {
  180. option (google.api.resource) = {
  181. type: "analyticshub.googleapis.com/DataExchange"
  182. pattern: "projects/{project}/locations/{location}/dataExchanges/{data_exchange}"
  183. };
  184. // Output only. The resource name of the data exchange.
  185. // e.g. `projects/myproject/locations/US/dataExchanges/123`.
  186. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  187. // Required. Human-readable display name of the data exchange. The display name must
  188. // contain only Unicode letters, numbers (0-9), underscores (_), dashes (-),
  189. // spaces ( ), ampersands (&) and must not start or end with spaces.
  190. // Default value is an empty string.
  191. // Max length: 63 bytes.
  192. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  193. // Optional. Description of the data exchange. The description must not contain Unicode
  194. // non-characters as well as C0 and C1 control codes except tabs (HT),
  195. // new lines (LF), carriage returns (CR), and page breaks (FF).
  196. // Default value is an empty string.
  197. // Max length: 2000 bytes.
  198. string description = 3 [(google.api.field_behavior) = OPTIONAL];
  199. // Optional. Email or URL of the primary point of contact of the data exchange.
  200. // Max Length: 1000 bytes.
  201. string primary_contact = 4 [(google.api.field_behavior) = OPTIONAL];
  202. // Optional. Documentation describing the data exchange.
  203. string documentation = 5 [(google.api.field_behavior) = OPTIONAL];
  204. // Output only. Number of listings contained in the data exchange.
  205. int32 listing_count = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  206. // Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB
  207. // Expected image dimensions are 512x512 pixels, however the API only
  208. // performs validation on size of the encoded data.
  209. // Note: For byte fields, the content of the fields are base64-encoded (which
  210. // increases the size of the data by 33-36%) when using JSON on the wire.
  211. bytes icon = 7 [(google.api.field_behavior) = OPTIONAL];
  212. }
  213. // Contains details of the data provider.
  214. message DataProvider {
  215. // Optional. Name of the data provider.
  216. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  217. // Optional. Email or URL of the data provider.
  218. // Max Length: 1000 bytes.
  219. string primary_contact = 2 [(google.api.field_behavior) = OPTIONAL];
  220. }
  221. // Contains details of the listing publisher.
  222. message Publisher {
  223. // Optional. Name of the listing publisher.
  224. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  225. // Optional. Email or URL of the listing publisher.
  226. // Max Length: 1000 bytes.
  227. string primary_contact = 2 [(google.api.field_behavior) = OPTIONAL];
  228. }
  229. // Contains the reference that identifies a destination bigquery dataset.
  230. message DestinationDatasetReference {
  231. // Required. A unique ID for this dataset, without the project name. The ID
  232. // must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).
  233. // The maximum length is 1,024 characters.
  234. string dataset_id = 1 [(google.api.field_behavior) = REQUIRED];
  235. // Required. The ID of the project containing this dataset.
  236. string project_id = 2 [(google.api.field_behavior) = REQUIRED];
  237. }
  238. // Defines the destination bigquery dataset.
  239. message DestinationDataset {
  240. // Required. A reference that identifies the destination dataset.
  241. DestinationDatasetReference dataset_reference = 1 [(google.api.field_behavior) = REQUIRED];
  242. // Optional. A descriptive name for the dataset.
  243. google.protobuf.StringValue friendly_name = 2 [(google.api.field_behavior) = OPTIONAL];
  244. // Optional. A user-friendly description of the dataset.
  245. google.protobuf.StringValue description = 3 [(google.api.field_behavior) = OPTIONAL];
  246. // Optional. The labels associated with this dataset. You can use these
  247. // to organize and group your datasets.
  248. // You can set this property when inserting or updating a dataset.
  249. // See https://cloud.google.com/resource-manager/docs/creating-managing-labels
  250. // for more information.
  251. map<string, string> labels = 4 [(google.api.field_behavior) = OPTIONAL];
  252. // Required. The geographic location where the dataset should reside. See
  253. // https://cloud.google.com/bigquery/docs/locations for supported
  254. // locations.
  255. string location = 5 [(google.api.field_behavior) = REQUIRED];
  256. }
  257. // A listing is what gets published into a data exchange that a subscriber can
  258. // subscribe to. It contains a reference to the data source along with
  259. // descriptive information that will help subscribers find and subscribe the
  260. // data.
  261. message Listing {
  262. option (google.api.resource) = {
  263. type: "analyticshub.googleapis.com/Listing"
  264. pattern: "projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}"
  265. };
  266. // A reference to a shared dataset. It is an existing BigQuery dataset with a
  267. // collection of objects such as tables and views that you want to share
  268. // with subscribers.
  269. // When subscriber's subscribe to a listing, Analytics Hub creates a linked
  270. // dataset in
  271. // the subscriber's project. A Linked dataset is an opaque, read-only BigQuery
  272. // dataset that serves as a _symbolic link_ to a shared dataset.
  273. message BigQueryDatasetSource {
  274. // Resource name of the dataset source for this listing.
  275. // e.g. `projects/myproject/datasets/123`
  276. string dataset = 1 [(google.api.resource_reference) = {
  277. type: "bigquery.googleapis.com/Dataset"
  278. }];
  279. }
  280. // State of the listing.
  281. enum State {
  282. // Default value. This value is unused.
  283. STATE_UNSPECIFIED = 0;
  284. // Subscribable state. Users with dataexchange.listings.subscribe permission
  285. // can subscribe to this listing.
  286. ACTIVE = 1;
  287. }
  288. // Listing categories.
  289. enum Category {
  290. CATEGORY_UNSPECIFIED = 0;
  291. CATEGORY_OTHERS = 1;
  292. CATEGORY_ADVERTISING_AND_MARKETING = 2;
  293. CATEGORY_COMMERCE = 3;
  294. CATEGORY_CLIMATE_AND_ENVIRONMENT = 4;
  295. CATEGORY_DEMOGRAPHICS = 5;
  296. CATEGORY_ECONOMICS = 6;
  297. CATEGORY_EDUCATION = 7;
  298. CATEGORY_ENERGY = 8;
  299. CATEGORY_FINANCIAL = 9;
  300. CATEGORY_GAMING = 10;
  301. CATEGORY_GEOSPATIAL = 11;
  302. CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12;
  303. CATEGORY_MEDIA = 13;
  304. CATEGORY_PUBLIC_SECTOR = 14;
  305. CATEGORY_RETAIL = 15;
  306. CATEGORY_SPORTS = 16;
  307. CATEGORY_SCIENCE_AND_RESEARCH = 17;
  308. CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18;
  309. CATEGORY_TRAVEL_AND_TOURISM = 19;
  310. }
  311. // Listing source.
  312. oneof source {
  313. // Required. Shared dataset i.e. BigQuery dataset source.
  314. BigQueryDatasetSource bigquery_dataset = 6 [(google.api.field_behavior) = REQUIRED];
  315. }
  316. // Output only. The resource name of the listing.
  317. // e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`
  318. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  319. // Required. Human-readable display name of the listing. The display name must contain
  320. // only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces
  321. // ( ), ampersands (&) and can't start or end with spaces.
  322. // Default value is an empty string.
  323. // Max length: 63 bytes.
  324. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  325. // Optional. Short description of the listing. The description must not contain
  326. // Unicode non-characters and C0 and C1 control codes except tabs (HT),
  327. // new lines (LF), carriage returns (CR), and page breaks (FF).
  328. // Default value is an empty string.
  329. // Max length: 2000 bytes.
  330. string description = 3 [(google.api.field_behavior) = OPTIONAL];
  331. // Optional. Email or URL of the primary point of contact of the listing.
  332. // Max Length: 1000 bytes.
  333. string primary_contact = 4 [(google.api.field_behavior) = OPTIONAL];
  334. // Optional. Documentation describing the listing.
  335. string documentation = 5 [(google.api.field_behavior) = OPTIONAL];
  336. // Output only. Current state of the listing.
  337. State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  338. // Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB
  339. // Expected image dimensions are 512x512 pixels, however the API only
  340. // performs validation on size of the encoded data.
  341. // Note: For byte fields, the contents of the field are base64-encoded (which
  342. // increases the size of the data by 33-36%) when using JSON on the wire.
  343. bytes icon = 8 [(google.api.field_behavior) = OPTIONAL];
  344. // Optional. Details of the data provider who owns the source data.
  345. DataProvider data_provider = 9 [(google.api.field_behavior) = OPTIONAL];
  346. // Optional. Categories of the listing. Up to two categories are allowed.
  347. repeated Category categories = 10 [(google.api.field_behavior) = OPTIONAL];
  348. // Optional. Details of the publisher who owns the listing and who can share
  349. // the source data.
  350. Publisher publisher = 11 [(google.api.field_behavior) = OPTIONAL];
  351. // Optional. Email or URL of the request access of the listing.
  352. // Subscribers can use this reference to request access.
  353. // Max Length: 1000 bytes.
  354. string request_access = 12 [(google.api.field_behavior) = OPTIONAL];
  355. }
  356. // Message for requesting the list of data exchanges.
  357. message ListDataExchangesRequest {
  358. // Required. The parent resource path of the data exchanges.
  359. // e.g. `projects/myproject/locations/US`.
  360. string parent = 1 [
  361. (google.api.field_behavior) = REQUIRED,
  362. (google.api.resource_reference) = {
  363. type: "locations.googleapis.com/Location"
  364. }
  365. ];
  366. // The maximum number of results to return in a single response page. Leverage
  367. // the page tokens to iterate through the entire collection.
  368. int32 page_size = 2;
  369. // Page token, returned by a previous call, to request the next page of
  370. // results.
  371. string page_token = 3;
  372. }
  373. // Message for response to the list of data exchanges.
  374. message ListDataExchangesResponse {
  375. // The list of data exchanges.
  376. repeated DataExchange data_exchanges = 1;
  377. // A token to request the next page of results.
  378. string next_page_token = 2;
  379. }
  380. // Message for requesting the list of data exchanges from projects in an
  381. // organization and location.
  382. message ListOrgDataExchangesRequest {
  383. // Required. The organization resource path of the projects containing DataExchanges.
  384. // e.g. `organizations/myorg/locations/US`.
  385. string organization = 1 [(google.api.field_behavior) = REQUIRED];
  386. // The maximum number of results to return in a single response page. Leverage
  387. // the page tokens to iterate through the entire collection.
  388. int32 page_size = 2;
  389. // Page token, returned by a previous call, to request the next page of
  390. // results.
  391. string page_token = 3;
  392. }
  393. // Message for response to listing data exchanges in an organization and
  394. // location.
  395. message ListOrgDataExchangesResponse {
  396. // The list of data exchanges.
  397. repeated DataExchange data_exchanges = 1;
  398. // A token to request the next page of results.
  399. string next_page_token = 2;
  400. }
  401. // Message for getting a data exchange.
  402. message GetDataExchangeRequest {
  403. // Required. The resource name of the data exchange.
  404. // e.g. `projects/myproject/locations/US/dataExchanges/123`.
  405. string name = 1 [
  406. (google.api.field_behavior) = REQUIRED,
  407. (google.api.resource_reference) = {
  408. type: "analyticshub.googleapis.com/DataExchange"
  409. }
  410. ];
  411. }
  412. // Message for creating a data exchange.
  413. message CreateDataExchangeRequest {
  414. // Required. The parent resource path of the data exchange.
  415. // e.g. `projects/myproject/locations/US`.
  416. string parent = 1 [
  417. (google.api.field_behavior) = REQUIRED,
  418. (google.api.resource_reference) = {
  419. type: "locations.googleapis.com/Location"
  420. }
  421. ];
  422. // Required. The ID of the data exchange.
  423. // Must contain only Unicode letters, numbers (0-9), underscores (_).
  424. // Should not use characters that require URL-escaping, or characters
  425. // outside of ASCII, spaces.
  426. // Max length: 100 bytes.
  427. string data_exchange_id = 2 [(google.api.field_behavior) = REQUIRED];
  428. // Required. The data exchange to create.
  429. DataExchange data_exchange = 3 [(google.api.field_behavior) = REQUIRED];
  430. }
  431. // Message for updating a data exchange.
  432. message UpdateDataExchangeRequest {
  433. // Required. Field mask specifies the fields to update in the data exchange
  434. // resource. The fields specified in the
  435. // `updateMask` are relative to the resource and are not a full request.
  436. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  437. // Required. The data exchange to update.
  438. DataExchange data_exchange = 2 [(google.api.field_behavior) = REQUIRED];
  439. }
  440. // Message for deleting a data exchange.
  441. message DeleteDataExchangeRequest {
  442. // Required. The full name of the data exchange resource that you want to delete.
  443. // For example, `projects/myproject/locations/US/dataExchanges/123`.
  444. string name = 1 [
  445. (google.api.field_behavior) = REQUIRED,
  446. (google.api.resource_reference) = {
  447. type: "analyticshub.googleapis.com/DataExchange"
  448. }
  449. ];
  450. }
  451. // Message for requesting the list of listings.
  452. message ListListingsRequest {
  453. // Required. The parent resource path of the listing.
  454. // e.g. `projects/myproject/locations/US/dataExchanges/123`.
  455. string parent = 1 [
  456. (google.api.field_behavior) = REQUIRED,
  457. (google.api.resource_reference) = {
  458. type: "analyticshub.googleapis.com/DataExchange"
  459. }
  460. ];
  461. // The maximum number of results to return in a single response page. Leverage
  462. // the page tokens to iterate through the entire collection.
  463. int32 page_size = 2;
  464. // Page token, returned by a previous call, to request the next page of
  465. // results.
  466. string page_token = 3;
  467. }
  468. // Message for response to the list of Listings.
  469. message ListListingsResponse {
  470. // The list of Listing.
  471. repeated Listing listings = 1;
  472. // A token to request the next page of results.
  473. string next_page_token = 2;
  474. }
  475. // Message for getting a listing.
  476. message GetListingRequest {
  477. // Required. The resource name of the listing.
  478. // e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  479. string name = 1 [
  480. (google.api.field_behavior) = REQUIRED,
  481. (google.api.resource_reference) = {
  482. type: "analyticshub.googleapis.com/Listing"
  483. }
  484. ];
  485. }
  486. // Message for creating a listing.
  487. message CreateListingRequest {
  488. // Required. The parent resource path of the listing.
  489. // e.g. `projects/myproject/locations/US/dataExchanges/123`.
  490. string parent = 1 [
  491. (google.api.field_behavior) = REQUIRED,
  492. (google.api.resource_reference) = {
  493. type: "analyticshub.googleapis.com/DataExchange"
  494. }
  495. ];
  496. // Required. The ID of the listing to create.
  497. // Must contain only Unicode letters, numbers (0-9), underscores (_).
  498. // Should not use characters that require URL-escaping, or characters
  499. // outside of ASCII, spaces.
  500. // Max length: 100 bytes.
  501. string listing_id = 2 [(google.api.field_behavior) = REQUIRED];
  502. // Required. The listing to create.
  503. Listing listing = 3 [(google.api.field_behavior) = REQUIRED];
  504. }
  505. // Message for updating a Listing.
  506. message UpdateListingRequest {
  507. // Required. Field mask specifies the fields to update in the listing resource. The
  508. // fields specified in the `updateMask` are relative to the resource and are
  509. // not a full request.
  510. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  511. // Required. The listing to update.
  512. Listing listing = 2 [(google.api.field_behavior) = REQUIRED];
  513. }
  514. // Message for deleting a listing.
  515. message DeleteListingRequest {
  516. // Required. Resource name of the listing to delete.
  517. // e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  518. string name = 1 [
  519. (google.api.field_behavior) = REQUIRED,
  520. (google.api.resource_reference) = {
  521. type: "analyticshub.googleapis.com/Listing"
  522. }
  523. ];
  524. }
  525. // Message for subscribing to a listing.
  526. message SubscribeListingRequest {
  527. // Resulting destination of the listing that you subscribed to.
  528. oneof destination {
  529. // BigQuery destination dataset to create for the subscriber.
  530. DestinationDataset destination_dataset = 3;
  531. }
  532. // Required. Resource name of the listing that you want to subscribe to.
  533. // e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`.
  534. string name = 1 [
  535. (google.api.field_behavior) = REQUIRED,
  536. (google.api.resource_reference) = {
  537. type: "analyticshub.googleapis.com/Listing"
  538. }
  539. ];
  540. }
  541. // Message for response when you subscribe to a listing.
  542. message SubscribeListingResponse {
  543. }