Mise à jour des librairies

This commit is contained in:
lars
2019-03-10 23:30:23 +01:00
parent 2040b7be39
commit 7df3d72953
3603 changed files with 233169 additions and 107764 deletions

View File

@@ -0,0 +1,39 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_CloudIot_BindDeviceToGatewayRequest extends Google_Model
{
public $deviceId;
public $gatewayId;
public function setDeviceId($deviceId)
{
$this->deviceId = $deviceId;
}
public function getDeviceId()
{
return $this->deviceId;
}
public function setGatewayId($gatewayId)
{
$this->gatewayId = $gatewayId;
}
public function getGatewayId()
{
return $this->gatewayId;
}
}

View File

@@ -0,0 +1,20 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_CloudIot_BindDeviceToGatewayResponse extends Google_Model
{
}

View File

@@ -18,9 +18,25 @@
class Google_Service_CloudIot_Binding extends Google_Collection
{
protected $collection_key = 'members';
protected $conditionType = 'Google_Service_CloudIot_Expr';
protected $conditionDataType = '';
public $members;
public $role;
/**
* @param Google_Service_CloudIot_Expr
*/
public function setCondition(Google_Service_CloudIot_Expr $condition)
{
$this->condition = $condition;
}
/**
* @return Google_Service_CloudIot_Expr
*/
public function getCondition()
{
return $this->condition;
}
public function setMembers($members)
{
$this->members = $members;

View File

@@ -23,6 +23,8 @@ class Google_Service_CloudIot_Device extends Google_Collection
protected $configDataType = '';
protected $credentialsType = 'Google_Service_CloudIot_DeviceCredential';
protected $credentialsDataType = 'array';
protected $gatewayConfigType = 'Google_Service_CloudIot_GatewayConfig';
protected $gatewayConfigDataType = '';
public $id;
public $lastConfigAckTime;
public $lastConfigSendTime;
@@ -32,6 +34,7 @@ class Google_Service_CloudIot_Device extends Google_Collection
public $lastEventTime;
public $lastHeartbeatTime;
public $lastStateTime;
public $logLevel;
public $metadata;
public $name;
public $numId;
@@ -74,6 +77,20 @@ class Google_Service_CloudIot_Device extends Google_Collection
{
return $this->credentials;
}
/**
* @param Google_Service_CloudIot_GatewayConfig
*/
public function setGatewayConfig(Google_Service_CloudIot_GatewayConfig $gatewayConfig)
{
$this->gatewayConfig = $gatewayConfig;
}
/**
* @return Google_Service_CloudIot_GatewayConfig
*/
public function getGatewayConfig()
{
return $this->gatewayConfig;
}
public function setId($id)
{
$this->id = $id;
@@ -144,6 +161,14 @@ class Google_Service_CloudIot_Device extends Google_Collection
{
return $this->lastStateTime;
}
public function setLogLevel($logLevel)
{
$this->logLevel = $logLevel;
}
public function getLogLevel()
{
return $this->logLevel;
}
public function setMetadata($metadata)
{
$this->metadata = $metadata;

View File

@@ -25,6 +25,7 @@ class Google_Service_CloudIot_DeviceRegistry extends Google_Collection
protected $httpConfigType = 'Google_Service_CloudIot_HttpConfig';
protected $httpConfigDataType = '';
public $id;
public $logLevel;
protected $mqttConfigType = 'Google_Service_CloudIot_MqttConfig';
protected $mqttConfigDataType = '';
public $name;
@@ -81,6 +82,14 @@ class Google_Service_CloudIot_DeviceRegistry extends Google_Collection
{
return $this->id;
}
public function setLogLevel($logLevel)
{
$this->logLevel = $logLevel;
}
public function getLogLevel()
{
return $this->logLevel;
}
/**
* @param Google_Service_CloudIot_MqttConfig
*/

View File

@@ -0,0 +1,57 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_CloudIot_Expr extends Google_Model
{
public $description;
public $expression;
public $location;
public $title;
public function setDescription($description)
{
$this->description = $description;
}
public function getDescription()
{
return $this->description;
}
public function setExpression($expression)
{
$this->expression = $expression;
}
public function getExpression()
{
return $this->expression;
}
public function setLocation($location)
{
$this->location = $location;
}
public function getLocation()
{
return $this->location;
}
public function setTitle($title)
{
$this->title = $title;
}
public function getTitle()
{
return $this->title;
}
}

View File

@@ -0,0 +1,57 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_CloudIot_GatewayConfig extends Google_Model
{
public $gatewayAuthMethod;
public $gatewayType;
public $lastAccessedGatewayId;
public $lastAccessedGatewayTime;
public function setGatewayAuthMethod($gatewayAuthMethod)
{
$this->gatewayAuthMethod = $gatewayAuthMethod;
}
public function getGatewayAuthMethod()
{
return $this->gatewayAuthMethod;
}
public function setGatewayType($gatewayType)
{
$this->gatewayType = $gatewayType;
}
public function getGatewayType()
{
return $this->gatewayType;
}
public function setLastAccessedGatewayId($lastAccessedGatewayId)
{
$this->lastAccessedGatewayId = $lastAccessedGatewayId;
}
public function getLastAccessedGatewayId()
{
return $this->lastAccessedGatewayId;
}
public function setLastAccessedGatewayTime($lastAccessedGatewayTime)
{
$this->lastAccessedGatewayTime = $lastAccessedGatewayTime;
}
public function getLastAccessedGatewayTime()
{
return $this->lastAccessedGatewayTime;
}
}

View File

@@ -25,6 +25,21 @@
*/
class Google_Service_CloudIot_Resource_ProjectsLocationsRegistries extends Google_Service_Resource
{
/**
* Associates the device with the gateway. (registries.bindDeviceToGateway)
*
* @param string $parent The name of the registry. For example, `projects
* /example-project/locations/us-central1/registries/my-registry`.
* @param Google_Service_CloudIot_BindDeviceToGatewayRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_BindDeviceToGatewayResponse
*/
public function bindDeviceToGateway($parent, Google_Service_CloudIot_BindDeviceToGatewayRequest $postBody, $optParams = array())
{
$params = array('parent' => $parent, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('bindDeviceToGateway', array($params), "Google_Service_CloudIot_BindDeviceToGatewayResponse");
}
/**
* Creates a device registry that contains devices. (registries.create)
*
@@ -95,12 +110,12 @@ class Google_Service_CloudIot_Resource_ProjectsLocationsRegistries extends Googl
*
* @opt_param string pageToken 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.
* prior `ListDeviceRegistries` call and the system should return the next page
* of data.
* @opt_param int pageSize 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.
* call may return fewer objects than requested. A non-empty `next_page_token`
* in the response indicates that more data is available.
* @return Google_Service_CloudIot_ListDeviceRegistriesResponse
*/
public function listProjectsLocationsRegistries($parent, $optParams = array())
@@ -165,4 +180,20 @@ class Google_Service_CloudIot_Resource_ProjectsLocationsRegistries extends Googl
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', array($params), "Google_Service_CloudIot_TestIamPermissionsResponse");
}
/**
* Deletes the association between the device and the gateway.
* (registries.unbindDeviceFromGateway)
*
* @param string $parent The name of the registry. For example, `projects
* /example-project/locations/us-central1/registries/my-registry`.
* @param Google_Service_CloudIot_UnbindDeviceFromGatewayRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_UnbindDeviceFromGatewayResponse
*/
public function unbindDeviceFromGateway($parent, Google_Service_CloudIot_UnbindDeviceFromGatewayRequest $postBody, $optParams = array())
{
$params = array('parent' => $parent, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('unbindDeviceFromGateway', array($params), "Google_Service_CloudIot_UnbindDeviceFromGatewayResponse");
}
}

View File

@@ -83,21 +83,35 @@ class Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesDevices extend
* `projects/my-project/locations/us-central1/registries/my-registry`.
* @param array $optParams Optional parameters.
*
* @opt_param string fieldMask The fields of the `Device` resource to be
* returned in the response. The fields `id` and `num_id` are always returned,
* along with any other fields specified.
* @opt_param string pageToken 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.
* @opt_param string fieldMask 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.
* `ListDevices` call and the system should return the next page of data.
* @opt_param int pageSize 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.
* @opt_param string deviceIds 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.
* @opt_param string deviceNumIds A list of device numerical ids. If empty, it
* will ignore this field. This field cannot hold more than 10,000 entries.
* call may return fewer objects than requested. A non-empty `next_page_token`
* in the response indicates that more data is available.
* @opt_param string deviceIds A list of device string IDs. For example,
* `['device0', 'device12']`. If empty, this field is ignored. Maximum IDs:
* 10,000
* @opt_param string gatewayListOptions.associationsDeviceId If set, returns
* only the gateways with which the specified device is associated. The device
* ID can be numeric (`num_id`) or the user-defined string (`id`). For example,
* if `456` is specified, returns only the gateways to which the device with
* `num_id` 456 is bound.
* @opt_param string deviceNumIds A list of device numeric IDs. If empty, this
* field is ignored. Maximum IDs: 10,000.
* @opt_param string gatewayListOptions.gatewayType If `GATEWAY` is specified,
* only gateways are returned. If `NON_GATEWAY` is specified, only non-gateway
* devices are returned. If `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices
* are returned.
* @opt_param string gatewayListOptions.associationsGatewayId If set, only
* devices associated with the specified gateway are returned. The gateway ID
* can be numeric (`num_id`) or the user-defined string (`id`). For example, if
* `123` is specified, only devices bound to the gateway with `num_id` 123 are
* returned.
* @return Google_Service_CloudIot_ListDevicesResponse
*/
public function listProjectsLocationsRegistriesDevices($parent, $optParams = array())
@@ -147,4 +161,31 @@ class Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesDevices extend
$params = array_merge($params, $optParams);
return $this->call('patch', array($params), "Google_Service_CloudIot_Device");
}
/**
* 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. (devices.sendCommandToDevice)
*
* @param string $name 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}`.
* @param Google_Service_CloudIot_SendCommandToDeviceRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_SendCommandToDeviceResponse
*/
public function sendCommandToDevice($name, Google_Service_CloudIot_SendCommandToDeviceRequest $postBody, $optParams = array())
{
$params = array('name' => $name, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('sendCommandToDevice', array($params), "Google_Service_CloudIot_SendCommandToDeviceResponse");
}
}

View File

@@ -0,0 +1,111 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* The "groups" collection of methods.
* Typical usage is:
* <code>
* $cloudiotService = new Google_Service_CloudIot(...);
* $groups = $cloudiotService->groups;
* </code>
*/
class Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroups extends Google_Service_Resource
{
/**
* Associates the device with the gateway. (groups.bindDeviceToGateway)
*
* @param string $parent The name of the registry. For example, `projects
* /example-project/locations/us-central1/registries/my-registry`.
* @param Google_Service_CloudIot_BindDeviceToGatewayRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_BindDeviceToGatewayResponse
*/
public function bindDeviceToGateway($parent, Google_Service_CloudIot_BindDeviceToGatewayRequest $postBody, $optParams = array())
{
$params = array('parent' => $parent, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('bindDeviceToGateway', array($params), "Google_Service_CloudIot_BindDeviceToGatewayResponse");
}
/**
* Gets the access control policy for a resource. Returns an empty policy if the
* resource exists and does not have a policy set. (groups.getIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* requested. See the operation documentation for the appropriate value for this
* field.
* @param Google_Service_CloudIot_GetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_Policy
*/
public function getIamPolicy($resource, Google_Service_CloudIot_GetIamPolicyRequest $postBody, $optParams = array())
{
$params = array('resource' => $resource, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('getIamPolicy', array($params), "Google_Service_CloudIot_Policy");
}
/**
* Sets the access control policy on the specified resource. Replaces any
* existing policy. (groups.setIamPolicy)
*
* @param string $resource REQUIRED: The resource for which the policy is being
* specified. See the operation documentation for the appropriate value for this
* field.
* @param Google_Service_CloudIot_SetIamPolicyRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_Policy
*/
public function setIamPolicy($resource, Google_Service_CloudIot_SetIamPolicyRequest $postBody, $optParams = array())
{
$params = array('resource' => $resource, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('setIamPolicy', array($params), "Google_Service_CloudIot_Policy");
}
/**
* 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. (groups.testIamPermissions)
*
* @param string $resource REQUIRED: The resource for which the policy detail is
* being requested. See the operation documentation for the appropriate value
* for this field.
* @param Google_Service_CloudIot_TestIamPermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_TestIamPermissionsResponse
*/
public function testIamPermissions($resource, Google_Service_CloudIot_TestIamPermissionsRequest $postBody, $optParams = array())
{
$params = array('resource' => $resource, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('testIamPermissions', array($params), "Google_Service_CloudIot_TestIamPermissionsResponse");
}
/**
* Deletes the association between the device and the gateway.
* (groups.unbindDeviceFromGateway)
*
* @param string $parent The name of the registry. For example, `projects
* /example-project/locations/us-central1/registries/my-registry`.
* @param Google_Service_CloudIot_UnbindDeviceFromGatewayRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_UnbindDeviceFromGatewayResponse
*/
public function unbindDeviceFromGateway($parent, Google_Service_CloudIot_UnbindDeviceFromGatewayRequest $postBody, $optParams = array())
{
$params = array('parent' => $parent, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('unbindDeviceFromGateway', array($params), "Google_Service_CloudIot_UnbindDeviceFromGatewayResponse");
}
}

View File

@@ -0,0 +1,160 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* The "devices" collection of methods.
* Typical usage is:
* <code>
* $cloudiotService = new Google_Service_CloudIot(...);
* $devices = $cloudiotService->devices;
* </code>
*/
class Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroupsDevices extends Google_Service_Resource
{
/**
* Gets details about a device. (devices.get)
*
* @param string $name 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}`.
* @param array $optParams Optional parameters.
*
* @opt_param string fieldMask The fields of the `Device` resource to be
* returned in the response. If the field mask is unset or empty, all fields are
* returned.
* @return Google_Service_CloudIot_Device
*/
public function get($name, $optParams = array())
{
$params = array('name' => $name);
$params = array_merge($params, $optParams);
return $this->call('get', array($params), "Google_Service_CloudIot_Device");
}
/**
* List devices in a device registry.
* (devices.listProjectsLocationsRegistriesGroupsDevices)
*
* @param string $parent The device registry path. Required. For example,
* `projects/my-project/locations/us-central1/registries/my-registry`.
* @param array $optParams Optional parameters.
*
* @opt_param string deviceIds A list of device string IDs. For example,
* `['device0', 'device12']`. If empty, this field is ignored. Maximum IDs:
* 10,000
* @opt_param string deviceNumIds A list of device numeric IDs. If empty, this
* field is ignored. Maximum IDs: 10,000.
* @opt_param string gatewayListOptions.associationsDeviceId If set, returns
* only the gateways with which the specified device is associated. The device
* ID can be numeric (`num_id`) or the user-defined string (`id`). For example,
* if `456` is specified, returns only the gateways to which the device with
* `num_id` 456 is bound.
* @opt_param string gatewayListOptions.gatewayType If `GATEWAY` is specified,
* only gateways are returned. If `NON_GATEWAY` is specified, only non-gateway
* devices are returned. If `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices
* are returned.
* @opt_param string gatewayListOptions.associationsGatewayId If set, only
* devices associated with the specified gateway are returned. The gateway ID
* can be numeric (`num_id`) or the user-defined string (`id`). For example, if
* `123` is specified, only devices bound to the gateway with `num_id` 123 are
* returned.
* @opt_param string pageToken The value returned by the last
* `ListDevicesResponse`; indicates that this is a continuation of a prior
* `ListDevices` call and the system should return the next page of data.
* @opt_param string fieldMask The fields of the `Device` resource to be
* returned in the response. The fields `id` and `num_id` are always returned,
* along with any other fields specified.
* @opt_param int pageSize 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. A non-empty `next_page_token`
* in the response indicates that more data is available.
* @return Google_Service_CloudIot_ListDevicesResponse
*/
public function listProjectsLocationsRegistriesGroupsDevices($parent, $optParams = array())
{
$params = array('parent' => $parent);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_CloudIot_ListDevicesResponse");
}
/**
* Modifies the configuration for the device, which is eventually sent from the
* Cloud IoT Core servers. Returns the modified configuration version and its
* metadata. (devices.modifyCloudToDeviceConfig)
*
* @param string $name 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}`.
* @param Google_Service_CloudIot_ModifyCloudToDeviceConfigRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_DeviceConfig
*/
public function modifyCloudToDeviceConfig($name, Google_Service_CloudIot_ModifyCloudToDeviceConfigRequest $postBody, $optParams = array())
{
$params = array('name' => $name, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('modifyCloudToDeviceConfig', array($params), "Google_Service_CloudIot_DeviceConfig");
}
/**
* Updates a device. (devices.patch)
*
* @param string $name 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}`.
* When `name` is populated as a response from the service, it always ends in
* the device numeric ID.
* @param Google_Service_CloudIot_Device $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask 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`
* @return Google_Service_CloudIot_Device
*/
public function patch($name, Google_Service_CloudIot_Device $postBody, $optParams = array())
{
$params = array('name' => $name, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('patch', array($params), "Google_Service_CloudIot_Device");
}
/**
* 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. (devices.sendCommandToDevice)
*
* @param string $name 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}`.
* @param Google_Service_CloudIot_SendCommandToDeviceRequest $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_CloudIot_SendCommandToDeviceResponse
*/
public function sendCommandToDevice($name, Google_Service_CloudIot_SendCommandToDeviceRequest $postBody, $optParams = array())
{
$params = array('name' => $name, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
return $this->call('sendCommandToDevice', array($params), "Google_Service_CloudIot_SendCommandToDeviceResponse");
}
}

View File

@@ -0,0 +1,50 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* The "configVersions" collection of methods.
* Typical usage is:
* <code>
* $cloudiotService = new Google_Service_CloudIot(...);
* $configVersions = $cloudiotService->configVersions;
* </code>
*/
class Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroupsDevicesConfigVersions extends Google_Service_Resource
{
/**
* Lists the last few versions of the device configuration in descending order
* (i.e.: newest first).
* (configVersions.listProjectsLocationsRegistriesGroupsDevicesConfigVersions)
*
* @param string $name 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}`.
* @param array $optParams Optional parameters.
*
* @opt_param int numVersions 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.
* @return Google_Service_CloudIot_ListDeviceConfigVersionsResponse
*/
public function listProjectsLocationsRegistriesGroupsDevicesConfigVersions($name, $optParams = array())
{
$params = array('name' => $name);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_CloudIot_ListDeviceConfigVersionsResponse");
}
}

View File

@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* The "states" collection of methods.
* Typical usage is:
* <code>
* $cloudiotService = new Google_Service_CloudIot(...);
* $states = $cloudiotService->states;
* </code>
*/
class Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroupsDevicesStates extends Google_Service_Resource
{
/**
* Lists the last few versions of the device state in descending order (i.e.:
* newest first). (states.listProjectsLocationsRegistriesGroupsDevicesStates)
*
* @param string $name 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}`.
* @param array $optParams Optional parameters.
*
* @opt_param int numStates 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.
* @return Google_Service_CloudIot_ListDeviceStatesResponse
*/
public function listProjectsLocationsRegistriesGroupsDevicesStates($name, $optParams = array())
{
$params = array('name' => $name);
$params = array_merge($params, $optParams);
return $this->call('list', array($params), "Google_Service_CloudIot_ListDeviceStatesResponse");
}
}

View File

@@ -0,0 +1,39 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_CloudIot_SendCommandToDeviceRequest extends Google_Model
{
public $binaryData;
public $subfolder;
public function setBinaryData($binaryData)
{
$this->binaryData = $binaryData;
}
public function getBinaryData()
{
return $this->binaryData;
}
public function setSubfolder($subfolder)
{
$this->subfolder = $subfolder;
}
public function getSubfolder()
{
return $this->subfolder;
}
}

View File

@@ -0,0 +1,20 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_CloudIot_SendCommandToDeviceResponse extends Google_Model
{
}

View File

@@ -0,0 +1,39 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_CloudIot_UnbindDeviceFromGatewayRequest extends Google_Model
{
public $deviceId;
public $gatewayId;
public function setDeviceId($deviceId)
{
$this->deviceId = $deviceId;
}
public function getDeviceId()
{
return $this->deviceId;
}
public function setGatewayId($gatewayId)
{
$this->gatewayId = $gatewayId;
}
public function getGatewayId()
{
return $this->gatewayId;
}
}

View File

@@ -0,0 +1,20 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_CloudIot_UnbindDeviceFromGatewayResponse extends Google_Model
{
}