Class: Google::Apis::CloudiotV1::CloudIotService

Inherits:
Google::Apis::Core::BaseService show all
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.

Examples:

require 'google/apis/cloudiot_v1'

Cloudiot = Google::Apis::CloudiotV1 # Alias the module
service = Cloudiot::CloudIotService.new

See Also:

Instance Attribute Summary collapse

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

Methods inherited from Google::Apis::Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Google::Apis::Core::Logging

#logger

Constructor Details

#initializeCloudIotService

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

#keyString

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.

Returns:

  • (String)

    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_userString

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.

Returns:

  • (String)

    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

#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.

Parameters:

  • parent (String)

    The project and cloud region where this device registry must be created. For example, projects/example-project/locations/us-central1.

  • device_registry_object (Google::Apis::CloudiotV1::DeviceRegistry) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



134
135
136
137
138
139
140
141
142
143
144
# File 'generated/google/apis/cloudiot_v1/service.rb', line 134

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', options)
  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.

Parameters:

  • parent (String)

    The name of the device registry where this device should be created. For example, projects/example-project/locations/us-central1/registries/my-registry.

  • device_object (Google::Apis::CloudiotV1::Device) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



421
422
423
424
425
426
427
428
429
430
431
# File 'generated/google/apis/cloudiot_v1/service.rb', line 421

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', options)
  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.

Parameters:

  • name (String)

    The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



167
168
169
170
171
172
173
174
175
# File 'generated/google/apis/cloudiot_v1/service.rb', line 167

def delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/{+name}', options)
  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.

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



455
456
457
458
459
460
461
462
463
# File 'generated/google/apis/cloudiot_v1/service.rb', line 455

def delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/{+name}', options)
  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_group_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::Empty

Deletes a device.

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



847
848
849
850
851
852
853
854
855
# File 'generated/google/apis/cloudiot_v1/service.rb', line 847

def delete_project_location_registry_group_device(name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/{+name}', options)
  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.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

  • get_iam_policy_request_object (Google::Apis::CloudiotV1::GetIamPolicyRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



742
743
744
745
746
747
748
749
750
751
752
# File 'generated/google/apis/cloudiot_v1/service.rb', line 742

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', options)
  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.

Parameters:

  • name (String)

    The name of the device registry. For example, projects/example-project/locations/us-central1/registries/my-registry.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



198
199
200
201
202
203
204
205
206
# File 'generated/google/apis/cloudiot_v1/service.rb', line 198

def get_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}', options)
  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.

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • field_mask (String)

    The fields of the Device resource to be returned in the response. If the field mask is unset or empty, all fields are returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



490
491
492
493
494
495
496
497
498
499
# File 'generated/google/apis/cloudiot_v1/service.rb', line 490

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}', options)
  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.

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • field_mask (String)

    The fields of the Device resource to be returned in the response. If the field mask is unset or empty, all fields are returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



882
883
884
885
886
887
888
889
890
891
# File 'generated/google/apis/cloudiot_v1/service.rb', line 882

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}', options)
  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.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

  • get_iam_policy_request_object (Google::Apis::CloudiotV1::GetIamPolicyRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



232
233
234
235
236
237
238
239
240
241
242
# File 'generated/google/apis/cloudiot_v1/service.rb', line 232

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', options)
  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_group_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, 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.

Parameters:

  • parent (String)

    The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

  • device_ids (Array<String>, String)

    A list of device string identifiers. If empty, it will ignore this field. For example, ['device0', 'device12']. This field cannot hold more than 10,000 entries.

  • device_num_ids (Array<Fixnum>, Fixnum)

    A list of device numerical ids. If empty, it will ignore this field. This field cannot hold more than 10,000 entries.

  • field_mask (String)

    The fields of the Device resource to be returned in the response. The fields id, and num_id are always returned by default, along with any other fields specified.

  • gateway_type (String)

    If GATEWAY is specified, only gateways are returned. If NON_GATEWAY specified, only non-gateway devices are returned. If GATEWAY_TYPE_UNSPECIFIED specified, all devices are returned.

  • page_size (Fixnum)

    The maximum number of devices to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested, but if there is a non-empty page_token, it indicates that more entries are available.

  • page_token (String)

    The value returned by the last ListDevicesResponse; indicates that this is a continuation of a prior ListDevices call, and that the system should return the next page of data.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'generated/google/apis/cloudiot_v1/service.rb', line 96

def list_project_location_group_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, 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', options)
  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['gatewayType'] = gateway_type unless gateway_type.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_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1::ListDeviceRegistriesResponse

Lists device registries.

Parameters:

  • parent (String)

    The project and cloud region path. For example, projects/example-project/locations/us-central1.

  • page_size (Fixnum)

    The maximum number of registries to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested, but if there is a non-empty page_token, it indicates that more entries are available.

  • page_token (String)

    The value returned by the last ListDeviceRegistriesResponse; indicates that this is a continuation of a prior ListDeviceRegistries call, and that the system should return the next page of data.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



274
275
276
277
278
279
280
281
282
283
284
# File 'generated/google/apis/cloudiot_v1/service.rb', line 274

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', options)
  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).

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • num_versions (Fixnum)

    The number of versions to list. Versions are listed in decreasing order of the version number. The maximum number of versions retained is 10. If this value is zero, it will return all the versions available.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



669
670
671
672
673
674
675
676
677
678
# File 'generated/google/apis/cloudiot_v1/service.rb', line 669

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', options)
  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).

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • num_states (Fixnum)

    The number of states to list. States are listed in descending order of update time. The maximum number of states retained is 10. If this value is zero, it will return all the states available.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



