Reference documentation and code samples for the Cloud Talent Solution V4beta1 API class Google::Cloud::Talent::V4beta1::Completion::Rest::Client.
REST client for the Completion service.
A service handles auto completion.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the Completion Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Completion clients ::Google::Cloud::Talent::V4beta1::Completion::Rest::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.
def complete_query(request, options = nil) -> ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse
complete_query
via a request object, either of type
Google::Cloud::Talent::V4beta1::CompleteQueryRequest or an equivalent Hash.
- request (::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
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).
-
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.
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) — The scope of the completion. The defaults is CompletionScope.PUBLIC.
- type (::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType) — The completion topic. The default is CompletionType.COMBINED.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Talent::V4beta1::CompleteQueryResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/talent/v4beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Talent::V4beta1::Completion::Rest::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.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#initialize
def initialize() { |config| ... } -> Client
Create a new Completion REST client object.
- (config) — Configure the Completion client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Talent::V4beta1::Completion::Rest::Client.new do |config| config.timeout = 10.0 end
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)