Class: Google::Apis::FirebasemlV1beta2::FirebaseMLService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::FirebasemlV1beta2::FirebaseMLService
- Defined in:
- lib/google/apis/firebaseml_v1beta2/service.rb
Overview
Firebase ML API
Access custom machine learning models hosted via Firebase ML.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://firebaseml.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_project_model(parent, model_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Operation
Creates a model in Firebase ML.
-
#delete_project_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Empty
Deletes a model.
-
#download_project_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::DownloadModelResponse
Gets Download information for a model.
-
#get_project_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Model
Gets a model resource.
-
#get_project_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Operation
Gets the latest state of a long-running operation.
-
#initialize ⇒ FirebaseMLService
constructor
A new instance of FirebaseMLService.
-
#list_project_models(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::ListModelsResponse
Lists the models.
-
#patch_project_model(name, model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Operation
Updates a model.
Constructor Details
#initialize ⇒ FirebaseMLService
Returns a new instance of FirebaseMLService.
47 48 49 50 51 52 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-firebaseml_v1beta2', client_version: Google::Apis::FirebasemlV1beta2::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#create_project_model(parent, model_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Operation
Creates a model in Firebase ML. The longrunning operation will eventually return a Model
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 77 def create_project_model(parent, model_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta2/{+parent}/models', ) command.request_representation = Google::Apis::FirebasemlV1beta2::Model::Representation command.request_object = model_object command.response_representation = Google::Apis::FirebasemlV1beta2::Operation::Representation command.response_class = Google::Apis::FirebasemlV1beta2::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Empty
Deletes a model
110 111 112 113 114 115 116 117 118 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 110 def delete_project_model(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta2/{+name}', ) command.response_representation = Google::Apis::FirebasemlV1beta2::Empty::Representation command.response_class = Google::Apis::FirebasemlV1beta2::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#download_project_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::DownloadModelResponse
Gets Download information for a model. This is meant for downloading model resources onto devices. It gives very limited information about the model.
142 143 144 145 146 147 148 149 150 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 142 def download_project_model(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta2/{+name}:download', ) command.response_representation = Google::Apis::FirebasemlV1beta2::DownloadModelResponse::Representation command.response_class = Google::Apis::FirebasemlV1beta2::DownloadModelResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_model(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Model
Gets a model resource.
173 174 175 176 177 178 179 180 181 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 173 def get_project_model(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta2/{+name}', ) command.response_representation = Google::Apis::FirebasemlV1beta2::Model::Representation command.response_class = Google::Apis::FirebasemlV1beta2::Model command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
282 283 284 285 286 287 288 289 290 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 282 def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta2/{+name}', ) command.response_representation = Google::Apis::FirebasemlV1beta2::Operation::Representation command.response_class = Google::Apis::FirebasemlV1beta2::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_models(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::ListModelsResponse
Lists the models
211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 211 def list_project_models(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta2/{+parent}/models', ) command.response_representation = Google::Apis::FirebasemlV1beta2::ListModelsResponse::Representation command.response_class = Google::Apis::FirebasemlV1beta2::ListModelsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_model(name, model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::FirebasemlV1beta2::Operation
Updates a model. The longrunning operation will eventually return a Model.
248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/google/apis/firebaseml_v1beta2/service.rb', line 248 def patch_project_model(name, model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1beta2/{+name}', ) command.request_representation = Google::Apis::FirebasemlV1beta2::Model::Representation command.request_object = model_object command.response_representation = Google::Apis::FirebasemlV1beta2::Operation::Representation command.response_class = Google::Apis::FirebasemlV1beta2::Operation command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |