Initial commit: Complete WooCommerce Smart Google Pricing plugin with vendor dependencies

This commit is contained in:
2025-12-23 07:48:45 +01:00
commit 9b66109ca1
32472 changed files with 4065017 additions and 0 deletions

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.
*/
namespace Google\Service\HomeGraphService;
class AgentDeviceId extends \Google\Model
{
/**
* Third-party device ID.
*
* @var string
*/
public $id;
/**
* Third-party device ID.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentDeviceId::class, 'Google_Service_HomeGraphService_AgentDeviceId');

View File

@@ -0,0 +1,70 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class AgentOtherDeviceId extends \Google\Model
{
/**
* Project ID for your smart home Action.
*
* @var string
*/
public $agentId;
/**
* Unique third-party device ID.
*
* @var string
*/
public $deviceId;
/**
* Project ID for your smart home Action.
*
* @param string $agentId
*/
public function setAgentId($agentId)
{
$this->agentId = $agentId;
}
/**
* @return string
*/
public function getAgentId()
{
return $this->agentId;
}
/**
* Unique third-party device ID.
*
* @param string $deviceId
*/
public function setDeviceId($deviceId)
{
$this->deviceId = $deviceId;
}
/**
* @return string
*/
public function getDeviceId()
{
return $this->deviceId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentOtherDeviceId::class, 'Google_Service_HomeGraphService_AgentOtherDeviceId');

View File

@@ -0,0 +1,309 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class Device extends \Google\Collection
{
protected $collection_key = 'traits';
/**
* Attributes for the traits supported by the device.
*
* @var array[]
*/
public $attributes;
/**
* Custom device attributes stored in Home Graph and provided to your smart
* home Action in each [QUERY](https://developers.home.google.com/cloud-to-
* cloud/intents/query) and
* [EXECUTE](https://developers.home.google.com/cloud-to-
* cloud/intents/execute) intent. Data in this object has a few constraints:
* No sensitive information, including but not limited to Personally
* Identifiable Information.
*
* @var array[]
*/
public $customData;
protected $deviceInfoType = DeviceInfo::class;
protected $deviceInfoDataType = '';
/**
* Third-party device ID.
*
* @var string
*/
public $id;
protected $nameType = DeviceNames::class;
protected $nameDataType = '';
/**
* Indicates whether your smart home Action will report notifications to
* Google for this device via ReportStateAndNotification. If your smart home
* Action enables users to control device notifications, you should update
* this field and call RequestSyncDevices.
*
* @var bool
*/
public $notificationSupportedByAgent;
protected $otherDeviceIdsType = AgentOtherDeviceId::class;
protected $otherDeviceIdsDataType = 'array';
/**
* Suggested name for the room where this device is installed. Google attempts
* to use this value during user setup.
*
* @var string
*/
public $roomHint;
/**
* Suggested name for the structure where this device is installed. Google
* attempts to use this value during user setup.
*
* @var string
*/
public $structureHint;
/**
* Traits supported by the device. See [device
* traits](https://developers.home.google.com/cloud-to-cloud/traits).
*
* @var string[]
*/
public $traits;
/**
* Hardware type of the device. See [device
* types](https://developers.home.google.com/cloud-to-cloud/guides).
*
* @var string
*/
public $type;
/**
* Indicates whether your smart home Action will report state of this device
* to Google via ReportStateAndNotification.
*
* @var bool
*/
public $willReportState;
/**
* Attributes for the traits supported by the device.
*
* @param array[] $attributes
*/
public function setAttributes($attributes)
{
$this->attributes = $attributes;
}
/**
* @return array[]
*/
public function getAttributes()
{
return $this->attributes;
}
/**
* Custom device attributes stored in Home Graph and provided to your smart
* home Action in each [QUERY](https://developers.home.google.com/cloud-to-
* cloud/intents/query) and
* [EXECUTE](https://developers.home.google.com/cloud-to-
* cloud/intents/execute) intent. Data in this object has a few constraints:
* No sensitive information, including but not limited to Personally
* Identifiable Information.
*
* @param array[] $customData
*/
public function setCustomData($customData)
{
$this->customData = $customData;
}
/**
* @return array[]
*/
public function getCustomData()
{
return $this->customData;
}
/**
* Device manufacturer, model, hardware version, and software version.
*
* @param DeviceInfo $deviceInfo
*/
public function setDeviceInfo(DeviceInfo $deviceInfo)
{
$this->deviceInfo = $deviceInfo;
}
/**
* @return DeviceInfo
*/
public function getDeviceInfo()
{
return $this->deviceInfo;
}
/**
* Third-party device ID.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* Names given to this device by your smart home Action.
*
* @param DeviceNames $name
*/
public function setName(DeviceNames $name)
{
$this->name = $name;
}
/**
* @return DeviceNames
*/
public function getName()
{
return $this->name;
}
/**
* Indicates whether your smart home Action will report notifications to
* Google for this device via ReportStateAndNotification. If your smart home
* Action enables users to control device notifications, you should update
* this field and call RequestSyncDevices.
*
* @param bool $notificationSupportedByAgent
*/
public function setNotificationSupportedByAgent($notificationSupportedByAgent)
{
$this->notificationSupportedByAgent = $notificationSupportedByAgent;
}
/**
* @return bool
*/
public function getNotificationSupportedByAgent()
{
return $this->notificationSupportedByAgent;
}
/**
* Alternate IDs associated with this device. This is used to identify cloud
* synced devices enabled for [local
* fulfillment](https://developers.home.google.com/local-home/overview).
*
* @param AgentOtherDeviceId[] $otherDeviceIds
*/
public function setOtherDeviceIds($otherDeviceIds)
{
$this->otherDeviceIds = $otherDeviceIds;
}
/**
* @return AgentOtherDeviceId[]
*/
public function getOtherDeviceIds()
{
return $this->otherDeviceIds;
}
/**
* Suggested name for the room where this device is installed. Google attempts
* to use this value during user setup.
*
* @param string $roomHint
*/
public function setRoomHint($roomHint)
{
$this->roomHint = $roomHint;
}
/**
* @return string
*/
public function getRoomHint()
{
return $this->roomHint;
}
/**
* Suggested name for the structure where this device is installed. Google
* attempts to use this value during user setup.
*
* @param string $structureHint
*/
public function setStructureHint($structureHint)
{
$this->structureHint = $structureHint;
}
/**
* @return string
*/
public function getStructureHint()
{
return $this->structureHint;
}
/**
* Traits supported by the device. See [device
* traits](https://developers.home.google.com/cloud-to-cloud/traits).
*
* @param string[] $traits
*/
public function setTraits($traits)
{
$this->traits = $traits;
}
/**
* @return string[]
*/
public function getTraits()
{
return $this->traits;
}
/**
* Hardware type of the device. See [device
* types](https://developers.home.google.com/cloud-to-cloud/guides).
*
* @param string $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Indicates whether your smart home Action will report state of this device
* to Google via ReportStateAndNotification.
*
* @param bool $willReportState
*/
public function setWillReportState($willReportState)
{
$this->willReportState = $willReportState;
}
/**
* @return bool
*/
public function getWillReportState()
{
return $this->willReportState;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Device::class, 'Google_Service_HomeGraphService_Device');

View File

@@ -0,0 +1,114 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class DeviceInfo extends \Google\Model
{
/**
* Device hardware version.
*
* @var string
*/
public $hwVersion;
/**
* Device manufacturer.
*
* @var string
*/
public $manufacturer;
/**
* Device model.
*
* @var string
*/
public $model;
/**
* Device software version.
*
* @var string
*/
public $swVersion;
/**
* Device hardware version.
*
* @param string $hwVersion
*/
public function setHwVersion($hwVersion)
{
$this->hwVersion = $hwVersion;
}
/**
* @return string
*/
public function getHwVersion()
{
return $this->hwVersion;
}
/**
* Device manufacturer.
*
* @param string $manufacturer
*/
public function setManufacturer($manufacturer)
{
$this->manufacturer = $manufacturer;
}
/**
* @return string
*/
public function getManufacturer()
{
return $this->manufacturer;
}
/**
* Device model.
*
* @param string $model
*/
public function setModel($model)
{
$this->model = $model;
}
/**
* @return string
*/
public function getModel()
{
return $this->model;
}
/**
* Device software version.
*
* @param string $swVersion
*/
public function setSwVersion($swVersion)
{
$this->swVersion = $swVersion;
}
/**
* @return string
*/
public function getSwVersion()
{
return $this->swVersion;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DeviceInfo::class, 'Google_Service_HomeGraphService_DeviceInfo');

View File

@@ -0,0 +1,99 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class DeviceNames extends \Google\Collection
{
protected $collection_key = 'nicknames';
/**
* List of names provided by the manufacturer rather than the user, such as
* serial numbers, SKUs, etc.
*
* @var string[]
*/
public $defaultNames;
/**
* Primary name of the device, generally provided by the user. Names will be
* truncated if over the 60 Unicode code point (character) limit and no errors
* will be thrown. Developers are responsible for handling long names.
*
* @var string
*/
public $name;
/**
* Additional names provided by the user for the device.
*
* @var string[]
*/
public $nicknames;
/**
* List of names provided by the manufacturer rather than the user, such as
* serial numbers, SKUs, etc.
*
* @param string[] $defaultNames
*/
public function setDefaultNames($defaultNames)
{
$this->defaultNames = $defaultNames;
}
/**
* @return string[]
*/
public function getDefaultNames()
{
return $this->defaultNames;
}
/**
* Primary name of the device, generally provided by the user. Names will be
* truncated if over the 60 Unicode code point (character) limit and no errors
* will be thrown. Developers are responsible for handling long names.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Additional names provided by the user for the device.
*
* @param string[] $nicknames
*/
public function setNicknames($nicknames)
{
$this->nicknames = $nicknames;
}
/**
* @return string[]
*/
public function getNicknames()
{
return $this->nicknames;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DeviceNames::class, 'Google_Service_HomeGraphService_DeviceNames');

View File

@@ -0,0 +1,25 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class HomegraphEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HomegraphEmpty::class, 'Google_Service_HomeGraphService_HomegraphEmpty');

View File

@@ -0,0 +1,90 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class QueryRequest extends \Google\Collection
{
protected $collection_key = 'inputs';
/**
* Required. Third-party user ID.
*
* @var string
*/
public $agentUserId;
protected $inputsType = QueryRequestInput::class;
protected $inputsDataType = 'array';
/**
* Request ID used for debugging.
*
* @var string
*/
public $requestId;
/**
* Required. Third-party user ID.
*
* @param string $agentUserId
*/
public function setAgentUserId($agentUserId)
{
$this->agentUserId = $agentUserId;
}
/**
* @return string
*/
public function getAgentUserId()
{
return $this->agentUserId;
}
/**
* Required. Inputs containing third-party device IDs for which to get the
* device states.
*
* @param QueryRequestInput[] $inputs
*/
public function setInputs($inputs)
{
$this->inputs = $inputs;
}
/**
* @return QueryRequestInput[]
*/
public function getInputs()
{
return $this->inputs;
}
/**
* Request ID used for debugging.
*
* @param string $requestId
*/
public function setRequestId($requestId)
{
$this->requestId = $requestId;
}
/**
* @return string
*/
public function getRequestId()
{
return $this->requestId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QueryRequest::class, 'Google_Service_HomeGraphService_QueryRequest');

View File

@@ -0,0 +1,44 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class QueryRequestInput extends \Google\Model
{
protected $payloadType = QueryRequestPayload::class;
protected $payloadDataType = '';
/**
* Payload containing third-party device IDs.
*
* @param QueryRequestPayload $payload
*/
public function setPayload(QueryRequestPayload $payload)
{
$this->payload = $payload;
}
/**
* @return QueryRequestPayload
*/
public function getPayload()
{
return $this->payload;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QueryRequestInput::class, 'Google_Service_HomeGraphService_QueryRequestInput');

View File

@@ -0,0 +1,45 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class QueryRequestPayload extends \Google\Collection
{
protected $collection_key = 'devices';
protected $devicesType = AgentDeviceId::class;
protected $devicesDataType = 'array';
/**
* Third-party device IDs for which to get the device states.
*
* @param AgentDeviceId[] $devices
*/
public function setDevices($devices)
{
$this->devices = $devices;
}
/**
* @return AgentDeviceId[]
*/
public function getDevices()
{
return $this->devices;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QueryRequestPayload::class, 'Google_Service_HomeGraphService_QueryRequestPayload');

View File

@@ -0,0 +1,66 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class QueryResponse extends \Google\Model
{
protected $payloadType = QueryResponsePayload::class;
protected $payloadDataType = '';
/**
* Request ID used for debugging. Copied from the request.
*
* @var string
*/
public $requestId;
/**
* Device states for the devices given in the request.
*
* @param QueryResponsePayload $payload
*/
public function setPayload(QueryResponsePayload $payload)
{
$this->payload = $payload;
}
/**
* @return QueryResponsePayload
*/
public function getPayload()
{
return $this->payload;
}
/**
* Request ID used for debugging. Copied from the request.
*
* @param string $requestId
*/
public function setRequestId($requestId)
{
$this->requestId = $requestId;
}
/**
* @return string
*/
public function getRequestId()
{
return $this->requestId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QueryResponse::class, 'Google_Service_HomeGraphService_QueryResponse');

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.
*/
namespace Google\Service\HomeGraphService;
class QueryResponsePayload extends \Google\Model
{
/**
* States of the devices. Map of third-party device ID to struct of device
* states.
*
* @var array[]
*/
public $devices;
/**
* States of the devices. Map of third-party device ID to struct of device
* states.
*
* @param array[] $devices
*/
public function setDevices($devices)
{
$this->devices = $devices;
}
/**
* @return array[]
*/
public function getDevices()
{
return $this->devices;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QueryResponsePayload::class, 'Google_Service_HomeGraphService_QueryResponsePayload');

View File

@@ -0,0 +1,78 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class ReportStateAndNotificationDevice extends \Google\Model
{
/**
* Notifications metadata for devices. See the **Device NOTIFICATIONS**
* section of the individual trait [reference
* guides](https://developers.home.google.com/cloud-to-cloud/traits).
*
* @var array[]
*/
public $notifications;
/**
* States of devices to update. See the **Device STATES** section of the
* individual trait [reference
* guides](https://developers.home.google.com/cloud-to-cloud/traits).
*
* @var array[]
*/
public $states;
/**
* Notifications metadata for devices. See the **Device NOTIFICATIONS**
* section of the individual trait [reference
* guides](https://developers.home.google.com/cloud-to-cloud/traits).
*
* @param array[] $notifications
*/
public function setNotifications($notifications)
{
$this->notifications = $notifications;
}
/**
* @return array[]
*/
public function getNotifications()
{
return $this->notifications;
}
/**
* States of devices to update. See the **Device STATES** section of the
* individual trait [reference
* guides](https://developers.home.google.com/cloud-to-cloud/traits).
*
* @param array[] $states
*/
public function setStates($states)
{
$this->states = $states;
}
/**
* @return array[]
*/
public function getStates()
{
return $this->states;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReportStateAndNotificationDevice::class, 'Google_Service_HomeGraphService_ReportStateAndNotificationDevice');

View File

@@ -0,0 +1,135 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class ReportStateAndNotificationRequest extends \Google\Model
{
/**
* Required. Third-party user ID.
*
* @var string
*/
public $agentUserId;
/**
* Unique identifier per event (for example, a doorbell press).
*
* @var string
*/
public $eventId;
/**
* Deprecated.
*
* @deprecated
* @var string
*/
public $followUpToken;
protected $payloadType = StateAndNotificationPayload::class;
protected $payloadDataType = '';
/**
* Request ID used for debugging.
*
* @var string
*/
public $requestId;
/**
* Required. Third-party user ID.
*
* @param string $agentUserId
*/
public function setAgentUserId($agentUserId)
{
$this->agentUserId = $agentUserId;
}
/**
* @return string
*/
public function getAgentUserId()
{
return $this->agentUserId;
}
/**
* Unique identifier per event (for example, a doorbell press).
*
* @param string $eventId
*/
public function setEventId($eventId)
{
$this->eventId = $eventId;
}
/**
* @return string
*/
public function getEventId()
{
return $this->eventId;
}
/**
* Deprecated.
*
* @deprecated
* @param string $followUpToken
*/
public function setFollowUpToken($followUpToken)
{
$this->followUpToken = $followUpToken;
}
/**
* @deprecated
* @return string
*/
public function getFollowUpToken()
{
return $this->followUpToken;
}
/**
* Required. State of devices to update and notification metadata for devices.
*
* @param StateAndNotificationPayload $payload
*/
public function setPayload(StateAndNotificationPayload $payload)
{
$this->payload = $payload;
}
/**
* @return StateAndNotificationPayload
*/
public function getPayload()
{
return $this->payload;
}
/**
* Request ID used for debugging.
*
* @param string $requestId
*/
public function setRequestId($requestId)
{
$this->requestId = $requestId;
}
/**
* @return string
*/
public function getRequestId()
{
return $this->requestId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReportStateAndNotificationRequest::class, 'Google_Service_HomeGraphService_ReportStateAndNotificationRequest');

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.
*/
namespace Google\Service\HomeGraphService;
class ReportStateAndNotificationResponse extends \Google\Model
{
/**
* Request ID copied from ReportStateAndNotificationRequest.
*
* @var string
*/
public $requestId;
/**
* Request ID copied from ReportStateAndNotificationRequest.
*
* @param string $requestId
*/
public function setRequestId($requestId)
{
$this->requestId = $requestId;
}
/**
* @return string
*/
public function getRequestId()
{
return $this->requestId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReportStateAndNotificationResponse::class, 'Google_Service_HomeGraphService_ReportStateAndNotificationResponse');

View File

@@ -0,0 +1,74 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class RequestSyncDevicesRequest extends \Google\Model
{
/**
* Required. Third-party user ID.
*
* @var string
*/
public $agentUserId;
/**
* Optional. If set, the request will be added to a queue and a response will
* be returned immediately. This enables concurrent requests for the given
* `agent_user_id`, but the caller will not receive any error responses.
*
* @var bool
*/
public $async;
/**
* Required. Third-party user ID.
*
* @param string $agentUserId
*/
public function setAgentUserId($agentUserId)
{
$this->agentUserId = $agentUserId;
}
/**
* @return string
*/
public function getAgentUserId()
{
return $this->agentUserId;
}
/**
* Optional. If set, the request will be added to a queue and a response will
* be returned immediately. This enables concurrent requests for the given
* `agent_user_id`, but the caller will not receive any error responses.
*
* @param bool $async
*/
public function setAsync($async)
{
$this->async = $async;
}
/**
* @return bool
*/
public function getAsync()
{
return $this->async;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RequestSyncDevicesRequest::class, 'Google_Service_HomeGraphService_RequestSyncDevicesRequest');

View File

@@ -0,0 +1,25 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class RequestSyncDevicesResponse extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RequestSyncDevicesResponse::class, 'Google_Service_HomeGraphService_RequestSyncDevicesResponse');

View File

@@ -0,0 +1,58 @@
<?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.
*/
namespace Google\Service\HomeGraphService\Resource;
use Google\Service\HomeGraphService\HomegraphEmpty;
/**
* The "agentUsers" collection of methods.
* Typical usage is:
* <code>
* $homegraphService = new Google\Service\HomeGraphService(...);
* $agentUsers = $homegraphService->agentUsers;
* </code>
*/
class AgentUsers extends \Google\Service\Resource
{
/**
* Unlinks the given third-party user from your smart home Action. All data
* related to this user will be deleted. For more details on how users link
* their accounts, see [fulfillment and
* authentication](https://developers.home.google.com/cloud-to-
* cloud/primer/fulfillment). The third-party user's identity is passed in via
* the `agent_user_id` (see DeleteAgentUserRequest). This request must be
* authorized using service account credentials from your Actions console
* project. (agentUsers.delete)
*
* @param string $agentUserId Required. Third-party user ID.
* @param array $optParams Optional parameters.
*
* @opt_param string requestId Request ID used for debugging.
* @return HomegraphEmpty
* @throws \Google\Service\Exception
*/
public function delete($agentUserId, $optParams = [])
{
$params = ['agentUserId' => $agentUserId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], HomegraphEmpty::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AgentUsers::class, 'Google_Service_HomeGraphService_Resource_AgentUsers');

View File

@@ -0,0 +1,121 @@
<?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.
*/
namespace Google\Service\HomeGraphService\Resource;
use Google\Service\HomeGraphService\QueryRequest;
use Google\Service\HomeGraphService\QueryResponse;
use Google\Service\HomeGraphService\ReportStateAndNotificationRequest;
use Google\Service\HomeGraphService\ReportStateAndNotificationResponse;
use Google\Service\HomeGraphService\RequestSyncDevicesRequest;
use Google\Service\HomeGraphService\RequestSyncDevicesResponse;
use Google\Service\HomeGraphService\SyncRequest;
use Google\Service\HomeGraphService\SyncResponse;
/**
* The "devices" collection of methods.
* Typical usage is:
* <code>
* $homegraphService = new Google\Service\HomeGraphService(...);
* $devices = $homegraphService->devices;
* </code>
*/
class Devices extends \Google\Service\Resource
{
/**
* Gets the current states in Home Graph for the given set of the third-party
* user's devices. The third-party user's identity is passed in via the
* `agent_user_id` (see QueryRequest). This request must be authorized using
* service account credentials from your Actions console project.
* (devices.query)
*
* @param QueryRequest $postBody
* @param array $optParams Optional parameters.
* @return QueryResponse
* @throws \Google\Service\Exception
*/
public function query(QueryRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('query', [$params], QueryResponse::class);
}
/**
* Reports device state and optionally sends device notifications. Called by
* your smart home Action when the state of a third-party device changes or you
* need to send a notification about the device. See [Implement Report
* State](https://developers.home.google.com/cloud-to-cloud/integration/report-
* state) for more information. This method updates the device state according
* to its declared [traits](https://developers.home.google.com/cloud-to-
* cloud/primer/device-types-and-traits). Publishing a new state value outside
* of these traits will result in an `INVALID_ARGUMENT` error response. The
* third-party user's identity is passed in via the `agent_user_id` (see
* ReportStateAndNotificationRequest). This request must be authorized using
* service account credentials from your Actions console project.
* (devices.reportStateAndNotification)
*
* @param ReportStateAndNotificationRequest $postBody
* @param array $optParams Optional parameters.
* @return ReportStateAndNotificationResponse
* @throws \Google\Service\Exception
*/
public function reportStateAndNotification(ReportStateAndNotificationRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('reportStateAndNotification', [$params], ReportStateAndNotificationResponse::class);
}
/**
* Requests Google to send an `action.devices.SYNC`
* [intent](https://developers.home.google.com/cloud-to-cloud/intents/sync) to
* your smart home Action to update device metadata for the given user. The
* third-party user's identity is passed via the `agent_user_id` (see
* RequestSyncDevicesRequest). This request must be authorized using service
* account credentials from your Actions console project. (devices.requestSync)
*
* @param RequestSyncDevicesRequest $postBody
* @param array $optParams Optional parameters.
* @return RequestSyncDevicesResponse
* @throws \Google\Service\Exception
*/
public function requestSync(RequestSyncDevicesRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('requestSync', [$params], RequestSyncDevicesResponse::class);
}
/**
* Gets all the devices associated with the given third-party user. The third-
* party user's identity is passed in via the `agent_user_id` (see SyncRequest).
* This request must be authorized using service account credentials from your
* Actions console project. (devices.sync)
*
* @param SyncRequest $postBody
* @param array $optParams Optional parameters.
* @return SyncResponse
* @throws \Google\Service\Exception
*/
public function sync(SyncRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('sync', [$params], SyncResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Devices::class, 'Google_Service_HomeGraphService_Resource_Devices');

View File

@@ -0,0 +1,44 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class StateAndNotificationPayload extends \Google\Model
{
protected $devicesType = ReportStateAndNotificationDevice::class;
protected $devicesDataType = '';
/**
* The devices for updating state and sending notifications.
*
* @param ReportStateAndNotificationDevice $devices
*/
public function setDevices(ReportStateAndNotificationDevice $devices)
{
$this->devices = $devices;
}
/**
* @return ReportStateAndNotificationDevice
*/
public function getDevices()
{
return $this->devices;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(StateAndNotificationPayload::class, 'Google_Service_HomeGraphService_StateAndNotificationPayload');

View File

@@ -0,0 +1,70 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class SyncRequest extends \Google\Model
{
/**
* Required. Third-party user ID.
*
* @var string
*/
public $agentUserId;
/**
* Request ID used for debugging.
*
* @var string
*/
public $requestId;
/**
* Required. Third-party user ID.
*
* @param string $agentUserId
*/
public function setAgentUserId($agentUserId)
{
$this->agentUserId = $agentUserId;
}
/**
* @return string
*/
public function getAgentUserId()
{
return $this->agentUserId;
}
/**
* Request ID used for debugging.
*
* @param string $requestId
*/
public function setRequestId($requestId)
{
$this->requestId = $requestId;
}
/**
* @return string
*/
public function getRequestId()
{
return $this->requestId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SyncRequest::class, 'Google_Service_HomeGraphService_SyncRequest');

View File

@@ -0,0 +1,66 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class SyncResponse extends \Google\Model
{
protected $payloadType = SyncResponsePayload::class;
protected $payloadDataType = '';
/**
* Request ID used for debugging. Copied from the request.
*
* @var string
*/
public $requestId;
/**
* Devices associated with the third-party user.
*
* @param SyncResponsePayload $payload
*/
public function setPayload(SyncResponsePayload $payload)
{
$this->payload = $payload;
}
/**
* @return SyncResponsePayload
*/
public function getPayload()
{
return $this->payload;
}
/**
* Request ID used for debugging. Copied from the request.
*
* @param string $requestId
*/
public function setRequestId($requestId)
{
$this->requestId = $requestId;
}
/**
* @return string
*/
public function getRequestId()
{
return $this->requestId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SyncResponse::class, 'Google_Service_HomeGraphService_SyncResponse');

View File

@@ -0,0 +1,67 @@
<?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.
*/
namespace Google\Service\HomeGraphService;
class SyncResponsePayload extends \Google\Collection
{
protected $collection_key = 'devices';
/**
* Third-party user ID
*
* @var string
*/
public $agentUserId;
protected $devicesType = Device::class;
protected $devicesDataType = 'array';
/**
* Third-party user ID
*
* @param string $agentUserId
*/
public function setAgentUserId($agentUserId)
{
$this->agentUserId = $agentUserId;
}
/**
* @return string
*/
public function getAgentUserId()
{
return $this->agentUserId;
}
/**
* Devices associated with the third-party user.
*
* @param Device[] $devices
*/
public function setDevices($devices)
{
$this->devices = $devices;
}
/**
* @return Device[]
*/
public function getDevices()
{
return $this->devices;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SyncResponsePayload::class, 'Google_Service_HomeGraphService_SyncResponsePayload');