Class: Google::Apis::SmartdevicemanagementV1::SmartDeviceManagementService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::SmartdevicemanagementV1::SmartDeviceManagementService
- Defined in:
- lib/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.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://smartdevicemanagement.$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
-
#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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListDevicesResponse
Lists devices managed by the enterprise.
-
#list_enterprise_structure_rooms(parent, 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, 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.
48 49 50 51 52 53 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-smartdevicemanagement_v1', client_version: Google::Apis::SmartdevicemanagementV1::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.
41 42 43 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 41 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.
46 47 48 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 46 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.
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 76 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.
108 109 110 111 112 113 114 115 116 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 108 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.
173 174 175 176 177 178 179 180 181 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 173 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.
237 238 239 240 241 242 243 244 245 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 237 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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListDevicesResponse
Lists devices managed by the enterprise.
141 142 143 144 145 146 147 148 149 150 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 141 def list_enterprise_devices(parent, filter: 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['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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListRoomsResponse
Lists rooms managed by the enterprise.
268 269 270 271 272 273 274 275 276 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 268 def list_enterprise_structure_rooms(parent, 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['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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SmartdevicemanagementV1::GoogleHomeEnterpriseSdmV1ListStructuresResponse
Lists structures managed by the enterprise.
205 206 207 208 209 210 211 212 213 214 |
# File 'lib/google/apis/smartdevicemanagement_v1/service.rb', line 205 def list_enterprise_structures(parent, filter: 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |