From d44f9165809b1ba329ac8eab39bf67d7eba0908b Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 21 Aug 2026 21:53:12 +0000 Subject: [PATCH] chore(GeminiDataAnalytics): remove obsolete ContextRetrievalService files --- .../V1Beta/ContextRetrievalService.php | 92 --- .../get_location.php | 57 -- .../list_locations.php | 62 -- ...rieve_big_query_recent_relevant_tables.php | 73 -- .../retrieve_big_query_table_context.php | 78 --- .../retrieve_big_query_table_contexts.php | 75 --- ...uery_table_contexts_from_recent_tables.php | 75 --- ...big_query_table_suggested_descriptions.php | 74 -- ...eve_big_query_table_suggested_examples.php | 73 -- .../Client/ContextRetrievalServiceClient.php | 456 ------------- .../src/V1beta/DirectLookup.php | 81 --- ...eveBigQueryRecentRelevantTablesRequest.php | 114 ---- ...veBigQueryRecentRelevantTablesResponse.php | 76 --- .../RetrieveBigQueryTableContextRequest.php | 188 ------ .../RetrieveBigQueryTableContextResponse.php | 110 --- ...ryTableContextsFromRecentTablesRequest.php | 114 ---- ...yTableContextsFromRecentTablesResponse.php | 68 -- .../RetrieveBigQueryTableContextsRequest.php | 147 ---- .../RetrieveBigQueryTableContextsResponse.php | 67 -- ...QueryTableSuggestedDescriptionsRequest.php | 114 ---- ...ueryTableSuggestedDescriptionsResponse.php | 68 -- ...eBigQueryTableSuggestedExamplesRequest.php | 113 ---- ...BigQueryTableSuggestedExamplesResponse.php | 67 -- .../src/V1beta/TableCandidate.php | 143 ---- ...xt_retrieval_service_descriptor_config.php | 134 ---- ...t_retrieval_service_rest_client_config.php | 172 ----- .../ContextRetrievalServiceClientTest.php | 635 ------------------ 27 files changed, 3526 deletions(-) delete mode 100644 GeminiDataAnalytics/metadata/V1Beta/ContextRetrievalService.php delete mode 100644 GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/get_location.php delete mode 100644 GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/list_locations.php delete mode 100644 GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_recent_relevant_tables.php delete mode 100644 GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_context.php delete mode 100644 GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts.php delete mode 100644 GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts_from_recent_tables.php delete mode 100644 GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_descriptions.php delete mode 100644 GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_examples.php delete mode 100644 GeminiDataAnalytics/src/V1beta/Client/ContextRetrievalServiceClient.php delete mode 100644 GeminiDataAnalytics/src/V1beta/DirectLookup.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryRecentRelevantTablesRequest.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryRecentRelevantTablesResponse.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextRequest.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextResponse.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsFromRecentTablesRequest.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsFromRecentTablesResponse.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsRequest.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsResponse.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedDescriptionsRequest.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedDescriptionsResponse.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedExamplesRequest.php delete mode 100644 GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedExamplesResponse.php delete mode 100644 GeminiDataAnalytics/src/V1beta/TableCandidate.php delete mode 100644 GeminiDataAnalytics/src/V1beta/resources/context_retrieval_service_descriptor_config.php delete mode 100644 GeminiDataAnalytics/src/V1beta/resources/context_retrieval_service_rest_client_config.php delete mode 100644 GeminiDataAnalytics/tests/Unit/V1beta/Client/ContextRetrievalServiceClientTest.php diff --git a/GeminiDataAnalytics/metadata/V1Beta/ContextRetrievalService.php b/GeminiDataAnalytics/metadata/V1Beta/ContextRetrievalService.php deleted file mode 100644 index 20b2335ebcdf..000000000000 --- a/GeminiDataAnalytics/metadata/V1Beta/ContextRetrievalService.php +++ /dev/null @@ -1,92 +0,0 @@ -internalAddGeneratedFile( - ' -& -Ggoogle/cloud/geminidataanalytics/v1beta/context_retrieval_service.proto\'google.cloud.geminidataanalytics.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/cloud/geminidataanalytics/v1beta/datasource.proto" -#RetrieveBigQueryTableContextRequest -project ( BA -parent ( BA -query ( BAQ - direct_lookup ( 25.google.cloud.geminidataanalytics.v1beta.DirectLookupBA" -$RetrieveBigQueryTableContextResponseo - -candidates ( 2W.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextResponse.CandidateBQ -table_candidates ( 27.google.cloud.geminidataanalytics.v1beta.TableCandidate5 - Candidate -linked_resource (  -content ( " -$RetrieveBigQueryTableContextsRequest -parent ( BA -query ( BAR -direct_lookups ( 25.google.cloud.geminidataanalytics.v1beta.DirectLookupBA"z -%RetrieveBigQueryTableContextsResponseQ -table_candidates ( 27.google.cloud.geminidataanalytics.v1beta.TableCandidate"_ -4RetrieveBigQueryTableContextsFromRecentTablesRequest -parent ( BA -query ( BA" -5RetrieveBigQueryTableContextsFromRecentTablesResponseQ -table_candidates ( 27.google.cloud.geminidataanalytics.v1beta.TableCandidate" -1RetrieveBigQueryTableSuggestedDescriptionsRequest -parent ( BAQ - direct_lookup ( 25.google.cloud.geminidataanalytics.v1beta.DirectLookupBA" -2RetrieveBigQueryTableSuggestedDescriptionsResponseQ -table_candidates ( 27.google.cloud.geminidataanalytics.v1beta.TableCandidate" --RetrieveBigQueryTableSuggestedExamplesRequest -parent ( BAQ - direct_lookup ( 25.google.cloud.geminidataanalytics.v1beta.DirectLookupBA" -.RetrieveBigQueryTableSuggestedExamplesResponse -example_suggestions ( 2i.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedExamplesResponse.ExampleSuggestionR -ExampleSuggestion -nl_query (  -sql (  -linked_bigquery_tables ( "V -+RetrieveBigQueryRecentRelevantTablesRequest -parent ( BA -query ( BA"A -,RetrieveBigQueryRecentRelevantTablesResponse - table_ids ( "w - DirectLookupg -big_query_table_reference ( 2?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceBA" -TableCandidate -linked_resource (  - -icl_string ( b -field_suggestions ( 2G.google.cloud.geminidataanalytics.v1beta.TableCandidate.FieldSuggestion -FieldSuggestion -field (  -suggested_description ( W -nested ( 2G.google.cloud.geminidataanalytics.v1beta.TableCandidate.FieldSuggestion2 -ContextRetrievalService -RetrieveBigQueryTableContextL.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextRequestM.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextResponse"OI"D/v1beta/{parent=projects/*/locations/*}:retrieveBigQueryTableContext:* -RetrieveBigQueryTableContextsM.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextsRequestN.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextsResponse"ZT"O/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryTableContexts:* --RetrieveBigQueryTableContextsFromRecentTables].google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextsFromRecentTablesRequest^.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextsFromRecentTablesResponse"jd"_/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryTableContextsFromRecentTables:* -*RetrieveBigQueryTableSuggestedDescriptionsZ.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedDescriptionsRequest[.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedDescriptionsResponse"ga"\\/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryTableSuggestedDescriptions:* -&RetrieveBigQueryTableSuggestedExamplesV.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedExamplesRequestW.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedExamplesResponse"c]"X/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryTableSuggestedExamples:* -$RetrieveBigQueryRecentRelevantTablesT.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryRecentRelevantTablesRequestU.google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryRecentRelevantTablesResponse"a["V/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryRecentRelevantTables:*VA"geminidataanalytics.googleapis.comA.https://www.googleapis.com/auth/cloud-platformB -+com.google.cloud.geminidataanalytics.v1betaBContextRetrievalServiceProtoPZ]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\'Google.Cloud.GeminiDataAnalytics.V1Beta\'Google\\Cloud\\GeminiDataAnalytics\\V1beta*Google::Cloud::GeminiDataAnalytics::V1betabproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/get_location.php b/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/get_location.php deleted file mode 100644 index 6b462431affc..000000000000 --- a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END geminidataanalytics_v1beta_generated_ContextRetrievalService_GetLocation_sync] diff --git a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/list_locations.php b/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/list_locations.php deleted file mode 100644 index f8b75477a40d..000000000000 --- a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END geminidataanalytics_v1beta_generated_ContextRetrievalService_ListLocations_sync] diff --git a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_recent_relevant_tables.php b/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_recent_relevant_tables.php deleted file mode 100644 index 8dac0229f3f0..000000000000 --- a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_recent_relevant_tables.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var RetrieveBigQueryRecentRelevantTablesResponse $response */ - $response = $contextRetrievalServiceClient->retrieveBigQueryRecentRelevantTables($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - retrieve_big_query_recent_relevant_tables_sample($parent); -} -// [END geminidataanalytics_v1beta_generated_ContextRetrievalService_RetrieveBigQueryRecentRelevantTables_sync] diff --git a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_context.php b/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_context.php deleted file mode 100644 index e0ea625e4251..000000000000 --- a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_context.php +++ /dev/null @@ -1,78 +0,0 @@ -setProject($project) - ->setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var RetrieveBigQueryTableContextResponse $response */ - $response = $contextRetrievalServiceClient->retrieveBigQueryTableContext($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $project = '[PROJECT]'; - $parent = '[PARENT]'; - - retrieve_big_query_table_context_sample($project, $parent); -} -// [END geminidataanalytics_v1beta_generated_ContextRetrievalService_RetrieveBigQueryTableContext_sync] diff --git a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts.php b/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts.php deleted file mode 100644 index 19dee9746bab..000000000000 --- a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var RetrieveBigQueryTableContextsResponse $response */ - $response = $contextRetrievalServiceClient->retrieveBigQueryTableContexts($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - retrieve_big_query_table_contexts_sample($parent); -} -// [END geminidataanalytics_v1beta_generated_ContextRetrievalService_RetrieveBigQueryTableContexts_sync] diff --git a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts_from_recent_tables.php b/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts_from_recent_tables.php deleted file mode 100644 index 64753ad9d005..000000000000 --- a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts_from_recent_tables.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var RetrieveBigQueryTableContextsFromRecentTablesResponse $response */ - $response = $contextRetrievalServiceClient->retrieveBigQueryTableContextsFromRecentTables($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - retrieve_big_query_table_contexts_from_recent_tables_sample($parent); -} -// [END geminidataanalytics_v1beta_generated_ContextRetrievalService_RetrieveBigQueryTableContextsFromRecentTables_sync] diff --git a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_descriptions.php b/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_descriptions.php deleted file mode 100644 index 3d3d971054dd..000000000000 --- a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_descriptions.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var RetrieveBigQueryTableSuggestedDescriptionsResponse $response */ - $response = $contextRetrievalServiceClient->retrieveBigQueryTableSuggestedDescriptions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - retrieve_big_query_table_suggested_descriptions_sample($parent); -} -// [END geminidataanalytics_v1beta_generated_ContextRetrievalService_RetrieveBigQueryTableSuggestedDescriptions_sync] diff --git a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_examples.php b/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_examples.php deleted file mode 100644 index d40b3df9fcea..000000000000 --- a/GeminiDataAnalytics/samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_examples.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var RetrieveBigQueryTableSuggestedExamplesResponse $response */ - $response = $contextRetrievalServiceClient->retrieveBigQueryTableSuggestedExamples($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - retrieve_big_query_table_suggested_examples_sample($parent); -} -// [END geminidataanalytics_v1beta_generated_ContextRetrievalService_RetrieveBigQueryTableSuggestedExamples_sync] diff --git a/GeminiDataAnalytics/src/V1beta/Client/ContextRetrievalServiceClient.php b/GeminiDataAnalytics/src/V1beta/Client/ContextRetrievalServiceClient.php deleted file mode 100644 index 0a8110c3847d..000000000000 --- a/GeminiDataAnalytics/src/V1beta/Client/ContextRetrievalServiceClient.php +++ /dev/null @@ -1,456 +0,0 @@ - retrieveBigQueryRecentRelevantTablesAsync(RetrieveBigQueryRecentRelevantTablesRequest $request, array $optionalArgs = []) - * @method PromiseInterface retrieveBigQueryTableContextAsync(RetrieveBigQueryTableContextRequest $request, array $optionalArgs = []) - * @method PromiseInterface retrieveBigQueryTableContextsAsync(RetrieveBigQueryTableContextsRequest $request, array $optionalArgs = []) - * @method PromiseInterface retrieveBigQueryTableContextsFromRecentTablesAsync(RetrieveBigQueryTableContextsFromRecentTablesRequest $request, array $optionalArgs = []) - * @method PromiseInterface retrieveBigQueryTableSuggestedDescriptionsAsync(RetrieveBigQueryTableSuggestedDescriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface retrieveBigQueryTableSuggestedExamplesAsync(RetrieveBigQueryTableSuggestedExamplesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class ContextRetrievalServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.geminidataanalytics.v1beta.ContextRetrievalService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'geminidataanalytics.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'geminidataanalytics.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/context_retrieval_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/context_retrieval_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/context_retrieval_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => - __DIR__ . '/../resources/context_retrieval_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'geminidataanalytics.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * *Important*: If you accept a credential configuration (credential - * JSON/File/Stream) from an external source for authentication to Google Cloud - * Platform, you must validate it before providing it to any Google API or library. - * Providing an unvalidated credential configuration to Google APIs can compromise - * the security of your systems and data. For more information {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Retrieves BigQuery table references from recently accessed tables. - * - * The async variant is - * {@see ContextRetrievalServiceClient::retrieveBigQueryRecentRelevantTablesAsync()} - * . - * - * @example samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_recent_relevant_tables.php - * - * @param RetrieveBigQueryRecentRelevantTablesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @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 RetrieveBigQueryRecentRelevantTablesResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function retrieveBigQueryRecentRelevantTables( - RetrieveBigQueryRecentRelevantTablesRequest $request, - array $callOptions = [] - ): RetrieveBigQueryRecentRelevantTablesResponse { - return $this->startApiCall('RetrieveBigQueryRecentRelevantTables', $request, $callOptions)->wait(); - } - - /** - * Retrieves BigQuery table contextual data for provided table references. - * Contextual data includes table schema information as well as sample - * values. - * - * The async variant is - * {@see ContextRetrievalServiceClient::retrieveBigQueryTableContextAsync()} . - * - * @example samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_context.php - * - * @param RetrieveBigQueryTableContextRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @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 RetrieveBigQueryTableContextResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function retrieveBigQueryTableContext( - RetrieveBigQueryTableContextRequest $request, - array $callOptions = [] - ): RetrieveBigQueryTableContextResponse { - return $this->startApiCall('RetrieveBigQueryTableContext', $request, $callOptions)->wait(); - } - - /** - * Retrieves BigQuery table contextual data for provided table references. - * Contextual data includes table schema information as well as sample - * values. - * - * The async variant is - * {@see ContextRetrievalServiceClient::retrieveBigQueryTableContextsAsync()} . - * - * @example samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts.php - * - * @param RetrieveBigQueryTableContextsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @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 RetrieveBigQueryTableContextsResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function retrieveBigQueryTableContexts( - RetrieveBigQueryTableContextsRequest $request, - array $callOptions = [] - ): RetrieveBigQueryTableContextsResponse { - return $this->startApiCall('RetrieveBigQueryTableContexts', $request, $callOptions)->wait(); - } - - /** - * Retrieves BigQuery table contextual data from recently accessed tables. - * Contextual data includes table schema information as well as sample - * values. - * - * The async variant is - * {@see ContextRetrievalServiceClient::retrieveBigQueryTableContextsFromRecentTablesAsync()} - * . - * - * @example samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_contexts_from_recent_tables.php - * - * @param RetrieveBigQueryTableContextsFromRecentTablesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @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 RetrieveBigQueryTableContextsFromRecentTablesResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function retrieveBigQueryTableContextsFromRecentTables( - RetrieveBigQueryTableContextsFromRecentTablesRequest $request, - array $callOptions = [] - ): RetrieveBigQueryTableContextsFromRecentTablesResponse { - return $this->startApiCall('RetrieveBigQueryTableContextsFromRecentTables', $request, $callOptions)->wait(); - } - - /** - * Retrieves BigQuery table schema with suggested table and column - * descriptions. - * - * The async variant is - * {@see ContextRetrievalServiceClient::retrieveBigQueryTableSuggestedDescriptionsAsync()} - * . - * - * @example samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_descriptions.php - * - * @param RetrieveBigQueryTableSuggestedDescriptionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @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 RetrieveBigQueryTableSuggestedDescriptionsResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function retrieveBigQueryTableSuggestedDescriptions( - RetrieveBigQueryTableSuggestedDescriptionsRequest $request, - array $callOptions = [] - ): RetrieveBigQueryTableSuggestedDescriptionsResponse { - return $this->startApiCall('RetrieveBigQueryTableSuggestedDescriptions', $request, $callOptions)->wait(); - } - - /** - * Retrieves BigQuery table schema with suggested NL-SQL examples. - * - * The async variant is - * {@see ContextRetrievalServiceClient::retrieveBigQueryTableSuggestedExamplesAsync()} - * . - * - * @example samples/V1beta/ContextRetrievalServiceClient/retrieve_big_query_table_suggested_examples.php - * - * @param RetrieveBigQueryTableSuggestedExamplesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @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 RetrieveBigQueryTableSuggestedExamplesResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function retrieveBigQueryTableSuggestedExamples( - RetrieveBigQueryTableSuggestedExamplesRequest $request, - array $callOptions = [] - ): RetrieveBigQueryTableSuggestedExamplesResponse { - return $this->startApiCall('RetrieveBigQueryTableSuggestedExamples', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ContextRetrievalServiceClient::getLocationAsync()} . - * - * @example samples/V1beta/ContextRetrievalServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @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 Location - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ContextRetrievalServiceClient::listLocationsAsync()} - * . - * - * @example samples/V1beta/ContextRetrievalServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/GeminiDataAnalytics/src/V1beta/DirectLookup.php b/GeminiDataAnalytics/src/V1beta/DirectLookup.php deleted file mode 100644 index fcd5b4661163..000000000000 --- a/GeminiDataAnalytics/src/V1beta/DirectLookup.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.DirectLookup - */ -class DirectLookup extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Table reference that server invokes a direct lookup of table - * metadata upon. The returned candidate will be TableMetadataResult. - * - * Generated from protobuf field .google.cloud.geminidataanalytics.v1beta.BigQueryTableReference big_query_table_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $big_query_table_reference = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GeminiDataAnalytics\V1beta\BigQueryTableReference $big_query_table_reference - * Optional. Table reference that server invokes a direct lookup of table - * metadata upon. The returned candidate will be TableMetadataResult. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Table reference that server invokes a direct lookup of table - * metadata upon. The returned candidate will be TableMetadataResult. - * - * Generated from protobuf field .google.cloud.geminidataanalytics.v1beta.BigQueryTableReference big_query_table_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GeminiDataAnalytics\V1beta\BigQueryTableReference|null - */ - public function getBigQueryTableReference() - { - return $this->big_query_table_reference; - } - - public function hasBigQueryTableReference() - { - return isset($this->big_query_table_reference); - } - - public function clearBigQueryTableReference() - { - unset($this->big_query_table_reference); - } - - /** - * Optional. Table reference that server invokes a direct lookup of table - * metadata upon. The returned candidate will be TableMetadataResult. - * - * Generated from protobuf field .google.cloud.geminidataanalytics.v1beta.BigQueryTableReference big_query_table_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GeminiDataAnalytics\V1beta\BigQueryTableReference $var - * @return $this - */ - public function setBigQueryTableReference($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GeminiDataAnalytics\V1beta\BigQueryTableReference::class); - $this->big_query_table_reference = $var; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryRecentRelevantTablesRequest.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryRecentRelevantTablesRequest.php deleted file mode 100644 index 0daebbd105a1..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryRecentRelevantTablesRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryRecentRelevantTablesRequest - */ -class RetrieveBigQueryRecentRelevantTablesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for RetrieveBigQueryRecentTablesRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $query = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for RetrieveBigQueryRecentTablesRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * @type string $query - * Optional. User query in natural language. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for RetrieveBigQueryRecentTablesRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for RetrieveBigQueryRecentTablesRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryRecentRelevantTablesResponse.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryRecentRelevantTablesResponse.php deleted file mode 100644 index 66812ef4239c..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryRecentRelevantTablesResponse.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryRecentRelevantTablesResponse - */ -class RetrieveBigQueryRecentRelevantTablesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of retrieved table ids. - * The unique identifier for the table. Names are case-sensitive. - * Example for BigQuery Table: `{project}.{dataset}.{table}`. - * - * Generated from protobuf field repeated string table_ids = 1; - */ - private $table_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $table_ids - * List of retrieved table ids. - * The unique identifier for the table. Names are case-sensitive. - * Example for BigQuery Table: `{project}.{dataset}.{table}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * List of retrieved table ids. - * The unique identifier for the table. Names are case-sensitive. - * Example for BigQuery Table: `{project}.{dataset}.{table}`. - * - * Generated from protobuf field repeated string table_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTableIds() - { - return $this->table_ids; - } - - /** - * List of retrieved table ids. - * The unique identifier for the table. Names are case-sensitive. - * Example for BigQuery Table: `{project}.{dataset}.{table}`. - * - * Generated from protobuf field repeated string table_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTableIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->table_ids = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextRequest.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextRequest.php deleted file mode 100644 index 0a4e9d2deed1..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextRequest - */ -class RetrieveBigQueryTableContextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. - * - * Generated from protobuf field string project = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; - * @deprecated - */ - protected $project = ''; - /** - * Required. Parent value for RetrieveBigQueryTableContextRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $query = ''; - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $direct_lookup; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project - * Required. - * @type string $parent - * Required. Parent value for RetrieveBigQueryTableContextRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * @type string $query - * Optional. User query in natural language. - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup>|\Google\Protobuf\Internal\RepeatedField $direct_lookup - * Optional. A list of direct lookup parameters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * Required. - * - * Generated from protobuf field string project = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; - * @return string - * @deprecated - */ - public function getProject() - { - if ($this->project !== '') { - @trigger_error('project is deprecated.', E_USER_DEPRECATED); - } - return $this->project; - } - - /** - * Required. - * - * Generated from protobuf field string project = 5 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - * @deprecated - */ - public function setProject($var) - { - @trigger_error('project is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Required. Parent value for RetrieveBigQueryTableContextRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for RetrieveBigQueryTableContextRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDirectLookup() - { - return $this->direct_lookup; - } - - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDirectLookup($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup::class); - $this->direct_lookup = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextResponse.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextResponse.php deleted file mode 100644 index 5a3d272c5bf0..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextResponse - */ -class RetrieveBigQueryTableContextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextResponse.Candidate candidates = 1 [deprecated = true]; - * @deprecated - */ - private $candidates; - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 2; - */ - private $table_candidates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableContextResponse\Candidate>|\Google\Protobuf\Internal\RepeatedField $candidates - * List of retrieved candidates with their bundled metadata. - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate>|\Google\Protobuf\Internal\RepeatedField $table_candidates - * List of retrieved candidates with their bundled metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextResponse.Candidate candidates = 1 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getCandidates() - { - if ($this->candidates->count() !== 0) { - @trigger_error('candidates is deprecated.', E_USER_DEPRECATED); - } - return $this->candidates; - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextResponse.Candidate candidates = 1 [deprecated = true]; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableContextResponse\Candidate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setCandidates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableContextResponse\Candidate::class); - if ($arr->count() !== 0) { - @trigger_error('candidates is deprecated.', E_USER_DEPRECATED); - } - $this->candidates = $arr; - - return $this; - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTableCandidates() - { - return $this->table_candidates; - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 2; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTableCandidates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate::class); - $this->table_candidates = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsFromRecentTablesRequest.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsFromRecentTablesRequest.php deleted file mode 100644 index f05dc7c290e9..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsFromRecentTablesRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextsFromRecentTablesRequest - */ -class RetrieveBigQueryTableContextsFromRecentTablesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for - * RetrieveBigQueryTableContextsFromRecentTablesRequest. Pattern: - * `projects/{project}/locations/{location}` For location, use "global" for - * now. Regional location value will be supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $query = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for - * RetrieveBigQueryTableContextsFromRecentTablesRequest. Pattern: - * `projects/{project}/locations/{location}` For location, use "global" for - * now. Regional location value will be supported in the future. - * @type string $query - * Optional. User query in natural language. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for - * RetrieveBigQueryTableContextsFromRecentTablesRequest. Pattern: - * `projects/{project}/locations/{location}` For location, use "global" for - * now. Regional location value will be supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for - * RetrieveBigQueryTableContextsFromRecentTablesRequest. Pattern: - * `projects/{project}/locations/{location}` For location, use "global" for - * now. Regional location value will be supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsFromRecentTablesResponse.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsFromRecentTablesResponse.php deleted file mode 100644 index 1e093fd260de..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsFromRecentTablesResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextsFromRecentTablesResponse - */ -class RetrieveBigQueryTableContextsFromRecentTablesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - */ - private $table_candidates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate>|\Google\Protobuf\Internal\RepeatedField $table_candidates - * List of retrieved candidates with their bundled metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTableCandidates() - { - return $this->table_candidates; - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTableCandidates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate::class); - $this->table_candidates = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsRequest.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsRequest.php deleted file mode 100644 index 8320128e709e..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextsRequest - */ -class RetrieveBigQueryTableContextsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for RetrieveBigQueryTableContextRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $query = ''; - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookups = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $direct_lookups; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for RetrieveBigQueryTableContextRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * @type string $query - * Optional. User query in natural language. - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup>|\Google\Protobuf\Internal\RepeatedField $direct_lookups - * Optional. A list of direct lookup parameters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for RetrieveBigQueryTableContextRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for RetrieveBigQueryTableContextRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Optional. User query in natural language. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookups = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDirectLookups() - { - return $this->direct_lookups; - } - - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookups = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDirectLookups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup::class); - $this->direct_lookups = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsResponse.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsResponse.php deleted file mode 100644 index 206ad3e15c0b..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableContextsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableContextsResponse - */ -class RetrieveBigQueryTableContextsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - */ - private $table_candidates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate>|\Google\Protobuf\Internal\RepeatedField $table_candidates - * List of retrieved candidates with their bundled metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTableCandidates() - { - return $this->table_candidates; - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTableCandidates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate::class); - $this->table_candidates = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedDescriptionsRequest.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedDescriptionsRequest.php deleted file mode 100644 index 2e65c7e7595c..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedDescriptionsRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedDescriptionsRequest - */ -class RetrieveBigQueryTableSuggestedDescriptionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for - * RetrieveBigQueryTableSuggestedDescriptionsRequest. Pattern: - * `projects/{project}/locations/{location}` For location, use "global" for - * now. Regional location value will be supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $direct_lookup; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for - * RetrieveBigQueryTableSuggestedDescriptionsRequest. Pattern: - * `projects/{project}/locations/{location}` For location, use "global" for - * now. Regional location value will be supported in the future. - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup>|\Google\Protobuf\Internal\RepeatedField $direct_lookup - * Optional. A list of direct lookup parameters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for - * RetrieveBigQueryTableSuggestedDescriptionsRequest. Pattern: - * `projects/{project}/locations/{location}` For location, use "global" for - * now. Regional location value will be supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for - * RetrieveBigQueryTableSuggestedDescriptionsRequest. Pattern: - * `projects/{project}/locations/{location}` For location, use "global" for - * now. Regional location value will be supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDirectLookup() - { - return $this->direct_lookup; - } - - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDirectLookup($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup::class); - $this->direct_lookup = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedDescriptionsResponse.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedDescriptionsResponse.php deleted file mode 100644 index 5be315eb669c..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedDescriptionsResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedDescriptionsResponse - */ -class RetrieveBigQueryTableSuggestedDescriptionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - */ - private $table_candidates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate>|\Google\Protobuf\Internal\RepeatedField $table_candidates - * List of retrieved candidates with their bundled metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTableCandidates() - { - return $this->table_candidates; - } - - /** - * List of retrieved candidates with their bundled metadata. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate table_candidates = 1; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTableCandidates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate::class); - $this->table_candidates = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedExamplesRequest.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedExamplesRequest.php deleted file mode 100644 index 87d3e8688420..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedExamplesRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedExamplesRequest - */ -class RetrieveBigQueryTableSuggestedExamplesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for RetrieveBigQueryTableSuggestedExamplesRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $direct_lookup; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for RetrieveBigQueryTableSuggestedExamplesRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup>|\Google\Protobuf\Internal\RepeatedField $direct_lookup - * Optional. A list of direct lookup parameters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for RetrieveBigQueryTableSuggestedExamplesRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for RetrieveBigQueryTableSuggestedExamplesRequest. - * Pattern: `projects/{project}/locations/{location}` - * For location, use "global" for now. Regional location value will be - * supported in the future. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDirectLookup() - { - return $this->direct_lookup; - } - - /** - * Optional. A list of direct lookup parameters. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.DirectLookup direct_lookup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDirectLookup($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\DirectLookup::class); - $this->direct_lookup = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedExamplesResponse.php b/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedExamplesResponse.php deleted file mode 100644 index 75962b4ff19e..000000000000 --- a/GeminiDataAnalytics/src/V1beta/RetrieveBigQueryTableSuggestedExamplesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedExamplesResponse - */ -class RetrieveBigQueryTableSuggestedExamplesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of suggested examples. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedExamplesResponse.ExampleSuggestion example_suggestions = 2; - */ - private $example_suggestions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableSuggestedExamplesResponse\ExampleSuggestion>|\Google\Protobuf\Internal\RepeatedField $example_suggestions - * List of suggested examples. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * List of suggested examples. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedExamplesResponse.ExampleSuggestion example_suggestions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExampleSuggestions() - { - return $this->example_suggestions; - } - - /** - * List of suggested examples. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.RetrieveBigQueryTableSuggestedExamplesResponse.ExampleSuggestion example_suggestions = 2; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableSuggestedExamplesResponse\ExampleSuggestion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExampleSuggestions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableSuggestedExamplesResponse\ExampleSuggestion::class); - $this->example_suggestions = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/TableCandidate.php b/GeminiDataAnalytics/src/V1beta/TableCandidate.php deleted file mode 100644 index 39b54292a241..000000000000 --- a/GeminiDataAnalytics/src/V1beta/TableCandidate.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.geminidataanalytics.v1beta.TableCandidate - */ -class TableCandidate extends \Google\Protobuf\Internal\Message -{ - /** - * The fully qualified resource name of the candidate in its source system, - * if applicable. E.g. for BigQuery tables, the format is: - * `bigquery.googleapis.com/projects/{project_id}/datasets/{dataset_id}/tables/{table_id}`. - * - * Generated from protobuf field string linked_resource = 1; - */ - protected $linked_resource = ''; - /** - * In-context-learning string. For example, could be in DDL format. - * - * Generated from protobuf field string icl_string = 2; - */ - protected $icl_string = ''; - /** - * Suggested field descriptions for this candidate, if requested. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate.FieldSuggestion field_suggestions = 3; - */ - private $field_suggestions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $linked_resource - * The fully qualified resource name of the candidate in its source system, - * if applicable. E.g. for BigQuery tables, the format is: - * `bigquery.googleapis.com/projects/{project_id}/datasets/{dataset_id}/tables/{table_id}`. - * @type string $icl_string - * In-context-learning string. For example, could be in DDL format. - * @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate\FieldSuggestion>|\Google\Protobuf\Internal\RepeatedField $field_suggestions - * Suggested field descriptions for this candidate, if requested. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\ContextRetrievalService::initOnce(); - parent::__construct($data); - } - - /** - * The fully qualified resource name of the candidate in its source system, - * if applicable. E.g. for BigQuery tables, the format is: - * `bigquery.googleapis.com/projects/{project_id}/datasets/{dataset_id}/tables/{table_id}`. - * - * Generated from protobuf field string linked_resource = 1; - * @return string - */ - public function getLinkedResource() - { - return $this->linked_resource; - } - - /** - * The fully qualified resource name of the candidate in its source system, - * if applicable. E.g. for BigQuery tables, the format is: - * `bigquery.googleapis.com/projects/{project_id}/datasets/{dataset_id}/tables/{table_id}`. - * - * Generated from protobuf field string linked_resource = 1; - * @param string $var - * @return $this - */ - public function setLinkedResource($var) - { - GPBUtil::checkString($var, True); - $this->linked_resource = $var; - - return $this; - } - - /** - * In-context-learning string. For example, could be in DDL format. - * - * Generated from protobuf field string icl_string = 2; - * @return string - */ - public function getIclString() - { - return $this->icl_string; - } - - /** - * In-context-learning string. For example, could be in DDL format. - * - * Generated from protobuf field string icl_string = 2; - * @param string $var - * @return $this - */ - public function setIclString($var) - { - GPBUtil::checkString($var, True); - $this->icl_string = $var; - - return $this; - } - - /** - * Suggested field descriptions for this candidate, if requested. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate.FieldSuggestion field_suggestions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldSuggestions() - { - return $this->field_suggestions; - } - - /** - * Suggested field descriptions for this candidate, if requested. - * - * Generated from protobuf field repeated .google.cloud.geminidataanalytics.v1beta.TableCandidate.FieldSuggestion field_suggestions = 3; - * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate\FieldSuggestion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldSuggestions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\TableCandidate\FieldSuggestion::class); - $this->field_suggestions = $arr; - - return $this; - } - -} - diff --git a/GeminiDataAnalytics/src/V1beta/resources/context_retrieval_service_descriptor_config.php b/GeminiDataAnalytics/src/V1beta/resources/context_retrieval_service_descriptor_config.php deleted file mode 100644 index 196194a30ab8..000000000000 --- a/GeminiDataAnalytics/src/V1beta/resources/context_retrieval_service_descriptor_config.php +++ /dev/null @@ -1,134 +0,0 @@ - [ - 'google.cloud.geminidataanalytics.v1beta.ContextRetrievalService' => [ - 'RetrieveBigQueryRecentRelevantTables' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryRecentRelevantTablesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableContext' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableContextResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableContexts' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableContextsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableContextsFromRecentTables' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableContextsFromRecentTablesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableSuggestedDescriptions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableSuggestedDescriptionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableSuggestedExamples' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveBigQueryTableSuggestedExamplesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - ], - ], -]; diff --git a/GeminiDataAnalytics/src/V1beta/resources/context_retrieval_service_rest_client_config.php b/GeminiDataAnalytics/src/V1beta/resources/context_retrieval_service_rest_client_config.php deleted file mode 100644 index a2aca3492c56..000000000000 --- a/GeminiDataAnalytics/src/V1beta/resources/context_retrieval_service_rest_client_config.php +++ /dev/null @@ -1,172 +0,0 @@ - [ - 'google.cloud.geminidataanalytics.v1beta.ContextRetrievalService' => [ - 'RetrieveBigQueryRecentRelevantTables' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryRecentRelevantTables', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableContext' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}:retrieveBigQueryTableContext', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableContexts' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryTableContexts', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableContextsFromRecentTables' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryTableContextsFromRecentTables', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableSuggestedDescriptions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryTableSuggestedDescriptions', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RetrieveBigQueryTableSuggestedExamples' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/retrieval:retrieveBigQueryTableSuggestedExamples', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/GeminiDataAnalytics/tests/Unit/V1beta/Client/ContextRetrievalServiceClientTest.php b/GeminiDataAnalytics/tests/Unit/V1beta/Client/ContextRetrievalServiceClientTest.php deleted file mode 100644 index b7b545fee653..000000000000 --- a/GeminiDataAnalytics/tests/Unit/V1beta/Client/ContextRetrievalServiceClientTest.php +++ /dev/null @@ -1,635 +0,0 @@ -getMockBuilder(CredentialsWrapper::class) - ->disableOriginalConstructor() - ->getMock(); - } - - /** @return ContextRetrievalServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ContextRetrievalServiceClient($options); - } - - /** @test */ - public function retrieveBigQueryRecentRelevantTablesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveBigQueryRecentRelevantTablesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryRecentRelevantTablesRequest())->setParent($parent); - $response = $gapicClient->retrieveBigQueryRecentRelevantTables($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.geminidataanalytics.v1beta.ContextRetrievalService/RetrieveBigQueryRecentRelevantTables', - $actualFuncCall - ); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveBigQueryRecentRelevantTablesExceptionTest() - { - $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); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryRecentRelevantTablesRequest())->setParent($parent); - try { - $gapicClient->retrieveBigQueryRecentRelevantTables($request); - // 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 retrieveBigQueryTableContextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveBigQueryTableContextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $project = 'project-309310695'; - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableContextRequest())->setProject($project)->setParent($parent); - $response = $gapicClient->retrieveBigQueryTableContext($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.geminidataanalytics.v1beta.ContextRetrievalService/RetrieveBigQueryTableContext', - $actualFuncCall - ); - $actualValue = $actualRequestObject->getProject(); - $this->assertProtobufEquals($project, $actualValue); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveBigQueryTableContextExceptionTest() - { - $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); - // Mock request - $project = 'project-309310695'; - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableContextRequest())->setProject($project)->setParent($parent); - try { - $gapicClient->retrieveBigQueryTableContext($request); - // 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 retrieveBigQueryTableContextsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveBigQueryTableContextsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableContextsRequest())->setParent($parent); - $response = $gapicClient->retrieveBigQueryTableContexts($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.geminidataanalytics.v1beta.ContextRetrievalService/RetrieveBigQueryTableContexts', - $actualFuncCall - ); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveBigQueryTableContextsExceptionTest() - { - $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); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableContextsRequest())->setParent($parent); - try { - $gapicClient->retrieveBigQueryTableContexts($request); - // 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 retrieveBigQueryTableContextsFromRecentTablesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveBigQueryTableContextsFromRecentTablesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableContextsFromRecentTablesRequest())->setParent($parent); - $response = $gapicClient->retrieveBigQueryTableContextsFromRecentTables($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.geminidataanalytics.v1beta.ContextRetrievalService/RetrieveBigQueryTableContextsFromRecentTables', - $actualFuncCall - ); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveBigQueryTableContextsFromRecentTablesExceptionTest() - { - $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); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableContextsFromRecentTablesRequest())->setParent($parent); - try { - $gapicClient->retrieveBigQueryTableContextsFromRecentTables($request); - // 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 retrieveBigQueryTableSuggestedDescriptionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveBigQueryTableSuggestedDescriptionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableSuggestedDescriptionsRequest())->setParent($parent); - $response = $gapicClient->retrieveBigQueryTableSuggestedDescriptions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.geminidataanalytics.v1beta.ContextRetrievalService/RetrieveBigQueryTableSuggestedDescriptions', - $actualFuncCall - ); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveBigQueryTableSuggestedDescriptionsExceptionTest() - { - $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); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableSuggestedDescriptionsRequest())->setParent($parent); - try { - $gapicClient->retrieveBigQueryTableSuggestedDescriptions($request); - // 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 retrieveBigQueryTableSuggestedExamplesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveBigQueryTableSuggestedExamplesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableSuggestedExamplesRequest())->setParent($parent); - $response = $gapicClient->retrieveBigQueryTableSuggestedExamples($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.geminidataanalytics.v1beta.ContextRetrievalService/RetrieveBigQueryTableSuggestedExamples', - $actualFuncCall - ); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveBigQueryTableSuggestedExamplesExceptionTest() - { - $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); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryTableSuggestedExamplesRequest())->setParent($parent); - try { - $gapicClient->retrieveBigQueryTableSuggestedExamples($request); - // 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 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); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // 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); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // 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 retrieveBigQueryRecentRelevantTablesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveBigQueryRecentRelevantTablesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new RetrieveBigQueryRecentRelevantTablesRequest())->setParent($parent); - $response = $gapicClient->retrieveBigQueryRecentRelevantTablesAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame( - '/google.cloud.geminidataanalytics.v1beta.ContextRetrievalService/RetrieveBigQueryRecentRelevantTables', - $actualFuncCall - ); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}