From f1deeabbb09f97c56c14a419c24cee371be992ec Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Tue, 2 Jan 2024 01:32:31 +0000 Subject: [PATCH] feat(bigquery): update the API #### bigquery:v2 The following keys were added: - schemas.RemoteModelInfo.properties.speechRecognizer.description - schemas.RemoteModelInfo.properties.speechRecognizer.readOnly - schemas.RemoteModelInfo.properties.speechRecognizer.type - schemas.VectorSearchStatistics.description - schemas.VectorSearchStatistics.id - schemas.VectorSearchStatistics.properties.indexUnusedReasons.description - schemas.VectorSearchStatistics.properties.indexUnusedReasons.items.$ref - schemas.VectorSearchStatistics.properties.indexUnusedReasons.type - schemas.VectorSearchStatistics.properties.indexUsageMode.description - schemas.VectorSearchStatistics.properties.indexUsageMode.enum - schemas.VectorSearchStatistics.properties.indexUsageMode.enumDescriptions - schemas.VectorSearchStatistics.properties.indexUsageMode.type - schemas.VectorSearchStatistics.type The following keys were changed: - schemas.RemoteModelInfo.properties.remoteServiceType.enum - schemas.RemoteModelInfo.properties.remoteServiceType.enumDescriptions --- discovery/bigquery-v2.json | 43 +++++++++++++++++++++++++++++++++++--- src/apis/bigquery/v2.ts | 17 +++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/discovery/bigquery-v2.json b/discovery/bigquery-v2.json index e8efb814e7..eca7474e4c 100644 --- a/discovery/bigquery-v2.json +++ b/discovery/bigquery-v2.json @@ -1686,7 +1686,7 @@ } } }, - "revision": "20231012", + "revision": "20231202", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -5966,16 +5966,23 @@ "REMOTE_SERVICE_TYPE_UNSPECIFIED", "CLOUD_AI_TRANSLATE_V3", "CLOUD_AI_VISION_V1", - "CLOUD_AI_NATURAL_LANGUAGE_V1" + "CLOUD_AI_NATURAL_LANGUAGE_V1", + "CLOUD_AI_SPEECH_TO_TEXT_V2" ], "enumDescriptions": [ "Unspecified remote service type.", "V3 Cloud AI Translation API. See more details at [Cloud Translation API] (https://cloud.google.com/translate/docs/reference/rest).", "V1 Cloud AI Vision API See more details at [Cloud Vision API] (https://cloud.google.com/vision/docs/reference/rest).", - "V1 Cloud AI Natural Language API. See more details at [REST Resource: documents](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents)." + "V1 Cloud AI Natural Language API. See more details at [REST Resource: documents](https://cloud.google.com/natural-language/docs/reference/rest/v1/documents).", + "V2 Speech-to-Text API. See more details at [Google Cloud Speech-to-Text V2 API](https://cloud.google.com/speech-to-text/v2/docs)" ], "readOnly": true, "type": "string" + }, + "speechRecognizer": { + "description": "Output only. The name of the speech recognizer to use for speech recognition. The expected format is `projects/{project}/locations/{location}/recognizers/{recognizer}`. Customers can specify this field at model creation. If not specified, a default recognizer `projects/{model project}/locations/global/recognizers/_` will be used. See more details at [recognizers](https://cloud.google.com/speech-to-text/v2/docs/reference/rest/v2/projects.locations.recognizers)", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -8273,6 +8280,36 @@ }, "type": "object" }, + "VectorSearchStatistics": { + "description": "Statistics for a vector search query. Populated as part of JobStatistics2.", + "id": "VectorSearchStatistics", + "properties": { + "indexUnusedReasons": { + "description": "When `indexUsageMode` is `UNUSED` or `PARTIALLY_USED`, this field explains why indexes were not used in all or part of the vector search query. If `indexUsageMode` is `FULLY_USED`, this field is not populated.", + "items": { + "$ref": "IndexUnusedReason" + }, + "type": "array" + }, + "indexUsageMode": { + "description": "Specifies the index usage mode for the query.", + "enum": [ + "INDEX_USAGE_MODE_UNSPECIFIED", + "UNUSED", + "PARTIALLY_USED", + "FULLY_USED" + ], + "enumDescriptions": [ + "Index usage mode not specified.", + "No vector indexes were used in the vector search query. See [`indexUnusedReasons`] (/bigquery/docs/reference/rest/v2/Job#IndexUnusedReason) for detailed reasons.", + "Part of the vector search query used vector indexes. See [`indexUnusedReasons`] (/bigquery/docs/reference/rest/v2/Job#IndexUnusedReason) for why other parts of the query did not use vector indexes.", + "The entire vector search query used vector indexes." + ], + "type": "string" + } + }, + "type": "object" + }, "ViewDefinition": { "id": "ViewDefinition", "properties": { diff --git a/src/apis/bigquery/v2.ts b/src/apis/bigquery/v2.ts index ddbb084518..552d683450 100644 --- a/src/apis/bigquery/v2.ts +++ b/src/apis/bigquery/v2.ts @@ -3082,6 +3082,10 @@ export namespace bigquery_v2 { * Output only. The remote service type for remote model. */ remoteServiceType?: string | null; + /** + * Output only. The name of the speech recognizer to use for speech recognition. The expected format is `projects/{project\}/locations/{location\}/recognizers/{recognizer\}`. Customers can specify this field at model creation. If not specified, a default recognizer `projects/{model project\}/locations/global/recognizers/_` will be used. See more details at [recognizers](https://cloud.google.com/speech-to-text/v2/docs/reference/rest/v2/projects.locations.recognizers) + */ + speechRecognizer?: string | null; } /** * A user-defined function or a stored procedure. @@ -4294,6 +4298,19 @@ export namespace bigquery_v2 { */ resourceUri?: string | null; } + /** + * Statistics for a vector search query. Populated as part of JobStatistics2. + */ + export interface Schema$VectorSearchStatistics { + /** + * When `indexUsageMode` is `UNUSED` or `PARTIALLY_USED`, this field explains why indexes were not used in all or part of the vector search query. If `indexUsageMode` is `FULLY_USED`, this field is not populated. + */ + indexUnusedReasons?: Schema$IndexUnusedReason[]; + /** + * Specifies the index usage mode for the query. + */ + indexUsageMode?: string | null; + } export interface Schema$ViewDefinition { /** * [Required] A query that BigQuery executes when the view is referenced.