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
151 lines (132 loc) · 6.01 KB
/
Copy pathadmin.py
File metadata and controls
151 lines (132 loc) · 6.01 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
from __future__ import annotations
from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
if TYPE_CHECKING:
from . import edge, service_announcement, sharepoint
class Admin(AdditionalDataHolder, Parsable):
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] = {}
# A container for Microsoft Edge resources. Read-only.
self._edge: Optional[edge.Edge] = None
# 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
# The sharepoint property
self._sharepoint: Optional[sharepoint.Sharepoint] = None
@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
@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()
@property
def edge(self,) -> Optional[edge.Edge]:
"""
Gets the edge property value. A container for Microsoft Edge resources. Read-only.
Returns: Optional[edge.Edge]
"""
return self._edge
@edge.setter
def edge(self,value: Optional[edge.Edge] = None) -> None:
"""
Sets the edge property value. A container for Microsoft Edge resources. Read-only.
Args:
value: Value to set for the edge property.
"""
self._edge = value
def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]:
"""
The deserialization information for the current model
Returns: Dict[str, Callable[[ParseNode], None]]
"""
from . import edge, service_announcement, sharepoint
fields: Dict[str, Callable[[Any], None]] = {
"edge": lambda n : setattr(self, 'edge', n.get_object_value(edge.Edge)),
"@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)),
"sharepoint": lambda n : setattr(self, 'sharepoint', n.get_object_value(sharepoint.Sharepoint)),
}
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_object_value("edge", self.edge)
writer.write_str_value("@odata.type", self.odata_type)
writer.write_object_value("serviceAnnouncement", self.service_announcement)
writer.write_object_value("sharepoint", self.sharepoint)
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
@property
def sharepoint(self,) -> Optional[sharepoint.Sharepoint]:
"""
Gets the sharepoint property value. The sharepoint property
Returns: Optional[sharepoint.Sharepoint]
"""
return self._sharepoint
@sharepoint.setter
def sharepoint(self,value: Optional[sharepoint.Sharepoint] = None) -> None:
"""
Sets the sharepoint property value. The sharepoint property
Args:
value: Value to set for the sharepoint property.
"""
self._sharepoint = value