707
708
709
710
711
712
713
714
715
716
# File 'generated/google/apis/cloudiot_v1/service.rb', line 707

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', options)
  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_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.

Parameters:

  • parent (String)

    The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

  • device_ids (Array<String>, String)

    A list of device string identifiers. If empty, it will ignore this field. For example, ['device0', 'device12']. This field cannot hold more than 10,000 entries.

  • device_num_ids (Array<Fixnum>, Fixnum)

    A list of device numerical ids. If empty, it will ignore this field. This field cannot hold more than 10,000 entries.

  • field_mask (String)

    The fields of the Device resource to be returned in the response. The fields id, and num_id are always returned by default, along with any other fields specified.

  • gateway_type (String)

    If GATEWAY is specified, only gateways are returned. If NON_GATEWAY specified, only non-gateway devices are returned. If GATEWAY_TYPE_UNSPECIFIED specified, all devices are returned.

  • page_size (Fixnum)

    The maximum number of devices to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested, but if there is a non-empty page_token, it indicates that more entries are available.

  • page_token (String)

    The value returned by the last ListDevicesResponse; indicates that this is a continuation of a prior ListDevices call, and that the system should return the next page of data.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'generated/google/apis/cloudiot_v1/service.rb', line 546

def list_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, 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', options)
  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['gatewayType'] = gateway_type unless gateway_type.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).

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • num_versions (Fixnum)

    The number of versions to list. Versions are listed in decreasing order of the version number. The maximum number of versions retained is 10. If this value is zero, it will return all the versions available.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
# File 'generated/google/apis/cloudiot_v1/service.rb', line 1000

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', options)
  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).

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • num_states (Fixnum)

    The number of states to list. States are listed in descending order of update time. The maximum number of states retained is 10. If this value is zero, it will return all the states available.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
# File 'generated/google/apis/cloudiot_v1/service.rb', line 1038

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', options)
  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

#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.

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • modify_cloud_to_device_config_request_object (Google::Apis::CloudiotV1::ModifyCloudToDeviceConfigRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



587
588
589
590
591
592
593
594
595
596
597
# File 'generated/google/apis/cloudiot_v1/service.rb', line 587

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', options)
  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.

Parameters:

  • name (String)

    The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/num_id``.

  • modify_cloud_to_device_config_request_object (Google::Apis::CloudiotV1::ModifyCloudToDeviceConfigRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



918
919
920
921
922
923
924
925
926
927
928
# File 'generated/google/apis/cloudiot_v1/service.rb', line 918

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', options)
  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.

Parameters:

  • name (String)

    The resource path name. For example, projects/example-project/locations/us-central1/registries/my-registry.

  • device_registry_object (Google::Apis::CloudiotV1::DeviceRegistry) (defaults to: nil)
  • update_mask (String)

    Only updates the device_registry fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: event_notification_config, http_config, mqtt_config, and state_notification_config.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



314
315
316
317
318
319
320
321
322
323
324
325
# File 'generated/google/apis/cloudiot_v1/service.rb', line 314

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}', options)
  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.

Parameters:

  • name (String)

    The resource path name. For example, projects/p1/locations/us-central1/registries/registry0/devices/dev0 or projects/p1/locations/us-central1/registries/registry0/devices/num_id`. Whenname` is populated as a response from the service, it always ends in the device numeric ID.

  • device_object (Google::Apis::CloudiotV1::Device) (defaults to: nil)
  • update_mask (String)

    Only updates the device fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: credentials, blocked, and metadata

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



629
630
631
632
633
634
635
636
637
638
639
640
# File 'generated/google/apis/cloudiot_v1/service.rb', line 629

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}', options)
  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.

Parameters:

  • name (String)

    The resource path name. For example, projects/p1/locations/us-central1/registries/registry0/devices/dev0 or projects/p1/locations/us-central1/registries/registry0/devices/num_id`. Whenname` is populated as a response from the service, it always ends in the device numeric ID.

  • device_object (Google::Apis::CloudiotV1::Device) (defaults to: nil)
  • update_mask (String)

    Only updates the device fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: credentials, blocked, and metadata

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



960
961
962
963
964
965
966
967
968
969
970
971
# File 'generated/google/apis/cloudiot_v1/service.rb', line 960

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}', options)
  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

#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.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

  • set_iam_policy_request_object (Google::Apis::CloudiotV1::SetIamPolicyRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



777
778
779
780
781
782
783
784
785
786
787
# File 'generated/google/apis/cloudiot_v1/service.rb', line 777

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', options)
  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.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

  • set_iam_policy_request_object (Google::Apis::CloudiotV1::SetIamPolicyRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



350
351
352
353
354
355
356
357
358
359
360
# File 'generated/google/apis/cloudiot_v1/service.rb', line 350

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', options)
  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.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

  • test_iam_permissions_request_object (Google::Apis::CloudiotV1::TestIamPermissionsRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



813
814
815
816
817
818
819
820
821
822
823
# File 'generated/google/apis/cloudiot_v1/service.rb', line 813

def test_group_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
  command.request_representation = Google::Apis::CloudiotV1::TestIamPermissionsRequest::Representation
  command.request_object = test_iam_permissions_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.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

  • test_iam_permissions_request_object (Google::Apis::CloudiotV1::TestIamPermissionsRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    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.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



386
387
388
389
390
391
392
393
394
395
396
# File 'generated/google/apis/cloudiot_v1/service.rb', line 386

def test_registry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
  command.request_representation = Google::Apis::CloudiotV1::TestIamPermissionsRequest::Representation
  command.request_object = test_iam_permissions_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