lib/google/cloud/dialogflow/v2/sessions/rest/client.rb in google-cloud-dialogflow-v2-0.28.0 vs lib/google/cloud/dialogflow/v2/sessions/rest/client.rb in google-cloud-dialogflow-v2-0.29.0

- old
+ new

@@ -246,9 +246,25 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Dialogflow::V2::DetectIntentResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dialogflow/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dialogflow::V2::Sessions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dialogflow::V2::DetectIntentRequest.new + # + # # Call the detect_intent method. + # result = client.detect_intent request + # + # # The returned object is of type Google::Cloud::Dialogflow::V2::DetectIntentResponse. + # p result + # def detect_intent request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DetectIntentRequest