1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1\Domain;
7:
8: use UnexpectedValueException;
9: use Worldline\Connect\Sdk\Domain\DataObject;
10:
11: /**
12: * @package Worldline\Connect\Sdk\V1\Domain
13: */
14: class SdkDataInput extends DataObject
15: {
16: /**
17: * @var DeviceRenderOptions
18: */
19: public $deviceRenderOptions = null;
20:
21: /**
22: * @var string
23: */
24: public $sdkAppId = null;
25:
26: /**
27: * @var string
28: */
29: public $sdkEncryptedData = null;
30:
31: /**
32: * @var string
33: */
34: public $sdkEphemeralPublicKey = null;
35:
36: /**
37: * @var string
38: */
39: public $sdkMaxTimeout = null;
40:
41: /**
42: * @var string
43: */
44: public $sdkReferenceNumber = null;
45:
46: /**
47: * @var string
48: */
49: public $sdkTransactionId = null;
50:
51: /**
52: * @return object
53: */
54: public function toObject()
55: {
56: $object = parent::toObject();
57: if (!is_null($this->deviceRenderOptions)) {
58: $object->deviceRenderOptions = $this->deviceRenderOptions->toObject();
59: }
60: if (!is_null($this->sdkAppId)) {
61: $object->sdkAppId = $this->sdkAppId;
62: }
63: if (!is_null($this->sdkEncryptedData)) {
64: $object->sdkEncryptedData = $this->sdkEncryptedData;
65: }
66: if (!is_null($this->sdkEphemeralPublicKey)) {
67: $object->sdkEphemeralPublicKey = $this->sdkEphemeralPublicKey;
68: }
69: if (!is_null($this->sdkMaxTimeout)) {
70: $object->sdkMaxTimeout = $this->sdkMaxTimeout;
71: }
72: if (!is_null($this->sdkReferenceNumber)) {
73: $object->sdkReferenceNumber = $this->sdkReferenceNumber;
74: }
75: if (!is_null($this->sdkTransactionId)) {
76: $object->sdkTransactionId = $this->sdkTransactionId;
77: }
78: return $object;
79: }
80:
81: /**
82: * @param object $object
83: * @return $this
84: * @throws UnexpectedValueException
85: */
86: public function fromObject($object)
87: {
88: parent::fromObject($object);
89: if (property_exists($object, 'deviceRenderOptions')) {
90: if (!is_object($object->deviceRenderOptions)) {
91: throw new UnexpectedValueException('value \'' . print_r($object->deviceRenderOptions, true) . '\' is not an object');
92: }
93: $value = new DeviceRenderOptions();
94: $this->deviceRenderOptions = $value->fromObject($object->deviceRenderOptions);
95: }
96: if (property_exists($object, 'sdkAppId')) {
97: $this->sdkAppId = $object->sdkAppId;
98: }
99: if (property_exists($object, 'sdkEncryptedData')) {
100: $this->sdkEncryptedData = $object->sdkEncryptedData;
101: }
102: if (property_exists($object, 'sdkEphemeralPublicKey')) {
103: $this->sdkEphemeralPublicKey = $object->sdkEphemeralPublicKey;
104: }
105: if (property_exists($object, 'sdkMaxTimeout')) {
106: $this->sdkMaxTimeout = $object->sdkMaxTimeout;
107: }
108: if (property_exists($object, 'sdkReferenceNumber')) {
109: $this->sdkReferenceNumber = $object->sdkReferenceNumber;
110: }
111: if (property_exists($object, 'sdkTransactionId')) {
112: $this->sdkTransactionId = $object->sdkTransactionId;
113: }
114: return $this;
115: }
116: }
117: