Method: Google::Cloud::VisionAI::V1::AppPlatform::Rest::Client#get_draft
- Defined in:
- lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb
#get_draft(request, options = nil) ⇒ ::Google::Cloud::VisionAI::V1::Draft #get_draft(name: nil) ⇒ ::Google::Cloud::VisionAI::V1::Draft
Gets details of a single Draft.
1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 |
# File 'lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb', line 1878 def get_draft request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::GetDraftRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_draft..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::VisionAI::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_draft.timeout, metadata: , retry_policy: @config.rpcs.get_draft.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @app_platform_stub.get_draft request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |