diff --git a/BigQueryDataExchange/metadata/V1Beta1/Dataexchange.php b/BigQueryDataExchange/metadata/V1Beta1/Dataexchange.php index 9cad7480a2af..59a619f2260e 100644 Binary files a/BigQueryDataExchange/metadata/V1Beta1/Dataexchange.php and b/BigQueryDataExchange/metadata/V1Beta1/Dataexchange.php differ diff --git a/BigQueryDataExchange/src/V1beta1/AnalyticsHubServiceGrpcClient.php b/BigQueryDataExchange/src/V1beta1/AnalyticsHubServiceGrpcClient.php index 7284f6bbb141..1c5e8b4b0557 100644 --- a/BigQueryDataExchange/src/V1beta1/AnalyticsHubServiceGrpcClient.php +++ b/BigQueryDataExchange/src/V1beta1/AnalyticsHubServiceGrpcClient.php @@ -19,11 +19,12 @@ namespace Google\Cloud\BigQuery\DataExchange\V1beta1; /** - * The AnalyticsHubService API facilitates data sharing within and across - * organizations. It allows data providers to publish Listings --- a - * discoverable and searchable SKU representing a dataset. Data consumers can - * subscribe to Listings. Upon subscription, AnalyticsHub provisions a "Linked - * Datasets" surfacing the data in the consumer's project. + * The `AnalyticsHubService` API facilitates data sharing within and across + * organizations. It allows data providers to publish listings that reference + * shared datasets. With Analytics Hub, users can discover and search for + * listings that they have access to. Subscribers can view and subscribe to + * listings. When you subscribe to a listing, Analytics Hub creates a linked + * dataset in your project. */ class AnalyticsHubServiceGrpcClient extends \Grpc\BaseStub { @@ -37,7 +38,7 @@ public function __construct($hostname, $opts, $channel = null) { } /** - * Lists DataExchanges in a given project and location. + * Lists all data exchanges in a given project and location. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\ListDataExchangesRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -52,7 +53,8 @@ public function ListDataExchanges(\Google\Cloud\BigQuery\DataExchange\V1beta1\Li } /** - * Lists DataExchanges from projects in a given organization and location. + * Lists all data exchanges from projects in a given organization and + * location. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\ListOrgDataExchangesRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -67,7 +69,7 @@ public function ListOrgDataExchanges(\Google\Cloud\BigQuery\DataExchange\V1beta1 } /** - * Gets details of a single DataExchange. + * Gets the details of a data exchange. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\GetDataExchangeRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -82,7 +84,7 @@ public function GetDataExchange(\Google\Cloud\BigQuery\DataExchange\V1beta1\GetD } /** - * Creates a new DataExchange in a given project and location. + * Creates a new data exchange. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\CreateDataExchangeRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -97,7 +99,7 @@ public function CreateDataExchange(\Google\Cloud\BigQuery\DataExchange\V1beta1\C } /** - * Updates the parameters of a single DataExchange. + * Updates an existing data exchange. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\UpdateDataExchangeRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -112,7 +114,7 @@ public function UpdateDataExchange(\Google\Cloud\BigQuery\DataExchange\V1beta1\U } /** - * Deletes a single DataExchange. + * Deletes an existing data exchange. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DeleteDataExchangeRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -127,7 +129,7 @@ public function DeleteDataExchange(\Google\Cloud\BigQuery\DataExchange\V1beta1\D } /** - * Lists Listings in a given project and location. + * Lists all listings in a given project and location. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\ListListingsRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -142,7 +144,7 @@ public function ListListings(\Google\Cloud\BigQuery\DataExchange\V1beta1\ListLis } /** - * Gets details of a single Listing. + * Gets the details of a listing. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\GetListingRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -157,7 +159,7 @@ public function GetListing(\Google\Cloud\BigQuery\DataExchange\V1beta1\GetListin } /** - * Creates a new Listing in a given project and location. + * Creates a new listing. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\CreateListingRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -172,7 +174,7 @@ public function CreateListing(\Google\Cloud\BigQuery\DataExchange\V1beta1\Create } /** - * Updates the parameters of a single Listing. + * Updates an existing listing. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\UpdateListingRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -187,8 +189,7 @@ public function UpdateListing(\Google\Cloud\BigQuery\DataExchange\V1beta1\Update } /** - * Deletes a single Listing, as long as there are no subscriptions - * associated with the source of this Listing. + * Deletes a listing. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DeleteListingRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -203,10 +204,11 @@ public function DeleteListing(\Google\Cloud\BigQuery\DataExchange\V1beta1\Delete } /** - * Subscribes to a single Listing. + * Subscribes to a listing. * - * Data Exchange currently supports one type of Listing: a BigQuery dataset. - * Upon subscription to a Listing for a BigQuery dataset, Data Exchange + * Currently, with Analytics Hub, you can create listings that + * reference only BigQuery datasets. + * Upon subscription to a listing for a BigQuery dataset, Analytics Hub * creates a linked dataset in the subscriber's project. * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\SubscribeListingRequest $argument input argument * @param array $metadata metadata @@ -222,7 +224,7 @@ public function SubscribeListing(\Google\Cloud\BigQuery\DataExchange\V1beta1\Sub } /** - * Gets the IAM policy for a dataExchange or a listing. + * Gets the IAM policy. * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -237,7 +239,7 @@ public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, } /** - * Sets the IAM policy for a dataExchange or a listing. + * Sets the IAM policy. * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument * @param array $metadata metadata * @param array $options call options @@ -252,8 +254,7 @@ public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, } /** - * Returns the permissions that a caller has on a specified dataExchange or - * listing. + * Returns the permissions that a caller has. * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument * @param array $metadata metadata * @param array $options call options diff --git a/BigQueryDataExchange/src/V1beta1/CreateDataExchangeRequest.php b/BigQueryDataExchange/src/V1beta1/CreateDataExchangeRequest.php index c0d179799743..f65b8586a31e 100644 --- a/BigQueryDataExchange/src/V1beta1/CreateDataExchangeRequest.php +++ b/BigQueryDataExchange/src/V1beta1/CreateDataExchangeRequest.php @@ -9,21 +9,21 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for creating a DataExchange. + * Message for creating a data exchange. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest */ class CreateDataExchangeRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent resource path of the DataExchange. + * Required. The parent resource path of the data exchange. * e.g. `projects/myproject/locations/US`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $parent = ''; /** - * Required. The ID of the DataExchange to create. + * Required. The ID of the data exchange. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. @@ -33,7 +33,7 @@ class CreateDataExchangeRequest extends \Google\Protobuf\Internal\Message */ private $data_exchange_id = ''; /** - * Required. The DataExchange to create. + * Required. The data exchange to create. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -46,16 +46,16 @@ class CreateDataExchangeRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent resource path of the DataExchange. + * Required. The parent resource path of the data exchange. * e.g. `projects/myproject/locations/US`. * @type string $data_exchange_id - * Required. The ID of the DataExchange to create. + * Required. The ID of the data exchange. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. * Max length: 100 bytes. * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $data_exchange - * Required. The DataExchange to create. + * Required. The data exchange to create. * } */ public function __construct($data = NULL) { @@ -64,7 +64,7 @@ public function __construct($data = NULL) { } /** - * Required. The parent resource path of the DataExchange. + * Required. The parent resource path of the data exchange. * e.g. `projects/myproject/locations/US`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -76,7 +76,7 @@ public function getParent() } /** - * Required. The parent resource path of the DataExchange. + * Required. The parent resource path of the data exchange. * e.g. `projects/myproject/locations/US`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -92,7 +92,7 @@ public function setParent($var) } /** - * Required. The ID of the DataExchange to create. + * Required. The ID of the data exchange. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. @@ -107,7 +107,7 @@ public function getDataExchangeId() } /** - * Required. The ID of the DataExchange to create. + * Required. The ID of the data exchange. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. @@ -126,7 +126,7 @@ public function setDataExchangeId($var) } /** - * Required. The DataExchange to create. + * Required. The data exchange to create. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange|null @@ -147,7 +147,7 @@ public function clearDataExchange() } /** - * Required. The DataExchange to create. + * Required. The data exchange to create. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 3 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $var diff --git a/BigQueryDataExchange/src/V1beta1/CreateListingRequest.php b/BigQueryDataExchange/src/V1beta1/CreateListingRequest.php index aa732076f231..da073dbf82dd 100644 --- a/BigQueryDataExchange/src/V1beta1/CreateListingRequest.php +++ b/BigQueryDataExchange/src/V1beta1/CreateListingRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for creating a Listing. + * Message for creating a listing. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest */ @@ -23,7 +23,7 @@ class CreateListingRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * Required. The ID of the Listing to create. + * Required. The ID of the listing to create. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. @@ -49,7 +49,7 @@ class CreateListingRequest extends \Google\Protobuf\Internal\Message * Required. The parent resource path of the listing. * e.g. `projects/myproject/locations/US/dataExchanges/123`. * @type string $listing_id - * Required. The ID of the Listing to create. + * Required. The ID of the listing to create. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. @@ -92,7 +92,7 @@ public function setParent($var) } /** - * Required. The ID of the Listing to create. + * Required. The ID of the listing to create. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. @@ -107,7 +107,7 @@ public function getListingId() } /** - * Required. The ID of the Listing to create. + * Required. The ID of the listing to create. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. diff --git a/BigQueryDataExchange/src/V1beta1/DataExchange.php b/BigQueryDataExchange/src/V1beta1/DataExchange.php index 5949f53660c2..a83f2f14d19e 100644 --- a/BigQueryDataExchange/src/V1beta1/DataExchange.php +++ b/BigQueryDataExchange/src/V1beta1/DataExchange.php @@ -9,9 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * A data exchange is a container that enables data sharing. - * It contains a set of listings of the data sources along with descriptive - * information of the data exchange. + * 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. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.DataExchange */ @@ -27,7 +27,7 @@ class DataExchange extends \Google\Protobuf\Internal\Message /** * Required. Human-readable display name of the data exchange. The display name must * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), and can't start or end with spaces. + * spaces ( ), ampersands (&) and must not start or end with spaces. * Default value is an empty string. * Max length: 63 bytes. * @@ -35,10 +35,9 @@ class DataExchange extends \Google\Protobuf\Internal\Message */ private $display_name = ''; /** - * Optional. Short description of the data exchange that can consist of sentences - * or paragraphs. The description must not contain Unicode non-characters as - * well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage - * returns (CR), and page breaks (FF). + * Optional. Description of the data exchange. The description must not contain Unicode + * non-characters as well as C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). * Default value is an empty string. * Max length: 2000 bytes. * @@ -46,8 +45,7 @@ class DataExchange extends \Google\Protobuf\Internal\Message */ private $description = ''; /** - * Optional. Email, URL or other reference of the primary point of contact of the data - * exchange + * Optional. Email or URL of the primary point of contact of the data exchange. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -69,7 +67,7 @@ class DataExchange extends \Google\Protobuf\Internal\Message * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB * Expected image dimensions are 512x512 pixels, however the API only * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which + * Note: For byte fields, the content of the fields are base64-encoded (which * increases the size of the data by 33-36%) when using JSON on the wire. * * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -88,19 +86,17 @@ class DataExchange extends \Google\Protobuf\Internal\Message * @type string $display_name * Required. Human-readable display name of the data exchange. The display name must * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), and can't start or end with spaces. + * spaces ( ), ampersands (&) and must not start or end with spaces. * Default value is an empty string. * Max length: 63 bytes. * @type string $description - * Optional. Short description of the data exchange that can consist of sentences - * or paragraphs. The description must not contain Unicode non-characters as - * well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage - * returns (CR), and page breaks (FF). + * Optional. Description of the data exchange. The description must not contain Unicode + * non-characters as well as C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). * Default value is an empty string. * Max length: 2000 bytes. * @type string $primary_contact - * Optional. Email, URL or other reference of the primary point of contact of the data - * exchange + * Optional. Email or URL of the primary point of contact of the data exchange. * Max Length: 1000 bytes. * @type string $documentation * Optional. Documentation describing the data exchange. @@ -110,7 +106,7 @@ class DataExchange extends \Google\Protobuf\Internal\Message * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB * Expected image dimensions are 512x512 pixels, however the API only * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which + * Note: For byte fields, the content of the fields are base64-encoded (which * increases the size of the data by 33-36%) when using JSON on the wire. * } */ @@ -150,7 +146,7 @@ public function setName($var) /** * Required. Human-readable display name of the data exchange. The display name must * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), and can't start or end with spaces. + * spaces ( ), ampersands (&) and must not start or end with spaces. * Default value is an empty string. * Max length: 63 bytes. * @@ -165,7 +161,7 @@ public function getDisplayName() /** * Required. Human-readable display name of the data exchange. The display name must * contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - * spaces ( ), and can't start or end with spaces. + * spaces ( ), ampersands (&) and must not start or end with spaces. * Default value is an empty string. * Max length: 63 bytes. * @@ -182,10 +178,9 @@ public function setDisplayName($var) } /** - * Optional. Short description of the data exchange that can consist of sentences - * or paragraphs. The description must not contain Unicode non-characters as - * well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage - * returns (CR), and page breaks (FF). + * Optional. Description of the data exchange. The description must not contain Unicode + * non-characters as well as C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). * Default value is an empty string. * Max length: 2000 bytes. * @@ -198,10 +193,9 @@ public function getDescription() } /** - * Optional. Short description of the data exchange that can consist of sentences - * or paragraphs. The description must not contain Unicode non-characters as - * well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage - * returns (CR), and page breaks (FF). + * Optional. Description of the data exchange. The description must not contain Unicode + * non-characters as well as C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). * Default value is an empty string. * Max length: 2000 bytes. * @@ -218,8 +212,7 @@ public function setDescription($var) } /** - * Optional. Email, URL or other reference of the primary point of contact of the data - * exchange + * Optional. Email or URL of the primary point of contact of the data exchange. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -231,8 +224,7 @@ public function getPrimaryContact() } /** - * Optional. Email, URL or other reference of the primary point of contact of the data - * exchange + * Optional. Email or URL of the primary point of contact of the data exchange. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -303,7 +295,7 @@ public function setListingCount($var) * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB * Expected image dimensions are 512x512 pixels, however the API only * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which + * Note: For byte fields, the content of the fields are base64-encoded (which * increases the size of the data by 33-36%) when using JSON on the wire. * * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -318,7 +310,7 @@ public function getIcon() * Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB * Expected image dimensions are 512x512 pixels, however the API only * performs validation on size of the encoded data. - * Note: For byte fields, the contents of the field are base64-encoded (which + * Note: For byte fields, the content of the fields are base64-encoded (which * increases the size of the data by 33-36%) when using JSON on the wire. * * Generated from protobuf field bytes icon = 7 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/BigQueryDataExchange/src/V1beta1/DataProvider.php b/BigQueryDataExchange/src/V1beta1/DataProvider.php index 5c51cb360d53..a741188d9981 100644 --- a/BigQueryDataExchange/src/V1beta1/DataProvider.php +++ b/BigQueryDataExchange/src/V1beta1/DataProvider.php @@ -9,20 +9,20 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Contains details of the Data Provider. + * Contains details of the data provider. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.DataProvider */ class DataProvider extends \Google\Protobuf\Internal\Message { /** - * Optional. Name of the Data Provider. + * Optional. Name of the data provider. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $name = ''; /** - * Optional. Email or URL of the Data Provider. + * Optional. Email or URL of the data provider. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -36,9 +36,9 @@ class DataProvider extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Optional. Name of the Data Provider. + * Optional. Name of the data provider. * @type string $primary_contact - * Optional. Email or URL of the Data Provider. + * Optional. Email or URL of the data provider. * Max Length: 1000 bytes. * } */ @@ -48,7 +48,7 @@ public function __construct($data = NULL) { } /** - * Optional. Name of the Data Provider. + * Optional. Name of the data provider. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -59,7 +59,7 @@ public function getName() } /** - * Optional. Name of the Data Provider. + * Optional. Name of the data provider. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -74,7 +74,7 @@ public function setName($var) } /** - * Optional. Email or URL of the Data Provider. + * Optional. Email or URL of the data provider. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -86,7 +86,7 @@ public function getPrimaryContact() } /** - * Optional. Email or URL of the Data Provider. + * Optional. Email or URL of the data provider. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/BigQueryDataExchange/src/V1beta1/DeleteDataExchangeRequest.php b/BigQueryDataExchange/src/V1beta1/DeleteDataExchangeRequest.php index 932408265079..defca3b99d75 100644 --- a/BigQueryDataExchange/src/V1beta1/DeleteDataExchangeRequest.php +++ b/BigQueryDataExchange/src/V1beta1/DeleteDataExchangeRequest.php @@ -9,15 +9,15 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for deleting a DataExchange. + * Message for deleting a data exchange. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest */ class DeleteDataExchangeRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Resource name of the DataExchange to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -30,8 +30,8 @@ class DeleteDataExchangeRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. Resource name of the DataExchange to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. * } */ public function __construct($data = NULL) { @@ -40,8 +40,8 @@ public function __construct($data = NULL) { } /** - * Required. Resource name of the DataExchange to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -52,8 +52,8 @@ public function getName() } /** - * Required. Resource name of the DataExchange to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/BigQueryDataExchange/src/V1beta1/DeleteListingRequest.php b/BigQueryDataExchange/src/V1beta1/DeleteListingRequest.php index 0b4429021aca..ee922b4891a9 100644 --- a/BigQueryDataExchange/src/V1beta1/DeleteListingRequest.php +++ b/BigQueryDataExchange/src/V1beta1/DeleteListingRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for deleting a Listing. + * Message for deleting a listing. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest */ diff --git a/BigQueryDataExchange/src/V1beta1/DestinationDataset.php b/BigQueryDataExchange/src/V1beta1/DestinationDataset.php index a420a202ad69..a0cc95dffe8c 100644 --- a/BigQueryDataExchange/src/V1beta1/DestinationDataset.php +++ b/BigQueryDataExchange/src/V1beta1/DestinationDataset.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Defines the Destination BigQuery Dataset. + * Defines the destination bigquery dataset. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset */ diff --git a/BigQueryDataExchange/src/V1beta1/DestinationDatasetReference.php b/BigQueryDataExchange/src/V1beta1/DestinationDatasetReference.php index 9764d793564d..ac224c6b7d1f 100644 --- a/BigQueryDataExchange/src/V1beta1/DestinationDatasetReference.php +++ b/BigQueryDataExchange/src/V1beta1/DestinationDatasetReference.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Defines the Destination BigQuery Dataset Reference. + * Contains the reference that identifies a destination bigquery dataset. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference */ diff --git a/BigQueryDataExchange/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php b/BigQueryDataExchange/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php index 9c4dcca637fc..bc2e152a975c 100644 --- a/BigQueryDataExchange/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php +++ b/BigQueryDataExchange/src/V1beta1/Gapic/AnalyticsHubServiceGapicClient.php @@ -27,9 +27,10 @@ namespace Google\Cloud\BigQuery\DataExchange\V1beta1\Gapic; use Google\ApiCore\ApiException; +use Google\ApiCore\Call; use Google\ApiCore\CredentialsWrapper; -use Google\ApiCore\GapicClientTrait; +use Google\ApiCore\GapicClientTrait; use Google\ApiCore\PathTemplate; use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; @@ -61,15 +62,20 @@ use Google\Cloud\Iam\V1\SetIamPolicyRequest; use Google\Cloud\Iam\V1\TestIamPermissionsRequest; use Google\Cloud\Iam\V1\TestIamPermissionsResponse; +use Google\Cloud\Location\GetLocationRequest; +use Google\Cloud\Location\ListLocationsRequest; +use Google\Cloud\Location\ListLocationsResponse; +use Google\Cloud\Location\Location; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; /** - * Service Description: The AnalyticsHubService API facilitates data sharing within and across - * organizations. It allows data providers to publish Listings --- a - * discoverable and searchable SKU representing a dataset. Data consumers can - * subscribe to Listings. Upon subscription, AnalyticsHub provisions a "Linked - * Datasets" surfacing the data in the consumer's project. + * Service Description: The `AnalyticsHubService` API facilitates data sharing within and across + * organizations. It allows data providers to publish listings that reference + * shared datasets. With Analytics Hub, users can discover and search for + * listings that they have access to. Subscribers can view and subscribe to + * listings. When you subscribe to a listing, Analytics Hub creates a linked + * dataset in your project. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: @@ -389,7 +395,7 @@ public function __construct(array $options = []) } /** - * Creates a new DataExchange in a given project and location. + * Creates a new data exchange. * * Sample code: * ``` @@ -404,14 +410,14 @@ public function __construct(array $options = []) * } * ``` * - * @param string $parent Required. The parent resource path of the DataExchange. + * @param string $parent Required. The parent resource path of the data exchange. * e.g. `projects/myproject/locations/US`. - * @param string $dataExchangeId Required. The ID of the DataExchange to create. + * @param string $dataExchangeId Required. The ID of the data exchange. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. * Max length: 100 bytes. - * @param DataExchange $dataExchange Required. The DataExchange to create. + * @param DataExchange $dataExchange Required. The data exchange to create. * @param array $optionalArgs { * Optional. * @@ -454,7 +460,7 @@ public function createDataExchange( } /** - * Creates a new Listing in a given project and location. + * Creates a new listing. * * Sample code: * ``` @@ -471,7 +477,7 @@ public function createDataExchange( * * @param string $parent Required. The parent resource path of the listing. * e.g. `projects/myproject/locations/US/dataExchanges/123`. - * @param string $listingId Required. The ID of the Listing to create. + * @param string $listingId Required. The ID of the listing to create. * Must contain only Unicode letters, numbers (0-9), underscores (_). * Should not use characters that require URL-escaping, or characters * outside of ASCII, spaces. @@ -519,7 +525,7 @@ public function createListing( } /** - * Deletes a single DataExchange. + * Deletes an existing data exchange. * * Sample code: * ``` @@ -532,8 +538,8 @@ public function createListing( * } * ``` * - * @param string $name Required. Resource name of the DataExchange to delete. - * e.g. `projects/myproject/locations/US/dataExchanges/123`. + * @param string $name Required. The full name of the data exchange resource that you want to delete. + * For example, `projects/myproject/locations/US/dataExchanges/123`. * @param array $optionalArgs { * Optional. * @@ -568,8 +574,7 @@ public function deleteDataExchange($name, array $optionalArgs = []) } /** - * Deletes a single Listing, as long as there are no subscriptions - * associated with the source of this Listing. + * Deletes a listing. * * Sample code: * ``` @@ -618,7 +623,7 @@ public function deleteListing($name, array $optionalArgs = []) } /** - * Gets details of a single DataExchange. + * Gets the details of a data exchange. * * Sample code: * ``` @@ -631,7 +636,7 @@ public function deleteListing($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the DataExchange. + * @param string $name Required. The resource name of the data exchange. * e.g. `projects/myproject/locations/US/dataExchanges/123`. * @param array $optionalArgs { * Optional. @@ -669,7 +674,7 @@ public function getDataExchange($name, array $optionalArgs = []) } /** - * Gets the IAM policy for a dataExchange or a listing. + * Gets the IAM policy. * * Sample code: * ``` @@ -727,7 +732,7 @@ public function getIamPolicy($resource, array $optionalArgs = []) } /** - * Gets details of a single Listing. + * Gets the details of a listing. * * Sample code: * ``` @@ -778,7 +783,7 @@ public function getListing($name, array $optionalArgs = []) } /** - * Lists DataExchanges in a given project and location. + * Lists all data exchanges in a given project and location. * * Sample code: * ``` @@ -803,7 +808,7 @@ public function getListing($name, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The parent resource path of the DataExchanges. + * @param string $parent Required. The parent resource path of the data exchanges. * e.g. `projects/myproject/locations/US`. * @param array $optionalArgs { * Optional. @@ -858,7 +863,7 @@ public function listDataExchanges($parent, array $optionalArgs = []) } /** - * Lists Listings in a given project and location. + * Lists all listings in a given project and location. * * Sample code: * ``` @@ -938,7 +943,8 @@ public function listListings($parent, array $optionalArgs = []) } /** - * Lists DataExchanges from projects in a given organization and location. + * Lists all data exchanges from projects in a given organization and + * location. * * Sample code: * ``` @@ -1020,7 +1026,7 @@ public function listOrgDataExchanges( } /** - * Sets the IAM policy for a dataExchange or a listing. + * Sets the IAM policy. * * Sample code: * ``` @@ -1087,10 +1093,11 @@ public function setIamPolicy($resource, $policy, array $optionalArgs = []) } /** - * Subscribes to a single Listing. + * Subscribes to a listing. * - * Data Exchange currently supports one type of Listing: a BigQuery dataset. - * Upon subscription to a Listing for a BigQuery dataset, Data Exchange + * Currently, with Analytics Hub, you can create listings that + * reference only BigQuery datasets. + * Upon subscription to a listing for a BigQuery dataset, Analytics Hub * creates a linked dataset in the subscriber's project. * * Sample code: @@ -1104,7 +1111,7 @@ public function setIamPolicy($resource, $policy, array $optionalArgs = []) * } * ``` * - * @param string $name Required. Resource name of the listing to subscribe to. + * @param string $name Required. Resource name of the listing that you want to subscribe to. * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. * @param array $optionalArgs { * Optional. @@ -1150,8 +1157,7 @@ public function subscribeListing($name, array $optionalArgs = []) } /** - * Returns the permissions that a caller has on a specified dataExchange or - * listing. + * Returns the permissions that a caller has. * * Sample code: * ``` @@ -1211,7 +1217,7 @@ public function testIamPermissions( } /** - * Updates the parameters of a single DataExchange. + * Updates an existing data exchange. * * Sample code: * ``` @@ -1225,11 +1231,10 @@ public function testIamPermissions( * } * ``` * - * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * DataExchange resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. - * @param DataExchange $dataExchange Required. The DataExchange to update. + * @param FieldMask $updateMask Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. + * @param DataExchange $dataExchange Required. The data exchange to update. * @param array $optionalArgs { * Optional. * @@ -1270,7 +1275,7 @@ public function updateDataExchange( } /** - * Updates the parameters of a single Listing. + * Updates an existing listing. * * Sample code: * ``` @@ -1284,10 +1289,9 @@ public function updateDataExchange( * } * ``` * - * @param FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Listing resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * @param FieldMask $updateMask Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. * @param Listing $listing Required. The listing to update. * @param array $optionalArgs { * Optional. @@ -1327,4 +1331,148 @@ public function updateListing( $request )->wait(); } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * $response = $analyticsHubServiceClient->getLocation(); + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetLocation', + Location::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.cloud.location.Locations' + )->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $analyticsHubServiceClient = new AnalyticsHubServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $analyticsHubServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $analyticsHubServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $analyticsHubServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListLocations', + $optionalArgs, + ListLocationsResponse::class, + $request, + 'google.cloud.location.Locations' + ); + } } diff --git a/BigQueryDataExchange/src/V1beta1/GetDataExchangeRequest.php b/BigQueryDataExchange/src/V1beta1/GetDataExchangeRequest.php index e8bde5c11bd0..c18fa247730f 100644 --- a/BigQueryDataExchange/src/V1beta1/GetDataExchangeRequest.php +++ b/BigQueryDataExchange/src/V1beta1/GetDataExchangeRequest.php @@ -9,14 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for getting a DataExchange. + * Message for getting a data exchange. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest */ class GetDataExchangeRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the DataExchange. + * Required. The resource name of the data exchange. * e.g. `projects/myproject/locations/US/dataExchanges/123`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -30,7 +30,7 @@ class GetDataExchangeRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the DataExchange. + * Required. The resource name of the data exchange. * e.g. `projects/myproject/locations/US/dataExchanges/123`. * } */ @@ -40,7 +40,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the DataExchange. + * Required. The resource name of the data exchange. * e.g. `projects/myproject/locations/US/dataExchanges/123`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -52,7 +52,7 @@ public function getName() } /** - * Required. The resource name of the DataExchange. + * Required. The resource name of the data exchange. * e.g. `projects/myproject/locations/US/dataExchanges/123`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/BigQueryDataExchange/src/V1beta1/GetListingRequest.php b/BigQueryDataExchange/src/V1beta1/GetListingRequest.php index ac82f420ce6a..18a68b81d0cc 100644 --- a/BigQueryDataExchange/src/V1beta1/GetListingRequest.php +++ b/BigQueryDataExchange/src/V1beta1/GetListingRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for getting a Listing. + * Message for getting a listing. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest */ diff --git a/BigQueryDataExchange/src/V1beta1/ListDataExchangesRequest.php b/BigQueryDataExchange/src/V1beta1/ListDataExchangesRequest.php index 7aab14a5fced..8a9ac9fdd945 100644 --- a/BigQueryDataExchange/src/V1beta1/ListDataExchangesRequest.php +++ b/BigQueryDataExchange/src/V1beta1/ListDataExchangesRequest.php @@ -9,14 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for requesting list of DataExchanges. + * Message for requesting the list of data exchanges. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest */ class ListDataExchangesRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent resource path of the DataExchanges. + * Required. The parent resource path of the data exchanges. * e.g. `projects/myproject/locations/US`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -44,7 +44,7 @@ class ListDataExchangesRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent resource path of the DataExchanges. + * Required. The parent resource path of the data exchanges. * e.g. `projects/myproject/locations/US`. * @type int $page_size * The maximum number of results to return in a single response page. Leverage @@ -60,7 +60,7 @@ public function __construct($data = NULL) { } /** - * Required. The parent resource path of the DataExchanges. + * Required. The parent resource path of the data exchanges. * e.g. `projects/myproject/locations/US`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -72,7 +72,7 @@ public function getParent() } /** - * Required. The parent resource path of the DataExchanges. + * Required. The parent resource path of the data exchanges. * e.g. `projects/myproject/locations/US`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/BigQueryDataExchange/src/V1beta1/ListDataExchangesResponse.php b/BigQueryDataExchange/src/V1beta1/ListDataExchangesResponse.php index 63c6a420ced9..79a719de0a53 100644 --- a/BigQueryDataExchange/src/V1beta1/ListDataExchangesResponse.php +++ b/BigQueryDataExchange/src/V1beta1/ListDataExchangesResponse.php @@ -9,14 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for response to listing DataExchanges. + * Message for response to the list of data exchanges. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesResponse */ class ListDataExchangesResponse extends \Google\Protobuf\Internal\Message { /** - * The list of DataExchange. + * The list of data exchanges. * * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; */ @@ -35,7 +35,7 @@ class ListDataExchangesResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges - * The list of DataExchange. + * The list of data exchanges. * @type string $next_page_token * A token to request the next page of results. * } @@ -46,7 +46,7 @@ public function __construct($data = NULL) { } /** - * The list of DataExchange. + * The list of data exchanges. * * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -57,7 +57,7 @@ public function getDataExchanges() } /** - * The list of DataExchange. + * The list of data exchanges. * * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; * @param array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/BigQueryDataExchange/src/V1beta1/ListListingsRequest.php b/BigQueryDataExchange/src/V1beta1/ListListingsRequest.php index f4555f47b62e..f8db88544b26 100644 --- a/BigQueryDataExchange/src/V1beta1/ListListingsRequest.php +++ b/BigQueryDataExchange/src/V1beta1/ListListingsRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for requesting list of Listings. + * Message for requesting the list of listings. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest */ diff --git a/BigQueryDataExchange/src/V1beta1/ListListingsResponse.php b/BigQueryDataExchange/src/V1beta1/ListListingsResponse.php index 778c339bccbd..74bedf87a405 100644 --- a/BigQueryDataExchange/src/V1beta1/ListListingsResponse.php +++ b/BigQueryDataExchange/src/V1beta1/ListListingsResponse.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for response to listing Listings. + * Message for response to the list of Listings. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.ListListingsResponse */ diff --git a/BigQueryDataExchange/src/V1beta1/ListOrgDataExchangesRequest.php b/BigQueryDataExchange/src/V1beta1/ListOrgDataExchangesRequest.php index 33737b5332f7..2cee4efe2c24 100644 --- a/BigQueryDataExchange/src/V1beta1/ListOrgDataExchangesRequest.php +++ b/BigQueryDataExchange/src/V1beta1/ListOrgDataExchangesRequest.php @@ -9,8 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for requesting list of DataExchanges from projects in an organization - * and location. + * Message for requesting the list of data exchanges from projects in an + * organization and location. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest */ diff --git a/BigQueryDataExchange/src/V1beta1/ListOrgDataExchangesResponse.php b/BigQueryDataExchange/src/V1beta1/ListOrgDataExchangesResponse.php index 14497c038d7d..db075efb3f2f 100644 --- a/BigQueryDataExchange/src/V1beta1/ListOrgDataExchangesResponse.php +++ b/BigQueryDataExchange/src/V1beta1/ListOrgDataExchangesResponse.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for response to listing DataExchanges in an organization and + * Message for response to listing data exchanges in an organization and * location. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesResponse @@ -17,7 +17,7 @@ class ListOrgDataExchangesResponse extends \Google\Protobuf\Internal\Message { /** - * The list of DataExchange. + * The list of data exchanges. * * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; */ @@ -36,7 +36,7 @@ class ListOrgDataExchangesResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $data_exchanges - * The list of DataExchange. + * The list of data exchanges. * @type string $next_page_token * A token to request the next page of results. * } @@ -47,7 +47,7 @@ public function __construct($data = NULL) { } /** - * The list of DataExchange. + * The list of data exchanges. * * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -58,7 +58,7 @@ public function getDataExchanges() } /** - * The list of DataExchange. + * The list of data exchanges. * * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchanges = 1; * @param array<\Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/BigQueryDataExchange/src/V1beta1/Listing.php b/BigQueryDataExchange/src/V1beta1/Listing.php index 83ea1bdbfe7b..4991593309b1 100644 --- a/BigQueryDataExchange/src/V1beta1/Listing.php +++ b/BigQueryDataExchange/src/V1beta1/Listing.php @@ -28,7 +28,7 @@ class Listing extends \Google\Protobuf\Internal\Message /** * Required. Human-readable display name of the listing. The display name must contain * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - * ( ), and can't start or end with spaces. + * ( ), ampersands (&) and can't start or end with spaces. * Default value is an empty string. * Max length: 63 bytes. * @@ -36,10 +36,9 @@ class Listing extends \Google\Protobuf\Internal\Message */ private $display_name = ''; /** - * Optional. Short description of the listing that can consist of sentences or - * paragraphs. The description must not contain Unicode non-characters as - * well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage - * returns (CR), and page breaks (FF). + * Optional. Short description of the listing. The description must not contain + * Unicode non-characters and C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). * Default value is an empty string. * Max length: 2000 bytes. * @@ -60,7 +59,7 @@ class Listing extends \Google\Protobuf\Internal\Message */ private $documentation = ''; /** - * Output only. Current state of the Listing. + * Output only. Current state of the listing. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -76,19 +75,19 @@ class Listing extends \Google\Protobuf\Internal\Message */ private $icon = ''; /** - * Optional. The details of the Data Provider who owns the source data. + * Optional. Details of the data provider who owns the source data. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; */ private $data_provider = null; /** - * Optional. Categories of the Listing. Up to two categories are allowed. + * Optional. Categories of the listing. Up to two categories are allowed. * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.common.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; */ private $categories; /** - * Optional. The details of the Publisher who owns the listing and has rights to share + * Optional. Details of the publisher who owns the listing and who can share * the source data. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -110,20 +109,21 @@ class Listing extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource $bigquery_dataset + * Required. Shared dataset i.e. BigQuery dataset source. * @type string $name * Output only. The resource name of the listing. * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` * @type string $display_name * Required. Human-readable display name of the listing. The display name must contain * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - * ( ), and can't start or end with spaces. + * ( ), ampersands (&) and can't start or end with spaces. * Default value is an empty string. * Max length: 63 bytes. * @type string $description - * Optional. Short description of the listing that can consist of sentences or - * paragraphs. The description must not contain Unicode non-characters as - * well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage - * returns (CR), and page breaks (FF). + * Optional. Short description of the listing. The description must not contain + * Unicode non-characters and C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). * Default value is an empty string. * Max length: 2000 bytes. * @type string $primary_contact @@ -131,10 +131,8 @@ class Listing extends \Google\Protobuf\Internal\Message * Max Length: 1000 bytes. * @type string $documentation * Optional. Documentation describing the listing. - * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource $bigquery_dataset - * Required. Shared dataset i.e. BigQuery dataset source. * @type int $state - * Output only. Current state of the Listing. + * Output only. Current state of the listing. * @type string $icon * Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB * Expected image dimensions are 512x512 pixels, however the API only @@ -142,11 +140,11 @@ class Listing extends \Google\Protobuf\Internal\Message * Note: For byte fields, the contents of the field are base64-encoded (which * increases the size of the data by 33-36%) when using JSON on the wire. * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider $data_provider - * Optional. The details of the Data Provider who owns the source data. + * Optional. Details of the data provider who owns the source data. * @type array|\Google\Protobuf\Internal\RepeatedField $categories - * Optional. Categories of the Listing. Up to two categories are allowed. + * Optional. Categories of the listing. Up to two categories are allowed. * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Publisher $publisher - * Optional. The details of the Publisher who owns the listing and has rights to share + * Optional. Details of the publisher who owns the listing and who can share * the source data. * @type string $request_access * Optional. Email or URL of the request access of the listing. @@ -159,6 +157,37 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * Required. Shared dataset i.e. BigQuery dataset source. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource|null + */ + public function getBigqueryDataset() + { + return $this->readOneof(6); + } + + public function hasBigqueryDataset() + { + return $this->hasOneof(6); + } + + /** + * Required. Shared dataset i.e. BigQuery dataset source. + * + * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource $var + * @return $this + */ + public function setBigqueryDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource::class); + $this->writeOneof(6, $var); + + return $this; + } + /** * Output only. The resource name of the listing. * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` @@ -190,7 +219,7 @@ public function setName($var) /** * Required. Human-readable display name of the listing. The display name must contain * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - * ( ), and can't start or end with spaces. + * ( ), ampersands (&) and can't start or end with spaces. * Default value is an empty string. * Max length: 63 bytes. * @@ -205,7 +234,7 @@ public function getDisplayName() /** * Required. Human-readable display name of the listing. The display name must contain * only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - * ( ), and can't start or end with spaces. + * ( ), ampersands (&) and can't start or end with spaces. * Default value is an empty string. * Max length: 63 bytes. * @@ -222,10 +251,9 @@ public function setDisplayName($var) } /** - * Optional. Short description of the listing that can consist of sentences or - * paragraphs. The description must not contain Unicode non-characters as - * well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage - * returns (CR), and page breaks (FF). + * Optional. Short description of the listing. The description must not contain + * Unicode non-characters and C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). * Default value is an empty string. * Max length: 2000 bytes. * @@ -238,10 +266,9 @@ public function getDescription() } /** - * Optional. Short description of the listing that can consist of sentences or - * paragraphs. The description must not contain Unicode non-characters as - * well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage - * returns (CR), and page breaks (FF). + * Optional. Short description of the listing. The description must not contain + * Unicode non-characters and C0 and C1 control codes except tabs (HT), + * new lines (LF), carriage returns (CR), and page breaks (FF). * Default value is an empty string. * Max length: 2000 bytes. * @@ -312,38 +339,7 @@ public function setDocumentation($var) } /** - * Required. Shared dataset i.e. BigQuery dataset source. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource|null - */ - public function getBigqueryDataset() - { - return $this->readOneof(6); - } - - public function hasBigqueryDataset() - { - return $this->hasOneof(6); - } - - /** - * Required. Shared dataset i.e. BigQuery dataset source. - * - * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource bigquery_dataset = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource $var - * @return $this - */ - public function setBigqueryDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\BigQueryDatasetSource::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Output only. Current state of the Listing. + * Output only. Current state of the listing. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -354,7 +350,7 @@ public function getState() } /** - * Output only. Current state of the Listing. + * Output only. Current state of the listing. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Listing.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var @@ -403,7 +399,7 @@ public function setIcon($var) } /** - * Optional. The details of the Data Provider who owns the source data. + * Optional. Details of the data provider who owns the source data. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider|null @@ -424,7 +420,7 @@ public function clearDataProvider() } /** - * Optional. The details of the Data Provider who owns the source data. + * Optional. Details of the data provider who owns the source data. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataProvider data_provider = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataProvider $var @@ -439,9 +435,9 @@ public function setDataProvider($var) } /** - * Optional. Categories of the Listing. Up to two categories are allowed. + * Optional. Categories of the listing. Up to two categories are allowed. * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.common.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getCategories() @@ -450,22 +446,22 @@ public function getCategories() } /** - * Optional. Categories of the Listing. Up to two categories are allowed. + * Optional. Categories of the listing. Up to two categories are allowed. * - * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.common.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.cloud.bigquery.dataexchange.v1beta1.Listing.Category categories = 10 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setCategories($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataExchange\Common\Category::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing\Category::class); $this->categories = $arr; return $this; } /** - * Optional. The details of the Publisher who owns the listing and has rights to share + * Optional. Details of the publisher who owns the listing and who can share * the source data. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -487,7 +483,7 @@ public function clearPublisher() } /** - * Optional. The details of the Publisher who owns the listing and has rights to share + * Optional. Details of the publisher who owns the listing and who can share * the source data. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.Publisher publisher = 11 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/BigQueryDataExchange/src/V1beta1/Listing/BigQueryDatasetSource.php b/BigQueryDataExchange/src/V1beta1/Listing/BigQueryDatasetSource.php index 0036f8825162..5d7b65c7fe2e 100644 --- a/BigQueryDataExchange/src/V1beta1/Listing/BigQueryDatasetSource.php +++ b/BigQueryDataExchange/src/V1beta1/Listing/BigQueryDatasetSource.php @@ -9,12 +9,13 @@ use Google\Protobuf\Internal\GPBUtil; /** - * A reference to a Shared dataset. It's an existing BigQuery dataset with a - * collection of objects, such as tables and views, that you want to share + * A reference to a shared dataset. It is an existing BigQuery dataset with a + * collection of objects such as tables and views that you want to share * with subscribers. - * Upon subscription to a Listing, Data Exchange creates a Linked dataset in + * When subscriber's subscribe to a listing, Analytics Hub creates a linked + * dataset in * the subscriber's project. A Linked dataset is an opaque, read-only BigQuery - * dataset that serves as a "symbolic link" to a shared dataset. + * dataset that serves as a _symbolic link_ to a shared dataset. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource */ diff --git a/BigQueryDataExchange/src/V1beta1/Listing/Category.php b/BigQueryDataExchange/src/V1beta1/Listing/Category.php new file mode 100644 index 000000000000..49feae1ddd69 --- /dev/null +++ b/BigQueryDataExchange/src/V1beta1/Listing/Category.php @@ -0,0 +1,143 @@ +google.cloud.bigquery.dataexchange.v1beta1.Listing.Category + */ +class Category +{ + /** + * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; + */ + const CATEGORY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum CATEGORY_OTHERS = 1; + */ + const CATEGORY_OTHERS = 1; + /** + * Generated from protobuf enum CATEGORY_ADVERTISING_AND_MARKETING = 2; + */ + const CATEGORY_ADVERTISING_AND_MARKETING = 2; + /** + * Generated from protobuf enum CATEGORY_COMMERCE = 3; + */ + const CATEGORY_COMMERCE = 3; + /** + * Generated from protobuf enum CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; + */ + const CATEGORY_CLIMATE_AND_ENVIRONMENT = 4; + /** + * Generated from protobuf enum CATEGORY_DEMOGRAPHICS = 5; + */ + const CATEGORY_DEMOGRAPHICS = 5; + /** + * Generated from protobuf enum CATEGORY_ECONOMICS = 6; + */ + const CATEGORY_ECONOMICS = 6; + /** + * Generated from protobuf enum CATEGORY_EDUCATION = 7; + */ + const CATEGORY_EDUCATION = 7; + /** + * Generated from protobuf enum CATEGORY_ENERGY = 8; + */ + const CATEGORY_ENERGY = 8; + /** + * Generated from protobuf enum CATEGORY_FINANCIAL = 9; + */ + const CATEGORY_FINANCIAL = 9; + /** + * Generated from protobuf enum CATEGORY_GAMING = 10; + */ + const CATEGORY_GAMING = 10; + /** + * Generated from protobuf enum CATEGORY_GEOSPATIAL = 11; + */ + const CATEGORY_GEOSPATIAL = 11; + /** + * Generated from protobuf enum CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; + */ + const CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12; + /** + * Generated from protobuf enum CATEGORY_MEDIA = 13; + */ + const CATEGORY_MEDIA = 13; + /** + * Generated from protobuf enum CATEGORY_PUBLIC_SECTOR = 14; + */ + const CATEGORY_PUBLIC_SECTOR = 14; + /** + * Generated from protobuf enum CATEGORY_RETAIL = 15; + */ + const CATEGORY_RETAIL = 15; + /** + * Generated from protobuf enum CATEGORY_SPORTS = 16; + */ + const CATEGORY_SPORTS = 16; + /** + * Generated from protobuf enum CATEGORY_SCIENCE_AND_RESEARCH = 17; + */ + const CATEGORY_SCIENCE_AND_RESEARCH = 17; + /** + * Generated from protobuf enum CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; + */ + const CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18; + /** + * Generated from protobuf enum CATEGORY_TRAVEL_AND_TOURISM = 19; + */ + const CATEGORY_TRAVEL_AND_TOURISM = 19; + + private static $valueToName = [ + self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', + self::CATEGORY_OTHERS => 'CATEGORY_OTHERS', + self::CATEGORY_ADVERTISING_AND_MARKETING => 'CATEGORY_ADVERTISING_AND_MARKETING', + self::CATEGORY_COMMERCE => 'CATEGORY_COMMERCE', + self::CATEGORY_CLIMATE_AND_ENVIRONMENT => 'CATEGORY_CLIMATE_AND_ENVIRONMENT', + self::CATEGORY_DEMOGRAPHICS => 'CATEGORY_DEMOGRAPHICS', + self::CATEGORY_ECONOMICS => 'CATEGORY_ECONOMICS', + self::CATEGORY_EDUCATION => 'CATEGORY_EDUCATION', + self::CATEGORY_ENERGY => 'CATEGORY_ENERGY', + self::CATEGORY_FINANCIAL => 'CATEGORY_FINANCIAL', + self::CATEGORY_GAMING => 'CATEGORY_GAMING', + self::CATEGORY_GEOSPATIAL => 'CATEGORY_GEOSPATIAL', + self::CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE => 'CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE', + self::CATEGORY_MEDIA => 'CATEGORY_MEDIA', + self::CATEGORY_PUBLIC_SECTOR => 'CATEGORY_PUBLIC_SECTOR', + self::CATEGORY_RETAIL => 'CATEGORY_RETAIL', + self::CATEGORY_SPORTS => 'CATEGORY_SPORTS', + self::CATEGORY_SCIENCE_AND_RESEARCH => 'CATEGORY_SCIENCE_AND_RESEARCH', + self::CATEGORY_TRANSPORTATION_AND_LOGISTICS => 'CATEGORY_TRANSPORTATION_AND_LOGISTICS', + self::CATEGORY_TRAVEL_AND_TOURISM => 'CATEGORY_TRAVEL_AND_TOURISM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Category::class, \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing_Category::class); + diff --git a/BigQueryDataExchange/src/V1beta1/Listing/State.php b/BigQueryDataExchange/src/V1beta1/Listing/State.php index 7be28e9c8f91..b32889752911 100644 --- a/BigQueryDataExchange/src/V1beta1/Listing/State.php +++ b/BigQueryDataExchange/src/V1beta1/Listing/State.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * State of the Listing + * State of the listing. * * Protobuf type google.cloud.bigquery.dataexchange.v1beta1.Listing.State */ @@ -21,7 +21,7 @@ class State const STATE_UNSPECIFIED = 0; /** * Subscribable state. Users with dataexchange.listings.subscribe permission - * can subscribe to this Listing. + * can subscribe to this listing. * * Generated from protobuf enum ACTIVE = 1; */ diff --git a/BigQueryDataExchange/src/V1beta1/Publisher.php b/BigQueryDataExchange/src/V1beta1/Publisher.php index 34e195833cd1..162bcc499bf5 100644 --- a/BigQueryDataExchange/src/V1beta1/Publisher.php +++ b/BigQueryDataExchange/src/V1beta1/Publisher.php @@ -9,20 +9,20 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Contains details of the Publisher. + * Contains details of the listing publisher. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.Publisher */ class Publisher extends \Google\Protobuf\Internal\Message { /** - * Optional. Name of the listing Publisher. + * Optional. Name of the listing publisher. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $name = ''; /** - * Optional. Email or URL of the listing Publisher. + * Optional. Email or URL of the listing publisher. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -36,9 +36,9 @@ class Publisher extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Optional. Name of the listing Publisher. + * Optional. Name of the listing publisher. * @type string $primary_contact - * Optional. Email or URL of the listing Publisher. + * Optional. Email or URL of the listing publisher. * Max Length: 1000 bytes. * } */ @@ -48,7 +48,7 @@ public function __construct($data = NULL) { } /** - * Optional. Name of the listing Publisher. + * Optional. Name of the listing publisher. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -59,7 +59,7 @@ public function getName() } /** - * Optional. Name of the listing Publisher. + * Optional. Name of the listing publisher. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -74,7 +74,7 @@ public function setName($var) } /** - * Optional. Email or URL of the listing Publisher. + * Optional. Email or URL of the listing publisher. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -86,7 +86,7 @@ public function getPrimaryContact() } /** - * Optional. Email or URL of the listing Publisher. + * Optional. Email or URL of the listing publisher. * Max Length: 1000 bytes. * * Generated from protobuf field string primary_contact = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/BigQueryDataExchange/src/V1beta1/SubscribeListingRequest.php b/BigQueryDataExchange/src/V1beta1/SubscribeListingRequest.php index ac35b13297be..132f28d879e6 100644 --- a/BigQueryDataExchange/src/V1beta1/SubscribeListingRequest.php +++ b/BigQueryDataExchange/src/V1beta1/SubscribeListingRequest.php @@ -9,14 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for subscribing a Listing. + * Message for subscribing to a listing. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest */ class SubscribeListingRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Resource name of the listing to subscribe to. + * Required. Resource name of the listing that you want to subscribe to. * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -30,11 +30,11 @@ class SubscribeListingRequest extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type string $name - * Required. Resource name of the listing to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DestinationDataset $destination_dataset * BigQuery destination dataset to create for the subscriber. + * @type string $name + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. * } */ public function __construct($data = NULL) { @@ -42,34 +42,6 @@ public function __construct($data = NULL) { parent::__construct($data); } - /** - * Required. Resource name of the listing to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the listing to subscribe to. - * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - /** * BigQuery destination dataset to create for the subscriber. * @@ -101,6 +73,34 @@ public function setDestinationDataset($var) return $this; } + /** + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the listing that you want to subscribe to. + * e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + /** * @return string */ diff --git a/BigQueryDataExchange/src/V1beta1/SubscribeListingResponse.php b/BigQueryDataExchange/src/V1beta1/SubscribeListingResponse.php index c6c80fbba3a8..d40416cb2840 100644 --- a/BigQueryDataExchange/src/V1beta1/SubscribeListingResponse.php +++ b/BigQueryDataExchange/src/V1beta1/SubscribeListingResponse.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for response to subscribing a Listing. - * Empty for now. + * Message for response when you subscribe to a listing. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse */ diff --git a/BigQueryDataExchange/src/V1beta1/UpdateDataExchangeRequest.php b/BigQueryDataExchange/src/V1beta1/UpdateDataExchangeRequest.php index b23fb07ffa06..344c71a64f39 100644 --- a/BigQueryDataExchange/src/V1beta1/UpdateDataExchangeRequest.php +++ b/BigQueryDataExchange/src/V1beta1/UpdateDataExchangeRequest.php @@ -9,23 +9,22 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for updating a DataExchange. + * Message for updating a data exchange. * * Generated from protobuf message google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest */ class UpdateDataExchangeRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Field mask is used to specify the fields to be overwritten in the - * DataExchange resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ private $update_mask = null; /** - * Required. The DataExchange to update. + * Required. The data exchange to update. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -38,12 +37,11 @@ class UpdateDataExchangeRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * DataExchange resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $data_exchange - * Required. The DataExchange to update. + * Required. The data exchange to update. * } */ public function __construct($data = NULL) { @@ -52,10 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. Field mask is used to specify the fields to be overwritten in the - * DataExchange resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -76,10 +73,9 @@ public function clearUpdateMask() } /** - * Required. Field mask is used to specify the fields to be overwritten in the - * DataExchange resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * Required. Field mask specifies the fields to update in the data exchange + * resource. The fields specified in the + * `updateMask` are relative to the resource and are not a full request. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var @@ -94,7 +90,7 @@ public function setUpdateMask($var) } /** - * Required. The DataExchange to update. + * Required. The data exchange to update. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange|null @@ -115,7 +111,7 @@ public function clearDataExchange() } /** - * Required. The DataExchange to update. + * Required. The data exchange to update. * * Generated from protobuf field .google.cloud.bigquery.dataexchange.v1beta1.DataExchange data_exchange = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\BigQuery\DataExchange\V1beta1\DataExchange $var diff --git a/BigQueryDataExchange/src/V1beta1/UpdateListingRequest.php b/BigQueryDataExchange/src/V1beta1/UpdateListingRequest.php index 9b929c616506..24cc2d2004fb 100644 --- a/BigQueryDataExchange/src/V1beta1/UpdateListingRequest.php +++ b/BigQueryDataExchange/src/V1beta1/UpdateListingRequest.php @@ -16,10 +16,9 @@ class UpdateListingRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Listing resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -38,10 +37,9 @@ class UpdateListingRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Listing resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. * @type \Google\Cloud\BigQuery\DataExchange\V1beta1\Listing $listing * Required. The listing to update. * } @@ -52,10 +50,9 @@ public function __construct($data = NULL) { } /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Listing resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -76,10 +73,9 @@ public function clearUpdateMask() } /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Listing resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. + * Required. Field mask specifies the fields to update in the listing resource. The + * fields specified in the `updateMask` are relative to the resource and are + * not a full request. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/BigQueryDataExchange/src/V1beta1/gapic_metadata.json b/BigQueryDataExchange/src/V1beta1/gapic_metadata.json index b674899d7bff..f0e891ccec84 100644 --- a/BigQueryDataExchange/src/V1beta1/gapic_metadata.json +++ b/BigQueryDataExchange/src/V1beta1/gapic_metadata.json @@ -84,6 +84,16 @@ "methods": [ "updateListing" ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] } } } diff --git a/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_client_config.json b/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_client_config.json index c51979b5b561..ef5607e7a3c2 100644 --- a/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_client_config.json +++ b/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_client_config.json @@ -103,6 +103,16 @@ "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" } } } diff --git a/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_descriptor_config.php b/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_descriptor_config.php index e47038fad68d..ba712e979aab 100644 --- a/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_descriptor_config.php +++ b/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_descriptor_config.php @@ -33,6 +33,16 @@ 'resourcesGetMethod' => 'getDataExchanges', ], ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], ], ], ]; diff --git a/BigQueryDataExchange/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php b/BigQueryDataExchange/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php index d81fb6396d97..da381ec31b0d 100644 --- a/BigQueryDataExchange/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php +++ b/BigQueryDataExchange/tests/Unit/V1beta1/AnalyticsHubServiceClientTest.php @@ -38,6 +38,8 @@ use Google\Cloud\BigQuery\DataExchange\V1beta1\SubscribeListingResponse; use Google\Cloud\Iam\V1\Policy; use Google\Cloud\Iam\V1\TestIamPermissionsResponse; +use Google\Cloud\Location\ListLocationsResponse; +use Google\Cloud\Location\Location; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Rpc\Code; @@ -1182,4 +1184,132 @@ public function updateListingExceptionTest() $transport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); } + + /** + * @test + */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } }