Class: Google::Apis::CloudiotV1::CloudIotService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudiotV1::CloudIotService
- Defined in:
- generated/google/apis/cloudiot_v1/service.rb
Overview
Cloud IoT API
Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Google::Apis::Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#bind_group_device_to_gateway(parent, bind_device_to_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::BindDeviceToGatewayResponse
Associates the device with the gateway.
-
#bind_registry_device_to_gateway(parent, bind_device_to_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::BindDeviceToGatewayResponse
Associates the device with the gateway.
-
#create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceRegistry
Creates a device registry that contains devices.
-
#create_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Creates a device in a device registry.
-
#delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Empty
Deletes a device registry configuration.
-
#delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Empty
Deletes a device.
-
#get_group_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Policy
Gets the access control policy for a resource.
-
#get_project_location_registry(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceRegistry
Gets a device registry configuration.
-
#get_project_location_registry_device(name, field_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Gets details about a device.
-
#get_project_location_registry_group_device(name, field_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Gets details about a device.
-
#get_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Policy
Gets the access control policy for a resource.
-
#initialize ⇒ CloudIotService
constructor
A new instance of CloudIotService.
-
#list_project_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceRegistriesResponse
Lists device registries.
-
#list_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
-
#list_project_location_registry_device_states(name, num_states: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceStatesResponse
Lists the last few versions of the device state in descending order (i.e.: newest first).
-
#list_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, gateway_list_options_associations_device_id: nil, gateway_list_options_associations_gateway_id: nil, gateway_list_options_gateway_type: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDevicesResponse
List devices in a device registry.
-
#list_project_location_registry_group_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
-
#list_project_location_registry_group_device_states(name, num_states: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceStatesResponse
Lists the last few versions of the device state in descending order (i.e.: newest first).
-
#list_project_location_registry_group_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, gateway_list_options_associations_device_id: nil, gateway_list_options_associations_gateway_id: nil, gateway_list_options_gateway_type: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDevicesResponse
List devices in a device registry.
-
#modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceConfig
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers.
-
#modify_project_location_registry_group_device_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceConfig
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers.
-
#patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceRegistry
Updates a device registry configuration.
-
#patch_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Updates a device.
-
#patch_project_location_registry_group_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Updates a device.
-
#send_project_location_registry_device_command_to_device(name, send_command_to_device_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::SendCommandToDeviceResponse
Sends a command to the specified device.
-
#send_project_location_registry_group_device_command_to_device(name, send_command_to_device_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::SendCommandToDeviceResponse
Sends a command to the specified device.
-
#set_group_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Policy
Sets the access control policy on the specified resource.
-
#set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Policy
Sets the access control policy on the specified resource.
-
#test_group_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource.
-
#test_registry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource.
-
#unbind_group_device_from_gateway(parent, unbind_device_from_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::UnbindDeviceFromGatewayResponse
Deletes the association between the device and the gateway.
-
#unbind_registry_device_from_gateway(parent, unbind_device_from_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::UnbindDeviceFromGatewayResponse
Deletes the association between the device and the gateway.
Methods inherited from Google::Apis::Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Google::Apis::Core::Logging
Constructor Details
#initialize ⇒ CloudIotService
Returns a new instance of CloudIotService
46 47 48 49 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 46 def initialize super('https://cloudiot.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/cloudiot_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/cloudiot_v1/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#bind_group_device_to_gateway(parent, bind_device_to_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::BindDeviceToGatewayResponse
Associates the device with the gateway.
805 806 807 808 809 810 811 812 813 814 815 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 805 def bind_group_device_to_gateway(parent, bind_device_to_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}:bindDeviceToGateway', ) command.request_representation = Google::Apis::CloudiotV1::BindDeviceToGatewayRequest::Representation command.request_object = bind_device_to_gateway_request_object command.response_representation = Google::Apis::CloudiotV1::BindDeviceToGatewayResponse::Representation command.response_class = Google::Apis::CloudiotV1::BindDeviceToGatewayResponse 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 |
#bind_registry_device_to_gateway(parent, bind_device_to_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::BindDeviceToGatewayResponse
Associates the device with the gateway.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 73 def bind_registry_device_to_gateway(parent, bind_device_to_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}:bindDeviceToGateway', ) command.request_representation = Google::Apis::CloudiotV1::BindDeviceToGatewayRequest::Representation command.request_object = bind_device_to_gateway_request_object command.response_representation = Google::Apis::CloudiotV1::BindDeviceToGatewayResponse::Representation command.response_class = Google::Apis::CloudiotV1::BindDeviceToGatewayResponse 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 |
#create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceRegistry
Creates a device registry that contains devices.
107 108 109 110 111 112 113 114 115 116 117 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 107 def create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/registries', ) command.request_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation command.request_object = device_registry_object command.response_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation command.response_class = Google::Apis::CloudiotV1::DeviceRegistry 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 |
#create_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Creates a device in a device registry.
428 429 430 431 432 433 434 435 436 437 438 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 428 def create_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/devices', ) command.request_representation = Google::Apis::CloudiotV1::Device::Representation command.request_object = device_object command.response_representation = Google::Apis::CloudiotV1::Device::Representation command.response_class = Google::Apis::CloudiotV1::Device 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_location_registry(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Empty
Deletes a device registry configuration.
140 141 142 143 144 145 146 147 148 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 140 def delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1::Empty::Representation command.response_class = Google::Apis::CloudiotV1::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 |
#delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Empty
Deletes a device.
462 463 464 465 466 467 468 469 470 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 462 def delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1::Empty::Representation command.response_class = Google::Apis::CloudiotV1::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 |
#get_group_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Policy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
841 842 843 844 845 846 847 848 849 850 851 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 841 def get_group_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::CloudiotV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::CloudiotV1::Policy::Representation command.response_class = Google::Apis::CloudiotV1::Policy command.params['resource'] = resource unless resource.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_location_registry(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceRegistry
Gets a device registry configuration.
171 172 173 174 175 176 177 178 179 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 171 def get_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation command.response_class = Google::Apis::CloudiotV1::DeviceRegistry 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_location_registry_device(name, field_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Gets details about a device.
497 498 499 500 501 502 503 504 505 506 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 497 def get_project_location_registry_device(name, field_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1::Device::Representation command.response_class = Google::Apis::CloudiotV1::Device command.params['name'] = name unless name.nil? command.query['fieldMask'] = field_mask unless field_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 |
#get_project_location_registry_group_device(name, field_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Gets details about a device.
983 984 985 986 987 988 989 990 991 992 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 983 def get_project_location_registry_group_device(name, field_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1::Device::Representation command.response_class = Google::Apis::CloudiotV1::Device command.params['name'] = name unless name.nil? command.query['fieldMask'] = field_mask unless field_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 |
#get_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Policy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
205 206 207 208 209 210 211 212 213 214 215 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 205 def get_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::CloudiotV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::CloudiotV1::Policy::Representation command.response_class = Google::Apis::CloudiotV1::Policy command.params['resource'] = resource unless resource.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_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceRegistriesResponse
Lists device registries.
247 248 249 250 251 252 253 254 255 256 257 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 247 def list_project_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/registries', ) command.response_representation = Google::Apis::CloudiotV1::ListDeviceRegistriesResponse::Representation command.response_class = Google::Apis::CloudiotV1::ListDeviceRegistriesResponse 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_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
734 735 736 737 738 739 740 741 742 743 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 734 def list_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/configVersions', ) command.response_representation = Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse::Representation command.response_class = Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse command.params['name'] = name unless name.nil? command.query['numVersions'] = num_versions unless num_versions.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_location_registry_device_states(name, num_states: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceStatesResponse
Lists the last few versions of the device state in descending order (i.e.: newest first).
772 773 774 775 776 777 778 779 780 781 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 772 def list_project_location_registry_device_states(name, num_states: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/states', ) command.response_representation = Google::Apis::CloudiotV1::ListDeviceStatesResponse::Representation command.response_class = Google::Apis::CloudiotV1::ListDeviceStatesResponse command.params['name'] = name unless name.nil? command.query['numStates'] = num_states unless num_states.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_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, gateway_list_options_associations_device_id: nil, gateway_list_options_associations_gateway_id: nil, gateway_list_options_gateway_type: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDevicesResponse
List devices in a device registry.
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 562 def list_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, gateway_list_options_associations_device_id: nil, gateway_list_options_associations_gateway_id: nil, gateway_list_options_gateway_type: 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::CloudiotV1::ListDevicesResponse::Representation command.response_class = Google::Apis::CloudiotV1::ListDevicesResponse command.params['parent'] = parent unless parent.nil? command.query['deviceIds'] = device_ids unless device_ids.nil? command.query['deviceNumIds'] = device_num_ids unless device_num_ids.nil? command.query['fieldMask'] = field_mask unless field_mask.nil? command.query['gatewayListOptions.associationsDeviceId'] = unless .nil? command.query['gatewayListOptions.associationsGatewayId'] = unless .nil? command.query['gatewayListOptions.gatewayType'] = unless .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_project_location_registry_group_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 1220 def list_project_location_registry_group_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/configVersions', ) command.response_representation = Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse::Representation command.response_class = Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse command.params['name'] = name unless name.nil? command.query['numVersions'] = num_versions unless num_versions.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_location_registry_group_device_states(name, num_states: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceStatesResponse
Lists the last few versions of the device state in descending order (i.e.: newest first).
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 1258 def list_project_location_registry_group_device_states(name, num_states: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/states', ) command.response_representation = Google::Apis::CloudiotV1::ListDeviceStatesResponse::Representation command.response_class = Google::Apis::CloudiotV1::ListDeviceStatesResponse command.params['name'] = name unless name.nil? command.query['numStates'] = num_states unless num_states.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_location_registry_group_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, gateway_list_options_associations_device_id: nil, gateway_list_options_associations_gateway_id: nil, gateway_list_options_gateway_type: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDevicesResponse
List devices in a device registry.
1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 1048 def list_project_location_registry_group_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, gateway_list_options_associations_device_id: nil, gateway_list_options_associations_gateway_id: nil, gateway_list_options_gateway_type: 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::CloudiotV1::ListDevicesResponse::Representation command.response_class = Google::Apis::CloudiotV1::ListDevicesResponse command.params['parent'] = parent unless parent.nil? command.query['deviceIds'] = device_ids unless device_ids.nil? command.query['deviceNumIds'] = device_num_ids unless device_num_ids.nil? command.query['fieldMask'] = field_mask unless field_mask.nil? command.query['gatewayListOptions.associationsDeviceId'] = unless .nil? command.query['gatewayListOptions.associationsGatewayId'] = unless .nil? command.query['gatewayListOptions.gatewayType'] = unless .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 |
#modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceConfig
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
605 606 607 608 609 610 611 612 613 614 615 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 605 def modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:modifyCloudToDeviceConfig', ) command.request_representation = Google::Apis::CloudiotV1::ModifyCloudToDeviceConfigRequest::Representation command.request_object = modify_cloud_to_device_config_request_object command.response_representation = Google::Apis::CloudiotV1::DeviceConfig::Representation command.response_class = Google::Apis::CloudiotV1::DeviceConfig 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 |
#modify_project_location_registry_group_device_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceConfig
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.
1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 1091 def modify_project_location_registry_group_device_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:modifyCloudToDeviceConfig', ) command.request_representation = Google::Apis::CloudiotV1::ModifyCloudToDeviceConfigRequest::Representation command.request_object = modify_cloud_to_device_config_request_object command.response_representation = Google::Apis::CloudiotV1::DeviceConfig::Representation command.response_class = Google::Apis::CloudiotV1::DeviceConfig 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 |
#patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::DeviceRegistry
Updates a device registry configuration.
287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 287 def patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation command.request_object = device_registry_object command.response_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation command.response_class = Google::Apis::CloudiotV1::DeviceRegistry 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 |
#patch_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Updates a device.
647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 647 def patch_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::CloudiotV1::Device::Representation command.request_object = device_object command.response_representation = Google::Apis::CloudiotV1::Device::Representation command.response_class = Google::Apis::CloudiotV1::Device 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 |
#patch_project_location_registry_group_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Device
Updates a device.
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 1133 def patch_project_location_registry_group_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::CloudiotV1::Device::Representation command.request_object = device_object command.response_representation = Google::Apis::CloudiotV1::Device::Representation command.response_class = Google::Apis::CloudiotV1::Device 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 |
#send_project_location_registry_device_command_to_device(name, send_command_to_device_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::SendCommandToDeviceResponse
Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/device-id
/commands/#. This subscription will receive commands
at the top-level topic /devices/device-id
/commands as well as commands
for subfolders, like /devices/device-id
/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.
695 696 697 698 699 700 701 702 703 704 705 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 695 def send_project_location_registry_device_command_to_device(name, send_command_to_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:sendCommandToDevice', ) command.request_representation = Google::Apis::CloudiotV1::SendCommandToDeviceRequest::Representation command.request_object = send_command_to_device_request_object command.response_representation = Google::Apis::CloudiotV1::SendCommandToDeviceResponse::Representation command.response_class = Google::Apis::CloudiotV1::SendCommandToDeviceResponse 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 |
#send_project_location_registry_group_device_command_to_device(name, send_command_to_device_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::SendCommandToDeviceResponse
Sends a command to the specified device. In order for a device to be able
to receive commands, it must:
1) be connected to Cloud IoT Core using the MQTT protocol, and
2) be subscribed to the group of MQTT topics specified by
/devices/device-id
/commands/#. This subscription will receive commands
at the top-level topic /devices/device-id
/commands as well as commands
for subfolders, like /devices/device-id
/commands/subfolder.
Note that subscribing to specific subfolders is not supported.
If the command could not be delivered to the device, this method will
return an error; in particular, if the device is not subscribed, this
method will return FAILED_PRECONDITION. Otherwise, this method will
return OK. If the subscription is QoS 1, at least once delivery will be
guaranteed; for QoS 0, no acknowledgment will be expected from the device.
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 1181 def send_project_location_registry_group_device_command_to_device(name, send_command_to_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:sendCommandToDevice', ) command.request_representation = Google::Apis::CloudiotV1::SendCommandToDeviceRequest::Representation command.request_object = send_command_to_device_request_object command.response_representation = Google::Apis::CloudiotV1::SendCommandToDeviceResponse::Representation command.response_class = Google::Apis::CloudiotV1::SendCommandToDeviceResponse 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 |
#set_group_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Policy
Sets the access control policy on the specified resource. Replaces any existing policy.
876 877 878 879 880 881 882 883 884 885 886 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 876 def set_group_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::CloudiotV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::CloudiotV1::Policy::Representation command.response_class = Google::Apis::CloudiotV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Policy
Sets the access control policy on the specified resource. Replaces any existing policy.
323 324 325 326 327 328 329 330 331 332 333 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 323 def set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::CloudiotV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::CloudiotV1::Policy::Representation command.response_class = Google::Apis::CloudiotV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_group_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
912 913 914 915 916 917 918 919 920 921 922 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 912 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::CloudiotV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::CloudiotV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::CloudiotV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_registry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
359 360 361 362 363 364 365 366 367 368 369 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 359 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::CloudiotV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::CloudiotV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::CloudiotV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#unbind_group_device_from_gateway(parent, unbind_device_from_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::UnbindDeviceFromGatewayResponse
Deletes the association between the device and the gateway.
946 947 948 949 950 951 952 953 954 955 956 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 946 def unbind_group_device_from_gateway(parent, unbind_device_from_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}:unbindDeviceFromGateway', ) command.request_representation = Google::Apis::CloudiotV1::UnbindDeviceFromGatewayRequest::Representation command.request_object = unbind_device_from_gateway_request_object command.response_representation = Google::Apis::CloudiotV1::UnbindDeviceFromGatewayResponse::Representation command.response_class = Google::Apis::CloudiotV1::UnbindDeviceFromGatewayResponse 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 |
#unbind_registry_device_from_gateway(parent, unbind_device_from_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::UnbindDeviceFromGatewayResponse
Deletes the association between the device and the gateway.
393 394 395 396 397 398 399 400 401 402 403 |
# File 'generated/google/apis/cloudiot_v1/service.rb', line 393 def unbind_registry_device_from_gateway(parent, unbind_device_from_gateway_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}:unbindDeviceFromGateway', ) command.request_representation = Google::Apis::CloudiotV1::UnbindDeviceFromGatewayRequest::Representation command.request_object = unbind_device_from_gateway_request_object command.response_representation = Google::Apis::CloudiotV1::UnbindDeviceFromGatewayResponse::Representation command.response_class = Google::Apis::CloudiotV1::UnbindDeviceFromGatewayResponse 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 |