msgraph-sdk 1.13.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/messages/messages_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/managed_app_registrations_request_builder.py +4 -4
- msgraph/generated/device_app_management/managed_app_statuses/managed_app_statuses_request_builder.py +4 -4
- msgraph/generated/device_app_management/managed_e_books/item/assignments/assignments_request_builder.py +7 -7
- msgraph/generated/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.py +7 -7
- msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_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 +6 -6
- 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 +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 +10 -10
- msgraph/generated/device_management/role_definitions/role_definitions_request_builder.py +7 -7
- 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/external/connections/item/items/item/external_item_item_request_builder.py +3 -3
- msgraph/generated/groups/item/assign_license/assign_license_request_builder.py +2 -2
- msgraph/generated/groups/item/conversations/item/conversation_item_request_builder.py +4 -4
- 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 +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 +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/information_protection/bitlocker/recovery_keys/recovery_keys_request_builder.py +3 -3
- msgraph/generated/kiota-dom-export.txt +1259 -0
- msgraph/generated/kiota-lock.json +2 -2
- msgraph/generated/models/administrative_unit.py +1 -1
- msgraph/generated/models/app_management_restriction_state.py +7 -0
- 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_authentication_flows.py +62 -0
- msgraph/generated/models/conditional_access_client_applications.py +1 -1
- msgraph/generated/models/conditional_access_condition_set.py +9 -1
- msgraph/generated/models/conditional_access_transfer_methods.py +8 -0
- msgraph/generated/models/device.py +1 -1
- msgraph/generated/models/eligibility_filtering_enabled_entities.py +9 -0
- msgraph/generated/models/entity.py +32 -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/key_credential_configuration.py +8 -0
- msgraph/generated/models/open_shift.py +7 -3
- msgraph/generated/models/org_contact.py +1 -1
- msgraph/generated/models/password_credential_configuration.py +8 -0
- 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/security/deployment_access_key_type.py +53 -0
- msgraph/generated/models/security/deployment_status.py +14 -0
- msgraph/generated/models/security/evidence_remediation_status.py +6 -0
- msgraph/generated/models/security/identity_container.py +8 -0
- msgraph/generated/models/security/network_adapter.py +62 -0
- msgraph/generated/models/security/sensor.py +115 -0
- msgraph/generated/models/security/sensor_collection_response.py +60 -0
- msgraph/generated/models/security/sensor_deployment_package.py +57 -0
- msgraph/generated/models/security/sensor_health_status.py +9 -0
- msgraph/generated/models/security/sensor_settings.py +74 -0
- msgraph/generated/models/security/sensor_type.py +10 -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/organization_request_builder.py +4 -4
- msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py +3 -3
- msgraph/generated/security/attack_simulation/payloads/item/payload_item_request_builder.py +4 -3
- msgraph/generated/security/cases/ediscovery_cases/item/custodians/item/microsoft_graph_security_apply_hold/microsoft_graph_security_apply_hold_request_builder.py +2 -2
- msgraph/generated/security/identities/identities_request_builder.py +10 -0
- msgraph/generated/security/identities/sensors/count/count_request_builder.py +103 -0
- msgraph/generated/security/identities/sensors/item/health_issues/count/count_request_builder.py +103 -0
- msgraph/generated/security/identities/sensors/item/health_issues/health_issues_request_builder.py +161 -0
- msgraph/generated/security/identities/sensors/item/health_issues/item/health_issue_item_request_builder.py +106 -0
- msgraph/generated/security/identities/sensors/item/sensor_item_request_builder.py +200 -0
- msgraph/generated/security/identities/sensors/microsoft_graph_security_get_deployment_access_key/microsoft_graph_security_get_deployment_access_key_request_builder.py +80 -0
- msgraph/generated/security/identities/sensors/microsoft_graph_security_get_deployment_package_uri/microsoft_graph_security_get_deployment_package_uri_request_builder.py +80 -0
- msgraph/generated/security/identities/sensors/microsoft_graph_security_regenerate_deployment_access_key/microsoft_graph_security_regenerate_deployment_access_key_request_builder.py +80 -0
- msgraph/generated/security/identities/sensors/sensors_request_builder.py +238 -0
- msgraph/generated/solutions/virtual_events/townhalls/item/virtual_event_townhall_item_request_builder.py +5 -5
- msgraph/generated/solutions/virtual_events/townhalls/townhalls_request_builder.py +3 -3
- msgraph/generated/solutions/virtual_events/webinars/item/virtual_event_webinar_item_request_builder.py +5 -5
- 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/messages/messages_request_builder.py +3 -3
- msgraph/generated/users/item/authentication/email_methods/email_methods_request_builder.py +2 -2
- msgraph/generated/users/item/authentication/email_methods/item/email_authentication_method_item_request_builder.py +2 -2
- msgraph/generated/users/item/authentication/microsoft_authenticator_methods/item/microsoft_authenticator_authentication_method_item_request_builder.py +2 -2
- msgraph/generated/users/item/authentication/phone_methods/item/phone_authentication_method_item_request_builder.py +2 -2
- msgraph/generated/users/item/user_item_request_builder.py +8 -8
- msgraph/generated/users_with_user_principal_name/users_with_user_principal_name_request_builder.py +8 -8
- {msgraph_sdk-1.13.0.dist-info → msgraph_sdk-1.15.0.dist-info}/METADATA +1 -1
- {msgraph_sdk-1.13.0.dist-info → msgraph_sdk-1.15.0.dist-info}/RECORD +179 -89
- {msgraph_sdk-1.13.0.dist-info → msgraph_sdk-1.15.0.dist-info}/LICENSE +0 -0
- {msgraph_sdk-1.13.0.dist-info → msgraph_sdk-1.15.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,238 @@
|
|
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.security.sensor import Sensor
|
18
|
+
from ....models.security.sensor_collection_response import SensorCollectionResponse
|
19
|
+
from .count.count_request_builder import CountRequestBuilder
|
20
|
+
from .item.sensor_item_request_builder import SensorItemRequestBuilder
|
21
|
+
from .microsoft_graph_security_get_deployment_access_key.microsoft_graph_security_get_deployment_access_key_request_builder import MicrosoftGraphSecurityGetDeploymentAccessKeyRequestBuilder
|
22
|
+
from .microsoft_graph_security_get_deployment_package_uri.microsoft_graph_security_get_deployment_package_uri_request_builder import MicrosoftGraphSecurityGetDeploymentPackageUriRequestBuilder
|
23
|
+
from .microsoft_graph_security_regenerate_deployment_access_key.microsoft_graph_security_regenerate_deployment_access_key_request_builder import MicrosoftGraphSecurityRegenerateDeploymentAccessKeyRequestBuilder
|
24
|
+
|
25
|
+
class SensorsRequestBuilder(BaseRequestBuilder):
|
26
|
+
"""
|
27
|
+
Provides operations to manage the sensors property of the microsoft.graph.security.identityContainer entity.
|
28
|
+
"""
|
29
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
|
30
|
+
"""
|
31
|
+
Instantiates a new SensorsRequestBuilder and sets the default values.
|
32
|
+
param path_parameters: The raw url or the url-template parameters for the request.
|
33
|
+
param request_adapter: The request adapter to use to execute the requests.
|
34
|
+
Returns: None
|
35
|
+
"""
|
36
|
+
super().__init__(request_adapter, "{+baseurl}/security/identities/sensors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters)
|
37
|
+
|
38
|
+
def by_sensor_id(self,sensor_id: str) -> SensorItemRequestBuilder:
|
39
|
+
"""
|
40
|
+
Provides operations to manage the sensors property of the microsoft.graph.security.identityContainer entity.
|
41
|
+
param sensor_id: The unique identifier of sensor
|
42
|
+
Returns: SensorItemRequestBuilder
|
43
|
+
"""
|
44
|
+
if sensor_id is None:
|
45
|
+
raise TypeError("sensor_id cannot be null.")
|
46
|
+
from .item.sensor_item_request_builder import SensorItemRequestBuilder
|
47
|
+
|
48
|
+
url_tpl_params = get_path_parameters(self.path_parameters)
|
49
|
+
url_tpl_params["sensor%2Did"] = sensor_id
|
50
|
+
return SensorItemRequestBuilder(self.request_adapter, url_tpl_params)
|
51
|
+
|
52
|
+
async def get(self,request_configuration: Optional[RequestConfiguration[SensorsRequestBuilderGetQueryParameters]] = None) -> Optional[SensorCollectionResponse]:
|
53
|
+
"""
|
54
|
+
Get a list of sensor objects and their properties.
|
55
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
56
|
+
Returns: Optional[SensorCollectionResponse]
|
57
|
+
Find more info here: https://learn.microsoft.com/graph/api/security-identitycontainer-list-sensors?view=graph-rest-1.0
|
58
|
+
"""
|
59
|
+
request_info = self.to_get_request_information(
|
60
|
+
request_configuration
|
61
|
+
)
|
62
|
+
from ....models.o_data_errors.o_data_error import ODataError
|
63
|
+
|
64
|
+
error_mapping: Dict[str, type[ParsableFactory]] = {
|
65
|
+
"XXX": ODataError,
|
66
|
+
}
|
67
|
+
if not self.request_adapter:
|
68
|
+
raise Exception("Http core is null")
|
69
|
+
from ....models.security.sensor_collection_response import SensorCollectionResponse
|
70
|
+
|
71
|
+
return await self.request_adapter.send_async(request_info, SensorCollectionResponse, error_mapping)
|
72
|
+
|
73
|
+
async def post(self,body: Sensor, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Sensor]:
|
74
|
+
"""
|
75
|
+
Create new navigation property to sensors for security
|
76
|
+
param body: The request body
|
77
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
78
|
+
Returns: Optional[Sensor]
|
79
|
+
"""
|
80
|
+
if body is None:
|
81
|
+
raise TypeError("body cannot be null.")
|
82
|
+
request_info = self.to_post_request_information(
|
83
|
+
body, request_configuration
|
84
|
+
)
|
85
|
+
from ....models.o_data_errors.o_data_error import ODataError
|
86
|
+
|
87
|
+
error_mapping: Dict[str, type[ParsableFactory]] = {
|
88
|
+
"XXX": ODataError,
|
89
|
+
}
|
90
|
+
if not self.request_adapter:
|
91
|
+
raise Exception("Http core is null")
|
92
|
+
from ....models.security.sensor import Sensor
|
93
|
+
|
94
|
+
return await self.request_adapter.send_async(request_info, Sensor, error_mapping)
|
95
|
+
|
96
|
+
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SensorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
97
|
+
"""
|
98
|
+
Get a list of sensor objects and their properties.
|
99
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
100
|
+
Returns: RequestInformation
|
101
|
+
"""
|
102
|
+
request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters)
|
103
|
+
request_info.configure(request_configuration)
|
104
|
+
request_info.headers.try_add("Accept", "application/json")
|
105
|
+
return request_info
|
106
|
+
|
107
|
+
def to_post_request_information(self,body: Sensor, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
108
|
+
"""
|
109
|
+
Create new navigation property to sensors for security
|
110
|
+
param body: The request body
|
111
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
112
|
+
Returns: RequestInformation
|
113
|
+
"""
|
114
|
+
if body is None:
|
115
|
+
raise TypeError("body cannot be null.")
|
116
|
+
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
|
117
|
+
request_info.configure(request_configuration)
|
118
|
+
request_info.headers.try_add("Accept", "application/json")
|
119
|
+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
|
120
|
+
return request_info
|
121
|
+
|
122
|
+
def with_url(self,raw_url: str) -> SensorsRequestBuilder:
|
123
|
+
"""
|
124
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
125
|
+
param raw_url: The raw URL to use for the request builder.
|
126
|
+
Returns: SensorsRequestBuilder
|
127
|
+
"""
|
128
|
+
if raw_url is None:
|
129
|
+
raise TypeError("raw_url cannot be null.")
|
130
|
+
return SensorsRequestBuilder(self.request_adapter, raw_url)
|
131
|
+
|
132
|
+
@property
|
133
|
+
def count(self) -> CountRequestBuilder:
|
134
|
+
"""
|
135
|
+
Provides operations to count the resources in the collection.
|
136
|
+
"""
|
137
|
+
from .count.count_request_builder import CountRequestBuilder
|
138
|
+
|
139
|
+
return CountRequestBuilder(self.request_adapter, self.path_parameters)
|
140
|
+
|
141
|
+
@property
|
142
|
+
def microsoft_graph_security_get_deployment_access_key(self) -> MicrosoftGraphSecurityGetDeploymentAccessKeyRequestBuilder:
|
143
|
+
"""
|
144
|
+
Provides operations to call the getDeploymentAccessKey method.
|
145
|
+
"""
|
146
|
+
from .microsoft_graph_security_get_deployment_access_key.microsoft_graph_security_get_deployment_access_key_request_builder import MicrosoftGraphSecurityGetDeploymentAccessKeyRequestBuilder
|
147
|
+
|
148
|
+
return MicrosoftGraphSecurityGetDeploymentAccessKeyRequestBuilder(self.request_adapter, self.path_parameters)
|
149
|
+
|
150
|
+
@property
|
151
|
+
def microsoft_graph_security_get_deployment_package_uri(self) -> MicrosoftGraphSecurityGetDeploymentPackageUriRequestBuilder:
|
152
|
+
"""
|
153
|
+
Provides operations to call the getDeploymentPackageUri method.
|
154
|
+
"""
|
155
|
+
from .microsoft_graph_security_get_deployment_package_uri.microsoft_graph_security_get_deployment_package_uri_request_builder import MicrosoftGraphSecurityGetDeploymentPackageUriRequestBuilder
|
156
|
+
|
157
|
+
return MicrosoftGraphSecurityGetDeploymentPackageUriRequestBuilder(self.request_adapter, self.path_parameters)
|
158
|
+
|
159
|
+
@property
|
160
|
+
def microsoft_graph_security_regenerate_deployment_access_key(self) -> MicrosoftGraphSecurityRegenerateDeploymentAccessKeyRequestBuilder:
|
161
|
+
"""
|
162
|
+
Provides operations to call the regenerateDeploymentAccessKey method.
|
163
|
+
"""
|
164
|
+
from .microsoft_graph_security_regenerate_deployment_access_key.microsoft_graph_security_regenerate_deployment_access_key_request_builder import MicrosoftGraphSecurityRegenerateDeploymentAccessKeyRequestBuilder
|
165
|
+
|
166
|
+
return MicrosoftGraphSecurityRegenerateDeploymentAccessKeyRequestBuilder(self.request_adapter, self.path_parameters)
|
167
|
+
|
168
|
+
@dataclass
|
169
|
+
class SensorsRequestBuilderGetQueryParameters():
|
170
|
+
"""
|
171
|
+
Get a list of sensor objects and their properties.
|
172
|
+
"""
|
173
|
+
def get_query_parameter(self,original_name: str) -> str:
|
174
|
+
"""
|
175
|
+
Maps the query parameters names to their encoded names for the URI template parsing.
|
176
|
+
param original_name: The original query parameter name in the class.
|
177
|
+
Returns: str
|
178
|
+
"""
|
179
|
+
if original_name is None:
|
180
|
+
raise TypeError("original_name cannot be null.")
|
181
|
+
if original_name == "count":
|
182
|
+
return "%24count"
|
183
|
+
if original_name == "expand":
|
184
|
+
return "%24expand"
|
185
|
+
if original_name == "filter":
|
186
|
+
return "%24filter"
|
187
|
+
if original_name == "orderby":
|
188
|
+
return "%24orderby"
|
189
|
+
if original_name == "search":
|
190
|
+
return "%24search"
|
191
|
+
if original_name == "select":
|
192
|
+
return "%24select"
|
193
|
+
if original_name == "skip":
|
194
|
+
return "%24skip"
|
195
|
+
if original_name == "top":
|
196
|
+
return "%24top"
|
197
|
+
return original_name
|
198
|
+
|
199
|
+
# Include count of items
|
200
|
+
count: Optional[bool] = None
|
201
|
+
|
202
|
+
# Expand related entities
|
203
|
+
expand: Optional[List[str]] = None
|
204
|
+
|
205
|
+
# Filter items by property values
|
206
|
+
filter: Optional[str] = None
|
207
|
+
|
208
|
+
# Order items by property values
|
209
|
+
orderby: Optional[List[str]] = None
|
210
|
+
|
211
|
+
# Search items by search phrases
|
212
|
+
search: Optional[str] = None
|
213
|
+
|
214
|
+
# Select properties to be returned
|
215
|
+
select: Optional[List[str]] = None
|
216
|
+
|
217
|
+
# Skip the first n items
|
218
|
+
skip: Optional[int] = None
|
219
|
+
|
220
|
+
# Show only the first n items
|
221
|
+
top: Optional[int] = None
|
222
|
+
|
223
|
+
|
224
|
+
@dataclass
|
225
|
+
class SensorsRequestBuilderGetRequestConfiguration(RequestConfiguration[SensorsRequestBuilderGetQueryParameters]):
|
226
|
+
"""
|
227
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
228
|
+
"""
|
229
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
230
|
+
|
231
|
+
@dataclass
|
232
|
+
class SensorsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]):
|
233
|
+
"""
|
234
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
235
|
+
"""
|
236
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
237
|
+
|
238
|
+
|
@@ -51,7 +51,7 @@ class VirtualEventTownhallItemRequestBuilder(BaseRequestBuilder):
|
|
51
51
|
|
52
52
|
async def get(self,request_configuration: Optional[RequestConfiguration[VirtualEventTownhallItemRequestBuilderGetQueryParameters]] = None) -> Optional[VirtualEventTownhall]:
|
53
53
|
"""
|
54
|
-
Read the properties and relationships of a virtualEventTownhall object.
|
54
|
+
Read the properties and relationships of a virtualEventTownhall object. All roles can get the details of a townhall event.
|
55
55
|
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
56
56
|
Returns: Optional[VirtualEventTownhall]
|
57
57
|
Find more info here: https://learn.microsoft.com/graph/api/virtualeventtownhall-get?view=graph-rest-1.0
|
@@ -72,7 +72,7 @@ class VirtualEventTownhallItemRequestBuilder(BaseRequestBuilder):
|
|
72
72
|
|
73
73
|
async def patch(self,body: VirtualEventTownhall, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[VirtualEventTownhall]:
|
74
74
|
"""
|
75
|
-
Update the properties of a virtualEventTownhall object.
|
75
|
+
Update the properties of a virtualEventTownhall object. Only the Organizer and Co-organizer can make changes to a townhall event.
|
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[VirtualEventTownhall]
|
@@ -107,7 +107,7 @@ class VirtualEventTownhallItemRequestBuilder(BaseRequestBuilder):
|
|
107
107
|
|
108
108
|
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[VirtualEventTownhallItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
109
109
|
"""
|
110
|
-
Read the properties and relationships of a virtualEventTownhall object.
|
110
|
+
Read the properties and relationships of a virtualEventTownhall object. All roles can get the details of a townhall event.
|
111
111
|
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
112
112
|
Returns: RequestInformation
|
113
113
|
"""
|
@@ -118,7 +118,7 @@ class VirtualEventTownhallItemRequestBuilder(BaseRequestBuilder):
|
|
118
118
|
|
119
119
|
def to_patch_request_information(self,body: VirtualEventTownhall, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
120
120
|
"""
|
121
|
-
Update the properties of a virtualEventTownhall object.
|
121
|
+
Update the properties of a virtualEventTownhall object. Only the Organizer and Co-organizer can make changes to a townhall event.
|
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
|
@@ -169,7 +169,7 @@ class VirtualEventTownhallItemRequestBuilder(BaseRequestBuilder):
|
|
169
169
|
@dataclass
|
170
170
|
class VirtualEventTownhallItemRequestBuilderGetQueryParameters():
|
171
171
|
"""
|
172
|
-
Read the properties and relationships of a virtualEventTownhall object.
|
172
|
+
Read the properties and relationships of a virtualEventTownhall object. All roles can get the details of a townhall event.
|
173
173
|
"""
|
174
174
|
def get_query_parameter(self,original_name: str) -> str:
|
175
175
|
"""
|
@@ -48,7 +48,7 @@ class TownhallsRequestBuilder(BaseRequestBuilder):
|
|
48
48
|
|
49
49
|
async def get(self,request_configuration: Optional[RequestConfiguration[TownhallsRequestBuilderGetQueryParameters]] = None) -> Optional[VirtualEventTownhallCollectionResponse]:
|
50
50
|
"""
|
51
|
-
Read the properties and relationships of a virtualEventTownhall object.
|
51
|
+
Read the properties and relationships of a virtualEventTownhall object. All roles can get the details of a townhall event.
|
52
52
|
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
53
53
|
Returns: Optional[VirtualEventTownhallCollectionResponse]
|
54
54
|
"""
|
@@ -92,7 +92,7 @@ class TownhallsRequestBuilder(BaseRequestBuilder):
|
|
92
92
|
|
93
93
|
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TownhallsRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
94
94
|
"""
|
95
|
-
Read the properties and relationships of a virtualEventTownhall object.
|
95
|
+
Read the properties and relationships of a virtualEventTownhall object. All roles can get the details of a townhall event.
|
96
96
|
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
97
97
|
Returns: RequestInformation
|
98
98
|
"""
|
@@ -138,7 +138,7 @@ class TownhallsRequestBuilder(BaseRequestBuilder):
|
|
138
138
|
@dataclass
|
139
139
|
class TownhallsRequestBuilderGetQueryParameters():
|
140
140
|
"""
|
141
|
-
Read the properties and relationships of a virtualEventTownhall object.
|
141
|
+
Read the properties and relationships of a virtualEventTownhall object. All roles can get the details of a townhall event.
|
142
142
|
"""
|
143
143
|
def get_query_parameter(self,original_name: str) -> str:
|
144
144
|
"""
|
@@ -55,7 +55,7 @@ class VirtualEventWebinarItemRequestBuilder(BaseRequestBuilder):
|
|
55
55
|
|
56
56
|
async def get(self,request_configuration: Optional[RequestConfiguration[VirtualEventWebinarItemRequestBuilderGetQueryParameters]] = None) -> Optional[VirtualEventWebinar]:
|
57
57
|
"""
|
58
|
-
Read the properties and relationships of a virtualEventWebinar object.
|
58
|
+
Read the properties and relationships of a virtualEventWebinar object. All roles can get the details of a webinar event.
|
59
59
|
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
60
60
|
Returns: Optional[VirtualEventWebinar]
|
61
61
|
Find more info here: https://learn.microsoft.com/graph/api/virtualeventwebinar-get?view=graph-rest-1.0
|
@@ -76,7 +76,7 @@ class VirtualEventWebinarItemRequestBuilder(BaseRequestBuilder):
|
|
76
76
|
|
77
77
|
async def patch(self,body: VirtualEventWebinar, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[VirtualEventWebinar]:
|
78
78
|
"""
|
79
|
-
Update the properties of a virtualEventWebinar object.
|
79
|
+
Update the properties of a virtualEventWebinar object. Only the Organizer and Co-organizer can make changes to a webinar event.
|
80
80
|
param body: The request body
|
81
81
|
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
82
82
|
Returns: Optional[VirtualEventWebinar]
|
@@ -135,7 +135,7 @@ class VirtualEventWebinarItemRequestBuilder(BaseRequestBuilder):
|
|
135
135
|
|
136
136
|
def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[VirtualEventWebinarItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation:
|
137
137
|
"""
|
138
|
-
Read the properties and relationships of a virtualEventWebinar object.
|
138
|
+
Read the properties and relationships of a virtualEventWebinar object. All roles can get the details of a webinar event.
|
139
139
|
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
140
140
|
Returns: RequestInformation
|
141
141
|
"""
|
@@ -146,7 +146,7 @@ class VirtualEventWebinarItemRequestBuilder(BaseRequestBuilder):
|
|
146
146
|
|
147
147
|
def to_patch_request_information(self,body: VirtualEventWebinar, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
148
148
|
"""
|
149
|
-
Update the properties of a virtualEventWebinar object.
|
149
|
+
Update the properties of a virtualEventWebinar object. Only the Organizer and Co-organizer can make changes to a webinar event.
|
150
150
|
param body: The request body
|
151
151
|
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
152
152
|
Returns: RequestInformation
|
@@ -215,7 +215,7 @@ class VirtualEventWebinarItemRequestBuilder(BaseRequestBuilder):
|
|
215
215
|
@dataclass
|
216
216
|
class VirtualEventWebinarItemRequestBuilderGetQueryParameters():
|
217
217
|
"""
|
218
|
-
Read the properties and relationships of a virtualEventWebinar object.
|
218
|
+
Read the properties and relationships of a virtualEventWebinar object. All roles can get the details of a webinar event.
|
219
219
|
"""
|
220
220
|
def get_query_parameter(self,original_name: str) -> str:
|
221
221
|
"""
|
@@ -17,8 +17,12 @@ if TYPE_CHECKING:
|
|
17
17
|
from .....models.o_data_errors.o_data_error import ODataError
|
18
18
|
from .activate.activate_request_builder import ActivateRequestBuilder
|
19
19
|
from .drive.drive_request_builder import DriveRequestBuilder
|
20
|
+
from .lock.lock_request_builder import LockRequestBuilder
|
20
21
|
from .permanent_delete.permanent_delete_request_builder import PermanentDeleteRequestBuilder
|
21
22
|
from .permissions.permissions_request_builder import PermissionsRequestBuilder
|
23
|
+
from .recycle_bin.recycle_bin_request_builder import RecycleBinRequestBuilder
|
24
|
+
from .restore.restore_request_builder import RestoreRequestBuilder
|
25
|
+
from .unlock.unlock_request_builder import UnlockRequestBuilder
|
22
26
|
|
23
27
|
class FileStorageContainerItemRequestBuilder(BaseRequestBuilder):
|
24
28
|
"""
|
@@ -159,6 +163,15 @@ class FileStorageContainerItemRequestBuilder(BaseRequestBuilder):
|
|
159
163
|
|
160
164
|
return DriveRequestBuilder(self.request_adapter, self.path_parameters)
|
161
165
|
|
166
|
+
@property
|
167
|
+
def lock(self) -> LockRequestBuilder:
|
168
|
+
"""
|
169
|
+
Provides operations to call the lock method.
|
170
|
+
"""
|
171
|
+
from .lock.lock_request_builder import LockRequestBuilder
|
172
|
+
|
173
|
+
return LockRequestBuilder(self.request_adapter, self.path_parameters)
|
174
|
+
|
162
175
|
@property
|
163
176
|
def permanent_delete(self) -> PermanentDeleteRequestBuilder:
|
164
177
|
"""
|
@@ -177,6 +190,33 @@ class FileStorageContainerItemRequestBuilder(BaseRequestBuilder):
|
|
177
190
|
|
178
191
|
return PermissionsRequestBuilder(self.request_adapter, self.path_parameters)
|
179
192
|
|
193
|
+
@property
|
194
|
+
def recycle_bin(self) -> RecycleBinRequestBuilder:
|
195
|
+
"""
|
196
|
+
Provides operations to manage the recycleBin property of the microsoft.graph.fileStorageContainer entity.
|
197
|
+
"""
|
198
|
+
from .recycle_bin.recycle_bin_request_builder import RecycleBinRequestBuilder
|
199
|
+
|
200
|
+
return RecycleBinRequestBuilder(self.request_adapter, self.path_parameters)
|
201
|
+
|
202
|
+
@property
|
203
|
+
def restore(self) -> RestoreRequestBuilder:
|
204
|
+
"""
|
205
|
+
Provides operations to call the restore method.
|
206
|
+
"""
|
207
|
+
from .restore.restore_request_builder import RestoreRequestBuilder
|
208
|
+
|
209
|
+
return RestoreRequestBuilder(self.request_adapter, self.path_parameters)
|
210
|
+
|
211
|
+
@property
|
212
|
+
def unlock(self) -> UnlockRequestBuilder:
|
213
|
+
"""
|
214
|
+
Provides operations to call the unlock method.
|
215
|
+
"""
|
216
|
+
from .unlock.unlock_request_builder import UnlockRequestBuilder
|
217
|
+
|
218
|
+
return UnlockRequestBuilder(self.request_adapter, self.path_parameters)
|
219
|
+
|
180
220
|
@dataclass
|
181
221
|
class FileStorageContainerItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]):
|
182
222
|
"""
|
@@ -0,0 +1,58 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
from dataclasses import dataclass, field
|
3
|
+
from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter
|
4
|
+
from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton
|
5
|
+
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
|
6
|
+
|
7
|
+
if TYPE_CHECKING:
|
8
|
+
from ......models.site_lock_state import SiteLockState
|
9
|
+
|
10
|
+
@dataclass
|
11
|
+
class LockPostRequestBody(AdditionalDataHolder, BackedModel, Parsable):
|
12
|
+
# Stores model information.
|
13
|
+
backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False)
|
14
|
+
|
15
|
+
# Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
|
16
|
+
additional_data: Dict[str, Any] = field(default_factory=dict)
|
17
|
+
# The lockState property
|
18
|
+
lock_state: Optional[SiteLockState] = None
|
19
|
+
|
20
|
+
@staticmethod
|
21
|
+
def create_from_discriminator_value(parse_node: ParseNode) -> LockPostRequestBody:
|
22
|
+
"""
|
23
|
+
Creates a new instance of the appropriate class based on discriminator value
|
24
|
+
param parse_node: The parse node to use to read the discriminator value and create the object
|
25
|
+
Returns: LockPostRequestBody
|
26
|
+
"""
|
27
|
+
if parse_node is None:
|
28
|
+
raise TypeError("parse_node cannot be null.")
|
29
|
+
return LockPostRequestBody()
|
30
|
+
|
31
|
+
def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]:
|
32
|
+
"""
|
33
|
+
The deserialization information for the current model
|
34
|
+
Returns: Dict[str, Callable[[ParseNode], None]]
|
35
|
+
"""
|
36
|
+
from ......models.site_lock_state import SiteLockState
|
37
|
+
|
38
|
+
from ......models.site_lock_state import SiteLockState
|
39
|
+
|
40
|
+
fields: Dict[str, Callable[[Any], None]] = {
|
41
|
+
"lockState": lambda n : setattr(self, 'lock_state', n.get_enum_value(SiteLockState)),
|
42
|
+
}
|
43
|
+
return fields
|
44
|
+
|
45
|
+
def serialize(self,writer: SerializationWriter) -> None:
|
46
|
+
"""
|
47
|
+
Serializes information the current object
|
48
|
+
param writer: Serialization writer to use to serialize this model
|
49
|
+
Returns: None
|
50
|
+
"""
|
51
|
+
if writer is None:
|
52
|
+
raise TypeError("writer cannot be null.")
|
53
|
+
from ......models.site_lock_state import SiteLockState
|
54
|
+
|
55
|
+
writer.write_enum_value("lockState", self.lock_state)
|
56
|
+
writer.write_additional_data_value(self.additional_data)
|
57
|
+
|
58
|
+
|
@@ -0,0 +1,85 @@
|
|
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 .lock_post_request_body import LockPostRequestBody
|
18
|
+
|
19
|
+
class LockRequestBuilder(BaseRequestBuilder):
|
20
|
+
"""
|
21
|
+
Provides operations to call the lock method.
|
22
|
+
"""
|
23
|
+
def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None:
|
24
|
+
"""
|
25
|
+
Instantiates a new LockRequestBuilder 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}/storage/fileStorage/containers/{fileStorageContainer%2Did}/lock", path_parameters)
|
31
|
+
|
32
|
+
async def post(self,body: LockPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None:
|
33
|
+
"""
|
34
|
+
Invoke action lock
|
35
|
+
param body: The request body
|
36
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
37
|
+
Returns: None
|
38
|
+
"""
|
39
|
+
if body is None:
|
40
|
+
raise TypeError("body cannot be null.")
|
41
|
+
request_info = self.to_post_request_information(
|
42
|
+
body, 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
|
+
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)
|
52
|
+
|
53
|
+
def to_post_request_information(self,body: LockPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation:
|
54
|
+
"""
|
55
|
+
Invoke action lock
|
56
|
+
param body: The request body
|
57
|
+
param request_configuration: Configuration for the request such as headers, query parameters, and middleware options.
|
58
|
+
Returns: RequestInformation
|
59
|
+
"""
|
60
|
+
if body is None:
|
61
|
+
raise TypeError("body cannot be null.")
|
62
|
+
request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters)
|
63
|
+
request_info.configure(request_configuration)
|
64
|
+
request_info.headers.try_add("Accept", "application/json")
|
65
|
+
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
|
66
|
+
return request_info
|
67
|
+
|
68
|
+
def with_url(self,raw_url: str) -> LockRequestBuilder:
|
69
|
+
"""
|
70
|
+
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
71
|
+
param raw_url: The raw URL to use for the request builder.
|
72
|
+
Returns: LockRequestBuilder
|
73
|
+
"""
|
74
|
+
if raw_url is None:
|
75
|
+
raise TypeError("raw_url cannot be null.")
|
76
|
+
return LockRequestBuilder(self.request_adapter, raw_url)
|
77
|
+
|
78
|
+
@dataclass
|
79
|
+
class LockRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]):
|
80
|
+
"""
|
81
|
+
Configuration for the request such as headers, query parameters, and middleware options.
|
82
|
+
"""
|
83
|
+
warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning)
|
84
|
+
|
85
|
+
|