class Google::Cloud::Lustre::V1::Lustre::Rest::OperationsServiceStub
including transcoding, making the REST call, and deserialing the response.
Service stub contains baseline method implementations
REST service stub for the Longrunning Operations API.
@private
#
def self.transcode_cancel_operation_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Longrunning::CancelOperationRequest
) --
Other tags:
- Private: -
def self.transcode_cancel_operation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_delete_operation_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Longrunning::DeleteOperationRequest
) --
Other tags:
- Private: -
def self.transcode_delete_operation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_get_operation_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Longrunning::GetOperationRequest
) --
Other tags:
- Private: -
def self.transcode_get_operation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_list_operations_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Longrunning::ListOperationsRequest
) --
Other tags:
- Private: -
def self.transcode_list_operations_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}/operations", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def cancel_operation request_pb, options = nil
-
(::Google::Protobuf::Empty)
-
Other tags:
- Yieldparam: operation -
Yieldparam: result -
Other tags:
- Yield: - Access the result along with the TransportOperation object
Parameters:
-
options
(::Gapic::CallOptions
) -- -
request_pb
(::Google::Longrunning::CancelOperationRequest
) --
def cancel_operation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_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: "cancel_operation", options: 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
def delete_operation request_pb, options = nil
-
(::Google::Protobuf::Empty)
-
Other tags:
- Yieldparam: operation -
Yieldparam: result -
Other tags:
- Yield: - Access the result along with the TransportOperation object
Parameters:
-
options
(::Gapic::CallOptions
) -- -
request_pb
(::Google::Longrunning::DeleteOperationRequest
) --
def delete_operation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", options: 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
def get_operation request_pb, options = nil
-
(::Google::Longrunning::Operation)
-
Other tags:
- Yieldparam: operation -
Yieldparam: result -
Other tags:
- Yield: - Access the result along with the TransportOperation object
Parameters:
-
options
(::Gapic::CallOptions
) -- -
request_pb
(::Google::Longrunning::GetOperationRequest
) --
def get_operation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
def initialize endpoint:, endpoint_template:, universe_domain:, credentials: # These require statements are intentionally placed here to initialize # the REST modules only when it's required. require "gapic/rest" @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, endpoint_template: endpoint_template, universe_domain: universe_domain, credentials: credentials end
def list_operations request_pb, options = nil
-
(::Google::Longrunning::ListOperationsResponse)
-
Other tags:
- Yieldparam: operation -
Yieldparam: result -
Other tags:
- Yield: - Access the result along with the TransportOperation object
Parameters:
-
options
(::Gapic::CallOptions
) -- -
request_pb
(::Google::Longrunning::ListOperationsRequest
) --
def list_operations request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end