msgraph-sdk 1.23.0__py3-none-any.whl → 1.25.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. msgraph/_version.py +1 -1
  2. msgraph/generated/chats/item/members/item/conversation_member_item_request_builder.py +4 -4
  3. msgraph/generated/communications/calls/item/participants/invite/invite_request_builder.py +3 -3
  4. msgraph/generated/device_app_management/device_app_management_request_builder.py +2 -2
  5. msgraph/generated/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.py +1 -1
  6. msgraph/generated/device_app_management/managed_app_policies/managed_app_policies_request_builder.py +4 -4
  7. msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.py +1 -1
  8. msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.py +1 -1
  9. msgraph/generated/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.py +4 -4
  10. msgraph/generated/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.py +4 -4
  11. msgraph/generated/device_app_management/managed_e_books/item/assignments/assignments_request_builder.py +4 -4
  12. msgraph/generated/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.py +6 -6
  13. msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py +4 -4
  14. msgraph/generated/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.py +4 -4
  15. msgraph/generated/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.py +4 -4
  16. msgraph/generated/device_app_management/mobile_apps/item/mobile_app_item_request_builder.py +10 -10
  17. msgraph/generated/device_app_management/mobile_apps/mobile_apps_request_builder.py +7 -7
  18. msgraph/generated/device_management/device_compliance_policies/device_compliance_policies_request_builder.py +7 -7
  19. msgraph/generated/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.py +7 -7
  20. msgraph/generated/device_management/device_configurations/device_configurations_request_builder.py +7 -7
  21. msgraph/generated/device_management/device_configurations/item/device_configuration_item_request_builder.py +10 -10
  22. msgraph/generated/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.py +4 -4
  23. msgraph/generated/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.py +6 -6
  24. msgraph/generated/device_management/device_management_request_builder.py +2 -2
  25. msgraph/generated/device_management/role_definitions/role_definitions_request_builder.py +4 -4
  26. msgraph/generated/drives/item/items/item/retention_label/retention_label_request_builder.py +3 -3
  27. msgraph/generated/drives/item/items/item/workbook/names/item/range/range_request_builder.py +3 -3
  28. msgraph/generated/drives/item/items/item/workbook/tables/add/add_request_builder.py +3 -3
  29. msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py +3 -3
  30. msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/add/add_request_builder.py +3 -3
  31. msgraph/generated/external/connections/item/items/item/external_item_item_request_builder.py +3 -3
  32. msgraph/generated/groups/groups_request_builder.py +3 -3
  33. msgraph/generated/groups/item/conversations/conversations_request_builder.py +3 -3
  34. msgraph/generated/groups/item/conversations/item/conversation_item_request_builder.py +1 -1
  35. msgraph/generated/identity/conditional_access/named_locations/item/named_location_item_request_builder.py +7 -7
  36. msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py +6 -6
  37. msgraph/generated/identity_governance/terms_of_use/agreements/item/agreement_item_request_builder.py +4 -4
  38. msgraph/generated/kiota-dom-export.txt +172 -0
  39. msgraph/generated/kiota-lock.json +2 -2
  40. msgraph/generated/models/air_print_settings.py +61 -0
  41. msgraph/generated/models/cloud_pc_provisioning_policy.py +1 -1
  42. msgraph/generated/models/cloud_pc_provisioning_policy_autopatch.py +1 -1
  43. msgraph/generated/models/incompatible_printer_settings.py +7 -0
  44. msgraph/generated/models/print_document.py +9 -0
  45. msgraph/generated/models/print_job.py +8 -0
  46. msgraph/generated/models/print_settings.py +11 -0
  47. msgraph/generated/models/printer_discovery_settings.py +61 -0
  48. msgraph/generated/models/team.py +1 -1
  49. msgraph/generated/models/workbook_worksheet_protection_options.py +11 -11
  50. msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py +3 -3
  51. msgraph/generated/sites/item/lists/item/list_item_request_builder.py +4 -4
  52. msgraph/generated/solutions/backup_restore/protection_units/graph_drive_protection_unit/count/count_request_builder.py +104 -0
  53. msgraph/generated/solutions/backup_restore/protection_units/graph_drive_protection_unit/graph_drive_protection_unit_request_builder.py +148 -0
  54. msgraph/generated/solutions/backup_restore/protection_units/graph_mailbox_protection_unit/count/count_request_builder.py +104 -0
  55. msgraph/generated/solutions/backup_restore/protection_units/graph_mailbox_protection_unit/graph_mailbox_protection_unit_request_builder.py +148 -0
  56. msgraph/generated/solutions/backup_restore/protection_units/graph_site_protection_unit/count/count_request_builder.py +104 -0
  57. msgraph/generated/solutions/backup_restore/protection_units/graph_site_protection_unit/graph_site_protection_unit_request_builder.py +148 -0
  58. msgraph/generated/solutions/backup_restore/protection_units/item/graph_drive_protection_unit/graph_drive_protection_unit_request_builder.py +108 -0
  59. msgraph/generated/solutions/backup_restore/protection_units/item/graph_mailbox_protection_unit/graph_mailbox_protection_unit_request_builder.py +108 -0
  60. msgraph/generated/solutions/backup_restore/protection_units/item/graph_site_protection_unit/graph_site_protection_unit_request_builder.py +108 -0
  61. msgraph/generated/solutions/backup_restore/protection_units/item/protection_unit_base_item_request_builder.py +30 -0
  62. msgraph/generated/solutions/backup_restore/protection_units/protection_units_request_builder.py +30 -0
  63. msgraph/generated/teams/item/channels/item/members/item/conversation_member_item_request_builder.py +3 -3
  64. msgraph/generated/teams/item/channels/item/members/members_request_builder.py +3 -3
  65. msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_request_builder.py +2 -2
  66. msgraph/generated/users/item/user_item_request_builder.py +1 -1
  67. msgraph/generated/users/users_request_builder.py +7 -7
  68. msgraph/generated/users_with_user_principal_name/users_with_user_principal_name_request_builder.py +1 -1
  69. {msgraph_sdk-1.23.0.dist-info → msgraph_sdk-1.25.0.dist-info}/METADATA +1 -1
  70. {msgraph_sdk-1.23.0.dist-info → msgraph_sdk-1.25.0.dist-info}/RECORD +72 -60
  71. {msgraph_sdk-1.23.0.dist-info → msgraph_sdk-1.25.0.dist-info}/WHEEL +0 -0
  72. {msgraph_sdk-1.23.0.dist-info → msgraph_sdk-1.25.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,148 @@
1
+ from __future__ import annotations
2
+ from collections.abc import Callable
3
+ from dataclasses import dataclass, field
4
+ from kiota_abstractions.base_request_builder import BaseRequestBuilder
5
+ from kiota_abstractions.base_request_configuration import RequestConfiguration
6
+ from kiota_abstractions.default_query_parameters import QueryParameters
7
+ from kiota_abstractions.get_path_parameters import get_path_parameters
8
+ from kiota_abstractions.method import Method
9
+ from kiota_abstractions.request_adapter import RequestAdapter
10
+ from kiota_abstractions.request_information import RequestInformation
11
+ from kiota_abstractions.request_option import RequestOption
12
+ from kiota_abstractions.serialization import Parsable, ParsableFactory
13
+ from typing import Any, Optional, TYPE_CHECKING, Union
14
+ from warnings import warn
15
+
16
+ if TYPE_CHECKING:
17
+ from .....models.o_data_errors.o_data_error import ODataError
18
+ from .....models.site_protection_unit_collection_response import SiteProtectionUnitCollectionResponse
19
+ from .count.count_request_builder import CountRequestBuilder
20
+
21
+ class GraphSiteProtectionUnitRequestBuilder(BaseRequestBuilder):
22
+ """
23
+ Casts the previous resource to siteProtectionUnit.
24
+ """
25
+ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
26
+ """
27
+ Instantiates a new GraphSiteProtectionUnitRequestBuilder and sets the default values.
28
+ param path_parameters: The raw url or the url-template parameters for the request.
29
+ param request_adapter: The request adapter to use to execute the requests.
30
+ Returns: None
31
+ """
32
+ super().__init__(request_adapter, "{+baseurl}/solutions/backupRestore/protectionUnits/graph.siteProtectionUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
33
+
34
+ async def get(self,request_configuration: Optional[RequestConfiguration[GraphSiteProtectionUnitRequestBuilderGetQueryParameters]] = None) -> Optional[SiteProtectionUnitCollectionResponse]:
35
+ """
36
+ Get a list of the siteProtectionUnit objects that are associated with a sharePointProtectionPolicy.
37
+ param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
38
+ Returns: Optional[SiteProtectionUnitCollectionResponse]
39
+ Find more info here: https://learn.microsoft.com/graph/api/backuprestoreroot-list-siteprotectionunits?view=graph-rest-1.0
40
+ """
41
+ request_info = self.to_get_request_information(
42
+ request_configuration
43
+ )
44
+ from .....models.o_data_errors.o_data_error import ODataError
45
+
46
+ error_mapping: dict[str, type[ParsableFactory]] = {
47
+ "XXX": ODataError,
48
+ }
49
+ if not self.request_adapter:
50
+ raise Exception("Http core is null")
51
+ from .....models.site_protection_unit_collection_response import SiteProtectionUnitCollectionResponse
52
+
53
+ return await self.request_adapter.send_async(request_info, SiteProtectionUnitCollectionResponse, error_mapping)
54
+
55
+ def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GraphSiteProtectionUnitRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
56
+ """
57
+ Get a list of the siteProtectionUnit objects that are associated with a sharePointProtectionPolicy.
58
+ param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
59
+ Returns: RequestInformation
60
+ """
61
+ request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
62
+ request_info.configure(request_configuration)
63
+ request_info.headers.try_add("Accept", "application/json")
64
+ return request_info
65
+
66
+ def with_url(self,raw_url: str) -> GraphSiteProtectionUnitRequestBuilder:
67
+ """
68
+ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
69
+ param raw_url: The raw URL to use for the request builder.
70
+ Returns: GraphSiteProtectionUnitRequestBuilder
71
+ """
72
+ if raw_url is None:
73
+ raise TypeError("raw_url cannot be null.")
74
+ return GraphSiteProtectionUnitRequestBuilder(self.request_adapter, raw_url)
75
+
76
+ @property
77
+ def count(self) -> CountRequestBuilder:
78
+ """
79
+ Provides operations to count the resources in the collection.
80
+ """
81
+ from .count.count_request_builder import CountRequestBuilder
82
+
83
+ return CountRequestBuilder(self.request_adapter, self.path_parameters)
84
+
85
+ @dataclass
86
+ class GraphSiteProtectionUnitRequestBuilderGetQueryParameters():
87
+ """
88
+ Get a list of the siteProtectionUnit objects that are associated with a sharePointProtectionPolicy.
89
+ """
90
+ def get_query_parameter(self,original_name: str) -> str:
91
+ """
92
+ Maps the query parameters names to their encoded names for the URI template parsing.
93
+ param original_name: The original query parameter name in the class.
94
+ Returns: str
95
+ """
96
+ if original_name is None:
97
+ raise TypeError("original_name cannot be null.")
98
+ if original_name == "count":
99
+ return "%24count"
100
+ if original_name == "expand":
101
+ return "%24expand"
102
+ if original_name == "filter":
103
+ return "%24filter"
104
+ if original_name == "orderby":
105
+ return "%24orderby"
106
+ if original_name == "search":
107
+ return "%24search"
108
+ if original_name == "select":
109
+ return "%24select"
110
+ if original_name == "skip":
111
+ return "%24skip"
112
+ if original_name == "top":
113
+ return "%24top"
114
+ return original_name
115
+
116
+ # Include count of items
117
+ count: Optional[bool] = None
118
+
119
+ # Expand related entities
120
+ expand: Optional[list[str]] = None
121
+
122
+ # Filter items by property values
123
+ filter: Optional[str] = None
124
+
125
+ # Order items by property values
126
+ orderby: Optional[list[str]] = None
127
+
128
+ # Search items by search phrases
129
+ search: Optional[str] = None
130
+
131
+ # Select properties to be returned
132
+ select: Optional[list[str]] = None
133
+
134
+ # Skip the first n items
135
+ skip: Optional[int] = None
136
+
137
+ # Show only the first n items
138
+ top: Optional[int] = None
139
+
140
+
141
+ @dataclass
142
+ class GraphSiteProtectionUnitRequestBuilderGetRequestConfiguration(RequestConfiguration[GraphSiteProtectionUnitRequestBuilderGetQueryParameters]):
143
+ """
144
+ Configuration for the request such as headers, query parameters, and middleware options.
145
+ """
146
+ warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
147
+
148
+
@@ -0,0 +1,108 @@
1
+ from __future__ import annotations
2
+ from collections.abc import Callable
3
+ from dataclasses import dataclass, field
4
+ from kiota_abstractions.base_request_builder import BaseRequestBuilder
5
+ from kiota_abstractions.base_request_configuration import RequestConfiguration
6
+ from kiota_abstractions.default_query_parameters import QueryParameters
7
+ from kiota_abstractions.get_path_parameters import get_path_parameters
8
+ from kiota_abstractions.method import Method
9
+ from kiota_abstractions.request_adapter import RequestAdapter
10
+ from kiota_abstractions.request_information import RequestInformation
11
+ from kiota_abstractions.request_option import RequestOption
12
+ from kiota_abstractions.serialization import Parsable, ParsableFactory
13
+ from typing import Any, Optional, TYPE_CHECKING, Union
14
+ from warnings import warn
15
+
16
+ if TYPE_CHECKING:
17
+ from ......models.drive_protection_unit import DriveProtectionUnit
18
+ from ......models.o_data_errors.o_data_error import ODataError
19
+
20
+ class GraphDriveProtectionUnitRequestBuilder(BaseRequestBuilder):
21
+ """
22
+ Casts the previous resource to driveProtectionUnit.
23
+ """
24
+ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25
+ """
26
+ Instantiates a new GraphDriveProtectionUnitRequestBuilder and sets the default values.
27
+ param path_parameters: The raw url or the url-template parameters for the request.
28
+ param request_adapter: The request adapter to use to execute the requests.
29
+ Returns: None
30
+ """
31
+ super().__init__(request_adapter, "{+baseurl}/solutions/backupRestore/protectionUnits/{protectionUnitBase%2Did}/graph.driveProtectionUnit{?%24expand,%24select}", path_parameters)
32
+
33
+ async def get(self,request_configuration: Optional[RequestConfiguration[GraphDriveProtectionUnitRequestBuilderGetQueryParameters]] = None) -> Optional[DriveProtectionUnit]:
34
+ """
35
+ Get a list of the driveProtectionUnit objects that are associated with a oneDriveForBusinessProtectionPolicy.
36
+ param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37
+ Returns: Optional[DriveProtectionUnit]
38
+ Find more info here: https://learn.microsoft.com/graph/api/backuprestoreroot-list-driveprotectionunits?view=graph-rest-1.0
39
+ """
40
+ request_info = self.to_get_request_information(
41
+ request_configuration
42
+ )
43
+ from ......models.o_data_errors.o_data_error import ODataError
44
+
45
+ error_mapping: dict[str, type[ParsableFactory]] = {
46
+ "XXX": ODataError,
47
+ }
48
+ if not self.request_adapter:
49
+ raise Exception("Http core is null")
50
+ from ......models.drive_protection_unit import DriveProtectionUnit
51
+
52
+ return await self.request_adapter.send_async(request_info, DriveProtectionUnit, error_mapping)
53
+
54
+ def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GraphDriveProtectionUnitRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
55
+ """
56
+ Get a list of the driveProtectionUnit objects that are associated with a oneDriveForBusinessProtectionPolicy.
57
+ param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
58
+ Returns: RequestInformation
59
+ """
60
+ request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
61
+ request_info.configure(request_configuration)
62
+ request_info.headers.try_add("Accept", "application/json")
63
+ return request_info
64
+
65
+ def with_url(self,raw_url: str) -> GraphDriveProtectionUnitRequestBuilder:
66
+ """
67
+ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
68
+ param raw_url: The raw URL to use for the request builder.
69
+ Returns: GraphDriveProtectionUnitRequestBuilder
70
+ """
71
+ if raw_url is None:
72
+ raise TypeError("raw_url cannot be null.")
73
+ return GraphDriveProtectionUnitRequestBuilder(self.request_adapter, raw_url)
74
+
75
+ @dataclass
76
+ class GraphDriveProtectionUnitRequestBuilderGetQueryParameters():
77
+ """
78
+ Get a list of the driveProtectionUnit objects that are associated with a oneDriveForBusinessProtectionPolicy.
79
+ """
80
+ def get_query_parameter(self,original_name: str) -> str:
81
+ """
82
+ Maps the query parameters names to their encoded names for the URI template parsing.
83
+ param original_name: The original query parameter name in the class.
84
+ Returns: str
85
+ """
86
+ if original_name is None:
87
+ raise TypeError("original_name cannot be null.")
88
+ if original_name == "expand":
89
+ return "%24expand"
90
+ if original_name == "select":
91
+ return "%24select"
92
+ return original_name
93
+
94
+ # Expand related entities
95
+ expand: Optional[list[str]] = None
96
+
97
+ # Select properties to be returned
98
+ select: Optional[list[str]] = None
99
+
100
+
101
+ @dataclass
102
+ class GraphDriveProtectionUnitRequestBuilderGetRequestConfiguration(RequestConfiguration[GraphDriveProtectionUnitRequestBuilderGetQueryParameters]):
103
+ """
104
+ Configuration for the request such as headers, query parameters, and middleware options.
105
+ """
106
+ warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
107
+
108
+
@@ -0,0 +1,108 @@
1
+ from __future__ import annotations
2
+ from collections.abc import Callable
3
+ from dataclasses import dataclass, field
4
+ from kiota_abstractions.base_request_builder import BaseRequestBuilder
5
+ from kiota_abstractions.base_request_configuration import RequestConfiguration
6
+ from kiota_abstractions.default_query_parameters import QueryParameters
7
+ from kiota_abstractions.get_path_parameters import get_path_parameters
8
+ from kiota_abstractions.method import Method
9
+ from kiota_abstractions.request_adapter import RequestAdapter
10
+ from kiota_abstractions.request_information import RequestInformation
11
+ from kiota_abstractions.request_option import RequestOption
12
+ from kiota_abstractions.serialization import Parsable, ParsableFactory
13
+ from typing import Any, Optional, TYPE_CHECKING, Union
14
+ from warnings import warn
15
+
16
+ if TYPE_CHECKING:
17
+ from ......models.mailbox_protection_unit import MailboxProtectionUnit
18
+ from ......models.o_data_errors.o_data_error import ODataError
19
+
20
+ class GraphMailboxProtectionUnitRequestBuilder(BaseRequestBuilder):
21
+ """
22
+ Casts the previous resource to mailboxProtectionUnit.
23
+ """
24
+ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25
+ """
26
+ Instantiates a new GraphMailboxProtectionUnitRequestBuilder and sets the default values.
27
+ param path_parameters: The raw url or the url-template parameters for the request.
28
+ param request_adapter: The request adapter to use to execute the requests.
29
+ Returns: None
30
+ """
31
+ super().__init__(request_adapter, "{+baseurl}/solutions/backupRestore/protectionUnits/{protectionUnitBase%2Did}/graph.mailboxProtectionUnit{?%24expand,%24select}", path_parameters)
32
+
33
+ async def get(self,request_configuration: Optional[RequestConfiguration[GraphMailboxProtectionUnitRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxProtectionUnit]:
34
+ """
35
+ Get a list of mailboxProtectionUnit objects.
36
+ param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37
+ Returns: Optional[MailboxProtectionUnit]
38
+ Find more info here: https://learn.microsoft.com/graph/api/backuprestoreroot-list-mailboxprotectionunits?view=graph-rest-1.0
39
+ """
40
+ request_info = self.to_get_request_information(
41
+ request_configuration
42
+ )
43
+ from ......models.o_data_errors.o_data_error import ODataError
44
+
45
+ error_mapping: dict[str, type[ParsableFactory]] = {
46
+ "XXX": ODataError,
47
+ }
48
+ if not self.request_adapter:
49
+ raise Exception("Http core is null")
50
+ from ......models.mailbox_protection_unit import MailboxProtectionUnit
51
+
52
+ return await self.request_adapter.send_async(request_info, MailboxProtectionUnit, error_mapping)
53
+
54
+ def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GraphMailboxProtectionUnitRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
55
+ """
56
+ Get a list of mailboxProtectionUnit objects.
57
+ param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
58
+ Returns: RequestInformation
59
+ """
60
+ request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
61
+ request_info.configure(request_configuration)
62
+ request_info.headers.try_add("Accept", "application/json")
63
+ return request_info
64
+
65
+ def with_url(self,raw_url: str) -> GraphMailboxProtectionUnitRequestBuilder:
66
+ """
67
+ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
68
+ param raw_url: The raw URL to use for the request builder.
69
+ Returns: GraphMailboxProtectionUnitRequestBuilder
70
+ """
71
+ if raw_url is None:
72
+ raise TypeError("raw_url cannot be null.")
73
+ return GraphMailboxProtectionUnitRequestBuilder(self.request_adapter, raw_url)
74
+
75
+ @dataclass
76
+ class GraphMailboxProtectionUnitRequestBuilderGetQueryParameters():
77
+ """
78
+ Get a list of mailboxProtectionUnit objects.
79
+ """
80
+ def get_query_parameter(self,original_name: str) -> str:
81
+ """
82
+ Maps the query parameters names to their encoded names for the URI template parsing.
83
+ param original_name: The original query parameter name in the class.
84
+ Returns: str
85
+ """
86
+ if original_name is None:
87
+ raise TypeError("original_name cannot be null.")
88
+ if original_name == "expand":
89
+ return "%24expand"
90
+ if original_name == "select":
91
+ return "%24select"
92
+ return original_name
93
+
94
+ # Expand related entities
95
+ expand: Optional[list[str]] = None
96
+
97
+ # Select properties to be returned
98
+ select: Optional[list[str]] = None
99
+
100
+
101
+ @dataclass
102
+ class GraphMailboxProtectionUnitRequestBuilderGetRequestConfiguration(RequestConfiguration[GraphMailboxProtectionUnitRequestBuilderGetQueryParameters]):
103
+ """
104
+ Configuration for the request such as headers, query parameters, and middleware options.
105
+ """
106
+ warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
107
+
108
+
@@ -0,0 +1,108 @@
1
+ from __future__ import annotations
2
+ from collections.abc import Callable
3
+ from dataclasses import dataclass, field
4
+ from kiota_abstractions.base_request_builder import BaseRequestBuilder
5
+ from kiota_abstractions.base_request_configuration import RequestConfiguration
6
+ from kiota_abstractions.default_query_parameters import QueryParameters
7
+ from kiota_abstractions.get_path_parameters import get_path_parameters
8
+ from kiota_abstractions.method import Method
9
+ from kiota_abstractions.request_adapter import RequestAdapter
10
+ from kiota_abstractions.request_information import RequestInformation
11
+ from kiota_abstractions.request_option import RequestOption
12
+ from kiota_abstractions.serialization import Parsable, ParsableFactory
13
+ from typing import Any, Optional, TYPE_CHECKING, Union
14
+ from warnings import warn
15
+
16
+ if TYPE_CHECKING:
17
+ from ......models.o_data_errors.o_data_error import ODataError
18
+ from ......models.site_protection_unit import SiteProtectionUnit
19
+
20
+ class GraphSiteProtectionUnitRequestBuilder(BaseRequestBuilder):
21
+ """
22
+ Casts the previous resource to siteProtectionUnit.
23
+ """
24
+ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
25
+ """
26
+ Instantiates a new GraphSiteProtectionUnitRequestBuilder and sets the default values.
27
+ param path_parameters: The raw url or the url-template parameters for the request.
28
+ param request_adapter: The request adapter to use to execute the requests.
29
+ Returns: None
30
+ """
31
+ super().__init__(request_adapter, "{+baseurl}/solutions/backupRestore/protectionUnits/{protectionUnitBase%2Did}/graph.siteProtectionUnit{?%24expand,%24select}", path_parameters)
32
+
33
+ async def get(self,request_configuration: Optional[RequestConfiguration[GraphSiteProtectionUnitRequestBuilderGetQueryParameters]] = None) -> Optional[SiteProtectionUnit]:
34
+ """
35
+ Get a list of the siteProtectionUnit objects that are associated with a sharePointProtectionPolicy.
36
+ param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37
+ Returns: Optional[SiteProtectionUnit]
38
+ Find more info here: https://learn.microsoft.com/graph/api/backuprestoreroot-list-siteprotectionunits?view=graph-rest-1.0
39
+ """
40
+ request_info = self.to_get_request_information(
41
+ request_configuration
42
+ )
43
+ from ......models.o_data_errors.o_data_error import ODataError
44
+
45
+ error_mapping: dict[str, type[ParsableFactory]] = {
46
+ "XXX": ODataError,
47
+ }
48
+ if not self.request_adapter:
49
+ raise Exception("Http core is null")
50
+ from ......models.site_protection_unit import SiteProtectionUnit
51
+
52
+ return await self.request_adapter.send_async(request_info, SiteProtectionUnit, error_mapping)
53
+
54
+ def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GraphSiteProtectionUnitRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
55
+ """
56
+ Get a list of the siteProtectionUnit objects that are associated with a sharePointProtectionPolicy.
57
+ param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
58
+ Returns: RequestInformation
59
+ """
60
+ request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
61
+ request_info.configure(request_configuration)
62
+ request_info.headers.try_add("Accept", "application/json")
63
+ return request_info
64
+
65
+ def with_url(self,raw_url: str) -> GraphSiteProtectionUnitRequestBuilder:
66
+ """
67
+ Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
68
+ param raw_url: The raw URL to use for the request builder.
69
+ Returns: GraphSiteProtectionUnitRequestBuilder
70
+ """
71
+ if raw_url is None:
72
+ raise TypeError("raw_url cannot be null.")
73
+ return GraphSiteProtectionUnitRequestBuilder(self.request_adapter, raw_url)
74
+
75
+ @dataclass
76
+ class GraphSiteProtectionUnitRequestBuilderGetQueryParameters():
77
+ """
78
+ Get a list of the siteProtectionUnit objects that are associated with a sharePointProtectionPolicy.
79
+ """
80
+ def get_query_parameter(self,original_name: str) -> str:
81
+ """
82
+ Maps the query parameters names to their encoded names for the URI template parsing.
83
+ param original_name: The original query parameter name in the class.
84
+ Returns: str
85
+ """
86
+ if original_name is None:
87
+ raise TypeError("original_name cannot be null.")
88
+ if original_name == "expand":
89
+ return "%24expand"
90
+ if original_name == "select":
91
+ return "%24select"
92
+ return original_name
93
+
94
+ # Expand related entities
95
+ expand: Optional[list[str]] = None
96
+
97
+ # Select properties to be returned
98
+ select: Optional[list[str]] = None
99
+
100
+
101
+ @dataclass
102
+ class GraphSiteProtectionUnitRequestBuilderGetRequestConfiguration(RequestConfiguration[GraphSiteProtectionUnitRequestBuilderGetQueryParameters]):
103
+ """
104
+ Configuration for the request such as headers, query parameters, and middleware options.
105
+ """
106
+ warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
107
+
108
+
@@ -16,6 +16,9 @@ from warnings import warn
16
16
  if TYPE_CHECKING:
17
17
  from .....models.o_data_errors.o_data_error import ODataError
18
18
  from .....models.protection_unit_base import ProtectionUnitBase
19
+ from .graph_drive_protection_unit.graph_drive_protection_unit_request_builder import GraphDriveProtectionUnitRequestBuilder
20
+ from .graph_mailbox_protection_unit.graph_mailbox_protection_unit_request_builder import GraphMailboxProtectionUnitRequestBuilder
21
+ from .graph_site_protection_unit.graph_site_protection_unit_request_builder import GraphSiteProtectionUnitRequestBuilder
19
22
 
20
23
  class ProtectionUnitBaseItemRequestBuilder(BaseRequestBuilder):
21
24
  """
@@ -72,6 +75,33 @@ class ProtectionUnitBaseItemRequestBuilder(BaseRequestBuilder):
72
75
  raise TypeError("raw_url cannot be null.")
73
76
  return ProtectionUnitBaseItemRequestBuilder(self.request_adapter, raw_url)
74
77
 
78
+ @property
79
+ def graph_drive_protection_unit(self) -> GraphDriveProtectionUnitRequestBuilder:
80
+ """
81
+ Casts the previous resource to driveProtectionUnit.
82
+ """
83
+ from .graph_drive_protection_unit.graph_drive_protection_unit_request_builder import GraphDriveProtectionUnitRequestBuilder
84
+
85
+ return GraphDriveProtectionUnitRequestBuilder(self.request_adapter, self.path_parameters)
86
+
87
+ @property
88
+ def graph_mailbox_protection_unit(self) -> GraphMailboxProtectionUnitRequestBuilder:
89
+ """
90
+ Casts the previous resource to mailboxProtectionUnit.
91
+ """
92
+ from .graph_mailbox_protection_unit.graph_mailbox_protection_unit_request_builder import GraphMailboxProtectionUnitRequestBuilder
93
+
94
+ return GraphMailboxProtectionUnitRequestBuilder(self.request_adapter, self.path_parameters)
95
+
96
+ @property
97
+ def graph_site_protection_unit(self) -> GraphSiteProtectionUnitRequestBuilder:
98
+ """
99
+ Casts the previous resource to siteProtectionUnit.
100
+ """
101
+ from .graph_site_protection_unit.graph_site_protection_unit_request_builder import GraphSiteProtectionUnitRequestBuilder
102
+
103
+ return GraphSiteProtectionUnitRequestBuilder(self.request_adapter, self.path_parameters)
104
+
75
105
  @dataclass
76
106
  class ProtectionUnitBaseItemRequestBuilderGetQueryParameters():
77
107
  """
@@ -17,6 +17,9 @@ if TYPE_CHECKING:
17
17
  from ....models.o_data_errors.o_data_error import ODataError
18
18
  from ....models.protection_unit_base_collection_response import ProtectionUnitBaseCollectionResponse
19
19
  from .count.count_request_builder import CountRequestBuilder
20
+ from .graph_drive_protection_unit.graph_drive_protection_unit_request_builder import GraphDriveProtectionUnitRequestBuilder
21
+ from .graph_mailbox_protection_unit.graph_mailbox_protection_unit_request_builder import GraphMailboxProtectionUnitRequestBuilder
22
+ from .graph_site_protection_unit.graph_site_protection_unit_request_builder import GraphSiteProtectionUnitRequestBuilder
20
23
  from .item.protection_unit_base_item_request_builder import ProtectionUnitBaseItemRequestBuilder
21
24
 
22
25
  class ProtectionUnitsRequestBuilder(BaseRequestBuilder):
@@ -96,6 +99,33 @@ class ProtectionUnitsRequestBuilder(BaseRequestBuilder):
96
99
 
97
100
  return CountRequestBuilder(self.request_adapter, self.path_parameters)
98
101
 
102
+ @property
103
+ def graph_drive_protection_unit(self) -> GraphDriveProtectionUnitRequestBuilder:
104
+ """
105
+ Casts the previous resource to driveProtectionUnit.
106
+ """
107
+ from .graph_drive_protection_unit.graph_drive_protection_unit_request_builder import GraphDriveProtectionUnitRequestBuilder
108
+
109
+ return GraphDriveProtectionUnitRequestBuilder(self.request_adapter, self.path_parameters)
110
+
111
+ @property
112
+ def graph_mailbox_protection_unit(self) -> GraphMailboxProtectionUnitRequestBuilder:
113
+ """
114
+ Casts the previous resource to mailboxProtectionUnit.
115
+ """
116
+ from .graph_mailbox_protection_unit.graph_mailbox_protection_unit_request_builder import GraphMailboxProtectionUnitRequestBuilder
117
+
118
+ return GraphMailboxProtectionUnitRequestBuilder(self.request_adapter, self.path_parameters)
119
+
120
+ @property
121
+ def graph_site_protection_unit(self) -> GraphSiteProtectionUnitRequestBuilder:
122
+ """
123
+ Casts the previous resource to siteProtectionUnit.
124
+ """
125
+ from .graph_site_protection_unit.graph_site_protection_unit_request_builder import GraphSiteProtectionUnitRequestBuilder
126
+
127
+ return GraphSiteProtectionUnitRequestBuilder(self.request_adapter, self.path_parameters)
128
+
99
129
  @dataclass
100
130
  class ProtectionUnitsRequestBuilderGetQueryParameters():
101
131
  """
@@ -72,11 +72,11 @@ class ConversationMemberItemRequestBuilder(BaseRequestBuilder):
72
72
 
73
73
  async def patch(self,body: ConversationMember, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ConversationMember]:
74
74
  """
75
- Update the role of a conversationMember in a team or channel.
75
+ Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared.
76
76
  param body: The request body
77
77
  param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
78
78
  Returns: Optional[ConversationMember]
79
- Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0
79
+ Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0
80
80
  """
81
81
  if body is None:
82
82
  raise TypeError("body cannot be null.")
@@ -118,7 +118,7 @@ class ConversationMemberItemRequestBuilder(BaseRequestBuilder):
118
118
 
119
119
  def to_patch_request_information(self,body: ConversationMember, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
120
120
  """
121
- Update the role of a conversationMember in a team or channel.
121
+ Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared.
122
122
  param body: The request body
123
123
  param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
124
124
  Returns: RequestInformation
@@ -72,11 +72,11 @@ class MembersRequestBuilder(BaseRequestBuilder):
72
72
 
73
73
  async def post(self,body: ConversationMember, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ConversationMember]:
74
74
  """
75
- Add a conversationMember to a channel.
75
+ Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared.
76
76
  param body: The request body
77
77
  param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
78
78
  Returns: Optional[ConversationMember]
79
- Find more info here: https://learn.microsoft.com/graph/api/conversationmember-add?view=graph-rest-1.0
79
+ Find more info here: https://learn.microsoft.com/graph/api/channel-post-members?view=graph-rest-1.0
80
80
  """
81
81
  if body is None:
82
82
  raise TypeError("body cannot be null.")
@@ -107,7 +107,7 @@ class MembersRequestBuilder(BaseRequestBuilder):
107
107
 
108
108
  def to_post_request_information(self,body: ConversationMember, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
109
109
  """
110
- Add a conversationMember to a channel.
110
+ Add a conversationMember to a channel. This operation is allowed only for channels with a membershipType value of private or shared.
111
111
  param body: The request body
112
112
  param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
113
113
  Returns: RequestInformation
@@ -32,7 +32,7 @@ class RevokeSignInSessionsRequestBuilder(BaseRequestBuilder):
32
32
 
33
33
  async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[RevokeSignInSessionsPostResponse]:
34
34
  """
35
- Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device.
35
+ Invalidates all the refresh tokens issued to applications for a user (and session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they consented to previously, independent of device.
36
36
  param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
37
37
  Returns: Optional[RevokeSignInSessionsPostResponse]
38
38
  Find more info here: https://learn.microsoft.com/graph/api/user-revokesigninsessions?view=graph-rest-1.0
@@ -53,7 +53,7 @@ class RevokeSignInSessionsRequestBuilder(BaseRequestBuilder):
53
53
 
54
54
  def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
55
55
  """
56
- Invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device.
56
+ Invalidates all the refresh tokens issued to applications for a user (and session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they consented to previously, independent of device.
57
57
  param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
58
58
  Returns: RequestInformation
59
59
  """
@@ -167,7 +167,7 @@ class UserItemRequestBuilder(BaseRequestBuilder):
167
167
  param body: The request body
168
168
  param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
169
169
  Returns: Optional[User]
170
- Find more info here: https://learn.microsoft.com/graph/api/intune-mam-user-update?view=graph-rest-1.0
170
+ Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-user-update?view=graph-rest-1.0
171
171
  """
172
172
  if body is None:
173
173
  raise TypeError("body cannot be null.")