Contents

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 the AssistantService trait)
  • CmekConfigServiceClient: Service for managing CMEK related tasks. (enabled by the CmekConfigService trait)
  • CompletionServiceClient: Service for Auto-Completion. (enabled by the CompletionService trait)
  • ControlServiceClient: Service for performing CRUD operations on Controls. (enabled by the ControlService trait)
  • ConversationalSearchServiceClient: Service for conversational search. (enabled by the ConversationalSearchService trait)
  • DataStoreServiceClient: Service for managing DataStore configuration. (enabled by the DataStoreService trait)
  • DocumentServiceClient: Service for ingesting Document information of the customer's website. (enabled by the DocumentService trait)
  • EngineServiceClient: Service for managing Engine configuration. (enabled by the EngineService trait)
  • GroundedGenerationServiceClient: Service for grounded generation. (enabled by the GroundedGenerationService trait)
  • IdentityMappingStoreServiceClient: Service for managing Identity Mapping Stores. (enabled by the IdentityMappingStoreService trait)
  • ProjectServiceClient: Service for operations on the Project. (enabled by the ProjectService trait)
  • RankServiceClient: Service for ranking text records. (enabled by the RankService trait)
  • RecommendationServiceClient: Service for making recommendations. (enabled by the RecommendationService trait)
  • SchemaServiceClient: Service for managing Schemas. (enabled by the SchemaService trait)
  • SearchServiceClient: Service for search. (enabled by the SearchService trait)
  • SearchTuningServiceClient: Service for search tuning. (enabled by the SearchTuningService trait)
  • ServingConfigServiceClient: Service for operations related to ServingConfig. (enabled by the ServingConfigService trait)
  • SessionServiceClient: Service for managing Sessions and Session-related resources. (enabled by the SessionService trait)
  • SiteSearchEngineServiceClient: Service for managing site search related resources. (enabled by the SiteSearchEngineService trait)
  • UserEventServiceClient: Service for ingesting end user actions on a website to Discovery Engine API. (enabled by the UserEventService trait)
  • UserLicenseServiceClient: Service for managing User Licenses. (enabled by the UserLicenseService trait)

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.0

Then add GoogleCloudDiscoveryEngineV1 to your target's dependencies:

swift package add-target-dependency GoogleCloudDiscoveryEngineV1 <target-name> --package swift-google-cloud-discoveryengine-v1

Package 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:

  • SearchService
  • RecommendationService

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