diff --git a/CHANGES.md b/CHANGES.md index 758a8a65a7..f35a4c7249 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,17 @@ # Changes +## [0.246.0](https://github.com/googleapis/google-api-go-client/compare/v0.245.0...v0.246.0) (2025-08-06) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#3261](https://github.com/googleapis/google-api-go-client/issues/3261)) ([b792200](https://github.com/googleapis/google-api-go-client/commit/b792200673836a4a042bb48938dff17ee6a0954f)) + + +### Bug Fixes + +* **idtoken:** Don't assume DefaultTransport is a http.Transport ([#3263](https://github.com/googleapis/google-api-go-client/issues/3263)) ([61fba51](https://github.com/googleapis/google-api-go-client/commit/61fba51991b51d84065a1c66e4a49434462d2c94)), refs [#3260](https://github.com/googleapis/google-api-go-client/issues/3260) + ## [0.245.0](https://github.com/googleapis/google-api-go-client/compare/v0.244.0...v0.245.0) (2025-08-05) diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 52f57a1062..6bad200a29 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -453,7 +453,7 @@ ], "parameters": { "pageSize": { - "description": "The requested page size. The actual page size may be fixed to a min or max value.", + "description": "The requested page size. If unspecified, at most 10 devices will be returned. The maximum value is 100; values above 100 will be coerced to 100. The limits can change over time.", "format": "int32", "location": "query", "type": "integer" @@ -1260,7 +1260,7 @@ } } }, - "revision": "20250714", + "revision": "20250804", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 00395cab13..193fe3e48e 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -9485,8 +9485,9 @@ func (r *EnterprisesDevicesService) List(parent string) *EnterprisesDevicesListC return c } -// PageSize sets the optional parameter "pageSize": The requested page size. -// The actual page size may be fixed to a min or max value. +// PageSize sets the optional parameter "pageSize": The requested page size. If +// unspecified, at most 10 devices will be returned. The maximum value is 100; +// values above 100 will be coerced to 100. The limits can change over time. func (c *EnterprisesDevicesListCall) PageSize(pageSize int64) *EnterprisesDevicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 5b337513fd..783f648ce1 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -1528,7 +1528,7 @@ } } }, - "revision": "20250727", + "revision": "20250731", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { @@ -4950,7 +4950,7 @@ "type": "string" }, "customer": { - "description": "Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and `SpaceType` is `SPACE`, otherwise should not be set. In the format `customers/{customer}`, where `customer` is the `id` from the [Admin SDK customer resource]( https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). Private apps can also use the `customers/my_customer` alias to create the space in the same Google Workspace organization as the app. For DMs, this field isn't populated.", + "description": "Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and `SpaceType` is `SPACE`, otherwise should not be set. In the format `customers/{customer}`, where `customer` is the `id` from the [Admin SDK customer resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). Private apps can also use the `customers/my_customer` alias to create the space in the same Google Workspace organization as the app. For DMs, this field isn't populated.", "type": "string" }, "displayName": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 74646d33b6..8a474870e0 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -5576,8 +5576,8 @@ type Space struct { // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) // and `SpaceType` is `SPACE`, otherwise should not be set. In the format // `customers/{customer}`, where `customer` is the `id` from the Admin SDK - // customer resource ( - // https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). + // customer resource + // (https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). // Private apps can also use the `customers/my_customer` alias to create the // space in the same Google Workspace organization as the app. For DMs, this // field isn't populated. diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index d51b2699c5..f00aca9a83 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -7291,7 +7291,7 @@ } } }, - "revision": "20250728", + "revision": "20250803", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GdataBlobstore2Info": { @@ -9776,9 +9776,40 @@ "description": "Discovery Engine Assistant resource.", "id": "GoogleCloudDiscoveryengineV1Assistant", "properties": { + "customerPolicy": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy", + "description": "Optional. Customer policy for the assistant." + }, + "enabledTools": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantToolList" + }, + "description": "Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example \"projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {\"jira1ConnectorName\": [(toolId1, \"createTicket\"), (toolId2, \"transferTicket\")], \"gmail1ConnectorName\": [(toolId3, \"sendEmail\"),..] }", + "type": "object" + }, + "generationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantGenerationConfig", + "description": "Optional. Configuration for the generation of the assistant response." + }, "name": { "description": "Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "webGroundingType": { + "description": "Optional. The type of web grounding to use.", + "enum": [ + "WEB_GROUNDING_TYPE_UNSPECIFIED", + "WEB_GROUNDING_TYPE_DISABLED", + "WEB_GROUNDING_TYPE_GOOGLE_SEARCH", + "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" + ], + "enumDescriptions": [ + "Default, unspecified setting. This is the same as disabled.", + "Web grounding is disabled.", + "Grounding with Google Search is enabled.", + "Grounding with Enterprise Web Search is enabled." + ], + "type": "string" } }, "type": "object" @@ -9887,6 +9918,75 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy": { + "description": "Customer-defined policy for the assistant.", + "id": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy", + "properties": { + "bannedPhrases": { + "description": "Optional. List of banned phrases.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase": { + "description": "Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.", + "id": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase", + "properties": { + "ignoreDiacritics": { + "description": "Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, \"cafe\" would match \"café\".", + "type": "boolean" + }, + "matchType": { + "description": "Optional. Match type for the banned phrase.", + "enum": [ + "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED", + "SIMPLE_STRING_MATCH", + "WORD_BOUNDARY_STRING_MATCH" + ], + "enumDescriptions": [ + "Defaults to SIMPLE_STRING_MATCH.", + "The banned phrase matches if it is found anywhere in the text as an exact substring.", + "Banned phrase only matches if the pattern found in the text is surrounded by word delimiters. The phrase itself may still contain word delimiters." + ], + "type": "string" + }, + "phrase": { + "description": "Required. The raw string content to be banned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantGenerationConfig": { + "description": "Configuration for the generation of the assistant response.", + "id": "GoogleCloudDiscoveryengineV1AssistantGenerationConfig", + "properties": { + "defaultLanguage": { + "description": "The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.", + "type": "string" + }, + "systemInstruction": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction", + "description": "System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction": { + "description": "System instruction, also known as the prompt preamble for LLM calls.", + "id": "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction", + "properties": { + "additionalSystemInstruction": { + "description": "Optional. Additional system instruction that will be added to the default system instruction.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1AssistantGroundedContent": { "description": "A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like \"Of course, I will gladly search it for you.\" do not need grounding.", "id": "GoogleCloudDiscoveryengineV1AssistantGroundedContent", @@ -9999,6 +10099,35 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1AssistantToolInfo": { + "description": "Information to identify a tool.", + "id": "GoogleCloudDiscoveryengineV1AssistantToolInfo", + "properties": { + "toolDisplayName": { + "description": "The display name of the tool.", + "type": "string" + }, + "toolName": { + "description": "The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it's using `action` in the DataConnectorService apis, but they are the same as the `tool` here.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantToolList": { + "description": "The enabled tools on a connector", + "id": "GoogleCloudDiscoveryengineV1AssistantToolList", + "properties": { + "toolInfo": { + "description": "The list of tools with corresponding tool information.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantToolInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata", @@ -10619,6 +10748,10 @@ "description": "Document metadata contains the information of the document of the current chunk.", "id": "GoogleCloudDiscoveryengineV1ChunkDocumentMetadata", "properties": { + "mimeType": { + "description": "The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.", + "type": "string" + }, "structData": { "additionalProperties": { "description": "Properties of the object.", diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 00f65862e4..fb1d56f5d9 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -4469,23 +4469,49 @@ func (s GoogleCloudDiscoveryengineV1AssistUserMetadata) MarshalJSON() ([]byte, e // GoogleCloudDiscoveryengineV1Assistant: Discovery Engine Assistant resource. type GoogleCloudDiscoveryengineV1Assistant struct { + // CustomerPolicy: Optional. Customer policy for the assistant. + CustomerPolicy *GoogleCloudDiscoveryengineV1AssistantCustomerPolicy `json:"customerPolicy,omitempty"` + // EnabledTools: Optional. Note: not implemented yet. Use enabled_actions + // instead. The enabled tools on this assistant. The keys are connector name, + // for example + // "projects/{projectId}/locations/{locationId}/collections/{collectionId}/datac + // onnector The values consist of admin enabled tools towards the connector + // instance. Admin can selectively enable multiple tools on any of the + // connector instances that they created in the project. For example + // {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, + // "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } + EnabledTools map[string]GoogleCloudDiscoveryengineV1AssistantToolList `json:"enabledTools,omitempty"` + // GenerationConfig: Optional. Configuration for the generation of the + // assistant response. + GenerationConfig *GoogleCloudDiscoveryengineV1AssistantGenerationConfig `json:"generationConfig,omitempty"` // Name: Immutable. Resource name of the assistant. Format: // `projects/{project}/locations/{location}/collections/{collection}/engines/{en // gine}/assistants/{assistant}` It must be a UTF-8 encoded string with a // length limit of 1024 characters. Name string `json:"name,omitempty"` + // WebGroundingType: Optional. The type of web grounding to use. + // + // Possible values: + // "WEB_GROUNDING_TYPE_UNSPECIFIED" - Default, unspecified setting. This is + // the same as disabled. + // "WEB_GROUNDING_TYPE_DISABLED" - Web grounding is disabled. + // "WEB_GROUNDING_TYPE_GOOGLE_SEARCH" - Grounding with Google Search is + // enabled. + // "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" - Grounding with Enterprise Web + // Search is enabled. + WebGroundingType string `json:"webGroundingType,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "CustomerPolicy") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "CustomerPolicy") 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:"-"` } @@ -4635,6 +4661,121 @@ func (s GoogleCloudDiscoveryengineV1AssistantContentFile) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1AssistantCustomerPolicy: Customer-defined policy +// for the assistant. +type GoogleCloudDiscoveryengineV1AssistantCustomerPolicy struct { + // BannedPhrases: Optional. List of banned phrases. + BannedPhrases []*GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase `json:"bannedPhrases,omitempty"` + // ForceSendFields is a list of field names (e.g. "BannedPhrases") 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. "BannedPhrases") 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 GoogleCloudDiscoveryengineV1AssistantCustomerPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantCustomerPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase: Definition +// of a customer-defined banned phrase. A banned phrase is not allowed to +// appear in the user query or the LLM response, or else the answer will be +// refused. +type GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase struct { + // IgnoreDiacritics: Optional. If true, diacritical marks (e.g., accents, + // umlauts) are ignored when matching banned phrases. For example, "cafe" would + // match "café". + IgnoreDiacritics bool `json:"ignoreDiacritics,omitempty"` + // MatchType: Optional. Match type for the banned phrase. + // + // Possible values: + // "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED" - Defaults to SIMPLE_STRING_MATCH. + // "SIMPLE_STRING_MATCH" - The banned phrase matches if it is found anywhere + // in the text as an exact substring. + // "WORD_BOUNDARY_STRING_MATCH" - Banned phrase only matches if the pattern + // found in the text is surrounded by word delimiters. The phrase itself may + // still contain word delimiters. + MatchType string `json:"matchType,omitempty"` + // Phrase: Required. The raw string content to be banned. + Phrase string `json:"phrase,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreDiacritics") 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. "IgnoreDiacritics") 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 GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantGenerationConfig: Configuration for the +// generation of the assistant response. +type GoogleCloudDiscoveryengineV1AssistantGenerationConfig struct { + // DefaultLanguage: The default language to use for the generation of the + // assistant response. Use an ISO 639-1 language code such as `en`. If not + // specified, the language will be automatically detected. + DefaultLanguage string `json:"defaultLanguage,omitempty"` + // SystemInstruction: System instruction, also known as the prompt preamble for + // LLM calls. See also + // https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions + SystemInstruction *GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction `json:"systemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. "DefaultLanguage") 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. "DefaultLanguage") 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 GoogleCloudDiscoveryengineV1AssistantGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantGenerationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction: +// System instruction, also known as the prompt preamble for LLM calls. +type GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction struct { + // AdditionalSystemInstruction: Optional. Additional system instruction that + // will be added to the default system instruction. + AdditionalSystemInstruction string `json:"additionalSystemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AdditionalSystemInstruction") 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. "AdditionalSystemInstruction") 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 GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1AssistantGroundedContent: A piece of content and // possibly its grounding information. Not all content needs grounding. Phrases // like "Of course, I will gladly search it for you." do not need grounding. @@ -4792,6 +4933,56 @@ func (s *GoogleCloudDiscoveryengineV1AssistantGroundedContentTextGroundingMetada return nil } +// GoogleCloudDiscoveryengineV1AssistantToolInfo: Information to identify a +// tool. +type GoogleCloudDiscoveryengineV1AssistantToolInfo struct { + // ToolDisplayName: The display name of the tool. + ToolDisplayName string `json:"toolDisplayName,omitempty"` + // ToolName: The name of the tool as defined by + // DataConnectorService.QueryAvailableActions. Note: it's using `action` in the + // DataConnectorService apis, but they are the same as the `tool` here. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolDisplayName") 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. "ToolDisplayName") 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 GoogleCloudDiscoveryengineV1AssistantToolInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantToolInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantToolList: The enabled tools on a +// connector +type GoogleCloudDiscoveryengineV1AssistantToolList struct { + // ToolInfo: The list of tools with corresponding tool information. + ToolInfo []*GoogleCloudDiscoveryengineV1AssistantToolInfo `json:"toolInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInfo") 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. "ToolInfo") 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 GoogleCloudDiscoveryengineV1AssistantToolList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantToolList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata: Metadata related // to the progress of the SiteSearchEngineService.BatchCreateTargetSites // operation. This will be returned by the @@ -5650,6 +5841,9 @@ func (s GoogleCloudDiscoveryengineV1ChunkChunkMetadata) MarshalJSON() ([]byte, e // GoogleCloudDiscoveryengineV1ChunkDocumentMetadata: Document metadata // contains the information of the document of the current chunk. type GoogleCloudDiscoveryengineV1ChunkDocumentMetadata struct { + // MimeType: The mime type of the document. + // https://www.iana.org/assignments/media-types/media-types.xhtml. + MimeType string `json:"mimeType,omitempty"` // StructData: Data representation. The structured JSON data for the document. // It should conform to the registered Schema or an `INVALID_ARGUMENT` error is // thrown. @@ -5658,13 +5852,13 @@ type GoogleCloudDiscoveryengineV1ChunkDocumentMetadata struct { Title string `json:"title,omitempty"` // Uri: Uri of the document. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "StructData") to + // ForceSendFields is a list of field names (e.g. "MimeType") 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. "StructData") to include in API + // NullFields is a list of field names (e.g. "MimeType") 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. diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 6979609783..931fa2f8d4 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -8049,13 +8049,13 @@ ], "parameters": { "pageSize": { - "description": "Maximum number of Evaluations to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "description": "Optional. Maximum number of Evaluations to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A page token ListEvaluationsResponse.next_page_token, received from a previous EvaluationService.ListEvaluations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluations must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "description": "Optional. A page token ListEvaluationsResponse.next_page_token, received from a previous EvaluationService.ListEvaluations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluations must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", "location": "query", "type": "string" }, @@ -8092,13 +8092,13 @@ "type": "string" }, "pageSize": { - "description": "Maximum number of ListEvaluationResultsResponse.EvaluationResult to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "description": "Optional. Maximum number of ListEvaluationResultsResponse.EvaluationResult to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A page token ListEvaluationResultsResponse.next_page_token, received from a previous EvaluationService.ListEvaluationResults call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluationResults must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "description": "Optional. A page token ListEvaluationResultsResponse.next_page_token, received from a previous EvaluationService.ListEvaluationResults call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluationResults must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", "location": "query", "type": "string" } @@ -9452,7 +9452,7 @@ } } }, - "revision": "20250728", + "revision": "20250803", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "ApiservingMediaRequestInfo": { @@ -10533,9 +10533,138 @@ "description": "Discovery Engine Assistant resource.", "id": "GoogleCloudDiscoveryengineV1Assistant", "properties": { + "customerPolicy": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy", + "description": "Optional. Customer policy for the assistant." + }, + "enabledTools": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantToolList" + }, + "description": "Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example \"projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {\"jira1ConnectorName\": [(toolId1, \"createTicket\"), (toolId2, \"transferTicket\")], \"gmail1ConnectorName\": [(toolId3, \"sendEmail\"),..] }", + "type": "object" + }, + "generationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantGenerationConfig", + "description": "Optional. Configuration for the generation of the assistant response." + }, "name": { "description": "Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "webGroundingType": { + "description": "Optional. The type of web grounding to use.", + "enum": [ + "WEB_GROUNDING_TYPE_UNSPECIFIED", + "WEB_GROUNDING_TYPE_DISABLED", + "WEB_GROUNDING_TYPE_GOOGLE_SEARCH", + "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" + ], + "enumDescriptions": [ + "Default, unspecified setting. This is the same as disabled.", + "Web grounding is disabled.", + "Grounding with Google Search is enabled.", + "Grounding with Enterprise Web Search is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy": { + "description": "Customer-defined policy for the assistant.", + "id": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy", + "properties": { + "bannedPhrases": { + "description": "Optional. List of banned phrases.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase": { + "description": "Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.", + "id": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase", + "properties": { + "ignoreDiacritics": { + "description": "Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, \"cafe\" would match \"café\".", + "type": "boolean" + }, + "matchType": { + "description": "Optional. Match type for the banned phrase.", + "enum": [ + "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED", + "SIMPLE_STRING_MATCH", + "WORD_BOUNDARY_STRING_MATCH" + ], + "enumDescriptions": [ + "Defaults to SIMPLE_STRING_MATCH.", + "The banned phrase matches if it is found anywhere in the text as an exact substring.", + "Banned phrase only matches if the pattern found in the text is surrounded by word delimiters. The phrase itself may still contain word delimiters." + ], + "type": "string" + }, + "phrase": { + "description": "Required. The raw string content to be banned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantGenerationConfig": { + "description": "Configuration for the generation of the assistant response.", + "id": "GoogleCloudDiscoveryengineV1AssistantGenerationConfig", + "properties": { + "defaultLanguage": { + "description": "The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.", + "type": "string" + }, + "systemInstruction": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction", + "description": "System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction": { + "description": "System instruction, also known as the prompt preamble for LLM calls.", + "id": "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction", + "properties": { + "additionalSystemInstruction": { + "description": "Optional. Additional system instruction that will be added to the default system instruction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantToolInfo": { + "description": "Information to identify a tool.", + "id": "GoogleCloudDiscoveryengineV1AssistantToolInfo", + "properties": { + "toolDisplayName": { + "description": "The display name of the tool.", + "type": "string" + }, + "toolName": { + "description": "The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it's using `action` in the DataConnectorService apis, but they are the same as the `tool` here.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantToolList": { + "description": "The enabled tools on a connector", + "id": "GoogleCloudDiscoveryengineV1AssistantToolList", + "properties": { + "toolInfo": { + "description": "The list of tools with corresponding tool information.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantToolInfo" + }, + "type": "array" } }, "type": "object" @@ -14940,9 +15069,40 @@ "description": "Discovery Engine Assistant resource.", "id": "GoogleCloudDiscoveryengineV1alphaAssistant", "properties": { + "customerPolicy": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicy", + "description": "Optional. Customer policy for the assistant." + }, + "enabledTools": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAssistantToolList" + }, + "description": "Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example \"projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {\"jira1ConnectorName\": [(toolId1, \"createTicket\"), (toolId2, \"transferTicket\")], \"gmail1ConnectorName\": [(toolId3, \"sendEmail\"),..] }", + "type": "object" + }, + "generationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig", + "description": "Optional. Configuration for the generation of the assistant response." + }, "name": { "description": "Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "webGroundingType": { + "description": "Optional. The type of web grounding to use.", + "enum": [ + "WEB_GROUNDING_TYPE_UNSPECIFIED", + "WEB_GROUNDING_TYPE_DISABLED", + "WEB_GROUNDING_TYPE_GOOGLE_SEARCH", + "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" + ], + "enumDescriptions": [ + "Default, unspecified setting. This is the same as disabled.", + "Web grounding is disabled.", + "Grounding with Google Search is enabled.", + "Grounding with Enterprise Web Search is enabled." + ], + "type": "string" } }, "type": "object" @@ -15051,6 +15211,75 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicy": { + "description": "Customer-defined policy for the assistant.", + "id": "GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicy", + "properties": { + "bannedPhrases": { + "description": "Optional. List of banned phrases.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicyBannedPhrase" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicyBannedPhrase": { + "description": "Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.", + "id": "GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicyBannedPhrase", + "properties": { + "ignoreDiacritics": { + "description": "Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, \"cafe\" would match \"café\".", + "type": "boolean" + }, + "matchType": { + "description": "Optional. Match type for the banned phrase.", + "enum": [ + "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED", + "SIMPLE_STRING_MATCH", + "WORD_BOUNDARY_STRING_MATCH" + ], + "enumDescriptions": [ + "Defaults to SIMPLE_STRING_MATCH.", + "The banned phrase matches if it is found anywhere in the text as an exact substring.", + "Banned phrase only matches if the pattern found in the text is surrounded by word delimiters. The phrase itself may still contain word delimiters." + ], + "type": "string" + }, + "phrase": { + "description": "Required. The raw string content to be banned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig": { + "description": "Configuration for the generation of the assistant response.", + "id": "GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig", + "properties": { + "defaultLanguage": { + "description": "The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.", + "type": "string" + }, + "systemInstruction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfigSystemInstruction", + "description": "System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfigSystemInstruction": { + "description": "System instruction, also known as the prompt preamble for LLM calls.", + "id": "GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfigSystemInstruction", + "properties": { + "additionalSystemInstruction": { + "description": "Optional. Additional system instruction that will be added to the default system instruction.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAssistantGroundedContent": { "description": "A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like \"Of course, I will gladly search it for you.\" do not need grounding.", "id": "GoogleCloudDiscoveryengineV1alphaAssistantGroundedContent", @@ -15163,6 +15392,35 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAssistantToolInfo": { + "description": "Information to identify a tool.", + "id": "GoogleCloudDiscoveryengineV1alphaAssistantToolInfo", + "properties": { + "toolDisplayName": { + "description": "The display name of the tool.", + "type": "string" + }, + "toolName": { + "description": "The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it's using `action` in the DataConnectorService apis, but they are the same as the `tool` here.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAssistantToolList": { + "description": "The enabled tools on a connector", + "id": "GoogleCloudDiscoveryengineV1alphaAssistantToolList", + "properties": { + "toolInfo": { + "description": "The list of tools with corresponding tool information.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAssistantToolInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaBAPConfig": { "description": "The configuration for the BAP connector.", "id": "GoogleCloudDiscoveryengineV1alphaBAPConfig", @@ -15901,6 +16159,10 @@ "description": "Document metadata contains the information of the document of the current chunk.", "id": "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata", "properties": { + "mimeType": { + "description": "The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.", + "type": "string" + }, "structData": { "additionalProperties": { "description": "Properties of the object.", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 3f575724be..f5d11a04fc 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -2751,20 +2751,46 @@ func (s *GoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSp // GoogleCloudDiscoveryengineV1Assistant: Discovery Engine Assistant resource. type GoogleCloudDiscoveryengineV1Assistant struct { + // CustomerPolicy: Optional. Customer policy for the assistant. + CustomerPolicy *GoogleCloudDiscoveryengineV1AssistantCustomerPolicy `json:"customerPolicy,omitempty"` + // EnabledTools: Optional. Note: not implemented yet. Use enabled_actions + // instead. The enabled tools on this assistant. The keys are connector name, + // for example + // "projects/{projectId}/locations/{locationId}/collections/{collectionId}/datac + // onnector The values consist of admin enabled tools towards the connector + // instance. Admin can selectively enable multiple tools on any of the + // connector instances that they created in the project. For example + // {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, + // "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } + EnabledTools map[string]GoogleCloudDiscoveryengineV1AssistantToolList `json:"enabledTools,omitempty"` + // GenerationConfig: Optional. Configuration for the generation of the + // assistant response. + GenerationConfig *GoogleCloudDiscoveryengineV1AssistantGenerationConfig `json:"generationConfig,omitempty"` // Name: Immutable. Resource name of the assistant. Format: // `projects/{project}/locations/{location}/collections/{collection}/engines/{en // gine}/assistants/{assistant}` It must be a UTF-8 encoded string with a // length limit of 1024 characters. Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // WebGroundingType: Optional. The type of web grounding to use. + // + // Possible values: + // "WEB_GROUNDING_TYPE_UNSPECIFIED" - Default, unspecified setting. This is + // the same as disabled. + // "WEB_GROUNDING_TYPE_DISABLED" - Web grounding is disabled. + // "WEB_GROUNDING_TYPE_GOOGLE_SEARCH" - Grounding with Google Search is + // enabled. + // "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" - Grounding with Enterprise Web + // Search is enabled. + WebGroundingType string `json:"webGroundingType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomerPolicy") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "CustomerPolicy") 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:"-"` } @@ -2774,6 +2800,171 @@ func (s GoogleCloudDiscoveryengineV1Assistant) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1AssistantCustomerPolicy: Customer-defined policy +// for the assistant. +type GoogleCloudDiscoveryengineV1AssistantCustomerPolicy struct { + // BannedPhrases: Optional. List of banned phrases. + BannedPhrases []*GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase `json:"bannedPhrases,omitempty"` + // ForceSendFields is a list of field names (e.g. "BannedPhrases") 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. "BannedPhrases") 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 GoogleCloudDiscoveryengineV1AssistantCustomerPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantCustomerPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase: Definition +// of a customer-defined banned phrase. A banned phrase is not allowed to +// appear in the user query or the LLM response, or else the answer will be +// refused. +type GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase struct { + // IgnoreDiacritics: Optional. If true, diacritical marks (e.g., accents, + // umlauts) are ignored when matching banned phrases. For example, "cafe" would + // match "café". + IgnoreDiacritics bool `json:"ignoreDiacritics,omitempty"` + // MatchType: Optional. Match type for the banned phrase. + // + // Possible values: + // "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED" - Defaults to SIMPLE_STRING_MATCH. + // "SIMPLE_STRING_MATCH" - The banned phrase matches if it is found anywhere + // in the text as an exact substring. + // "WORD_BOUNDARY_STRING_MATCH" - Banned phrase only matches if the pattern + // found in the text is surrounded by word delimiters. The phrase itself may + // still contain word delimiters. + MatchType string `json:"matchType,omitempty"` + // Phrase: Required. The raw string content to be banned. + Phrase string `json:"phrase,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreDiacritics") 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. "IgnoreDiacritics") 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 GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantGenerationConfig: Configuration for the +// generation of the assistant response. +type GoogleCloudDiscoveryengineV1AssistantGenerationConfig struct { + // DefaultLanguage: The default language to use for the generation of the + // assistant response. Use an ISO 639-1 language code such as `en`. If not + // specified, the language will be automatically detected. + DefaultLanguage string `json:"defaultLanguage,omitempty"` + // SystemInstruction: System instruction, also known as the prompt preamble for + // LLM calls. See also + // https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions + SystemInstruction *GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction `json:"systemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. "DefaultLanguage") 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. "DefaultLanguage") 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 GoogleCloudDiscoveryengineV1AssistantGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantGenerationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction: +// System instruction, also known as the prompt preamble for LLM calls. +type GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction struct { + // AdditionalSystemInstruction: Optional. Additional system instruction that + // will be added to the default system instruction. + AdditionalSystemInstruction string `json:"additionalSystemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AdditionalSystemInstruction") 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. "AdditionalSystemInstruction") 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 GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantToolInfo: Information to identify a +// tool. +type GoogleCloudDiscoveryengineV1AssistantToolInfo struct { + // ToolDisplayName: The display name of the tool. + ToolDisplayName string `json:"toolDisplayName,omitempty"` + // ToolName: The name of the tool as defined by + // DataConnectorService.QueryAvailableActions. Note: it's using `action` in the + // DataConnectorService apis, but they are the same as the `tool` here. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolDisplayName") 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. "ToolDisplayName") 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 GoogleCloudDiscoveryengineV1AssistantToolInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantToolInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantToolList: The enabled tools on a +// connector +type GoogleCloudDiscoveryengineV1AssistantToolList struct { + // ToolInfo: The list of tools with corresponding tool information. + ToolInfo []*GoogleCloudDiscoveryengineV1AssistantToolInfo `json:"toolInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInfo") 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. "ToolInfo") 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 GoogleCloudDiscoveryengineV1AssistantToolList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantToolList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata: Metadata related // to the progress of the SiteSearchEngineService.BatchCreateTargetSites // operation. This will be returned by the @@ -8713,23 +8904,49 @@ func (s GoogleCloudDiscoveryengineV1alphaAssistUserMetadata) MarshalJSON() ([]by // GoogleCloudDiscoveryengineV1alphaAssistant: Discovery Engine Assistant // resource. type GoogleCloudDiscoveryengineV1alphaAssistant struct { + // CustomerPolicy: Optional. Customer policy for the assistant. + CustomerPolicy *GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicy `json:"customerPolicy,omitempty"` + // EnabledTools: Optional. Note: not implemented yet. Use enabled_actions + // instead. The enabled tools on this assistant. The keys are connector name, + // for example + // "projects/{projectId}/locations/{locationId}/collections/{collectionId}/datac + // onnector The values consist of admin enabled tools towards the connector + // instance. Admin can selectively enable multiple tools on any of the + // connector instances that they created in the project. For example + // {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, + // "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } + EnabledTools map[string]GoogleCloudDiscoveryengineV1alphaAssistantToolList `json:"enabledTools,omitempty"` + // GenerationConfig: Optional. Configuration for the generation of the + // assistant response. + GenerationConfig *GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig `json:"generationConfig,omitempty"` // Name: Immutable. Resource name of the assistant. Format: // `projects/{project}/locations/{location}/collections/{collection}/engines/{en // gine}/assistants/{assistant}` It must be a UTF-8 encoded string with a // length limit of 1024 characters. Name string `json:"name,omitempty"` + // WebGroundingType: Optional. The type of web grounding to use. + // + // Possible values: + // "WEB_GROUNDING_TYPE_UNSPECIFIED" - Default, unspecified setting. This is + // the same as disabled. + // "WEB_GROUNDING_TYPE_DISABLED" - Web grounding is disabled. + // "WEB_GROUNDING_TYPE_GOOGLE_SEARCH" - Grounding with Google Search is + // enabled. + // "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" - Grounding with Enterprise Web + // Search is enabled. + WebGroundingType string `json:"webGroundingType,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "CustomerPolicy") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "CustomerPolicy") 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:"-"` } @@ -8879,6 +9096,121 @@ func (s GoogleCloudDiscoveryengineV1alphaAssistantContentFile) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicy: Customer-defined +// policy for the assistant. +type GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicy struct { + // BannedPhrases: Optional. List of banned phrases. + BannedPhrases []*GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicyBannedPhrase `json:"bannedPhrases,omitempty"` + // ForceSendFields is a list of field names (e.g. "BannedPhrases") 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. "BannedPhrases") 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 GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicyBannedPhrase: +// Definition of a customer-defined banned phrase. A banned phrase is not +// allowed to appear in the user query or the LLM response, or else the answer +// will be refused. +type GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicyBannedPhrase struct { + // IgnoreDiacritics: Optional. If true, diacritical marks (e.g., accents, + // umlauts) are ignored when matching banned phrases. For example, "cafe" would + // match "café". + IgnoreDiacritics bool `json:"ignoreDiacritics,omitempty"` + // MatchType: Optional. Match type for the banned phrase. + // + // Possible values: + // "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED" - Defaults to SIMPLE_STRING_MATCH. + // "SIMPLE_STRING_MATCH" - The banned phrase matches if it is found anywhere + // in the text as an exact substring. + // "WORD_BOUNDARY_STRING_MATCH" - Banned phrase only matches if the pattern + // found in the text is surrounded by word delimiters. The phrase itself may + // still contain word delimiters. + MatchType string `json:"matchType,omitempty"` + // Phrase: Required. The raw string content to be banned. + Phrase string `json:"phrase,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreDiacritics") 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. "IgnoreDiacritics") 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 GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicyBannedPhrase) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAssistantCustomerPolicyBannedPhrase + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig: Configuration +// for the generation of the assistant response. +type GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig struct { + // DefaultLanguage: The default language to use for the generation of the + // assistant response. Use an ISO 639-1 language code such as `en`. If not + // specified, the language will be automatically detected. + DefaultLanguage string `json:"defaultLanguage,omitempty"` + // SystemInstruction: System instruction, also known as the prompt preamble for + // LLM calls. See also + // https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions + SystemInstruction *GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfigSystemInstruction `json:"systemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. "DefaultLanguage") 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. "DefaultLanguage") 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 GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfigSystemInstruction: +// System instruction, also known as the prompt preamble for LLM calls. +type GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfigSystemInstruction struct { + // AdditionalSystemInstruction: Optional. Additional system instruction that + // will be added to the default system instruction. + AdditionalSystemInstruction string `json:"additionalSystemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AdditionalSystemInstruction") 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. "AdditionalSystemInstruction") 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 GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfigSystemInstruction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAssistantGenerationConfigSystemInstruction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAssistantGroundedContent: A piece of // content and possibly its grounding information. Not all content needs // grounding. Phrases like "Of course, I will gladly search it for you." do not @@ -9037,6 +9369,56 @@ func (s *GoogleCloudDiscoveryengineV1alphaAssistantGroundedContentTextGroundingM return nil } +// GoogleCloudDiscoveryengineV1alphaAssistantToolInfo: Information to identify +// a tool. +type GoogleCloudDiscoveryengineV1alphaAssistantToolInfo struct { + // ToolDisplayName: The display name of the tool. + ToolDisplayName string `json:"toolDisplayName,omitempty"` + // ToolName: The name of the tool as defined by + // DataConnectorService.QueryAvailableActions. Note: it's using `action` in the + // DataConnectorService apis, but they are the same as the `tool` here. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolDisplayName") 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. "ToolDisplayName") 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 GoogleCloudDiscoveryengineV1alphaAssistantToolInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAssistantToolInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAssistantToolList: The enabled tools on a +// connector +type GoogleCloudDiscoveryengineV1alphaAssistantToolList struct { + // ToolInfo: The list of tools with corresponding tool information. + ToolInfo []*GoogleCloudDiscoveryengineV1alphaAssistantToolInfo `json:"toolInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInfo") 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. "ToolInfo") 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 GoogleCloudDiscoveryengineV1alphaAssistantToolList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAssistantToolList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaBAPConfig: The configuration for the BAP // connector. type GoogleCloudDiscoveryengineV1alphaBAPConfig struct { @@ -10066,6 +10448,9 @@ func (s GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata) MarshalJSON() ([]by // GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata: Document metadata // contains the information of the document of the current chunk. type GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata struct { + // MimeType: The mime type of the document. + // https://www.iana.org/assignments/media-types/media-types.xhtml. + MimeType string `json:"mimeType,omitempty"` // StructData: Data representation. The structured JSON data for the document. // It should conform to the registered Schema or an `INVALID_ARGUMENT` error is // thrown. @@ -10074,13 +10459,13 @@ type GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata struct { Title string `json:"title,omitempty"` // Uri: Uri of the document. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "StructData") to + // ForceSendFields is a list of field names (e.g. "MimeType") 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. "StructData") to include in API + // NullFields is a list of field names (e.g. "MimeType") 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. diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 40a03955cf..833e983552 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -6955,13 +6955,13 @@ ], "parameters": { "pageSize": { - "description": "Maximum number of Evaluations to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "description": "Optional. Maximum number of Evaluations to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A page token ListEvaluationsResponse.next_page_token, received from a previous EvaluationService.ListEvaluations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluations must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "description": "Optional. A page token ListEvaluationsResponse.next_page_token, received from a previous EvaluationService.ListEvaluations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluations must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", "location": "query", "type": "string" }, @@ -6998,13 +6998,13 @@ "type": "string" }, "pageSize": { - "description": "Maximum number of ListEvaluationResultsResponse.EvaluationResult to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "description": "Optional. Maximum number of ListEvaluationResultsResponse.EvaluationResult to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A page token ListEvaluationResultsResponse.next_page_token, received from a previous EvaluationService.ListEvaluationResults call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluationResults must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "description": "Optional. A page token ListEvaluationResultsResponse.next_page_token, received from a previous EvaluationService.ListEvaluationResults call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluationResults must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", "location": "query", "type": "string" } @@ -8147,7 +8147,7 @@ } } }, - "revision": "20250728", + "revision": "20250803", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GdataBlobstore2Info": { @@ -9066,9 +9066,138 @@ "description": "Discovery Engine Assistant resource.", "id": "GoogleCloudDiscoveryengineV1Assistant", "properties": { + "customerPolicy": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy", + "description": "Optional. Customer policy for the assistant." + }, + "enabledTools": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantToolList" + }, + "description": "Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example \"projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {\"jira1ConnectorName\": [(toolId1, \"createTicket\"), (toolId2, \"transferTicket\")], \"gmail1ConnectorName\": [(toolId3, \"sendEmail\"),..] }", + "type": "object" + }, + "generationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantGenerationConfig", + "description": "Optional. Configuration for the generation of the assistant response." + }, "name": { "description": "Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "webGroundingType": { + "description": "Optional. The type of web grounding to use.", + "enum": [ + "WEB_GROUNDING_TYPE_UNSPECIFIED", + "WEB_GROUNDING_TYPE_DISABLED", + "WEB_GROUNDING_TYPE_GOOGLE_SEARCH", + "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" + ], + "enumDescriptions": [ + "Default, unspecified setting. This is the same as disabled.", + "Web grounding is disabled.", + "Grounding with Google Search is enabled.", + "Grounding with Enterprise Web Search is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy": { + "description": "Customer-defined policy for the assistant.", + "id": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicy", + "properties": { + "bannedPhrases": { + "description": "Optional. List of banned phrases.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase": { + "description": "Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.", + "id": "GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase", + "properties": { + "ignoreDiacritics": { + "description": "Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, \"cafe\" would match \"café\".", + "type": "boolean" + }, + "matchType": { + "description": "Optional. Match type for the banned phrase.", + "enum": [ + "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED", + "SIMPLE_STRING_MATCH", + "WORD_BOUNDARY_STRING_MATCH" + ], + "enumDescriptions": [ + "Defaults to SIMPLE_STRING_MATCH.", + "The banned phrase matches if it is found anywhere in the text as an exact substring.", + "Banned phrase only matches if the pattern found in the text is surrounded by word delimiters. The phrase itself may still contain word delimiters." + ], + "type": "string" + }, + "phrase": { + "description": "Required. The raw string content to be banned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantGenerationConfig": { + "description": "Configuration for the generation of the assistant response.", + "id": "GoogleCloudDiscoveryengineV1AssistantGenerationConfig", + "properties": { + "defaultLanguage": { + "description": "The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.", + "type": "string" + }, + "systemInstruction": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction", + "description": "System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction": { + "description": "System instruction, also known as the prompt preamble for LLM calls.", + "id": "GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction", + "properties": { + "additionalSystemInstruction": { + "description": "Optional. Additional system instruction that will be added to the default system instruction.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantToolInfo": { + "description": "Information to identify a tool.", + "id": "GoogleCloudDiscoveryengineV1AssistantToolInfo", + "properties": { + "toolDisplayName": { + "description": "The display name of the tool.", + "type": "string" + }, + "toolName": { + "description": "The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it's using `action` in the DataConnectorService apis, but they are the same as the `tool` here.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AssistantToolList": { + "description": "The enabled tools on a connector", + "id": "GoogleCloudDiscoveryengineV1AssistantToolList", + "properties": { + "toolInfo": { + "description": "The list of tools with corresponding tool information.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AssistantToolInfo" + }, + "type": "array" } }, "type": "object" @@ -19247,9 +19376,40 @@ "description": "Discovery Engine Assistant resource.", "id": "GoogleCloudDiscoveryengineV1betaAssistant", "properties": { + "customerPolicy": { + "$ref": "GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicy", + "description": "Optional. Customer policy for the assistant." + }, + "enabledTools": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaAssistantToolList" + }, + "description": "Optional. Note: not implemented yet. Use enabled_actions instead. The enabled tools on this assistant. The keys are connector name, for example \"projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector The values consist of admin enabled tools towards the connector instance. Admin can selectively enable multiple tools on any of the connector instances that they created in the project. For example {\"jira1ConnectorName\": [(toolId1, \"createTicket\"), (toolId2, \"transferTicket\")], \"gmail1ConnectorName\": [(toolId3, \"sendEmail\"),..] }", + "type": "object" + }, + "generationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaAssistantGenerationConfig", + "description": "Optional. Configuration for the generation of the assistant response." + }, "name": { "description": "Immutable. Resource name of the assistant. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` It must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "webGroundingType": { + "description": "Optional. The type of web grounding to use.", + "enum": [ + "WEB_GROUNDING_TYPE_UNSPECIFIED", + "WEB_GROUNDING_TYPE_DISABLED", + "WEB_GROUNDING_TYPE_GOOGLE_SEARCH", + "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" + ], + "enumDescriptions": [ + "Default, unspecified setting. This is the same as disabled.", + "Web grounding is disabled.", + "Grounding with Google Search is enabled.", + "Grounding with Enterprise Web Search is enabled." + ], + "type": "string" } }, "type": "object" @@ -19358,6 +19518,75 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicy": { + "description": "Customer-defined policy for the assistant.", + "id": "GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicy", + "properties": { + "bannedPhrases": { + "description": "Optional. List of banned phrases.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase": { + "description": "Definition of a customer-defined banned phrase. A banned phrase is not allowed to appear in the user query or the LLM response, or else the answer will be refused.", + "id": "GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase", + "properties": { + "ignoreDiacritics": { + "description": "Optional. If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, \"cafe\" would match \"café\".", + "type": "boolean" + }, + "matchType": { + "description": "Optional. Match type for the banned phrase.", + "enum": [ + "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED", + "SIMPLE_STRING_MATCH", + "WORD_BOUNDARY_STRING_MATCH" + ], + "enumDescriptions": [ + "Defaults to SIMPLE_STRING_MATCH.", + "The banned phrase matches if it is found anywhere in the text as an exact substring.", + "Banned phrase only matches if the pattern found in the text is surrounded by word delimiters. The phrase itself may still contain word delimiters." + ], + "type": "string" + }, + "phrase": { + "description": "Required. The raw string content to be banned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAssistantGenerationConfig": { + "description": "Configuration for the generation of the assistant response.", + "id": "GoogleCloudDiscoveryengineV1betaAssistantGenerationConfig", + "properties": { + "defaultLanguage": { + "description": "The default language to use for the generation of the assistant response. Use an ISO 639-1 language code such as `en`. If not specified, the language will be automatically detected.", + "type": "string" + }, + "systemInstruction": { + "$ref": "GoogleCloudDiscoveryengineV1betaAssistantGenerationConfigSystemInstruction", + "description": "System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAssistantGenerationConfigSystemInstruction": { + "description": "System instruction, also known as the prompt preamble for LLM calls.", + "id": "GoogleCloudDiscoveryengineV1betaAssistantGenerationConfigSystemInstruction", + "properties": { + "additionalSystemInstruction": { + "description": "Optional. Additional system instruction that will be added to the default system instruction.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaAssistantGroundedContent": { "description": "A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like \"Of course, I will gladly search it for you.\" do not need grounding.", "id": "GoogleCloudDiscoveryengineV1betaAssistantGroundedContent", @@ -19470,6 +19699,35 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaAssistantToolInfo": { + "description": "Information to identify a tool.", + "id": "GoogleCloudDiscoveryengineV1betaAssistantToolInfo", + "properties": { + "toolDisplayName": { + "description": "The display name of the tool.", + "type": "string" + }, + "toolName": { + "description": "The name of the tool as defined by DataConnectorService.QueryAvailableActions. Note: it's using `action` in the DataConnectorService apis, but they are the same as the `tool` here.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAssistantToolList": { + "description": "The enabled tools on a connector", + "id": "GoogleCloudDiscoveryengineV1betaAssistantToolList", + "properties": { + "toolInfo": { + "description": "The list of tools with corresponding tool information.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAssistantToolInfo" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata", @@ -20090,6 +20348,10 @@ "description": "Document metadata contains the information of the document of the current chunk.", "id": "GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata", "properties": { + "mimeType": { + "description": "The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.", + "type": "string" + }, "structData": { "additionalProperties": { "description": "Properties of the object.", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index fc6ae9052a..d229db99d7 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -2414,20 +2414,46 @@ func (s *GoogleCloudDiscoveryengineV1AnswerGenerationSpecUserDefinedClassifierSp // GoogleCloudDiscoveryengineV1Assistant: Discovery Engine Assistant resource. type GoogleCloudDiscoveryengineV1Assistant struct { + // CustomerPolicy: Optional. Customer policy for the assistant. + CustomerPolicy *GoogleCloudDiscoveryengineV1AssistantCustomerPolicy `json:"customerPolicy,omitempty"` + // EnabledTools: Optional. Note: not implemented yet. Use enabled_actions + // instead. The enabled tools on this assistant. The keys are connector name, + // for example + // "projects/{projectId}/locations/{locationId}/collections/{collectionId}/datac + // onnector The values consist of admin enabled tools towards the connector + // instance. Admin can selectively enable multiple tools on any of the + // connector instances that they created in the project. For example + // {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, + // "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } + EnabledTools map[string]GoogleCloudDiscoveryengineV1AssistantToolList `json:"enabledTools,omitempty"` + // GenerationConfig: Optional. Configuration for the generation of the + // assistant response. + GenerationConfig *GoogleCloudDiscoveryengineV1AssistantGenerationConfig `json:"generationConfig,omitempty"` // Name: Immutable. Resource name of the assistant. Format: // `projects/{project}/locations/{location}/collections/{collection}/engines/{en // gine}/assistants/{assistant}` It must be a UTF-8 encoded string with a // length limit of 1024 characters. Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // WebGroundingType: Optional. The type of web grounding to use. + // + // Possible values: + // "WEB_GROUNDING_TYPE_UNSPECIFIED" - Default, unspecified setting. This is + // the same as disabled. + // "WEB_GROUNDING_TYPE_DISABLED" - Web grounding is disabled. + // "WEB_GROUNDING_TYPE_GOOGLE_SEARCH" - Grounding with Google Search is + // enabled. + // "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" - Grounding with Enterprise Web + // Search is enabled. + WebGroundingType string `json:"webGroundingType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomerPolicy") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "CustomerPolicy") 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:"-"` } @@ -2437,6 +2463,171 @@ func (s GoogleCloudDiscoveryengineV1Assistant) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1AssistantCustomerPolicy: Customer-defined policy +// for the assistant. +type GoogleCloudDiscoveryengineV1AssistantCustomerPolicy struct { + // BannedPhrases: Optional. List of banned phrases. + BannedPhrases []*GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase `json:"bannedPhrases,omitempty"` + // ForceSendFields is a list of field names (e.g. "BannedPhrases") 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. "BannedPhrases") 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 GoogleCloudDiscoveryengineV1AssistantCustomerPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantCustomerPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase: Definition +// of a customer-defined banned phrase. A banned phrase is not allowed to +// appear in the user query or the LLM response, or else the answer will be +// refused. +type GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase struct { + // IgnoreDiacritics: Optional. If true, diacritical marks (e.g., accents, + // umlauts) are ignored when matching banned phrases. For example, "cafe" would + // match "café". + IgnoreDiacritics bool `json:"ignoreDiacritics,omitempty"` + // MatchType: Optional. Match type for the banned phrase. + // + // Possible values: + // "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED" - Defaults to SIMPLE_STRING_MATCH. + // "SIMPLE_STRING_MATCH" - The banned phrase matches if it is found anywhere + // in the text as an exact substring. + // "WORD_BOUNDARY_STRING_MATCH" - Banned phrase only matches if the pattern + // found in the text is surrounded by word delimiters. The phrase itself may + // still contain word delimiters. + MatchType string `json:"matchType,omitempty"` + // Phrase: Required. The raw string content to be banned. + Phrase string `json:"phrase,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreDiacritics") 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. "IgnoreDiacritics") 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 GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantCustomerPolicyBannedPhrase + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantGenerationConfig: Configuration for the +// generation of the assistant response. +type GoogleCloudDiscoveryengineV1AssistantGenerationConfig struct { + // DefaultLanguage: The default language to use for the generation of the + // assistant response. Use an ISO 639-1 language code such as `en`. If not + // specified, the language will be automatically detected. + DefaultLanguage string `json:"defaultLanguage,omitempty"` + // SystemInstruction: System instruction, also known as the prompt preamble for + // LLM calls. See also + // https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions + SystemInstruction *GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction `json:"systemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. "DefaultLanguage") 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. "DefaultLanguage") 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 GoogleCloudDiscoveryengineV1AssistantGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantGenerationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction: +// System instruction, also known as the prompt preamble for LLM calls. +type GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction struct { + // AdditionalSystemInstruction: Optional. Additional system instruction that + // will be added to the default system instruction. + AdditionalSystemInstruction string `json:"additionalSystemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AdditionalSystemInstruction") 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. "AdditionalSystemInstruction") 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 GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantGenerationConfigSystemInstruction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantToolInfo: Information to identify a +// tool. +type GoogleCloudDiscoveryengineV1AssistantToolInfo struct { + // ToolDisplayName: The display name of the tool. + ToolDisplayName string `json:"toolDisplayName,omitempty"` + // ToolName: The name of the tool as defined by + // DataConnectorService.QueryAvailableActions. Note: it's using `action` in the + // DataConnectorService apis, but they are the same as the `tool` here. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolDisplayName") 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. "ToolDisplayName") 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 GoogleCloudDiscoveryengineV1AssistantToolInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantToolInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1AssistantToolList: The enabled tools on a +// connector +type GoogleCloudDiscoveryengineV1AssistantToolList struct { + // ToolInfo: The list of tools with corresponding tool information. + ToolInfo []*GoogleCloudDiscoveryengineV1AssistantToolInfo `json:"toolInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInfo") 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. "ToolInfo") 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 GoogleCloudDiscoveryengineV1AssistantToolList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AssistantToolList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata: Metadata related // to the progress of the SiteSearchEngineService.BatchCreateTargetSites // operation. This will be returned by the @@ -15961,23 +16152,49 @@ func (s GoogleCloudDiscoveryengineV1betaAssistUserMetadata) MarshalJSON() ([]byt // GoogleCloudDiscoveryengineV1betaAssistant: Discovery Engine Assistant // resource. type GoogleCloudDiscoveryengineV1betaAssistant struct { + // CustomerPolicy: Optional. Customer policy for the assistant. + CustomerPolicy *GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicy `json:"customerPolicy,omitempty"` + // EnabledTools: Optional. Note: not implemented yet. Use enabled_actions + // instead. The enabled tools on this assistant. The keys are connector name, + // for example + // "projects/{projectId}/locations/{locationId}/collections/{collectionId}/datac + // onnector The values consist of admin enabled tools towards the connector + // instance. Admin can selectively enable multiple tools on any of the + // connector instances that they created in the project. For example + // {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, + // "transferTicket")], "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } + EnabledTools map[string]GoogleCloudDiscoveryengineV1betaAssistantToolList `json:"enabledTools,omitempty"` + // GenerationConfig: Optional. Configuration for the generation of the + // assistant response. + GenerationConfig *GoogleCloudDiscoveryengineV1betaAssistantGenerationConfig `json:"generationConfig,omitempty"` // Name: Immutable. Resource name of the assistant. Format: // `projects/{project}/locations/{location}/collections/{collection}/engines/{en // gine}/assistants/{assistant}` It must be a UTF-8 encoded string with a // length limit of 1024 characters. Name string `json:"name,omitempty"` + // WebGroundingType: Optional. The type of web grounding to use. + // + // Possible values: + // "WEB_GROUNDING_TYPE_UNSPECIFIED" - Default, unspecified setting. This is + // the same as disabled. + // "WEB_GROUNDING_TYPE_DISABLED" - Web grounding is disabled. + // "WEB_GROUNDING_TYPE_GOOGLE_SEARCH" - Grounding with Google Search is + // enabled. + // "WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH" - Grounding with Enterprise Web + // Search is enabled. + WebGroundingType string `json:"webGroundingType,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "CustomerPolicy") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "CustomerPolicy") 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:"-"` } @@ -16127,6 +16344,121 @@ func (s GoogleCloudDiscoveryengineV1betaAssistantContentFile) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicy: Customer-defined +// policy for the assistant. +type GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicy struct { + // BannedPhrases: Optional. List of banned phrases. + BannedPhrases []*GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase `json:"bannedPhrases,omitempty"` + // ForceSendFields is a list of field names (e.g. "BannedPhrases") 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. "BannedPhrases") 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 GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase: +// Definition of a customer-defined banned phrase. A banned phrase is not +// allowed to appear in the user query or the LLM response, or else the answer +// will be refused. +type GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase struct { + // IgnoreDiacritics: Optional. If true, diacritical marks (e.g., accents, + // umlauts) are ignored when matching banned phrases. For example, "cafe" would + // match "café". + IgnoreDiacritics bool `json:"ignoreDiacritics,omitempty"` + // MatchType: Optional. Match type for the banned phrase. + // + // Possible values: + // "BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED" - Defaults to SIMPLE_STRING_MATCH. + // "SIMPLE_STRING_MATCH" - The banned phrase matches if it is found anywhere + // in the text as an exact substring. + // "WORD_BOUNDARY_STRING_MATCH" - Banned phrase only matches if the pattern + // found in the text is surrounded by word delimiters. The phrase itself may + // still contain word delimiters. + MatchType string `json:"matchType,omitempty"` + // Phrase: Required. The raw string content to be banned. + Phrase string `json:"phrase,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreDiacritics") 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. "IgnoreDiacritics") 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 GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAssistantCustomerPolicyBannedPhrase + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaAssistantGenerationConfig: Configuration for +// the generation of the assistant response. +type GoogleCloudDiscoveryengineV1betaAssistantGenerationConfig struct { + // DefaultLanguage: The default language to use for the generation of the + // assistant response. Use an ISO 639-1 language code such as `en`. If not + // specified, the language will be automatically detected. + DefaultLanguage string `json:"defaultLanguage,omitempty"` + // SystemInstruction: System instruction, also known as the prompt preamble for + // LLM calls. See also + // https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions + SystemInstruction *GoogleCloudDiscoveryengineV1betaAssistantGenerationConfigSystemInstruction `json:"systemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. "DefaultLanguage") 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. "DefaultLanguage") 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 GoogleCloudDiscoveryengineV1betaAssistantGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAssistantGenerationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaAssistantGenerationConfigSystemInstruction: +// System instruction, also known as the prompt preamble for LLM calls. +type GoogleCloudDiscoveryengineV1betaAssistantGenerationConfigSystemInstruction struct { + // AdditionalSystemInstruction: Optional. Additional system instruction that + // will be added to the default system instruction. + AdditionalSystemInstruction string `json:"additionalSystemInstruction,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AdditionalSystemInstruction") 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. "AdditionalSystemInstruction") 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 GoogleCloudDiscoveryengineV1betaAssistantGenerationConfigSystemInstruction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAssistantGenerationConfigSystemInstruction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaAssistantGroundedContent: A piece of content // and possibly its grounding information. Not all content needs grounding. // Phrases like "Of course, I will gladly search it for you." do not need @@ -16285,6 +16617,56 @@ func (s *GoogleCloudDiscoveryengineV1betaAssistantGroundedContentTextGroundingMe return nil } +// GoogleCloudDiscoveryengineV1betaAssistantToolInfo: Information to identify a +// tool. +type GoogleCloudDiscoveryengineV1betaAssistantToolInfo struct { + // ToolDisplayName: The display name of the tool. + ToolDisplayName string `json:"toolDisplayName,omitempty"` + // ToolName: The name of the tool as defined by + // DataConnectorService.QueryAvailableActions. Note: it's using `action` in the + // DataConnectorService apis, but they are the same as the `tool` here. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolDisplayName") 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. "ToolDisplayName") 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 GoogleCloudDiscoveryengineV1betaAssistantToolInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAssistantToolInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaAssistantToolList: The enabled tools on a +// connector +type GoogleCloudDiscoveryengineV1betaAssistantToolList struct { + // ToolInfo: The list of tools with corresponding tool information. + ToolInfo []*GoogleCloudDiscoveryengineV1betaAssistantToolInfo `json:"toolInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInfo") 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. "ToolInfo") 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 GoogleCloudDiscoveryengineV1betaAssistantToolList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAssistantToolList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: Metadata // related to the progress of the // SiteSearchEngineService.BatchCreateTargetSites operation. This will be @@ -17144,6 +17526,9 @@ func (s GoogleCloudDiscoveryengineV1betaChunkChunkMetadata) MarshalJSON() ([]byt // GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata: Document metadata // contains the information of the document of the current chunk. type GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata struct { + // MimeType: The mime type of the document. + // https://www.iana.org/assignments/media-types/media-types.xhtml. + MimeType string `json:"mimeType,omitempty"` // StructData: Data representation. The structured JSON data for the document. // It should conform to the registered Schema or an `INVALID_ARGUMENT` error is // thrown. @@ -17152,13 +17537,13 @@ type GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata struct { Title string `json:"title,omitempty"` // Uri: Uri of the document. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "StructData") to + // ForceSendFields is a list of field names (e.g. "MimeType") 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. "StructData") to include in API + // NullFields is a list of field names (e.g. "MimeType") 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. diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 9f7d7f092d..45e7b6d773 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20250727", + "revision": "20250731", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -455,6 +455,7 @@ "PROHIBITED_CONTENT", "SPII", "MALFORMED_FUNCTION_CALL", + "MODEL_ARMOR", "IMAGE_SAFETY", "IMAGE_PROHIBITED_CONTENT", "IMAGE_RECITATION", @@ -472,6 +473,7 @@ "Token generation stopped for potentially containing prohibited content.", "Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).", "The function call generated by the model is invalid.", + "The model response was blocked by Model Armor.", "Token generation stopped because generated images has safety violations.", "Image generation stopped because generated images has other prohibited content.", "Image generation stopped due to recitation.", @@ -958,6 +960,10 @@ "description": "Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", "type": "object" }, + "modelArmorConfig": { + "$ref": "GoogleCloudAiplatformV1beta1ModelArmorConfig", + "description": "Optional. Settings for prompt and response sanitization using the Model Armor service. If supplied, safety_settings must not be supplied." + }, "safetySettings": { "description": "Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.", "items": { @@ -1035,6 +1041,7 @@ "OTHER", "BLOCKLIST", "PROHIBITED_CONTENT", + "MODEL_ARMOR", "IMAGE_SAFETY" ], "enumDescriptions": [ @@ -1043,6 +1050,7 @@ "Candidates blocked due to other reason.", "Candidates blocked due to the terms which are included from the terminology blocklist.", "Candidates blocked due to prohibited content.", + "The user prompt was blocked by Model Armor.", "Candidates blocked due to unsafe image generation content." ], "readOnly": true, @@ -1716,6 +1724,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ModelArmorConfig": { + "description": "Configuration for Model Armor integrations of prompt and responses.", + "id": "GoogleCloudAiplatformV1beta1ModelArmorConfig", + "properties": { + "promptTemplateName": { + "description": "Optional. The name of the Model Armor template to use for prompt sanitization.", + "type": "string" + }, + "responseTemplateName": { + "description": "Optional. The name of the Model Armor template to use for response sanitization.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Part": { "description": "A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.", "id": "GoogleCloudAiplatformV1beta1Part", diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index 91c291c5ad..2542a04d37 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -564,6 +564,7 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // Sensitive Personally Identifiable Information (SPII). // "MALFORMED_FUNCTION_CALL" - The function call generated by the model is // invalid. + // "MODEL_ARMOR" - The model response was blocked by Model Armor. // "IMAGE_SAFETY" - Token generation stopped because generated images has // safety violations. // "IMAGE_PROHIBITED_CONTENT" - Image generation stopped because generated @@ -1208,6 +1209,10 @@ type GoogleCloudAiplatformV1beta1GenerateContentRequest struct { // International characters are allowed. Label values are optional. Label keys // must start with a letter. Labels map[string]string `json:"labels,omitempty"` + // ModelArmorConfig: Optional. Settings for prompt and response sanitization + // using the Model Armor service. If supplied, safety_settings must not be + // supplied. + ModelArmorConfig *GoogleCloudAiplatformV1beta1ModelArmorConfig `json:"modelArmorConfig,omitempty"` // SafetySettings: Optional. Per request settings for blocking unsafe content. // Enforced on GenerateContentResponse.candidates. SafetySettings []*GoogleCloudAiplatformV1beta1SafetySetting `json:"safetySettings,omitempty"` @@ -1292,6 +1297,7 @@ type GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback struct { // "BLOCKLIST" - Candidates blocked due to the terms which are included from // the terminology blocklist. // "PROHIBITED_CONTENT" - Candidates blocked due to prohibited content. + // "MODEL_ARMOR" - The user prompt was blocked by Model Armor. // "IMAGE_SAFETY" - Candidates blocked due to unsafe image generation // content. BlockReason string `json:"blockReason,omitempty"` @@ -2105,6 +2111,33 @@ func (s GoogleCloudAiplatformV1beta1ModalityTokenCount) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ModelArmorConfig: Configuration for Model Armor +// integrations of prompt and responses. +type GoogleCloudAiplatformV1beta1ModelArmorConfig struct { + // PromptTemplateName: Optional. The name of the Model Armor template to use + // for prompt sanitization. + PromptTemplateName string `json:"promptTemplateName,omitempty"` + // ResponseTemplateName: Optional. The name of the Model Armor template to use + // for response sanitization. + ResponseTemplateName string `json:"responseTemplateName,omitempty"` + // ForceSendFields is a list of field names (e.g. "PromptTemplateName") 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. "PromptTemplateName") 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 GoogleCloudAiplatformV1beta1ModelArmorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ModelArmorConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Part: A datatype containing media that is part // of a multi-part `Content` message. A `Part` consists of data which has an // associated datatype. A `Part` can only contain one of the accepted types in diff --git a/idtoken/idtoken.go b/idtoken/idtoken.go index c8bf7c9b1f..56e15da66f 100644 --- a/idtoken/idtoken.go +++ b/idtoken/idtoken.go @@ -68,9 +68,12 @@ func NewClient(ctx context.Context, audience string, opts ...ClientOption) (*htt // Skip DialSettings validation so added TokenSource will not conflict with user // provided credentials. opts = append(opts, option.WithTokenSource(ts), internaloption.SkipDialSettingsValidation()) - httpTransport := http.DefaultTransport.(*http.Transport).Clone() - httpTransport.MaxIdleConnsPerHost = 100 - t, err := htransport.NewTransport(ctx, httpTransport, opts...) + defaultTrans := http.DefaultTransport + if trans, ok := defaultTrans.(*http.Transport); ok { + defaultTrans = trans.Clone() + defaultTrans.(*http.Transport).MaxIdleConnsPerHost = 100 + } + t, err := htransport.NewTransport(ctx, defaultTrans, opts...) if err != nil { return nil, err } diff --git a/internal/version.go b/internal/version.go index acea3565d0..9ed9684f8f 100644 --- a/internal/version.go +++ b/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.245.0" +const Version = "0.246.0" diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index a009b11cd6..6d55169e30 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -2311,11 +2311,11 @@ } } }, - "revision": "20250729", + "revision": "20250803", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "About": { - "description": "Collection of information related to the about page ([impressum](https://support.google.com/merchants/answer/14675634?hl=en\u0026ref_topic=15145634\u0026sjid=6892280366904591178-NC)).", + "description": "Collection of information related to the about page ([impressum](https://support.google.com/merchants/answer/14675634?ref_topic=15145634\u0026sjid=6892280366904591178-NC)).", "id": "About", "properties": { "state": { @@ -3635,7 +3635,7 @@ "type": "object" }, "InventoryVerification": { - "description": "Collection of information related to [inventory verification](https://support.google.com/merchants/answer/14684499?hl=en\u0026ref_topic=15145634\u0026sjid=6892280366904591178-NC).", + "description": "Collection of information related to [inventory verification](https://support.google.com/merchants/answer/14684499?ref_topic=15145634\u0026sjid=6892280366904591178-NC).", "id": "InventoryVerification", "properties": { "contact": { @@ -4145,7 +4145,7 @@ "type": "object" }, "OnDisplayToOrder": { - "description": "Collection of information related to the on display to order ([ODO](https://support.google.com/merchants/answer/14615056?hl=en\u0026ref_topic=15145747\u0026sjid=6892280366904591178-NC)).", + "description": "Collection of information related to the on display to order ([ODO](https://support.google.com/merchants/answer/14615056?ref_topic=15145747\u0026sjid=6892280366904591178-NC)).", "id": "OnDisplayToOrder", "properties": { "state": { diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index 7e7bd3e50a..f50f67ede5 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -415,7 +415,7 @@ type TermsOfServiceService struct { } // About: Collection of information related to the about page (impressum -// (https://support.google.com/merchants/answer/14675634?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC)). +// (https://support.google.com/merchants/answer/14675634?ref_topic=15145634&sjid=6892280366904591178-NC)). type About struct { // State: Output only. The state of the URI. // @@ -2182,7 +2182,7 @@ func (s InStock) MarshalJSON() ([]byte, error) { // InventoryVerification: Collection of information related to inventory // verification -// (https://support.google.com/merchants/answer/14684499?hl=en&ref_topic=15145634&sjid=6892280366904591178-NC). +// (https://support.google.com/merchants/answer/14684499?ref_topic=15145634&sjid=6892280366904591178-NC). type InventoryVerification struct { // Contact: Required. The name of the contact for the inventory verification // process. @@ -2944,7 +2944,7 @@ func (s OmnichannelSetting) MarshalJSON() ([]byte, error) { // OnDisplayToOrder: Collection of information related to the on display to // order (ODO -// (https://support.google.com/merchants/answer/14615056?hl=en&ref_topic=15145747&sjid=6892280366904591178-NC)). +// (https://support.google.com/merchants/answer/14615056?ref_topic=15145747&sjid=6892280366904591178-NC)). type OnDisplayToOrder struct { // State: Output only. The state of the URI. // diff --git a/merchantapi/lfp_v1beta/merchantapi-api.json b/merchantapi/lfp_v1beta/merchantapi-api.json index 3ba361a91f..1965d3d348 100644 --- a/merchantapi/lfp_v1beta/merchantapi-api.json +++ b/merchantapi/lfp_v1beta/merchantapi-api.json @@ -327,7 +327,7 @@ } } }, - "revision": "20250621", + "revision": "20250803", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "CountrySettings": { @@ -617,7 +617,7 @@ "id": "LfpStore", "properties": { "gcidCategory": { - "description": "Optional. [Google My Business category id](https://gcid-explorer.corp.google.com/static/gcid.html).", + "description": "Optional. [Google My Business category id](https://support.google.com/business/answer/7249669).", "items": { "type": "string" }, diff --git a/merchantapi/lfp_v1beta/merchantapi-gen.go b/merchantapi/lfp_v1beta/merchantapi-gen.go index 55487da86a..f8e08424ac 100644 --- a/merchantapi/lfp_v1beta/merchantapi-gen.go +++ b/merchantapi/lfp_v1beta/merchantapi-gen.go @@ -499,7 +499,7 @@ func (s LfpSale) MarshalJSON() ([]byte, error) { // will not be used. type LfpStore struct { // GcidCategory: Optional. Google My Business category id - // (https://gcid-explorer.corp.google.com/static/gcid.html). + // (https://support.google.com/business/answer/7249669). GcidCategory []string `json:"gcidCategory,omitempty"` // MatchingState: Optional. Output only. The state of matching to a Google // Business Profile. See matchingStateHint for further details if no match is diff --git a/mybusinessverifications/v1/mybusinessverifications-api.json b/mybusinessverifications/v1/mybusinessverifications-api.json index cbc9315b95..43cf7bed4b 100644 --- a/mybusinessverifications/v1/mybusinessverifications-api.json +++ b/mybusinessverifications/v1/mybusinessverifications-api.json @@ -256,7 +256,7 @@ } } }, - "revision": "20250721", + "revision": "20250804", "rootUrl": "https://mybusinessverifications.googleapis.com/", "schemas": { "AddressVerificationData": { @@ -541,7 +541,8 @@ "PHONE_CALL", "SMS", "AUTO", - "VETTED_PARTNER" + "VETTED_PARTNER", + "TRUSTED_PARTNER" ], "enumDescriptions": [ "Default value, will result in errors.", @@ -550,7 +551,8 @@ "Make a phone call with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", "Send an SMS with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", "Verify the location without additional user action. This option may not be available for all locations.", - "This option may not be available for all locations." + "This option may not be available for all locations.", + "Verify the location via a trusted partner." ], "type": "string" }, @@ -606,7 +608,8 @@ "PHONE_CALL", "SMS", "AUTO", - "VETTED_PARTNER" + "VETTED_PARTNER", + "TRUSTED_PARTNER" ], "enumDescriptions": [ "Default value, will result in errors.", @@ -615,7 +618,8 @@ "Make a phone call with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", "Send an SMS with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", "Verify the location without additional user action. This option may not be available for all locations.", - "This option may not be available for all locations." + "This option may not be available for all locations.", + "Verify the location via a trusted partner." ], "type": "string" } @@ -673,7 +677,8 @@ "PHONE_CALL", "SMS", "AUTO", - "VETTED_PARTNER" + "VETTED_PARTNER", + "TRUSTED_PARTNER" ], "enumDescriptions": [ "Default value, will result in errors.", @@ -682,7 +687,8 @@ "Make a phone call with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", "Send an SMS with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", "Verify the location without additional user action. This option may not be available for all locations.", - "This option may not be available for all locations." + "This option may not be available for all locations.", + "Verify the location via a trusted partner." ], "type": "string" }, @@ -693,6 +699,10 @@ "token": { "$ref": "VerificationToken", "description": "Optional. The input for VETTED_PARTNER method available to select [partners.](https://support.google.com/business/answer/7674102) The input is not needed for a vetted account. Token that is associated to the location. Token that is associated to the location." + }, + "trustedPartnerToken": { + "description": "The input for TRUSTED_PARTNER method The verification token that is associated to the location.", + "type": "string" } }, "type": "object" diff --git a/mybusinessverifications/v1/mybusinessverifications-gen.go b/mybusinessverifications/v1/mybusinessverifications-gen.go index d13f86fdf4..1dd25c1f4f 100644 --- a/mybusinessverifications/v1/mybusinessverifications-gen.go +++ b/mybusinessverifications/v1/mybusinessverifications-gen.go @@ -654,6 +654,7 @@ type Verification struct { // "AUTO" - Verify the location without additional user action. This option // may not be available for all locations. // "VETTED_PARTNER" - This option may not be available for all locations. + // "TRUSTED_PARTNER" - Verify the location via a trusted partner. Method string `json:"method,omitempty"` // Name: Resource name of the verification. Name string `json:"name,omitempty"` @@ -711,6 +712,7 @@ type VerificationOption struct { // "AUTO" - Verify the location without additional user action. This option // may not be available for all locations. // "VETTED_PARTNER" - This option may not be available for all locations. + // "TRUSTED_PARTNER" - Verify the location via a trusted partner. VerificationMethod string `json:"verificationMethod,omitempty"` // ForceSendFields is a list of field names (e.g. "AddressData") to // unconditionally include in API requests. By default, fields with empty or @@ -814,6 +816,7 @@ type VerifyLocationRequest struct { // "AUTO" - Verify the location without additional user action. This option // may not be available for all locations. // "VETTED_PARTNER" - This option may not be available for all locations. + // "TRUSTED_PARTNER" - Verify the location via a trusted partner. Method string `json:"method,omitempty"` // PhoneNumber: Optional. The input for PHONE_CALL/SMS method The phone number // that should be called or be sent SMS to. It must be one of the phone numbers @@ -824,6 +827,9 @@ type VerifyLocationRequest struct { // not needed for a vetted account. Token that is associated to the location. // Token that is associated to the location. Token *VerificationToken `json:"token,omitempty"` + // TrustedPartnerToken: The input for TRUSTED_PARTNER method The verification + // token that is associated to the location. + TrustedPartnerToken string `json:"trustedPartnerToken,omitempty"` // ForceSendFields is a list of field names (e.g. "Context") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 611bb60f1c..a390626953 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2711,7 +2711,7 @@ } } }, - "revision": "20250506", + "revision": "20250804", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -6206,9 +6206,13 @@ "description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#image\"`.", "type": "string" }, + "privateImageId": { + "description": "An ID for an already uploaded private image. Either this or source_uri should be set. Requests setting both or neither will be rejected. Please contact support to use private images.", + "type": "string" + }, "sourceUri": { "$ref": "ImageUri", - "description": "The URI for the image." + "description": "A URI for the image. Either this or private_image_id should be set. Requests setting both or neither will be rejected." } }, "type": "object" @@ -9747,6 +9751,23 @@ }, "type": "object" }, + "UploadPrivateImageRequest": { + "description": "Request to upload a private image to use in a pass.", + "id": "UploadPrivateImageRequest", + "properties": {}, + "type": "object" + }, + "UploadPrivateImageResponse": { + "description": "Response for uploading the private image.", + "id": "UploadPrivateImageResponse", + "properties": { + "privateImageId": { + "description": "Unique ID of the uploaded image to be referenced later in Image.private_image_id.", + "type": "string" + } + }, + "type": "object" + }, "Uri": { "id": "Uri", "properties": { diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index 8988a9ac22..842a27a693 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -4115,7 +4115,12 @@ type Image struct { // Kind: Identifies what kind of resource this is. Value: the fixed string // "walletobjects#image". Kind string `json:"kind,omitempty"` - // SourceUri: The URI for the image. + // PrivateImageId: An ID for an already uploaded private image. Either this or + // source_uri should be set. Requests setting both or neither will be rejected. + // Please contact support to use private images. + PrivateImageId string `json:"privateImageId,omitempty"` + // SourceUri: A URI for the image. Either this or private_image_id should be + // set. Requests setting both or neither will be rejected. SourceUri *ImageUri `json:"sourceUri,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentDescription") to // unconditionally include in API requests. By default, fields with empty or @@ -7808,6 +7813,34 @@ func (s UpcomingNotification) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// UploadPrivateImageRequest: Request to upload a private image to use in a +// pass. +type UploadPrivateImageRequest struct { +} + +// UploadPrivateImageResponse: Response for uploading the private image. +type UploadPrivateImageResponse struct { + // PrivateImageId: Unique ID of the uploaded image to be referenced later in + // Image.private_image_id. + PrivateImageId string `json:"privateImageId,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrivateImageId") 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. "PrivateImageId") 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 UploadPrivateImageResponse) MarshalJSON() ([]byte, error) { + type NoMethod UploadPrivateImageResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type Uri struct { // Description: The URI's title appearing in the app as text. Recommended // maximum is 20 characters to ensure full string is displayed on smaller