diff --git a/addressvalidation/v1/addressvalidation-api.json b/addressvalidation/v1/addressvalidation-api.json index b9273dea29..00ed64208d 100644 --- a/addressvalidation/v1/addressvalidation-api.json +++ b/addressvalidation/v1/addressvalidation-api.json @@ -151,7 +151,7 @@ } } }, - "revision": "20241106", + "revision": "20241110", "rootUrl": "https://addressvalidation.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -181,7 +181,7 @@ "type": "array" }, "formattedAddress": { - "description": "The post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located. Note: the format of this address may not match the format of the address in the `postal_address` field. For example, the `postal_address` will always represent the country as a 2 letter `region_code` (ex. \"US\" or \"CA\"), whereas this field will use a longer form of the country name (ex. \"USA or \"Canada\").", + "description": "The post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located. Note: the format of this address may not match the format of the address in the `postal_address` field. For example, the `postal_address` always represents the country as a 2 letter `region_code`, such as \"US\" or \"NZ\". By contrast, this field uses a longer form of the country name, such as \"USA\" or \"New Zealand\".", "type": "string" }, "missingComponentTypes": { @@ -203,7 +203,7 @@ "type": "array" }, "unresolvedTokens": { - "description": "Any tokens in the input that could not be resolved. This might be an input that was not recognized as a valid part of an address (for example in an input like \"Parcel 0000123123 \u0026 0000456456 Str # Guthrie Center IA 50115 US\", the unresolved tokens may look like `[\"Parcel\", \"0000123123\", \"\u0026\", \"0000456456\"]`.", + "description": "Any tokens in the input that could not be resolved. This might be an input that was not recognized as a valid part of an address. For example, for an input such as \"Parcel 0000123123 \u0026 0000456456 Str # Guthrie Center IA 50115 US\", the unresolved tokens might look like `[\"Parcel\", \"0000123123\", \"\u0026\", \"0000456456\"]`.", "items": { "type": "string" }, diff --git a/addressvalidation/v1/addressvalidation-gen.go b/addressvalidation/v1/addressvalidation-gen.go index df43fc256c..1d038133e2 100644 --- a/addressvalidation/v1/addressvalidation-gen.go +++ b/addressvalidation/v1/addressvalidation-gen.go @@ -226,9 +226,9 @@ type GoogleMapsAddressvalidationV1Address struct { // address following the address formatting rules of the region where the // address is located. Note: the format of this address may not match the // format of the address in the `postal_address` field. For example, the - // `postal_address` will always represent the country as a 2 letter - // `region_code` (ex. "US" or "CA"), whereas this field will use a longer form - // of the country name (ex. "USA or "Canada"). + // `postal_address` always represents the country as a 2 letter `region_code`, + // such as "US" or "NZ". By contrast, this field uses a longer form of the + // country name, such as "USA" or "New Zealand". FormattedAddress string `json:"formattedAddress,omitempty"` // MissingComponentTypes: The types of components that were expected to be // present in a correctly formatted mailing address but were not found in the @@ -249,9 +249,9 @@ type GoogleMapsAddressvalidationV1Address struct { // (https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types). UnconfirmedComponentTypes []string `json:"unconfirmedComponentTypes,omitempty"` // UnresolvedTokens: Any tokens in the input that could not be resolved. This - // might be an input that was not recognized as a valid part of an address (for - // example in an input like "Parcel 0000123123 & 0000456456 Str # Guthrie - // Center IA 50115 US", the unresolved tokens may look like `["Parcel", + // might be an input that was not recognized as a valid part of an address. For + // example, for an input such as "Parcel 0000123123 & 0000456456 Str # Guthrie + // Center IA 50115 US", the unresolved tokens might look like `["Parcel", // "0000123123", "&", "0000456456"]`. UnresolvedTokens []string `json:"unresolvedTokens,omitempty"` // ForceSendFields is a list of field names (e.g. "AddressComponents") to diff --git a/cloudbilling/v1beta/cloudbilling-api.json b/cloudbilling/v1beta/cloudbilling-api.json index df4005438d..03ff02ce4d 100644 --- a/cloudbilling/v1beta/cloudbilling-api.json +++ b/cloudbilling/v1beta/cloudbilling-api.json @@ -761,7 +761,7 @@ } } }, - "revision": "20240906", + "revision": "20241106", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "CacheFillRegions": { @@ -1245,7 +1245,7 @@ "type": "object" }, "Decimal": { - "description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html", + "description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html) or Python's [decimal.Decimal](https://docs.python.org/3/library/decimal.html).", "id": "Decimal", "properties": { "value": { diff --git a/cloudbilling/v1beta/cloudbilling-gen.go b/cloudbilling/v1beta/cloudbilling-gen.go index 4ef31c6143..8858a08097 100644 --- a/cloudbilling/v1beta/cloudbilling-gen.go +++ b/cloudbilling/v1beta/cloudbilling-gen.go @@ -896,9 +896,10 @@ func (s *CustomMachineType) UnmarshalJSON(data []byte) error { // Decimal: A representation of a decimal value, such as 2.5. Clients may // convert values into language-native decimal formats, such as Java's -// BigDecimal or Python's decimal.Decimal. [BigDecimal]: -// https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html -// [decimal.Decimal]: https://docs.python.org/3/library/decimal.html +// BigDecimal +// (https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html) +// or Python's decimal.Decimal +// (https://docs.python.org/3/library/decimal.html). type Decimal struct { // Value: The decimal value, as a string. The string representation consists of // an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 85f3b758a0..2adba27ecd 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -2289,7 +2289,7 @@ } } }, - "revision": "20241102", + "revision": "20241109", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -2628,7 +2628,7 @@ "type": "boolean" }, "owned": { - "description": "Returns true if the Cloud Identity account is associated with a customer of the Channel Services partner.", + "description": "Returns true if the Cloud Identity account is associated with a customer of the Channel Services partner (with active subscriptions or purchase consents).", "type": "boolean" } }, diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 9561c434cf..4c0bca4e27 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -837,7 +837,8 @@ type GoogleCloudChannelV1CloudIdentityCustomerAccount struct { // domain. Existing bool `json:"existing,omitempty"` // Owned: Returns true if the Cloud Identity account is associated with a - // customer of the Channel Services partner. + // customer of the Channel Services partner (with active subscriptions or + // purchase consents). Owned bool `json:"owned,omitempty"` // ForceSendFields is a list of field names (e.g. // "ChannelPartnerCloudIdentityId") to unconditionally include in API requests. diff --git a/deploymentmanager/v0.alpha/deploymentmanager-api.json b/deploymentmanager/v0.alpha/deploymentmanager-api.json index 45f006258d..d185c287ea 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-api.json +++ b/deploymentmanager/v0.alpha/deploymentmanager-api.json @@ -1676,7 +1676,7 @@ } } }, - "revision": "20241031", + "revision": "20241111", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -2214,7 +2214,7 @@ "description": "The logical grouping to which the \"reason\" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: \"pubsub.googleapis.com\". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is \"googleapis.com\".", "type": "string" }, - "metadata": { + "metadatas": { "additionalProperties": { "type": "string" }, diff --git a/deploymentmanager/v0.alpha/deploymentmanager-gen.go b/deploymentmanager/v0.alpha/deploymentmanager-gen.go index 5866d5c3f2..cc3ef8724c 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-gen.go +++ b/deploymentmanager/v0.alpha/deploymentmanager-gen.go @@ -1066,14 +1066,14 @@ type ErrorInfo struct { // unique value that identifies the infrastructure. For Google API // infrastructure, the error domain is "googleapis.com". Domain string `json:"domain,omitempty"` - // Metadata: Additional structured details about this error. Keys must match + // Metadatas: Additional structured details about this error. Keys must match // /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 // characters in length. When identifying the current value of an exceeded // limit, the units should be contained in the key, not the value. For example, // rather than {"instanceLimit": "100/request"}, should be returned as, // {"instanceLimitPerRequest": "100"}, if the client exceeds the number of // instances that can be created in a single (batch) request. - Metadata map[string]string `json:"metadata,omitempty"` + Metadatas map[string]string `json:"metadatas,omitempty"` // Reason: The reason of the error. This is a constant value that identifies // the proximate cause of the error. Error reasons are unique within a // particular domain of errors. This should be at most 63 characters and match diff --git a/deploymentmanager/v2/deploymentmanager-api.json b/deploymentmanager/v2/deploymentmanager-api.json index 64c0e4ba95..629e63dbbc 100644 --- a/deploymentmanager/v2/deploymentmanager-api.json +++ b/deploymentmanager/v2/deploymentmanager-api.json @@ -1028,7 +1028,7 @@ } } }, - "revision": "20241031", + "revision": "20241111", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -1328,7 +1328,7 @@ "description": "The logical grouping to which the \"reason\" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: \"pubsub.googleapis.com\". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is \"googleapis.com\".", "type": "string" }, - "metadata": { + "metadatas": { "additionalProperties": { "type": "string" }, diff --git a/deploymentmanager/v2/deploymentmanager-gen.go b/deploymentmanager/v2/deploymentmanager-gen.go index 7502ed6dae..a0d79e3305 100644 --- a/deploymentmanager/v2/deploymentmanager-gen.go +++ b/deploymentmanager/v2/deploymentmanager-gen.go @@ -740,14 +740,14 @@ type ErrorInfo struct { // unique value that identifies the infrastructure. For Google API // infrastructure, the error domain is "googleapis.com". Domain string `json:"domain,omitempty"` - // Metadata: Additional structured details about this error. Keys must match + // Metadatas: Additional structured details about this error. Keys must match // /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 // characters in length. When identifying the current value of an exceeded // limit, the units should be contained in the key, not the value. For example, // rather than {"instanceLimit": "100/request"}, should be returned as, // {"instanceLimitPerRequest": "100"}, if the client exceeds the number of // instances that can be created in a single (batch) request. - Metadata map[string]string `json:"metadata,omitempty"` + Metadatas map[string]string `json:"metadatas,omitempty"` // Reason: The reason of the error. This is a constant value that identifies // the proximate cause of the error. Error reasons are unique within a // particular domain of errors. This should be at most 63 characters and match diff --git a/deploymentmanager/v2beta/deploymentmanager-api.json b/deploymentmanager/v2beta/deploymentmanager-api.json index efc35b121e..9e9bd744c9 100644 --- a/deploymentmanager/v2beta/deploymentmanager-api.json +++ b/deploymentmanager/v2beta/deploymentmanager-api.json @@ -1636,7 +1636,7 @@ } } }, - "revision": "20241031", + "revision": "20241111", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -2140,7 +2140,7 @@ "description": "The logical grouping to which the \"reason\" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: \"pubsub.googleapis.com\". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is \"googleapis.com\".", "type": "string" }, - "metadata": { + "metadatas": { "additionalProperties": { "type": "string" }, diff --git a/deploymentmanager/v2beta/deploymentmanager-gen.go b/deploymentmanager/v2beta/deploymentmanager-gen.go index 9e4452828f..5242f5d4b0 100644 --- a/deploymentmanager/v2beta/deploymentmanager-gen.go +++ b/deploymentmanager/v2beta/deploymentmanager-gen.go @@ -1031,14 +1031,14 @@ type ErrorInfo struct { // unique value that identifies the infrastructure. For Google API // infrastructure, the error domain is "googleapis.com". Domain string `json:"domain,omitempty"` - // Metadata: Additional structured details about this error. Keys must match + // Metadatas: Additional structured details about this error. Keys must match // /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 // characters in length. When identifying the current value of an exceeded // limit, the units should be contained in the key, not the value. For example, // rather than {"instanceLimit": "100/request"}, should be returned as, // {"instanceLimitPerRequest": "100"}, if the client exceeds the number of // instances that can be created in a single (batch) request. - Metadata map[string]string `json:"metadata,omitempty"` + Metadatas map[string]string `json:"metadatas,omitempty"` // Reason: The reason of the error. This is a constant value that identifies // the proximate cause of the error. Error reasons are unique within a // particular domain of errors. This should be at most 63 characters and match diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 1533b45d8a..ef388c2a9b 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -15,6 +15,28 @@ "description": "Discovery Engine API.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/generative-ai-app-builder/docs/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.us.rep.googleapis.com/", + "location": "us" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.eu.rep.googleapis.com/", + "location": "eu" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -5952,6 +5974,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "import": { + "description": "Bulk import of user events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/userEvents:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.userEvents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/userEvents:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1ImportUserEventsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "write": { "description": "Writes a single user event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/userEvents:write", @@ -6090,7 +6140,7 @@ } } }, - "revision": "20241031", + "revision": "20241110", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -6763,6 +6813,20 @@ "description": "Grounding specification.", "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestGroundingSpec", "properties": { + "filteringLevel": { + "description": "Optional. Specifies whether to enable the filtering based on grounding score and at what level.", + "enum": [ + "FILTERING_LEVEL_UNSPECIFIED", + "FILTERING_LEVEL_LOW", + "FILTERING_LEVEL_HIGH" + ], + "enumDescriptions": [ + "Default is no filter", + "Filter answers based on a low threshold.", + "Filter answers based on a high threshold." + ], + "type": "string" + }, "includeGroundingSupports": { "description": "Optional. Specifies whether to include grounding_supports in the answer. The default value is `false`. When this field is set to `true`, returned answer will have `grounding_score` and will contain GroundingSupports for each claim.", "type": "boolean" @@ -6904,7 +6968,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" } @@ -7815,7 +7879,7 @@ "type": "integer" }, "groundingCheckRequired": { - "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, anti_citation_indices, and score should not be returned.", + "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices should not be returned.", "type": "boolean" }, "startPos": { @@ -7877,7 +7941,7 @@ "description": "Page span of the chunk." }, "relevanceScore": { - "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.", + "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse.", "format": "double", "readOnly": true, "type": "number" @@ -9006,6 +9070,11 @@ "description": "Detailed document information associated with a user event.", "id": "GoogleCloudDiscoveryengineV1DocumentInfo", "properties": { + "conversionValue": { + "description": "Optional. The conversion value associated with this Document. Must be set if UserEvent.event_type is \"conversion\". For example, a value of 1000 signifies that 1000 seconds were spent viewing a Document for the `watch` conversion type.", + "format": "float", + "type": "number" + }, "id": { "description": "The Document resource ID.", "type": "string" @@ -9382,80 +9451,6 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1Feedback": { - "description": "Information about the user feedback. This information will be used for logging and metrics purpose.", - "id": "GoogleCloudDiscoveryengineV1Feedback", - "properties": { - "comment": { - "description": "Optional. The additional user comment of the feedback if user gives a thumb down.", - "type": "string" - }, - "conversationInfo": { - "$ref": "GoogleCloudDiscoveryengineV1FeedbackConversationInfo", - "description": "The related conversation information when user gives feedback." - }, - "feedbackType": { - "description": "Required. Indicate whether the user gives a positive or negative feedback. If the user gives a negative feedback, there might be more feedback details.", - "enum": [ - "FEEDBACK_TYPE_UNSPECIFIED", - "LIKE", - "DISLIKE" - ], - "enumDescriptions": [ - "Unspecified feedback type.", - "The user gives a positive feedback.", - "The user gives a negative feedback." - ], - "type": "string" - }, - "llmModelVersion": { - "description": "The version of the LLM model that was used to generate the response.", - "type": "string" - }, - "reasons": { - "description": "Optional. The reason if user gives a thumb down.", - "items": { - "enum": [ - "REASON_UNSPECIFIED", - "INACCURATE_RESPONSE", - "NOT_RELEVANT", - "INCOMPREHENSIVE", - "OFFENSIVE_OR_UNSAFE", - "BAD_CIATION", - "FORMAT_AND_STYLES" - ], - "enumDescriptions": [ - "Unspecified reason.", - "The response is inaccurate.", - "The response is not relevant.", - "The response is incomprehensive.", - "The response is offensive or unsafe.", - "The response is not well-associated with the query.", - "The response is not well-formatted." - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1FeedbackConversationInfo": { - "description": "The conversation information such as the question index and session name.", - "id": "GoogleCloudDiscoveryengineV1FeedbackConversationInfo", - "properties": { - "questionIndex": { - "description": "The index of the user input within the conversation messages.", - "format": "int32", - "type": "integer" - }, - "session": { - "description": "Name of the newly generated or continued session.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse": { "description": "Response message for SiteSearchEngineService.FetchDomainVerificationStatus method.", "id": "GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse", @@ -10590,7 +10585,7 @@ "type": "string" }, "score": { - "description": "The score of this record based on the given query and selected model.", + "description": "The score of this record based on the given query and selected model. The score will be rounded to 2 decimal places. If the score is close to 0, it will be rounded to 0.0001 to avoid returning unset.", "format": "float", "type": "number" }, @@ -11000,7 +10995,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" }, @@ -11723,6 +11718,11 @@ "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", "type": "string" }, + "detailedAnswer": { + "$ref": "GoogleCloudDiscoveryengineV1Answer", + "description": "Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.", + "readOnly": true + }, "query": { "$ref": "GoogleCloudDiscoveryengineV1Query", "description": "The user query." @@ -12140,6 +12140,10 @@ "$ref": "GoogleCloudDiscoveryengineV1CompletionInfo", "description": "CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "conversionType": { + "description": "Optional. Conversion type. Required if UserEvent.event_type is `conversion`. This is a customer-defined conversion name in lowercase letters or numbers separated by \"-\", such as \"watch\", \"good-visit\" etc. Do not set the field if UserEvent.event_type is not `conversion`. This mixes the custom conversion event with predefined events like `search`, `view-item` etc.", + "type": "string" + }, "dataStore": { "description": "The DataStore resource full name, of the form `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. Optional. Only required for user events whose data store can't by determined by UserEvent.engine or UserEvent.documents. If data store is set in the parent of write/import/collect user event requests, this field can be omitted.", "type": "string" @@ -12165,13 +12169,9 @@ "type": "string" }, "eventType": { - "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans * `add-feedback`: Add a user feedback. Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc.", + "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans * `add-feedback`: Add a user feedback. Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. Custom conversion value: * `conversion`: Customer defined conversion event.", "type": "string" }, - "feedback": { - "$ref": "GoogleCloudDiscoveryengineV1Feedback", - "description": "Optional. This field is optional except for the `add-feedback` event types." - }, "filter": { "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" @@ -15491,7 +15491,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" }, @@ -15965,6 +15965,11 @@ "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", "type": "string" }, + "detailedAnswer": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer", + "description": "Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.", + "readOnly": true + }, "query": { "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", "description": "The user query." @@ -18338,7 +18343,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" }, diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 1fe1f51b94..6ebbc8a0b9 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -1906,20 +1906,28 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpecPrompt // GoogleCloudDiscoveryengineV1AnswerQueryRequestGroundingSpec: Grounding // specification. type GoogleCloudDiscoveryengineV1AnswerQueryRequestGroundingSpec struct { + // FilteringLevel: Optional. Specifies whether to enable the filtering based on + // grounding score and at what level. + // + // Possible values: + // "FILTERING_LEVEL_UNSPECIFIED" - Default is no filter + // "FILTERING_LEVEL_LOW" - Filter answers based on a low threshold. + // "FILTERING_LEVEL_HIGH" - Filter answers based on a high threshold. + FilteringLevel string `json:"filteringLevel,omitempty"` // IncludeGroundingSupports: Optional. Specifies whether to include // grounding_supports in the answer. The default value is `false`. When this // field is set to `true`, returned answer will have `grounding_score` and will // contain GroundingSupports for each claim. IncludeGroundingSupports bool `json:"includeGroundingSupports,omitempty"` - // ForceSendFields is a list of field names (e.g. "IncludeGroundingSupports") - // to unconditionally include in API requests. By default, fields with empty or + // ForceSendFields is a list of field names (e.g. "FilteringLevel") 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. "IncludeGroundingSupports") 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. "FilteringLevel") 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:"-"` } @@ -2126,7 +2134,7 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchParams struct // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with empty or @@ -3392,8 +3400,7 @@ type GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim struct { // GroundingCheckRequired: Indicates that this claim required grounding check. // When the system decided this claim doesn't require attribution/grounding // check, this field will be set to false. In that case, no grounding check was - // done for the claim and therefore citation_indices, anti_citation_indices, - // and score should not be returned. + // done for the claim and therefore citation_indices should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. @@ -3481,7 +3488,7 @@ type GoogleCloudDiscoveryengineV1Chunk struct { PageSpan *GoogleCloudDiscoveryengineV1ChunkPageSpan `json:"pageSpan,omitempty"` // RelevanceScore: Output only. Represents the relevance score based on // similarity. Higher score indicates higher chunk relevance. The score is in - // range [-1.0, 1.0]. Only populated on SearchService.SearchResponse. + // range [-1.0, 1.0]. Only populated on SearchResponse. RelevanceScore float64 `json:"relevanceScore,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkMetadata") to // unconditionally include in API requests. By default, fields with empty or @@ -4991,6 +4998,11 @@ func (s GoogleCloudDiscoveryengineV1DocumentIndexStatus) MarshalJSON() ([]byte, // GoogleCloudDiscoveryengineV1DocumentInfo: Detailed document information // associated with a user event. type GoogleCloudDiscoveryengineV1DocumentInfo struct { + // ConversionValue: Optional. The conversion value associated with this + // Document. Must be set if UserEvent.event_type is "conversion". For example, + // a value of 1000 signifies that 1000 seconds were spent viewing a Document + // for the `watch` conversion type. + ConversionValue float64 `json:"conversionValue,omitempty"` // Id: The Document resource ID. Id string `json:"id,omitempty"` // Joined: Output only. Whether the referenced Document can be found in the @@ -5010,15 +5022,15 @@ type GoogleCloudDiscoveryengineV1DocumentInfo struct { Quantity int64 `json:"quantity,omitempty"` // Uri: The Document URI - only allowed for website data stores. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") 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. "ConversionValue") 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. "Id") 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. "ConversionValue") 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:"-"` } @@ -5028,6 +5040,20 @@ func (s GoogleCloudDiscoveryengineV1DocumentInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1DocumentInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1DocumentInfo + var s1 struct { + ConversionValue gensupport.JSONFloat64 `json:"conversionValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConversionValue = float64(s1.ConversionValue) + return nil +} + // GoogleCloudDiscoveryengineV1DocumentProcessingConfig: A singleton resource // of DataStore. If it's empty when DataStore is created and DataStore is set // to DataStore.ContentConfig.CONTENT_REQUIRED, the default parser will default @@ -5506,81 +5532,6 @@ func (s GoogleCloudDiscoveryengineV1FactChunk) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1Feedback: Information about the user feedback. -// This information will be used for logging and metrics purpose. -type GoogleCloudDiscoveryengineV1Feedback struct { - // Comment: Optional. The additional user comment of the feedback if user gives - // a thumb down. - Comment string `json:"comment,omitempty"` - // ConversationInfo: The related conversation information when user gives - // feedback. - ConversationInfo *GoogleCloudDiscoveryengineV1FeedbackConversationInfo `json:"conversationInfo,omitempty"` - // FeedbackType: Required. Indicate whether the user gives a positive or - // negative feedback. If the user gives a negative feedback, there might be - // more feedback details. - // - // Possible values: - // "FEEDBACK_TYPE_UNSPECIFIED" - Unspecified feedback type. - // "LIKE" - The user gives a positive feedback. - // "DISLIKE" - The user gives a negative feedback. - FeedbackType string `json:"feedbackType,omitempty"` - // LlmModelVersion: The version of the LLM model that was used to generate the - // response. - LlmModelVersion string `json:"llmModelVersion,omitempty"` - // Reasons: Optional. The reason if user gives a thumb down. - // - // Possible values: - // "REASON_UNSPECIFIED" - Unspecified reason. - // "INACCURATE_RESPONSE" - The response is inaccurate. - // "NOT_RELEVANT" - The response is not relevant. - // "INCOMPREHENSIVE" - The response is incomprehensive. - // "OFFENSIVE_OR_UNSAFE" - The response is offensive or unsafe. - // "BAD_CIATION" - The response is not well-associated with the query. - // "FORMAT_AND_STYLES" - The response is not well-formatted. - Reasons []string `json:"reasons,omitempty"` - // ForceSendFields is a list of field names (e.g. "Comment") 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. "Comment") 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 GoogleCloudDiscoveryengineV1Feedback) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1Feedback - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1FeedbackConversationInfo: The conversation -// information such as the question index and session name. -type GoogleCloudDiscoveryengineV1FeedbackConversationInfo struct { - // QuestionIndex: The index of the user input within the conversation messages. - QuestionIndex int64 `json:"questionIndex,omitempty"` - // Session: Name of the newly generated or continued session. - Session string `json:"session,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuestionIndex") 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. "QuestionIndex") 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 GoogleCloudDiscoveryengineV1FeedbackConversationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1FeedbackConversationInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse: Response // message for SiteSearchEngineService.FetchDomainVerificationStatus method. type GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse struct { @@ -7247,6 +7198,8 @@ type GoogleCloudDiscoveryengineV1RankingRecord struct { // Id: The unique ID to represent the record. Id string `json:"id,omitempty"` // Score: The score of this record based on the given query and selected model. + // The score will be rounded to 2 decimal places. If the score is close to 0, + // it will be rounded to 0.0001 to avoid returning unset. Score float64 `json:"score,omitempty"` // Title: The title of the record. Empty by default. At least one of title or // content should be set otherwise an INVALID_ARGUMENT error is thrown. @@ -7935,7 +7888,7 @@ type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec struct { // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. @@ -9050,6 +9003,10 @@ type GoogleCloudDiscoveryengineV1SessionTurn struct { // Answer: The resource name of the answer to the user query. Only set if the // answer generation (/answer API call) happened in this turn. Answer string `json:"answer,omitempty"` + // DetailedAnswer: Output only. In ConversationalSearchService.GetSession API, + // if GetSessionRequest.include_answer_details is set to true, this field will + // be populated when getting answer query session. + DetailedAnswer *GoogleCloudDiscoveryengineV1Answer `json:"detailedAnswer,omitempty"` // Query: The user query. Query *GoogleCloudDiscoveryengineV1Query `json:"query,omitempty"` // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally @@ -9671,6 +9628,13 @@ type GoogleCloudDiscoveryengineV1UserEvent struct { // event. This field should be set for `search` event when autocomplete // function is enabled and the user clicks a suggestion for search. CompletionInfo *GoogleCloudDiscoveryengineV1CompletionInfo `json:"completionInfo,omitempty"` + // ConversionType: Optional. Conversion type. Required if UserEvent.event_type + // is `conversion`. This is a customer-defined conversion name in lowercase + // letters or numbers separated by "-", such as "watch", "good-visit" etc. Do + // not set the field if UserEvent.event_type is not `conversion`. This mixes + // the custom conversion event with predefined events like `search`, + // `view-item` etc. + ConversionType string `json:"conversionType,omitempty"` // DataStore: The DataStore resource full name, of the form // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. Optional. Only required for user events whose data @@ -9712,11 +9676,9 @@ type GoogleCloudDiscoveryengineV1UserEvent struct { // e.g. in Retail online shopping * `purchase`: Purchase an item(s) // Media-related values: * `media-play`: Start/resume watching a video, playing // a song, etc. * `media-complete`: Finished or stopped midway through a video, - // song, etc. + // song, etc. Custom conversion value: * `conversion`: Customer defined + // conversion event. EventType string `json:"eventType,omitempty"` - // Feedback: Optional. This field is optional except for the `add-feedback` - // event types. - Feedback *GoogleCloudDiscoveryengineV1Feedback `json:"feedback,omitempty"` // Filter: The filter syntax consists of an expression language for // constructing a predicate from one or more fields of the documents being // filtered. One example is for `search` events, the associated SearchRequest @@ -14153,7 +14115,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. @@ -14933,6 +14895,10 @@ type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { // Answer: The resource name of the answer to the user query. Only set if the // answer generation (/answer API call) happened in this turn. Answer string `json:"answer,omitempty"` + // DetailedAnswer: Output only. In ConversationalSearchService.GetSession API, + // if GetSessionRequest.include_answer_details is set to true, this field will + // be populated when getting answer query session. + DetailedAnswer *GoogleCloudDiscoveryengineV1alphaAnswer `json:"detailedAnswer,omitempty"` // Query: The user query. Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally @@ -18155,7 +18121,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. @@ -41092,6 +41058,114 @@ func (c *ProjectsLocationsUserEventsCollectCall) Do(opts ...googleapi.CallOption return ret, nil } +type ProjectsLocationsUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1importusereventsrequest *GoogleCloudDiscoveryengineV1ImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of user events. Request processing might be synchronous. +// Events that already exist are skipped. Use this method for backfilling +// historical user events. Operation.response is of type ImportResponse. Note +// that it is possible for a subset of the items to be successfully inserted. +// Operation.metadata is of type ImportMetadata. +// +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsUserEventsService) Import(parent string, googleclouddiscoveryenginev1importusereventsrequest *GoogleCloudDiscoveryengineV1ImportUserEventsRequest) *ProjectsLocationsUserEventsImportCall { + c := &ProjectsLocationsUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1importusereventsrequest = googleclouddiscoveryenginev1importusereventsrequest + 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 *ProjectsLocationsUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserEventsImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsUserEventsImportCall { + 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 *ProjectsLocationsUserEventsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserEventsImportCall) 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.googleclouddiscoveryenginev1importusereventsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userEvents:import") + 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 "discoveryengine.projects.locations.userEvents.import" 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 *ProjectsLocationsUserEventsImportCall) 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 ProjectsLocationsUserEventsWriteCall struct { s *Service parent string diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 1ca38c415e..64ff1c327f 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -15,6 +15,28 @@ "description": "Discovery Engine API.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/generative-ai-app-builder/docs/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.us.rep.googleapis.com/", + "location": "us" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.eu.rep.googleapis.com/", + "location": "eu" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -7823,6 +7845,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "import": { + "description": "Bulk import of user events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userEvents:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.userEvents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/userEvents:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "write": { "description": "Writes a single user event.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userEvents:write", @@ -8007,7 +8057,7 @@ } } }, - "revision": "20241031", + "revision": "20241110", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -10719,7 +10769,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" } @@ -11630,7 +11680,7 @@ "type": "integer" }, "groundingCheckRequired": { - "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, anti_citation_indices, and score should not be returned.", + "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices should not be returned.", "type": "boolean" }, "startPos": { @@ -11695,20 +11745,8 @@ "$ref": "GoogleTypeExpr", "description": "The condition for evaluating the requirement result." }, - "requirementResult": { - "description": "Requirement result, e.g. pass or fail.", - "enum": [ - "UNKNOWN", - "SUCCESS", - "FAILURE", - "WARNING" - ], - "enumDescriptions": [ - "The requirement is unknown.", - "The requirement check is passed.", - "The requirement check fails to meet at least one blocking threshold.", - "The requirement check fails at least one warning threshold, but passes all blocking thresholds." - ], + "result": { + "description": "The result of the requirement. It should be one of the `severity` fields in the requirement definition. If any error happens during the evaluation, it will be `UNKNOWN`.", "type": "string" } }, @@ -11781,7 +11819,7 @@ "description": "Page span of the chunk." }, "relevanceScore": { - "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.", + "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse.", "format": "double", "readOnly": true, "type": "number" @@ -13047,6 +13085,11 @@ "description": "Detailed document information associated with a user event.", "id": "GoogleCloudDiscoveryengineV1alphaDocumentInfo", "properties": { + "conversionValue": { + "description": "Optional. The conversion value associated with this Document. Must be set if UserEvent.event_type is \"conversion\". For example, a value of 1000 signifies that 1000 seconds were spent viewing a Document for the `watch` conversion type.", + "format": "float", + "type": "number" + }, "id": { "description": "The Document resource ID.", "type": "string" @@ -13749,80 +13792,6 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFeedback": { - "description": "Information about the user feedback. This information will be used for logging and metrics purpose.", - "id": "GoogleCloudDiscoveryengineV1alphaFeedback", - "properties": { - "comment": { - "description": "Optional. The additional user comment of the feedback if user gives a thumb down.", - "type": "string" - }, - "conversationInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFeedbackConversationInfo", - "description": "The related conversation information when user gives feedback." - }, - "feedbackType": { - "description": "Required. Indicate whether the user gives a positive or negative feedback. If the user gives a negative feedback, there might be more feedback details.", - "enum": [ - "FEEDBACK_TYPE_UNSPECIFIED", - "LIKE", - "DISLIKE" - ], - "enumDescriptions": [ - "Unspecified feedback type.", - "The user gives a positive feedback.", - "The user gives a negative feedback." - ], - "type": "string" - }, - "llmModelVersion": { - "description": "The version of the LLM model that was used to generate the response.", - "type": "string" - }, - "reasons": { - "description": "Optional. The reason if user gives a thumb down.", - "items": { - "enum": [ - "REASON_UNSPECIFIED", - "INACCURATE_RESPONSE", - "NOT_RELEVANT", - "INCOMPREHENSIVE", - "OFFENSIVE_OR_UNSAFE", - "BAD_CIATION", - "FORMAT_AND_STYLES" - ], - "enumDescriptions": [ - "Unspecified reason.", - "The response is inaccurate.", - "The response is not relevant.", - "The response is incomprehensive.", - "The response is offensive or unsafe.", - "The response is not well-associated with the query.", - "The response is not well-formatted." - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaFeedbackConversationInfo": { - "description": "The conversation information such as the question index and session name.", - "id": "GoogleCloudDiscoveryengineV1alphaFeedbackConversationInfo", - "properties": { - "questionIndex": { - "description": "The index of the user input within the conversation messages.", - "format": "int32", - "type": "integer" - }, - "session": { - "description": "Name of the newly generated or continued session.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse": { "description": "Response message for SiteSearchEngineService.FetchDomainVerificationStatus method.", "id": "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse", @@ -15664,7 +15633,7 @@ "type": "string" }, "score": { - "description": "The score of this record based on the given query and selected model.", + "description": "The score of this record based on the given query and selected model. The score will be rounded to 2 decimal places. If the score is close to 0, it will be rounded to 0.0001 to avoid returning unset.", "format": "float", "type": "number" }, @@ -16007,6 +15976,13 @@ }, "type": "array" }, + "severity": { + "description": "The severity of errors if the requirement is not met. It must be ordered from the most strict to the least strict. Examples: * `BLOCKING` * `CRITICAL` * `WARNING` All thresholds in the requirement must have all the severity here.", + "items": { + "type": "string" + }, + "type": "array" + }, "thresholdBindings": { "description": "A list of threshold bindings to be used in `condition`.", "items": { @@ -16059,21 +16035,34 @@ "description": "Specifies a multi-level threshold to apply to apply to a `metric_bindings` in the `condition` CEL expression.", "id": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding", "properties": { - "blockingThreshold": { - "description": "Threshold to trigger a blocking failure. If not met, the requirement will evaluate as a `FAILURE`.", - "format": "double", - "type": "number" - }, "description": { "description": "Human readable description of the corresponding threshold and sub-requirement.", "type": "string" }, + "thresholdValues": { + "description": "The values of the threshold. The values should be ordered from the most strict to the least strict.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue" + }, + "type": "array" + }, "variableId": { "description": "The variable id to be referenced in `condition`. Must be unique across all `metric_bindings` and `threshold_bindings`.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue": { + "description": "Specifies a threshold value for a given severity.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue", + "properties": { + "severity": { + "description": "The severity of errors if the threshold is not met. It should be one of the `severity` fields in the requirement.", + "type": "string" }, - "warningThreshold": { - "description": "Threshold to trigger a warning. If not met, the requirement will evaluate as a `WARNING`.", + "value": { + "description": "The value of the threshold.", "format": "double", "type": "number" } @@ -16528,7 +16517,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" }, @@ -17807,6 +17796,11 @@ "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", "type": "string" }, + "detailedAnswer": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer", + "description": "Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.", + "readOnly": true + }, "query": { "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", "description": "The user query." @@ -18322,6 +18316,10 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", "description": "CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "conversionType": { + "description": "Optional. Conversion type. Required if UserEvent.event_type is `conversion`. This is a customer-defined conversion name in lowercase letters or numbers separated by \"-\", such as \"watch\", \"good-visit\" etc. Do not set the field if UserEvent.event_type is not `conversion`. This mixes the custom conversion event with predefined events like `search`, `view-item` etc.", + "type": "string" + }, "dataStore": { "description": "The DataStore resource full name, of the form `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. Optional. Only required for user events whose data store can't by determined by UserEvent.engine or UserEvent.documents. If data store is set in the parent of write/import/collect user event requests, this field can be omitted.", "type": "string" @@ -18347,13 +18345,9 @@ "type": "string" }, "eventType": { - "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans * `add-feedback`: Add a user feedback. Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc.", + "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans * `add-feedback`: Add a user feedback. Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. Custom conversion value: * `conversion`: Customer defined conversion event.", "type": "string" }, - "feedback": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFeedback", - "description": "Optional. This field is optional except for the `add-feedback` event types." - }, "filter": { "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" @@ -20486,7 +20480,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" }, diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 7db15980c2..bb3a7fd549 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -4820,7 +4820,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams s // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with empty or @@ -6090,8 +6090,7 @@ type GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim struct { // GroundingCheckRequired: Indicates that this claim required grounding check. // When the system decided this claim doesn't require attribution/grounding // check, this field will be set to false. In that case, no grounding check was - // done for the claim and therefore citation_indices, anti_citation_indices, - // and score should not be returned. + // done for the claim and therefore citation_indices should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. @@ -6208,16 +6207,10 @@ type GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse struct { Requirement *GoogleCloudDiscoveryengineV1alphaRequirement `json:"requirement,omitempty"` // RequirementCondition: The condition for evaluating the requirement result. RequirementCondition *GoogleTypeExpr `json:"requirementCondition,omitempty"` - // RequirementResult: Requirement result, e.g. pass or fail. - // - // Possible values: - // "UNKNOWN" - The requirement is unknown. - // "SUCCESS" - The requirement check is passed. - // "FAILURE" - The requirement check fails to meet at least one blocking - // threshold. - // "WARNING" - The requirement check fails at least one warning threshold, - // but passes all blocking thresholds. - RequirementResult string `json:"requirementResult,omitempty"` + // Result: The result of the requirement. It should be one of the `severity` + // fields in the requirement definition. If any error happens during the + // evaluation, it will be `UNKNOWN`. + Result string `json:"result,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -6297,7 +6290,7 @@ type GoogleCloudDiscoveryengineV1alphaChunk struct { PageSpan *GoogleCloudDiscoveryengineV1alphaChunkPageSpan `json:"pageSpan,omitempty"` // RelevanceScore: Output only. Represents the relevance score based on // similarity. Higher score indicates higher chunk relevance. The score is in - // range [-1.0, 1.0]. Only populated on SearchService.SearchResponse. + // range [-1.0, 1.0]. Only populated on SearchResponse. RelevanceScore float64 `json:"relevanceScore,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -8029,6 +8022,11 @@ func (s GoogleCloudDiscoveryengineV1alphaDocumentIndexStatus) MarshalJSON() ([]b // GoogleCloudDiscoveryengineV1alphaDocumentInfo: Detailed document information // associated with a user event. type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { + // ConversionValue: Optional. The conversion value associated with this + // Document. Must be set if UserEvent.event_type is "conversion". For example, + // a value of 1000 signifies that 1000 seconds were spent viewing a Document + // for the `watch` conversion type. + ConversionValue float64 `json:"conversionValue,omitempty"` // Id: The Document resource ID. Id string `json:"id,omitempty"` // Joined: Output only. Whether the referenced Document can be found in the @@ -8048,15 +8046,15 @@ type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { Quantity int64 `json:"quantity,omitempty"` // Uri: The Document URI - only allowed for website data stores. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") 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. "ConversionValue") 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. "Id") 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. "ConversionValue") 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:"-"` } @@ -8066,6 +8064,20 @@ func (s GoogleCloudDiscoveryengineV1alphaDocumentInfo) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaDocumentInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentInfo + var s1 struct { + ConversionValue gensupport.JSONFloat64 `json:"conversionValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConversionValue = float64(s1.ConversionValue) + return nil +} + // GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig: A singleton // resource of DataStore. If it's empty when DataStore is created and DataStore // is set to DataStore.ContentConfig.CONTENT_REQUIRED, the default parser will @@ -9041,81 +9053,6 @@ func (s GoogleCloudDiscoveryengineV1alphaFactChunk) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaFeedback: Information about the user -// feedback. This information will be used for logging and metrics purpose. -type GoogleCloudDiscoveryengineV1alphaFeedback struct { - // Comment: Optional. The additional user comment of the feedback if user gives - // a thumb down. - Comment string `json:"comment,omitempty"` - // ConversationInfo: The related conversation information when user gives - // feedback. - ConversationInfo *GoogleCloudDiscoveryengineV1alphaFeedbackConversationInfo `json:"conversationInfo,omitempty"` - // FeedbackType: Required. Indicate whether the user gives a positive or - // negative feedback. If the user gives a negative feedback, there might be - // more feedback details. - // - // Possible values: - // "FEEDBACK_TYPE_UNSPECIFIED" - Unspecified feedback type. - // "LIKE" - The user gives a positive feedback. - // "DISLIKE" - The user gives a negative feedback. - FeedbackType string `json:"feedbackType,omitempty"` - // LlmModelVersion: The version of the LLM model that was used to generate the - // response. - LlmModelVersion string `json:"llmModelVersion,omitempty"` - // Reasons: Optional. The reason if user gives a thumb down. - // - // Possible values: - // "REASON_UNSPECIFIED" - Unspecified reason. - // "INACCURATE_RESPONSE" - The response is inaccurate. - // "NOT_RELEVANT" - The response is not relevant. - // "INCOMPREHENSIVE" - The response is incomprehensive. - // "OFFENSIVE_OR_UNSAFE" - The response is offensive or unsafe. - // "BAD_CIATION" - The response is not well-associated with the query. - // "FORMAT_AND_STYLES" - The response is not well-formatted. - Reasons []string `json:"reasons,omitempty"` - // ForceSendFields is a list of field names (e.g. "Comment") 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. "Comment") 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 GoogleCloudDiscoveryengineV1alphaFeedback) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFeedback - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaFeedbackConversationInfo: The conversation -// information such as the question index and session name. -type GoogleCloudDiscoveryengineV1alphaFeedbackConversationInfo struct { - // QuestionIndex: The index of the user input within the conversation messages. - QuestionIndex int64 `json:"questionIndex,omitempty"` - // Session: Name of the newly generated or continued session. - Session string `json:"session,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuestionIndex") 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. "QuestionIndex") 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 GoogleCloudDiscoveryengineV1alphaFeedbackConversationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFeedbackConversationInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse: // Response message for SiteSearchEngineService.FetchDomainVerificationStatus // method. @@ -11829,6 +11766,8 @@ type GoogleCloudDiscoveryengineV1alphaRankingRecord struct { // Id: The unique ID to represent the record. Id string `json:"id,omitempty"` // Score: The score of this record based on the given query and selected model. + // The score will be rounded to 2 decimal places. If the score is close to 0, + // it will be rounded to 0.0001 to avoid returning unset. Score float64 `json:"score,omitempty"` // Title: The title of the record. Empty by default. At least one of title or // content should be set otherwise an INVALID_ARGUMENT error is thrown. @@ -12286,6 +12225,11 @@ type GoogleCloudDiscoveryengineV1alphaRequirement struct { DisplayName string `json:"displayName,omitempty"` // MetricBindings: A list of the metric bindings to be used in `condition`. MetricBindings []*GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding `json:"metricBindings,omitempty"` + // Severity: The severity of errors if the requirement is not met. It must be + // ordered from the most strict to the least strict. Examples: * `BLOCKING` * + // `CRITICAL` * `WARNING` All thresholds in the requirement must have all the + // severity here. + Severity []string `json:"severity,omitempty"` // ThresholdBindings: A list of threshold bindings to be used in `condition`. ThresholdBindings []*GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding `json:"thresholdBindings,omitempty"` // Type: The requirement type, used as an identifier. Must be unique. The type @@ -12354,27 +12298,24 @@ func (s GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding) MarshalJSON() // multi-level threshold to apply to apply to a `metric_bindings` in the // `condition` CEL expression. type GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding struct { - // BlockingThreshold: Threshold to trigger a blocking failure. If not met, the - // requirement will evaluate as a `FAILURE`. - BlockingThreshold float64 `json:"blockingThreshold,omitempty"` // Description: Human readable description of the corresponding threshold and // sub-requirement. Description string `json:"description,omitempty"` + // ThresholdValues: The values of the threshold. The values should be ordered + // from the most strict to the least strict. + ThresholdValues []*GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue `json:"thresholdValues,omitempty"` // VariableId: The variable id to be referenced in `condition`. Must be unique // across all `metric_bindings` and `threshold_bindings`. VariableId string `json:"variableId,omitempty"` - // WarningThreshold: Threshold to trigger a warning. If not met, the - // requirement will evaluate as a `WARNING`. - WarningThreshold float64 `json:"warningThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockingThreshold") to + // ForceSendFields is a list of field names (e.g. "Description") 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. "BlockingThreshold") 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. "Description") 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:"-"` } @@ -12384,19 +12325,43 @@ func (s GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding +// GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue: +// Specifies a threshold value for a given severity. +type GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue struct { + // Severity: The severity of errors if the threshold is not met. It should be + // one of the `severity` fields in the requirement. + Severity string `json:"severity,omitempty"` + // Value: The value of the threshold. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Severity") 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. "Severity") 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 GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaRequirementThresholdBindingThresholdValue var s1 struct { - BlockingThreshold gensupport.JSONFloat64 `json:"blockingThreshold"` - WarningThreshold gensupport.JSONFloat64 `json:"warningThreshold"` + Value gensupport.JSONFloat64 `json:"value"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.BlockingThreshold = float64(s1.BlockingThreshold) - s.WarningThreshold = float64(s1.WarningThreshold) + s.Value = float64(s1.Value) return nil } @@ -13090,7 +13055,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. @@ -14969,6 +14934,10 @@ type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { // Answer: The resource name of the answer to the user query. Only set if the // answer generation (/answer API call) happened in this turn. Answer string `json:"answer,omitempty"` + // DetailedAnswer: Output only. In ConversationalSearchService.GetSession API, + // if GetSessionRequest.include_answer_details is set to true, this field will + // be populated when getting answer query session. + DetailedAnswer *GoogleCloudDiscoveryengineV1alphaAnswer `json:"detailedAnswer,omitempty"` // Query: The user query. Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally @@ -15723,6 +15692,13 @@ type GoogleCloudDiscoveryengineV1alphaUserEvent struct { // event. This field should be set for `search` event when autocomplete // function is enabled and the user clicks a suggestion for search. CompletionInfo *GoogleCloudDiscoveryengineV1alphaCompletionInfo `json:"completionInfo,omitempty"` + // ConversionType: Optional. Conversion type. Required if UserEvent.event_type + // is `conversion`. This is a customer-defined conversion name in lowercase + // letters or numbers separated by "-", such as "watch", "good-visit" etc. Do + // not set the field if UserEvent.event_type is not `conversion`. This mixes + // the custom conversion event with predefined events like `search`, + // `view-item` etc. + ConversionType string `json:"conversionType,omitempty"` // DataStore: The DataStore resource full name, of the form // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. Optional. Only required for user events whose data @@ -15764,11 +15740,9 @@ type GoogleCloudDiscoveryengineV1alphaUserEvent struct { // e.g. in Retail online shopping * `purchase`: Purchase an item(s) // Media-related values: * `media-play`: Start/resume watching a video, playing // a song, etc. * `media-complete`: Finished or stopped midway through a video, - // song, etc. + // song, etc. Custom conversion value: * `conversion`: Customer defined + // conversion event. EventType string `json:"eventType,omitempty"` - // Feedback: Optional. This field is optional except for the `add-feedback` - // event types. - Feedback *GoogleCloudDiscoveryengineV1alphaFeedback `json:"feedback,omitempty"` // Filter: The filter syntax consists of an expression language for // constructing a predicate from one or more fields of the documents being // filtered. One example is for `search` events, the associated SearchRequest @@ -18658,7 +18632,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. @@ -48667,6 +48641,114 @@ func (c *ProjectsLocationsUserEventsCollectCall) Do(opts ...googleapi.CallOption return ret, nil } +type ProjectsLocationsUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of user events. Request processing might be synchronous. +// Events that already exist are skipped. Use this method for backfilling +// historical user events. Operation.response is of type ImportResponse. Note +// that it is possible for a subset of the items to be successfully inserted. +// Operation.metadata is of type ImportMetadata. +// +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsUserEventsImportCall { + c := &ProjectsLocationsUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest + 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 *ProjectsLocationsUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserEventsImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsUserEventsImportCall { + 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 *ProjectsLocationsUserEventsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserEventsImportCall) 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.googleclouddiscoveryenginev1alphaimportusereventsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:import") + 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 "discoveryengine.projects.locations.userEvents.import" 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 *ProjectsLocationsUserEventsImportCall) 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 ProjectsLocationsUserEventsWriteCall struct { s *Service parent string diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 5010111d6d..ee4a345ab2 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -15,6 +15,28 @@ "description": "Discovery Engine API.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/generative-ai-app-builder/docs/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.us.rep.googleapis.com/", + "location": "us" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://discoveryengine.eu.rep.googleapis.com/", + "location": "eu" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -7095,6 +7117,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "import": { + "description": "Bulk import of user events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userEvents:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.userEvents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/userEvents:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "write": { "description": "Writes a single user event.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userEvents:write", @@ -7205,7 +7255,7 @@ } } }, - "revision": "20241031", + "revision": "20241110", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -12403,7 +12453,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" }, @@ -12877,6 +12927,11 @@ "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", "type": "string" }, + "detailedAnswer": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer", + "description": "Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.", + "readOnly": true + }, "query": { "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", "description": "The user query." @@ -13923,7 +13978,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" } @@ -14834,7 +14889,7 @@ "type": "integer" }, "groundingCheckRequired": { - "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, anti_citation_indices, and score should not be returned.", + "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices should not be returned.", "type": "boolean" }, "startPos": { @@ -14896,7 +14951,7 @@ "description": "Page span of the chunk." }, "relevanceScore": { - "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.", + "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse.", "format": "double", "readOnly": true, "type": "number" @@ -16080,6 +16135,11 @@ "description": "Detailed document information associated with a user event.", "id": "GoogleCloudDiscoveryengineV1betaDocumentInfo", "properties": { + "conversionValue": { + "description": "Optional. The conversion value associated with this Document. Must be set if UserEvent.event_type is \"conversion\". For example, a value of 1000 signifies that 1000 seconds were spent viewing a Document for the `watch` conversion type.", + "format": "float", + "type": "number" + }, "id": { "description": "The Document resource ID.", "type": "string" @@ -16572,80 +16632,6 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaFeedback": { - "description": "Information about the user feedback. This information will be used for logging and metrics purpose.", - "id": "GoogleCloudDiscoveryengineV1betaFeedback", - "properties": { - "comment": { - "description": "Optional. The additional user comment of the feedback if user gives a thumb down.", - "type": "string" - }, - "conversationInfo": { - "$ref": "GoogleCloudDiscoveryengineV1betaFeedbackConversationInfo", - "description": "The related conversation information when user gives feedback." - }, - "feedbackType": { - "description": "Required. Indicate whether the user gives a positive or negative feedback. If the user gives a negative feedback, there might be more feedback details.", - "enum": [ - "FEEDBACK_TYPE_UNSPECIFIED", - "LIKE", - "DISLIKE" - ], - "enumDescriptions": [ - "Unspecified feedback type.", - "The user gives a positive feedback.", - "The user gives a negative feedback." - ], - "type": "string" - }, - "llmModelVersion": { - "description": "The version of the LLM model that was used to generate the response.", - "type": "string" - }, - "reasons": { - "description": "Optional. The reason if user gives a thumb down.", - "items": { - "enum": [ - "REASON_UNSPECIFIED", - "INACCURATE_RESPONSE", - "NOT_RELEVANT", - "INCOMPREHENSIVE", - "OFFENSIVE_OR_UNSAFE", - "BAD_CIATION", - "FORMAT_AND_STYLES" - ], - "enumDescriptions": [ - "Unspecified reason.", - "The response is inaccurate.", - "The response is not relevant.", - "The response is incomprehensive.", - "The response is offensive or unsafe.", - "The response is not well-associated with the query.", - "The response is not well-formatted." - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaFeedbackConversationInfo": { - "description": "The conversation information such as the question index and session name.", - "id": "GoogleCloudDiscoveryengineV1betaFeedbackConversationInfo", - "properties": { - "questionIndex": { - "description": "The index of the user input within the conversation messages.", - "format": "int32", - "type": "integer" - }, - "session": { - "description": "Name of the newly generated or continued session.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse": { "description": "Response message for SiteSearchEngineService.FetchDomainVerificationStatus method.", "id": "GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse", @@ -18071,7 +18057,7 @@ "type": "string" }, "score": { - "description": "The score of this record based on the given query and selected model.", + "description": "The score of this record based on the given query and selected model. The score will be rounded to 2 decimal places. If the score is close to 0, it will be rounded to 0.0001 to avoid returning unset.", "format": "float", "type": "number" }, @@ -18656,7 +18642,7 @@ "enumDescriptions": [ "Default value.", "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." ], "type": "string" }, @@ -19927,6 +19913,11 @@ "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", "type": "string" }, + "detailedAnswer": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswer", + "description": "Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.", + "readOnly": true + }, "query": { "$ref": "GoogleCloudDiscoveryengineV1betaQuery", "description": "The user query." @@ -20372,6 +20363,10 @@ "$ref": "GoogleCloudDiscoveryengineV1betaCompletionInfo", "description": "CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "conversionType": { + "description": "Optional. Conversion type. Required if UserEvent.event_type is `conversion`. This is a customer-defined conversion name in lowercase letters or numbers separated by \"-\", such as \"watch\", \"good-visit\" etc. Do not set the field if UserEvent.event_type is not `conversion`. This mixes the custom conversion event with predefined events like `search`, `view-item` etc.", + "type": "string" + }, "dataStore": { "description": "The DataStore resource full name, of the form `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. Optional. Only required for user events whose data store can't by determined by UserEvent.engine or UserEvent.documents. If data store is set in the parent of write/import/collect user event requests, this field can be omitted.", "type": "string" @@ -20397,13 +20392,9 @@ "type": "string" }, "eventType": { - "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans * `add-feedback`: Add a user feedback. Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc.", + "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans * `add-feedback`: Add a user feedback. Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. Custom conversion value: * `conversion`: Customer defined conversion event.", "type": "string" }, - "feedback": { - "$ref": "GoogleCloudDiscoveryengineV1betaFeedback", - "description": "Optional. This field is optional except for the `add-feedback` event types." - }, "filter": { "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index a59adcb86a..99911ca237 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -8074,7 +8074,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. @@ -8854,6 +8854,10 @@ type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { // Answer: The resource name of the answer to the user query. Only set if the // answer generation (/answer API call) happened in this turn. Answer string `json:"answer,omitempty"` + // DetailedAnswer: Output only. In ConversationalSearchService.GetSession API, + // if GetSessionRequest.include_answer_details is set to true, this field will + // be populated when getting answer query session. + DetailedAnswer *GoogleCloudDiscoveryengineV1alphaAnswer `json:"detailedAnswer,omitempty"` // Query: The user query. Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally @@ -10244,7 +10248,7 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams st // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with empty or @@ -11513,8 +11517,7 @@ type GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim struct { // GroundingCheckRequired: Indicates that this claim required grounding check. // When the system decided this claim doesn't require attribution/grounding // check, this field will be set to false. In that case, no grounding check was - // done for the claim and therefore citation_indices, anti_citation_indices, - // and score should not be returned. + // done for the claim and therefore citation_indices should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. @@ -11602,7 +11605,7 @@ type GoogleCloudDiscoveryengineV1betaChunk struct { PageSpan *GoogleCloudDiscoveryengineV1betaChunkPageSpan `json:"pageSpan,omitempty"` // RelevanceScore: Output only. Represents the relevance score based on // similarity. Higher score indicates higher chunk relevance. The score is in - // range [-1.0, 1.0]. Only populated on SearchService.SearchResponse. + // range [-1.0, 1.0]. Only populated on SearchResponse. RelevanceScore float64 `json:"relevanceScore,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkMetadata") to // unconditionally include in API requests. By default, fields with empty or @@ -13179,6 +13182,11 @@ func (s GoogleCloudDiscoveryengineV1betaDocumentIndexStatus) MarshalJSON() ([]by // GoogleCloudDiscoveryengineV1betaDocumentInfo: Detailed document information // associated with a user event. type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { + // ConversionValue: Optional. The conversion value associated with this + // Document. Must be set if UserEvent.event_type is "conversion". For example, + // a value of 1000 signifies that 1000 seconds were spent viewing a Document + // for the `watch` conversion type. + ConversionValue float64 `json:"conversionValue,omitempty"` // Id: The Document resource ID. Id string `json:"id,omitempty"` // Joined: Output only. Whether the referenced Document can be found in the @@ -13198,15 +13206,15 @@ type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { Quantity int64 `json:"quantity,omitempty"` // Uri: The Document URI - only allowed for website data stores. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") 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. "ConversionValue") 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. "Id") 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. "ConversionValue") 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:"-"` } @@ -13216,6 +13224,20 @@ func (s GoogleCloudDiscoveryengineV1betaDocumentInfo) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1betaDocumentInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentInfo + var s1 struct { + ConversionValue gensupport.JSONFloat64 `json:"conversionValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConversionValue = float64(s1.ConversionValue) + return nil +} + // GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton // resource of DataStore. If it's empty when DataStore is created and DataStore // is set to DataStore.ContentConfig.CONTENT_REQUIRED, the default parser will @@ -13866,81 +13888,6 @@ func (s GoogleCloudDiscoveryengineV1betaFactChunk) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFeedback: Information about the user -// feedback. This information will be used for logging and metrics purpose. -type GoogleCloudDiscoveryengineV1betaFeedback struct { - // Comment: Optional. The additional user comment of the feedback if user gives - // a thumb down. - Comment string `json:"comment,omitempty"` - // ConversationInfo: The related conversation information when user gives - // feedback. - ConversationInfo *GoogleCloudDiscoveryengineV1betaFeedbackConversationInfo `json:"conversationInfo,omitempty"` - // FeedbackType: Required. Indicate whether the user gives a positive or - // negative feedback. If the user gives a negative feedback, there might be - // more feedback details. - // - // Possible values: - // "FEEDBACK_TYPE_UNSPECIFIED" - Unspecified feedback type. - // "LIKE" - The user gives a positive feedback. - // "DISLIKE" - The user gives a negative feedback. - FeedbackType string `json:"feedbackType,omitempty"` - // LlmModelVersion: The version of the LLM model that was used to generate the - // response. - LlmModelVersion string `json:"llmModelVersion,omitempty"` - // Reasons: Optional. The reason if user gives a thumb down. - // - // Possible values: - // "REASON_UNSPECIFIED" - Unspecified reason. - // "INACCURATE_RESPONSE" - The response is inaccurate. - // "NOT_RELEVANT" - The response is not relevant. - // "INCOMPREHENSIVE" - The response is incomprehensive. - // "OFFENSIVE_OR_UNSAFE" - The response is offensive or unsafe. - // "BAD_CIATION" - The response is not well-associated with the query. - // "FORMAT_AND_STYLES" - The response is not well-formatted. - Reasons []string `json:"reasons,omitempty"` - // ForceSendFields is a list of field names (e.g. "Comment") 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. "Comment") 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 GoogleCloudDiscoveryengineV1betaFeedback) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFeedback - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaFeedbackConversationInfo: The conversation -// information such as the question index and session name. -type GoogleCloudDiscoveryengineV1betaFeedbackConversationInfo struct { - // QuestionIndex: The index of the user input within the conversation messages. - QuestionIndex int64 `json:"questionIndex,omitempty"` - // Session: Name of the newly generated or continued session. - Session string `json:"session,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuestionIndex") 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. "QuestionIndex") 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 GoogleCloudDiscoveryengineV1betaFeedbackConversationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFeedbackConversationInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse: // Response message for SiteSearchEngineService.FetchDomainVerificationStatus // method. @@ -16067,6 +16014,8 @@ type GoogleCloudDiscoveryengineV1betaRankingRecord struct { // Id: The unique ID to represent the record. Id string `json:"id,omitempty"` // Score: The score of this record based on the given query and selected model. + // The score will be rounded to 2 decimal places. If the score is close to 0, + // it will be rounded to 0.0001 to avoid returning unset. Score float64 `json:"score,omitempty"` // Title: The title of the record. Empty by default. At least one of title or // content should be set otherwise an INVALID_ARGUMENT error is thrown. @@ -16991,7 +16940,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. // "DOCUMENTS" - Returns documents in the search result. // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. + // DocumentProcessingConfig.chunking_config is specified. SearchResultMode string `json:"searchResultMode,omitempty"` // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in // the search response. @@ -18864,6 +18813,10 @@ type GoogleCloudDiscoveryengineV1betaSessionTurn struct { // Answer: The resource name of the answer to the user query. Only set if the // answer generation (/answer API call) happened in this turn. Answer string `json:"answer,omitempty"` + // DetailedAnswer: Output only. In ConversationalSearchService.GetSession API, + // if GetSessionRequest.include_answer_details is set to true, this field will + // be populated when getting answer query session. + DetailedAnswer *GoogleCloudDiscoveryengineV1betaAnswer `json:"detailedAnswer,omitempty"` // Query: The user query. Query *GoogleCloudDiscoveryengineV1betaQuery `json:"query,omitempty"` // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally @@ -19523,6 +19476,13 @@ type GoogleCloudDiscoveryengineV1betaUserEvent struct { // event. This field should be set for `search` event when autocomplete // function is enabled and the user clicks a suggestion for search. CompletionInfo *GoogleCloudDiscoveryengineV1betaCompletionInfo `json:"completionInfo,omitempty"` + // ConversionType: Optional. Conversion type. Required if UserEvent.event_type + // is `conversion`. This is a customer-defined conversion name in lowercase + // letters or numbers separated by "-", such as "watch", "good-visit" etc. Do + // not set the field if UserEvent.event_type is not `conversion`. This mixes + // the custom conversion event with predefined events like `search`, + // `view-item` etc. + ConversionType string `json:"conversionType,omitempty"` // DataStore: The DataStore resource full name, of the form // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. Optional. Only required for user events whose data @@ -19564,11 +19524,9 @@ type GoogleCloudDiscoveryengineV1betaUserEvent struct { // e.g. in Retail online shopping * `purchase`: Purchase an item(s) // Media-related values: * `media-play`: Start/resume watching a video, playing // a song, etc. * `media-complete`: Finished or stopped midway through a video, - // song, etc. + // song, etc. Custom conversion value: * `conversion`: Customer defined + // conversion event. EventType string `json:"eventType,omitempty"` - // Feedback: Optional. This field is optional except for the `add-feedback` - // event types. - Feedback *GoogleCloudDiscoveryengineV1betaFeedback `json:"feedback,omitempty"` // Filter: The filter syntax consists of an expression language for // constructing a predicate from one or more fields of the documents being // filtered. One example is for `search` events, the associated SearchRequest @@ -45842,6 +45800,114 @@ func (c *ProjectsLocationsUserEventsCollectCall) Do(opts ...googleapi.CallOption return ret, nil } +type ProjectsLocationsUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of user events. Request processing might be synchronous. +// Events that already exist are skipped. Use this method for backfilling +// historical user events. Operation.response is of type ImportResponse. Note +// that it is possible for a subset of the items to be successfully inserted. +// Operation.metadata is of type ImportMetadata. +// +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsUserEventsImportCall { + c := &ProjectsLocationsUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest + 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 *ProjectsLocationsUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserEventsImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsUserEventsImportCall { + 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 *ProjectsLocationsUserEventsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserEventsImportCall) 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.googleclouddiscoveryenginev1betaimportusereventsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") + 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 "discoveryengine.projects.locations.userEvents.import" 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 *ProjectsLocationsUserEventsImportCall) 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 ProjectsLocationsUserEventsWriteCall struct { s *Service parent string diff --git a/language/v1beta2/language-api.json b/language/v1beta2/language-api.json index c4b6b7971e..7ced69ab1e 100644 --- a/language/v1beta2/language-api.json +++ b/language/v1beta2/language-api.json @@ -246,7 +246,7 @@ } } }, - "revision": "20241103", + "revision": "20241110", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -1361,7 +1361,7 @@ }, "sentiment": { "$ref": "Sentiment", - "description": "For calls to AnalyzeEntitySentimentRequest or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document." + "description": "For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document." }, "type": { "description": "The entity type.", @@ -1406,7 +1406,7 @@ "properties": { "sentiment": { "$ref": "Sentiment", - "description": "For calls to AnalyzeEntitySentimentRequest or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document." + "description": "For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document." }, "text": { "$ref": "TextSpan", @@ -2540,7 +2540,7 @@ "properties": { "sentiment": { "$ref": "Sentiment", - "description": "For calls to AnalyzeSentimentRequest or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence." + "description": "For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence." }, "text": { "$ref": "TextSpan", diff --git a/language/v1beta2/language-gen.go b/language/v1beta2/language-gen.go index 1481f99d5b..59f4580fc7 100644 --- a/language/v1beta2/language-gen.go +++ b/language/v1beta2/language-gen.go @@ -1262,7 +1262,7 @@ type Entity struct { // importance or centrality of that entity to the entire document text. Scores // closer to 0 are less salient, while scores closer to 1.0 are highly salient. Salience float64 `json:"salience,omitempty"` - // Sentiment: For calls to AnalyzeEntitySentimentRequest or if + // Sentiment: For calls to AnalyzeEntitySentiment or if // AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this // field will contain the aggregate sentiment expressed for this entity in the // provided document. @@ -1333,7 +1333,7 @@ func (s *Entity) UnmarshalJSON(data []byte) error { // EntityMention: Represents a mention for an entity in the text. Currently, // proper noun mentions are supported. type EntityMention struct { - // Sentiment: For calls to AnalyzeEntitySentimentRequest or if + // Sentiment: For calls to AnalyzeEntitySentiment or if // AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this // field will contain the sentiment expressed for this mention of the entity in // the provided document. @@ -2040,7 +2040,7 @@ func (s *RamMetric) UnmarshalJSON(data []byte) error { // Sentence: Represents a sentence in the input document. type Sentence struct { - // Sentiment: For calls to AnalyzeSentimentRequest or if + // Sentiment: For calls to AnalyzeSentiment or if // AnnotateTextRequest.Features.extract_document_sentiment is set to true, this // field will contain the sentiment for the sentence. Sentiment *Sentiment `json:"sentiment,omitempty"` diff --git a/language/v2/language-api.json b/language/v2/language-api.json index 0bd68f3039..e12e582661 100644 --- a/language/v2/language-api.json +++ b/language/v2/language-api.json @@ -208,7 +208,7 @@ } } }, - "revision": "20241103", + "revision": "20241110", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -250,7 +250,7 @@ "type": "array" }, "languageCode": { - "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.", + "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language_code field for more details.", "type": "string" }, "languageSupported": { @@ -296,7 +296,7 @@ "description": "The overall sentiment of the input document." }, "languageCode": { - "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.", + "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language_code field for more details.", "type": "string" }, "languageSupported": { @@ -383,14 +383,14 @@ "description": "The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment." }, "entities": { - "description": "Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities or AnnotateTextRequest.Features.extract_entity_sentiment.", + "description": "Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities .", "items": { "$ref": "Entity" }, "type": "array" }, "languageCode": { - "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.", + "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language_code field for more details.", "type": "string" }, "languageSupported": { @@ -458,7 +458,7 @@ "type": "array" }, "languageCode": { - "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.", + "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language_code field for more details.", "type": "string" }, "languageSupported": { @@ -977,7 +977,7 @@ }, "sentiment": { "$ref": "Sentiment", - "description": "For calls to AnalyzeEntitySentimentRequest or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document." + "description": "For calls to AnalyzeEntitySentiment this field will contain the aggregate sentiment expressed for this entity in the provided document." }, "type": { "description": "The entity type.", @@ -1027,7 +1027,7 @@ }, "sentiment": { "$ref": "Sentiment", - "description": "For calls to AnalyzeEntitySentimentRequest or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document." + "description": "For calls to AnalyzeEntitySentiment this field will contain the sentiment expressed for this mention of the entity in the provided document." }, "text": { "$ref": "TextSpan", @@ -1500,7 +1500,7 @@ "id": "ModerateTextResponse", "properties": { "languageCode": { - "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details.", + "description": "The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language_code field for more details.", "type": "string" }, "languageSupported": { @@ -1916,7 +1916,7 @@ "properties": { "sentiment": { "$ref": "Sentiment", - "description": "For calls to AnalyzeSentimentRequest or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence." + "description": "For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence." }, "text": { "$ref": "TextSpan", diff --git a/language/v2/language-gen.go b/language/v2/language-gen.go index 81703fc2a0..919dd2b5cb 100644 --- a/language/v2/language-gen.go +++ b/language/v2/language-gen.go @@ -217,7 +217,7 @@ type AnalyzeEntitiesResponse struct { Entities []*Entity `json:"entities,omitempty"` // LanguageCode: The language of the text, which will be the same as the // language specified in the request or, if not specified, the - // automatically-detected language. See Document.language field for more + // automatically-detected language. See Document.language_code field for more // details. LanguageCode string `json:"languageCode,omitempty"` // LanguageSupported: Whether the language is officially supported. The API may @@ -289,7 +289,7 @@ type AnalyzeSentimentResponse struct { DocumentSentiment *Sentiment `json:"documentSentiment,omitempty"` // LanguageCode: The language of the text, which will be the same as the // language specified in the request or, if not specified, the - // automatically-detected language. See Document.language field for more + // automatically-detected language. See Document.language_code field for more // details. LanguageCode string `json:"languageCode,omitempty"` // LanguageSupported: Whether the language is officially supported. The API may @@ -398,12 +398,11 @@ type AnnotateTextResponse struct { DocumentSentiment *Sentiment `json:"documentSentiment,omitempty"` // Entities: Entities, along with their semantic information, in the input // document. Populated if the user enables - // AnnotateTextRequest.Features.extract_entities or - // AnnotateTextRequest.Features.extract_entity_sentiment. + // AnnotateTextRequest.Features.extract_entities . Entities []*Entity `json:"entities,omitempty"` // LanguageCode: The language of the text, which will be the same as the // language specified in the request or, if not specified, the - // automatically-detected language. See Document.language field for more + // automatically-detected language. See Document.language_code field for more // details. LanguageCode string `json:"languageCode,omitempty"` // LanguageSupported: Whether the language is officially supported by all @@ -511,7 +510,7 @@ type ClassifyTextResponse struct { Categories []*ClassificationCategory `json:"categories,omitempty"` // LanguageCode: The language of the text, which will be the same as the // language specified in the request or, if not specified, the - // automatically-detected language. See Document.language field for more + // automatically-detected language. See Document.language_code field for more // details. LanguageCode string `json:"languageCode,omitempty"` // LanguageSupported: Whether the language is officially supported. The API may @@ -943,10 +942,8 @@ type Entity struct { Metadata map[string]string `json:"metadata,omitempty"` // Name: The representative name for the entity. Name string `json:"name,omitempty"` - // Sentiment: For calls to AnalyzeEntitySentimentRequest or if - // AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this - // field will contain the aggregate sentiment expressed for this entity in the - // provided document. + // Sentiment: For calls to AnalyzeEntitySentiment this field will contain the + // aggregate sentiment expressed for this entity in the provided document. Sentiment *Sentiment `json:"sentiment,omitempty"` // Type: The entity type. // @@ -1004,10 +1001,8 @@ type EntityMention struct { // the probability of the entity mention being the entity type. The score is in // (0, 1] range. Probability float64 `json:"probability,omitempty"` - // Sentiment: For calls to AnalyzeEntitySentimentRequest or if - // AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this - // field will contain the sentiment expressed for this mention of the entity in - // the provided document. + // Sentiment: For calls to AnalyzeEntitySentiment this field will contain the + // sentiment expressed for this mention of the entity in the provided document. Sentiment *Sentiment `json:"sentiment,omitempty"` // Text: The mention text. Text *TextSpan `json:"text,omitempty"` @@ -1323,7 +1318,7 @@ func (s ModerateTextRequest) MarshalJSON() ([]byte, error) { type ModerateTextResponse struct { // LanguageCode: The language of the text, which will be the same as the // language specified in the request or, if not specified, the - // automatically-detected language. See Document.language field for more + // automatically-detected language. See Document.language_code field for more // details. LanguageCode string `json:"languageCode,omitempty"` // LanguageSupported: Whether the language is officially supported. The API may @@ -1584,7 +1579,7 @@ func (s *RamMetric) UnmarshalJSON(data []byte) error { // Sentence: Represents a sentence in the input document. type Sentence struct { - // Sentiment: For calls to AnalyzeSentimentRequest or if + // Sentiment: For calls to AnalyzeSentiment or if // AnnotateTextRequest.Features.extract_document_sentiment is set to true, this // field will contain the sentiment for the sentence. Sentiment *Sentiment `json:"sentiment,omitempty"` diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json index 70f1a84f7e..e71acbfce1 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json @@ -435,7 +435,7 @@ "userSessions": { "methods": { "generate": { - "description": "This API replaces user authorized OAuth consnet based APIs (Create, Entitle). Generates a short-lived token for a user session based on the user intent. You can use the session token to redirect the user to Google to finish the signup flow. You can re-generate new session token repeatedly for same request if necessary, regardless of the previous tokens being expired or not.", + "description": "This API replaces user authorized OAuth consent based APIs (Create, Entitle). Generates a short-lived token for a user session based on the user intent. You can use the session token to redirect the user to Google to finish the signup flow. You can re-generate new session token repeatedly for the same request if necessary, regardless of the previous tokens being expired or not.", "flatPath": "v1/partners/{partnersId}/userSessions:generate", "httpMethod": "POST", "id": "paymentsresellersubscription.partners.userSessions.generate", @@ -467,7 +467,7 @@ } } }, - "revision": "20241105", + "revision": "20241110", "rootUrl": "https://paymentsresellersubscription.googleapis.com/", "schemas": { "GoogleCloudPaymentsResellerSubscriptionV1Amount": { @@ -597,7 +597,7 @@ "type": "object" }, "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest": { - "description": "LINT.IfChange Partner request for entitling the previously provisioned subscription to an end user. The end user identity is inferred from the request OAuth context.", + "description": "Partner request for entitling the previously provisioned subscription to an end user. The end user identity is inferred from the request OAuth context.", "id": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest", "properties": { "lineItemEntitlementDetails": { @@ -760,7 +760,7 @@ "properties": { "userSession": { "$ref": "GoogleCloudPaymentsResellerSubscriptionV1UserSession", - "description": "The generated user session. The token size of proportional to the size of the intent payload. Therefore, please be mindful of keeping the request intent payload reasonably small." + "description": "The generated user session. The token size is proportional to the size of the intent payload." } }, "type": "object" diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go index 1fda41f758..bab146d228 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go @@ -400,10 +400,9 @@ func (s GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionIntent) Mars return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest: -// LINT.IfChange Partner request for entitling the previously provisioned -// subscription to an end user. The end user identity is inferred from the -// request OAuth context. +// GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest: Partner +// request for entitling the previously provisioned subscription to an end +// user. The end user identity is inferred from the request OAuth context. type GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest struct { // LineItemEntitlementDetails: Optional. The line items to be entitled. If // unspecified, all line items will be entitled. @@ -702,9 +701,8 @@ func (s GoogleCloudPaymentsResellerSubscriptionV1GenerateUserSessionRequest) Mar // [Preview only] Response that contains the details for generated user // session. type GoogleCloudPaymentsResellerSubscriptionV1GenerateUserSessionResponse struct { - // UserSession: The generated user session. The token size of proportional to - // the size of the intent payload. Therefore, please be mindful of keeping the - // request intent payload reasonably small. + // UserSession: The generated user session. The token size is proportional to + // the size of the intent payload. UserSession *GoogleCloudPaymentsResellerSubscriptionV1UserSession `json:"userSession,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -2970,12 +2968,12 @@ type PartnersUserSessionsGenerateCall struct { header_ http.Header } -// Generate: This API replaces user authorized OAuth consnet based APIs +// Generate: This API replaces user authorized OAuth consent based APIs // (Create, Entitle). Generates a short-lived token for a user session based on // the user intent. You can use the session token to redirect the user to // Google to finish the signup flow. You can re-generate new session token -// repeatedly for same request if necessary, regardless of the previous tokens -// being expired or not. +// repeatedly for the same request if necessary, regardless of the previous +// tokens being expired or not. // // - parent: The parent, the partner that can resell. Format: // partners/{partner}.