googleapis/swift-google-cloud-discoveryengine-v1
Discovery Engine API.
Overview
The following types provide methods to make RPCs. They are a good starting point to learn about this library.
AssistantServiceClient: Service for managing Assistant configuration and assisting users. (enabled by theAssistantServicetrait)CmekConfigServiceClient: Service for managing CMEK related tasks. (enabled by theCmekConfigServicetrait)CompletionServiceClient: Service for Auto-Completion. (enabled by theCompletionServicetrait)ControlServiceClient: Service for performing CRUD operations on Controls. (enabled by theControlServicetrait)ConversationalSearchServiceClient: Service for conversational search. (enabled by theConversationalSearchServicetrait)DataStoreServiceClient: Service for managing DataStore configuration. (enabled by theDataStoreServicetrait)DocumentServiceClient: Service for ingesting Document information of the customer's website. (enabled by theDocumentServicetrait)EngineServiceClient: Service for managing Engine configuration. (enabled by theEngineServicetrait)GroundedGenerationServiceClient: Service for grounded generation. (enabled by theGroundedGenerationServicetrait)IdentityMappingStoreServiceClient: Service for managing Identity Mapping Stores. (enabled by theIdentityMappingStoreServicetrait)ProjectServiceClient: Service for operations on the Project. (enabled by theProjectServicetrait)RankServiceClient: Service for ranking text records. (enabled by theRankServicetrait)RecommendationServiceClient: Service for making recommendations. (enabled by theRecommendationServicetrait)SchemaServiceClient: Service for managing Schemas. (enabled by theSchemaServicetrait)SearchServiceClient: Service for search. (enabled by theSearchServicetrait)SearchTuningServiceClient: Service for search tuning. (enabled by theSearchTuningServicetrait)ServingConfigServiceClient: Service for operations related to ServingConfig. (enabled by theServingConfigServicetrait)SessionServiceClient: Service for managing Sessions and Session-related resources. (enabled by theSessionServicetrait)SiteSearchEngineServiceClient: Service for managing site search related resources. (enabled by theSiteSearchEngineServicetrait)UserEventServiceClient: Service for ingesting end user actions on a website to Discovery Engine API. (enabled by theUserEventServicetrait)UserLicenseServiceClient: Service for managing User Licenses. (enabled by theUserLicenseServicetrait)
Quickstart
The following example demonstrates using CmekConfigServiceClient:
import Foundation
import GoogleCloudDiscoveryEngineV1
import GoogleLongRunning
func sample(projectId: String, locationId: String, ) async throws {
let client = try GoogleCloudDiscoveryEngineV1.CmekConfigServiceClient()
let response = try await client.getCmekConfig(
request: GetCmekConfigRequest()
.with {
$0.name = "projects/\(projectId)/locations/\(locationId)/cmekConfig"
}
)
print("Success: \(response)")
}Requirements
For the minimum supported Swift version and platform requirements, see the Requirements section in the google-cloud-swift repository.
Installation
Add swift-google-cloud-discoveryengine-v1 as a package dependency:
swift package add-dependency https://github.com/googleapis/swift-google-cloud-discoveryengine-v1.git --from 0.6.0Then add GoogleCloudDiscoveryEngineV1 to your target's dependencies:
swift package add-target-dependency GoogleCloudDiscoveryEngineV1 <target-name> --package swift-google-cloud-discoveryengine-v1Package Traits
This package uses Swift package traits to conditionally compile individual service clients and their associated types. Enabling a trait enables the corresponding client and all the request, response, and model types needed to use that client.
The following traits are enabled by default:
SearchServiceRecommendationService
To enable additional traits alongside the defaults, specify them in Package.swift:
.package(url: "https://github.com/googleapis/swift-google-cloud-discoveryengine-v1.git", from: "0.6.0", traits: [".defaults", "<TraitName>"])| Trait | Default | Enabled Client | |---|:---:|---| | AssistantService | No | AssistantServiceClient | | CmekConfigService | No | CmekConfigServiceClient | | CompletionService | No | CompletionServiceClient | | ControlService | No | ControlServiceClient | | ConversationalSearchService | No | ConversationalSearchServiceClient | | DataStoreService | No | DataStoreServiceClient | | DocumentService | No | DocumentServiceClient | | EngineService | No | EngineServiceClient | | GroundedGenerationService | No | GroundedGenerationServiceClient | | IdentityMappingStoreService | No | IdentityMappingStoreServiceClient | | ProjectService | No | ProjectServiceClient | | RankService | No | RankServiceClient | | RecommendationService | Yes | RecommendationServiceClient | | SchemaService | No | SchemaServiceClient | | SearchService | Yes | SearchServiceClient | | SearchTuningService | No | SearchTuningServiceClient | | ServingConfigService | No | ServingConfigServiceClient | | SessionService | No | SessionServiceClient | | SiteSearchEngineService | No | SiteSearchEngineServiceClient | | UserEventService | No | UserEventServiceClient | | UserLicenseService | No | UserLicenseServiceClient |
Troubleshooting
For questions, bug reports, or feature requests, please open an issue in the google-cloud-swift repository.
Contributing
Contributions to this library are always welcome and highly encouraged.
All development, issues, and pull requests are managed in the google-cloud-swift monorepo. See CONTRIBUTING.md for details on getting started.
License
Apache 2.0 - See LICENSE for more information.
Package Metadata
Repository: googleapis/swift-google-cloud-discoveryengine-v1
Default branch: main
README: README.md