-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathTestUserModel.php
More file actions
78 lines (64 loc) · 1.66 KB
/
Copy pathTestUserModel.php
File metadata and controls
78 lines (64 loc) · 1.66 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
<?php
/**
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* Licensed under the MIT License. See License in the project root
* for license information.
*/
namespace Microsoft\Graph\Core\Test\Requests;
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
class TestUserModel implements Parsable
{
private string $id;
private string $name;
public function __construct(string $id = '', string $name = '')
{
$this->id = $id;
$this->name = $name;
}
/**
* @return string
*/
public function getId(): string
{
return $this->id;
}
/**
* @param string $id
*/
public function setId(string $id): void
{
$this->id = $id;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name): void
{
$this->name = $name;
}
public static function createFromDiscriminatorValue(ParseNode $parseNode): self
{
return new TestUserModel();
}
public function getFieldDeserializers(): array
{
return [
'id' => fn (ParseNode $n) => $this->setId($n->getStringValue()),
'name' => fn (ParseNode $n) => $this->setName($n->getStringValue()),
];
}
public function serialize(SerializationWriter $writer): void
{
$writer->writeStringValue('id', $this->getId());
$writer->writeStringValue('name', $this->getName());
}
}