diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 1f014b96e7..d45cc9610f 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -309,6 +309,34 @@ "resources": { "locations": { "methods": { + "evaluateInstances": { + "description": "Evaluates instances based on a given metric.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}:evaluateInstances", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.evaluateInstances", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The resource name of the Location to evaluate the instances. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+location}:evaluateInstances", + "request": { + "$ref": "GoogleCloudAiplatformV1EvaluateInstancesRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1EvaluateInstancesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets information about a location.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", @@ -2794,6 +2822,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Update a DeploymentResourcePool.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deploymentResourcePools/{deploymentResourcePoolsId}", + "httpMethod": "PATCH", + "id": "aiplatform.projects.locations.deploymentResourcePools.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the DeploymentResourcePool. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1DeploymentResourcePool" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "queryDeployedModels": { "description": "List DeployedModels that have been deployed on this DeploymentResourcePool.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/deploymentResourcePools/{deploymentResourcePoolsId}:queryDeployedModels", @@ -16748,7 +16810,7 @@ } } }, - "revision": "20240618", + "revision": "20240628", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -18154,6 +18216,78 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1BleuInput": { + "description": "Input for bleu metric.", + "id": "GoogleCloudAiplatformV1BleuInput", + "properties": { + "instances": { + "description": "Required. Repeated bleu instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1BleuInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1BleuSpec", + "description": "Required. Spec for bleu score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1BleuInstance": { + "description": "Spec for bleu instance.", + "id": "GoogleCloudAiplatformV1BleuInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Required. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1BleuMetricValue": { + "description": "Bleu metric value for an instance.", + "id": "GoogleCloudAiplatformV1BleuMetricValue", + "properties": { + "score": { + "description": "Output only. Bleu score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1BleuResults": { + "description": "Results for bleu metric.", + "id": "GoogleCloudAiplatformV1BleuResults", + "properties": { + "bleuMetricValues": { + "description": "Output only. Bleu metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1BleuMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1BleuSpec": { + "description": "Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1.", + "id": "GoogleCloudAiplatformV1BleuSpec", + "properties": { + "useEffectiveOrder": { + "description": "Optional. Whether to use_effective_order to compute bleu score.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Blob": { "description": "Content blob. It's preferred to send as text directly rather than raw bytes.", "id": "GoogleCloudAiplatformV1Blob", @@ -18404,6 +18538,68 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1CoherenceInput": { + "description": "Input for coherence metric.", + "id": "GoogleCloudAiplatformV1CoherenceInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1CoherenceInstance", + "description": "Required. Coherence instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1CoherenceSpec", + "description": "Required. Spec for coherence score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1CoherenceInstance": { + "description": "Spec for coherence instance.", + "id": "GoogleCloudAiplatformV1CoherenceInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1CoherenceResult": { + "description": "Spec for coherence result.", + "id": "GoogleCloudAiplatformV1CoherenceResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for coherence score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for coherence score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Coherence score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1CoherenceSpec": { + "description": "Spec for coherence score metric.", + "id": "GoogleCloudAiplatformV1CoherenceSpec", + "properties": { + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1CompleteTrialRequest": { "description": "Request message for VizierService.CompleteTrial.", "id": "GoogleCloudAiplatformV1CompleteTrialRequest", @@ -18458,12 +18654,23 @@ "description": "Request message for ComputeTokens RPC call.", "id": "GoogleCloudAiplatformV1ComputeTokensRequest", "properties": { + "contents": { + "description": "Required. Input content.", + "items": { + "$ref": "GoogleCloudAiplatformV1Content" + }, + "type": "array" + }, "instances": { "description": "Required. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.", "items": { "type": "any" }, "type": "array" + }, + "model": { + "description": "Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*", + "type": "string" } }, "type": "object" @@ -20314,6 +20521,188 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1EvaluateInstancesRequest": { + "description": "Request message for EvaluationService.EvaluateInstances.", + "id": "GoogleCloudAiplatformV1EvaluateInstancesRequest", + "properties": { + "bleuInput": { + "$ref": "GoogleCloudAiplatformV1BleuInput", + "description": "Instances and metric spec for bleu metric." + }, + "coherenceInput": { + "$ref": "GoogleCloudAiplatformV1CoherenceInput", + "description": "Input for coherence metric." + }, + "exactMatchInput": { + "$ref": "GoogleCloudAiplatformV1ExactMatchInput", + "description": "Auto metric instances. Instances and metric spec for exact match metric." + }, + "fluencyInput": { + "$ref": "GoogleCloudAiplatformV1FluencyInput", + "description": "LLM-based metric instance. General text generation metrics, applicable to other categories. Input for fluency metric." + }, + "fulfillmentInput": { + "$ref": "GoogleCloudAiplatformV1FulfillmentInput", + "description": "Input for fulfillment metric." + }, + "groundednessInput": { + "$ref": "GoogleCloudAiplatformV1GroundednessInput", + "description": "Input for groundedness metric." + }, + "pairwiseQuestionAnsweringQualityInput": { + "$ref": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput", + "description": "Input for pairwise question answering quality metric." + }, + "pairwiseSummarizationQualityInput": { + "$ref": "GoogleCloudAiplatformV1PairwiseSummarizationQualityInput", + "description": "Input for pairwise summarization quality metric." + }, + "questionAnsweringCorrectnessInput": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput", + "description": "Input for question answering correctness metric." + }, + "questionAnsweringHelpfulnessInput": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput", + "description": "Input for question answering helpfulness metric." + }, + "questionAnsweringQualityInput": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringQualityInput", + "description": "Input for question answering quality metric." + }, + "questionAnsweringRelevanceInput": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput", + "description": "Input for question answering relevance metric." + }, + "rougeInput": { + "$ref": "GoogleCloudAiplatformV1RougeInput", + "description": "Instances and metric spec for rouge metric." + }, + "safetyInput": { + "$ref": "GoogleCloudAiplatformV1SafetyInput", + "description": "Input for safety metric." + }, + "summarizationHelpfulnessInput": { + "$ref": "GoogleCloudAiplatformV1SummarizationHelpfulnessInput", + "description": "Input for summarization helpfulness metric." + }, + "summarizationQualityInput": { + "$ref": "GoogleCloudAiplatformV1SummarizationQualityInput", + "description": "Input for summarization quality metric." + }, + "summarizationVerbosityInput": { + "$ref": "GoogleCloudAiplatformV1SummarizationVerbosityInput", + "description": "Input for summarization verbosity metric." + }, + "toolCallValidInput": { + "$ref": "GoogleCloudAiplatformV1ToolCallValidInput", + "description": "Tool call metric instances. Input for tool call valid metric." + }, + "toolNameMatchInput": { + "$ref": "GoogleCloudAiplatformV1ToolNameMatchInput", + "description": "Input for tool name match metric." + }, + "toolParameterKeyMatchInput": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKeyMatchInput", + "description": "Input for tool parameter key match metric." + }, + "toolParameterKvMatchInput": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchInput", + "description": "Input for tool parameter key value match metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1EvaluateInstancesResponse": { + "description": "Response message for EvaluationService.EvaluateInstances.", + "id": "GoogleCloudAiplatformV1EvaluateInstancesResponse", + "properties": { + "bleuResults": { + "$ref": "GoogleCloudAiplatformV1BleuResults", + "description": "Results for bleu metric." + }, + "coherenceResult": { + "$ref": "GoogleCloudAiplatformV1CoherenceResult", + "description": "Result for coherence metric." + }, + "exactMatchResults": { + "$ref": "GoogleCloudAiplatformV1ExactMatchResults", + "description": "Auto metric evaluation results. Results for exact match metric." + }, + "fluencyResult": { + "$ref": "GoogleCloudAiplatformV1FluencyResult", + "description": "LLM-based metric evaluation result. General text generation metrics, applicable to other categories. Result for fluency metric." + }, + "fulfillmentResult": { + "$ref": "GoogleCloudAiplatformV1FulfillmentResult", + "description": "Result for fulfillment metric." + }, + "groundednessResult": { + "$ref": "GoogleCloudAiplatformV1GroundednessResult", + "description": "Result for groundedness metric." + }, + "pairwiseQuestionAnsweringQualityResult": { + "$ref": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult", + "description": "Result for pairwise question answering quality metric." + }, + "pairwiseSummarizationQualityResult": { + "$ref": "GoogleCloudAiplatformV1PairwiseSummarizationQualityResult", + "description": "Result for pairwise summarization quality metric." + }, + "questionAnsweringCorrectnessResult": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult", + "description": "Result for question answering correctness metric." + }, + "questionAnsweringHelpfulnessResult": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult", + "description": "Result for question answering helpfulness metric." + }, + "questionAnsweringQualityResult": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringQualityResult", + "description": "Question answering only metrics. Result for question answering quality metric." + }, + "questionAnsweringRelevanceResult": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult", + "description": "Result for question answering relevance metric." + }, + "rougeResults": { + "$ref": "GoogleCloudAiplatformV1RougeResults", + "description": "Results for rouge metric." + }, + "safetyResult": { + "$ref": "GoogleCloudAiplatformV1SafetyResult", + "description": "Result for safety metric." + }, + "summarizationHelpfulnessResult": { + "$ref": "GoogleCloudAiplatformV1SummarizationHelpfulnessResult", + "description": "Result for summarization helpfulness metric." + }, + "summarizationQualityResult": { + "$ref": "GoogleCloudAiplatformV1SummarizationQualityResult", + "description": "Summarization only metrics. Result for summarization quality metric." + }, + "summarizationVerbosityResult": { + "$ref": "GoogleCloudAiplatformV1SummarizationVerbosityResult", + "description": "Result for summarization verbosity metric." + }, + "toolCallValidResults": { + "$ref": "GoogleCloudAiplatformV1ToolCallValidResults", + "description": "Tool call metrics. Results for tool call valid metric." + }, + "toolNameMatchResults": { + "$ref": "GoogleCloudAiplatformV1ToolNameMatchResults", + "description": "Results for tool name match metric." + }, + "toolParameterKeyMatchResults": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKeyMatchResults", + "description": "Results for tool parameter key match metric." + }, + "toolParameterKvMatchResults": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchResults", + "description": "Results for tool parameter key value match metric." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1EvaluatedAnnotation": { "description": "True positive, false positive, or false negative. EvaluatedAnnotation is only available under ModelEvaluationSlice with slice of `annotationSpec` dimension.", "id": "GoogleCloudAiplatformV1EvaluatedAnnotation", @@ -20436,6 +20825,73 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ExactMatchInput": { + "description": "Input for exact match metric.", + "id": "GoogleCloudAiplatformV1ExactMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated exact match instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1ExactMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1ExactMatchSpec", + "description": "Required. Spec for exact match metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ExactMatchInstance": { + "description": "Spec for exact match instance.", + "id": "GoogleCloudAiplatformV1ExactMatchInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Required. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ExactMatchMetricValue": { + "description": "Exact match metric value for an instance.", + "id": "GoogleCloudAiplatformV1ExactMatchMetricValue", + "properties": { + "score": { + "description": "Output only. Exact match score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ExactMatchResults": { + "description": "Results for exact match metric.", + "id": "GoogleCloudAiplatformV1ExactMatchResults", + "properties": { + "exactMatchMetricValues": { + "description": "Output only. Exact match metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1ExactMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ExactMatchSpec": { + "description": "Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0.", + "id": "GoogleCloudAiplatformV1ExactMatchSpec", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1Examples": { "description": "Example-based explainability that returns the nearest neighbors from the provided dataset.", "id": "GoogleCloudAiplatformV1Examples", @@ -21671,10 +22127,19 @@ "description": "The dedicated serving endpoint for this FeatureOnlineStore. Only need to set when you choose Optimized storage type. Public endpoint is provisioned by default.", "id": "GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint", "properties": { + "privateServiceConnectConfig": { + "$ref": "GoogleCloudAiplatformV1PrivateServiceConnectConfig", + "description": "Optional. Private service connect config. The private service connection is available only for Optimized storage type, not for embedding management now. If PrivateServiceConnectConfig.enable_private_service_connect set to true, customers will use private service connection to send request. Otherwise, the connection will set to public endpoint." + }, "publicEndpointDomainName": { "description": "Output only. This field will be populated with the domain name to use for this FeatureOnlineStore", "readOnly": true, "type": "string" + }, + "serviceAttachment": { + "description": "Output only. The name of the service attachment resource. Populated if private service connect is enabled and after FeatureViewSync is created.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -22528,6 +22993,68 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1FluencyInput": { + "description": "Input for fluency metric.", + "id": "GoogleCloudAiplatformV1FluencyInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1FluencyInstance", + "description": "Required. Fluency instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1FluencySpec", + "description": "Required. Spec for fluency score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FluencyInstance": { + "description": "Spec for fluency instance.", + "id": "GoogleCloudAiplatformV1FluencyInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FluencyResult": { + "description": "Spec for fluency result.", + "id": "GoogleCloudAiplatformV1FluencyResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for fluency score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for fluency score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Fluency score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FluencySpec": { + "description": "Spec for fluency score metric.", + "id": "GoogleCloudAiplatformV1FluencySpec", + "properties": { + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1FractionSplit": { "description": "Assigns the input data to training, validation, and test sets as per the given fractions. Any of `training_fraction`, `validation_fraction` and `test_fraction` may optionally be provided, they must sum to up to 1. If the provided ones sum to less than 1, the remainder is assigned to sets as decided by Vertex AI. If none of the fractions are set, by default roughly 80% of data is used for training, 10% for validation, and 10% for test.", "id": "GoogleCloudAiplatformV1FractionSplit", @@ -22550,6 +23077,72 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1FulfillmentInput": { + "description": "Input for fulfillment metric.", + "id": "GoogleCloudAiplatformV1FulfillmentInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1FulfillmentInstance", + "description": "Required. Fulfillment instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1FulfillmentSpec", + "description": "Required. Spec for fulfillment score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FulfillmentInstance": { + "description": "Spec for fulfillment instance.", + "id": "GoogleCloudAiplatformV1FulfillmentInstance", + "properties": { + "instruction": { + "description": "Required. Inference instruction prompt to compare prediction with.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FulfillmentResult": { + "description": "Spec for fulfillment result.", + "id": "GoogleCloudAiplatformV1FulfillmentResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for fulfillment score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for fulfillment score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Fulfillment score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FulfillmentSpec": { + "description": "Spec for fulfillment metric.", + "id": "GoogleCloudAiplatformV1FulfillmentSpec", + "properties": { + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1FunctionCall": { "description": "A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.", "id": "GoogleCloudAiplatformV1FunctionCall", @@ -22887,10 +23480,181 @@ "properties": {}, "type": "object" }, + "GoogleCloudAiplatformV1GroundednessInput": { + "description": "Input for groundedness metric.", + "id": "GoogleCloudAiplatformV1GroundednessInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1GroundednessInstance", + "description": "Required. Groundedness instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1GroundednessSpec", + "description": "Required. Spec for groundedness metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundednessInstance": { + "description": "Spec for groundedness instance.", + "id": "GoogleCloudAiplatformV1GroundednessInstance", + "properties": { + "context": { + "description": "Required. Background information provided in context used to compare against the prediction.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundednessResult": { + "description": "Spec for groundedness result.", + "id": "GoogleCloudAiplatformV1GroundednessResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for groundedness score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for groundedness score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Groundedness score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundednessSpec": { + "description": "Spec for groundedness metric.", + "id": "GoogleCloudAiplatformV1GroundednessSpec", + "properties": { + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingAttribution": { + "description": "Grounding attribution.", + "id": "GoogleCloudAiplatformV1GroundingAttribution", + "properties": { + "confidenceScore": { + "description": "Optional. Output only. Confidence score of the attribution. Ranges from 0 to 1. 1 is the most confident.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "segment": { + "$ref": "GoogleCloudAiplatformV1Segment", + "description": "Output only. Segment of the content this attribution belongs to.", + "readOnly": true + }, + "web": { + "$ref": "GoogleCloudAiplatformV1GroundingAttributionWeb", + "description": "Optional. Attribution from the web." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingAttributionWeb": { + "description": "Attribution from the web.", + "id": "GoogleCloudAiplatformV1GroundingAttributionWeb", + "properties": { + "title": { + "description": "Output only. Title of the attribution.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. URI reference of the attribution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingChunk": { + "description": "Grounding chunk.", + "id": "GoogleCloudAiplatformV1GroundingChunk", + "properties": { + "retrievedContext": { + "$ref": "GoogleCloudAiplatformV1GroundingChunkRetrievedContext", + "description": "Grounding chunk from context retrieved by the retrieval tools." + }, + "web": { + "$ref": "GoogleCloudAiplatformV1GroundingChunkWeb", + "description": "Grounding chunk from the web." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingChunkRetrievedContext": { + "description": "Chunk from context retrieved by the retrieval tools.", + "id": "GoogleCloudAiplatformV1GroundingChunkRetrievedContext", + "properties": { + "title": { + "description": "Title of the attribution.", + "type": "string" + }, + "uri": { + "description": "URI reference of the attribution.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1GroundingChunkWeb": { + "description": "Chunk from the web.", + "id": "GoogleCloudAiplatformV1GroundingChunkWeb", + "properties": { + "title": { + "description": "Title of the chunk.", + "type": "string" + }, + "uri": { + "description": "URI reference of the chunk.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1GroundingMetadata": { "description": "Metadata returned to client when grounding is enabled.", "id": "GoogleCloudAiplatformV1GroundingMetadata", "properties": { + "groundingAttributions": { + "description": "Optional. List of grounding attributions.", + "items": { + "$ref": "GoogleCloudAiplatformV1GroundingAttribution" + }, + "type": "array" + }, + "groundingChunks": { + "description": "List of supporting references retrieved from specified grounding source.", + "items": { + "$ref": "GoogleCloudAiplatformV1GroundingChunk" + }, + "type": "array" + }, + "groundingSupports": { + "description": "Optional. List of grounding support.", + "items": { + "$ref": "GoogleCloudAiplatformV1GroundingSupport" + }, + "type": "array" + }, "searchEntryPoint": { "$ref": "GoogleCloudAiplatformV1SearchEntryPoint", "description": "Optional. Google search entry for the following-up web searches." @@ -22905,6 +23669,33 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1GroundingSupport": { + "description": "Grounding support.", + "id": "GoogleCloudAiplatformV1GroundingSupport", + "properties": { + "confidenceScores": { + "description": "Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "groundingChunkIndices": { + "description": "A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "segment": { + "$ref": "GoogleCloudAiplatformV1Segment", + "description": "Segment of the content this support belongs to." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1HyperparameterTuningJob": { "description": "Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.", "id": "GoogleCloudAiplatformV1HyperparameterTuningJob", @@ -25169,6 +25960,16 @@ "$ref": "GoogleCloudAiplatformV1PredictSchemata", "description": "The schemata that describe formats of the Model's predictions and explanations as given and returned via PredictionService.Predict and PredictionService.Explain." }, + "satisfiesPzi": { + "description": "Output only. A read only boolean field reflecting Zone Isolation status of the model. It's false by default. Since Model is a type ZICY 4.2 resource, the field is an aggregated value of ZI status of its underlying dependencies.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. A read only boolean field reflecting ZS status of the model. It's false by default. Since Model is a type ZICY 4.2 resource, the field is an aggregated value of ZS status of its underlying dependencies.", + "readOnly": true, + "type": "boolean" + }, "supportedDeploymentResourcesTypes": { "description": "Output only. When this Model is deployed, its prediction resources are described by the `prediction_resources` field of the Endpoint.deployed_models object. Because not all Models support all resource configuration types, the configuration types this Model supports are listed here. If no configuration types are listed, the Model cannot be deployed to an Endpoint and does not support online predictions (PredictionService.Predict or PredictionService.Explain). Such a Model can serve predictions by using a BatchPredictionJob, if it has at least one entry each in supported_input_storage_formats and supported_output_storage_formats.", "items": { @@ -27190,6 +27991,192 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput": { + "description": "Input for pairwise question answering quality metric.", + "id": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance", + "description": "Required. Pairwise question answering quality instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec", + "description": "Required. Spec for pairwise question answering quality score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance": { + "description": "Spec for pairwise question answering quality instance.", + "id": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance", + "properties": { + "baselinePrediction": { + "description": "Required. Output of the baseline model.", + "type": "string" + }, + "context": { + "description": "Required. Text to answer the question.", + "type": "string" + }, + "instruction": { + "description": "Required. Question Answering prompt for LLM.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the candidate model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult": { + "description": "Spec for pairwise question answering quality result.", + "id": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for question answering quality score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for question answering quality score.", + "readOnly": true, + "type": "string" + }, + "pairwiseChoice": { + "description": "Output only. Pairwise question answering prediction choice.", + "enum": [ + "PAIRWISE_CHOICE_UNSPECIFIED", + "BASELINE", + "CANDIDATE", + "TIE" + ], + "enumDescriptions": [ + "Unspecified prediction choice.", + "Baseline prediction wins", + "Candidate prediction wins", + "Winner cannot be determined" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec": { + "description": "Spec for pairwise question answering quality score metric.", + "id": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute question answering quality.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseSummarizationQualityInput": { + "description": "Input for pairwise summarization quality metric.", + "id": "GoogleCloudAiplatformV1PairwiseSummarizationQualityInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance", + "description": "Required. Pairwise summarization quality instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec", + "description": "Required. Spec for pairwise summarization quality score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance": { + "description": "Spec for pairwise summarization quality instance.", + "id": "GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance", + "properties": { + "baselinePrediction": { + "description": "Required. Output of the baseline model.", + "type": "string" + }, + "context": { + "description": "Required. Text to be summarized.", + "type": "string" + }, + "instruction": { + "description": "Required. Summarization prompt for LLM.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the candidate model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseSummarizationQualityResult": { + "description": "Spec for pairwise summarization quality result.", + "id": "GoogleCloudAiplatformV1PairwiseSummarizationQualityResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for summarization quality score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for summarization quality score.", + "readOnly": true, + "type": "string" + }, + "pairwiseChoice": { + "description": "Output only. Pairwise summarization prediction choice.", + "enum": [ + "PAIRWISE_CHOICE_UNSPECIFIED", + "BASELINE", + "CANDIDATE", + "TIE" + ], + "enumDescriptions": [ + "Unspecified prediction choice.", + "Baseline prediction wins", + "Candidate prediction wins", + "Winner cannot be determined" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec": { + "description": "Spec for pairwise summarization quality score metric.", + "id": "GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute pairwise summarization quality.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Part": { "description": "A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.", "id": "GoogleCloudAiplatformV1Part", @@ -28237,6 +29224,10 @@ "$ref": "GoogleCloudAiplatformV1DedicatedResources", "description": "A description of resources that are dedicated to the DeployedModel, and that need a higher degree of manual configuration." }, + "deployMetadata": { + "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata", + "description": "Optional. Metadata information about this deployment config." + }, "deployTaskName": { "description": "Optional. The name of the deploy task (e.g., \"text to image generation\").", "type": "string" @@ -28264,6 +29255,20 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata": { + "description": "Metadata information about the deployment for managing deployment config.", + "id": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels for the deployment. For managing deployment config like verifying, source of deployment config, etc.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke": { "description": "Configurations for PublisherModel GKE deployment", "id": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke", @@ -28601,6 +29606,318 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput": { + "description": "Input for question answering correctness metric.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance", + "description": "Required. Question answering correctness instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec", + "description": "Required. Spec for question answering correctness score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance": { + "description": "Spec for question answering correctness instance.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance", + "properties": { + "context": { + "description": "Optional. Text provided as context to answer the question.", + "type": "string" + }, + "instruction": { + "description": "Required. The question asked and other instruction in the inference prompt.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult": { + "description": "Spec for question answering correctness result.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for question answering correctness score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for question answering correctness score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Question Answering Correctness score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec": { + "description": "Spec for question answering correctness metric.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute question answering correctness.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput": { + "description": "Input for question answering helpfulness metric.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance", + "description": "Required. Question answering helpfulness instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec", + "description": "Required. Spec for question answering helpfulness score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance": { + "description": "Spec for question answering helpfulness instance.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance", + "properties": { + "context": { + "description": "Optional. Text provided as context to answer the question.", + "type": "string" + }, + "instruction": { + "description": "Required. The question asked and other instruction in the inference prompt.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult": { + "description": "Spec for question answering helpfulness result.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for question answering helpfulness score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for question answering helpfulness score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Question Answering Helpfulness score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec": { + "description": "Spec for question answering helpfulness metric.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute question answering helpfulness.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringQualityInput": { + "description": "Input for question answering quality metric.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringQualityInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringQualityInstance", + "description": "Required. Question answering quality instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringQualitySpec", + "description": "Required. Spec for question answering quality score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringQualityInstance": { + "description": "Spec for question answering quality instance.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringQualityInstance", + "properties": { + "context": { + "description": "Required. Text to answer the question.", + "type": "string" + }, + "instruction": { + "description": "Required. Question Answering prompt for LLM.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringQualityResult": { + "description": "Spec for question answering quality result.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringQualityResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for question answering quality score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for question answering quality score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Question Answering Quality score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringQualitySpec": { + "description": "Spec for question answering quality score metric.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringQualitySpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute question answering quality.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput": { + "description": "Input for question answering relevance metric.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance", + "description": "Required. Question answering relevance instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec", + "description": "Required. Spec for question answering relevance score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance": { + "description": "Spec for question answering relevance instance.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance", + "properties": { + "context": { + "description": "Optional. Text provided as context to answer the question.", + "type": "string" + }, + "instruction": { + "description": "Required. The question asked and other instruction in the inference prompt.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult": { + "description": "Spec for question answering relevance result.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for question answering relevance score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for question answering relevance score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Question Answering Relevance score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec": { + "description": "Spec for question answering relevance metric.", + "id": "GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute question answering relevance.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1RawPredictRequest": { "description": "Request message for PredictionService.RawPredict.", "id": "GoogleCloudAiplatformV1RawPredictRequest", @@ -29052,6 +30369,112 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1RougeInput": { + "description": "Input for rouge metric.", + "id": "GoogleCloudAiplatformV1RougeInput", + "properties": { + "instances": { + "description": "Required. Repeated rouge instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1RougeInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1RougeSpec", + "description": "Required. Spec for rouge score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1RougeInstance": { + "description": "Spec for rouge instance.", + "id": "GoogleCloudAiplatformV1RougeInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Required. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1RougeMetricValue": { + "description": "Rouge metric value for an instance.", + "id": "GoogleCloudAiplatformV1RougeMetricValue", + "properties": { + "score": { + "description": "Output only. Rouge score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1RougeResults": { + "description": "Results for rouge metric.", + "id": "GoogleCloudAiplatformV1RougeResults", + "properties": { + "rougeMetricValues": { + "description": "Output only. Rouge metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1RougeMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1RougeSpec": { + "description": "Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1.", + "id": "GoogleCloudAiplatformV1RougeSpec", + "properties": { + "rougeType": { + "description": "Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.", + "type": "string" + }, + "splitSummaries": { + "description": "Optional. Whether to split summaries while using rougeLsum.", + "type": "boolean" + }, + "useStemmer": { + "description": "Optional. Whether to use stemmer to compute rouge score.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SafetyInput": { + "description": "Input for safety metric.", + "id": "GoogleCloudAiplatformV1SafetyInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1SafetyInstance", + "description": "Required. Safety instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1SafetySpec", + "description": "Required. Spec for safety metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SafetyInstance": { + "description": "Spec for safety instance.", + "id": "GoogleCloudAiplatformV1SafetyInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SafetyRating": { "description": "Safety rating corresponding to the generated content.", "id": "GoogleCloudAiplatformV1SafetyRating", @@ -29133,6 +30556,30 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SafetyResult": { + "description": "Spec for safety result.", + "id": "GoogleCloudAiplatformV1SafetyResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for safety score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for safety score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Safety score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SafetySetting": { "description": "Safety settings.", "id": "GoogleCloudAiplatformV1SafetySetting", @@ -29190,6 +30637,18 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SafetySpec": { + "description": "Spec for safety metric.", + "id": "GoogleCloudAiplatformV1SafetySpec", + "properties": { + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SampleConfig": { "description": "Active learning data sampling config. For every active learning labeling iteration, it will select a batch of data based on the sampling strategy.", "id": "GoogleCloudAiplatformV1SampleConfig", @@ -33569,6 +35028,36 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1Segment": { + "description": "Segment of the content.", + "id": "GoogleCloudAiplatformV1Segment", + "properties": { + "endIndex": { + "description": "Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "partIndex": { + "description": "Output only. The index of a Part object within its parent Content object.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "startIndex": { + "description": "Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "text": { + "description": "Output only. The text corresponding to the segment from the response.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ServiceAccountSpec": { "description": "Configuration for the use of custom service account to run the workloads.", "id": "GoogleCloudAiplatformV1ServiceAccountSpec", @@ -34382,6 +35871,240 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SummarizationHelpfulnessInput": { + "description": "Input for summarization helpfulness metric.", + "id": "GoogleCloudAiplatformV1SummarizationHelpfulnessInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1SummarizationHelpfulnessInstance", + "description": "Required. Summarization helpfulness instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1SummarizationHelpfulnessSpec", + "description": "Required. Spec for summarization helpfulness score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationHelpfulnessInstance": { + "description": "Spec for summarization helpfulness instance.", + "id": "GoogleCloudAiplatformV1SummarizationHelpfulnessInstance", + "properties": { + "context": { + "description": "Required. Text to be summarized.", + "type": "string" + }, + "instruction": { + "description": "Optional. Summarization prompt for LLM.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationHelpfulnessResult": { + "description": "Spec for summarization helpfulness result.", + "id": "GoogleCloudAiplatformV1SummarizationHelpfulnessResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for summarization helpfulness score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for summarization helpfulness score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Summarization Helpfulness score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationHelpfulnessSpec": { + "description": "Spec for summarization helpfulness score metric.", + "id": "GoogleCloudAiplatformV1SummarizationHelpfulnessSpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute summarization helpfulness.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationQualityInput": { + "description": "Input for summarization quality metric.", + "id": "GoogleCloudAiplatformV1SummarizationQualityInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1SummarizationQualityInstance", + "description": "Required. Summarization quality instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1SummarizationQualitySpec", + "description": "Required. Spec for summarization quality score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationQualityInstance": { + "description": "Spec for summarization quality instance.", + "id": "GoogleCloudAiplatformV1SummarizationQualityInstance", + "properties": { + "context": { + "description": "Required. Text to be summarized.", + "type": "string" + }, + "instruction": { + "description": "Required. Summarization prompt for LLM.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationQualityResult": { + "description": "Spec for summarization quality result.", + "id": "GoogleCloudAiplatformV1SummarizationQualityResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for summarization quality score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for summarization quality score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Summarization Quality score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationQualitySpec": { + "description": "Spec for summarization quality score metric.", + "id": "GoogleCloudAiplatformV1SummarizationQualitySpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute summarization quality.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationVerbosityInput": { + "description": "Input for summarization verbosity metric.", + "id": "GoogleCloudAiplatformV1SummarizationVerbosityInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1SummarizationVerbosityInstance", + "description": "Required. Summarization verbosity instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1SummarizationVerbositySpec", + "description": "Required. Spec for summarization verbosity score metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationVerbosityInstance": { + "description": "Spec for summarization verbosity instance.", + "id": "GoogleCloudAiplatformV1SummarizationVerbosityInstance", + "properties": { + "context": { + "description": "Required. Text to be summarized.", + "type": "string" + }, + "instruction": { + "description": "Optional. Summarization prompt for LLM.", + "type": "string" + }, + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Optional. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationVerbosityResult": { + "description": "Spec for summarization verbosity result.", + "id": "GoogleCloudAiplatformV1SummarizationVerbosityResult", + "properties": { + "confidence": { + "description": "Output only. Confidence for summarization verbosity score.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "explanation": { + "description": "Output only. Explanation for summarization verbosity score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Summarization Verbosity score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SummarizationVerbositySpec": { + "description": "Spec for summarization verbosity score metric.", + "id": "GoogleCloudAiplatformV1SummarizationVerbositySpec", + "properties": { + "useReference": { + "description": "Optional. Whether to use instance.reference to compute summarization verbosity.", + "type": "boolean" + }, + "version": { + "description": "Optional. Which version to use for evaluation.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1SupervisedHyperParameters": { "description": "Hyperparameters for SFT.", "id": "GoogleCloudAiplatformV1SupervisedHyperParameters", @@ -34475,6 +36198,12 @@ "description": "Dataset distribution for Supervised Tuning.", "id": "GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution", "properties": { + "billableSum": { + "description": "Output only. Sum of a given population of values that are billable.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "buckets": { "description": "Output only. Defines the histogram bucket.", "items": { @@ -35134,6 +36863,10 @@ "description": "Tokens info with a list of tokens and the corresponding list of token ids.", "id": "GoogleCloudAiplatformV1TokensInfo", "properties": { + "role": { + "description": "Optional. Optional fields for the role from the corresponding Content.", + "type": "string" + }, "tokenIds": { "description": "A list of token ids from the input.", "items": { @@ -35175,6 +36908,73 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ToolCallValidInput": { + "description": "Input for tool call valid metric.", + "id": "GoogleCloudAiplatformV1ToolCallValidInput", + "properties": { + "instances": { + "description": "Required. Repeated tool call valid instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolCallValidInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1ToolCallValidSpec", + "description": "Required. Spec for tool call valid metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolCallValidInstance": { + "description": "Spec for tool call valid instance.", + "id": "GoogleCloudAiplatformV1ToolCallValidInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Required. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolCallValidMetricValue": { + "description": "Tool call valid metric value for an instance.", + "id": "GoogleCloudAiplatformV1ToolCallValidMetricValue", + "properties": { + "score": { + "description": "Output only. Tool call valid score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolCallValidResults": { + "description": "Results for tool call valid metric.", + "id": "GoogleCloudAiplatformV1ToolCallValidResults", + "properties": { + "toolCallValidMetricValues": { + "description": "Output only. Tool call valid metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolCallValidMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolCallValidSpec": { + "description": "Spec for tool call valid metric.", + "id": "GoogleCloudAiplatformV1ToolCallValidSpec", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1ToolConfig": { "description": "Tool config. This config is shared for all tools provided in the request.", "id": "GoogleCloudAiplatformV1ToolConfig", @@ -35186,6 +36986,212 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ToolNameMatchInput": { + "description": "Input for tool name match metric.", + "id": "GoogleCloudAiplatformV1ToolNameMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated tool name match instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolNameMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1ToolNameMatchSpec", + "description": "Required. Spec for tool name match metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolNameMatchInstance": { + "description": "Spec for tool name match instance.", + "id": "GoogleCloudAiplatformV1ToolNameMatchInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Required. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolNameMatchMetricValue": { + "description": "Tool name match metric value for an instance.", + "id": "GoogleCloudAiplatformV1ToolNameMatchMetricValue", + "properties": { + "score": { + "description": "Output only. Tool name match score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolNameMatchResults": { + "description": "Results for tool name match metric.", + "id": "GoogleCloudAiplatformV1ToolNameMatchResults", + "properties": { + "toolNameMatchMetricValues": { + "description": "Output only. Tool name match metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolNameMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolNameMatchSpec": { + "description": "Spec for tool name match metric.", + "id": "GoogleCloudAiplatformV1ToolNameMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKVMatchInput": { + "description": "Input for tool parameter key value match metric.", + "id": "GoogleCloudAiplatformV1ToolParameterKVMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated tool parameter key value match instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchSpec", + "description": "Required. Spec for tool parameter key value match metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKVMatchInstance": { + "description": "Spec for tool parameter key value match instance.", + "id": "GoogleCloudAiplatformV1ToolParameterKVMatchInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Required. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue": { + "description": "Tool parameter key value match metric value for an instance.", + "id": "GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue", + "properties": { + "score": { + "description": "Output only. Tool parameter key value match score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKVMatchResults": { + "description": "Results for tool parameter key value match metric.", + "id": "GoogleCloudAiplatformV1ToolParameterKVMatchResults", + "properties": { + "toolParameterKvMatchMetricValues": { + "description": "Output only. Tool parameter key value match metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKVMatchSpec": { + "description": "Spec for tool parameter key value match metric.", + "id": "GoogleCloudAiplatformV1ToolParameterKVMatchSpec", + "properties": { + "useStrictStringMatch": { + "description": "Optional. Whether to use STRCIT string match on parameter values.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKeyMatchInput": { + "description": "Input for tool parameter key match metric.", + "id": "GoogleCloudAiplatformV1ToolParameterKeyMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated tool parameter key match instances.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKeyMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKeyMatchSpec", + "description": "Required. Spec for tool parameter key match metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKeyMatchInstance": { + "description": "Spec for tool parameter key match instance.", + "id": "GoogleCloudAiplatformV1ToolParameterKeyMatchInstance", + "properties": { + "prediction": { + "description": "Required. Output of the evaluated model.", + "type": "string" + }, + "reference": { + "description": "Required. Ground truth used to compare against the prediction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue": { + "description": "Tool parameter key match metric value for an instance.", + "id": "GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue", + "properties": { + "score": { + "description": "Output only. Tool parameter key match score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKeyMatchResults": { + "description": "Results for tool parameter key match metric.", + "id": "GoogleCloudAiplatformV1ToolParameterKeyMatchResults", + "properties": { + "toolParameterKeyMatchMetricValues": { + "description": "Output only. Tool parameter key match metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1ToolParameterKeyMatchSpec": { + "description": "Spec for tool parameter key match metric.", + "id": "GoogleCloudAiplatformV1ToolParameterKeyMatchSpec", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1TrainingConfig": { "description": "CMLE training config. For every active learning labeling iteration, system will train a machine learning model on CMLE. The trained model will be used by data sampling algorithm to select DataItems.", "id": "GoogleCloudAiplatformV1TrainingConfig", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index 2cd4e67c83..ccdab0ea13 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -3412,6 +3412,137 @@ func (s *GoogleCloudAiplatformV1BigQuerySource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1BleuInput: Input for bleu metric. +type GoogleCloudAiplatformV1BleuInput struct { + // Instances: Required. Repeated bleu instances. + Instances []*GoogleCloudAiplatformV1BleuInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for bleu score metric. + MetricSpec *GoogleCloudAiplatformV1BleuSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1BleuInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1BleuInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1BleuInstance: Spec for bleu instance. +type GoogleCloudAiplatformV1BleuInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Required. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1BleuInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1BleuInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1BleuMetricValue: Bleu metric value for an instance. +type GoogleCloudAiplatformV1BleuMetricValue struct { + // Score: Output only. Bleu score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1BleuMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1BleuMetricValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1BleuMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1BleuMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1BleuResults: Results for bleu metric. +type GoogleCloudAiplatformV1BleuResults struct { + // BleuMetricValues: Output only. Bleu metric values. + BleuMetricValues []*GoogleCloudAiplatformV1BleuMetricValue `json:"bleuMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "BleuMetricValues") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BleuMetricValues") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1BleuResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1BleuResults + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1BleuSpec: Spec for bleu score metric - calculates the +// precision of n-grams in the prediction as compared to reference - returns a +// score ranging between 0 to 1. +type GoogleCloudAiplatformV1BleuSpec struct { + // UseEffectiveOrder: Optional. Whether to use_effective_order to compute bleu + // score. + UseEffectiveOrder bool `json:"useEffectiveOrder,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseEffectiveOrder") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseEffectiveOrder") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1BleuSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1BleuSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1Blob: Content blob. It's preferred to send as text // directly rather than raw bytes. type GoogleCloudAiplatformV1Blob struct { @@ -3712,6 +3843,116 @@ func (s *GoogleCloudAiplatformV1CitationMetadata) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1CoherenceInput: Input for coherence metric. +type GoogleCloudAiplatformV1CoherenceInput struct { + // Instance: Required. Coherence instance. + Instance *GoogleCloudAiplatformV1CoherenceInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for coherence score metric. + MetricSpec *GoogleCloudAiplatformV1CoherenceSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1CoherenceInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1CoherenceInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1CoherenceInstance: Spec for coherence instance. +type GoogleCloudAiplatformV1CoherenceInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1CoherenceInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1CoherenceInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1CoherenceResult: Spec for coherence result. +type GoogleCloudAiplatformV1CoherenceResult struct { + // Confidence: Output only. Confidence for coherence score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for coherence score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Coherence score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1CoherenceResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1CoherenceResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1CoherenceResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1CoherenceResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1CoherenceSpec: Spec for coherence score metric. +type GoogleCloudAiplatformV1CoherenceSpec struct { + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Version") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1CoherenceSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1CoherenceSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1CompleteTrialRequest: Request message for // VizierService.CompleteTrial. type GoogleCloudAiplatformV1CompleteTrialRequest struct { @@ -3785,17 +4026,23 @@ func (s *GoogleCloudAiplatformV1CompletionStats) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1ComputeTokensRequest: Request message for // ComputeTokens RPC call. type GoogleCloudAiplatformV1ComputeTokensRequest struct { + // Contents: Required. Input content. + Contents []*GoogleCloudAiplatformV1Content `json:"contents,omitempty"` // Instances: Required. The instances that are the input to token computing API // call. Schema is identical to the prediction schema of the text model, even // for the non-text models, like chat models, or Codey models. Instances []interface{} `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to + // Model: Required. The name of the publisher model requested to serve the + // prediction. Format: + // projects/{project}/locations/{location}/publishers/*/models/* + Model string `json:"model,omitempty"` + // ForceSendFields is a list of field names (e.g. "Contents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API + // NullFields is a list of field names (e.g. "Contents") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -6602,6 +6849,153 @@ func (s *GoogleCloudAiplatformV1ErrorAnalysisAnnotationAttributedItem) Unmarshal return nil } +// GoogleCloudAiplatformV1EvaluateInstancesRequest: Request message for +// EvaluationService.EvaluateInstances. +type GoogleCloudAiplatformV1EvaluateInstancesRequest struct { + // BleuInput: Instances and metric spec for bleu metric. + BleuInput *GoogleCloudAiplatformV1BleuInput `json:"bleuInput,omitempty"` + // CoherenceInput: Input for coherence metric. + CoherenceInput *GoogleCloudAiplatformV1CoherenceInput `json:"coherenceInput,omitempty"` + // ExactMatchInput: Auto metric instances. Instances and metric spec for exact + // match metric. + ExactMatchInput *GoogleCloudAiplatformV1ExactMatchInput `json:"exactMatchInput,omitempty"` + // FluencyInput: LLM-based metric instance. General text generation metrics, + // applicable to other categories. Input for fluency metric. + FluencyInput *GoogleCloudAiplatformV1FluencyInput `json:"fluencyInput,omitempty"` + // FulfillmentInput: Input for fulfillment metric. + FulfillmentInput *GoogleCloudAiplatformV1FulfillmentInput `json:"fulfillmentInput,omitempty"` + // GroundednessInput: Input for groundedness metric. + GroundednessInput *GoogleCloudAiplatformV1GroundednessInput `json:"groundednessInput,omitempty"` + // PairwiseQuestionAnsweringQualityInput: Input for pairwise question answering + // quality metric. + PairwiseQuestionAnsweringQualityInput *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput `json:"pairwiseQuestionAnsweringQualityInput,omitempty"` + // PairwiseSummarizationQualityInput: Input for pairwise summarization quality + // metric. + PairwiseSummarizationQualityInput *GoogleCloudAiplatformV1PairwiseSummarizationQualityInput `json:"pairwiseSummarizationQualityInput,omitempty"` + // QuestionAnsweringCorrectnessInput: Input for question answering correctness + // metric. + QuestionAnsweringCorrectnessInput *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput `json:"questionAnsweringCorrectnessInput,omitempty"` + // QuestionAnsweringHelpfulnessInput: Input for question answering helpfulness + // metric. + QuestionAnsweringHelpfulnessInput *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput `json:"questionAnsweringHelpfulnessInput,omitempty"` + // QuestionAnsweringQualityInput: Input for question answering quality metric. + QuestionAnsweringQualityInput *GoogleCloudAiplatformV1QuestionAnsweringQualityInput `json:"questionAnsweringQualityInput,omitempty"` + // QuestionAnsweringRelevanceInput: Input for question answering relevance + // metric. + QuestionAnsweringRelevanceInput *GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput `json:"questionAnsweringRelevanceInput,omitempty"` + // RougeInput: Instances and metric spec for rouge metric. + RougeInput *GoogleCloudAiplatformV1RougeInput `json:"rougeInput,omitempty"` + // SafetyInput: Input for safety metric. + SafetyInput *GoogleCloudAiplatformV1SafetyInput `json:"safetyInput,omitempty"` + // SummarizationHelpfulnessInput: Input for summarization helpfulness metric. + SummarizationHelpfulnessInput *GoogleCloudAiplatformV1SummarizationHelpfulnessInput `json:"summarizationHelpfulnessInput,omitempty"` + // SummarizationQualityInput: Input for summarization quality metric. + SummarizationQualityInput *GoogleCloudAiplatformV1SummarizationQualityInput `json:"summarizationQualityInput,omitempty"` + // SummarizationVerbosityInput: Input for summarization verbosity metric. + SummarizationVerbosityInput *GoogleCloudAiplatformV1SummarizationVerbosityInput `json:"summarizationVerbosityInput,omitempty"` + // ToolCallValidInput: Tool call metric instances. Input for tool call valid + // metric. + ToolCallValidInput *GoogleCloudAiplatformV1ToolCallValidInput `json:"toolCallValidInput,omitempty"` + // ToolNameMatchInput: Input for tool name match metric. + ToolNameMatchInput *GoogleCloudAiplatformV1ToolNameMatchInput `json:"toolNameMatchInput,omitempty"` + // ToolParameterKeyMatchInput: Input for tool parameter key match metric. + ToolParameterKeyMatchInput *GoogleCloudAiplatformV1ToolParameterKeyMatchInput `json:"toolParameterKeyMatchInput,omitempty"` + // ToolParameterKvMatchInput: Input for tool parameter key value match metric. + ToolParameterKvMatchInput *GoogleCloudAiplatformV1ToolParameterKVMatchInput `json:"toolParameterKvMatchInput,omitempty"` + // ForceSendFields is a list of field names (e.g. "BleuInput") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BleuInput") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1EvaluateInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1EvaluateInstancesRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1EvaluateInstancesResponse: Response message for +// EvaluationService.EvaluateInstances. +type GoogleCloudAiplatformV1EvaluateInstancesResponse struct { + // BleuResults: Results for bleu metric. + BleuResults *GoogleCloudAiplatformV1BleuResults `json:"bleuResults,omitempty"` + // CoherenceResult: Result for coherence metric. + CoherenceResult *GoogleCloudAiplatformV1CoherenceResult `json:"coherenceResult,omitempty"` + // ExactMatchResults: Auto metric evaluation results. Results for exact match + // metric. + ExactMatchResults *GoogleCloudAiplatformV1ExactMatchResults `json:"exactMatchResults,omitempty"` + // FluencyResult: LLM-based metric evaluation result. General text generation + // metrics, applicable to other categories. Result for fluency metric. + FluencyResult *GoogleCloudAiplatformV1FluencyResult `json:"fluencyResult,omitempty"` + // FulfillmentResult: Result for fulfillment metric. + FulfillmentResult *GoogleCloudAiplatformV1FulfillmentResult `json:"fulfillmentResult,omitempty"` + // GroundednessResult: Result for groundedness metric. + GroundednessResult *GoogleCloudAiplatformV1GroundednessResult `json:"groundednessResult,omitempty"` + // PairwiseQuestionAnsweringQualityResult: Result for pairwise question + // answering quality metric. + PairwiseQuestionAnsweringQualityResult *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult `json:"pairwiseQuestionAnsweringQualityResult,omitempty"` + // PairwiseSummarizationQualityResult: Result for pairwise summarization + // quality metric. + PairwiseSummarizationQualityResult *GoogleCloudAiplatformV1PairwiseSummarizationQualityResult `json:"pairwiseSummarizationQualityResult,omitempty"` + // QuestionAnsweringCorrectnessResult: Result for question answering + // correctness metric. + QuestionAnsweringCorrectnessResult *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult `json:"questionAnsweringCorrectnessResult,omitempty"` + // QuestionAnsweringHelpfulnessResult: Result for question answering + // helpfulness metric. + QuestionAnsweringHelpfulnessResult *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult `json:"questionAnsweringHelpfulnessResult,omitempty"` + // QuestionAnsweringQualityResult: Question answering only metrics. Result for + // question answering quality metric. + QuestionAnsweringQualityResult *GoogleCloudAiplatformV1QuestionAnsweringQualityResult `json:"questionAnsweringQualityResult,omitempty"` + // QuestionAnsweringRelevanceResult: Result for question answering relevance + // metric. + QuestionAnsweringRelevanceResult *GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult `json:"questionAnsweringRelevanceResult,omitempty"` + // RougeResults: Results for rouge metric. + RougeResults *GoogleCloudAiplatformV1RougeResults `json:"rougeResults,omitempty"` + // SafetyResult: Result for safety metric. + SafetyResult *GoogleCloudAiplatformV1SafetyResult `json:"safetyResult,omitempty"` + // SummarizationHelpfulnessResult: Result for summarization helpfulness metric. + SummarizationHelpfulnessResult *GoogleCloudAiplatformV1SummarizationHelpfulnessResult `json:"summarizationHelpfulnessResult,omitempty"` + // SummarizationQualityResult: Summarization only metrics. Result for + // summarization quality metric. + SummarizationQualityResult *GoogleCloudAiplatformV1SummarizationQualityResult `json:"summarizationQualityResult,omitempty"` + // SummarizationVerbosityResult: Result for summarization verbosity metric. + SummarizationVerbosityResult *GoogleCloudAiplatformV1SummarizationVerbosityResult `json:"summarizationVerbosityResult,omitempty"` + // ToolCallValidResults: Tool call metrics. Results for tool call valid metric. + ToolCallValidResults *GoogleCloudAiplatformV1ToolCallValidResults `json:"toolCallValidResults,omitempty"` + // ToolNameMatchResults: Results for tool name match metric. + ToolNameMatchResults *GoogleCloudAiplatformV1ToolNameMatchResults `json:"toolNameMatchResults,omitempty"` + // ToolParameterKeyMatchResults: Results for tool parameter key match metric. + ToolParameterKeyMatchResults *GoogleCloudAiplatformV1ToolParameterKeyMatchResults `json:"toolParameterKeyMatchResults,omitempty"` + // ToolParameterKvMatchResults: Results for tool parameter key value match + // metric. + ToolParameterKvMatchResults *GoogleCloudAiplatformV1ToolParameterKVMatchResults `json:"toolParameterKvMatchResults,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BleuResults") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BleuResults") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1EvaluateInstancesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1EvaluateInstancesResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1EvaluatedAnnotation: True positive, false positive, // or false negative. EvaluatedAnnotation is only available under // ModelEvaluationSlice with slice of `annotationSpec` dimension. @@ -6742,6 +7136,118 @@ func (s *GoogleCloudAiplatformV1Event) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ExactMatchInput: Input for exact match metric. +type GoogleCloudAiplatformV1ExactMatchInput struct { + // Instances: Required. Repeated exact match instances. + Instances []*GoogleCloudAiplatformV1ExactMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for exact match metric. + MetricSpec *GoogleCloudAiplatformV1ExactMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ExactMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ExactMatchInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ExactMatchInstance: Spec for exact match instance. +type GoogleCloudAiplatformV1ExactMatchInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Required. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ExactMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ExactMatchInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ExactMatchMetricValue: Exact match metric value for +// an instance. +type GoogleCloudAiplatformV1ExactMatchMetricValue struct { + // Score: Output only. Exact match score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ExactMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ExactMatchMetricValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1ExactMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1ExactMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1ExactMatchResults: Results for exact match metric. +type GoogleCloudAiplatformV1ExactMatchResults struct { + // ExactMatchMetricValues: Output only. Exact match metric values. + ExactMatchMetricValues []*GoogleCloudAiplatformV1ExactMatchMetricValue `json:"exactMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExactMatchMetricValues") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExactMatchMetricValues") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ExactMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ExactMatchResults + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ExactMatchSpec: Spec for exact match metric - returns +// 1 if prediction and reference exactly matches, otherwise 0. +type GoogleCloudAiplatformV1ExactMatchSpec struct { +} + // GoogleCloudAiplatformV1Examples: Example-based explainability that returns // the nearest neighbors from the provided dataset. type GoogleCloudAiplatformV1Examples struct { @@ -8530,16 +9036,27 @@ func (s *GoogleCloudAiplatformV1FeatureOnlineStoreBigtableAutoScaling) MarshalJS // when you choose Optimized storage type. Public endpoint is provisioned by // default. type GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint struct { + // PrivateServiceConnectConfig: Optional. Private service connect config. The + // private service connection is available only for Optimized storage type, not + // for embedding management now. If + // PrivateServiceConnectConfig.enable_private_service_connect set to true, + // customers will use private service connection to send request. Otherwise, + // the connection will set to public endpoint. + PrivateServiceConnectConfig *GoogleCloudAiplatformV1PrivateServiceConnectConfig `json:"privateServiceConnectConfig,omitempty"` // PublicEndpointDomainName: Output only. This field will be populated with the // domain name to use for this FeatureOnlineStore PublicEndpointDomainName string `json:"publicEndpointDomainName,omitempty"` - // ForceSendFields is a list of field names (e.g. "PublicEndpointDomainName") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. + // ServiceAttachment: Output only. The name of the service attachment resource. + // Populated if private service connect is enabled and after FeatureViewSync is + // created. + ServiceAttachment string `json:"serviceAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "PrivateServiceConnectConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PublicEndpointDomainName") to + // NullFields is a list of field names (e.g. "PrivateServiceConnectConfig") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -9902,6 +10419,116 @@ func (s *GoogleCloudAiplatformV1FindNeighborsResponseNeighbor) UnmarshalJSON(dat return nil } +// GoogleCloudAiplatformV1FluencyInput: Input for fluency metric. +type GoogleCloudAiplatformV1FluencyInput struct { + // Instance: Required. Fluency instance. + Instance *GoogleCloudAiplatformV1FluencyInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for fluency score metric. + MetricSpec *GoogleCloudAiplatformV1FluencySpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FluencyInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FluencyInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FluencyInstance: Spec for fluency instance. +type GoogleCloudAiplatformV1FluencyInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FluencyInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FluencyInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FluencyResult: Spec for fluency result. +type GoogleCloudAiplatformV1FluencyResult struct { + // Confidence: Output only. Confidence for fluency score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for fluency score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Fluency score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FluencyResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FluencyResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1FluencyResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1FluencyResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1FluencySpec: Spec for fluency score metric. +type GoogleCloudAiplatformV1FluencySpec struct { + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Version") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FluencySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FluencySpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1FractionSplit: Assigns the input data to training, // validation, and test sets as per the given fractions. Any of // `training_fraction`, `validation_fraction` and `test_fraction` may @@ -9955,6 +10582,119 @@ func (s *GoogleCloudAiplatformV1FractionSplit) UnmarshalJSON(data []byte) error return nil } +// GoogleCloudAiplatformV1FulfillmentInput: Input for fulfillment metric. +type GoogleCloudAiplatformV1FulfillmentInput struct { + // Instance: Required. Fulfillment instance. + Instance *GoogleCloudAiplatformV1FulfillmentInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for fulfillment score metric. + MetricSpec *GoogleCloudAiplatformV1FulfillmentSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FulfillmentInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FulfillmentInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FulfillmentInstance: Spec for fulfillment instance. +type GoogleCloudAiplatformV1FulfillmentInstance struct { + // Instruction: Required. Inference instruction prompt to compare prediction + // with. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instruction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instruction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FulfillmentInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FulfillmentInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1FulfillmentResult: Spec for fulfillment result. +type GoogleCloudAiplatformV1FulfillmentResult struct { + // Confidence: Output only. Confidence for fulfillment score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for fulfillment score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Fulfillment score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FulfillmentResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FulfillmentResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1FulfillmentResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1FulfillmentResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1FulfillmentSpec: Spec for fulfillment metric. +type GoogleCloudAiplatformV1FulfillmentSpec struct { + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Version") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1FulfillmentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FulfillmentSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1FunctionCall: A predicted [FunctionCall] returned // from the model that contains a string representing the // [FunctionDeclaration.name] and a structured JSON object containing the @@ -10411,24 +11151,283 @@ func (s *GoogleCloudAiplatformV1GenieSource) MarshalJSON() ([]byte, error) { type GoogleCloudAiplatformV1GoogleSearchRetrieval struct { } +// GoogleCloudAiplatformV1GroundednessInput: Input for groundedness metric. +type GoogleCloudAiplatformV1GroundednessInput struct { + // Instance: Required. Groundedness instance. + Instance *GoogleCloudAiplatformV1GroundednessInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for groundedness metric. + MetricSpec *GoogleCloudAiplatformV1GroundednessSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundednessInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundednessInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundednessInstance: Spec for groundedness instance. +type GoogleCloudAiplatformV1GroundednessInstance struct { + // Context: Required. Background information provided in context used to + // compare against the prediction. + Context string `json:"context,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundednessInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundednessInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundednessResult: Spec for groundedness result. +type GoogleCloudAiplatformV1GroundednessResult struct { + // Confidence: Output only. Confidence for groundedness score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for groundedness score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Groundedness score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundednessResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundednessResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1GroundednessResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1GroundednessResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1GroundednessSpec: Spec for groundedness metric. +type GoogleCloudAiplatformV1GroundednessSpec struct { + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Version") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundednessSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundednessSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingAttribution: Grounding attribution. +type GoogleCloudAiplatformV1GroundingAttribution struct { + // ConfidenceScore: Optional. Output only. Confidence score of the attribution. + // Ranges from 0 to 1. 1 is the most confident. + ConfidenceScore float64 `json:"confidenceScore,omitempty"` + // Segment: Output only. Segment of the content this attribution belongs to. + Segment *GoogleCloudAiplatformV1Segment `json:"segment,omitempty"` + // Web: Optional. Attribution from the web. + Web *GoogleCloudAiplatformV1GroundingAttributionWeb `json:"web,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfidenceScore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfidenceScore") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingAttribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingAttribution + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1GroundingAttribution) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1GroundingAttribution + var s1 struct { + ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceScore = float64(s1.ConfidenceScore) + return nil +} + +// GoogleCloudAiplatformV1GroundingAttributionWeb: Attribution from the web. +type GoogleCloudAiplatformV1GroundingAttributionWeb struct { + // Title: Output only. Title of the attribution. + Title string `json:"title,omitempty"` + // Uri: Output only. URI reference of the attribution. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingAttributionWeb) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingAttributionWeb + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingChunk: Grounding chunk. +type GoogleCloudAiplatformV1GroundingChunk struct { + // RetrievedContext: Grounding chunk from context retrieved by the retrieval + // tools. + RetrievedContext *GoogleCloudAiplatformV1GroundingChunkRetrievedContext `json:"retrievedContext,omitempty"` + // Web: Grounding chunk from the web. + Web *GoogleCloudAiplatformV1GroundingChunkWeb `json:"web,omitempty"` + // ForceSendFields is a list of field names (e.g. "RetrievedContext") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RetrievedContext") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingChunkRetrievedContext: Chunk from context +// retrieved by the retrieval tools. +type GoogleCloudAiplatformV1GroundingChunkRetrievedContext struct { + // Title: Title of the attribution. + Title string `json:"title,omitempty"` + // Uri: URI reference of the attribution. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingChunkRetrievedContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingChunkRetrievedContext + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1GroundingChunkWeb: Chunk from the web. +type GoogleCloudAiplatformV1GroundingChunkWeb struct { + // Title: Title of the chunk. + Title string `json:"title,omitempty"` + // Uri: URI reference of the chunk. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingChunkWeb) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingChunkWeb + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1GroundingMetadata: Metadata returned to client when // grounding is enabled. type GoogleCloudAiplatformV1GroundingMetadata struct { + // GroundingAttributions: Optional. List of grounding attributions. + GroundingAttributions []*GoogleCloudAiplatformV1GroundingAttribution `json:"groundingAttributions,omitempty"` + // GroundingChunks: List of supporting references retrieved from specified + // grounding source. + GroundingChunks []*GoogleCloudAiplatformV1GroundingChunk `json:"groundingChunks,omitempty"` + // GroundingSupports: Optional. List of grounding support. + GroundingSupports []*GoogleCloudAiplatformV1GroundingSupport `json:"groundingSupports,omitempty"` // SearchEntryPoint: Optional. Google search entry for the following-up web // searches. SearchEntryPoint *GoogleCloudAiplatformV1SearchEntryPoint `json:"searchEntryPoint,omitempty"` // WebSearchQueries: Optional. Web search queries for the following-up web // search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchEntryPoint") to + // ForceSendFields is a list of field names (e.g. "GroundingAttributions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchEntryPoint") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "GroundingAttributions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -10438,6 +11437,54 @@ func (s *GoogleCloudAiplatformV1GroundingMetadata) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1GroundingSupport: Grounding support. +type GoogleCloudAiplatformV1GroundingSupport struct { + // ConfidenceScores: Confidence score of the support references. Ranges from 0 + // to 1. 1 is the most confident. This list must have the same size as the + // grounding_chunk_indices. + ConfidenceScores []float64 `json:"confidenceScores,omitempty"` + // GroundingChunkIndices: A list of indices (into 'grounding_chunk') specifying + // the citations associated with the claim. For instance [1,3,4] means that + // grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved + // content attributed to the claim. + GroundingChunkIndices []int64 `json:"groundingChunkIndices,omitempty"` + // Segment: Segment of the content this support belongs to. + Segment *GoogleCloudAiplatformV1Segment `json:"segment,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfidenceScores") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfidenceScores") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1GroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1GroundingSupport + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1GroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1GroundingSupport + var s1 struct { + ConfidenceScores []gensupport.JSONFloat64 `json:"confidenceScores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceScores = make([]float64, len(s1.ConfidenceScores)) + for i := range s1.ConfidenceScores { + s.ConfidenceScores[i] = float64(s1.ConfidenceScores[i]) + } + return nil +} + // GoogleCloudAiplatformV1HyperparameterTuningJob: Represents a // HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification // and multiple CustomJobs with identical CustomJob specification. @@ -13696,6 +14743,16 @@ type GoogleCloudAiplatformV1Model struct { // predictions and explanations as given and returned via // PredictionService.Predict and PredictionService.Explain. PredictSchemata *GoogleCloudAiplatformV1PredictSchemata `json:"predictSchemata,omitempty"` + // SatisfiesPzi: Output only. A read only boolean field reflecting Zone + // Isolation status of the model. It's false by default. Since Model is a type + // ZICY 4.2 resource, the field is an aggregated value of ZI status of its + // underlying dependencies. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. A read only boolean field reflecting ZS status of + // the model. It's false by default. Since Model is a type ZICY 4.2 resource, + // the field is an aggregated value of ZS status of its underlying + // dependencies. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // SupportedDeploymentResourcesTypes: Output only. When this Model is deployed, // its prediction resources are described by the `prediction_resources` field // of the Endpoint.deployed_models object. Because not all Models support all @@ -16380,6 +17437,265 @@ func (s *GoogleCloudAiplatformV1NotebookRuntimeTemplateRef) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput: Input for +// pairwise question answering quality metric. +type GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput struct { + // Instance: Required. Pairwise question answering quality instance. + Instance *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for pairwise question answering quality score + // metric. + MetricSpec *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance: Spec for +// pairwise question answering quality instance. +type GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance struct { + // BaselinePrediction: Required. Output of the baseline model. + BaselinePrediction string `json:"baselinePrediction,omitempty"` + // Context: Required. Text to answer the question. + Context string `json:"context,omitempty"` + // Instruction: Required. Question Answering prompt for LLM. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the candidate model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "BaselinePrediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BaselinePrediction") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult: Spec for +// pairwise question answering quality result. +type GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult struct { + // Confidence: Output only. Confidence for question answering quality score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for question answering quality score. + Explanation string `json:"explanation,omitempty"` + // PairwiseChoice: Output only. Pairwise question answering prediction choice. + // + // Possible values: + // "PAIRWISE_CHOICE_UNSPECIFIED" - Unspecified prediction choice. + // "BASELINE" - Baseline prediction wins + // "CANDIDATE" - Candidate prediction wins + // "TIE" - Winner cannot be determined + PairwiseChoice string `json:"pairwiseChoice,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec: Spec for +// pairwise question answering quality score metric. +type GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // question answering quality. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualitySpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PairwiseSummarizationQualityInput: Input for pairwise +// summarization quality metric. +type GoogleCloudAiplatformV1PairwiseSummarizationQualityInput struct { + // Instance: Required. Pairwise summarization quality instance. + Instance *GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for pairwise summarization quality score metric. + MetricSpec *GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PairwiseSummarizationQualityInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseSummarizationQualityInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance: Spec for +// pairwise summarization quality instance. +type GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance struct { + // BaselinePrediction: Required. Output of the baseline model. + BaselinePrediction string `json:"baselinePrediction,omitempty"` + // Context: Required. Text to be summarized. + Context string `json:"context,omitempty"` + // Instruction: Required. Summarization prompt for LLM. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the candidate model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "BaselinePrediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BaselinePrediction") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseSummarizationQualityInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PairwiseSummarizationQualityResult: Spec for pairwise +// summarization quality result. +type GoogleCloudAiplatformV1PairwiseSummarizationQualityResult struct { + // Confidence: Output only. Confidence for summarization quality score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for summarization quality score. + Explanation string `json:"explanation,omitempty"` + // PairwiseChoice: Output only. Pairwise summarization prediction choice. + // + // Possible values: + // "PAIRWISE_CHOICE_UNSPECIFIED" - Unspecified prediction choice. + // "BASELINE" - Baseline prediction wins + // "CANDIDATE" - Candidate prediction wins + // "TIE" - Winner cannot be determined + PairwiseChoice string `json:"pairwiseChoice,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PairwiseSummarizationQualityResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseSummarizationQualityResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1PairwiseSummarizationQualityResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1PairwiseSummarizationQualityResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + return nil +} + +// GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec: Spec for pairwise +// summarization quality score metric. +type GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // pairwise summarization quality. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseSummarizationQualitySpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1Part: A datatype containing media that is part of a // multi-part `Content` message. A `Part` consists of data which has an // associated datatype. A `Part` can only contain one of the accepted types in @@ -17600,6 +18916,8 @@ type GoogleCloudAiplatformV1PublisherModelCallToActionDeploy struct { // DedicatedResources: A description of resources that are dedicated to the // DeployedModel, and that need a higher degree of manual configuration. DedicatedResources *GoogleCloudAiplatformV1DedicatedResources `json:"dedicatedResources,omitempty"` + // DeployMetadata: Optional. Metadata information about this deployment config. + DeployMetadata *GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata `json:"deployMetadata,omitempty"` // DeployTaskName: Optional. The name of the deploy task (e.g., "text to image // generation"). DeployTaskName string `json:"deployTaskName,omitempty"` @@ -17636,6 +18954,30 @@ func (s *GoogleCloudAiplatformV1PublisherModelCallToActionDeploy) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata: +// Metadata information about the deployment for managing deployment config. +type GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata struct { + // Labels: Optional. Labels for the deployment. For managing deployment config + // like verifying, source of deployment config, etc. + Labels map[string]string `json:"labels,omitempty"` + // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Labels") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke: Configurations // for PublisherModel GKE deployment type GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke struct { @@ -18135,6 +19477,506 @@ func (s *GoogleCloudAiplatformV1QueryDeployedModelsResponse) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput: Input for question +// answering correctness metric. +type GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput struct { + // Instance: Required. Question answering correctness instance. + Instance *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for question answering correctness score metric. + MetricSpec *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance: Spec for +// question answering correctness instance. +type GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance struct { + // Context: Optional. Text provided as context to answer the question. + Context string `json:"context,omitempty"` + // Instruction: Required. The question asked and other instruction in the + // inference prompt. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult: Spec for question +// answering correctness result. +type GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult struct { + // Confidence: Output only. Confidence for question answering correctness + // score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for question answering correctness + // score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Question Answering Correctness score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec: Spec for question +// answering correctness metric. +type GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // question answering correctness. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringCorrectnessSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput: Input for question +// answering helpfulness metric. +type GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput struct { + // Instance: Required. Question answering helpfulness instance. + Instance *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for question answering helpfulness score metric. + MetricSpec *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance: Spec for +// question answering helpfulness instance. +type GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance struct { + // Context: Optional. Text provided as context to answer the question. + Context string `json:"context,omitempty"` + // Instruction: Required. The question asked and other instruction in the + // inference prompt. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult: Spec for question +// answering helpfulness result. +type GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult struct { + // Confidence: Output only. Confidence for question answering helpfulness + // score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for question answering helpfulness + // score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Question Answering Helpfulness score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec: Spec for question +// answering helpfulness metric. +type GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // question answering helpfulness. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringHelpfulnessSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringQualityInput: Input for question +// answering quality metric. +type GoogleCloudAiplatformV1QuestionAnsweringQualityInput struct { + // Instance: Required. Question answering quality instance. + Instance *GoogleCloudAiplatformV1QuestionAnsweringQualityInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for question answering quality score metric. + MetricSpec *GoogleCloudAiplatformV1QuestionAnsweringQualitySpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringQualityInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringQualityInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringQualityInstance: Spec for question +// answering quality instance. +type GoogleCloudAiplatformV1QuestionAnsweringQualityInstance struct { + // Context: Required. Text to answer the question. + Context string `json:"context,omitempty"` + // Instruction: Required. Question Answering prompt for LLM. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringQualityInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringQualityInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringQualityResult: Spec for question +// answering quality result. +type GoogleCloudAiplatformV1QuestionAnsweringQualityResult struct { + // Confidence: Output only. Confidence for question answering quality score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for question answering quality score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Question Answering Quality score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringQualityResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringQualityResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringQualityResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringQualityResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1QuestionAnsweringQualitySpec: Spec for question +// answering quality score metric. +type GoogleCloudAiplatformV1QuestionAnsweringQualitySpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // question answering quality. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringQualitySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringQualitySpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput: Input for question +// answering relevance metric. +type GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput struct { + // Instance: Required. Question answering relevance instance. + Instance *GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for question answering relevance score metric. + MetricSpec *GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringRelevanceInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance: Spec for question +// answering relevance instance. +type GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance struct { + // Context: Optional. Text provided as context to answer the question. + Context string `json:"context,omitempty"` + // Instruction: Required. The question asked and other instruction in the + // inference prompt. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringRelevanceInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult: Spec for question +// answering relevance result. +type GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult struct { + // Confidence: Output only. Confidence for question answering relevance score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for question answering relevance + // score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Question Answering Relevance score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringRelevanceResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec: Spec for question +// answering relevance metric. +type GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // question answering relevance. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1QuestionAnsweringRelevanceSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1RawPredictRequest: Request message for // PredictionService.RawPredict. type GoogleCloudAiplatformV1RawPredictRequest struct { @@ -18933,6 +20775,187 @@ func (s *GoogleCloudAiplatformV1Retrieval) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1RougeInput: Input for rouge metric. +type GoogleCloudAiplatformV1RougeInput struct { + // Instances: Required. Repeated rouge instances. + Instances []*GoogleCloudAiplatformV1RougeInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for rouge score metric. + MetricSpec *GoogleCloudAiplatformV1RougeSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1RougeInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1RougeInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1RougeInstance: Spec for rouge instance. +type GoogleCloudAiplatformV1RougeInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Required. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1RougeInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1RougeInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1RougeMetricValue: Rouge metric value for an instance. +type GoogleCloudAiplatformV1RougeMetricValue struct { + // Score: Output only. Rouge score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1RougeMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1RougeMetricValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1RougeMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1RougeMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1RougeResults: Results for rouge metric. +type GoogleCloudAiplatformV1RougeResults struct { + // RougeMetricValues: Output only. Rouge metric values. + RougeMetricValues []*GoogleCloudAiplatformV1RougeMetricValue `json:"rougeMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "RougeMetricValues") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RougeMetricValues") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1RougeResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1RougeResults + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1RougeSpec: Spec for rouge score metric - calculates +// the recall of n-grams in prediction as compared to reference - returns a +// score ranging between 0 and 1. +type GoogleCloudAiplatformV1RougeSpec struct { + // RougeType: Optional. Supported rouge types are rougen[1-9], rougeL, and + // rougeLsum. + RougeType string `json:"rougeType,omitempty"` + // SplitSummaries: Optional. Whether to split summaries while using rougeLsum. + SplitSummaries bool `json:"splitSummaries,omitempty"` + // UseStemmer: Optional. Whether to use stemmer to compute rouge score. + UseStemmer bool `json:"useStemmer,omitempty"` + // ForceSendFields is a list of field names (e.g. "RougeType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RougeType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1RougeSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1RougeSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SafetyInput: Input for safety metric. +type GoogleCloudAiplatformV1SafetyInput struct { + // Instance: Required. Safety instance. + Instance *GoogleCloudAiplatformV1SafetyInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for safety metric. + MetricSpec *GoogleCloudAiplatformV1SafetySpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SafetyInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SafetyInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SafetyInstance: Spec for safety instance. +type GoogleCloudAiplatformV1SafetyInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SafetyInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SafetyInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1SafetyRating: Safety rating corresponding to the // generated content. type GoogleCloudAiplatformV1SafetyRating struct { @@ -19006,6 +21029,48 @@ func (s *GoogleCloudAiplatformV1SafetyRating) UnmarshalJSON(data []byte) error { return nil } +// GoogleCloudAiplatformV1SafetyResult: Spec for safety result. +type GoogleCloudAiplatformV1SafetyResult struct { + // Confidence: Output only. Confidence for safety score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for safety score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Safety score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SafetyResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SafetyResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1SafetyResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1SafetyResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + // GoogleCloudAiplatformV1SafetySetting: Safety settings. type GoogleCloudAiplatformV1SafetySetting struct { // Category: Required. Harm category. @@ -19056,6 +21121,28 @@ func (s *GoogleCloudAiplatformV1SafetySetting) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SafetySpec: Spec for safety metric. +type GoogleCloudAiplatformV1SafetySpec struct { + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Version") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SafetySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SafetySpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1SampleConfig: Active learning data sampling config. // For every active learning labeling iteration, it will select a batch of data // based on the sampling strategy. @@ -26093,6 +28180,37 @@ func (s *GoogleCloudAiplatformV1SearchNearestEntitiesResponse) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1Segment: Segment of the content. +type GoogleCloudAiplatformV1Segment struct { + // EndIndex: Output only. End index in the given Part, measured in bytes. + // Offset from the start of the Part, exclusive, starting at zero. + EndIndex int64 `json:"endIndex,omitempty"` + // PartIndex: Output only. The index of a Part object within its parent Content + // object. + PartIndex int64 `json:"partIndex,omitempty"` + // StartIndex: Output only. Start index in the given Part, measured in bytes. + // Offset from the start of the Part, inclusive, starting at zero. + StartIndex int64 `json:"startIndex,omitempty"` + // Text: Output only. The text corresponding to the segment from the response. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1Segment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Segment + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ServiceAccountSpec: Configuration for the use of // custom service account to run the workloads. type GoogleCloudAiplatformV1ServiceAccountSpec struct { @@ -27397,6 +29515,375 @@ func (s *GoogleCloudAiplatformV1SuggestTrialsResponse) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SummarizationHelpfulnessInput: Input for +// summarization helpfulness metric. +type GoogleCloudAiplatformV1SummarizationHelpfulnessInput struct { + // Instance: Required. Summarization helpfulness instance. + Instance *GoogleCloudAiplatformV1SummarizationHelpfulnessInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for summarization helpfulness score metric. + MetricSpec *GoogleCloudAiplatformV1SummarizationHelpfulnessSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationHelpfulnessInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationHelpfulnessInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SummarizationHelpfulnessInstance: Spec for +// summarization helpfulness instance. +type GoogleCloudAiplatformV1SummarizationHelpfulnessInstance struct { + // Context: Required. Text to be summarized. + Context string `json:"context,omitempty"` + // Instruction: Optional. Summarization prompt for LLM. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationHelpfulnessInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationHelpfulnessInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SummarizationHelpfulnessResult: Spec for +// summarization helpfulness result. +type GoogleCloudAiplatformV1SummarizationHelpfulnessResult struct { + // Confidence: Output only. Confidence for summarization helpfulness score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for summarization helpfulness score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Summarization Helpfulness score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationHelpfulnessResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationHelpfulnessResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1SummarizationHelpfulnessResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1SummarizationHelpfulnessResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1SummarizationHelpfulnessSpec: Spec for summarization +// helpfulness score metric. +type GoogleCloudAiplatformV1SummarizationHelpfulnessSpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // summarization helpfulness. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationHelpfulnessSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationHelpfulnessSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SummarizationQualityInput: Input for summarization +// quality metric. +type GoogleCloudAiplatformV1SummarizationQualityInput struct { + // Instance: Required. Summarization quality instance. + Instance *GoogleCloudAiplatformV1SummarizationQualityInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for summarization quality score metric. + MetricSpec *GoogleCloudAiplatformV1SummarizationQualitySpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationQualityInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationQualityInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SummarizationQualityInstance: Spec for summarization +// quality instance. +type GoogleCloudAiplatformV1SummarizationQualityInstance struct { + // Context: Required. Text to be summarized. + Context string `json:"context,omitempty"` + // Instruction: Required. Summarization prompt for LLM. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationQualityInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationQualityInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SummarizationQualityResult: Spec for summarization +// quality result. +type GoogleCloudAiplatformV1SummarizationQualityResult struct { + // Confidence: Output only. Confidence for summarization quality score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for summarization quality score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Summarization Quality score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationQualityResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationQualityResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1SummarizationQualityResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1SummarizationQualityResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1SummarizationQualitySpec: Spec for summarization +// quality score metric. +type GoogleCloudAiplatformV1SummarizationQualitySpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // summarization quality. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationQualitySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationQualitySpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SummarizationVerbosityInput: Input for summarization +// verbosity metric. +type GoogleCloudAiplatformV1SummarizationVerbosityInput struct { + // Instance: Required. Summarization verbosity instance. + Instance *GoogleCloudAiplatformV1SummarizationVerbosityInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for summarization verbosity score metric. + MetricSpec *GoogleCloudAiplatformV1SummarizationVerbositySpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instance") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationVerbosityInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationVerbosityInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SummarizationVerbosityInstance: Spec for +// summarization verbosity instance. +type GoogleCloudAiplatformV1SummarizationVerbosityInstance struct { + // Context: Required. Text to be summarized. + Context string `json:"context,omitempty"` + // Instruction: Optional. Summarization prompt for LLM. + Instruction string `json:"instruction,omitempty"` + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Optional. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationVerbosityInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationVerbosityInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SummarizationVerbosityResult: Spec for summarization +// verbosity result. +type GoogleCloudAiplatformV1SummarizationVerbosityResult struct { + // Confidence: Output only. Confidence for summarization verbosity score. + Confidence float64 `json:"confidence,omitempty"` + // Explanation: Output only. Explanation for summarization verbosity score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Summarization Verbosity score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Confidence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Confidence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationVerbosityResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationVerbosityResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1SummarizationVerbosityResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1SummarizationVerbosityResult + var s1 struct { + Confidence gensupport.JSONFloat64 `json:"confidence"` + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Confidence = float64(s1.Confidence) + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1SummarizationVerbositySpec: Spec for summarization +// verbosity score metric. +type GoogleCloudAiplatformV1SummarizationVerbositySpec struct { + // UseReference: Optional. Whether to use instance.reference to compute + // summarization verbosity. + UseReference bool `json:"useReference,omitempty"` + // Version: Optional. Which version to use for evaluation. + Version int64 `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseReference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseReference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1SummarizationVerbositySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SummarizationVerbositySpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1SupervisedHyperParameters: Hyperparameters for SFT. type GoogleCloudAiplatformV1SupervisedHyperParameters struct { // AdapterSize: Optional. Adapter size for tuning. @@ -27493,6 +29980,9 @@ func (s *GoogleCloudAiplatformV1SupervisedTuningDataStats) MarshalJSON() ([]byte // GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution: Dataset // distribution for Supervised Tuning. type GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution struct { + // BillableSum: Output only. Sum of a given population of values that are + // billable. + BillableSum int64 `json:"billableSum,omitempty,string"` // Buckets: Output only. Defines the histogram bucket. Buckets []*GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket `json:"buckets,omitempty"` // Max: Output only. The maximum of the population values. @@ -27509,13 +29999,13 @@ type GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution struct { P95 float64 `json:"p95,omitempty"` // Sum: Output only. Sum of a given population of values. Sum int64 `json:"sum,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Buckets") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "BillableSum") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Buckets") to include in API + // NullFields is a list of field names (e.g. "BillableSum") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -28294,19 +30784,21 @@ func (s *GoogleCloudAiplatformV1TimestampSplit) UnmarshalJSON(data []byte) error // GoogleCloudAiplatformV1TokensInfo: Tokens info with a list of tokens and the // corresponding list of token ids. type GoogleCloudAiplatformV1TokensInfo struct { + // Role: Optional. Optional fields for the role from the corresponding Content. + Role string `json:"role,omitempty"` // TokenIds: A list of token ids from the input. TokenIds googleapi.Int64s `json:"tokenIds,omitempty"` // Tokens: A list of tokens from the input. Tokens []string `json:"tokens,omitempty"` - // ForceSendFields is a list of field names (e.g. "TokenIds") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Role") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TokenIds") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "Role") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -28355,6 +30847,119 @@ func (s *GoogleCloudAiplatformV1Tool) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ToolCallValidInput: Input for tool call valid metric. +type GoogleCloudAiplatformV1ToolCallValidInput struct { + // Instances: Required. Repeated tool call valid instances. + Instances []*GoogleCloudAiplatformV1ToolCallValidInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for tool call valid metric. + MetricSpec *GoogleCloudAiplatformV1ToolCallValidSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolCallValidInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolCallValidInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolCallValidInstance: Spec for tool call valid +// instance. +type GoogleCloudAiplatformV1ToolCallValidInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Required. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolCallValidInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolCallValidInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolCallValidMetricValue: Tool call valid metric +// value for an instance. +type GoogleCloudAiplatformV1ToolCallValidMetricValue struct { + // Score: Output only. Tool call valid score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolCallValidMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolCallValidMetricValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1ToolCallValidMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1ToolCallValidMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1ToolCallValidResults: Results for tool call valid +// metric. +type GoogleCloudAiplatformV1ToolCallValidResults struct { + // ToolCallValidMetricValues: Output only. Tool call valid metric values. + ToolCallValidMetricValues []*GoogleCloudAiplatformV1ToolCallValidMetricValue `json:"toolCallValidMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolCallValidMetricValues") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolCallValidMetricValues") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolCallValidResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolCallValidResults + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolCallValidSpec: Spec for tool call valid metric. +type GoogleCloudAiplatformV1ToolCallValidSpec struct { +} + // GoogleCloudAiplatformV1ToolConfig: Tool config. This config is shared for // all tools provided in the request. type GoogleCloudAiplatformV1ToolConfig struct { @@ -28378,6 +30983,374 @@ func (s *GoogleCloudAiplatformV1ToolConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ToolNameMatchInput: Input for tool name match metric. +type GoogleCloudAiplatformV1ToolNameMatchInput struct { + // Instances: Required. Repeated tool name match instances. + Instances []*GoogleCloudAiplatformV1ToolNameMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for tool name match metric. + MetricSpec *GoogleCloudAiplatformV1ToolNameMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolNameMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolNameMatchInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolNameMatchInstance: Spec for tool name match +// instance. +type GoogleCloudAiplatformV1ToolNameMatchInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Required. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolNameMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolNameMatchInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolNameMatchMetricValue: Tool name match metric +// value for an instance. +type GoogleCloudAiplatformV1ToolNameMatchMetricValue struct { + // Score: Output only. Tool name match score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolNameMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolNameMatchMetricValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1ToolNameMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1ToolNameMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1ToolNameMatchResults: Results for tool name match +// metric. +type GoogleCloudAiplatformV1ToolNameMatchResults struct { + // ToolNameMatchMetricValues: Output only. Tool name match metric values. + ToolNameMatchMetricValues []*GoogleCloudAiplatformV1ToolNameMatchMetricValue `json:"toolNameMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolNameMatchMetricValues") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolNameMatchMetricValues") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolNameMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolNameMatchResults + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolNameMatchSpec: Spec for tool name match metric. +type GoogleCloudAiplatformV1ToolNameMatchSpec struct { +} + +// GoogleCloudAiplatformV1ToolParameterKVMatchInput: Input for tool parameter +// key value match metric. +type GoogleCloudAiplatformV1ToolParameterKVMatchInput struct { + // Instances: Required. Repeated tool parameter key value match instances. + Instances []*GoogleCloudAiplatformV1ToolParameterKVMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for tool parameter key value match metric. + MetricSpec *GoogleCloudAiplatformV1ToolParameterKVMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKVMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKVMatchInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolParameterKVMatchInstance: Spec for tool parameter +// key value match instance. +type GoogleCloudAiplatformV1ToolParameterKVMatchInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Required. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKVMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKVMatchInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue: Tool parameter key +// value match metric value for an instance. +type GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue struct { + // Score: Output only. Tool parameter key value match score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1ToolParameterKVMatchResults: Results for tool +// parameter key value match metric. +type GoogleCloudAiplatformV1ToolParameterKVMatchResults struct { + // ToolParameterKvMatchMetricValues: Output only. Tool parameter key value + // match metric values. + ToolParameterKvMatchMetricValues []*GoogleCloudAiplatformV1ToolParameterKVMatchMetricValue `json:"toolParameterKvMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ToolParameterKvMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "ToolParameterKvMatchMetricValues") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKVMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKVMatchResults + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolParameterKVMatchSpec: Spec for tool parameter key +// value match metric. +type GoogleCloudAiplatformV1ToolParameterKVMatchSpec struct { + // UseStrictStringMatch: Optional. Whether to use STRCIT string match on + // parameter values. + UseStrictStringMatch bool `json:"useStrictStringMatch,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseStrictStringMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseStrictStringMatch") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKVMatchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKVMatchSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolParameterKeyMatchInput: Input for tool parameter +// key match metric. +type GoogleCloudAiplatformV1ToolParameterKeyMatchInput struct { + // Instances: Required. Repeated tool parameter key match instances. + Instances []*GoogleCloudAiplatformV1ToolParameterKeyMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for tool parameter key match metric. + MetricSpec *GoogleCloudAiplatformV1ToolParameterKeyMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKeyMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKeyMatchInput + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolParameterKeyMatchInstance: Spec for tool +// parameter key match instance. +type GoogleCloudAiplatformV1ToolParameterKeyMatchInstance struct { + // Prediction: Required. Output of the evaluated model. + Prediction string `json:"prediction,omitempty"` + // Reference: Required. Ground truth used to compare against the prediction. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Prediction") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Prediction") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKeyMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKeyMatchInstance + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue: Tool parameter key +// match metric value for an instance. +type GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue struct { + // Score: Output only. Tool parameter key match score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1ToolParameterKeyMatchResults: Results for tool +// parameter key match metric. +type GoogleCloudAiplatformV1ToolParameterKeyMatchResults struct { + // ToolParameterKeyMatchMetricValues: Output only. Tool parameter key match + // metric values. + ToolParameterKeyMatchMetricValues []*GoogleCloudAiplatformV1ToolParameterKeyMatchMetricValue `json:"toolParameterKeyMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ToolParameterKeyMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "ToolParameterKeyMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ToolParameterKeyMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolParameterKeyMatchResults + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1ToolParameterKeyMatchSpec: Spec for tool parameter +// key match metric. +type GoogleCloudAiplatformV1ToolParameterKeyMatchSpec struct { +} + // GoogleCloudAiplatformV1TrainingConfig: CMLE training config. For every // active learning labeling iteration, system will train a machine learning // model on CMLE. The trained model will be used by data sampling algorithm to @@ -30526,6 +33499,109 @@ func (s *IntelligenceCloudAutomlXpsReportingMetrics) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +type ProjectsLocationsEvaluateInstancesCall struct { + s *Service + location string + googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EvaluateInstances: Evaluates instances based on a given metric. +// +// - location: The resource name of the Location to evaluate the instances. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { + c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1evaluateinstancesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.evaluateInstances" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1EvaluateInstancesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsGetCall struct { s *Service name string @@ -39517,6 +42593,117 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Pages(ctx context.Con } } +type ProjectsLocationsDeploymentResourcePoolsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a DeploymentResourcePool. +// +// - name: Immutable. The resource name of the DeploymentResourcePool. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Patch(name string, googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c := &ProjectsLocationsDeploymentResourcePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1deploymentresourcepool = googlecloudaiplatformv1deploymentresourcepool + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The list of +// fields to update. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymentresourcepool) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall struct { s *Service deploymentResourcePool string diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index aad686e872..0a94f13cc7 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -3411,6 +3411,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Update a DeploymentResourcePool.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/deploymentResourcePools/{deploymentResourcePoolsId}", + "httpMethod": "PATCH", + "id": "aiplatform.projects.locations.deploymentResourcePools.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the DeploymentResourcePool. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/deploymentResourcePools/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DeploymentResourcePool" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "queryDeployedModels": { "description": "List DeployedModels that have been deployed on this DeploymentResourcePool.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/deploymentResourcePools/{deploymentResourcePoolsId}:queryDeployedModels", @@ -20413,7 +20447,7 @@ } } }, - "revision": "20240618", + "revision": "20240628", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -22063,7 +22097,12 @@ "GoogleCloudAiplatformV1beta1BleuSpec": { "description": "Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1.", "id": "GoogleCloudAiplatformV1beta1BleuSpec", - "properties": {}, + "properties": { + "useEffectiveOrder": { + "description": "Optional. Whether to use_effective_order to compute bleu score.", + "type": "boolean" + } + }, "type": "object" }, "GoogleCloudAiplatformV1beta1Blob": { @@ -22510,12 +22549,23 @@ "description": "Request message for ComputeTokens RPC call.", "id": "GoogleCloudAiplatformV1beta1ComputeTokensRequest", "properties": { + "contents": { + "description": "Required. Input content.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Content" + }, + "type": "array" + }, "instances": { "description": "Required. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.", "items": { "type": "any" }, "type": "array" + }, + "model": { + "description": "Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*", + "type": "string" } }, "type": "object" @@ -27870,10 +27920,136 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GroundingAttribution": { + "description": "Grounding attribution.", + "id": "GoogleCloudAiplatformV1beta1GroundingAttribution", + "properties": { + "confidenceScore": { + "description": "Optional. Output only. Confidence score of the attribution. Ranges from 0 to 1. 1 is the most confident.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "retrievedContext": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext", + "description": "Optional. Attribution from context retrieved by the retrieval tools." + }, + "segment": { + "$ref": "GoogleCloudAiplatformV1beta1Segment", + "description": "Output only. Segment of the content this attribution belongs to.", + "readOnly": true + }, + "web": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingAttributionWeb", + "description": "Optional. Attribution from the web." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext": { + "description": "Attribution from context retrieved by the retrieval tools.", + "id": "GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext", + "properties": { + "title": { + "description": "Output only. Title of the attribution.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. URI reference of the attribution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingAttributionWeb": { + "description": "Attribution from the web.", + "id": "GoogleCloudAiplatformV1beta1GroundingAttributionWeb", + "properties": { + "title": { + "description": "Output only. Title of the attribution.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. URI reference of the attribution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingChunk": { + "description": "Grounding chunk.", + "id": "GoogleCloudAiplatformV1beta1GroundingChunk", + "properties": { + "retrievedContext": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext", + "description": "Grounding chunk from context retrieved by the retrieval tools." + }, + "web": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingChunkWeb", + "description": "Grounding chunk from the web." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext": { + "description": "Chunk from context retrieved by the retrieval tools.", + "id": "GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext", + "properties": { + "title": { + "description": "Title of the attribution.", + "type": "string" + }, + "uri": { + "description": "URI reference of the attribution.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1GroundingChunkWeb": { + "description": "Chunk from the web.", + "id": "GoogleCloudAiplatformV1beta1GroundingChunkWeb", + "properties": { + "title": { + "description": "Title of the chunk.", + "type": "string" + }, + "uri": { + "description": "URI reference of the chunk.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1GroundingMetadata": { "description": "Metadata returned to client when grounding is enabled.", "id": "GoogleCloudAiplatformV1beta1GroundingMetadata", "properties": { + "groundingAttributions": { + "description": "Optional. List of grounding attributions.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingAttribution" + }, + "type": "array" + }, + "groundingChunks": { + "description": "List of supporting references retrieved from specified grounding source.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingChunk" + }, + "type": "array" + }, + "groundingSupports": { + "description": "Optional. List of grounding support.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1GroundingSupport" + }, + "type": "array" + }, "retrievalQueries": { "description": "Optional. Queries executed by the retrieval tools.", "items": { @@ -27895,6 +28071,33 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GroundingSupport": { + "description": "Grounding support.", + "id": "GoogleCloudAiplatformV1beta1GroundingSupport", + "properties": { + "confidenceScores": { + "description": "Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "groundingChunkIndices": { + "description": "A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "segment": { + "$ref": "GoogleCloudAiplatformV1beta1Segment", + "description": "Segment of the content this support belongs to." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1HyperparameterTuningJob": { "description": "Represents a HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification and multiple CustomJobs with identical CustomJob specification.", "id": "GoogleCloudAiplatformV1beta1HyperparameterTuningJob", @@ -30410,6 +30613,16 @@ "$ref": "GoogleCloudAiplatformV1beta1PredictSchemata", "description": "The schemata that describe formats of the Model's predictions and explanations as given and returned via PredictionService.Predict and PredictionService.Explain." }, + "satisfiesPzi": { + "description": "Output only. A read only boolean field reflecting Zone Isolation status of the model. It's false by default. Since Model is a type ZICY 4.2 resource, the field is an aggregated value of ZI status of its underlying dependencies.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. A read only boolean field reflecting ZS status of the model. It's false by default. Since Model is a type ZICY 4.2 resource, the field is an aggregated value of ZS status of its underlying dependencies.", + "readOnly": true, + "type": "boolean" + }, "supportedDeploymentResourcesTypes": { "description": "Output only. When this Model is deployed, its prediction resources are described by the `prediction_resources` field of the Endpoint.deployed_models object. Because not all Models support all resource configuration types, the configuration types this Model supports are listed here. If no configuration types are listed, the Model cannot be deployed to an Endpoint and does not support online predictions (PredictionService.Predict or PredictionService.Explain). Such a Model can serve predictions by using a BatchPredictionJob, if it has at least one entry each in supported_input_storage_formats and supported_output_storage_formats.", "items": { @@ -34586,6 +34799,10 @@ "$ref": "GoogleCloudAiplatformV1beta1DedicatedResources", "description": "A description of resources that are dedicated to the DeployedModel, and that need a higher degree of manual configuration." }, + "deployMetadata": { + "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployDeployMetadata", + "description": "Optional. Metadata information about this deployment config." + }, "deployTaskName": { "description": "Optional. The name of the deploy task (e.g., \"text to image generation\").", "type": "string" @@ -34613,6 +34830,20 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployDeployMetadata": { + "description": "Metadata information about the deployment for managing deployment config.", + "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployDeployMetadata", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels for the deployment. For managing deployment config like verifying, source of deployment config, etc.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke": { "description": "Configurations for PublisherModel GKE deployment", "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke", @@ -35534,11 +35765,6 @@ "text": { "description": "Optional. The query in text format to get relevant contexts.", "type": "string" - }, - "vectorDistanceThreshold": { - "description": "Optional. Only return contexts with vector distance smaller than the threshold.", - "format": "double", - "type": "number" } }, "type": "object" @@ -36352,7 +36578,7 @@ }, "vertexAiSearchRuntimeConfig": { "$ref": "GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig", - "description": "Runtime configuration for Vertext AI Search extension." + "description": "Runtime configuration for Vertex AI Search extension." } }, "type": "object" @@ -40973,6 +41199,36 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Segment": { + "description": "Segment of the content.", + "id": "GoogleCloudAiplatformV1beta1Segment", + "properties": { + "endIndex": { + "description": "Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "partIndex": { + "description": "Output only. The index of a Part object within its parent Content object.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "startIndex": { + "description": "Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "text": { + "description": "Output only. The text corresponding to the segment from the response.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ServiceAccountSpec": { "description": "Configuration for the use of custom service account to run the workloads.", "id": "GoogleCloudAiplatformV1beta1ServiceAccountSpec", @@ -42222,6 +42478,12 @@ "description": "Dataset distribution for Supervised Tuning.", "id": "GoogleCloudAiplatformV1beta1SupervisedTuningDatasetDistribution", "properties": { + "billableSum": { + "description": "Output only. Sum of a given population of values that are billable.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "buckets": { "description": "Output only. Defines the histogram bucket.", "items": { @@ -42881,6 +43143,10 @@ "description": "Tokens info with a list of tokens and the corresponding list of token ids.", "id": "GoogleCloudAiplatformV1beta1TokensInfo", "properties": { + "role": { + "description": "Optional. Optional fields for the role from the corresponding Content.", + "type": "string" + }, "tokenIds": { "description": "A list of token ids from the input.", "items": { @@ -43595,11 +43861,6 @@ "readOnly": true, "type": "string" }, - "pipelineJob": { - "description": "Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`.", - "readOnly": true, - "type": "string" - }, "startTime": { "description": "Output only. Time when the TuningJob for the first time entered the `JOB_STATE_RUNNING` state.", "format": "google-datetime", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index d8bbad73a6..692c2920b8 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -4112,6 +4112,25 @@ func (s *GoogleCloudAiplatformV1beta1BleuResults) MarshalJSON() ([]byte, error) // calculates the precision of n-grams in the prediction as compared to // reference - returns a score ranging between 0 to 1. type GoogleCloudAiplatformV1beta1BleuSpec struct { + // UseEffectiveOrder: Optional. Whether to use_effective_order to compute bleu + // score. + UseEffectiveOrder bool `json:"useEffectiveOrder,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseEffectiveOrder") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UseEffectiveOrder") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1BleuSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1BleuSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1beta1Blob: Content blob. It's preferred to send as @@ -4684,17 +4703,23 @@ func (s *GoogleCloudAiplatformV1beta1CompletionStats) MarshalJSON() ([]byte, err // GoogleCloudAiplatformV1beta1ComputeTokensRequest: Request message for // ComputeTokens RPC call. type GoogleCloudAiplatformV1beta1ComputeTokensRequest struct { + // Contents: Required. Input content. + Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` // Instances: Required. The instances that are the input to token computing API // call. Schema is identical to the prediction schema of the text model, even // for the non-text models, like chat models, or Codey models. Instances []interface{} `json:"instances,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to + // Model: Required. The name of the publisher model requested to serve the + // prediction. Format: + // projects/{project}/locations/{location}/publishers/*/models/* + Model string `json:"model,omitempty"` + // ForceSendFields is a list of field names (e.g. "Contents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in API + // NullFields is a list of field names (e.g. "Contents") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -12603,9 +12628,184 @@ func (s *GoogleCloudAiplatformV1beta1GroundednessSpec) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1GroundingAttribution: Grounding attribution. +type GoogleCloudAiplatformV1beta1GroundingAttribution struct { + // ConfidenceScore: Optional. Output only. Confidence score of the attribution. + // Ranges from 0 to 1. 1 is the most confident. + ConfidenceScore float64 `json:"confidenceScore,omitempty"` + // RetrievedContext: Optional. Attribution from context retrieved by the + // retrieval tools. + RetrievedContext *GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext `json:"retrievedContext,omitempty"` + // Segment: Output only. Segment of the content this attribution belongs to. + Segment *GoogleCloudAiplatformV1beta1Segment `json:"segment,omitempty"` + // Web: Optional. Attribution from the web. + Web *GoogleCloudAiplatformV1beta1GroundingAttributionWeb `json:"web,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfidenceScore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfidenceScore") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingAttribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingAttribution + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1GroundingAttribution) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1GroundingAttribution + var s1 struct { + ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceScore = float64(s1.ConfidenceScore) + return nil +} + +// GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext: +// Attribution from context retrieved by the retrieval tools. +type GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext struct { + // Title: Output only. Title of the attribution. + Title string `json:"title,omitempty"` + // Uri: Output only. URI reference of the attribution. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingAttributionWeb: Attribution from the +// web. +type GoogleCloudAiplatformV1beta1GroundingAttributionWeb struct { + // Title: Output only. Title of the attribution. + Title string `json:"title,omitempty"` + // Uri: Output only. URI reference of the attribution. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingAttributionWeb) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingAttributionWeb + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingChunk: Grounding chunk. +type GoogleCloudAiplatformV1beta1GroundingChunk struct { + // RetrievedContext: Grounding chunk from context retrieved by the retrieval + // tools. + RetrievedContext *GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext `json:"retrievedContext,omitempty"` + // Web: Grounding chunk from the web. + Web *GoogleCloudAiplatformV1beta1GroundingChunkWeb `json:"web,omitempty"` + // ForceSendFields is a list of field names (e.g. "RetrievedContext") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RetrievedContext") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingChunk + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext: Chunk from +// context retrieved by the retrieval tools. +type GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext struct { + // Title: Title of the attribution. + Title string `json:"title,omitempty"` + // Uri: URI reference of the attribution. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1GroundingChunkWeb: Chunk from the web. +type GoogleCloudAiplatformV1beta1GroundingChunkWeb struct { + // Title: Title of the chunk. + Title string `json:"title,omitempty"` + // Uri: URI reference of the chunk. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingChunkWeb) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingChunkWeb + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1GroundingMetadata: Metadata returned to client // when grounding is enabled. type GoogleCloudAiplatformV1beta1GroundingMetadata struct { + // GroundingAttributions: Optional. List of grounding attributions. + GroundingAttributions []*GoogleCloudAiplatformV1beta1GroundingAttribution `json:"groundingAttributions,omitempty"` + // GroundingChunks: List of supporting references retrieved from specified + // grounding source. + GroundingChunks []*GoogleCloudAiplatformV1beta1GroundingChunk `json:"groundingChunks,omitempty"` + // GroundingSupports: Optional. List of grounding support. + GroundingSupports []*GoogleCloudAiplatformV1beta1GroundingSupport `json:"groundingSupports,omitempty"` // RetrievalQueries: Optional. Queries executed by the retrieval tools. RetrievalQueries []string `json:"retrievalQueries,omitempty"` // SearchEntryPoint: Optional. Google search entry for the following-up web @@ -12614,15 +12814,15 @@ type GoogleCloudAiplatformV1beta1GroundingMetadata struct { // WebSearchQueries: Optional. Web search queries for the following-up web // search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` - // ForceSendFields is a list of field names (e.g. "RetrievalQueries") to + // ForceSendFields is a list of field names (e.g. "GroundingAttributions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RetrievalQueries") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "GroundingAttributions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -12632,6 +12832,54 @@ func (s *GoogleCloudAiplatformV1beta1GroundingMetadata) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1GroundingSupport: Grounding support. +type GoogleCloudAiplatformV1beta1GroundingSupport struct { + // ConfidenceScores: Confidence score of the support references. Ranges from 0 + // to 1. 1 is the most confident. This list must have the same size as the + // grounding_chunk_indices. + ConfidenceScores []float64 `json:"confidenceScores,omitempty"` + // GroundingChunkIndices: A list of indices (into 'grounding_chunk') specifying + // the citations associated with the claim. For instance [1,3,4] means that + // grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved + // content attributed to the claim. + GroundingChunkIndices []int64 `json:"groundingChunkIndices,omitempty"` + // Segment: Segment of the content this support belongs to. + Segment *GoogleCloudAiplatformV1beta1Segment `json:"segment,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfidenceScores") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfidenceScores") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1GroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1GroundingSupport + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1GroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1GroundingSupport + var s1 struct { + ConfidenceScores []gensupport.JSONFloat64 `json:"confidenceScores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceScores = make([]float64, len(s1.ConfidenceScores)) + for i := range s1.ConfidenceScores { + s.ConfidenceScores[i] = float64(s1.ConfidenceScores[i]) + } + return nil +} + // GoogleCloudAiplatformV1beta1HyperparameterTuningJob: Represents a // HyperparameterTuningJob. A HyperparameterTuningJob has a Study specification // and multiple CustomJobs with identical CustomJob specification. @@ -16283,6 +16531,16 @@ type GoogleCloudAiplatformV1beta1Model struct { // predictions and explanations as given and returned via // PredictionService.Predict and PredictionService.Explain. PredictSchemata *GoogleCloudAiplatformV1beta1PredictSchemata `json:"predictSchemata,omitempty"` + // SatisfiesPzi: Output only. A read only boolean field reflecting Zone + // Isolation status of the model. It's false by default. Since Model is a type + // ZICY 4.2 resource, the field is an aggregated value of ZI status of its + // underlying dependencies. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. A read only boolean field reflecting ZS status of + // the model. It's false by default. Since Model is a type ZICY 4.2 resource, + // the field is an aggregated value of ZS status of its underlying + // dependencies. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // SupportedDeploymentResourcesTypes: Output only. When this Model is deployed, // its prediction resources are described by the `prediction_resources` field // of the Endpoint.deployed_models object. Because not all Models support all @@ -21762,6 +22020,8 @@ type GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy struct { // DedicatedResources: A description of resources that are dedicated to the // DeployedModel, and that need a higher degree of manual configuration. DedicatedResources *GoogleCloudAiplatformV1beta1DedicatedResources `json:"dedicatedResources,omitempty"` + // DeployMetadata: Optional. Metadata information about this deployment config. + DeployMetadata *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployDeployMetadata `json:"deployMetadata,omitempty"` // DeployTaskName: Optional. The name of the deploy task (e.g., "text to image // generation"). DeployTaskName string `json:"deployTaskName,omitempty"` @@ -21798,6 +22058,30 @@ func (s *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy) MarshalJS return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployDeployMetadata: +// Metadata information about the deployment for managing deployment config. +type GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployDeployMetadata struct { + // Labels: Optional. Labels for the deployment. For managing deployment config + // like verifying, source of deployment config, etc. + Labels map[string]string `json:"labels,omitempty"` + // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Labels") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployDeployMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployDeployMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke: // Configurations for PublisherModel GKE deployment type GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke struct { @@ -23174,9 +23458,6 @@ type GoogleCloudAiplatformV1beta1RagQuery struct { SimilarityTopK int64 `json:"similarityTopK,omitempty"` // Text: Optional. The query in text format to get relevant contexts. Text string `json:"text,omitempty"` - // VectorDistanceThreshold: Optional. Only return contexts with vector distance - // smaller than the threshold. - VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` // ForceSendFields is a list of field names (e.g. "SimilarityTopK") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -23195,20 +23476,6 @@ func (s *GoogleCloudAiplatformV1beta1RagQuery) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudAiplatformV1beta1RagQuery) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1beta1RagQuery - var s1 struct { - VectorDistanceThreshold gensupport.JSONFloat64 `json:"vectorDistanceThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.VectorDistanceThreshold = float64(s1.VectorDistanceThreshold) - return nil -} - // GoogleCloudAiplatformV1beta1RawPredictRequest: Request message for // PredictionService.RawPredict. type GoogleCloudAiplatformV1beta1RawPredictRequest struct { @@ -24502,7 +24769,7 @@ type GoogleCloudAiplatformV1beta1RuntimeConfig struct { // param "name" to be set to "abc". you can set this to something like {"name": // "abc"}. DefaultParams googleapi.RawMessage `json:"defaultParams,omitempty"` - // VertexAiSearchRuntimeConfig: Runtime configuration for Vertext AI Search + // VertexAiSearchRuntimeConfig: Runtime configuration for Vertex AI Search // extension. VertexAiSearchRuntimeConfig *GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig `json:"vertexAiSearchRuntimeConfig,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -31905,6 +32172,37 @@ func (s *GoogleCloudAiplatformV1beta1SearchNearestEntitiesResponse) MarshalJSON( return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Segment: Segment of the content. +type GoogleCloudAiplatformV1beta1Segment struct { + // EndIndex: Output only. End index in the given Part, measured in bytes. + // Offset from the start of the Part, exclusive, starting at zero. + EndIndex int64 `json:"endIndex,omitempty"` + // PartIndex: Output only. The index of a Part object within its parent Content + // object. + PartIndex int64 `json:"partIndex,omitempty"` + // StartIndex: Output only. Start index in the given Part, measured in bytes. + // Offset from the start of the Part, inclusive, starting at zero. + StartIndex int64 `json:"startIndex,omitempty"` + // Text: Output only. The text corresponding to the segment from the response. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1Segment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Segment + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1ServiceAccountSpec: Configuration for the use of // custom service account to run the workloads. type GoogleCloudAiplatformV1beta1ServiceAccountSpec struct { @@ -33830,6 +34128,9 @@ func (s *GoogleCloudAiplatformV1beta1SupervisedTuningDataStats) MarshalJSON() ([ // GoogleCloudAiplatformV1beta1SupervisedTuningDatasetDistribution: Dataset // distribution for Supervised Tuning. type GoogleCloudAiplatformV1beta1SupervisedTuningDatasetDistribution struct { + // BillableSum: Output only. Sum of a given population of values that are + // billable. + BillableSum int64 `json:"billableSum,omitempty,string"` // Buckets: Output only. Defines the histogram bucket. Buckets []*GoogleCloudAiplatformV1beta1SupervisedTuningDatasetDistributionDatasetBucket `json:"buckets,omitempty"` // Max: Output only. The maximum of the population values. @@ -33846,13 +34147,13 @@ type GoogleCloudAiplatformV1beta1SupervisedTuningDatasetDistribution struct { P95 float64 `json:"p95,omitempty"` // Sum: Output only. Sum of a given population of values. Sum int64 `json:"sum,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Buckets") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "BillableSum") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Buckets") to include in API + // NullFields is a list of field names (e.g. "BillableSum") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -34633,19 +34934,21 @@ func (s *GoogleCloudAiplatformV1beta1TimestampSplit) UnmarshalJSON(data []byte) // GoogleCloudAiplatformV1beta1TokensInfo: Tokens info with a list of tokens // and the corresponding list of token ids. type GoogleCloudAiplatformV1beta1TokensInfo struct { + // Role: Optional. Optional fields for the role from the corresponding Content. + Role string `json:"role,omitempty"` // TokenIds: A list of token ids from the input. TokenIds googleapi.Int64s `json:"tokenIds,omitempty"` // Tokens: A list of tokens from the input. Tokens []string `json:"tokens,omitempty"` - // ForceSendFields is a list of field names (e.g. "TokenIds") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Role") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TokenIds") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "Role") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -35636,10 +35939,6 @@ type GoogleCloudAiplatformV1beta1TuningJob struct { // Name: Output only. Identifier. Resource name of a TuningJob. Format: // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` Name string `json:"name,omitempty"` - // PipelineJob: Output only. The resource name of the PipelineJob associated - // with the TuningJob. Format: - // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. - PipelineJob string `json:"pipelineJob,omitempty"` // StartTime: Output only. Time when the TuningJob for the first time entered // the `JOB_STATE_RUNNING` state. StartTime string `json:"startTime,omitempty"` @@ -48993,6 +49292,117 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Pages(ctx context.Con } } +type ProjectsLocationsDeploymentResourcePoolsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1deploymentresourcepool *GoogleCloudAiplatformV1beta1DeploymentResourcePool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a DeploymentResourcePool. +// +// - name: Immutable. The resource name of the DeploymentResourcePool. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Patch(name string, googlecloudaiplatformv1beta1deploymentresourcepool *GoogleCloudAiplatformV1beta1DeploymentResourcePool) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c := &ProjectsLocationsDeploymentResourcePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1deploymentresourcepool = googlecloudaiplatformv1beta1deploymentresourcepool + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The list of +// fields to update. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1deploymentresourcepool) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall struct { s *Service deploymentResourcePool string diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 3d0e4abd34..2365fc0540 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240608", + "revision": "20240618", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2592,14 +2592,14 @@ "properties": { "maxPodsPerNode": { "$ref": "MaxPodsConstraint", - "description": "The maximum number of pods per node which use this pod network" + "description": "The maximum number of pods per node which use this pod network." }, "secondaryPodRange": { - "description": "The name of the secondary range on the subnet which provides IP address for this pod range", + "description": "The name of the secondary range on the subnet which provides IP address for this pod range.", "type": "string" }, "subnetwork": { - "description": "Name of the subnetwork where the additional pod network belongs", + "description": "Name of the subnetwork where the additional pod network belongs.", "type": "string" } }, diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index d1260b61ff..5670b5bb7e 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -361,12 +361,12 @@ func (s *AdditionalNodeNetworkConfig) MarshalJSON() ([]byte, error) { // for additional pod networks within the NodeNetworkConfig message type AdditionalPodNetworkConfig struct { // MaxPodsPerNode: The maximum number of pods per node which use this pod - // network + // network. MaxPodsPerNode *MaxPodsConstraint `json:"maxPodsPerNode,omitempty"` // SecondaryPodRange: The name of the secondary range on the subnet which - // provides IP address for this pod range + // provides IP address for this pod range. SecondaryPodRange string `json:"secondaryPodRange,omitempty"` - // Subnetwork: Name of the subnetwork where the additional pod network belongs + // Subnetwork: Name of the subnetwork where the additional pod network belongs. Subnetwork string `json:"subnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "MaxPodsPerNode") to // unconditionally include in API requests. By default, fields with empty or diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 60244e12df..c59679a4b0 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -5711,7 +5711,7 @@ } } }, - "revision": "20240617", + "revision": "20240701", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6657,6 +6657,14 @@ }, "type": "array" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -8038,7 +8046,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -9663,6 +9671,18 @@ "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" }, + "searchAsYouTypeSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec", + "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." + }, + "session": { + "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "type": "string" + }, + "sessionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestSessionSpec", + "description": "Session specification. Can be used only when `session` is set." + }, "spellCorrectionSpec": { "$ref": "GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec", "description": "The spell correction specification that specifies the mode under which spell correction takes effect." @@ -9885,7 +9905,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec": { - "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. A maximum of 1 DataStoreSpec per data_store is allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec", "properties": { "dataStore": { @@ -10005,6 +10025,43 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec": { + "description": "Specification for search as you type in search requests.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec", + "properties": { + "condition": { + "description": "The condition under which search as you type should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables Search As You Type.", + "Enables Search As You Type." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestSessionSpec": { + "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestSessionSpec", + "properties": { + "queryId": { + "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", + "type": "string" + }, + "searchResultPersistenceCount": { + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec": { "description": "The specification for query spell correction.", "id": "GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec", @@ -10064,6 +10121,10 @@ }, "type": "array" }, + "sessionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1SearchResponseSessionInfo", + "description": "Session information. Only set if SearchRequest.session is provided. See its description for more details." + }, "summary": { "$ref": "GoogleCloudDiscoveryengineV1SearchResponseSummary", "description": "A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set." @@ -10153,6 +10214,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1SearchResponseSessionInfo": { + "description": "Information about the session.", + "id": "GoogleCloudDiscoveryengineV1SearchResponseSessionInfo", + "properties": { + "name": { + "description": "Name of the session. If the auto-session mode is used (when SearchRequest.session ends with \"-\"), this field holds the newly generated session name.", + "type": "string" + }, + "queryId": { + "description": "Query ID that corresponds to this search API call. One session can have multiple turns, each with a unique query ID. By specifying the session name and this query ID in the Answer API call, the answer generation happens in the context of the search results from this search call.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1SearchResponseSummary": { "description": "Summary of the top N search results specified by the summary spec.", "id": "GoogleCloudDiscoveryengineV1SearchResponseSummary", @@ -11177,6 +11253,14 @@ }, "type": "array" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -11532,6 +11616,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel", "properties": { "createTime": { + "deprecated": true, "description": "Timestamp the Model was created at.", "format": "google-datetime", "type": "string" @@ -11540,6 +11625,14 @@ "description": "The display name of the model.", "type": "string" }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, "modelState": { "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", "enum": [ @@ -11548,7 +11641,8 @@ "TRAINING", "TRAINING_COMPLETE", "READY_FOR_SERVING", - "TRAINING_FAILED" + "TRAINING_FAILED", + "NO_IMPROVEMENT" ], "enumDescriptions": [ "Default value.", @@ -11556,7 +11650,8 @@ "The model is currently training.", "The model has successfully completed training.", "The model is ready for serving.", - "The model training failed." + "The model training failed.", + "The model training finished successfully but metrics did not improve." ], "type": "string" }, @@ -11788,7 +11883,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -13636,6 +13731,7 @@ "id": "GoogleCloudDiscoveryengineV1betaCustomTuningModel", "properties": { "createTime": { + "deprecated": true, "description": "Timestamp the Model was created at.", "format": "google-datetime", "type": "string" @@ -13644,6 +13740,14 @@ "description": "The display name of the model.", "type": "string" }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, "modelState": { "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", "enum": [ @@ -13652,7 +13756,8 @@ "TRAINING", "TRAINING_COMPLETE", "READY_FOR_SERVING", - "TRAINING_FAILED" + "TRAINING_FAILED", + "NO_IMPROVEMENT" ], "enumDescriptions": [ "Default value.", @@ -13660,7 +13765,8 @@ "The model is currently training.", "The model has successfully completed training.", "The model is ready for serving.", - "The model training failed." + "The model training failed.", + "The model training finished successfully but metrics did not improve." ], "type": "string" }, @@ -13883,7 +13989,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 6601fa8d24..b362434652 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -2117,6 +2117,11 @@ type GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResult struct // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate document // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + // StructData: Data representation. The structured JSON data for the document. + // It's populated from the struct data from the Document (code pointer: + // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: + // http://shortn/_Ipo6KFFGBL). + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -4071,9 +4076,10 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -6461,6 +6467,30 @@ type GoogleCloudDiscoveryengineV1SearchRequest struct { // SafeSearch: Whether to turn on safe search. This is only supported for // website search. SafeSearch bool `json:"safeSearch,omitempty"` + // SearchAsYouTypeSpec: Search as you type configuration. Only supported for + // the IndustryVertical.MEDIA vertical. + SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // Session: The session resource name. Optional. Session allows users to do + // multi-turn /search API calls or coordination between /search API calls and + // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /search API with + // the session ID generated in the first call. Here, the previous search query + // gets considered in query standing. I.e., if the first query is "How did + // Alphabet do in 2022?" and the current query is "How about 2023?", the + // current query will be interpreted as "How did Alphabet do in 2023?". Example + // #2 (coordination between /search API calls and /answer API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /answer API with + // the session ID generated in the first call. Here, the answer generation + // happens in the context of the search results from the first search call. + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. Multi-turn Search feature is currently at + // private GA stage. Please use v1alpha or v1beta version instead before we + // launch this feature to public GA. Or ask for allowlisting through Google + // Support team. + Session string `json:"session,omitempty"` + // SessionSpec: Session specification. Can be used only when `session` is set. + SessionSpec *GoogleCloudDiscoveryengineV1SearchRequestSessionSpec `json:"sessionSpec,omitempty"` // SpellCorrectionSpec: The spell correction specification that specifies the // mode under which spell correction takes effect. SpellCorrectionSpec *GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` @@ -6882,8 +6912,7 @@ func (s *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecMo // GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec: A struct to define // data stores to filter on in a search call and configurations for those data -// stores. A maximum of 1 DataStoreSpec per data_store is allowed. Otherwise, -// an `INVALID_ARGUMENT` error is returned. +// stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec struct { // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor @@ -7091,6 +7120,76 @@ func (s *GoogleCloudDiscoveryengineV1SearchRequestQueryExpansionSpec) MarshalJSO return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec: Specification +// for search as you type in search requests. +type GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec struct { + // Condition: The condition under which search as you type should occur. + // Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables Search As You Type. + // "ENABLED" - Enables Search As You Type. + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestSearchAsYouTypeSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestSessionSpec: Session specification. +// Multi-turn Search feature is currently at private GA stage. Please use +// v1alpha or v1beta version instead before we launch this feature to public +// GA. Or ask for allowlisting through Google Support team. +type GoogleCloudDiscoveryengineV1SearchRequestSessionSpec struct { + // QueryId: If set, the search result gets stored to the "turn" specified by + // this query ID. Example: Let's say the session looks like this: session { + // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: + // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How + // about bar then?" query_id: ".../questions/zzz" } } } The user can call + // /search API with a request like this: session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } Then, the API stores the + // search result, associated with the last turn. The stored search result can + // be used by a subsequent /answer API call (with the session ID and the query + // ID specified). Also, it is possible to call /search and /answer in parallel + // with the same session ID & query ID. + QueryId string `json:"queryId,omitempty"` + // SearchResultPersistenceCount: The number of top search results to persist. + // The persisted search results can be used for the subsequent /answer api + // call. This field is simliar to the `summary_result_count` field in + // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 + // results for documents mode, or 50 for chunks mode. + SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QueryId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1SearchRequestSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestSessionSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec: The // specification for query spell correction. type GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec struct { @@ -7149,6 +7248,9 @@ type GoogleCloudDiscoveryengineV1SearchResponse struct { RedirectUri string `json:"redirectUri,omitempty"` // Results: A list of matched documents. The order represents the ranking. Results []*GoogleCloudDiscoveryengineV1SearchResponseSearchResult `json:"results,omitempty"` + // SessionInfo: Session information. Only set if SearchRequest.session is + // provided. See its description for more details. + SessionInfo *GoogleCloudDiscoveryengineV1SearchResponseSessionInfo `json:"sessionInfo,omitempty"` // Summary: A summary as part of the search results. This field is only // returned if SearchRequest.ContentSearchSpec.summary_spec is set. Summary *GoogleCloudDiscoveryengineV1SearchResponseSummary `json:"summary,omitempty"` @@ -7288,6 +7390,36 @@ func (s *GoogleCloudDiscoveryengineV1SearchResponseSearchResult) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1SearchResponseSessionInfo: Information about the +// session. +type GoogleCloudDiscoveryengineV1SearchResponseSessionInfo struct { + // Name: Name of the session. If the auto-session mode is used (when + // SearchRequest.session ends with "-"), this field holds the newly generated + // session name. + Name string `json:"name,omitempty"` + // QueryId: Query ID that corresponds to this search API call. One session can + // have multiple turns, each with a unique query ID. By specifying the session + // name and this query ID in the Answer API call, the answer generation happens + // in the context of the search results from this search call. + QueryId string `json:"queryId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1SearchResponseSessionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchResponseSessionInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1SearchResponseSummary: Summary of the top N // search results specified by the summary spec. type GoogleCloudDiscoveryengineV1SearchResponseSummary struct { @@ -8631,6 +8763,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate document // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + // StructData: Data representation. The structured JSON data for the document. + // It's populated from the struct data from the Document (code pointer: + // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: + // http://shortn/_Ipo6KFFGBL). + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -9187,6 +9324,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { CreateTime string `json:"createTime,omitempty"` // DisplayName: The display name of the model. DisplayName string `json:"displayName,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` // ModelState: The state that the model is in (e.g.`TRAINING` or // `TRAINING_FAILED`). // @@ -9197,6 +9336,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. + // "NO_IMPROVEMENT" - The model training finished successfully but metrics + // did not improve. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -9479,9 +9620,10 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -11952,6 +12094,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { CreateTime string `json:"createTime,omitempty"` // DisplayName: The display name of the model. DisplayName string `json:"displayName,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` // ModelState: The state that the model is in (e.g.`TRAINING` or // `TRAINING_FAILED`). // @@ -11962,6 +12106,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. + // "NO_IMPROVEMENT" - The model training finished successfully but metrics + // did not improve. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -12234,9 +12380,10 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 298aa0b6c5..2ab04d510c 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -6761,7 +6761,7 @@ } } }, - "revision": "20240617", + "revision": "20240701", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -7587,7 +7587,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -9285,6 +9285,14 @@ }, "type": "array" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -9684,7 +9692,7 @@ "type": "string" }, "resources": { - "description": "The type needed for the monitored resources: * `discoveryengine.googleapis.com/Branch`. * The labels needed for this resource: * `project_number` * `location_id` * `collection_id` * `datastore_id` * `branch_id` * `discoveryengine.googleapis.com/DataStore` * The labels needed for this resource: * `project_number` * `location_id` * `collection_id` * `datastore_id`", + "description": "The type needed for the monitored resources: * `discoveryengine.googleapis.com/Branch`. * The labels needed for this resource: * `project`_`number` * `location`_`id` * `collection`_`id` * `datastore`_`id` * `branch`_`id` * `discoveryengine.googleapis.com/DataStore` * The labels needed for this resource: * `project`_`number` * `location`_`id` * `collection`_`id` * `datastore`_`id`", "items": { "$ref": "GoogleApiMonitoredResource" }, @@ -10469,6 +10477,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel", "properties": { "createTime": { + "deprecated": true, "description": "Timestamp the Model was created at.", "format": "google-datetime", "type": "string" @@ -10477,6 +10486,14 @@ "description": "The display name of the model.", "type": "string" }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, "modelState": { "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", "enum": [ @@ -10485,7 +10502,8 @@ "TRAINING", "TRAINING_COMPLETE", "READY_FOR_SERVING", - "TRAINING_FAILED" + "TRAINING_FAILED", + "NO_IMPROVEMENT" ], "enumDescriptions": [ "Default value.", @@ -10493,7 +10511,8 @@ "The model is currently training.", "The model has successfully completed training.", "The model is ready for serving.", - "The model training failed." + "The model training failed.", + "The model training finished successfully but metrics did not improve." ], "type": "string" }, @@ -10868,7 +10887,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -13363,7 +13382,7 @@ }, "customFineTuningSpec": { "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", - "description": "Custom fine tuning configs." + "description": "Custom fine tuning configs. If set, it has higher priority than the configs set in ServingConfig.custom_fine_tuning_spec." }, "dataStoreSpecs": { "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", @@ -13395,6 +13414,10 @@ "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate.", "type": "string" }, + "naturalLanguageQueryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "description": "If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional natural language query understanding will be done." + }, "offset": { "description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned.", "format": "int32", @@ -13429,7 +13452,7 @@ "description": "The query expansion specification that specifies the conditions under which query expansion occurs." }, "rankingExpression": { - "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joint by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: `relevance_score`: pre-defined keywords, used for measure relevance between query and document. `embedding_field_path`: the document embedding field used with query embedding vector. `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", + "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", "type": "string" }, "regionCode": { @@ -13462,6 +13485,14 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." }, + "session": { + "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "type": "string" + }, + "sessionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", + "description": "Session specification. Can be used only when `session` is set." + }, "spellCorrectionSpec": { "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", "description": "The spell correction specification that specifies the mode under which spell correction takes effect." @@ -13748,7 +13779,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec": { - "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. A maximum of 1 DataStoreSpec per data_store is allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec", "properties": { "dataStore": { @@ -13876,6 +13907,34 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec": { + "description": "Specification to enable natural language understanding capabilities for search requests.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "properties": { + "filterExtractionCondition": { + "description": "The condition under which filter extraction should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables NL filter extraction.", + "Enables NL filter extraction." + ], + "type": "string" + }, + "geoSearchQueryDetectionFieldNames": { + "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in Servingconfig.geo_search_query_detection_field_names.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec": { "description": "Specification to determine under which conditions query expansion should occur.", "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", @@ -13922,6 +13981,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec": { + "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", + "properties": { + "queryId": { + "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", + "type": "string" + }, + "searchResultPersistenceCount": { + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec": { "description": "The specification for query spell correction.", "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", @@ -13979,6 +14054,10 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult", "description": "Guided search result." }, + "naturalLanguageQueryUnderstandingInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo", + "description": "Natural language query understanding information for the returned results." + }, "nextPageToken": { "description": "A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" @@ -13998,6 +14077,10 @@ }, "type": "array" }, + "sessionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo", + "description": "Session information. Only set if SearchRequest.session is provided. See its description for more details." + }, "summary": { "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", "description": "A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set." @@ -14103,6 +14186,165 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo": { + "description": "Information describing what natural language understanding was done on the input query.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo", + "properties": { + "extractedFilters": { + "description": "The filters that were extracted from the input query.", + "type": "string" + }, + "rewrittenQuery": { + "description": "Rewritten input query minus the extracted filters.", + "type": "string" + }, + "structuredExtractedFilter": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter", + "description": "The filters that were extracted from the input query represented in a structured form." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter": { + "description": "The filters that were extracted from the input query represented in a structured form.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter", + "properties": { + "expression": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression", + "description": "The expression denoting the filter that was extracted from the input query in a structured form. It can be a simple expression denoting a single string, numerical or geolocation constraint or a compound expression which is a combination of multiple expressions connected using logical (OR and AND) operators." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression": { + "description": "Logical `And` operator.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression", + "properties": { + "expressions": { + "description": "The expressions that were ANDed together.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression": { + "description": "The expression denoting the filter that was extracted from the input query.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression", + "properties": { + "andExpr": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression", + "description": "Logical \"And\" compound operator connecting multiple expressions." + }, + "geolocationConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint", + "description": "Geolocation constraint expression." + }, + "numberConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint", + "description": "Numerical constraint expression." + }, + "orExpr": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression", + "description": "Logical \"Or\" compound operator connecting multiple expressions." + }, + "stringConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint", + "description": "String constraint expression." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint": { + "description": "Constraint of a geolocation field. Name of the geolocation field as defined in the schema.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint", + "properties": { + "address": { + "description": "The reference address that was inferred from the input query. The proximity of the reference address to the geolocation field will be used to filter the results.", + "type": "string" + }, + "fieldName": { + "description": "The name of the geolocation field as defined in the schema.", + "type": "string" + }, + "radiusInMeters": { + "description": "The radius in meters around the address. The record is returned if the location of the geolocation field is within the radius.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint": { + "description": "Constraint expression of a number field. Example: price \u003c 100.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint", + "properties": { + "comparison": { + "description": "The comparison operation performed between the field value and the value specified in the constraint.", + "enum": [ + "COMPARISON_UNSPECIFIED", + "EQUALS", + "LESS_THAN_EQUALS", + "LESS_THAN", + "GREATER_THAN_EQUALS", + "GREATER_THAN" + ], + "enumDescriptions": [ + "Undefined comparison operator.", + "Denotes equality `=` operator.", + "Denotes less than or equal to `\u003c=` operator.", + "Denotes less than `\u003c` operator.", + "Denotes greater than or equal to `\u003e=` operator.", + "Denotes greater than `\u003e` operator." + ], + "type": "string" + }, + "fieldName": { + "description": "Name of the numerical field as defined in the schema.", + "type": "string" + }, + "value": { + "description": "The value specified in the numerical constraint.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression": { + "description": "Logical `Or` operator.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression", + "properties": { + "expressions": { + "description": "The expressions that were ORed together.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint": { + "description": "Constraint expression of a string field.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint", + "properties": { + "fieldName": { + "description": "Name of the string field as defined in the schema.", + "type": "string" + }, + "values": { + "description": "Values of the string field. The record will only be returned if the field value matches one of the values specified here.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo": { "description": "Information describing query expansion including whether expansion has occurred.", "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo", @@ -14145,6 +14387,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo": { + "description": "Information about the session.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo", + "properties": { + "name": { + "description": "Name of the session. If the auto-session mode is used (when SearchRequest.session ends with \"-\"), this field holds the newly generated session name.", + "type": "string" + }, + "queryId": { + "description": "Query ID that corresponds to this search API call. One session can have multiple turns, each with a unique query ID. By specifying the session name and this query ID in the Answer API call, the answer generation happens in the context of the search results from this search call.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary": { "description": "Summary of the top N search results specified by the summary spec.", "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", @@ -14341,7 +14598,7 @@ }, "customFineTuningSpec": { "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", - "description": "Custom fine tuning configs." + "description": "Custom fine tuning configs. If SearchRequest.custom_fine_tuning_spec is set, it has higher priority than the configs set here." }, "displayName": { "description": "Required. The human readable serving config display name. Used in Discovery UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", @@ -14404,7 +14661,7 @@ "type": "array" }, "rankingExpression": { - "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: relevance_score: pre-defined keywords, used for measure relevance between query and document. embedding_field_path: the document embedding field used with query embedding vector. dotProduct: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be 0.5 * relevance_score + 0.3 * dotProduct(doc_embedding).", + "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", "type": "string" }, "redirectControlIds": { @@ -15363,6 +15620,7 @@ "id": "GoogleCloudDiscoveryengineV1betaCustomTuningModel", "properties": { "createTime": { + "deprecated": true, "description": "Timestamp the Model was created at.", "format": "google-datetime", "type": "string" @@ -15371,6 +15629,14 @@ "description": "The display name of the model.", "type": "string" }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, "modelState": { "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", "enum": [ @@ -15379,7 +15645,8 @@ "TRAINING", "TRAINING_COMPLETE", "READY_FOR_SERVING", - "TRAINING_FAILED" + "TRAINING_FAILED", + "NO_IMPROVEMENT" ], "enumDescriptions": [ "Default value.", @@ -15387,7 +15654,8 @@ "The model is currently training.", "The model has successfully completed training.", "The model is ready for serving.", - "The model training failed." + "The model training failed.", + "The model training finished successfully but metrics did not improve." ], "type": "string" }, @@ -15610,7 +15878,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 623d676027..35cb4eec66 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -2228,9 +2228,10 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -4485,6 +4486,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate document // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + // StructData: Data representation. The structured JSON data for the document. + // It's populated from the struct data from the Document (code pointer: + // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: + // http://shortn/_Ipo6KFFGBL). + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -5083,10 +5089,11 @@ type GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest struct { RequirementType string `json:"requirementType,omitempty"` // Resources: The type needed for the monitored resources: * // `discoveryengine.googleapis.com/Branch`. * The labels needed for this - // resource: * `project_number` * `location_id` * `collection_id` * - // `datastore_id` * `branch_id` * `discoveryengine.googleapis.com/DataStore` * - // The labels needed for this resource: * `project_number` * `location_id` * - // `collection_id` * `datastore_id` + // resource: * `project`_`number` * `location`_`id` * `collection`_`id` * + // `datastore`_`id` * `branch`_`id` * + // `discoveryengine.googleapis.com/DataStore` * The labels needed for this + // resource: * `project`_`number` * `location`_`id` * `collection`_`id` * + // `datastore`_`id` Resources []*GoogleApiMonitoredResource `json:"resources,omitempty"` // ForceSendFields is a list of field names (e.g. "RequirementType") to // unconditionally include in API requests. By default, fields with empty or @@ -6209,6 +6216,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { CreateTime string `json:"createTime,omitempty"` // DisplayName: The display name of the model. DisplayName string `json:"displayName,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` // ModelState: The state that the model is in (e.g.`TRAINING` or // `TRAINING_FAILED`). // @@ -6219,6 +6228,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. + // "NO_IMPROVEMENT" - The model training finished successfully but metrics + // did not improve. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -6700,9 +6711,10 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -10336,7 +10348,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // ContentSearchSpec: A specification for configuring the behavior of content // search. ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - // CustomFineTuningSpec: Custom fine tuning configs. + // CustomFineTuningSpec: Custom fine tuning configs. If set, it has higher + // priority than the configs set in ServingConfig.custom_fine_tuning_spec. CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` // DataStoreSpecs: Specs defining dataStores to filter on in a search call and // configurations for those dataStores. This is only considered for engines @@ -10375,6 +10388,10 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // better interpret the query. If a value isn't specified, the query language // code is automatically detected, which may not be accurate. LanguageCode string `json:"languageCode,omitempty"` + // NaturalLanguageQueryUnderstandingSpec: If + // `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + // natural language query understanding will be done. + NaturalLanguageQueryUnderstandingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec `json:"naturalLanguageQueryUnderstandingSpec,omitempty"` // Offset: A 0-indexed integer that specifies the current offset (that is, // starting result location, amongst the Documents deemed by the API as // relevant) in search results. This field is only considered if page_token is @@ -10416,13 +10433,13 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { QueryExpansionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` // RankingExpression: The ranking expression controls the customized ranking on // retrieval documents. This overrides ServingConfig.ranking_expression. The - // ranking expression is a single function or multiple functions that are joint - // by "+". * ranking_expression = function, { " + ", function }; Supported - // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: `relevance_score`: + // ranking expression is a single function or multiple functions that are + // joined by "+". * ranking_expression = function, { " + ", function }; + // Supported functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: // pre-defined keywords, used for measure relevance between query and document. - // `embedding_field_path`: the document embedding field used with query - // embedding vector. `dotProduct`: embedding function between + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between // embedding_field_path and query embedding vector. Example ranking expression: // If document has an embedding field doc_embedding, the ranking expression // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. @@ -10451,6 +10468,27 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // SearchAsYouTypeSpec: Search as you type configuration. Only supported for // the IndustryVertical.MEDIA vertical. SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // Session: The session resource name. Optional. Session allows users to do + // multi-turn /search API calls or coordination between /search API calls and + // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /search API with + // the session ID generated in the first call. Here, the previous search query + // gets considered in query standing. I.e., if the first query is "How did + // Alphabet do in 2022?" and the current query is "How about 2023?", the + // current query will be interpreted as "How did Alphabet do in 2023?". Example + // #2 (coordination between /search API calls and /answer API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /answer API with + // the session ID generated in the first call. Here, the answer generation + // happens in the context of the search results from the first search call. + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. Multi-turn Search feature is currently at + // private GA stage. Please use v1alpha or v1beta version instead before we + // launch this feature to public GA. Or ask for allowlisting through Google + // Support team. + Session string `json:"session,omitempty"` + // SessionSpec: Session specification. Can be used only when `session` is set. + SessionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec `json:"sessionSpec,omitempty"` // SpellCorrectionSpec: The spell correction specification that specifies the // mode under which spell correction takes effect. SpellCorrectionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` @@ -10976,8 +11014,7 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummaryS // GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec: A struct to // define data stores to filter on in a search call and configurations for -// those data stores. A maximum of 1 DataStoreSpec per data_store is allowed. -// Otherwise, an `INVALID_ARGUMENT` error is returned. +// those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor @@ -11216,6 +11253,42 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandi +// ngSpec: Specification to enable natural language understanding capabilities +// for search requests. +type GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec struct { + // FilterExtractionCondition: The condition under which filter extraction + // should occur. Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables NL filter extraction. + // "ENABLED" - Enables NL filter extraction. + FilterExtractionCondition string `json:"filterExtractionCondition,omitempty"` + // GeoSearchQueryDetectionFieldNames: Field names used for location-based + // filtering, where geolocation filters are detected in natural language search + // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. + // If this field is set, it overrides the field names set in + // Servingconfig.geo_search_query_detection_field_names. + GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FilterExtractionCondition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec: // Specification to determine under which conditions query expansion should // occur. @@ -11281,6 +11354,47 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec) Mars return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec: Session +// specification. Multi-turn Search feature is currently at private GA stage. +// Please use v1alpha or v1beta version instead before we launch this feature +// to public GA. Or ask for allowlisting through Google Support team. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec struct { + // QueryId: If set, the search result gets stored to the "turn" specified by + // this query ID. Example: Let's say the session looks like this: session { + // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: + // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How + // about bar then?" query_id: ".../questions/zzz" } } } The user can call + // /search API with a request like this: session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } Then, the API stores the + // search result, associated with the last turn. The stored search result can + // be used by a subsequent /answer API call (with the session ID and the query + // ID specified). Also, it is possible to call /search and /answer in parallel + // with the same session ID & query ID. + QueryId string `json:"queryId,omitempty"` + // SearchResultPersistenceCount: The number of top search results to persist. + // The persisted search results can be used for the subsequent /answer api + // call. This field is simliar to the `summary_result_count` field in + // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 + // results for documents mode, or 50 for chunks mode. + SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QueryId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec: The // specification for query spell correction. type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { @@ -11332,6 +11446,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponse struct { GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` // GuidedSearchResult: Guided search result. GuidedSearchResult *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` + // NaturalLanguageQueryUnderstandingInfo: Natural language query understanding + // information for the returned results. + NaturalLanguageQueryUnderstandingInfo *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo `json:"naturalLanguageQueryUnderstandingInfo,omitempty"` // NextPageToken: A token that can be sent as SearchRequest.page_token to // retrieve the next page. If this field is omitted, there are no subsequent // pages. @@ -11344,6 +11461,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponse struct { RedirectUri string `json:"redirectUri,omitempty"` // Results: A list of matched documents. The order represents the ranking. Results []*GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult `json:"results,omitempty"` + // SessionInfo: Session information. Only set if SearchRequest.session is + // provided. See its description for more details. + SessionInfo *GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo `json:"sessionInfo,omitempty"` // Summary: A summary as part of the search results. This field is only // returned if SearchRequest.ContentSearchSpec.summary_spec is set. Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` @@ -11507,6 +11627,264 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefine return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstand +// ingInfo: Information describing what natural language understanding was done +// on the input query. +type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo struct { + // ExtractedFilters: The filters that were extracted from the input query. + ExtractedFilters string `json:"extractedFilters,omitempty"` + // RewrittenQuery: Rewritten input query minus the extracted filters. + RewrittenQuery string `json:"rewrittenQuery,omitempty"` + // StructuredExtractedFilter: The filters that were extracted from the input + // query represented in a structured form. + StructuredExtractedFilter *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter `json:"structuredExtractedFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExtractedFilters") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExtractedFilters") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstand +// ingInfoStructuredExtractedFilter: The filters that were extracted from the +// input query represented in a structured form. +type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter struct { + // Expression: The expression denoting the filter that was extracted from the + // input query in a structured form. It can be a simple expression denoting a + // single string, numerical or geolocation constraint or a compound expression + // which is a combination of multiple expressions connected using logical (OR + // and AND) operators. + Expression *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expression,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expression") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Expression") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstand +// ingInfoStructuredExtractedFilterAndExpression: Logical `And` operator. +type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression struct { + // Expressions: The expressions that were ANDed together. + Expressions []*GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expressions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expressions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Expressions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstand +// ingInfoStructuredExtractedFilterExpression: The expression denoting the +// filter that was extracted from the input query. +type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression struct { + // AndExpr: Logical "And" compound operator connecting multiple expressions. + AndExpr *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression `json:"andExpr,omitempty"` + // GeolocationConstraint: Geolocation constraint expression. + GeolocationConstraint *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint `json:"geolocationConstraint,omitempty"` + // NumberConstraint: Numerical constraint expression. + NumberConstraint *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint `json:"numberConstraint,omitempty"` + // OrExpr: Logical "Or" compound operator connecting multiple expressions. + OrExpr *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression `json:"orExpr,omitempty"` + // StringConstraint: String constraint expression. + StringConstraint *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint `json:"stringConstraint,omitempty"` + // ForceSendFields is a list of field names (e.g. "AndExpr") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AndExpr") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstand +// ingInfoStructuredExtractedFilterGeolocationConstraint: Constraint of a +// geolocation field. Name of the geolocation field as defined in the schema. +type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint struct { + // Address: The reference address that was inferred from the input query. The + // proximity of the reference address to the geolocation field will be used to + // filter the results. + Address string `json:"address,omitempty"` + // FieldName: The name of the geolocation field as defined in the schema. + FieldName string `json:"fieldName,omitempty"` + // RadiusInMeters: The radius in meters around the address. The record is + // returned if the location of the geolocation field is within the radius. + RadiusInMeters float64 `json:"radiusInMeters,omitempty"` + // ForceSendFields is a list of field names (e.g. "Address") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Address") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint + var s1 struct { + RadiusInMeters gensupport.JSONFloat64 `json:"radiusInMeters"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RadiusInMeters = float64(s1.RadiusInMeters) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstand +// ingInfoStructuredExtractedFilterNumberConstraint: Constraint expression of a +// number field. Example: price < 100. +type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint struct { + // Comparison: The comparison operation performed between the field value and + // the value specified in the constraint. + // + // Possible values: + // "COMPARISON_UNSPECIFIED" - Undefined comparison operator. + // "EQUALS" - Denotes equality `=` operator. + // "LESS_THAN_EQUALS" - Denotes less than or equal to `<=` operator. + // "LESS_THAN" - Denotes less than `<` operator. + // "GREATER_THAN_EQUALS" - Denotes greater than or equal to `>=` operator. + // "GREATER_THAN" - Denotes greater than `>` operator. + Comparison string `json:"comparison,omitempty"` + // FieldName: Name of the numerical field as defined in the schema. + FieldName string `json:"fieldName,omitempty"` + // Value: The value specified in the numerical constraint. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Comparison") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Comparison") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstand +// ingInfoStructuredExtractedFilterOrExpression: Logical `Or` operator. +type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression struct { + // Expressions: The expressions that were ORed together. + Expressions []*GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expressions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expressions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Expressions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstand +// ingInfoStructuredExtractedFilterStringConstraint: Constraint expression of a +// string field. +type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint struct { + // FieldName: Name of the string field as defined in the schema. + FieldName string `json:"fieldName,omitempty"` + // Values: Values of the string field. The record will only be returned if the + // field value matches one of the values specified here. + Values []string `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FieldName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo: // Information describing query expansion including whether expansion has // occurred. @@ -11566,6 +11944,36 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult) MarshalJSO return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo: Information +// about the session. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo struct { + // Name: Name of the session. If the auto-session mode is used (when + // SearchRequest.session ends with "-"), this field holds the newly generated + // session name. + Name string `json:"name,omitempty"` + // QueryId: Query ID that corresponds to this search API call. One session can + // have multiple turns, each with a unique query ID. By specifying the session + // name and this query ID in the Answer API call, the answer generation happens + // in the context of the search results from this search call. + QueryId string `json:"queryId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSearchResponseSummary: Summary of the top N // search results specified by the summary spec. type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { @@ -11829,7 +12237,9 @@ type GoogleCloudDiscoveryengineV1alphaServingConfig struct { BoostControlIds []string `json:"boostControlIds,omitempty"` // CreateTime: Output only. ServingConfig created timestamp. CreateTime string `json:"createTime,omitempty"` - // CustomFineTuningSpec: Custom fine tuning configs. + // CustomFineTuningSpec: Custom fine tuning configs. If + // SearchRequest.custom_fine_tuning_spec is set, it has higher priority than + // the configs set here. CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` // DisplayName: Required. The human readable serving config display name. Used // in Discovery UI. This field must be a UTF-8 encoded string with a length @@ -11891,13 +12301,13 @@ type GoogleCloudDiscoveryengineV1alphaServingConfig struct { // expression is a single function or multiple functions that are joined by // "+". * ranking_expression = function, { " + ", function }; Supported // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: relevance_score: + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: // pre-defined keywords, used for measure relevance between query and document. - // embedding_field_path: the document embedding field used with query embedding - // vector. dotProduct: embedding function between embedding_field_path and - // query embedding vector. Example ranking expression: If document has an - // embedding field doc_embedding, the ranking expression could be 0.5 * - // relevance_score + 0.3 * dotProduct(doc_embedding). + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between + // embedding_field_path and query embedding vector. Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. RankingExpression string `json:"rankingExpression,omitempty"` // RedirectControlIds: IDs of the redirect controls. Only the first triggered // redirect action is applied, even if multiple apply. Maximum number of @@ -13311,6 +13721,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { CreateTime string `json:"createTime,omitempty"` // DisplayName: The display name of the model. DisplayName string `json:"displayName,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` // ModelState: The state that the model is in (e.g.`TRAINING` or // `TRAINING_FAILED`). // @@ -13321,6 +13733,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. + // "NO_IMPROVEMENT" - The model training finished successfully but metrics + // did not improve. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -13593,9 +14007,10 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index d234012075..cbedc6d4a9 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -5822,6 +5822,39 @@ } } }, + "evaluations": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.evaluations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "groundingConfigs": { "methods": { "check": { @@ -5956,6 +5989,39 @@ } } }, + "sampleQuerySets": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "userEvents": { "methods": { "collect": { @@ -6109,7 +6175,7 @@ } } }, - "revision": "20240617", + "revision": "20240701", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6749,7 +6815,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -8020,6 +8086,14 @@ }, "type": "array" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -8375,6 +8449,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel", "properties": { "createTime": { + "deprecated": true, "description": "Timestamp the Model was created at.", "format": "google-datetime", "type": "string" @@ -8383,6 +8458,14 @@ "description": "The display name of the model.", "type": "string" }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, "modelState": { "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", "enum": [ @@ -8391,7 +8474,8 @@ "TRAINING", "TRAINING_COMPLETE", "READY_FOR_SERVING", - "TRAINING_FAILED" + "TRAINING_FAILED", + "NO_IMPROVEMENT" ], "enumDescriptions": [ "Default value.", @@ -8399,7 +8483,8 @@ "The model is currently training.", "The model has successfully completed training.", "The model is ready for serving.", - "The model training failed." + "The model training failed.", + "The model training finished successfully but metrics did not improve." ], "type": "string" }, @@ -8631,7 +8716,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -10983,6 +11068,14 @@ }, "type": "array" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -12067,6 +12160,7 @@ "id": "GoogleCloudDiscoveryengineV1betaCustomTuningModel", "properties": { "createTime": { + "deprecated": true, "description": "Timestamp the Model was created at.", "format": "google-datetime", "type": "string" @@ -12075,6 +12169,14 @@ "description": "The display name of the model.", "type": "string" }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, "modelState": { "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", "enum": [ @@ -12083,7 +12185,8 @@ "TRAINING", "TRAINING_COMPLETE", "READY_FOR_SERVING", - "TRAINING_FAILED" + "TRAINING_FAILED", + "NO_IMPROVEMENT" ], "enumDescriptions": [ "Default value.", @@ -12091,7 +12194,8 @@ "The model is currently training.", "The model has successfully completed training.", "The model is ready for serving.", - "The model training failed." + "The model training failed.", + "The model training finished successfully but metrics did not improve." ], "type": "string" }, @@ -12425,7 +12529,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -14117,6 +14221,10 @@ "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate.", "type": "string" }, + "naturalLanguageQueryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "description": "If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional natural language query understanding will be done." + }, "offset": { "description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned.", "format": "int32", @@ -14151,7 +14259,7 @@ "description": "The query expansion specification that specifies the conditions under which query expansion occurs." }, "rankingExpression": { - "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joint by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: `relevance_score`: pre-defined keywords, used for measure relevance between query and document. `embedding_field_path`: the document embedding field used with query embedding vector. `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", + "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", "type": "string" }, "regionCode": { @@ -14162,6 +14270,18 @@ "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" }, + "searchAsYouTypeSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec", + "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." + }, + "session": { + "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "type": "string" + }, + "sessionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec", + "description": "Session specification. Can be used only when `session` is set." + }, "spellCorrectionSpec": { "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec", "description": "The spell correction specification that specifies the mode under which spell correction takes effect." @@ -14448,7 +14568,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec": { - "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. A maximum of 1 DataStoreSpec per data_store is allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec", "properties": { "dataStore": { @@ -14576,6 +14696,34 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec": { + "description": "Specification to enable natural language understanding capabilities for search requests.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "properties": { + "filterExtractionCondition": { + "description": "The condition under which filter extraction should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables NL filter extraction.", + "Enables NL filter extraction." + ], + "type": "string" + }, + "geoSearchQueryDetectionFieldNames": { + "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in Servingconfig.geo_search_query_detection_field_names.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec": { "description": "Specification to determine under which conditions query expansion should occur.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec", @@ -14601,6 +14749,43 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec": { + "description": "Specification for search as you type in search requests.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec", + "properties": { + "condition": { + "description": "The condition under which search as you type should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables Search As You Type.", + "Enables Search As You Type." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec": { + "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec", + "properties": { + "queryId": { + "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", + "type": "string" + }, + "searchResultPersistenceCount": { + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec": { "description": "The specification for query spell correction.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec", @@ -14658,6 +14843,10 @@ "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult", "description": "Guided search result." }, + "naturalLanguageQueryUnderstandingInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo", + "description": "Natural language query understanding information for the returned results." + }, "nextPageToken": { "description": "A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" @@ -14677,6 +14866,10 @@ }, "type": "array" }, + "sessionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo", + "description": "Session information. Only set if SearchRequest.session is provided. See its description for more details." + }, "summary": { "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseSummary", "description": "A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set." @@ -14782,6 +14975,165 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo": { + "description": "Information describing what natural language understanding was done on the input query.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo", + "properties": { + "extractedFilters": { + "description": "The filters that were extracted from the input query.", + "type": "string" + }, + "rewrittenQuery": { + "description": "Rewritten input query minus the extracted filters.", + "type": "string" + }, + "structuredExtractedFilter": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter", + "description": "The filters that were extracted from the input query represented in a structured form." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter": { + "description": "The filters that were extracted from the input query represented in a structured form.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter", + "properties": { + "expression": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression", + "description": "The expression denoting the filter that was extracted from the input query in a structured form. It can be a simple expression denoting a single string, numerical or geolocation constraint or a compound expression which is a combination of multiple expressions connected using logical (OR and AND) operators." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression": { + "description": "Logical `And` operator.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression", + "properties": { + "expressions": { + "description": "The expressions that were ANDed together.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression": { + "description": "The expression denoting the filter that was extracted from the input query.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression", + "properties": { + "andExpr": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression", + "description": "Logical \"And\" compound operator connecting multiple expressions." + }, + "geolocationConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint", + "description": "Geolocation constraint expression." + }, + "numberConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint", + "description": "Numerical constraint expression." + }, + "orExpr": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression", + "description": "Logical \"Or\" compound operator connecting multiple expressions." + }, + "stringConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint", + "description": "String constraint expression." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint": { + "description": "Constraint of a geolocation field. Name of the geolocation field as defined in the schema.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint", + "properties": { + "address": { + "description": "The reference address that was inferred from the input query. The proximity of the reference address to the geolocation field will be used to filter the results.", + "type": "string" + }, + "fieldName": { + "description": "The name of the geolocation field as defined in the schema.", + "type": "string" + }, + "radiusInMeters": { + "description": "The radius in meters around the address. The record is returned if the location of the geolocation field is within the radius.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint": { + "description": "Constraint expression of a number field. Example: price \u003c 100.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint", + "properties": { + "comparison": { + "description": "The comparison operation performed between the field value and the value specified in the constraint.", + "enum": [ + "COMPARISON_UNSPECIFIED", + "EQUALS", + "LESS_THAN_EQUALS", + "LESS_THAN", + "GREATER_THAN_EQUALS", + "GREATER_THAN" + ], + "enumDescriptions": [ + "Undefined comparison operator.", + "Denotes equality `=` operator.", + "Denotes less than or equal to `\u003c=` operator.", + "Denotes less than `\u003c` operator.", + "Denotes greater than or equal to `\u003e=` operator.", + "Denotes greater than `\u003e` operator." + ], + "type": "string" + }, + "fieldName": { + "description": "Name of the numerical field as defined in the schema.", + "type": "string" + }, + "value": { + "description": "The value specified in the numerical constraint.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression": { + "description": "Logical `Or` operator.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression", + "properties": { + "expressions": { + "description": "The expressions that were ORed together.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint": { + "description": "Constraint expression of a string field.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint", + "properties": { + "fieldName": { + "description": "Name of the string field as defined in the schema.", + "type": "string" + }, + "values": { + "description": "Values of the string field. The record will only be returned if the field value matches one of the values specified here.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo": { "description": "Information describing query expansion including whether expansion has occurred.", "id": "GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo", @@ -14824,6 +15176,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo": { + "description": "Information about the session.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo", + "properties": { + "name": { + "description": "Name of the session. If the auto-session mode is used (when SearchRequest.session ends with \"-\"), this field holds the newly generated session name.", + "type": "string" + }, + "queryId": { + "description": "Query ID that corresponds to this search API call. One session can have multiple turns, each with a unique query ID. By specifying the session name and this query ID in the Answer API call, the answer generation happens in the context of the search results from this search call.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSearchResponseSummary": { "description": "Summary of the top N search results specified by the summary spec.", "id": "GoogleCloudDiscoveryengineV1betaSearchResponseSummary", @@ -15075,7 +15442,7 @@ "type": "array" }, "rankingExpression": { - "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: relevance_score: pre-defined keywords, used for measure relevance between query and document. embedding_field_path: the document embedding field used with query embedding vector. dotProduct: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be 0.5 * relevance_score + 0.3 * dotProduct(doc_embedding).", + "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", "type": "string" }, "redirectControlIds": { diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 1680ab6f21..e21dec7922 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -173,9 +173,11 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Collections = NewProjectsLocationsCollectionsService(s) rs.DataStores = NewProjectsLocationsDataStoresService(s) + rs.Evaluations = NewProjectsLocationsEvaluationsService(s) rs.GroundingConfigs = NewProjectsLocationsGroundingConfigsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.RankingConfigs = NewProjectsLocationsRankingConfigsService(s) + rs.SampleQuerySets = NewProjectsLocationsSampleQuerySetsService(s) rs.UserEvents = NewProjectsLocationsUserEventsService(s) return rs } @@ -187,12 +189,16 @@ type ProjectsLocationsService struct { DataStores *ProjectsLocationsDataStoresService + Evaluations *ProjectsLocationsEvaluationsService + GroundingConfigs *ProjectsLocationsGroundingConfigsService Operations *ProjectsLocationsOperationsService RankingConfigs *ProjectsLocationsRankingConfigsService + SampleQuerySets *ProjectsLocationsSampleQuerySetsService + UserEvents *ProjectsLocationsUserEventsService } @@ -802,6 +808,27 @@ type ProjectsLocationsDataStoresUserEventsService struct { s *Service } +func NewProjectsLocationsEvaluationsService(s *Service) *ProjectsLocationsEvaluationsService { + rs := &ProjectsLocationsEvaluationsService{s: s} + rs.Operations = NewProjectsLocationsEvaluationsOperationsService(s) + return rs +} + +type ProjectsLocationsEvaluationsService struct { + s *Service + + Operations *ProjectsLocationsEvaluationsOperationsService +} + +func NewProjectsLocationsEvaluationsOperationsService(s *Service) *ProjectsLocationsEvaluationsOperationsService { + rs := &ProjectsLocationsEvaluationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsEvaluationsOperationsService struct { + s *Service +} + func NewProjectsLocationsGroundingConfigsService(s *Service) *ProjectsLocationsGroundingConfigsService { rs := &ProjectsLocationsGroundingConfigsService{s: s} return rs @@ -829,6 +856,27 @@ type ProjectsLocationsRankingConfigsService struct { s *Service } +func NewProjectsLocationsSampleQuerySetsService(s *Service) *ProjectsLocationsSampleQuerySetsService { + rs := &ProjectsLocationsSampleQuerySetsService{s: s} + rs.Operations = NewProjectsLocationsSampleQuerySetsOperationsService(s) + return rs +} + +type ProjectsLocationsSampleQuerySetsService struct { + s *Service + + Operations *ProjectsLocationsSampleQuerySetsOperationsService +} + +func NewProjectsLocationsSampleQuerySetsOperationsService(s *Service) *ProjectsLocationsSampleQuerySetsOperationsService { + rs := &ProjectsLocationsSampleQuerySetsOperationsService{s: s} + return rs +} + +type ProjectsLocationsSampleQuerySetsOperationsService struct { + s *Service +} + func NewProjectsLocationsUserEventsService(s *Service) *ProjectsLocationsUserEventsService { rs := &ProjectsLocationsUserEventsService{s: s} return rs @@ -1755,9 +1803,10 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -3360,6 +3409,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate document // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + // StructData: Data representation. The structured JSON data for the document. + // It's populated from the struct data from the Document (code pointer: + // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: + // http://shortn/_Ipo6KFFGBL). + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -3916,6 +3970,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { CreateTime string `json:"createTime,omitempty"` // DisplayName: The display name of the model. DisplayName string `json:"displayName,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` // ModelState: The state that the model is in (e.g.`TRAINING` or // `TRAINING_FAILED`). // @@ -3926,6 +3982,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. + // "NO_IMPROVEMENT" - The model training finished successfully but metrics + // did not improve. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -4208,9 +4266,10 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -7296,6 +7355,11 @@ type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult str // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate document // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + // StructData: Data representation. The structured JSON data for the document. + // It's populated from the struct data from the Document (code pointer: + // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: + // http://shortn/_Ipo6KFFGBL). + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -8875,6 +8939,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { CreateTime string `json:"createTime,omitempty"` // DisplayName: The display name of the model. DisplayName string `json:"displayName,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` // ModelState: The state that the model is in (e.g.`TRAINING` or // `TRAINING_FAILED`). // @@ -8885,6 +8951,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. + // "NO_IMPROVEMENT" - The model training finished successfully but metrics + // did not improve. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -9299,9 +9367,10 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { // configuration based on the file type. Supported keys: * `pdf`: Override // parsing config for PDF files, either digital parsing, ocr parsing or layout // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and or layout parsing are supported. * `docx`: Override - // parsing config for DOCX files, only digital parsing and or layout parsing - // are supported. + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -11798,6 +11867,10 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // better interpret the query. If a value isn't specified, the query language // code is automatically detected, which may not be accurate. LanguageCode string `json:"languageCode,omitempty"` + // NaturalLanguageQueryUnderstandingSpec: If + // `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + // natural language query understanding will be done. + NaturalLanguageQueryUnderstandingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec `json:"naturalLanguageQueryUnderstandingSpec,omitempty"` // Offset: A 0-indexed integer that specifies the current offset (that is, // starting result location, amongst the Documents deemed by the API as // relevant) in search results. This field is only considered if page_token is @@ -11839,13 +11912,13 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { QueryExpansionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` // RankingExpression: The ranking expression controls the customized ranking on // retrieval documents. This overrides ServingConfig.ranking_expression. The - // ranking expression is a single function or multiple functions that are joint - // by "+". * ranking_expression = function, { " + ", function }; Supported - // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: `relevance_score`: + // ranking expression is a single function or multiple functions that are + // joined by "+". * ranking_expression = function, { " + ", function }; + // Supported functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: // pre-defined keywords, used for measure relevance between query and document. - // `embedding_field_path`: the document embedding field used with query - // embedding vector. `dotProduct`: embedding function between + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between // embedding_field_path and query embedding vector. Example ranking expression: // If document has an embedding field doc_embedding, the ranking expression // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. @@ -11858,6 +11931,30 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // SafeSearch: Whether to turn on safe search. This is only supported for // website search. SafeSearch bool `json:"safeSearch,omitempty"` + // SearchAsYouTypeSpec: Search as you type configuration. Only supported for + // the IndustryVertical.MEDIA vertical. + SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // Session: The session resource name. Optional. Session allows users to do + // multi-turn /search API calls or coordination between /search API calls and + // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /search API with + // the session ID generated in the first call. Here, the previous search query + // gets considered in query standing. I.e., if the first query is "How did + // Alphabet do in 2022?" and the current query is "How about 2023?", the + // current query will be interpreted as "How did Alphabet do in 2023?". Example + // #2 (coordination between /search API calls and /answer API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /answer API with + // the session ID generated in the first call. Here, the answer generation + // happens in the context of the search results from the first search call. + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. Multi-turn Search feature is currently at + // private GA stage. Please use v1alpha or v1beta version instead before we + // launch this feature to public GA. Or ask for allowlisting through Google + // Support team. + Session string `json:"session,omitempty"` + // SessionSpec: Session specification. Can be used only when `session` is set. + SessionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec `json:"sessionSpec,omitempty"` // SpellCorrectionSpec: The spell correction specification that specifies the // mode under which spell correction takes effect. SpellCorrectionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` @@ -12383,8 +12480,7 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySp // GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec: A struct to // define data stores to filter on in a search call and configurations for -// those data stores. A maximum of 1 DataStoreSpec per data_store is allowed. -// Otherwise, an `INVALID_ARGUMENT` error is returned. +// those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor @@ -12623,6 +12719,42 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandin +// gSpec: Specification to enable natural language understanding capabilities +// for search requests. +type GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec struct { + // FilterExtractionCondition: The condition under which filter extraction + // should occur. Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables NL filter extraction. + // "ENABLED" - Enables NL filter extraction. + FilterExtractionCondition string `json:"filterExtractionCondition,omitempty"` + // GeoSearchQueryDetectionFieldNames: Field names used for location-based + // filtering, where geolocation filters are detected in natural language search + // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. + // If this field is set, it overrides the field names set in + // Servingconfig.geo_search_query_detection_field_names. + GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FilterExtractionCondition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec: // Specification to determine under which conditions query expansion should // occur. @@ -12659,6 +12791,76 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec) Marsha return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec: +// Specification for search as you type in search requests. +type GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec struct { + // Condition: The condition under which search as you type should occur. + // Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables Search As You Type. + // "ENABLED" - Enables Search As You Type. + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec: Session +// specification. Multi-turn Search feature is currently at private GA stage. +// Please use v1alpha or v1beta version instead before we launch this feature +// to public GA. Or ask for allowlisting through Google Support team. +type GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec struct { + // QueryId: If set, the search result gets stored to the "turn" specified by + // this query ID. Example: Let's say the session looks like this: session { + // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: + // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How + // about bar then?" query_id: ".../questions/zzz" } } } The user can call + // /search API with a request like this: session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } Then, the API stores the + // search result, associated with the last turn. The stored search result can + // be used by a subsequent /answer API call (with the session ID and the query + // ID specified). Also, it is possible to call /search and /answer in parallel + // with the same session ID & query ID. + QueryId string `json:"queryId,omitempty"` + // SearchResultPersistenceCount: The number of top search results to persist. + // The persisted search results can be used for the subsequent /answer api + // call. This field is simliar to the `summary_result_count` field in + // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 + // results for documents mode, or 50 for chunks mode. + SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QueryId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec: The // specification for query spell correction. type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { @@ -12710,6 +12912,9 @@ type GoogleCloudDiscoveryengineV1betaSearchResponse struct { GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` // GuidedSearchResult: Guided search result. GuidedSearchResult *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` + // NaturalLanguageQueryUnderstandingInfo: Natural language query understanding + // information for the returned results. + NaturalLanguageQueryUnderstandingInfo *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo `json:"naturalLanguageQueryUnderstandingInfo,omitempty"` // NextPageToken: A token that can be sent as SearchRequest.page_token to // retrieve the next page. If this field is omitted, there are no subsequent // pages. @@ -12722,6 +12927,9 @@ type GoogleCloudDiscoveryengineV1betaSearchResponse struct { RedirectUri string `json:"redirectUri,omitempty"` // Results: A list of matched documents. The order represents the ranking. Results []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"results,omitempty"` + // SessionInfo: Session information. Only set if SearchRequest.session is + // provided. See its description for more details. + SessionInfo *GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo `json:"sessionInfo,omitempty"` // Summary: A summary as part of the search results. This field is only // returned if SearchRequest.ContentSearchSpec.summary_spec is set. Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` @@ -12885,6 +13093,264 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinem return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfo: Information describing what natural language understanding was done +// on the input query. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo struct { + // ExtractedFilters: The filters that were extracted from the input query. + ExtractedFilters string `json:"extractedFilters,omitempty"` + // RewrittenQuery: Rewritten input query minus the extracted filters. + RewrittenQuery string `json:"rewrittenQuery,omitempty"` + // StructuredExtractedFilter: The filters that were extracted from the input + // query represented in a structured form. + StructuredExtractedFilter *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter `json:"structuredExtractedFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExtractedFilters") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExtractedFilters") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilter: The filters that were extracted from the +// input query represented in a structured form. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter struct { + // Expression: The expression denoting the filter that was extracted from the + // input query in a structured form. It can be a simple expression denoting a + // single string, numerical or geolocation constraint or a compound expression + // which is a combination of multiple expressions connected using logical (OR + // and AND) operators. + Expression *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expression,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expression") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Expression") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterAndExpression: Logical `And` operator. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression struct { + // Expressions: The expressions that were ANDed together. + Expressions []*GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expressions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expressions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Expressions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterExpression: The expression denoting the +// filter that was extracted from the input query. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression struct { + // AndExpr: Logical "And" compound operator connecting multiple expressions. + AndExpr *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression `json:"andExpr,omitempty"` + // GeolocationConstraint: Geolocation constraint expression. + GeolocationConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint `json:"geolocationConstraint,omitempty"` + // NumberConstraint: Numerical constraint expression. + NumberConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint `json:"numberConstraint,omitempty"` + // OrExpr: Logical "Or" compound operator connecting multiple expressions. + OrExpr *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression `json:"orExpr,omitempty"` + // StringConstraint: String constraint expression. + StringConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint `json:"stringConstraint,omitempty"` + // ForceSendFields is a list of field names (e.g. "AndExpr") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AndExpr") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterGeolocationConstraint: Constraint of a +// geolocation field. Name of the geolocation field as defined in the schema. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint struct { + // Address: The reference address that was inferred from the input query. The + // proximity of the reference address to the geolocation field will be used to + // filter the results. + Address string `json:"address,omitempty"` + // FieldName: The name of the geolocation field as defined in the schema. + FieldName string `json:"fieldName,omitempty"` + // RadiusInMeters: The radius in meters around the address. The record is + // returned if the location of the geolocation field is within the radius. + RadiusInMeters float64 `json:"radiusInMeters,omitempty"` + // ForceSendFields is a list of field names (e.g. "Address") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Address") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint + var s1 struct { + RadiusInMeters gensupport.JSONFloat64 `json:"radiusInMeters"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RadiusInMeters = float64(s1.RadiusInMeters) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterNumberConstraint: Constraint expression of a +// number field. Example: price < 100. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint struct { + // Comparison: The comparison operation performed between the field value and + // the value specified in the constraint. + // + // Possible values: + // "COMPARISON_UNSPECIFIED" - Undefined comparison operator. + // "EQUALS" - Denotes equality `=` operator. + // "LESS_THAN_EQUALS" - Denotes less than or equal to `<=` operator. + // "LESS_THAN" - Denotes less than `<` operator. + // "GREATER_THAN_EQUALS" - Denotes greater than or equal to `>=` operator. + // "GREATER_THAN" - Denotes greater than `>` operator. + Comparison string `json:"comparison,omitempty"` + // FieldName: Name of the numerical field as defined in the schema. + FieldName string `json:"fieldName,omitempty"` + // Value: The value specified in the numerical constraint. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Comparison") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Comparison") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterOrExpression: Logical `Or` operator. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression struct { + // Expressions: The expressions that were ORed together. + Expressions []*GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expressions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expressions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Expressions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterStringConstraint: Constraint expression of a +// string field. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint struct { + // FieldName: Name of the string field as defined in the schema. + FieldName string `json:"fieldName,omitempty"` + // Values: Values of the string field. The record will only be returned if the + // field value matches one of the values specified here. + Values []string `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FieldName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo: // Information describing query expansion including whether expansion has // occurred. @@ -12944,6 +13410,36 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult) MarshalJSON return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo: Information about +// the session. +type GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo struct { + // Name: Name of the session. If the auto-session mode is used (when + // SearchRequest.session ends with "-"), this field holds the newly generated + // session name. + Name string `json:"name,omitempty"` + // QueryId: Query ID that corresponds to this search API call. One session can + // have multiple turns, each with a unique query ID. By specifying the session + // name and this query ID in the Answer API call, the answer generation happens + // in the context of the search results from this search call. + QueryId string `json:"queryId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSearchResponseSummary: Summary of the top N // search results specified by the summary spec. type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { @@ -13265,13 +13761,13 @@ type GoogleCloudDiscoveryengineV1betaServingConfig struct { // expression is a single function or multiple functions that are joined by // "+". * ranking_expression = function, { " + ", function }; Supported // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: relevance_score: + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: // pre-defined keywords, used for measure relevance between query and document. - // embedding_field_path: the document embedding field used with query embedding - // vector. dotProduct: embedding function between embedding_field_path and - // query embedding vector. Example ranking expression: If document has an - // embedding field doc_embedding, the ranking expression could be 0.5 * - // relevance_score + 0.3 * dotProduct(doc_embedding). + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between + // embedding_field_path and query embedding vector. Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. RankingExpression string `json:"rankingExpression,omitempty"` // RedirectControlIds: IDs of the redirect controls. Only the first triggered // redirect action is applied, even if multiple apply. Maximum number of @@ -35477,6 +35973,116 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsEvaluationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsEvaluationsOperationsService) Get(name string) *ProjectsLocationsEvaluationsOperationsGetCall { + c := &ProjectsLocationsEvaluationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.evaluations.operations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsGroundingConfigsCheckCall struct { s *Service groundingConfig string @@ -35946,6 +36552,116 @@ func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsSampleQuerySetsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsSampleQuerySetsOperationsService) Get(name string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { + c := &ProjectsLocationsSampleQuerySetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.operations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsUserEventsCollectCall struct { s *Service parent string diff --git a/doubleclickbidmanager/v2/doubleclickbidmanager-api.json b/doubleclickbidmanager/v2/doubleclickbidmanager-api.json index 847c074268..a707f5d7d5 100644 --- a/doubleclickbidmanager/v2/doubleclickbidmanager-api.json +++ b/doubleclickbidmanager/v2/doubleclickbidmanager-api.json @@ -319,7 +319,7 @@ } } }, - "revision": "20240424", + "revision": "20240626", "rootUrl": "https://doubleclickbidmanager.googleapis.com/", "schemas": { "DataRange": { @@ -506,7 +506,9 @@ "GRP", "YOUTUBE_PROGRAMMATIC_GUARANTEED", "REACH", - "UNIQUE_REACH_AUDIENCE" + "UNIQUE_REACH_AUDIENCE", + "FULL_PATH", + "PATH_ATTRIBUTION" ], "enumDeprecated": [ false, @@ -518,7 +520,9 @@ false, false, false, - false + false, + true, + true ], "enumDescriptions": [ "Default value when report type is not specified or is unknown in this version.", @@ -530,7 +534,9 @@ "GRP report.", "YouTube Programmatic Guaranteed report.", "Reach report.", - "Unique Reach Audience report." + "Unique Reach Audience report.", + "Full Path report.", + "Path Attribution report." ], "type": "string" } diff --git a/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go b/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go index d7124554b3..ecac611048 100644 --- a/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go +++ b/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go @@ -398,6 +398,8 @@ type Parameters struct { // report. // "REACH" - Reach report. // "UNIQUE_REACH_AUDIENCE" - Unique Reach Audience report. + // "FULL_PATH" - Full Path report. + // "PATH_ATTRIBUTION" - Path Attribution report. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Filters") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/drive/v2/drive-api.json b/drive/v2/drive-api.json index 9a77f2d073..0a1f845e1f 100644 --- a/drive/v2/drive-api.json +++ b/drive/v2/drive-api.json @@ -3869,7 +3869,7 @@ } } }, - "revision": "20240521", + "revision": "20240628", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -5614,10 +5614,10 @@ "description": "Output only. User that shared the item with the current user, if available." }, "shortcutDetails": { - "description": "Shortcut file details. Only populated for shortcut files, which have the mimeType field set to `application/vnd.google-apps.shortcut`.", + "description": "Shortcut file details. Only populated for shortcut files, which have the mimeType field set to `application/vnd.google-apps.shortcut`. Can only be set on `files.insert` requests.", "properties": { "targetId": { - "description": "The ID of the file that this shortcut points to.", + "description": "The ID of the file that this shortcut points to. Can only be set on `files.insert` requests.", "type": "string" }, "targetMimeType": { diff --git a/drive/v2/drive-gen.go b/drive/v2/drive-gen.go index 1b91d2af2f..023d438f2d 100644 --- a/drive/v2/drive-gen.go +++ b/drive/v2/drive-gen.go @@ -1786,6 +1786,7 @@ type File struct { SharingUser *User `json:"sharingUser,omitempty"` // ShortcutDetails: Shortcut file details. Only populated for shortcut files, // which have the mimeType field set to `application/vnd.google-apps.shortcut`. + // Can only be set on `files.insert` requests. ShortcutDetails *FileShortcutDetails `json:"shortcutDetails,omitempty"` // Spaces: Output only. The list of spaces which contain the file. Supported // values are `drive`, `appDataFolder` and `photos`. @@ -2260,9 +2261,11 @@ func (s *FileLinkShareMetadata) MarshalJSON() ([]byte, error) { // FileShortcutDetails: Shortcut file details. Only populated for shortcut // files, which have the mimeType field set to -// `application/vnd.google-apps.shortcut`. +// `application/vnd.google-apps.shortcut`. Can only be set on `files.insert` +// requests. type FileShortcutDetails struct { - // TargetId: The ID of the file that this shortcut points to. + // TargetId: The ID of the file that this shortcut points to. Can only be set + // on `files.insert` requests. TargetId string `json:"targetId,omitempty"` // TargetMimeType: Output only. The MIME type of the file that this shortcut // points to. The value of this field is a snapshot of the target's MIME type, diff --git a/drive/v3/drive-api.json b/drive/v3/drive-api.json index 1113679906..3882e2b22c 100644 --- a/drive/v3/drive-api.json +++ b/drive/v3/drive-api.json @@ -2523,7 +2523,7 @@ } } }, - "revision": "20240521", + "revision": "20240628", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -3851,10 +3851,10 @@ "description": "Output only. The user who shared the file with the requesting user, if applicable." }, "shortcutDetails": { - "description": "Shortcut file details. Only populated for shortcut files, which have the mimeType field set to `application/vnd.google-apps.shortcut`.", + "description": "Shortcut file details. Only populated for shortcut files, which have the mimeType field set to `application/vnd.google-apps.shortcut`. Can only be set on `files.create` requests.", "properties": { "targetId": { - "description": "The ID of the file that this shortcut points to.", + "description": "The ID of the file that this shortcut points to. Can only be set on `files.create` requests.", "type": "string" }, "targetMimeType": { diff --git a/drive/v3/drive-gen.go b/drive/v3/drive-gen.go index ebc83188f0..86da160e37 100644 --- a/drive/v3/drive-gen.go +++ b/drive/v3/drive-gen.go @@ -1368,6 +1368,7 @@ type File struct { SharingUser *User `json:"sharingUser,omitempty"` // ShortcutDetails: Shortcut file details. Only populated for shortcut files, // which have the mimeType field set to `application/vnd.google-apps.shortcut`. + // Can only be set on `files.create` requests. ShortcutDetails *FileShortcutDetails `json:"shortcutDetails,omitempty"` // Size: Output only. Size in bytes of blobs and first party editor files. // Won't be populated for files that have no size, like shortcuts and folders. @@ -1840,9 +1841,11 @@ func (s *FileLinkShareMetadata) MarshalJSON() ([]byte, error) { // FileShortcutDetails: Shortcut file details. Only populated for shortcut // files, which have the mimeType field set to -// `application/vnd.google-apps.shortcut`. +// `application/vnd.google-apps.shortcut`. Can only be set on `files.create` +// requests. type FileShortcutDetails struct { - // TargetId: The ID of the file that this shortcut points to. + // TargetId: The ID of the file that this shortcut points to. Can only be set + // on `files.create` requests. TargetId string `json:"targetId,omitempty"` // TargetMimeType: Output only. The MIME type of the file that this shortcut // points to. The value of this field is a snapshot of the target's MIME type, diff --git a/games/v1/games-api.json b/games/v1/games-api.json index f608466bd3..4dded9a557 100644 --- a/games/v1/games-api.json +++ b/games/v1/games-api.json @@ -1469,7 +1469,7 @@ } } }, - "revision": "20240618", + "revision": "20240701", "rootUrl": "https://games.googleapis.com/", "schemas": { "AchievementDefinition": { @@ -2231,12 +2231,9 @@ "description": "The application that this player identifier is for.", "type": "string" }, - "token": { - "description": "Recall token data.", - "items": { - "$ref": "RecallToken" - }, - "type": "array" + "recallToken": { + "$ref": "RecallToken", + "description": "Recall token data." } }, "type": "object" @@ -3314,8 +3311,8 @@ "description": "Recall token data returned from for the RetrieveDeveloperGamesLastPlayerToken RPC", "id": "RetrieveDeveloperGamesLastPlayerTokenResponse", "properties": { - "token": { - "$ref": "RecallToken", + "gamePlayerToken": { + "$ref": "GamePlayerToken", "description": "The recall token associated with the requested PGS Player principal. It can be unset if there is no recall token associated with the requested principal." } }, @@ -3325,7 +3322,7 @@ "description": "A list of recall token data returned from the RetrieveGamesPlayerTokens RPC", "id": "RetrieveGamesPlayerTokensResponse", "properties": { - "applicationRecallTokens": { + "gamePlayerTokens": { "description": "The requested applications along with the recall tokens for the player. If the player does not have recall tokens for an application, that application is not included in the response.", "items": { "$ref": "GamePlayerToken" diff --git a/games/v1/games-gen.go b/games/v1/games-gen.go index 70460f1c88..1b2c60f60e 100644 --- a/games/v1/games-gen.go +++ b/games/v1/games-gen.go @@ -1213,8 +1213,8 @@ func (s *EventUpdateResponse) MarshalJSON() ([]byte, error) { type GamePlayerToken struct { // ApplicationId: The application that this player identifier is for. ApplicationId string `json:"applicationId,omitempty"` - // Token: Recall token data. - Token []*RecallToken `json:"token,omitempty"` + // RecallToken: Recall token data. + RecallToken *RecallToken `json:"recallToken,omitempty"` // ForceSendFields is a list of field names (e.g. "ApplicationId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2543,22 +2543,22 @@ func (s *ResetPersonaResponse) MarshalJSON() ([]byte, error) { // RetrieveDeveloperGamesLastPlayerTokenResponse: Recall token data returned // from for the RetrieveDeveloperGamesLastPlayerToken RPC type RetrieveDeveloperGamesLastPlayerTokenResponse struct { - // Token: The recall token associated with the requested PGS Player principal. - // It can be unset if there is no recall token associated with the requested - // principal. - Token *RecallToken `json:"token,omitempty"` + // GamePlayerToken: The recall token associated with the requested PGS Player + // principal. It can be unset if there is no recall token associated with the + // requested principal. + GamePlayerToken *GamePlayerToken `json:"gamePlayerToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Token") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "GamePlayerToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Token") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GamePlayerToken") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -2571,22 +2571,22 @@ func (s *RetrieveDeveloperGamesLastPlayerTokenResponse) MarshalJSON() ([]byte, e // RetrieveGamesPlayerTokensResponse: A list of recall token data returned from // the RetrieveGamesPlayerTokens RPC type RetrieveGamesPlayerTokensResponse struct { - // ApplicationRecallTokens: The requested applications along with the recall - // tokens for the player. If the player does not have recall tokens for an + // GamePlayerTokens: The requested applications along with the recall tokens + // for the player. If the player does not have recall tokens for an // application, that application is not included in the response. - ApplicationRecallTokens []*GamePlayerToken `json:"applicationRecallTokens,omitempty"` + GamePlayerTokens []*GamePlayerToken `json:"gamePlayerTokens,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ApplicationRecallTokens") to + // ForceSendFields is a list of field names (e.g. "GamePlayerTokens") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplicationRecallTokens") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "GamePlayerTokens") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index a45b25f130..579d08a74a 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -627,6 +627,62 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "cancelMigration": { + "description": "Cancels the ongoing Managed Migration process.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:cancelMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.cancelMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to cancel the ongoing migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+service}:cancelMigration", + "request": { + "$ref": "CancelMigrationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "completeMigration": { + "description": "Completes the managed migration process. The Dataproc Metastore service will switch to using its own backend database after successful migration.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:completeMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.completeMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to complete the migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+service}:completeMigration", + "request": { + "$ref": "CompleteMigrationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a metastore service in a project and location.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services", @@ -976,6 +1032,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "startMigration": { + "description": "Starts the Managed Migration process.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:startMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.startMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to start migrating to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+service}:startMigration", + "request": { + "$ref": "StartMigrationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:testIamPermissions", @@ -1487,6 +1571,111 @@ ] } } + }, + "migrationExecutions": { + "methods": { + "delete": { + "description": "Deletes a single migration execution.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.migrationExecutions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single migration execution.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migration execution to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "MigrationExecution" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists migration executions on a service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of migration executions to return. The response may contain less than the maximum number. If unspecified, no more than 500 migration executions are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListMigrationExecutions call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListMigrationExecutions must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose migration executions to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/migrationExecutions", + "response": { + "$ref": "ListMigrationExecutionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -1495,7 +1684,7 @@ } } }, - "revision": "20240611", + "revision": "20240627", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1590,6 +1779,27 @@ }, "type": "object" }, + "AutoscalingConfig": { + "description": "Represents the autoscaling configuration of a metastore service.", + "id": "AutoscalingConfig", + "properties": { + "autoscalingEnabled": { + "description": "Optional. Whether or not autoscaling is enabled for this service.", + "type": "boolean" + }, + "autoscalingFactor": { + "description": "Output only. The scaling factor of a service with autoscaling enabled.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "limitConfig": { + "$ref": "LimitConfig", + "description": "Optional. The LimitConfig of the service." + } + }, + "type": "object" + }, "AuxiliaryVersionConfig": { "description": "Configuration information for the auxiliary service versions.", "id": "AuxiliaryVersionConfig", @@ -1721,12 +1931,114 @@ }, "type": "object" }, + "CancelMigrationRequest": { + "description": "Request message for DataprocMetastore.CancelMigration.", + "id": "CancelMigrationRequest", + "properties": {}, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", "properties": {}, "type": "object" }, + "CdcConfig": { + "description": "Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore.", + "id": "CdcConfig", + "properties": { + "bucket": { + "description": "Optional. The bucket to write the intermediate stream event data in. The bucket name must be without any prefix like \"gs://\". See the bucket naming requirements (https://cloud.google.com/storage/docs/buckets#naming). This field is optional. If not set, the Artifacts Cloud Storage bucket will be used.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Datastream service should use for the MySQL connection. This field is not returned on request.", + "type": "string" + }, + "reverseProxySubnet": { + "description": "Required. The URL of the subnetwork resource to create the VM instance hosting the reverse proxy in. More context in https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy The subnetwork should reside in the network provided in the request that Datastream will peer to and should be in the same region as Datastream, in the following format. projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "rootPath": { + "description": "Optional. The root path inside the Cloud Storage bucket. The stream event data will be written to this path. The default value is /migration.", + "type": "string" + }, + "subnetIpRange": { + "description": "Required. A /29 CIDR IP range for peering with datastream.", + "type": "string" + }, + "username": { + "description": "Required. The username that the Datastream service should use for the MySQL connection.", + "type": "string" + }, + "vpcNetwork": { + "description": "Required. Fully qualified name of the Cloud SQL instance's VPC network or the shared VPC network that Datastream will peer to, in the following format: projects/{project_id}/locations/global/networks/{network_id}. More context in https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity", + "type": "string" + } + }, + "type": "object" + }, + "CloudSQLConnectionConfig": { + "description": "Configuration information to establish customer database connection before the cutover phase of migration", + "id": "CloudSQLConnectionConfig", + "properties": { + "hiveDatabaseName": { + "description": "Required. The hive database name.", + "type": "string" + }, + "instanceConnectionName": { + "description": "Required. Cloud SQL database connection name (project_id:region:instance_name)", + "type": "string" + }, + "ipAddress": { + "description": "Required. The private IP address of the Cloud SQL instance.", + "type": "string" + }, + "natSubnet": { + "description": "Required. The relative resource name of the subnetwork to be used for Private Service Connect. Note that this cannot be a regular subnet and is used only for NAT. (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) This subnet is used to publish the SOCKS5 proxy service. The subnet size must be at least /29 and it should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Dataproc Metastore service will be using to connect to the database. This field is not returned on request.", + "type": "string" + }, + "port": { + "description": "Required. The network port of the database.", + "format": "int32", + "type": "integer" + }, + "proxySubnet": { + "description": "Required. The relative resource name of the subnetwork to deploy the SOCKS5 proxy service in. The subnetwork should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "username": { + "description": "Required. The username that Dataproc Metastore service will use to connect to the database.", + "type": "string" + } + }, + "type": "object" + }, + "CloudSQLMigrationConfig": { + "description": "Configuration information for migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore.", + "id": "CloudSQLMigrationConfig", + "properties": { + "cdcConfig": { + "$ref": "CdcConfig", + "description": "Required. Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore. Dataproc Metastore switches to using its backend database after the cutover phase of migration." + }, + "cloudSqlConnectionConfig": { + "$ref": "CloudSQLConnectionConfig", + "description": "Required. Configuration information to establish customer database connection before the cutover phase of migration" + } + }, + "type": "object" + }, + "CompleteMigrationRequest": { + "description": "Request message for DataprocMetastore.CompleteMigration.", + "id": "CompleteMigrationRequest", + "properties": {}, + "type": "object" + }, "Consumer": { "description": "Contains information of the customer's network configurations.", "id": "Consumer", @@ -2080,6 +2392,23 @@ }, "type": "object" }, + "LimitConfig": { + "description": "Represents the autoscaling limit configuration of a metastore service.", + "id": "LimitConfig", + "properties": { + "maxScalingFactor": { + "description": "Optional. The highest scaling factor that the service should be autoscaled to.", + "format": "float", + "type": "number" + }, + "minScalingFactor": { + "description": "Optional. The lowest scaling factor that the service should be autoscaled to.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "ListBackupsResponse": { "description": "Response message for DataprocMetastore.ListBackups.", "id": "ListBackupsResponse", @@ -2173,6 +2502,31 @@ }, "type": "object" }, + "ListMigrationExecutionsResponse": { + "description": "Response message for DataprocMetastore.ListMigrationExecutions.", + "id": "ListMigrationExecutionsResponse", + "properties": { + "migrationExecutions": { + "description": "The migration executions on the specified service.", + "items": { + "$ref": "MigrationExecution" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "ListOperationsResponse", @@ -2452,6 +2806,81 @@ }, "type": "object" }, + "MigrationExecution": { + "description": "The details of a migration execution resource.", + "id": "MigrationExecution", + "properties": { + "cloudSqlMigrationConfig": { + "$ref": "CloudSQLMigrationConfig", + "description": "Configuration information specific to migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore." + }, + "createTime": { + "description": "Output only. The time when the migration execution was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the migration execution finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The relative resource name of the migration execution, in the following form: projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}", + "readOnly": true, + "type": "string" + }, + "phase": { + "description": "Output only. The current phase of the migration execution.", + "enum": [ + "PHASE_UNSPECIFIED", + "REPLICATION", + "CUTOVER" + ], + "enumDescriptions": [ + "The phase of the migration execution is unknown.", + "Replication phase refers to the migration phase when Dataproc Metastore is running a pipeline to replicate changes in the customer database to its backend database. During this phase, Dataproc Metastore uses the customer database as the hive metastore backend database.", + "Cutover phase refers to the migration phase when Dataproc Metastore switches to using its own backend database. Migration enters this phase when customer is done migrating all their clusters/workloads to Dataproc Metastore and triggers CompleteMigration." + ], + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the migration execution.", + "enum": [ + "STATE_UNSPECIFIED", + "STARTING", + "RUNNING", + "CANCELLING", + "AWAITING_USER_ACTION", + "SUCCEEDED", + "FAILED", + "CANCELLED", + "DELETING" + ], + "enumDescriptions": [ + "The state of the migration execution is unknown.", + "The migration execution is starting.", + "The migration execution is running.", + "The migration execution is in the process of being cancelled.", + "The migration execution is awaiting user action.", + "The migration execution has completed successfully.", + "The migration execution has failed.", + "The migration execution is cancelled.", + "The migration execution is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the migration execution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "MoveTableToDatabaseRequest": { "description": "Request message for DataprocMetastore.MoveTableToDatabase.", "id": "MoveTableToDatabaseRequest", @@ -2741,6 +3170,10 @@ "description": "Represents the scaling configuration of a metastore service.", "id": "ScalingConfig", "properties": { + "autoscalingConfig": { + "$ref": "AutoscalingConfig", + "description": "Optional. The autoscaling configuration." + }, "instanceSize": { "description": "An enum of readable instance sizes, with each instance size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))", "enum": [ @@ -2929,7 +3362,8 @@ "SUSPENDED", "UPDATING", "DELETING", - "ERROR" + "ERROR", + "MIGRATING" ], "enumDescriptions": [ "The state of the metastore service is unknown.", @@ -2939,7 +3373,8 @@ "The metastore service is suspended and unable to serve queries.", "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", "The metastore service is undergoing deletion. It cannot be used.", - "The metastore service has encountered an error and cannot be used. The metastore service should be deleted." + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted.", + "The metastore service is processing a managed migration." ], "readOnly": true, "type": "string" @@ -2997,6 +3432,21 @@ }, "type": "object" }, + "StartMigrationRequest": { + "description": "Request message for DataprocMetastore.StartMigration.", + "id": "StartMigrationRequest", + "properties": { + "migrationExecution": { + "$ref": "MigrationExecution", + "description": "Required. The configuration details for the migration." + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", "id": "Status", diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index d8c39644f6..9d0ff3cfd6 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -207,6 +207,7 @@ func NewProjectsLocationsServicesService(s *APIService) *ProjectsLocationsServic rs.Backups = NewProjectsLocationsServicesBackupsService(s) rs.Databases = NewProjectsLocationsServicesDatabasesService(s) rs.MetadataImports = NewProjectsLocationsServicesMetadataImportsService(s) + rs.MigrationExecutions = NewProjectsLocationsServicesMigrationExecutionsService(s) return rs } @@ -218,6 +219,8 @@ type ProjectsLocationsServicesService struct { Databases *ProjectsLocationsServicesDatabasesService MetadataImports *ProjectsLocationsServicesMetadataImportsService + + MigrationExecutions *ProjectsLocationsServicesMigrationExecutionsService } func NewProjectsLocationsServicesBackupsService(s *APIService) *ProjectsLocationsServicesBackupsService { @@ -259,6 +262,15 @@ type ProjectsLocationsServicesMetadataImportsService struct { s *APIService } +func NewProjectsLocationsServicesMigrationExecutionsService(s *APIService) *ProjectsLocationsServicesMigrationExecutionsService { + rs := &ProjectsLocationsServicesMigrationExecutionsService{s: s} + return rs +} + +type ProjectsLocationsServicesMigrationExecutionsService struct { + s *APIService +} + // AlterMetadataResourceLocationRequest: Request message for // DataprocMetastore.AlterMetadataResourceLocation. type AlterMetadataResourceLocationRequest struct { @@ -404,6 +416,49 @@ func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// AutoscalingConfig: Represents the autoscaling configuration of a metastore +// service. +type AutoscalingConfig struct { + // AutoscalingEnabled: Optional. Whether or not autoscaling is enabled for this + // service. + AutoscalingEnabled bool `json:"autoscalingEnabled,omitempty"` + // AutoscalingFactor: Output only. The scaling factor of a service with + // autoscaling enabled. + AutoscalingFactor float64 `json:"autoscalingFactor,omitempty"` + // LimitConfig: Optional. The LimitConfig of the service. + LimitConfig *LimitConfig `json:"limitConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *AutoscalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutoscalingConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *AutoscalingConfig) UnmarshalJSON(data []byte) error { + type NoMethod AutoscalingConfig + var s1 struct { + AutoscalingFactor gensupport.JSONFloat64 `json:"autoscalingFactor"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.AutoscalingFactor = float64(s1.AutoscalingFactor) + return nil +} + // AuxiliaryVersionConfig: Configuration information for the auxiliary service // versions. type AuxiliaryVersionConfig struct { @@ -613,10 +668,157 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// CancelMigrationRequest: Request message for +// DataprocMetastore.CancelMigration. +type CancelMigrationRequest struct { +} + // CancelOperationRequest: The request message for Operations.CancelOperation. type CancelOperationRequest struct { } +// CdcConfig: Configuration information to start the Change Data Capture (CDC) +// streams from customer database to backend database of Dataproc Metastore. +type CdcConfig struct { + // Bucket: Optional. The bucket to write the intermediate stream event data in. + // The bucket name must be without any prefix like "gs://". See the bucket + // naming requirements (https://cloud.google.com/storage/docs/buckets#naming). + // This field is optional. If not set, the Artifacts Cloud Storage bucket will + // be used. + Bucket string `json:"bucket,omitempty"` + // Password: Required. Input only. The password for the user that Datastream + // service should use for the MySQL connection. This field is not returned on + // request. + Password string `json:"password,omitempty"` + // ReverseProxySubnet: Required. The URL of the subnetwork resource to create + // the VM instance hosting the reverse proxy in. More context in + // https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy + // The subnetwork should reside in the network provided in the request that + // Datastream will peer to and should be in the same region as Datastream, in + // the following format. + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ReverseProxySubnet string `json:"reverseProxySubnet,omitempty"` + // RootPath: Optional. The root path inside the Cloud Storage bucket. The + // stream event data will be written to this path. The default value is + // /migration. + RootPath string `json:"rootPath,omitempty"` + // SubnetIpRange: Required. A /29 CIDR IP range for peering with datastream. + SubnetIpRange string `json:"subnetIpRange,omitempty"` + // Username: Required. The username that the Datastream service should use for + // the MySQL connection. + Username string `json:"username,omitempty"` + // VpcNetwork: Required. Fully qualified name of the Cloud SQL instance's VPC + // network or the shared VPC network that Datastream will peer to, in the + // following format: + // projects/{project_id}/locations/global/networks/{network_id}. More context + // in + // https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity + VpcNetwork string `json:"vpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *CdcConfig) MarshalJSON() ([]byte, error) { + type NoMethod CdcConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// CloudSQLConnectionConfig: Configuration information to establish customer +// database connection before the cutover phase of migration +type CloudSQLConnectionConfig struct { + // HiveDatabaseName: Required. The hive database name. + HiveDatabaseName string `json:"hiveDatabaseName,omitempty"` + // InstanceConnectionName: Required. Cloud SQL database connection name + // (project_id:region:instance_name) + InstanceConnectionName string `json:"instanceConnectionName,omitempty"` + // IpAddress: Required. The private IP address of the Cloud SQL instance. + IpAddress string `json:"ipAddress,omitempty"` + // NatSubnet: Required. The relative resource name of the subnetwork to be used + // for Private Service Connect. Note that this cannot be a regular subnet and + // is used only for NAT. + // (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) + // This subnet is used to publish the SOCKS5 proxy service. The subnet size + // must be at least /29 and it should reside in a network through which the + // Cloud SQL instance is accessible. The resource name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + NatSubnet string `json:"natSubnet,omitempty"` + // Password: Required. Input only. The password for the user that Dataproc + // Metastore service will be using to connect to the database. This field is + // not returned on request. + Password string `json:"password,omitempty"` + // Port: Required. The network port of the database. + Port int64 `json:"port,omitempty"` + // ProxySubnet: Required. The relative resource name of the subnetwork to + // deploy the SOCKS5 proxy service in. The subnetwork should reside in a + // network through which the Cloud SQL instance is accessible. The resource + // name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ProxySubnet string `json:"proxySubnet,omitempty"` + // Username: Required. The username that Dataproc Metastore service will use to + // connect to the database. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "HiveDatabaseName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HiveDatabaseName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *CloudSQLConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod CloudSQLConnectionConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// CloudSQLMigrationConfig: Configuration information for migrating from +// self-managed hive metastore on Google Cloud using Cloud SQL as the backend +// database to Dataproc Metastore. +type CloudSQLMigrationConfig struct { + // CdcConfig: Required. Configuration information to start the Change Data + // Capture (CDC) streams from customer database to backend database of Dataproc + // Metastore. Dataproc Metastore switches to using its backend database after + // the cutover phase of migration. + CdcConfig *CdcConfig `json:"cdcConfig,omitempty"` + // CloudSqlConnectionConfig: Required. Configuration information to establish + // customer database connection before the cutover phase of migration + CloudSqlConnectionConfig *CloudSQLConnectionConfig `json:"cloudSqlConnectionConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "CdcConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CdcConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *CloudSQLMigrationConfig) MarshalJSON() ([]byte, error) { + type NoMethod CloudSQLMigrationConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// CompleteMigrationRequest: Request message for +// DataprocMetastore.CompleteMigration. +type CompleteMigrationRequest struct { +} + // Consumer: Contains information of the customer's network configurations. type Consumer struct { // EndpointLocation: Output only. The location of the endpoint URI. Format: @@ -1075,6 +1277,49 @@ func (s *LatestBackup) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// LimitConfig: Represents the autoscaling limit configuration of a metastore +// service. +type LimitConfig struct { + // MaxScalingFactor: Optional. The highest scaling factor that the service + // should be autoscaled to. + MaxScalingFactor float64 `json:"maxScalingFactor,omitempty"` + // MinScalingFactor: Optional. The lowest scaling factor that the service + // should be autoscaled to. + MinScalingFactor float64 `json:"minScalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxScalingFactor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxScalingFactor") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *LimitConfig) MarshalJSON() ([]byte, error) { + type NoMethod LimitConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *LimitConfig) UnmarshalJSON(data []byte) error { + type NoMethod LimitConfig + var s1 struct { + MaxScalingFactor gensupport.JSONFloat64 `json:"maxScalingFactor"` + MinScalingFactor gensupport.JSONFloat64 `json:"minScalingFactor"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxScalingFactor = float64(s1.MaxScalingFactor) + s.MinScalingFactor = float64(s1.MinScalingFactor) + return nil +} + // ListBackupsResponse: Response message for DataprocMetastore.ListBackups. type ListBackupsResponse struct { // Backups: The backups of the specified service. @@ -1194,6 +1439,37 @@ func (s *ListMetadataImportsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ListMigrationExecutionsResponse: Response message for +// DataprocMetastore.ListMigrationExecutions. +type ListMigrationExecutionsResponse struct { + // MigrationExecutions: The migration executions on the specified service. + MigrationExecutions []*MigrationExecution `json:"migrationExecutions,omitempty"` + // NextPageToken: A token that can be sent as page_token to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "MigrationExecutions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecutions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ListMigrationExecutionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMigrationExecutionsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ListOperationsResponse: The response message for Operations.ListOperations. type ListOperationsResponse struct { // NextPageToken: The standard List next-page token. @@ -1494,6 +1770,72 @@ func (s *MetadataManagementActivity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// MigrationExecution: The details of a migration execution resource. +type MigrationExecution struct { + // CloudSqlMigrationConfig: Configuration information specific to migrating + // from self-managed hive metastore on Google Cloud using Cloud SQL as the + // backend database to Dataproc Metastore. + CloudSqlMigrationConfig *CloudSQLMigrationConfig `json:"cloudSqlMigrationConfig,omitempty"` + // CreateTime: Output only. The time when the migration execution was started. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time when the migration execution finished. + EndTime string `json:"endTime,omitempty"` + // Name: Output only. The relative resource name of the migration execution, in + // the following form: + // projects/{project_number}/locations/{location_id}/services/{service_id}/migra + // tionExecutions/{migration_execution_id} + Name string `json:"name,omitempty"` + // Phase: Output only. The current phase of the migration execution. + // + // Possible values: + // "PHASE_UNSPECIFIED" - The phase of the migration execution is unknown. + // "REPLICATION" - Replication phase refers to the migration phase when + // Dataproc Metastore is running a pipeline to replicate changes in the + // customer database to its backend database. During this phase, Dataproc + // Metastore uses the customer database as the hive metastore backend database. + // "CUTOVER" - Cutover phase refers to the migration phase when Dataproc + // Metastore switches to using its own backend database. Migration enters this + // phase when customer is done migrating all their clusters/workloads to + // Dataproc Metastore and triggers CompleteMigration. + Phase string `json:"phase,omitempty"` + // State: Output only. The current state of the migration execution. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the migration execution is unknown. + // "STARTING" - The migration execution is starting. + // "RUNNING" - The migration execution is running. + // "CANCELLING" - The migration execution is in the process of being + // cancelled. + // "AWAITING_USER_ACTION" - The migration execution is awaiting user action. + // "SUCCEEDED" - The migration execution has completed successfully. + // "FAILED" - The migration execution has failed. + // "CANCELLED" - The migration execution is cancelled. + // "DELETING" - The migration execution is being deleted. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the migration execution. + StateMessage string `json:"stateMessage,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *MigrationExecution) MarshalJSON() ([]byte, error) { + type NoMethod MigrationExecution + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // MoveTableToDatabaseRequest: Request message for // DataprocMetastore.MoveTableToDatabase. type MoveTableToDatabaseRequest struct { @@ -1898,6 +2240,8 @@ func (s *RestoreServiceRequest) MarshalJSON() ([]byte, error) { // ScalingConfig: Represents the scaling configuration of a metastore service. type ScalingConfig struct { + // AutoscalingConfig: Optional. The autoscaling configuration. + AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"` // InstanceSize: An enum of readable instance sizes, with each instance size // mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = // scaling_factor(0.1)) @@ -1915,15 +2259,15 @@ type ScalingConfig struct { // ScalingFactor: Scaling factor, increments of 0.1 for values less than 1.0, // and increments of 1.0 for values greater than 1.0. ScalingFactor float64 `json:"scalingFactor,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceSize") to + // ForceSendFields is a list of field names (e.g. "AutoscalingConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceSize") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "AutoscalingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -2098,6 +2442,7 @@ type Service struct { // used. // "ERROR" - The metastore service has encountered an error and cannot be // used. The metastore service should be deleted. + // "MIGRATING" - The metastore service is processing a managed migration. State string `json:"state,omitempty"` // StateMessage: Output only. Additional information about the current state of // the metastore service, if available. @@ -2171,6 +2516,38 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// StartMigrationRequest: Request message for DataprocMetastore.StartMigration. +type StartMigrationRequest struct { + // MigrationExecution: Required. The configuration details for the migration. + MigrationExecution *MigrationExecution `json:"migrationExecution,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *StartMigrationRequest) MarshalJSON() ([]byte, error) { + type NoMethod StartMigrationRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Status: The Status type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is // used by gRPC (https://github.com/grpc). Each Status message contains three @@ -4202,84 +4579,60 @@ func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsServicesCreateCall struct { - s *APIService - parent string - service *Service - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServicesCancelMigrationCall struct { + s *APIService + service string + cancelmigrationrequest *CancelMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a metastore service in a project and location. +// CancelMigration: Cancels the ongoing Managed Migration process. // -// - parent: The relative resource name of the location in which to create a -// metastore service, in the following -// form:projects/{project_number}/locations/{location_id}. -func (r *ProjectsLocationsServicesService) Create(parent string, service *Service) *ProjectsLocationsServicesCreateCall { - c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - service: The relative resource name of the metastore service to cancel the +// ongoing migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CancelMigration(service string, cancelmigrationrequest *CancelMigrationRequest) *ProjectsLocationsServicesCancelMigrationCall { + c := &ProjectsLocationsServicesCancelMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.service = service - return c -} - -// RequestId sets the optional parameter "requestId": A request ID. Specify a -// unique request ID to allow the server to ignore the request if it has -// completed. The server will ignore subsequent requests that provide a -// duplicate request ID for at least 60 minutes after the first request.For -// example, if an initial request times out, followed by another request with -// the same request ID, the server ignores the second request to prevent the -// creation of duplicate commitments.The request ID must be a valid UUID -// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero -// UUID (00000000-0000-0000-0000-000000000000) is not supported. -func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ServiceId sets the optional parameter "serviceId": Required. The ID of the -// metastore service, which is used as the final component of the metastore -// service's name.This value must be between 2 and 63 characters long -// inclusive, begin with a letter, end with a letter or number, and consist of -// alpha-numeric ASCII characters or hyphens. -func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { - c.urlParams_.Set("serviceId", serviceId) + c.cancelmigrationrequest = cancelmigrationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { +func (c *ProjectsLocationsServicesCancelMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCancelMigrationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { +func (c *ProjectsLocationsServicesCancelMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCancelMigrationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { +func (c *ProjectsLocationsServicesCancelMigrationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsServicesCancelMigrationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelmigrationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:cancelMigration") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4287,17 +4640,17 @@ func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "service": c.service, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "metastore.projects.locations.services.create" call. +// Do executes the "metastore.projects.locations.services.cancelMigration" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsServicesCancelMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4329,33 +4682,265 @@ func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsServicesDeleteCall struct { - s *APIService - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServicesCompleteMigrationCall struct { + s *APIService + service string + completemigrationrequest *CompleteMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single service. +// CompleteMigration: Completes the managed migration process. The Dataproc +// Metastore service will switch to using its own backend database after +// successful migration. // -// - name: The relative resource name of the metastore service to delete, in -// the following -// form:projects/{project_number}/locations/{location_id}/services/{service_id -// }. -func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { - c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - service: The relative resource name of the metastore service to complete +// the migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CompleteMigration(service string, completemigrationrequest *CompleteMigrationRequest) *ProjectsLocationsServicesCompleteMigrationCall { + c := &ProjectsLocationsServicesCompleteMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.completemigrationrequest = completemigrationrequest return c } -// RequestId sets the optional parameter "requestId": A request ID. Specify a -// unique request ID to allow the server to ignore the request if it has -// completed. The server will ignore subsequent requests that provide a -// duplicate request ID for at least 60 minutes after the first request.For -// example, if an initial request times out, followed by another request with -// the same request ID, the server ignores the second request to prevent the -// creation of duplicate commitments.The request ID must be a valid UUID +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCompleteMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCompleteMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCompleteMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.completemigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:completeMigration") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.completeMigration" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesCreateCall struct { + s *APIService + parent string + service *Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore service in a project and location. +// +// - parent: The relative resource name of the location in which to create a +// metastore service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) Create(parent string, service *Service) *ProjectsLocationsServicesCreateCall { + c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.service = service + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The ID of the +// metastore service, which is used as the final component of the metastore +// service's name.This value must be between 2 and 63 characters long +// inclusive, begin with a letter, end with a letter or number, and consist of +// alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single service. +// +// - name: The relative resource name of the metastore service to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { + c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero // UUID (00000000-0000-0000-0000-000000000000) is not supported. func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall { @@ -5490,36 +6075,139 @@ func (c *ProjectsLocationsServicesSetIamPolicyCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsServicesTestIamPermissionsCall struct { - s *APIService - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsServicesStartMigrationCall struct { + s *APIService + service string + startmigrationrequest *StartMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// StartMigration: Starts the Managed Migration process. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesTestIamPermissionsCall { - c := &ProjectsLocationsServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - service: The relative resource name of the metastore service to start +// migrating to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) StartMigration(service string, startmigrationrequest *StartMigrationRequest) *ProjectsLocationsServicesStartMigrationCall { + c := &ProjectsLocationsServicesStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.startmigrationrequest = startmigrationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesTestIamPermissionsCall { +func (c *ProjectsLocationsServicesStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesStartMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesStartMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesStartMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesStartMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:startMigration") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.startMigration" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesStartMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesTestIamPermissionsCall struct { + s *APIService + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesTestIamPermissionsCall { + c := &ProjectsLocationsServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7344,3 +8032,394 @@ func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Do(opts ...googleapi } return ret, nil } + +type ProjectsLocationsServicesMigrationExecutionsDeleteCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single migration execution. +// +// - name: The relative resource name of the migrationExecution to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Delete(name string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c := &ProjectsLocationsServicesMigrationExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.migrationExecutions.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesMigrationExecutionsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single migration execution. +// +// - name: The relative resource name of the migration execution to retrieve, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Get(name string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c := &ProjectsLocationsServicesMigrationExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.migrationExecutions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *MigrationExecution.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Do(opts ...googleapi.CallOption) (*MigrationExecution, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &MigrationExecution{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesMigrationExecutionsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists migration executions on a service. +// +// - parent: The relative resource name of the service whose migration +// executions to list, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions. +func (r *ProjectsLocationsServicesMigrationExecutionsService) List(parent string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c := &ProjectsLocationsServicesMigrationExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Filter(filter string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// migration executions to return. The response may contain less than the +// maximum number. If unspecified, no more than 500 migration executions are +// returned. The maximum value is 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListMigrationExecutions call. Provide this +// token to retrieve the subsequent page.To retrieve the first page, supply an +// empty page token.When paginating, other parameters provided to +// DataprocMetastore.ListMigrationExecutions must match the call that provided +// the page token. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migrationExecutions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.migrationExecutions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListMigrationExecutionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListMigrationExecutionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListMigrationExecutionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Pages(ctx context.Context, f func(*ListMigrationExecutionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 0ba24db5e8..af489b5b91 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -2092,7 +2092,7 @@ } } }, - "revision": "20240610", + "revision": "20240702", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2637,14 +2637,6 @@ "mergedFacetKey": { "description": "The merged facet key should be a valid facet key that is different than the facet key of the current catalog attribute. We refer this is merged facet key as the child of the current catalog attribute. This merged facet key can't be a parent of another facet key (i.e. no directed path of length 2). This merged facet key needs to be either a textual custom attribute or a numerical custom attribute.", "type": "string" - }, - "mergedFacetValues": { - "deprecated": true, - "description": "Each instance is a list of facet values that map into the same (possibly different) merged facet value. For the current attribute config, each facet value should map to at most one merged facet value.", - "items": { - "$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue" - }, - "type": "array" } }, "type": "object" @@ -2752,7 +2744,7 @@ }, "GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult": { "deprecated": true, - "description": "Recent search of this user.", + "description": "Deprecated: Recent search of this user.", "id": "GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult", "properties": { "recentSearch": { diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 3103b4d5be..923b3e5be0 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -1142,10 +1142,6 @@ type GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet struct { // path of length 2). This merged facet key needs to be either a textual custom // attribute or a numerical custom attribute. MergedFacetKey string `json:"mergedFacetKey,omitempty"` - // MergedFacetValues: Each instance is a list of facet values that map into the - // same (possibly different) merged facet value. For the current attribute - // config, each facet value should map to at most one merged facet value. - MergedFacetValues []*GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue `json:"mergedFacetValues,omitempty"` // ForceSendFields is a list of field names (e.g. "MergedFacetKey") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1341,8 +1337,8 @@ func (s *GoogleCloudRetailV2CompleteQueryResponseCompletionResult) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult: Recent search of -// this user. +// GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult: Deprecated: +// Recent search of this user. type GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult struct { // RecentSearch: The recent search query. RecentSearch string `json:"recentSearch,omitempty"` diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 8abed3101d..4c08fe0226 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2557,7 +2557,7 @@ } } }, - "revision": "20240610", + "revision": "20240702", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3610,16 +3610,6 @@ "readOnly": true, "type": "array" }, - "productCounts": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "deprecated": true, - "description": "Output only. The number of products in different groups that this branch has. The key is a group representing a set of products, and the value is the number of products in that group. Note: keys in this map may change over time. Possible keys: * \"primary-in-stock\", products have Product.Type.PRIMARY type and Product.Availability.IN_STOCK availability. * \"primary-out-of-stock\", products have Product.Type.PRIMARY type and Product.Availability.OUT_OF_STOCK availability. * \"primary-preorder\", products have Product.Type.PRIMARY type and Product.Availability.PREORDER availability. * \"primary-backorder\", products have Product.Type.PRIMARY type and Product.Availability.BACKORDER availability. * \"variant-in-stock\", products have Product.Type.VARIANT type and Product.Availability.IN_STOCK availability. * \"variant-out-of-stock\", products have Product.Type.VARIANT type and Product.Availability.OUT_OF_STOCK availability. * \"variant-preorder\", products have Product.Type.VARIANT type and Product.Availability.PREORDER availability. * \"variant-backorder\", products have Product.Type.VARIANT type and Product.Availability.BACKORDER availability. * \"price-discounted\", products have [Product.price_info.price] \u003c [Product.price_info.original_price]. This field is not populated in BranchView.BASIC view.", - "readOnly": true, - "type": "object" - }, "qualityMetrics": { "description": "Output only. The quality metrics measured among products of this branch. See QualityMetric.requirement_key for supported metrics. Metrics could be missing if failed to retrieve. This field is not populated in BranchView.BASIC view.", "items": { @@ -3902,14 +3892,6 @@ "mergedFacetKey": { "description": "The merged facet key should be a valid facet key that is different than the facet key of the current catalog attribute. We refer this is merged facet key as the child of the current catalog attribute. This merged facet key can't be a parent of another facet key (i.e. no directed path of length 2). This merged facet key needs to be either a textual custom attribute or a numerical custom attribute.", "type": "string" - }, - "mergedFacetValues": { - "deprecated": true, - "description": "Each instance is a list of facet values that map into the same (possibly different) merged facet value. For the current attribute config, each facet value should map to at most one merged facet value.", - "items": { - "$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue" - }, - "type": "array" } }, "type": "object" @@ -4050,7 +4032,7 @@ }, "GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult": { "deprecated": true, - "description": "Recent search of this user.", + "description": "Deprecated: Recent search of this user.", "id": "GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult", "properties": { "recentSearch": { diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index ee47137825..c4170f5341 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -1901,26 +1901,6 @@ type GoogleCloudRetailV2alphaBranch struct { // branch, provided for different scopes. This field is not populated in // BranchView.BASIC view. ProductCountStats []*GoogleCloudRetailV2alphaBranchProductCountStatistic `json:"productCountStats,omitempty"` - // ProductCounts: Output only. The number of products in different groups that - // this branch has. The key is a group representing a set of products, and the - // value is the number of products in that group. Note: keys in this map may - // change over time. Possible keys: * "primary-in-stock", products have - // Product.Type.PRIMARY type and Product.Availability.IN_STOCK availability. * - // "primary-out-of-stock", products have Product.Type.PRIMARY type and - // Product.Availability.OUT_OF_STOCK availability. * "primary-preorder", - // products have Product.Type.PRIMARY type and Product.Availability.PREORDER - // availability. * "primary-backorder", products have Product.Type.PRIMARY type - // and Product.Availability.BACKORDER availability. * "variant-in-stock", - // products have Product.Type.VARIANT type and Product.Availability.IN_STOCK - // availability. * "variant-out-of-stock", products have Product.Type.VARIANT - // type and Product.Availability.OUT_OF_STOCK availability. * - // "variant-preorder", products have Product.Type.VARIANT type and - // Product.Availability.PREORDER availability. * "variant-backorder", products - // have Product.Type.VARIANT type and Product.Availability.BACKORDER - // availability. * "price-discounted", products have [Product.price_info.price] - // < [Product.price_info.original_price]. This field is not populated in - // BranchView.BASIC view. - ProductCounts map[string]string `json:"productCounts,omitempty"` // QualityMetrics: Output only. The quality metrics measured among products of // this branch. See QualityMetric.requirement_key for supported metrics. // Metrics could be missing if failed to retrieve. This field is not populated @@ -2329,10 +2309,6 @@ type GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacet struct { // path of length 2). This merged facet key needs to be either a textual custom // attribute or a numerical custom attribute. MergedFacetKey string `json:"mergedFacetKey,omitempty"` - // MergedFacetValues: Each instance is a list of facet values that map into the - // same (possibly different) merged facet value. For the current attribute - // config, each facet value should map to at most one merged facet value. - MergedFacetValues []*GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue `json:"mergedFacetValues,omitempty"` // ForceSendFields is a list of field names (e.g. "MergedFacetKey") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2565,8 +2541,8 @@ func (s *GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult) MarshalJ return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult: Recent -// search of this user. +// GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult: Deprecated: +// Recent search of this user. type GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult struct { // RecentSearch: The recent search query. RecentSearch string `json:"recentSearch,omitempty"` diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index c34665b0c6..42a1c52158 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2120,7 +2120,7 @@ } } }, - "revision": "20240610", + "revision": "20240702", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4113,14 +4113,6 @@ "mergedFacetKey": { "description": "The merged facet key should be a valid facet key that is different than the facet key of the current catalog attribute. We refer this is merged facet key as the child of the current catalog attribute. This merged facet key can't be a parent of another facet key (i.e. no directed path of length 2). This merged facet key needs to be either a textual custom attribute or a numerical custom attribute.", "type": "string" - }, - "mergedFacetValues": { - "deprecated": true, - "description": "Each instance is a list of facet values that map into the same (possibly different) merged facet value. For the current attribute config, each facet value should map to at most one merged facet value.", - "items": { - "$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue" - }, - "type": "array" } }, "type": "object" @@ -4228,7 +4220,7 @@ }, "GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult": { "deprecated": true, - "description": "Recent search of this user.", + "description": "Deprecated: Recent search of this user.", "id": "GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult", "properties": { "recentSearch": { diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 727a343ea4..ef1511b13d 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -3192,10 +3192,6 @@ type GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacet struct { // path of length 2). This merged facet key needs to be either a textual custom // attribute or a numerical custom attribute. MergedFacetKey string `json:"mergedFacetKey,omitempty"` - // MergedFacetValues: Each instance is a list of facet values that map into the - // same (possibly different) merged facet value. For the current attribute - // config, each facet value should map to at most one merged facet value. - MergedFacetValues []*GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue `json:"mergedFacetValues,omitempty"` // ForceSendFields is a list of field names (e.g. "MergedFacetKey") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3391,8 +3387,8 @@ func (s *GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult) MarshalJS return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult: Recent -// search of this user. +// GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult: Deprecated: +// Recent search of this user. type GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult struct { // RecentSearch: The recent search query. RecentSearch string `json:"recentSearch,omitempty"` diff --git a/tagmanager/v2/tagmanager-api.json b/tagmanager/v2/tagmanager-api.json index 7d5c3a28b2..ac0c2e0afa 100644 --- a/tagmanager/v2/tagmanager-api.json +++ b/tagmanager/v2/tagmanager-api.json @@ -374,14 +374,19 @@ ] }, "lookup": { - "description": "Looks up a Container by destination ID.", + "description": "Looks up a Container by destination ID or tag ID.", "flatPath": "tagmanager/v2/accounts/containers:lookup", "httpMethod": "GET", "id": "tagmanager.accounts.containers.lookup", "parameterOrder": [], "parameters": { "destinationId": { - "description": "Destination ID linked to a GTM Container, e.g. AW-123456789. Example: accounts/containers:lookup?destination_id={destination_id}.", + "description": "Destination ID linked to a GTM Container, e.g. AW-123456789. Example: accounts/containers:lookup?destination_id={destination_id}. Only one of destination_id or tag_id should be set.", + "location": "query", + "type": "string" + }, + "tagId": { + "description": "Tag ID for a GTM Container, e.g. GTM-123456789. Example: accounts/containers:lookup?tag_id={tag_id}. Only one of destination_id or tag_id should be set.", "location": "query", "type": "string" } @@ -3890,7 +3895,7 @@ } } }, - "revision": "20240610", + "revision": "20240701", "rootUrl": "https://tagmanager.googleapis.com/", "schemas": { "Account": { diff --git a/tagmanager/v2/tagmanager-gen.go b/tagmanager/v2/tagmanager-gen.go index 26379cc702..7e76e0267d 100644 --- a/tagmanager/v2/tagmanager-gen.go +++ b/tagmanager/v2/tagmanager-gen.go @@ -4167,7 +4167,7 @@ type AccountsContainersLookupCall struct { header_ http.Header } -// Lookup: Looks up a Container by destination ID. +// Lookup: Looks up a Container by destination ID or tag ID. func (r *AccountsContainersService) Lookup() *AccountsContainersLookupCall { c := &AccountsContainersLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -4175,12 +4175,21 @@ func (r *AccountsContainersService) Lookup() *AccountsContainersLookupCall { // DestinationId sets the optional parameter "destinationId": Destination ID // linked to a GTM Container, e.g. AW-123456789. Example: -// accounts/containers:lookup?destination_id={destination_id}. +// accounts/containers:lookup?destination_id={destination_id}. Only one of +// destination_id or tag_id should be set. func (c *AccountsContainersLookupCall) DestinationId(destinationId string) *AccountsContainersLookupCall { c.urlParams_.Set("destinationId", destinationId) return c } +// TagId sets the optional parameter "tagId": Tag ID for a GTM Container, e.g. +// GTM-123456789. Example: accounts/containers:lookup?tag_id={tag_id}. Only one +// of destination_id or tag_id should be set. +func (c *AccountsContainersLookupCall) TagId(tagId string) *AccountsContainersLookupCall { + c.urlParams_.Set("tagId", tagId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details.