msgraph-sdk 1.24.0__py3-none-any.whl → 1.26.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.
- msgraph/_version.py +1 -1
- msgraph/generated/applications/item/owners/ref/ref_request_builder.py +2 -2
- msgraph/generated/chats/item/members/item/conversation_member_item_request_builder.py +4 -4
- msgraph/generated/device_app_management/device_app_management_request_builder.py +2 -2
- msgraph/generated/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.py +4 -4
- msgraph/generated/device_app_management/managed_app_policies/managed_app_policies_request_builder.py +4 -4
- msgraph/generated/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.py +4 -4
- msgraph/generated/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.py +4 -4
- msgraph/generated/device_app_management/managed_e_books/item/assignments/assignments_request_builder.py +4 -4
- msgraph/generated/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.py +4 -4
- msgraph/generated/device_app_management/managed_e_books/managed_e_books_request_builder.py +4 -4
- msgraph/generated/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.py +4 -4
- msgraph/generated/device_app_management/mobile_apps/item/mobile_app_item_request_builder.py +10 -10
- msgraph/generated/device_app_management/mobile_apps/mobile_apps_request_builder.py +7 -7
- msgraph/generated/device_management/device_compliance_policies/device_compliance_policies_request_builder.py +7 -7
- msgraph/generated/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.py +7 -7
- msgraph/generated/device_management/device_configurations/device_configurations_request_builder.py +7 -7
- msgraph/generated/device_management/device_configurations/item/device_configuration_item_request_builder.py +10 -10
- msgraph/generated/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.py +7 -7
- msgraph/generated/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.py +10 -10
- msgraph/generated/device_management/device_management_request_builder.py +2 -2
- msgraph/generated/device_management/role_definitions/item/role_definition_item_request_builder.py +6 -6
- msgraph/generated/device_management/role_definitions/role_definitions_request_builder.py +7 -7
- msgraph/generated/drives/item/items/item/workbook/names/item/range/range_request_builder.py +3 -3
- msgraph/generated/drives/item/items/item/workbook/tables/add/add_request_builder.py +3 -3
- msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py +3 -3
- msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/add/add_request_builder.py +3 -3
- msgraph/generated/groups/groups_request_builder.py +3 -3
- msgraph/generated/groups/item/conversations/conversations_request_builder.py +3 -3
- msgraph/generated/groups/item/conversations/item/conversation_item_request_builder.py +5 -5
- msgraph/generated/groups/item/threads/item/conversation_thread_item_request_builder.py +5 -5
- msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py +4 -4
- msgraph/generated/identity/conditional_access/named_locations/item/named_location_item_request_builder.py +7 -7
- msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_package_item_request_builder.py +4 -4
- msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py +6 -6
- msgraph/generated/kiota-dom-export.txt +135 -0
- msgraph/generated/kiota-lock.json +2 -2
- msgraph/generated/models/application.py +1 -1
- msgraph/generated/models/cloud_pc_provisioning_policy.py +1 -1
- msgraph/generated/models/cloud_pc_provisioning_policy_autopatch.py +1 -1
- msgraph/generated/models/conditional_access_applications.py +1 -1
- msgraph/generated/organization/item/organization_item_request_builder.py +4 -4
- msgraph/generated/sites/item/lists/item/list_item_request_builder.py +4 -4
- msgraph/generated/sites/sites_request_builder.py +4 -4
- msgraph/generated/solutions/backup_restore/protection_units/graph_drive_protection_unit/count/count_request_builder.py +104 -0
- msgraph/generated/solutions/backup_restore/protection_units/graph_drive_protection_unit/graph_drive_protection_unit_request_builder.py +148 -0
- msgraph/generated/solutions/backup_restore/protection_units/graph_mailbox_protection_unit/count/count_request_builder.py +104 -0
- msgraph/generated/solutions/backup_restore/protection_units/graph_mailbox_protection_unit/graph_mailbox_protection_unit_request_builder.py +148 -0
- msgraph/generated/solutions/backup_restore/protection_units/graph_site_protection_unit/count/count_request_builder.py +104 -0
- msgraph/generated/solutions/backup_restore/protection_units/graph_site_protection_unit/graph_site_protection_unit_request_builder.py +148 -0
- msgraph/generated/solutions/backup_restore/protection_units/item/graph_drive_protection_unit/graph_drive_protection_unit_request_builder.py +108 -0
- msgraph/generated/solutions/backup_restore/protection_units/item/graph_mailbox_protection_unit/graph_mailbox_protection_unit_request_builder.py +108 -0
- msgraph/generated/solutions/backup_restore/protection_units/item/graph_site_protection_unit/graph_site_protection_unit_request_builder.py +108 -0
- msgraph/generated/solutions/backup_restore/protection_units/item/protection_unit_base_item_request_builder.py +30 -0
- msgraph/generated/solutions/backup_restore/protection_units/protection_units_request_builder.py +30 -0
- msgraph/generated/teams/item/channels/item/members/item/conversation_member_item_request_builder.py +3 -3
- msgraph/generated/teams/item/channels/item/members/members_request_builder.py +3 -3
- msgraph/generated/teams/item/channels/item/messages/item/replies/replies_request_builder.py +3 -3
- msgraph/generated/teams/item/channels/item/messages/messages_request_builder.py +3 -3
- msgraph/generated/users/item/presence/presence_request_builder.py +4 -4
- msgraph/generated/users/item/retry_service_provisioning/retry_service_provisioning_request_builder.py +2 -2
- msgraph/generated/users/item/revoke_sign_in_sessions/revoke_sign_in_sessions_request_builder.py +2 -2
- msgraph/generated/users/item/user_item_request_builder.py +2 -2
- msgraph/generated/users/users_request_builder.py +2 -2
- msgraph/generated/users_with_user_principal_name/users_with_user_principal_name_request_builder.py +2 -2
- {msgraph_sdk-1.24.0.dist-info → msgraph_sdk-1.26.0.dist-info}/METADATA +1 -1
- {msgraph_sdk-1.24.0.dist-info → msgraph_sdk-1.26.0.dist-info}/RECORD +69 -60
- {msgraph_sdk-1.24.0.dist-info → msgraph_sdk-1.26.0.dist-info}/WHEEL +1 -1
- {msgraph_sdk-1.24.0.dist-info → msgraph_sdk-1.26.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.drive_protection_unit_collection_response import DriveProtectionUnitCollectionResponse
|
18
|
+
from .....models.o_data_errors.o_data_error import ODataError
|
19
|
+
from .count.count_request_builder import CountRequestBuilder
|
20
|
+
|
21
|
+
class GraphDriveProtectionUnitRequestBuilder(BaseRequestBuilder):
|
22
|
+
"""
|
23
|
+
Casts the previous resource to driveProtectionUnit.
|
24
|
+
"""
|
25
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
26
|
+
"""
|
27
|
+
Instantiates a new GraphDriveProtectionUnitRequestBuilder 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.driveProtectionUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
|
33
|
+
|
34
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[GraphDriveProtectionUnitRequestBuilderGetQueryParameters]] = None) -> Optional[DriveProtectionUnitCollectionResponse]:
|
35
|
+
"""
|
36
|
+
Get a list of the driveProtectionUnit objects that are associated with a oneDriveForBusinessProtectionPolicy.
|
37
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
38
|
+
Returns: Optional[DriveProtectionUnitCollectionResponse]
|
39
|
+
Find more info here: https://learn.microsoft.com/graph/api/backuprestoreroot-list-driveprotectionunits?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.drive_protection_unit_collection_response import DriveProtectionUnitCollectionResponse
|
52
|
+
|
53
|
+
return await self.request_adapter.send_async(request_info, DriveProtectionUnitCollectionResponse, error_mapping)
|
54
|
+
|
55
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GraphDriveProtectionUnitRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
56
|
+
"""
|
57
|
+
Get a list of the driveProtectionUnit objects that are associated with a oneDriveForBusinessProtectionPolicy.
|
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) -> GraphDriveProtectionUnitRequestBuilder:
|
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: GraphDriveProtectionUnitRequestBuilder
|
71
|
+
"""
|
72
|
+
if raw_url is None:
|
73
|
+
raise TypeError("raw_url cannot be null.")
|
74
|
+
return GraphDriveProtectionUnitRequestBuilder(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 GraphDriveProtectionUnitRequestBuilderGetQueryParameters():
|
87
|
+
"""
|
88
|
+
Get a list of the driveProtectionUnit objects that are associated with a oneDriveForBusinessProtectionPolicy.
|
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 GraphDriveProtectionUnitRequestBuilderGetRequestConfiguration(RequestConfiguration[GraphDriveProtectionUnitRequestBuilderGetQueryParameters]):
|
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,104 @@
|
|
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
|
+
|
19
|
+
class CountRequestBuilder(BaseRequestBuilder):
|
20
|
+
"""
|
21
|
+
Provides operations to count the resources in the collection.
|
22
|
+
"""
|
23
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
24
|
+
"""
|
25
|
+
Instantiates a new CountRequestBuilder and sets the default values.
|
26
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
27
|
+
param request_adapter: The request adapter to use to execute the requests.
|
28
|
+
Returns: None
|
29
|
+
"""
|
30
|
+
super().__init__(request_adapter, "{+baseurl}/solutions/backupRestore/protectionUnits/graph.mailboxProtectionUnit/$count{?%24filter,%24search}", path_parameters)
|
31
|
+
|
32
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]:
|
33
|
+
"""
|
34
|
+
Get the number of the resource
|
35
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
36
|
+
Returns: Optional[int]
|
37
|
+
"""
|
38
|
+
request_info = self.to_get_request_information(
|
39
|
+
request_configuration
|
40
|
+
)
|
41
|
+
from ......models.o_data_errors.o_data_error import ODataError
|
42
|
+
|
43
|
+
error_mapping: dict[str, type[ParsableFactory]] = {
|
44
|
+
"XXX": ODataError,
|
45
|
+
}
|
46
|
+
if not self.request_adapter:
|
47
|
+
raise Exception("Http core is null")
|
48
|
+
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
|
49
|
+
|
50
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
51
|
+
"""
|
52
|
+
Get the number of the resource
|
53
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
54
|
+
Returns: RequestInformation
|
55
|
+
"""
|
56
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
57
|
+
request_info.configure(request_configuration)
|
58
|
+
request_info.headers.try_add("Accept", "text/plain;q=0.9")
|
59
|
+
return request_info
|
60
|
+
|
61
|
+
def with_url(self,raw_url: str) -> CountRequestBuilder:
|
62
|
+
"""
|
63
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
64
|
+
param raw_url: The raw URL to use for the request builder.
|
65
|
+
Returns: CountRequestBuilder
|
66
|
+
"""
|
67
|
+
if raw_url is None:
|
68
|
+
raise TypeError("raw_url cannot be null.")
|
69
|
+
return CountRequestBuilder(self.request_adapter, raw_url)
|
70
|
+
|
71
|
+
@dataclass
|
72
|
+
class CountRequestBuilderGetQueryParameters():
|
73
|
+
"""
|
74
|
+
Get the number of the resource
|
75
|
+
"""
|
76
|
+
def get_query_parameter(self,original_name: str) -> str:
|
77
|
+
"""
|
78
|
+
Maps the query parameters names to their encoded names for the URI template parsing.
|
79
|
+
param original_name: The original query parameter name in the class.
|
80
|
+
Returns: str
|
81
|
+
"""
|
82
|
+
if original_name is None:
|
83
|
+
raise TypeError("original_name cannot be null.")
|
84
|
+
if original_name == "filter":
|
85
|
+
return "%24filter"
|
86
|
+
if original_name == "search":
|
87
|
+
return "%24search"
|
88
|
+
return original_name
|
89
|
+
|
90
|
+
# Filter items by property values
|
91
|
+
filter: Optional[str] = None
|
92
|
+
|
93
|
+
# Search items by search phrases
|
94
|
+
search: Optional[str] = None
|
95
|
+
|
96
|
+
|
97
|
+
@dataclass
|
98
|
+
class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]):
|
99
|
+
"""
|
100
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
101
|
+
"""
|
102
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
103
|
+
|
104
|
+
|
@@ -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.mailbox_protection_unit_collection_response import MailboxProtectionUnitCollectionResponse
|
18
|
+
from .....models.o_data_errors.o_data_error import ODataError
|
19
|
+
from .count.count_request_builder import CountRequestBuilder
|
20
|
+
|
21
|
+
class GraphMailboxProtectionUnitRequestBuilder(BaseRequestBuilder):
|
22
|
+
"""
|
23
|
+
Casts the previous resource to mailboxProtectionUnit.
|
24
|
+
"""
|
25
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
26
|
+
"""
|
27
|
+
Instantiates a new GraphMailboxProtectionUnitRequestBuilder 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.mailboxProtectionUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
|
33
|
+
|
34
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[GraphMailboxProtectionUnitRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxProtectionUnitCollectionResponse]:
|
35
|
+
"""
|
36
|
+
Get a list of mailboxProtectionUnit objects.
|
37
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
38
|
+
Returns: Optional[MailboxProtectionUnitCollectionResponse]
|
39
|
+
Find more info here: https://learn.microsoft.com/graph/api/backuprestoreroot-list-mailboxprotectionunits?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.mailbox_protection_unit_collection_response import MailboxProtectionUnitCollectionResponse
|
52
|
+
|
53
|
+
return await self.request_adapter.send_async(request_info, MailboxProtectionUnitCollectionResponse, error_mapping)
|
54
|
+
|
55
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GraphMailboxProtectionUnitRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
56
|
+
"""
|
57
|
+
Get a list of mailboxProtectionUnit objects.
|
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) -> GraphMailboxProtectionUnitRequestBuilder:
|
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: GraphMailboxProtectionUnitRequestBuilder
|
71
|
+
"""
|
72
|
+
if raw_url is None:
|
73
|
+
raise TypeError("raw_url cannot be null.")
|
74
|
+
return GraphMailboxProtectionUnitRequestBuilder(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 GraphMailboxProtectionUnitRequestBuilderGetQueryParameters():
|
87
|
+
"""
|
88
|
+
Get a list of mailboxProtectionUnit objects.
|
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 GraphMailboxProtectionUnitRequestBuilderGetRequestConfiguration(RequestConfiguration[GraphMailboxProtectionUnitRequestBuilderGetQueryParameters]):
|
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,104 @@
|
|
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
|
+
|
19
|
+
class CountRequestBuilder(BaseRequestBuilder):
|
20
|
+
"""
|
21
|
+
Provides operations to count the resources in the collection.
|
22
|
+
"""
|
23
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None:
|
24
|
+
"""
|
25
|
+
Instantiates a new CountRequestBuilder and sets the default values.
|
26
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
27
|
+
param request_adapter: The request adapter to use to execute the requests.
|
28
|
+
Returns: None
|
29
|
+
"""
|
30
|
+
super().__init__(request_adapter, "{+baseurl}/solutions/backupRestore/protectionUnits/graph.siteProtectionUnit/$count{?%24filter,%24search}", path_parameters)
|
31
|
+
|
32
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]:
|
33
|
+
"""
|
34
|
+
Get the number of the resource
|
35
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
36
|
+
Returns: Optional[int]
|
37
|
+
"""
|
38
|
+
request_info = self.to_get_request_information(
|
39
|
+
request_configuration
|
40
|
+
)
|
41
|
+
from ......models.o_data_errors.o_data_error import ODataError
|
42
|
+
|
43
|
+
error_mapping: dict[str, type[ParsableFactory]] = {
|
44
|
+
"XXX": ODataError,
|
45
|
+
}
|
46
|
+
if not self.request_adapter:
|
47
|
+
raise Exception("Http core is null")
|
48
|
+
return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping)
|
49
|
+
|
50
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
51
|
+
"""
|
52
|
+
Get the number of the resource
|
53
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
54
|
+
Returns: RequestInformation
|
55
|
+
"""
|
56
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
57
|
+
request_info.configure(request_configuration)
|
58
|
+
request_info.headers.try_add("Accept", "text/plain;q=0.9")
|
59
|
+
return request_info
|
60
|
+
|
61
|
+
def with_url(self,raw_url: str) -> CountRequestBuilder:
|
62
|
+
"""
|
63
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
64
|
+
param raw_url: The raw URL to use for the request builder.
|
65
|
+
Returns: CountRequestBuilder
|
66
|
+
"""
|
67
|
+
if raw_url is None:
|
68
|
+
raise TypeError("raw_url cannot be null.")
|
69
|
+
return CountRequestBuilder(self.request_adapter, raw_url)
|
70
|
+
|
71
|
+
@dataclass
|
72
|
+
class CountRequestBuilderGetQueryParameters():
|
73
|
+
"""
|
74
|
+
Get the number of the resource
|
75
|
+
"""
|
76
|
+
def get_query_parameter(self,original_name: str) -> str:
|
77
|
+
"""
|
78
|
+
Maps the query parameters names to their encoded names for the URI template parsing.
|
79
|
+
param original_name: The original query parameter name in the class.
|
80
|
+
Returns: str
|
81
|
+
"""
|
82
|
+
if original_name is None:
|
83
|
+
raise TypeError("original_name cannot be null.")
|
84
|
+
if original_name == "filter":
|
85
|
+
return "%24filter"
|
86
|
+
if original_name == "search":
|
87
|
+
return "%24search"
|
88
|
+
return original_name
|
89
|
+
|
90
|
+
# Filter items by property values
|
91
|
+
filter: Optional[str] = None
|
92
|
+
|
93
|
+
# Search items by search phrases
|
94
|
+
search: Optional[str] = None
|
95
|
+
|
96
|
+
|
97
|
+
@dataclass
|
98
|
+
class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]):
|
99
|
+
"""
|
100
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
101
|
+
"""
|
102
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
103
|
+
|
104
|
+
|
@@ -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
|
+
|