Module: Google::Cloud::AutoML::AutoML
- Defined in:
- lib/google/cloud/automl.rb
Class Method Summary collapse
Class Method Details
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
AutoML Server API.
The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.
An ID of a resource is the last element of the item's resource name. For
projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
, then
the id for the item is {dataset_id}
.
Currently the only supported location_id
is "us-central1".
On any input that is documented to expect a string parameter in snake_case or kebab-case, either of those cases is accepted.
144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/google/cloud/automl.rb', line 144 def self.new(*args, version: :v1beta1, **kwargs) unless AVAILABLE_VERSIONS.include?(version.to_s.downcase) raise "The version: #{version} is not available. The available versions " \ "are: [#{AVAILABLE_VERSIONS.join(", ")}]" end require "#{FILE_DIR}/#{version.to_s.downcase}" version_module = Google::Cloud::AutoML .constants .select {|sym| sym.to_s.downcase == version.to_s.downcase} .first Google::Cloud::AutoML.const_get(version_module)::AutoML.new(*args, **kwargs) end |