msgraph-sdk 1.14.0__py3-none-any.whl → 1.15.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/app_catalogs/teams_apps/teams_apps_request_builder.py +3 -3
- msgraph/generated/chats/item/members/item/conversation_member_item_request_builder.py +4 -4
- msgraph/generated/communications/calls/item/participants/invite/invite_request_builder.py +3 -3
- msgraph/generated/device_app_management/device_app_management_request_builder.py +1 -1
- 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/item/target_apps/target_apps_request_builder.py +1 -1
- 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/applied_policies/item/target_apps/target_apps_request_builder.py +1 -1
- msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.py +1 -1
- msgraph/generated/device_app_management/managed_app_registrations/item/managed_app_registration_item_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 +10 -10
- 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_app_configurations/mobile_app_configurations_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 +3 -3
- msgraph/generated/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.py +10 -10
- msgraph/generated/device_management/device_configurations/device_configurations_request_builder.py +3 -3
- msgraph/generated/device_management/device_configurations/item/device_configuration_item_request_builder.py +7 -7
- msgraph/generated/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.py +3 -3
- msgraph/generated/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.py +6 -6
- msgraph/generated/device_management/device_management_request_builder.py +2 -2
- msgraph/generated/device_management/role_definitions/item/role_definition_item_request_builder.py +3 -3
- msgraph/generated/drives/item/items/item/discard_checkout/discard_checkout_request_builder.py +78 -0
- msgraph/generated/drives/item/items/item/drive_item_item_request_builder.py +10 -0
- msgraph/generated/drives/item/items/item/retention_label/retention_label_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/tables/add/add_request_builder.py +3 -3
- msgraph/generated/external/connections/item/items/item/external_item_item_request_builder.py +3 -3
- msgraph/generated/groups/groups_request_builder.py +3 -3
- msgraph/generated/groups/item/assign_license/assign_license_request_builder.py +2 -2
- msgraph/generated/groups/item/conversations/conversations_request_builder.py +3 -3
- msgraph/generated/groups/item/conversations/item/conversation_item_request_builder.py +1 -1
- msgraph/generated/groups/item/group_item_request_builder.py +2 -2
- msgraph/generated/groups/item/renew/renew_request_builder.py +2 -2
- 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/groups_with_unique_name/groups_with_unique_name_request_builder.py +2 -2
- msgraph/generated/identity/conditional_access/named_locations/item/named_location_item_request_builder.py +10 -10
- 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/identity_governance/terms_of_use/agreements/item/agreement_item_request_builder.py +4 -4
- msgraph/generated/information_protection/bitlocker/recovery_keys/recovery_keys_request_builder.py +3 -3
- msgraph/generated/kiota-dom-export.txt +989 -0
- msgraph/generated/kiota-lock.json +2 -2
- msgraph/generated/models/administrative_unit.py +1 -1
- msgraph/generated/models/app_role_assignment.py +2 -2
- msgraph/generated/models/application.py +1 -1
- msgraph/generated/models/base_item.py +16 -0
- msgraph/generated/models/conditional_access_client_applications.py +1 -1
- msgraph/generated/models/conditional_access_condition_set.py +2 -2
- msgraph/generated/models/device.py +1 -1
- msgraph/generated/models/eligibility_filtering_enabled_entities.py +9 -0
- msgraph/generated/models/entity.py +16 -0
- msgraph/generated/models/file_storage.py +4 -0
- msgraph/generated/models/file_storage_container.py +16 -0
- msgraph/generated/models/file_storage_container_settings.py +8 -0
- msgraph/generated/models/internal_domain_federation.py +4 -0
- msgraph/generated/models/open_shift.py +7 -3
- msgraph/generated/models/org_contact.py +1 -1
- msgraph/generated/models/recycle_bin.py +70 -0
- msgraph/generated/models/recycle_bin_item.py +67 -0
- msgraph/generated/models/recycle_bin_item_collection_response.py +60 -0
- msgraph/generated/models/recycle_bin_settings.py +53 -0
- msgraph/generated/models/security/data_set.py +4 -0
- msgraph/generated/models/service_principal.py +1 -1
- msgraph/generated/models/shift.py +4 -0
- msgraph/generated/models/shift_activity.py +2 -2
- msgraph/generated/models/site_lock_state.py +9 -0
- msgraph/generated/models/time_off.py +5 -1
- msgraph/generated/models/user.py +1 -1
- msgraph/generated/models/workforce_integration.py +9 -1
- msgraph/generated/models/workforce_integration_supported_entities.py +3 -0
- msgraph/generated/models/x509_certificate_authentication_method_configuration.py +8 -0
- msgraph/generated/models/x509_certificate_c_r_l_validation_configuration.py +66 -0
- msgraph/generated/models/x509_certificate_c_r_l_validation_configuration_state.py +7 -0
- msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py +3 -3
- msgraph/generated/organization/item/organization_item_request_builder.py +4 -4
- msgraph/generated/security/attack_simulation/payloads/item/payload_item_request_builder.py +4 -3
- msgraph/generated/storage/file_storage/containers/item/file_storage_container_item_request_builder.py +40 -0
- msgraph/generated/storage/file_storage/containers/item/lock/lock_post_request_body.py +58 -0
- msgraph/generated/storage/file_storage/containers/item/lock/lock_request_builder.py +85 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/created_by_user/created_by_user_request_builder.py +126 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +151 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/created_by_user/service_provisioning_errors/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py +146 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/created_by_user/created_by_user_request_builder.py +126 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +151 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py +146 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/last_modified_by_user/last_modified_by_user_request_builder.py +126 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +151 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py +146 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/item/recycle_bin_item_item_request_builder.py +207 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/items/items_request_builder.py +207 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/last_modified_by_user/last_modified_by_user_request_builder.py +126 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +151 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py +146 -0
- msgraph/generated/storage/file_storage/containers/item/recycle_bin/recycle_bin_request_builder.py +217 -0
- msgraph/generated/storage/file_storage/containers/item/restore/restore_request_builder.py +80 -0
- msgraph/generated/storage/file_storage/containers/item/unlock/unlock_request_builder.py +77 -0
- msgraph/generated/storage/file_storage/deleted_containers/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/deleted_containers/deleted_containers_request_builder.py +207 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/activate/activate_request_builder.py +77 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/drive/drive_request_builder.py +106 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/file_storage_container_item_request_builder.py +267 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/lock/lock_post_request_body.py +58 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/lock/lock_request_builder.py +85 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/permanent_delete/permanent_delete_request_builder.py +77 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/permissions/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/permissions/item/grant/grant_post_request_body.py +62 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/permissions/item/grant/grant_post_response.py +60 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/permissions/item/grant/grant_request_builder.py +89 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/permissions/item/permission_item_request_builder.py +197 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/permissions/permissions_request_builder.py +207 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/created_by_user/created_by_user_request_builder.py +126 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +151 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/created_by_user/service_provisioning_errors/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py +146 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/created_by_user/created_by_user_request_builder.py +126 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py +151 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py +146 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/last_modified_by_user/last_modified_by_user_request_builder.py +126 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +151 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py +146 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/item/recycle_bin_item_item_request_builder.py +207 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/items/items_request_builder.py +207 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/last_modified_by_user/last_modified_by_user_request_builder.py +126 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py +151 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py +103 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py +146 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/recycle_bin/recycle_bin_request_builder.py +217 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/restore/restore_request_builder.py +80 -0
- msgraph/generated/storage/file_storage/deleted_containers/item/unlock/unlock_request_builder.py +77 -0
- msgraph/generated/storage/file_storage/file_storage_request_builder.py +10 -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/users/item/presence/presence_request_builder.py +4 -4
- msgraph/generated/users/item/user_item_request_builder.py +2 -2
- msgraph/generated/users/users_request_builder.py +5 -5
- msgraph/generated/users_with_user_principal_name/users_with_user_principal_name_request_builder.py +2 -2
- {msgraph_sdk-1.14.0.dist-info → msgraph_sdk-1.15.0.dist-info}/METADATA +1 -1
- {msgraph_sdk-1.14.0.dist-info → msgraph_sdk-1.15.0.dist-info}/RECORD +155 -86
- {msgraph_sdk-1.14.0.dist-info → msgraph_sdk-1.15.0.dist-info}/LICENSE +0 -0
- {msgraph_sdk-1.14.0.dist-info → msgraph_sdk-1.15.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
from dataclasses import dataclass, field
|
3
|
+
from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter
|
4
|
+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
|
5
|
+
|
6
|
+
if TYPE_CHECKING:
|
7
|
+
from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
|
8
|
+
from ........models.permission import Permission
|
9
|
+
|
10
|
+
from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
|
11
|
+
|
12
|
+
@dataclass
|
13
|
+
class GrantPostResponse(BaseCollectionPaginationCountResponse, Parsable):
|
14
|
+
# The value property
|
15
|
+
value: Optional[List[Permission]] = None
|
16
|
+
|
17
|
+
@staticmethod
|
18
|
+
def create_from_discriminator_value(parse_node: ParseNode) -> GrantPostResponse:
|
19
|
+
"""
|
20
|
+
Creates a new instance of the appropriate class based on discriminator value
|
21
|
+
param parse_node: The parse node to use to read the discriminator value and create the object
|
22
|
+
Returns: GrantPostResponse
|
23
|
+
"""
|
24
|
+
if parse_node is None:
|
25
|
+
raise TypeError("parse_node cannot be null.")
|
26
|
+
return GrantPostResponse()
|
27
|
+
|
28
|
+
def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]:
|
29
|
+
"""
|
30
|
+
The deserialization information for the current model
|
31
|
+
Returns: Dict[str, Callable[[ParseNode], None]]
|
32
|
+
"""
|
33
|
+
from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
|
34
|
+
from ........models.permission import Permission
|
35
|
+
|
36
|
+
from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
|
37
|
+
from ........models.permission import Permission
|
38
|
+
|
39
|
+
fields: Dict[str, Callable[[Any], None]] = {
|
40
|
+
"value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Permission)),
|
41
|
+
}
|
42
|
+
super_fields = super().get_field_deserializers()
|
43
|
+
fields.update(super_fields)
|
44
|
+
return fields
|
45
|
+
|
46
|
+
def serialize(self,writer: SerializationWriter) -> None:
|
47
|
+
"""
|
48
|
+
Serializes information the current object
|
49
|
+
param writer: Serialization writer to use to serialize this model
|
50
|
+
Returns: None
|
51
|
+
"""
|
52
|
+
if writer is None:
|
53
|
+
raise TypeError("writer cannot be null.")
|
54
|
+
super().serialize(writer)
|
55
|
+
from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse
|
56
|
+
from ........models.permission import Permission
|
57
|
+
|
58
|
+
writer.write_collection_of_object_values("value", self.value)
|
59
|
+
|
60
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
from dataclasses import dataclass, field
|
3
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
4
|
+
from kiota_abstractions.base_request_configuration import RequestConfiguration
|
5
|
+
from kiota_abstractions.default_query_parameters import QueryParameters
|
6
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
7
|
+
from kiota_abstractions.method import Method
|
8
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
9
|
+
from kiota_abstractions.request_information import RequestInformation
|
10
|
+
from kiota_abstractions.request_option import RequestOption
|
11
|
+
from kiota_abstractions.serialization import Parsable, ParsableFactory
|
12
|
+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
|
13
|
+
from warnings import warn
|
14
|
+
|
15
|
+
if TYPE_CHECKING:
|
16
|
+
from ........models.o_data_errors.o_data_error import ODataError
|
17
|
+
from .grant_post_request_body import GrantPostRequestBody
|
18
|
+
from .grant_post_response import GrantPostResponse
|
19
|
+
|
20
|
+
class GrantRequestBuilder(BaseRequestBuilder):
|
21
|
+
"""
|
22
|
+
Provides operations to call the grant method.
|
23
|
+
"""
|
24
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
|
25
|
+
"""
|
26
|
+
Instantiates a new GrantRequestBuilder 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}/storage/fileStorage/deletedContainers/{fileStorageContainer%2Did}/permissions/{permission%2Did}/grant", path_parameters)
|
32
|
+
|
33
|
+
async def post(self,body: GrantPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[GrantPostResponse]:
|
34
|
+
"""
|
35
|
+
Grant users access to a link represented by a permission.
|
36
|
+
param body: The request body
|
37
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
38
|
+
Returns: Optional[GrantPostResponse]
|
39
|
+
Find more info here: https://learn.microsoft.com/graph/api/permission-grant?view=graph-rest-1.0
|
40
|
+
"""
|
41
|
+
if body is None:
|
42
|
+
raise TypeError("body cannot be null.")
|
43
|
+
request_info = self.to_post_request_information(
|
44
|
+
body, request_configuration
|
45
|
+
)
|
46
|
+
from ........models.o_data_errors.o_data_error import ODataError
|
47
|
+
|
48
|
+
error_mapping: Dict[str, type[ParsableFactory]] = {
|
49
|
+
"XXX": ODataError,
|
50
|
+
}
|
51
|
+
if not self.request_adapter:
|
52
|
+
raise Exception("Http core is null")
|
53
|
+
from .grant_post_response import GrantPostResponse
|
54
|
+
|
55
|
+
return await self.request_adapter.send_async(request_info, GrantPostResponse, error_mapping)
|
56
|
+
|
57
|
+
def to_post_request_information(self,body: GrantPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
58
|
+
"""
|
59
|
+
Grant users access to a link represented by a permission.
|
60
|
+
param body: The request body
|
61
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
62
|
+
Returns: RequestInformation
|
63
|
+
"""
|
64
|
+
if body is None:
|
65
|
+
raise TypeError("body cannot be null.")
|
66
|
+
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
|
67
|
+
request_info.configure(request_configuration)
|
68
|
+
request_info.headers.try_add("Accept", "application/json")
|
69
|
+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
|
70
|
+
return request_info
|
71
|
+
|
72
|
+
def with_url(self,raw_url: str) -> GrantRequestBuilder:
|
73
|
+
"""
|
74
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
75
|
+
param raw_url: The raw URL to use for the request builder.
|
76
|
+
Returns: GrantRequestBuilder
|
77
|
+
"""
|
78
|
+
if raw_url is None:
|
79
|
+
raise TypeError("raw_url cannot be null.")
|
80
|
+
return GrantRequestBuilder(self.request_adapter, raw_url)
|
81
|
+
|
82
|
+
@dataclass
|
83
|
+
class GrantRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]):
|
84
|
+
"""
|
85
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
86
|
+
"""
|
87
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
88
|
+
|
89
|
+
|
@@ -0,0 +1,197 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
from dataclasses import dataclass, field
|
3
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
4
|
+
from kiota_abstractions.base_request_configuration import RequestConfiguration
|
5
|
+
from kiota_abstractions.default_query_parameters import QueryParameters
|
6
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
7
|
+
from kiota_abstractions.method import Method
|
8
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
9
|
+
from kiota_abstractions.request_information import RequestInformation
|
10
|
+
from kiota_abstractions.request_option import RequestOption
|
11
|
+
from kiota_abstractions.serialization import Parsable, ParsableFactory
|
12
|
+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
|
13
|
+
from warnings import warn
|
14
|
+
|
15
|
+
if TYPE_CHECKING:
|
16
|
+
from .......models.o_data_errors.o_data_error import ODataError
|
17
|
+
from .......models.permission import Permission
|
18
|
+
from .grant.grant_request_builder import GrantRequestBuilder
|
19
|
+
|
20
|
+
class PermissionItemRequestBuilder(BaseRequestBuilder):
|
21
|
+
"""
|
22
|
+
Provides operations to manage the permissions property of the microsoft.graph.fileStorageContainer entity.
|
23
|
+
"""
|
24
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
|
25
|
+
"""
|
26
|
+
Instantiates a new PermissionItemRequestBuilder 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}/storage/fileStorage/deletedContainers/{fileStorageContainer%2Did}/permissions/{permission%2Did}{?%24expand,%24select}", path_parameters)
|
32
|
+
|
33
|
+
async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
|
34
|
+
"""
|
35
|
+
Delete navigation property permissions for storage
|
36
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
37
|
+
Returns: None
|
38
|
+
"""
|
39
|
+
request_info = self.to_delete_request_information(
|
40
|
+
request_configuration
|
41
|
+
)
|
42
|
+
from .......models.o_data_errors.o_data_error import ODataError
|
43
|
+
|
44
|
+
error_mapping: Dict[str, type[ParsableFactory]] = {
|
45
|
+
"XXX": ODataError,
|
46
|
+
}
|
47
|
+
if not self.request_adapter:
|
48
|
+
raise Exception("Http core is null")
|
49
|
+
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)
|
50
|
+
|
51
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]] = None) -> Optional[Permission]:
|
52
|
+
"""
|
53
|
+
The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are: reader, writer, manager, and owner. Read-write.
|
54
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
55
|
+
Returns: Optional[Permission]
|
56
|
+
"""
|
57
|
+
request_info = self.to_get_request_information(
|
58
|
+
request_configuration
|
59
|
+
)
|
60
|
+
from .......models.o_data_errors.o_data_error import ODataError
|
61
|
+
|
62
|
+
error_mapping: Dict[str, type[ParsableFactory]] = {
|
63
|
+
"XXX": ODataError,
|
64
|
+
}
|
65
|
+
if not self.request_adapter:
|
66
|
+
raise Exception("Http core is null")
|
67
|
+
from .......models.permission import Permission
|
68
|
+
|
69
|
+
return await self.request_adapter.send_async(request_info, Permission, error_mapping)
|
70
|
+
|
71
|
+
async def patch(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Permission]:
|
72
|
+
"""
|
73
|
+
Update the navigation property permissions in storage
|
74
|
+
param body: The request body
|
75
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
76
|
+
Returns: Optional[Permission]
|
77
|
+
"""
|
78
|
+
if body is None:
|
79
|
+
raise TypeError("body cannot be null.")
|
80
|
+
request_info = self.to_patch_request_information(
|
81
|
+
body, request_configuration
|
82
|
+
)
|
83
|
+
from .......models.o_data_errors.o_data_error import ODataError
|
84
|
+
|
85
|
+
error_mapping: Dict[str, type[ParsableFactory]] = {
|
86
|
+
"XXX": ODataError,
|
87
|
+
}
|
88
|
+
if not self.request_adapter:
|
89
|
+
raise Exception("Http core is null")
|
90
|
+
from .......models.permission import Permission
|
91
|
+
|
92
|
+
return await self.request_adapter.send_async(request_info, Permission, error_mapping)
|
93
|
+
|
94
|
+
def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
95
|
+
"""
|
96
|
+
Delete navigation property permissions for storage
|
97
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
98
|
+
Returns: RequestInformation
|
99
|
+
"""
|
100
|
+
request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters)
|
101
|
+
request_info.configure(request_configuration)
|
102
|
+
request_info.headers.try_add("Accept", "application/json")
|
103
|
+
return request_info
|
104
|
+
|
105
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
106
|
+
"""
|
107
|
+
The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are: reader, writer, manager, and owner. Read-write.
|
108
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
109
|
+
Returns: RequestInformation
|
110
|
+
"""
|
111
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
112
|
+
request_info.configure(request_configuration)
|
113
|
+
request_info.headers.try_add("Accept", "application/json")
|
114
|
+
return request_info
|
115
|
+
|
116
|
+
def to_patch_request_information(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
117
|
+
"""
|
118
|
+
Update the navigation property permissions in storage
|
119
|
+
param body: The request body
|
120
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
121
|
+
Returns: RequestInformation
|
122
|
+
"""
|
123
|
+
if body is None:
|
124
|
+
raise TypeError("body cannot be null.")
|
125
|
+
request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters)
|
126
|
+
request_info.configure(request_configuration)
|
127
|
+
request_info.headers.try_add("Accept", "application/json")
|
128
|
+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
|
129
|
+
return request_info
|
130
|
+
|
131
|
+
def with_url(self,raw_url: str) -> PermissionItemRequestBuilder:
|
132
|
+
"""
|
133
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
134
|
+
param raw_url: The raw URL to use for the request builder.
|
135
|
+
Returns: PermissionItemRequestBuilder
|
136
|
+
"""
|
137
|
+
if raw_url is None:
|
138
|
+
raise TypeError("raw_url cannot be null.")
|
139
|
+
return PermissionItemRequestBuilder(self.request_adapter, raw_url)
|
140
|
+
|
141
|
+
@property
|
142
|
+
def grant(self) -> GrantRequestBuilder:
|
143
|
+
"""
|
144
|
+
Provides operations to call the grant method.
|
145
|
+
"""
|
146
|
+
from .grant.grant_request_builder import GrantRequestBuilder
|
147
|
+
|
148
|
+
return GrantRequestBuilder(self.request_adapter, self.path_parameters)
|
149
|
+
|
150
|
+
@dataclass
|
151
|
+
class PermissionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]):
|
152
|
+
"""
|
153
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
154
|
+
"""
|
155
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
156
|
+
|
157
|
+
@dataclass
|
158
|
+
class PermissionItemRequestBuilderGetQueryParameters():
|
159
|
+
"""
|
160
|
+
The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are: reader, writer, manager, and owner. Read-write.
|
161
|
+
"""
|
162
|
+
def get_query_parameter(self,original_name: str) -> str:
|
163
|
+
"""
|
164
|
+
Maps the query parameters names to their encoded names for the URI template parsing.
|
165
|
+
param original_name: The original query parameter name in the class.
|
166
|
+
Returns: str
|
167
|
+
"""
|
168
|
+
if original_name is None:
|
169
|
+
raise TypeError("original_name cannot be null.")
|
170
|
+
if original_name == "expand":
|
171
|
+
return "%24expand"
|
172
|
+
if original_name == "select":
|
173
|
+
return "%24select"
|
174
|
+
return original_name
|
175
|
+
|
176
|
+
# Expand related entities
|
177
|
+
expand: Optional[List[str]] = None
|
178
|
+
|
179
|
+
# Select properties to be returned
|
180
|
+
select: Optional[List[str]] = None
|
181
|
+
|
182
|
+
|
183
|
+
@dataclass
|
184
|
+
class PermissionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]):
|
185
|
+
"""
|
186
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
187
|
+
"""
|
188
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
189
|
+
|
190
|
+
@dataclass
|
191
|
+
class PermissionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]):
|
192
|
+
"""
|
193
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
194
|
+
"""
|
195
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
196
|
+
|
197
|
+
|
@@ -0,0 +1,207 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
from dataclasses import dataclass, field
|
3
|
+
from kiota_abstractions.base_request_builder import BaseRequestBuilder
|
4
|
+
from kiota_abstractions.base_request_configuration import RequestConfiguration
|
5
|
+
from kiota_abstractions.default_query_parameters import QueryParameters
|
6
|
+
from kiota_abstractions.get_path_parameters import get_path_parameters
|
7
|
+
from kiota_abstractions.method import Method
|
8
|
+
from kiota_abstractions.request_adapter import RequestAdapter
|
9
|
+
from kiota_abstractions.request_information import RequestInformation
|
10
|
+
from kiota_abstractions.request_option import RequestOption
|
11
|
+
from kiota_abstractions.serialization import Parsable, ParsableFactory
|
12
|
+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
|
13
|
+
from warnings import warn
|
14
|
+
|
15
|
+
if TYPE_CHECKING:
|
16
|
+
from ......models.o_data_errors.o_data_error import ODataError
|
17
|
+
from ......models.permission import Permission
|
18
|
+
from ......models.permission_collection_response import PermissionCollectionResponse
|
19
|
+
from .count.count_request_builder import CountRequestBuilder
|
20
|
+
from .item.permission_item_request_builder import PermissionItemRequestBuilder
|
21
|
+
|
22
|
+
class PermissionsRequestBuilder(BaseRequestBuilder):
|
23
|
+
"""
|
24
|
+
Provides operations to manage the permissions property of the microsoft.graph.fileStorageContainer entity.
|
25
|
+
"""
|
26
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
|
27
|
+
"""
|
28
|
+
Instantiates a new PermissionsRequestBuilder and sets the default values.
|
29
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
30
|
+
param request_adapter: The request adapter to use to execute the requests.
|
31
|
+
Returns: None
|
32
|
+
"""
|
33
|
+
super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/deletedContainers/{fileStorageContainer%2Did}/permissions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
|
34
|
+
|
35
|
+
def by_permission_id(self,permission_id: str) -> PermissionItemRequestBuilder:
|
36
|
+
"""
|
37
|
+
Provides operations to manage the permissions property of the microsoft.graph.fileStorageContainer entity.
|
38
|
+
param permission_id: The unique identifier of permission
|
39
|
+
Returns: PermissionItemRequestBuilder
|
40
|
+
"""
|
41
|
+
if permission_id is None:
|
42
|
+
raise TypeError("permission_id cannot be null.")
|
43
|
+
from .item.permission_item_request_builder import PermissionItemRequestBuilder
|
44
|
+
|
45
|
+
url_tpl_params = get_path_parameters(self.path_parameters)
|
46
|
+
url_tpl_params["permission%2Did"] = permission_id
|
47
|
+
return PermissionItemRequestBuilder(self.request_adapter, url_tpl_params)
|
48
|
+
|
49
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]] = None) -> Optional[PermissionCollectionResponse]:
|
50
|
+
"""
|
51
|
+
The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are: reader, writer, manager, and owner. Read-write.
|
52
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
53
|
+
Returns: Optional[PermissionCollectionResponse]
|
54
|
+
"""
|
55
|
+
request_info = self.to_get_request_information(
|
56
|
+
request_configuration
|
57
|
+
)
|
58
|
+
from ......models.o_data_errors.o_data_error import ODataError
|
59
|
+
|
60
|
+
error_mapping: Dict[str, type[ParsableFactory]] = {
|
61
|
+
"XXX": ODataError,
|
62
|
+
}
|
63
|
+
if not self.request_adapter:
|
64
|
+
raise Exception("Http core is null")
|
65
|
+
from ......models.permission_collection_response import PermissionCollectionResponse
|
66
|
+
|
67
|
+
return await self.request_adapter.send_async(request_info, PermissionCollectionResponse, error_mapping)
|
68
|
+
|
69
|
+
async def post(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Permission]:
|
70
|
+
"""
|
71
|
+
Create new navigation property to permissions for storage
|
72
|
+
param body: The request body
|
73
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
74
|
+
Returns: Optional[Permission]
|
75
|
+
"""
|
76
|
+
if body is None:
|
77
|
+
raise TypeError("body cannot be null.")
|
78
|
+
request_info = self.to_post_request_information(
|
79
|
+
body, request_configuration
|
80
|
+
)
|
81
|
+
from ......models.o_data_errors.o_data_error import ODataError
|
82
|
+
|
83
|
+
error_mapping: Dict[str, type[ParsableFactory]] = {
|
84
|
+
"XXX": ODataError,
|
85
|
+
}
|
86
|
+
if not self.request_adapter:
|
87
|
+
raise Exception("Http core is null")
|
88
|
+
from ......models.permission import Permission
|
89
|
+
|
90
|
+
return await self.request_adapter.send_async(request_info, Permission, error_mapping)
|
91
|
+
|
92
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
93
|
+
"""
|
94
|
+
The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are: reader, writer, manager, and owner. Read-write.
|
95
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
96
|
+
Returns: RequestInformation
|
97
|
+
"""
|
98
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
99
|
+
request_info.configure(request_configuration)
|
100
|
+
request_info.headers.try_add("Accept", "application/json")
|
101
|
+
return request_info
|
102
|
+
|
103
|
+
def to_post_request_information(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
104
|
+
"""
|
105
|
+
Create new navigation property to permissions for storage
|
106
|
+
param body: The request body
|
107
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
108
|
+
Returns: RequestInformation
|
109
|
+
"""
|
110
|
+
if body is None:
|
111
|
+
raise TypeError("body cannot be null.")
|
112
|
+
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
|
113
|
+
request_info.configure(request_configuration)
|
114
|
+
request_info.headers.try_add("Accept", "application/json")
|
115
|
+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
|
116
|
+
return request_info
|
117
|
+
|
118
|
+
def with_url(self,raw_url: str) -> PermissionsRequestBuilder:
|
119
|
+
"""
|
120
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
121
|
+
param raw_url: The raw URL to use for the request builder.
|
122
|
+
Returns: PermissionsRequestBuilder
|
123
|
+
"""
|
124
|
+
if raw_url is None:
|
125
|
+
raise TypeError("raw_url cannot be null.")
|
126
|
+
return PermissionsRequestBuilder(self.request_adapter, raw_url)
|
127
|
+
|
128
|
+
@property
|
129
|
+
def count(self) -> CountRequestBuilder:
|
130
|
+
"""
|
131
|
+
Provides operations to count the resources in the collection.
|
132
|
+
"""
|
133
|
+
from .count.count_request_builder import CountRequestBuilder
|
134
|
+
|
135
|
+
return CountRequestBuilder(self.request_adapter, self.path_parameters)
|
136
|
+
|
137
|
+
@dataclass
|
138
|
+
class PermissionsRequestBuilderGetQueryParameters():
|
139
|
+
"""
|
140
|
+
The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are: reader, writer, manager, and owner. Read-write.
|
141
|
+
"""
|
142
|
+
def get_query_parameter(self,original_name: str) -> str:
|
143
|
+
"""
|
144
|
+
Maps the query parameters names to their encoded names for the URI template parsing.
|
145
|
+
param original_name: The original query parameter name in the class.
|
146
|
+
Returns: str
|
147
|
+
"""
|
148
|
+
if original_name is None:
|
149
|
+
raise TypeError("original_name cannot be null.")
|
150
|
+
if original_name == "count":
|
151
|
+
return "%24count"
|
152
|
+
if original_name == "expand":
|
153
|
+
return "%24expand"
|
154
|
+
if original_name == "filter":
|
155
|
+
return "%24filter"
|
156
|
+
if original_name == "orderby":
|
157
|
+
return "%24orderby"
|
158
|
+
if original_name == "search":
|
159
|
+
return "%24search"
|
160
|
+
if original_name == "select":
|
161
|
+
return "%24select"
|
162
|
+
if original_name == "skip":
|
163
|
+
return "%24skip"
|
164
|
+
if original_name == "top":
|
165
|
+
return "%24top"
|
166
|
+
return original_name
|
167
|
+
|
168
|
+
# Include count of items
|
169
|
+
count: Optional[bool] = None
|
170
|
+
|
171
|
+
# Expand related entities
|
172
|
+
expand: Optional[List[str]] = None
|
173
|
+
|
174
|
+
# Filter items by property values
|
175
|
+
filter: Optional[str] = None
|
176
|
+
|
177
|
+
# Order items by property values
|
178
|
+
orderby: Optional[List[str]] = None
|
179
|
+
|
180
|
+
# Search items by search phrases
|
181
|
+
search: Optional[str] = None
|
182
|
+
|
183
|
+
# Select properties to be returned
|
184
|
+
select: Optional[List[str]] = None
|
185
|
+
|
186
|
+
# Skip the first n items
|
187
|
+
skip: Optional[int] = None
|
188
|
+
|
189
|
+
# Show only the first n items
|
190
|
+
top: Optional[int] = None
|
191
|
+
|
192
|
+
|
193
|
+
@dataclass
|
194
|
+
class PermissionsRequestBuilderGetRequestConfiguration(RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]):
|
195
|
+
"""
|
196
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
197
|
+
"""
|
198
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
199
|
+
|
200
|
+
@dataclass
|
201
|
+
class PermissionsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]):
|
202
|
+
"""
|
203
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
204
|
+
"""
|
205
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
206
|
+
|
207
|
+
|