Class: Google::Apis::SmartdevicemanagementV1::SmartDeviceManagementService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::SmartdevicemanagementV1::SmartDeviceManagementService
- Defined in:
- generated/google/apis/smartdevicemanagement_v1/service.rb
Overview
Smart Device Management API
Allow select enterprise partners to access, control, and manage Google and Nest devices programmatically.
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
-
#execute_enterprise_device_command(name, google_home_enterprise_sdm_v1_execute_device_command_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse
Executes a command to device managed by the enterprise.
-
#get_enterprise_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Device
Gets a device managed by the enterprise.
-
#get_enterprise_structure(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Structure
Gets a structure managed by the enterprise.
-
#get_enterprise_structure_room(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Room
Gets a room managed by the enterprise.
-
#initialize ⇒ SmartDeviceManagementService
constructor
A new instance of SmartDeviceManagementService.
-
#list_enterprise_devices(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListDevicesResponse
Lists devices managed by the enterprise.
-
#list_enterprise_structure_rooms(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListRoomsResponse
Lists rooms managed by the enterprise.
-
#list_enterprise_structures(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListStructuresResponse
Lists structures managed by the enterprise.
Constructor Details
#initialize ⇒ SmartDeviceManagementService
Returns a new instance of SmartDeviceManagementService.
46 47 48 49 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 46 def initialize super('https://smartdevicemanagement.googleapis.com/', '') @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.
39 40 41 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 39 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.
44 45 46 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#execute_enterprise_device_command(name, google_home_enterprise_sdm_v1_execute_device_command_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse
Executes a command to device managed by the enterprise.
72 73 74 75 76 77 78 79 80 81 82 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 72 def execute_enterprise_device_command(name, google_home_enterprise_sdm_v1_execute_device_command_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:executeCommand', ) command.request_representation = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest::Representation command.request_object = google_home_enterprise_sdm_v1_execute_device_command_request_object command.response_representation = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse::Representation command.response_class = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse 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_enterprise_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Device
Gets a device managed by the enterprise.
104 105 106 107 108 109 110 111 112 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 104 def get_enterprise_device(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Device::Representation command.response_class = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Device 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_enterprise_structure(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Structure
Gets a structure managed by the enterprise.
176 177 178 179 180 181 182 183 184 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 176 def get_enterprise_structure(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Structure::Representation command.response_class = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Structure 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_enterprise_structure_room(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Room
Gets a room managed by the enterprise.
247 248 249 250 251 252 253 254 255 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 247 def get_enterprise_structure_room(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Room::Representation command.response_class = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1Room 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_enterprise_devices(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListDevicesResponse
Lists devices managed by the enterprise.
142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 142 def list_enterprise_devices(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/devices', ) command.response_representation = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListDevicesResponse::Representation command.response_class = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListDevicesResponse 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 |
#list_enterprise_structure_rooms(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListRoomsResponse
Lists rooms managed by the enterprise.
283 284 285 286 287 288 289 290 291 292 293 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 283 def list_enterprise_structure_rooms(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/rooms', ) command.response_representation = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListRoomsResponse::Representation command.response_class = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListRoomsResponse command.params['parent'] = parent unless parent.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 |
#list_enterprise_structures(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListStructuresResponse
Lists structures managed by the enterprise.
213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'generated/google/apis/smartdevicemanagement_v1/service.rb', line 213 def list_enterprise_structures(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/structures', ) command.response_representation = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListStructuresResponse::Representation command.response_class = Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListStructuresResponse 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 |