Class: Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub
- Inherits:
-
Object
- Object
- Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub
- Defined in:
- lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb
Overview
REST service stub for the DataChatService service. Service stub contains baseline method implementations including transcoding, making the REST call, and deserialing the response.
Instance Method Summary collapse
-
#chat(request_pb, options = nil) {|chunk| ... } ⇒ ::Gapic::Rest::TransportOperation
Baseline implementation for the chat REST call.
-
#create_conversation(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation
Baseline implementation for the create_conversation REST call.
-
#delete_conversation(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Baseline implementation for the delete_conversation REST call.
-
#endpoint ⇒ String
The effective endpoint.
-
#get_conversation(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation
Baseline implementation for the get_conversation REST call.
-
#list_conversations(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse
Baseline implementation for the list_conversations REST call.
-
#list_messages(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse
Baseline implementation for the list_messages REST call.
-
#logger(stub: false) ⇒ Logger
The logger used for request/response debug logging.
-
#query_data(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse
Baseline implementation for the query_data REST call.
-
#universe_domain ⇒ String
The effective universe domain.
Instance Method Details
#chat(request_pb, options = nil) {|chunk| ... } ⇒ ::Gapic::Rest::TransportOperation
Baseline implementation for the chat REST call
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 87 def chat(request_pb, = nil, &) raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_chat_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "chat", options: , is_server_streaming: true, & ) ::Gapic::Rest::TransportOperation.new response end |
#create_conversation(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation
Baseline implementation for the create_conversation REST call
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 124 def create_conversation request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_conversation_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "create_conversation", options: ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end |
#delete_conversation(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Baseline implementation for the delete_conversation REST call
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 164 def delete_conversation request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversation_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "delete_conversation", options: ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end |
#endpoint ⇒ String
The effective endpoint
63 64 65 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 63 def endpoint @client_stub.endpoint end |
#get_conversation(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation
Baseline implementation for the get_conversation REST call
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 204 def get_conversation request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_conversation_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "get_conversation", options: ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end |
#list_conversations(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse
Baseline implementation for the list_conversations REST call
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 244 def list_conversations request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_conversations_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "list_conversations", options: ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end |
#list_messages(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse
Baseline implementation for the list_messages REST call
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 284 def request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub. request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "list_messages", options: ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end |
#logger(stub: false) ⇒ Logger
The logger used for request/response debug logging.
72 73 74 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 72 def logger stub: false stub ? @client_stub.stub_logger : @client_stub.logger end |
#query_data(request_pb, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse
Baseline implementation for the query_data REST call
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 324 def query_data request_pb, = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_query_data_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "query_data", options: ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end |
#universe_domain ⇒ String
The effective universe domain
54 55 56 |
# File 'lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb', line 54 def universe_domain @client_stub.universe_domain end |