-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGetUserOwnedObjectsPostRequestBody.php
More file actions
136 lines (120 loc) · 4.94 KB
/
Copy pathGetUserOwnedObjectsPostRequestBody.php
File metadata and controls
136 lines (120 loc) · 4.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
namespace Microsoft\Graph\Beta\Generated\DirectoryObjects\GetUserOwnedObjects;
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
use Microsoft\Kiota\Abstractions\Store\BackedModel;
use Microsoft\Kiota\Abstractions\Store\BackingStore;
use Microsoft\Kiota\Abstractions\Store\BackingStoreFactorySingleton;
class GetUserOwnedObjectsPostRequestBody implements AdditionalDataHolder, BackedModel, Parsable
{
/**
* @var BackingStore $backingStore Stores model information.
*/
private BackingStore $backingStore;
/**
* Instantiates a new GetUserOwnedObjectsPostRequestBody and sets the default values.
*/
public function __construct() {
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();
$this->setAdditionalData([]);
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
* @return GetUserOwnedObjectsPostRequestBody
*/
public static function createFromDiscriminatorValue(ParseNode $parseNode): GetUserOwnedObjectsPostRequestBody {
return new GetUserOwnedObjectsPostRequestBody();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return array<string, mixed>|null
*/
public function getAdditionalData(): ?array {
$val = $this->getBackingStore()->get('additionalData');
if (is_null($val) || is_array($val)) {
/** @var array<string, mixed>|null $val */
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'");
}
/**
* Gets the BackingStore property value. Stores model information.
* @return BackingStore
*/
public function getBackingStore(): BackingStore {
return $this->backingStore;
}
/**
* The deserialization information for the current model
* @return array<string, callable(ParseNode): void>
*/
public function getFieldDeserializers(): array {
$o = $this;
return [
'type' => fn(ParseNode $n) => $o->setType($n->getStringValue()),
'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),
];
}
/**
* Gets the type property value. The type property
* @return string|null
*/
public function getType(): ?string {
$val = $this->getBackingStore()->get('type');
if (is_null($val) || is_string($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'type'");
}
/**
* Gets the userId property value. The userId property
* @return string|null
*/
public function getUserId(): ?string {
$val = $this->getBackingStore()->get('userId');
if (is_null($val) || is_string($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'userId'");
}
/**
* Serializes information the current object
* @param SerializationWriter $writer Serialization writer to use to serialize this model
*/
public function serialize(SerializationWriter $writer): void {
$writer->writeStringValue('type', $this->getType());
$writer->writeStringValue('userId', $this->getUserId());
$writer->writeAdditionalData($this->getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param array<string,mixed> $value Value to set for the AdditionalData property.
*/
public function setAdditionalData(?array $value): void {
$this->getBackingStore()->set('additionalData', $value);
}
/**
* Sets the BackingStore property value. Stores model information.
* @param BackingStore $value Value to set for the BackingStore property.
*/
public function setBackingStore(BackingStore $value): void {
$this->backingStore = $value;
}
/**
* Sets the type property value. The type property
* @param string|null $value Value to set for the type property.
*/
public function setType(?string $value): void {
$this->getBackingStore()->set('type', $value);
}
/**
* Sets the userId property value. The userId property
* @param string|null $value Value to set for the userId property.
*/
public function setUserId(?string $value): void {
$this->getBackingStore()->set('userId', $value);
}
}