class Google::Cloud::Lustre::V1::Lustre::Rest::ServiceStub
including transcoding, making the REST call, and deserialing the response.
Service stub contains baseline method implementations
REST service stub for the Lustre service.
#
def self.transcode_create_instance_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Cloud::Lustre::V1::CreateInstanceRequest
) --
Other tags:
- Private: -
def self.transcode_create_instance_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/instances", body: "instance", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_delete_instance_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Cloud::Lustre::V1::DeleteInstanceRequest
) --
Other tags:
- Private: -
def self.transcode_delete_instance_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_export_data_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Cloud::Lustre::V1::ExportDataRequest
) --
Other tags:
- Private: -
def self.transcode_export_data_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:exportData", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_get_instance_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Cloud::Lustre::V1::GetInstanceRequest
) --
Other tags:
- Private: -
def self.transcode_get_instance_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_import_data_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Cloud::Lustre::V1::ImportDataRequest
) --
Other tags:
- Private: -
def self.transcode_import_data_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:importData", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_list_instances_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Cloud::Lustre::V1::ListInstancesRequest
) --
Other tags:
- Private: -
def self.transcode_list_instances_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/instances", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def self.transcode_update_instance_request request_pb
-
(Array(String, [String, nil], Hash{String => String}))
-
Parameters:
-
request_pb
(::Google::Cloud::Lustre::V1::UpdateInstanceRequest
) --
Other tags:
- Private: -
def self.transcode_update_instance_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{instance.name}", body: "instance", matches: [ ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end
def create_instance 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::Cloud::Lustre::V1::CreateInstanceRequest
) --
def create_instance request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_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_instance", 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 delete_instance 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::Cloud::Lustre::V1::DeleteInstanceRequest
) --
def delete_instance request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_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_instance", 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 endpoint
-
(String)
-
def endpoint @client_stub.endpoint end
def export_data 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::Cloud::Lustre::V1::ExportDataRequest
) --
def export_data request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_export_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: "export_data", 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 get_instance request_pb, options = nil
-
(::Google::Cloud::Lustre::V1::Instance)
-
Other tags:
- Yieldparam: operation -
Yieldparam: result -
Other tags:
- Yield: - Access the result along with the TransportOperation object
Parameters:
-
options
(::Gapic::CallOptions
) -- -
request_pb
(::Google::Cloud::Lustre::V1::GetInstanceRequest
) --
def get_instance request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_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_instance", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Lustre::V1::Instance.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end
def import_data 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::Cloud::Lustre::V1::ImportDataRequest
) --
def import_data request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_import_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: "import_data", 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:, logger:
- Private: -
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: # 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, numeric_enums: true, service_name: self.class, raise_faraday_errors: false, logger: logger end
def list_instances request_pb, options = nil
-
(::Google::Cloud::Lustre::V1::ListInstancesResponse)
-
Other tags:
- Yieldparam: operation -
Yieldparam: result -
Other tags:
- Yield: - Access the result along with the TransportOperation object
Parameters:
-
options
(::Gapic::CallOptions
) -- -
request_pb
(::Google::Cloud::Lustre::V1::ListInstancesRequest
) --
def list_instances request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_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_instances", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Lustre::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end
def logger stub: false
-
(Logger)
-
def logger stub: false stub ? @client_stub.stub_logger : @client_stub.logger end
def universe_domain
-
(String)
-
def universe_domain @client_stub.universe_domain end
def update_instance 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::Cloud::Lustre::V1::UpdateInstanceRequest
) --
def update_instance request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_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: "update_instance", 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