Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::AnswerRecords::Rest::Client.
REST client for the AnswerRecords service.
Service for managing AnswerRecords.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the AnswerRecords Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AnswerRecords clients ::Google::Cloud::Dialogflow::V2::AnswerRecords::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the AnswerRecords 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 AnswerRecords REST client object.
- (config) — Configure the AnswerRecords client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Rest::Client.new do |config| config.timeout = 10.0 end
#list_answer_records
def list_answer_records(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::AnswerRecord>
def list_answer_records(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::AnswerRecord>
Returns the list of all answer records in the specified project in reverse chronological order.
def list_answer_records(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::AnswerRecord>
list_answer_records
via a request object, either of type
ListAnswerRecordsRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::ListAnswerRecordsRequest, ::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 list_answer_records(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::AnswerRecord>
list_answer_records
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. The project to list all answer records for in reverse
chronological order. Format:
projects/<Project ID>/locations/<Location ID>
. -
filter (::String) — Optional. Filters to restrict results to specific answer records.
Marked deprecated as it hasn't been, and isn't currently, supported.
For more information about filtering, see API Filtering.
- page_size (::Integer) — Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.
- page_token (::String) — Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::AnswerRecord>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::V2::AnswerRecord>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::AnswerRecords::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::ListAnswerRecordsRequest.new # Call the list_answer_records method. result = client.list_answer_records request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Dialogflow::V2::AnswerRecord. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_answer_record
def update_answer_record(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::AnswerRecord
def update_answer_record(answer_record: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::V2::AnswerRecord
Updates the specified answer record.
def update_answer_record(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::AnswerRecord
update_answer_record
via a request object, either of type
UpdateAnswerRecordRequest or an equivalent Hash.
- request (::Google::Cloud::Dialogflow::V2::UpdateAnswerRecordRequest, ::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 update_answer_record(answer_record: nil, update_mask: nil) -> ::Google::Cloud::Dialogflow::V2::AnswerRecord
update_answer_record
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).
- answer_record (::Google::Cloud::Dialogflow::V2::AnswerRecord, ::Hash) — Required. Answer record to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The mask to control which fields get updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dialogflow::V2::AnswerRecord)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dialogflow/v2" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dialogflow::V2::AnswerRecords::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dialogflow::V2::UpdateAnswerRecordRequest.new # Call the update_answer_record method. result = client.update_answer_record request # The returned object is of type Google::Cloud::Dialogflow::V2::AnswerRecord. p result