Skip to content

Commit 054b8c4

Browse files
committed
chore: commit pending changes
1 parent 9deb899 commit 054b8c4

31 files changed

Lines changed: 404 additions & 87 deletions

generator/.checkpoints/Graph.xml.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

generator/.checkpoints/SharePoint.xml.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

generator/generate_model.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ def generate_graph_model(cp: ConfigParser) -> None:
156156

157157

158158
if __name__ == "__main__":
159-
graph_cfg = ConfigParser()
160-
graph_cfg.read(Path(__file__).parent / "settings.graph.cfg")
161-
generate_graph_model(graph_cfg)
159+
# graph_cfg = ConfigParser()
160+
# graph_cfg.read(Path(__file__).parent / "settings.graph.cfg")
161+
# generate_graph_model(graph_cfg)
162162

163-
# sharepoint_cfg = ConfigParser()
164-
# sharepoint_cfg.read(Path(__file__).parent / "settings.sharepoint.cfg")
165-
# generate_sharepoint_model(sharepoint_cfg)
163+
sharepoint_cfg = ConfigParser()
164+
sharepoint_cfg.read(Path(__file__).parent / "settings.sharepoint.cfg")
165+
generate_sharepoint_model(sharepoint_cfg)

generator/metadata/Graph.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45999,6 +45999,7 @@ within the time frame of their original request."/>
4599945999
<Member Name="microsoftSentinel" Value="512"/>
4600046000
<Member Name="microsoftInsiderRiskManagement" Value="1024"/>
4600146001
<Member Name="microsoftThreatIntelligence" Value="2048"/>
46002+
<Member Name="microsoftSecurityForAI" Value="4096"/>
4600246003
</EnumType>
4600346004
<EnumType Name="teamsDeliveryLocation">
4600446005
<Member Name="unknown" Value="0"/>

generator/settings.sharepoint.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
metadata_path = ./metadata/SharePoint.xml
33
output_path = ../office365/sharepoint
44
template_path = ./templates/sharepoint
5-
include_base_types = EntityType
5+
include_base_types = ComplexType
66

77
[filters]
88
ignored_types =

office365/directory/users/user.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ def delete_object(self, permanent_delete: bool = False) -> Self:
514514
if self._parent_collection is not None:
515515
self._parent_collection.remove_child(self)
516516
if permanent_delete:
517+
assert self.id is not None
517518
deleted_user = self.context.directory.deleted_users[self.id]
518519
deleted_user.delete_object()
519520
return self
@@ -603,6 +604,7 @@ def last_password_change_datetime(self) -> Optional[datetime]:
603604
"""
604605
return self.properties.get("lastPasswordChangeDateTime", datetime.min)
605606

607+
@odata(name="createdObjects")
606608
@property
607609
def created_objects(self) -> DirectoryObjectCollection:
608610
"""Directory objects created by this user."""

office365/onenote/operations/operation.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from datetime import datetime
2+
from typing import Optional
23

34
from office365.entity import Entity
5+
from office365.onedrive.operations.longrunningoperationstatus import LongRunningOperationStatus
46

57

68
class Operation(Entity):
@@ -12,3 +14,22 @@ def created_datetime(self) -> datetime:
1214
The start time of the operation.
1315
"""
1416
return self.properties.get("createdDateTime", datetime.min)
17+
18+
@property
19+
def created_date_time(self) -> Optional[datetime]:
20+
"""Gets the createdDateTime property"""
21+
return self.properties.get("createdDateTime", datetime.min)
22+
23+
@property
24+
def last_action_date_time(self) -> Optional[datetime]:
25+
"""Gets the lastActionDateTime property"""
26+
return self.properties.get("lastActionDateTime", datetime.min)
27+
28+
@property
29+
def status(self) -> LongRunningOperationStatus:
30+
"""Gets the status property"""
31+
return self.properties.get("status", LongRunningOperationStatus.notStarted)
32+
33+
@property
34+
def entity_type_name(self) -> str:
35+
return "microsoft.graph.partners.billing.Operation"
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1+
from __future__ import annotations
2+
13
from office365.entity import Entity
24
from office365.partners.billing.billed_usage import BilledUsage
5+
from office365.partners.billing.unbilled_usage import UnbilledUsage
36
from office365.runtime.paths.resource_path import ResourcePath
47

58

69
class AzureUsage(Entity):
7-
"""Represents details for billed and unbilled Azure usage data."""
10+
@property
11+
def billed(self) -> BilledUsage:
12+
"""Gets the billed property"""
13+
return self.properties.get("billed", BilledUsage(self.context, ResourcePath("billed", self.resource_path)))
14+
15+
@property
16+
def unbilled(self) -> UnbilledUsage:
17+
"""Gets the unbilled property"""
18+
return self.properties.get("unbilled", UnbilledUsage(self.context, ResourcePath("unbilled", self.resource_path)))
819

920
@property
10-
def billed(self):
11-
"""
12-
Represents details for billed Azure usage data.
13-
"""
14-
return self.properties.get(
15-
"billed",
16-
BilledUsage(self.context, ResourcePath("billed", self.resource_path)),
17-
)
21+
def entity_type_name(self) -> str:
22+
return "microsoft.graph.partners.billing.AzureUsage"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from __future__ import annotations
2+
3+
from office365.entity import Entity
4+
5+
6+
class BilledReconciliation(Entity):
7+
pass
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
1-
from typing import Optional
1+
from __future__ import annotations
22

33
from office365.entity import Entity
4-
from office365.partners.billing.operation import Operation
5-
from office365.runtime.queries.service_operation import ServiceOperationQuery
64

75

86
class BilledUsage(Entity):
9-
"""Represents details for billed Azure usage data."""
10-
11-
def export(self, invoice_id: str, attribute_set: Optional[str] = None) -> Operation:
12-
"""Export the billed Azure usage data.
13-
14-
Args:
15-
invoice_id: The invoice ID for which the partner requested to export data. Required.
16-
attribute_set: Attributes that should be exported. Possible values are: full, basic, unknownFutureValue.
17-
The default value is full. Choose full for a complete response or basic for a subset of attributes.
18-
"""
19-
payload = {"invoiceId": invoice_id, "attributeSet": attribute_set}
20-
return_type = Operation(self.context)
21-
qry = ServiceOperationQuery(self, "export", None, payload, None, return_type)
22-
self.context.add_query(qry)
23-
return return_type
7+
pass

0 commit comments

Comments
 (0)