# Cloud Talent Solution V4beta1 API - Class Google::Cloud::Talent::V4beta1::Completion::Client (v0.19.0)

0.19.0 (latest) 0.18.1 0.17.1 0.16.0 0.15.0 0.14.1 0.13.0 0.12.0 0.11.1 0.10.2 0.9.0 0.8.1 0.7.0 0.6.1 0.5.0 0.4.6 Reference documentation and code samples for the Cloud Talent Solution V4beta1 API class Google::Cloud::Talent::V4beta1::Completion::Client.

Client for the Completion service.


<br />

A service handles auto completion.

## Inherits

- Object

## Includes

- [Google::Cloud::Talent::V4beta1::Completion::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the Completion Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client-Configuration "Google::Cloud::Talent::V4beta1::Completion::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all Completion clients
::Google::Cloud::Talent::V4beta1::Completion::Client.configure do |config|
  config.timeout = 10.0
end
```

### #complete_query

    def complete_query(request, options = nil) -> ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse
    def complete_query(parent: nil, query: nil, language_codes: nil, page_size: nil, company: nil, scope: nil, type: nil) -> ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse

Completes the specified prefix with keyword suggestions.
Intended for use by a job search auto-complete search box.
**Overloads**

    def complete_query(request, options = nil) -> ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse

Pass arguments to `complete_query` via a request object, either of type [Google::Cloud::Talent::V4beta1::CompleteQueryRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-CompleteQueryRequest "Google::Cloud::Talent::V4beta1::CompleteQueryRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Talent::V4beta1::CompleteQueryRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-CompleteQueryRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def complete_query(parent: nil, query: nil, language_codes: nil, page_size: nil, company: nil, scope: nil, type: nil) -> ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse

Pass arguments to `complete_query` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. Resource name of tenant the completion is performed within.


  The format is "projects/{project_id}/tenants/{tenant_id}", for example,
  "projects/foo/tenant/bar".

  If tenant id is unspecified, the default tenant is used, for
  example, "projects/foo".
- **query** (::String) --- Required. The query used to generate suggestions.


  The maximum number of allowed characters is 255.
- **language_codes** (::Array\<::String\>) --- The list of languages of the query. This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).


  The maximum number of allowed characters is 255.
- **page_size** (::Integer) --- Required. Completion result count.


  The maximum allowed page size is 10.
- **company** (::String) --- If provided, restricts completion to specified company.


  The format is
  "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
  example, "projects/foo/tenants/bar/companies/baz".

  If tenant id is unspecified, the default tenant is used, for
  example, "projects/foo".
- **scope** ([::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-CompleteQueryRequest-CompletionScope)) --- The scope of the completion. The defaults is [CompletionScope.PUBLIC](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-CompleteQueryRequest-CompletionScope#Google__Cloud__Talent__V4beta1__CompleteQueryRequest__CompletionScope__PUBLIC "Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC (constant)").
- **type** ([::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-CompleteQueryRequest-CompletionType)) --- The completion topic. The default is [CompletionType.COMBINED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-CompleteQueryRequest-CompletionType#Google__Cloud__Talent__V4beta1__CompleteQueryRequest__CompletionType__COMBINED "Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED (constant)").
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Talent::V4beta1::CompleteQueryResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-CompleteQueryResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Talent::V4beta1::CompleteQueryResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-CompleteQueryResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/talent/v4beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Talent::V4beta1::Completion::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Talent::V4beta1::CompleteQueryRequest.new

# Call the complete_query method.
result = client.complete_query request

# The returned object is of type Google::Cloud::Talent::V4beta1::CompleteQueryResponse.
p result
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the Completion Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client#Google__Cloud__Talent__V4beta1__Completion__Client_configure_class_ "Google::Cloud::Talent::V4beta1::Completion::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client-Configuration "Google::Cloud::Talent::V4beta1::Completion::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client-Configuration))

### #initialize

    def initialize() { |config| ... } -> Client

Create a new Completion client object.
**Yields**

- (config) --- Configure the Completion client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-talent-v4beta1/latest/Google-Cloud-Talent-V4beta1-Completion-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config|
  config.timeout = 10.0
end
```

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)