forked from microsoftgraph/msgraph-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.py
More file actions
107 lines (93 loc) · 4.38 KB
/
Copy pathadmin.py
File metadata and controls
107 lines (93 loc) · 4.38 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
from __future__ import annotations
from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter
from kiota_abstractions.utils import lazy_import
from typing import Any, Callable, Dict, List, Optional, Union
service_announcement = lazy_import('msgraph.generated.models.service_announcement')
class Admin(AdditionalDataHolder, Parsable):
@property
def additional_data(self,) -> Dict[str, Any]:
"""
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
Returns: Dict[str, Any]
"""
return self._additional_data
@additional_data.setter
def additional_data(self,value: Dict[str, Any]) -> None:
"""
Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
Args:
value: Value to set for the AdditionalData property.
"""
self._additional_data = value
def __init__(self,) -> None:
"""
Instantiates a new Admin and sets the default values.
"""
# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
self._additional_data: Dict[str, Any] = {}
# The OdataType property
self._odata_type: Optional[str] = None
# A container for service communications resources. Read-only.
self._service_announcement: Optional[service_announcement.ServiceAnnouncement] = None
@staticmethod
def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> Admin:
"""
Creates a new instance of the appropriate class based on discriminator value
Args:
parseNode: The parse node to use to read the discriminator value and create the object
Returns: Admin
"""
if parse_node is None:
raise Exception("parse_node cannot be undefined")
return Admin()
def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]:
"""
The deserialization information for the current model
Returns: Dict[str, Callable[[ParseNode], None]]
"""
fields = {
"@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()),
"serviceAnnouncement": lambda n : setattr(self, 'service_announcement', n.get_object_value(service_announcement.ServiceAnnouncement)),
}
return fields
@property
def odata_type(self,) -> Optional[str]:
"""
Gets the @odata.type property value. The OdataType property
Returns: Optional[str]
"""
return self._odata_type
@odata_type.setter
def odata_type(self,value: Optional[str] = None) -> None:
"""
Sets the @odata.type property value. The OdataType property
Args:
value: Value to set for the odata_type property.
"""
self._odata_type = value
def serialize(self,writer: SerializationWriter) -> None:
"""
Serializes information the current object
Args:
writer: Serialization writer to use to serialize this model
"""
if writer is None:
raise Exception("writer cannot be undefined")
writer.write_str_value("@odata.type", self.odata_type)
writer.write_object_value("serviceAnnouncement", self.service_announcement)
writer.write_additional_data_value(self.additional_data)
@property
def service_announcement(self,) -> Optional[service_announcement.ServiceAnnouncement]:
"""
Gets the serviceAnnouncement property value. A container for service communications resources. Read-only.
Returns: Optional[service_announcement.ServiceAnnouncement]
"""
return self._service_announcement
@service_announcement.setter
def service_announcement(self,value: Optional[service_announcement.ServiceAnnouncement] = None) -> None:
"""
Sets the serviceAnnouncement property value. A container for service communications resources. Read-only.
Args:
value: Value to set for the service_announcement property.
"""
self._service_announcement = value