diff --git a/tests/validation/validation/kiota-lock.json b/tests/validation/validation/kiota-lock.json index c90fd94d..77b09123 100644 --- a/tests/validation/validation/kiota-lock.json +++ b/tests/validation/validation/kiota-lock.json @@ -1,8 +1,8 @@ { - "descriptionHash": "CE55775E5E36A748E59FB2BA5E63C392C63AA9CC15CE23D56FB5C14B92BBFA708FF5D4386EC1532D7A7BB74C8D9E80AE6482AB3806FB0393E1DD8151FAE8FE50", + "descriptionHash": "3DC72B5983908CB42E339F1D48A1BC8C0AE0770120FA8B34C3720F9542528E5E8658FF0D371EAFFFB66493724EEFC1D12FB138D0DF1F63D8AA202485F8A3F5E4", "descriptionLocation": "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/dev/openApiDocs/v1.0/Mail.yml", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.19.0", + "kiotaVersion": "1.22.0", "clientClassName": "ValidationClient", "typeAccessModifier": "Public", "clientNamespaceName": "validation", diff --git a/tests/validation/validation/models/attachment.py b/tests/validation/validation/models/attachment.py index 23cd85b8..79cc020b 100644 --- a/tests/validation/validation/models/attachment.py +++ b/tests/validation/validation/models/attachment.py @@ -1,8 +1,9 @@ from __future__ import annotations import datetime +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .entity import Entity @@ -10,7 +11,7 @@ from .entity import Entity @dataclass -class Attachment(Entity): +class Attachment(Entity, Parsable): # The MIME type. content_type: Optional[str] = None # true if the attachment is an inline attachment; otherwise, false. @@ -33,16 +34,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Attachment: raise TypeError("parse_node cannot be null.") return Attachment() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .entity import Entity from .entity import Entity - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "contentType": lambda n : setattr(self, 'content_type', n.get_str_value()), "isInline": lambda n : setattr(self, 'is_inline', n.get_bool_value()), "lastModifiedDateTime": lambda n : setattr(self, 'last_modified_date_time', n.get_datetime_value()), @@ -62,6 +63,8 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .entity import Entity + writer.write_str_value("contentType", self.content_type) writer.write_bool_value("isInline", self.is_inline) writer.write_datetime_value("lastModifiedDateTime", self.last_modified_date_time) diff --git a/tests/validation/validation/models/attachment_collection_response.py b/tests/validation/validation/models/attachment_collection_response.py index d45b74fe..941d4ece 100644 --- a/tests/validation/validation/models/attachment_collection_response.py +++ b/tests/validation/validation/models/attachment_collection_response.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .attachment import Attachment @@ -9,12 +10,12 @@ @dataclass class AttachmentCollectionResponse(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The OdataNextLink property odata_next_link: Optional[str] = None # The value property - value: Optional[List[Attachment]] = None + value: Optional[list[Attachment]] = None @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> AttachmentCollectionResponse: @@ -27,16 +28,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> AttachmentCollecti raise TypeError("parse_node cannot be null.") return AttachmentCollectionResponse() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .attachment import Attachment from .attachment import Attachment - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "@odata.nextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Attachment)), } @@ -50,6 +51,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .attachment import Attachment + writer.write_str_value("@odata.nextLink", self.odata_next_link) writer.write_collection_of_object_values("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/tests/validation/validation/models/date_time_time_zone.py b/tests/validation/validation/models/date_time_time_zone.py index 6a458d38..62a7ab10 100644 --- a/tests/validation/validation/models/date_time_time_zone.py +++ b/tests/validation/validation/models/date_time_time_zone.py @@ -1,12 +1,13 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union @dataclass class DateTimeTimeZone(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # A single point of time in a combined date and time representation ({date}T{time}; for example, 2017-08-29T04:00:00.0000000). date_time: Optional[str] = None @@ -24,12 +25,12 @@ def create_from_discriminator_value(parse_node: ParseNode) -> DateTimeTimeZone: raise TypeError("parse_node cannot be null.") return DateTimeTimeZone() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "dateTime": lambda n : setattr(self, 'date_time', n.get_str_value()), "timeZone": lambda n : setattr(self, 'time_zone', n.get_str_value()), } diff --git a/tests/validation/validation/models/email_address.py b/tests/validation/validation/models/email_address.py index f1a8f4d9..9962df1b 100644 --- a/tests/validation/validation/models/email_address.py +++ b/tests/validation/validation/models/email_address.py @@ -1,12 +1,13 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union @dataclass class EmailAddress(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The email address of the person or entity. address: Optional[str] = None @@ -24,12 +25,12 @@ def create_from_discriminator_value(parse_node: ParseNode) -> EmailAddress: raise TypeError("parse_node cannot be null.") return EmailAddress() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "address": lambda n : setattr(self, 'address', n.get_str_value()), "name": lambda n : setattr(self, 'name', n.get_str_value()), } diff --git a/tests/validation/validation/models/entity.py b/tests/validation/validation/models/entity.py index 786cdd0f..e07a8ebe 100644 --- a/tests/validation/validation/models/entity.py +++ b/tests/validation/validation/models/entity.py @@ -1,12 +1,13 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union @dataclass class Entity(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The unique identifier for an entity. Read-only. id: Optional[str] = None @@ -22,12 +23,12 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Entity: raise TypeError("parse_node cannot be null.") return Entity() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "id": lambda n : setattr(self, 'id', n.get_str_value()), } return fields diff --git a/tests/validation/validation/models/extension.py b/tests/validation/validation/models/extension.py index eb653569..90842da2 100644 --- a/tests/validation/validation/models/extension.py +++ b/tests/validation/validation/models/extension.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .entity import Entity @@ -9,7 +10,7 @@ from .entity import Entity @dataclass -class Extension(Entity): +class Extension(Entity, Parsable): @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> Extension: @@ -22,16 +23,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Extension: raise TypeError("parse_node cannot be null.") return Extension() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .entity import Entity from .entity import Entity - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { } super_fields = super().get_field_deserializers() fields.update(super_fields) @@ -46,5 +47,7 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .entity import Entity + diff --git a/tests/validation/validation/models/extension_collection_response.py b/tests/validation/validation/models/extension_collection_response.py index f43d22d3..7381d18a 100644 --- a/tests/validation/validation/models/extension_collection_response.py +++ b/tests/validation/validation/models/extension_collection_response.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .extension import Extension @@ -9,12 +10,12 @@ @dataclass class ExtensionCollectionResponse(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The OdataNextLink property odata_next_link: Optional[str] = None # The value property - value: Optional[List[Extension]] = None + value: Optional[list[Extension]] = None @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> ExtensionCollectionResponse: @@ -27,16 +28,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> ExtensionCollectio raise TypeError("parse_node cannot be null.") return ExtensionCollectionResponse() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .extension import Extension from .extension import Extension - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "@odata.nextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Extension)), } @@ -50,6 +51,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .extension import Extension + writer.write_str_value("@odata.nextLink", self.odata_next_link) writer.write_collection_of_object_values("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/tests/validation/validation/models/followup_flag.py b/tests/validation/validation/models/followup_flag.py index 033f0c33..1b52fbe0 100644 --- a/tests/validation/validation/models/followup_flag.py +++ b/tests/validation/validation/models/followup_flag.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .date_time_time_zone import DateTimeTimeZone @@ -10,7 +11,7 @@ @dataclass class FollowupFlag(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The completedDateTime property completed_date_time: Optional[DateTimeTimeZone] = None @@ -32,10 +33,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> FollowupFlag: raise TypeError("parse_node cannot be null.") return FollowupFlag() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .date_time_time_zone import DateTimeTimeZone from .followup_flag_status import FollowupFlagStatus @@ -43,7 +44,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .date_time_time_zone import DateTimeTimeZone from .followup_flag_status import FollowupFlagStatus - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "completedDateTime": lambda n : setattr(self, 'completed_date_time', n.get_object_value(DateTimeTimeZone)), "dueDateTime": lambda n : setattr(self, 'due_date_time', n.get_object_value(DateTimeTimeZone)), "flagStatus": lambda n : setattr(self, 'flag_status', n.get_enum_value(FollowupFlagStatus)), @@ -59,6 +60,9 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .date_time_time_zone import DateTimeTimeZone + from .followup_flag_status import FollowupFlagStatus + writer.write_object_value("completedDateTime", self.completed_date_time) writer.write_object_value("dueDateTime", self.due_date_time) writer.write_enum_value("flagStatus", self.flag_status) diff --git a/tests/validation/validation/models/inference_classification.py b/tests/validation/validation/models/inference_classification.py index 6eda9b59..ca46e5e8 100644 --- a/tests/validation/validation/models/inference_classification.py +++ b/tests/validation/validation/models/inference_classification.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .entity import Entity @@ -10,9 +11,9 @@ from .entity import Entity @dataclass -class InferenceClassification(Entity): +class InferenceClassification(Entity, Parsable): # A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. - overrides: Optional[List[InferenceClassificationOverride]] = None + overrides: Optional[list[InferenceClassificationOverride]] = None @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> InferenceClassification: @@ -25,10 +26,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> InferenceClassific raise TypeError("parse_node cannot be null.") return InferenceClassification() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .entity import Entity from .inference_classification_override import InferenceClassificationOverride @@ -36,7 +37,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .entity import Entity from .inference_classification_override import InferenceClassificationOverride - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "overrides": lambda n : setattr(self, 'overrides', n.get_collection_of_object_values(InferenceClassificationOverride)), } super_fields = super().get_field_deserializers() @@ -52,6 +53,9 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .entity import Entity + from .inference_classification_override import InferenceClassificationOverride + writer.write_collection_of_object_values("overrides", self.overrides) diff --git a/tests/validation/validation/models/inference_classification_override.py b/tests/validation/validation/models/inference_classification_override.py index 0695cc41..10aeb9ac 100644 --- a/tests/validation/validation/models/inference_classification_override.py +++ b/tests/validation/validation/models/inference_classification_override.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .email_address import EmailAddress @@ -11,7 +12,7 @@ from .entity import Entity @dataclass -class InferenceClassificationOverride(Entity): +class InferenceClassificationOverride(Entity, Parsable): # The classifyAs property classify_as: Optional[InferenceClassificationType] = None # The senderEmailAddress property @@ -28,10 +29,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> InferenceClassific raise TypeError("parse_node cannot be null.") return InferenceClassificationOverride() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .email_address import EmailAddress from .entity import Entity @@ -41,7 +42,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .entity import Entity from .inference_classification_type import InferenceClassificationType - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "classifyAs": lambda n : setattr(self, 'classify_as', n.get_enum_value(InferenceClassificationType)), "senderEmailAddress": lambda n : setattr(self, 'sender_email_address', n.get_object_value(EmailAddress)), } @@ -58,6 +59,10 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .email_address import EmailAddress + from .entity import Entity + from .inference_classification_type import InferenceClassificationType + writer.write_enum_value("classifyAs", self.classify_as) writer.write_object_value("senderEmailAddress", self.sender_email_address) diff --git a/tests/validation/validation/models/inference_classification_override_collection_response.py b/tests/validation/validation/models/inference_classification_override_collection_response.py index 35bda2e7..d702868f 100644 --- a/tests/validation/validation/models/inference_classification_override_collection_response.py +++ b/tests/validation/validation/models/inference_classification_override_collection_response.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .inference_classification_override import InferenceClassificationOverride @@ -9,12 +10,12 @@ @dataclass class InferenceClassificationOverrideCollectionResponse(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The OdataNextLink property odata_next_link: Optional[str] = None # The value property - value: Optional[List[InferenceClassificationOverride]] = None + value: Optional[list[InferenceClassificationOverride]] = None @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> InferenceClassificationOverrideCollectionResponse: @@ -27,16 +28,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> InferenceClassific raise TypeError("parse_node cannot be null.") return InferenceClassificationOverrideCollectionResponse() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .inference_classification_override import InferenceClassificationOverride from .inference_classification_override import InferenceClassificationOverride - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "@odata.nextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(InferenceClassificationOverride)), } @@ -50,6 +51,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .inference_classification_override import InferenceClassificationOverride + writer.write_str_value("@odata.nextLink", self.odata_next_link) writer.write_collection_of_object_values("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/tests/validation/validation/models/internet_message_header.py b/tests/validation/validation/models/internet_message_header.py index 44a43cda..e78be7d3 100644 --- a/tests/validation/validation/models/internet_message_header.py +++ b/tests/validation/validation/models/internet_message_header.py @@ -1,12 +1,13 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union @dataclass class InternetMessageHeader(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # Represents the key in a key-value pair. name: Optional[str] = None @@ -24,12 +25,12 @@ def create_from_discriminator_value(parse_node: ParseNode) -> InternetMessageHea raise TypeError("parse_node cannot be null.") return InternetMessageHeader() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "name": lambda n : setattr(self, 'name', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_str_value()), } diff --git a/tests/validation/validation/models/item_body.py b/tests/validation/validation/models/item_body.py index f47434d1..84d28ac8 100644 --- a/tests/validation/validation/models/item_body.py +++ b/tests/validation/validation/models/item_body.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .body_type import BodyType @@ -9,7 +10,7 @@ @dataclass class ItemBody(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The content of the item. content: Optional[str] = None @@ -27,16 +28,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> ItemBody: raise TypeError("parse_node cannot be null.") return ItemBody() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .body_type import BodyType from .body_type import BodyType - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "content": lambda n : setattr(self, 'content', n.get_str_value()), "contentType": lambda n : setattr(self, 'content_type', n.get_enum_value(BodyType)), } @@ -50,6 +51,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .body_type import BodyType + writer.write_str_value("content", self.content) writer.write_enum_value("contentType", self.content_type) writer.write_additional_data_value(self.additional_data) diff --git a/tests/validation/validation/models/mail_folder.py b/tests/validation/validation/models/mail_folder.py index 2de00b02..86b0e58e 100644 --- a/tests/validation/validation/models/mail_folder.py +++ b/tests/validation/validation/models/mail_folder.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .entity import Entity @@ -13,25 +14,25 @@ from .entity import Entity @dataclass -class MailFolder(Entity): +class MailFolder(Entity, Parsable): # The number of immediate child mailFolders in the current mailFolder. child_folder_count: Optional[int] = None # The collection of child folders in the mailFolder. - child_folders: Optional[List[MailFolder]] = None + child_folders: Optional[list[MailFolder]] = None # The mailFolder's display name. display_name: Optional[str] = None # Indicates whether the mailFolder is hidden. This property can be set only when creating the folder. Find more information in Hidden mail folders. is_hidden: Optional[bool] = None # The collection of rules that apply to the user's Inbox folder. - message_rules: Optional[List[MessageRule]] = None + message_rules: Optional[list[MessageRule]] = None # The collection of messages in the mailFolder. - messages: Optional[List[Message]] = None + messages: Optional[list[Message]] = None # The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable. - multi_value_extended_properties: Optional[List[MultiValueLegacyExtendedProperty]] = None + multi_value_extended_properties: Optional[list[MultiValueLegacyExtendedProperty]] = None # The unique identifier for the mailFolder's parent mailFolder. parent_folder_id: Optional[str] = None # The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable. - single_value_extended_properties: Optional[List[SingleValueLegacyExtendedProperty]] = None + single_value_extended_properties: Optional[list[SingleValueLegacyExtendedProperty]] = None # The number of items in the mailFolder. total_item_count: Optional[int] = None # The number of items in the mailFolder marked as unread. @@ -48,10 +49,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MailFolder: raise TypeError("parse_node cannot be null.") return MailFolder() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .entity import Entity from .message import Message @@ -65,7 +66,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .multi_value_legacy_extended_property import MultiValueLegacyExtendedProperty from .single_value_legacy_extended_property import SingleValueLegacyExtendedProperty - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "childFolderCount": lambda n : setattr(self, 'child_folder_count', n.get_int_value()), "childFolders": lambda n : setattr(self, 'child_folders', n.get_collection_of_object_values(MailFolder)), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), @@ -91,6 +92,12 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .entity import Entity + from .message import Message + from .message_rule import MessageRule + from .multi_value_legacy_extended_property import MultiValueLegacyExtendedProperty + from .single_value_legacy_extended_property import SingleValueLegacyExtendedProperty + writer.write_int_value("childFolderCount", self.child_folder_count) writer.write_collection_of_object_values("childFolders", self.child_folders) writer.write_str_value("displayName", self.display_name) diff --git a/tests/validation/validation/models/mail_folder_collection_response.py b/tests/validation/validation/models/mail_folder_collection_response.py index b0a99b50..d26c6045 100644 --- a/tests/validation/validation/models/mail_folder_collection_response.py +++ b/tests/validation/validation/models/mail_folder_collection_response.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .mail_folder import MailFolder @@ -9,12 +10,12 @@ @dataclass class MailFolderCollectionResponse(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The OdataNextLink property odata_next_link: Optional[str] = None # The value property - value: Optional[List[MailFolder]] = None + value: Optional[list[MailFolder]] = None @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> MailFolderCollectionResponse: @@ -27,16 +28,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MailFolderCollecti raise TypeError("parse_node cannot be null.") return MailFolderCollectionResponse() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .mail_folder import MailFolder from .mail_folder import MailFolder - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "@odata.nextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(MailFolder)), } @@ -50,6 +51,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .mail_folder import MailFolder + writer.write_str_value("@odata.nextLink", self.odata_next_link) writer.write_collection_of_object_values("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/tests/validation/validation/models/message.py b/tests/validation/validation/models/message.py index ff1f3d2e..912c137b 100644 --- a/tests/validation/validation/models/message.py +++ b/tests/validation/validation/models/message.py @@ -1,8 +1,9 @@ from __future__ import annotations import datetime +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .attachment import Attachment @@ -20,23 +21,23 @@ from .outlook_item import OutlookItem @dataclass -class Message(OutlookItem): +class Message(OutlookItem, Parsable): # The fileAttachment and itemAttachment attachments for the message. - attachments: Optional[List[Attachment]] = None + attachments: Optional[list[Attachment]] = None # The Bcc: recipients for the message. - bcc_recipients: Optional[List[Recipient]] = None + bcc_recipients: Optional[list[Recipient]] = None # The body property body: Optional[ItemBody] = None # The first 255 characters of the message body. It is in text format. body_preview: Optional[str] = None # The Cc: recipients for the message. - cc_recipients: Optional[List[Recipient]] = None + cc_recipients: Optional[list[Recipient]] = None # The ID of the conversation the email belongs to. conversation_id: Optional[str] = None # Indicates the position of the message within the conversation. conversation_index: Optional[bytes] = None # The collection of open extensions defined for the message. Nullable. - extensions: Optional[List[Extension]] = None + extensions: Optional[list[Extension]] = None # The flag property flag: Optional[FollowupFlag] = None # The from property @@ -48,7 +49,7 @@ class Message(OutlookItem): # The inferenceClassification property inference_classification: Optional[InferenceClassificationType] = None # A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Returned only on applying a $select query option. Read-only. - internet_message_headers: Optional[List[InternetMessageHeader]] = None + internet_message_headers: Optional[list[InternetMessageHeader]] = None # The message ID in the format specified by RFC2822. internet_message_id: Optional[str] = None # Indicates whether a read receipt is requested for the message. @@ -60,23 +61,23 @@ class Message(OutlookItem): # Indicates whether a read receipt is requested for the message. is_read_receipt_requested: Optional[bool] = None # The collection of multi-value extended properties defined for the message. Nullable. - multi_value_extended_properties: Optional[List[MultiValueLegacyExtendedProperty]] = None + multi_value_extended_properties: Optional[list[MultiValueLegacyExtendedProperty]] = None # The unique identifier for the message's parent mailFolder. parent_folder_id: Optional[str] = None # The date and time the message was received. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. received_date_time: Optional[datetime.datetime] = None # The email addresses to use when replying. - reply_to: Optional[List[Recipient]] = None + reply_to: Optional[list[Recipient]] = None # The sender property sender: Optional[Recipient] = None # The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. sent_date_time: Optional[datetime.datetime] = None # The collection of single-value extended properties defined for the message. Nullable. - single_value_extended_properties: Optional[List[SingleValueLegacyExtendedProperty]] = None + single_value_extended_properties: Optional[list[SingleValueLegacyExtendedProperty]] = None # The subject of the message. subject: Optional[str] = None # The To: recipients for the message. - to_recipients: Optional[List[Recipient]] = None + to_recipients: Optional[list[Recipient]] = None # The uniqueBody property unique_body: Optional[ItemBody] = None # The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, the browser shows the message in the Outlook on the web review pane.The message opens in the browser if you are signed in to your mailbox via Outlook on the web. You are prompted to sign in if you are not already signed in with the browser.This URL cannot be accessed from within an iFrame. @@ -93,10 +94,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Message: raise TypeError("parse_node cannot be null.") return Message() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .attachment import Attachment from .extension import Extension @@ -122,7 +123,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .recipient import Recipient from .single_value_legacy_extended_property import SingleValueLegacyExtendedProperty - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "attachments": lambda n : setattr(self, 'attachments', n.get_collection_of_object_values(Attachment)), "bccRecipients": lambda n : setattr(self, 'bcc_recipients', n.get_collection_of_object_values(Recipient)), "body": lambda n : setattr(self, 'body', n.get_object_value(ItemBody)), @@ -167,6 +168,18 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .attachment import Attachment + from .extension import Extension + from .followup_flag import FollowupFlag + from .importance import Importance + from .inference_classification_type import InferenceClassificationType + from .internet_message_header import InternetMessageHeader + from .item_body import ItemBody + from .multi_value_legacy_extended_property import MultiValueLegacyExtendedProperty + from .outlook_item import OutlookItem + from .recipient import Recipient + from .single_value_legacy_extended_property import SingleValueLegacyExtendedProperty + writer.write_collection_of_object_values("attachments", self.attachments) writer.write_collection_of_object_values("bccRecipients", self.bcc_recipients) writer.write_object_value("body", self.body) diff --git a/tests/validation/validation/models/message_collection_response.py b/tests/validation/validation/models/message_collection_response.py index 24e493a7..cdf6476e 100644 --- a/tests/validation/validation/models/message_collection_response.py +++ b/tests/validation/validation/models/message_collection_response.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .message import Message @@ -9,12 +10,12 @@ @dataclass class MessageCollectionResponse(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The OdataNextLink property odata_next_link: Optional[str] = None # The value property - value: Optional[List[Message]] = None + value: Optional[list[Message]] = None @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> MessageCollectionResponse: @@ -27,16 +28,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MessageCollectionR raise TypeError("parse_node cannot be null.") return MessageCollectionResponse() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .message import Message from .message import Message - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "@odata.nextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Message)), } @@ -50,6 +51,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .message import Message + writer.write_str_value("@odata.nextLink", self.odata_next_link) writer.write_collection_of_object_values("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/tests/validation/validation/models/message_rule.py b/tests/validation/validation/models/message_rule.py index 7c60c337..2ee05b5a 100644 --- a/tests/validation/validation/models/message_rule.py +++ b/tests/validation/validation/models/message_rule.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .entity import Entity @@ -11,7 +12,7 @@ from .entity import Entity @dataclass -class MessageRule(Entity): +class MessageRule(Entity, Parsable): # The actions property actions: Optional[MessageRuleActions] = None # The conditions property @@ -40,10 +41,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MessageRule: raise TypeError("parse_node cannot be null.") return MessageRule() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .entity import Entity from .message_rule_actions import MessageRuleActions @@ -53,7 +54,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .message_rule_actions import MessageRuleActions from .message_rule_predicates import MessageRulePredicates - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "actions": lambda n : setattr(self, 'actions', n.get_object_value(MessageRuleActions)), "conditions": lambda n : setattr(self, 'conditions', n.get_object_value(MessageRulePredicates)), "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), @@ -76,6 +77,10 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .entity import Entity + from .message_rule_actions import MessageRuleActions + from .message_rule_predicates import MessageRulePredicates + writer.write_object_value("actions", self.actions) writer.write_object_value("conditions", self.conditions) writer.write_str_value("displayName", self.display_name) diff --git a/tests/validation/validation/models/message_rule_actions.py b/tests/validation/validation/models/message_rule_actions.py index 58b50893..cfa9b62c 100644 --- a/tests/validation/validation/models/message_rule_actions.py +++ b/tests/validation/validation/models/message_rule_actions.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .importance import Importance @@ -10,18 +11,18 @@ @dataclass class MessageRuleActions(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # A list of categories to be assigned to a message. - assign_categories: Optional[List[str]] = None + assign_categories: Optional[list[str]] = None # The ID of a folder that a message is to be copied to. copy_to_folder: Optional[str] = None # Indicates whether a message should be moved to the Deleted Items folder. delete: Optional[bool] = None # The email addresses of the recipients to which a message should be forwarded as an attachment. - forward_as_attachment_to: Optional[List[Recipient]] = None + forward_as_attachment_to: Optional[list[Recipient]] = None # The email addresses of the recipients to which a message should be forwarded. - forward_to: Optional[List[Recipient]] = None + forward_to: Optional[list[Recipient]] = None # Indicates whether a message should be marked as read. mark_as_read: Optional[bool] = None # The markImportance property @@ -31,7 +32,7 @@ class MessageRuleActions(AdditionalDataHolder, Parsable): # Indicates whether a message should be permanently deleted and not saved to the Deleted Items folder. permanent_delete: Optional[bool] = None # The email addresses to which a message should be redirected. - redirect_to: Optional[List[Recipient]] = None + redirect_to: Optional[list[Recipient]] = None # Indicates whether subsequent rules should be evaluated. stop_processing_rules: Optional[bool] = None @@ -46,10 +47,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MessageRuleActions raise TypeError("parse_node cannot be null.") return MessageRuleActions() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .importance import Importance from .recipient import Recipient @@ -57,7 +58,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .importance import Importance from .recipient import Recipient - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "assignCategories": lambda n : setattr(self, 'assign_categories', n.get_collection_of_primitive_values(str)), "copyToFolder": lambda n : setattr(self, 'copy_to_folder', n.get_str_value()), "delete": lambda n : setattr(self, 'delete', n.get_bool_value()), @@ -80,6 +81,9 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .importance import Importance + from .recipient import Recipient + writer.write_collection_of_primitive_values("assignCategories", self.assign_categories) writer.write_str_value("copyToFolder", self.copy_to_folder) writer.write_bool_value("delete", self.delete) diff --git a/tests/validation/validation/models/message_rule_collection_response.py b/tests/validation/validation/models/message_rule_collection_response.py index 6f2d8ba6..aa3557ed 100644 --- a/tests/validation/validation/models/message_rule_collection_response.py +++ b/tests/validation/validation/models/message_rule_collection_response.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .message_rule import MessageRule @@ -9,12 +10,12 @@ @dataclass class MessageRuleCollectionResponse(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The OdataNextLink property odata_next_link: Optional[str] = None # The value property - value: Optional[List[MessageRule]] = None + value: Optional[list[MessageRule]] = None @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> MessageRuleCollectionResponse: @@ -27,16 +28,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MessageRuleCollect raise TypeError("parse_node cannot be null.") return MessageRuleCollectionResponse() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .message_rule import MessageRule from .message_rule import MessageRule - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "@odata.nextLink": lambda n : setattr(self, 'odata_next_link', n.get_str_value()), "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(MessageRule)), } @@ -50,6 +51,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .message_rule import MessageRule + writer.write_str_value("@odata.nextLink", self.odata_next_link) writer.write_collection_of_object_values("value", self.value) writer.write_additional_data_value(self.additional_data) diff --git a/tests/validation/validation/models/message_rule_predicates.py b/tests/validation/validation/models/message_rule_predicates.py index aefa71c8..4e8e947a 100644 --- a/tests/validation/validation/models/message_rule_predicates.py +++ b/tests/validation/validation/models/message_rule_predicates.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .importance import Importance @@ -13,20 +14,20 @@ @dataclass class MessageRulePredicates(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # Represents the strings that should appear in the body of an incoming message in order for the condition or exception to apply. - body_contains: Optional[List[str]] = None + body_contains: Optional[list[str]] = None # Represents the strings that should appear in the body or subject of an incoming message in order for the condition or exception to apply. - body_or_subject_contains: Optional[List[str]] = None + body_or_subject_contains: Optional[list[str]] = None # Represents the categories that an incoming message should be labeled with in order for the condition or exception to apply. - categories: Optional[List[str]] = None + categories: Optional[list[str]] = None # Represents the specific sender email addresses of an incoming message in order for the condition or exception to apply. - from_addresses: Optional[List[Recipient]] = None + from_addresses: Optional[list[Recipient]] = None # Indicates whether an incoming message must have attachments in order for the condition or exception to apply. has_attachments: Optional[bool] = None # Represents the strings that appear in the headers of an incoming message in order for the condition or exception to apply. - header_contains: Optional[List[str]] = None + header_contains: Optional[list[str]] = None # The importance property importance: Optional[Importance] = None # Indicates whether an incoming message must be an approval request in order for the condition or exception to apply. @@ -56,9 +57,9 @@ class MessageRulePredicates(AdditionalDataHolder, Parsable): # Indicates whether the owner of the mailbox must not be a recipient of an incoming message in order for the condition or exception to apply. not_sent_to_me: Optional[bool] = None # Represents the strings that appear in either the toRecipients or ccRecipients properties of an incoming message in order for the condition or exception to apply. - recipient_contains: Optional[List[str]] = None + recipient_contains: Optional[list[str]] = None # Represents the strings that appear in the from property of an incoming message in order for the condition or exception to apply. - sender_contains: Optional[List[str]] = None + sender_contains: Optional[list[str]] = None # The sensitivity property sensitivity: Optional[Sensitivity] = None # Indicates whether the owner of the mailbox must be in the ccRecipients property of an incoming message in order for the condition or exception to apply. @@ -66,13 +67,13 @@ class MessageRulePredicates(AdditionalDataHolder, Parsable): # Indicates whether the owner of the mailbox must be the only recipient in an incoming message in order for the condition or exception to apply. sent_only_to_me: Optional[bool] = None # Represents the email addresses that an incoming message must have been sent to in order for the condition or exception to apply. - sent_to_addresses: Optional[List[Recipient]] = None + sent_to_addresses: Optional[list[Recipient]] = None # Indicates whether the owner of the mailbox must be in the toRecipients property of an incoming message in order for the condition or exception to apply. sent_to_me: Optional[bool] = None # Indicates whether the owner of the mailbox must be in either a toRecipients or ccRecipients property of an incoming message in order for the condition or exception to apply. sent_to_or_cc_me: Optional[bool] = None # Represents the strings that appear in the subject of an incoming message in order for the condition or exception to apply. - subject_contains: Optional[List[str]] = None + subject_contains: Optional[list[str]] = None # The withinSizeRange property within_size_range: Optional[SizeRange] = None @@ -87,10 +88,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MessageRulePredica raise TypeError("parse_node cannot be null.") return MessageRulePredicates() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .importance import Importance from .message_action_flag import MessageActionFlag @@ -104,7 +105,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .sensitivity import Sensitivity from .size_range import SizeRange - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "bodyContains": lambda n : setattr(self, 'body_contains', n.get_collection_of_primitive_values(str)), "bodyOrSubjectContains": lambda n : setattr(self, 'body_or_subject_contains', n.get_collection_of_primitive_values(str)), "categories": lambda n : setattr(self, 'categories', n.get_collection_of_primitive_values(str)), @@ -146,6 +147,12 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .importance import Importance + from .message_action_flag import MessageActionFlag + from .recipient import Recipient + from .sensitivity import Sensitivity + from .size_range import SizeRange + writer.write_collection_of_primitive_values("bodyContains", self.body_contains) writer.write_collection_of_primitive_values("bodyOrSubjectContains", self.body_or_subject_contains) writer.write_collection_of_primitive_values("categories", self.categories) diff --git a/tests/validation/validation/models/multi_value_legacy_extended_property.py b/tests/validation/validation/models/multi_value_legacy_extended_property.py index 07640946..036d1e37 100644 --- a/tests/validation/validation/models/multi_value_legacy_extended_property.py +++ b/tests/validation/validation/models/multi_value_legacy_extended_property.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .entity import Entity @@ -9,9 +10,9 @@ from .entity import Entity @dataclass -class MultiValueLegacyExtendedProperty(Entity): +class MultiValueLegacyExtendedProperty(Entity, Parsable): # A collection of property values. - value: Optional[List[str]] = None + value: Optional[list[str]] = None @staticmethod def create_from_discriminator_value(parse_node: ParseNode) -> MultiValueLegacyExtendedProperty: @@ -24,16 +25,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MultiValueLegacyEx raise TypeError("parse_node cannot be null.") return MultiValueLegacyExtendedProperty() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .entity import Entity from .entity import Entity - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "value": lambda n : setattr(self, 'value', n.get_collection_of_primitive_values(str)), } super_fields = super().get_field_deserializers() @@ -49,6 +50,8 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .entity import Entity + writer.write_collection_of_primitive_values("value", self.value) diff --git a/tests/validation/validation/models/o_data_errors/error_details.py b/tests/validation/validation/models/o_data_errors/error_details.py index 2dbfb161..40806352 100644 --- a/tests/validation/validation/models/o_data_errors/error_details.py +++ b/tests/validation/validation/models/o_data_errors/error_details.py @@ -1,12 +1,13 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union @dataclass class ErrorDetails(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The code property code: Optional[str] = None @@ -26,12 +27,12 @@ def create_from_discriminator_value(parse_node: ParseNode) -> ErrorDetails: raise TypeError("parse_node cannot be null.") return ErrorDetails() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "message": lambda n : setattr(self, 'message', n.get_str_value()), "target": lambda n : setattr(self, 'target', n.get_str_value()), diff --git a/tests/validation/validation/models/o_data_errors/inner_error.py b/tests/validation/validation/models/o_data_errors/inner_error.py index a1dd5e19..df79ea3a 100644 --- a/tests/validation/validation/models/o_data_errors/inner_error.py +++ b/tests/validation/validation/models/o_data_errors/inner_error.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union @dataclass class InnerError(AdditionalDataHolder, Parsable): @@ -9,7 +10,7 @@ class InnerError(AdditionalDataHolder, Parsable): The structure of this object is service-specific """ # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) @staticmethod @@ -23,12 +24,12 @@ def create_from_discriminator_value(parse_node: ParseNode) -> InnerError: raise TypeError("parse_node cannot be null.") return InnerError() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { } return fields diff --git a/tests/validation/validation/models/o_data_errors/main_error.py b/tests/validation/validation/models/o_data_errors/main_error.py index c66cf836..00d88bb5 100644 --- a/tests/validation/validation/models/o_data_errors/main_error.py +++ b/tests/validation/validation/models/o_data_errors/main_error.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .error_details import ErrorDetails @@ -10,12 +11,12 @@ @dataclass class MainError(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The code property code: Optional[str] = None # The details property - details: Optional[List[ErrorDetails]] = None + details: Optional[list[ErrorDetails]] = None # The structure of this object is service-specific inner_error: Optional[InnerError] = None # The message property @@ -34,10 +35,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> MainError: raise TypeError("parse_node cannot be null.") return MainError() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .error_details import ErrorDetails from .inner_error import InnerError @@ -45,7 +46,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .error_details import ErrorDetails from .inner_error import InnerError - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "code": lambda n : setattr(self, 'code', n.get_str_value()), "details": lambda n : setattr(self, 'details', n.get_collection_of_object_values(ErrorDetails)), "innerError": lambda n : setattr(self, 'inner_error', n.get_object_value(InnerError)), @@ -62,6 +63,9 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .error_details import ErrorDetails + from .inner_error import InnerError + writer.write_str_value("code", self.code) writer.write_collection_of_object_values("details", self.details) writer.write_object_value("innerError", self.inner_error) diff --git a/tests/validation/validation/models/o_data_errors/o_data_error.py b/tests/validation/validation/models/o_data_errors/o_data_error.py index 457f1d3e..d530868c 100644 --- a/tests/validation/validation/models/o_data_errors/o_data_error.py +++ b/tests/validation/validation/models/o_data_errors/o_data_error.py @@ -1,16 +1,17 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.api_error import APIError from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .main_error import MainError @dataclass -class ODataError(APIError): +class ODataError(APIError, AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The error property error: Optional[MainError] = None @@ -26,16 +27,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> ODataError: raise TypeError("parse_node cannot be null.") return ODataError() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .main_error import MainError from .main_error import MainError - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "error": lambda n : setattr(self, 'error', n.get_object_value(MainError)), } return fields @@ -48,11 +49,13 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .main_error import MainError + writer.write_object_value("error", self.error) writer.write_additional_data_value(self.additional_data) @property - def primary_message(self) -> str: + def primary_message(self) -> Optional[str]: """ The primary error message. """ diff --git a/tests/validation/validation/models/outlook_item.py b/tests/validation/validation/models/outlook_item.py index d049dcd6..1a98a9d7 100644 --- a/tests/validation/validation/models/outlook_item.py +++ b/tests/validation/validation/models/outlook_item.py @@ -1,8 +1,9 @@ from __future__ import annotations import datetime +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .entity import Entity @@ -10,9 +11,9 @@ from .entity import Entity @dataclass -class OutlookItem(Entity): +class OutlookItem(Entity, Parsable): # The categories associated with the item - categories: Optional[List[str]] = None + categories: Optional[list[str]] = None # Identifies the version of the item. Every time the item is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. change_key: Optional[str] = None # The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z @@ -31,16 +32,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> OutlookItem: raise TypeError("parse_node cannot be null.") return OutlookItem() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .entity import Entity from .entity import Entity - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "categories": lambda n : setattr(self, 'categories', n.get_collection_of_primitive_values(str)), "changeKey": lambda n : setattr(self, 'change_key', n.get_str_value()), "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), @@ -59,6 +60,8 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .entity import Entity + writer.write_collection_of_primitive_values("categories", self.categories) writer.write_str_value("changeKey", self.change_key) writer.write_datetime_value("createdDateTime", self.created_date_time) diff --git a/tests/validation/validation/models/recipient.py b/tests/validation/validation/models/recipient.py index 0f610252..ce24c666 100644 --- a/tests/validation/validation/models/recipient.py +++ b/tests/validation/validation/models/recipient.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .email_address import EmailAddress @@ -9,7 +10,7 @@ @dataclass class Recipient(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The emailAddress property email_address: Optional[EmailAddress] = None @@ -25,16 +26,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Recipient: raise TypeError("parse_node cannot be null.") return Recipient() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .email_address import EmailAddress from .email_address import EmailAddress - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "emailAddress": lambda n : setattr(self, 'email_address', n.get_object_value(EmailAddress)), } return fields @@ -47,6 +48,8 @@ def serialize(self,writer: SerializationWriter) -> None: """ if writer is None: raise TypeError("writer cannot be null.") + from .email_address import EmailAddress + writer.write_object_value("emailAddress", self.email_address) writer.write_additional_data_value(self.additional_data) diff --git a/tests/validation/validation/models/single_value_legacy_extended_property.py b/tests/validation/validation/models/single_value_legacy_extended_property.py index b7d6648b..1950c590 100644 --- a/tests/validation/validation/models/single_value_legacy_extended_property.py +++ b/tests/validation/validation/models/single_value_legacy_extended_property.py @@ -1,7 +1,8 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .entity import Entity @@ -9,7 +10,7 @@ from .entity import Entity @dataclass -class SingleValueLegacyExtendedProperty(Entity): +class SingleValueLegacyExtendedProperty(Entity, Parsable): # A property value. value: Optional[str] = None @@ -24,16 +25,16 @@ def create_from_discriminator_value(parse_node: ParseNode) -> SingleValueLegacyE raise TypeError("parse_node cannot be null.") return SingleValueLegacyExtendedProperty() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ from .entity import Entity from .entity import Entity - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "value": lambda n : setattr(self, 'value', n.get_str_value()), } super_fields = super().get_field_deserializers() @@ -49,6 +50,8 @@ def serialize(self,writer: SerializationWriter) -> None: if writer is None: raise TypeError("writer cannot be null.") super().serialize(writer) + from .entity import Entity + writer.write_str_value("value", self.value) diff --git a/tests/validation/validation/models/size_range.py b/tests/validation/validation/models/size_range.py index 5645ac2e..4b097781 100644 --- a/tests/validation/validation/models/size_range.py +++ b/tests/validation/validation/models/size_range.py @@ -1,12 +1,13 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union @dataclass class SizeRange(AdditionalDataHolder, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - additional_data: Dict[str, Any] = field(default_factory=dict) + additional_data: dict[str, Any] = field(default_factory=dict) # The maximum size (in kilobytes) that an incoming message must have in order for a condition or exception to apply. maximum_size: Optional[int] = None @@ -24,12 +25,12 @@ def create_from_discriminator_value(parse_node: ParseNode) -> SizeRange: raise TypeError("parse_node cannot be null.") return SizeRange() - def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]: """ The deserialization information for the current model - Returns: Dict[str, Callable[[ParseNode], None]] + Returns: dict[str, Callable[[ParseNode], None]] """ - fields: Dict[str, Callable[[Any], None]] = { + fields: dict[str, Callable[[Any], None]] = { "maximumSize": lambda n : setattr(self, 'maximum_size', n.get_int_value()), "minimumSize": lambda n : setattr(self, 'minimum_size', n.get_int_value()), } diff --git a/tests/validation/validation/users/item/inference_classification/inference_classification_request_builder.py b/tests/validation/validation/users/item/inference_classification/inference_classification_request_builder.py index 00903de4..7395e411 100644 --- a/tests/validation/validation/users/item/inference_classification/inference_classification_request_builder.py +++ b/tests/validation/validation/users/item/inference_classification/inference_classification_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -21,7 +22,7 @@ class InferenceClassificationRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/inferenceClassification """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new InferenceClassificationRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -41,7 +42,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Inferenc ) from ....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -64,7 +65,7 @@ async def patch(self,body: InferenceClassification, request_configuration: Optio ) from ....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -138,10 +139,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/inference_classification/overrides/count/count_request_builder.py b/tests/validation/validation/users/item/inference_classification/overrides/count/count_request_builder.py index b60581fa..e4d44262 100644 --- a/tests/validation/validation/users/item/inference_classification/overrides/count/count_request_builder.py +++ b/tests/validation/validation/users/item/inference_classification/overrides/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/inferenceClassification/overrides/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/inference_classification/overrides/item/inference_classification_override_item_request_builder.py b/tests/validation/validation/users/item/inference_classification/overrides/item/inference_classification_override_item_request_builder.py index 0d1e2766..8efe246e 100644 --- a/tests/validation/validation/users/item/inference_classification/overrides/item/inference_classification_override_item_request_builder.py +++ b/tests/validation/validation/users/item/inference_classification/overrides/item/inference_classification_override_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class InferenceClassificationOverrideItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/inferenceClassification/overrides/{inferenceClassificationOverride-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new InferenceClassificationOverrideItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Inferenc ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -81,7 +82,7 @@ async def patch(self,body: InferenceClassificationOverride, request_configuratio ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -164,10 +165,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/inference_classification/overrides/overrides_request_builder.py b/tests/validation/validation/users/item/inference_classification/overrides/overrides_request_builder.py index eb812873..93e89822 100644 --- a/tests/validation/validation/users/item/inference_classification/overrides/overrides_request_builder.py +++ b/tests/validation/validation/users/item/inference_classification/overrides/overrides_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class OverridesRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/inferenceClassification/overrides """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new OverridesRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Override ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: InferenceClassificationOverride, request_configuration ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/count/count_request_builder.py index 79f58a35..9bc3b61a 100644 --- a/tests/validation/validation/users/item/mail_folders/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/child_folders_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/child_folders_request_builder.py index 131d454d..ab26d65a 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/child_folders_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/child_folders_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class ChildFoldersRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ChildFoldersRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[ChildFol ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: MailFolder, request_configuration: Optional[RequestCon ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -171,7 +172,7 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None @@ -180,13 +181,13 @@ def get_query_parameter(self,original_name: str) -> str: include_hidden_folders: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/count/count_request_builder.py index c41b4fcb..d849abe7 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/mail_folder_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/mail_folder_item_request_builder.py index 0beeb2f2..259f8b43 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/mail_folder_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/mail_folder_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -22,7 +23,7 @@ class MailFolderItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MailFolderItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -42,7 +43,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -60,7 +61,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MailFold ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -83,7 +84,7 @@ async def patch(self,body: MailFolder, request_configuration: Optional[RequestCo ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -186,13 +187,13 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Include Hidden Folders include_hidden_folders: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/count/count_request_builder.py index 8add6ac5..265be3f8 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messageRules/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/item/message_rule_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/item/message_rule_item_request_builder.py index c3d61f8c..d128fbed 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/item/message_rule_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/item/message_rule_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class MessageRuleItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messageRules/{messageRule-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessageRuleItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MessageR ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -81,7 +82,7 @@ async def patch(self,body: MessageRule, request_configuration: Optional[RequestC ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -164,10 +165,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/message_rules_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/message_rules_request_builder.py index 0b91eefc..b7a2b622 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/message_rules_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/message_rules/message_rules_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MessageRulesRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messageRules """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessageRulesRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MessageR ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: MessageRule, request_configuration: Optional[RequestCo ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/count/count_request_builder.py index c0dca306..2c3380b2 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/attachments_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/attachments_request_builder.py index 25a618df..ac923a5e 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/attachments_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/attachments_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class AttachmentsRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/{message-id}/attachments """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new AttachmentsRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Attachme ) from ..........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Attachment, request_configuration: Optional[RequestCon ) from ..........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/count/count_request_builder.py index a3180704..10cb84a3 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/{message-id}/attachments/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from ...........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/item/attachment_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/item/attachment_item_request_builder.py index 17f4f117..9e78fb00 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/item/attachment_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/attachments/item/attachment_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class AttachmentItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/{message-id}/attachments/{attachment-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new AttachmentItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from ...........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Attachme ) from ...........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -126,10 +127,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/count/count_request_builder.py index f52a1922..a7bd6edd 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/{message-id}/extensions/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from ...........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/extensions_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/extensions_request_builder.py index 6c693940..8a4d8bd4 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/extensions_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/extensions_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class ExtensionsRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/{message-id}/extensions """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ExtensionsRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Extensio ) from ..........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Extension, request_configuration: Optional[RequestConf ) from ..........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/item/extension_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/item/extension_item_request_builder.py index 7f30b76a..15e5249b 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/item/extension_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/extensions/item/extension_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class ExtensionItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/{message-id}/extensions/{extension-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ExtensionItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from ...........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Extensio ) from ...........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -81,7 +82,7 @@ async def patch(self,body: Extension, request_configuration: Optional[RequestCon ) from ...........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -164,10 +165,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/message_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/message_item_request_builder.py index 97810a44..5bbf8d21 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/message_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/message_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MessageItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/{message-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessageItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -43,7 +44,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -61,7 +62,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MessageI ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -84,7 +85,7 @@ async def patch(self,body: Message, request_configuration: Optional[RequestConfi ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -194,10 +195,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/value/content_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/value/content_request_builder.py index 3c7fa831..9b49dc60 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/value/content_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/item/value/content_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class ContentRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages/{message-id}/$value """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ContentRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from ..........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[QueryPar ) from ..........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -78,7 +79,7 @@ async def put(self,body: bytes, request_configuration: Optional[RequestConfigura ) from ..........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/messages_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/messages_request_builder.py index 888ddf73..bbd875b4 100644 --- a/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/messages_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/child_folders/item/messages/messages_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MessagesRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/childFolders/{mailFolder-id1}/messages """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessagesRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Messages ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Message, request_configuration: Optional[RequestConfig ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/item/mail_folder_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/mail_folder_item_request_builder.py index a6a7e0bf..a2099a53 100644 --- a/tests/validation/validation/users/item/mail_folders/item/mail_folder_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/mail_folder_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MailFolderItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MailFolderItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -43,7 +44,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -61,7 +62,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MailFold ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -84,7 +85,7 @@ async def patch(self,body: MailFolder, request_configuration: Optional[RequestCo ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -196,13 +197,13 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Include Hidden Folders include_hidden_folders: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/message_rules/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/message_rules/count/count_request_builder.py index 65a739a3..36a949a6 100644 --- a/tests/validation/validation/users/item/mail_folders/item/message_rules/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/message_rules/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messageRules/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/message_rules/item/message_rule_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/message_rules/item/message_rule_item_request_builder.py index 0f992668..31676eb3 100644 --- a/tests/validation/validation/users/item/mail_folders/item/message_rules/item/message_rule_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/message_rules/item/message_rule_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class MessageRuleItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messageRules/{messageRule-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessageRuleItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MessageR ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -81,7 +82,7 @@ async def patch(self,body: MessageRule, request_configuration: Optional[RequestC ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -164,10 +165,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/message_rules/message_rules_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/message_rules/message_rules_request_builder.py index f84bdf33..062efb4b 100644 --- a/tests/validation/validation/users/item/mail_folders/item/message_rules/message_rules_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/message_rules/message_rules_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MessageRulesRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messageRules """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessageRulesRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MessageR ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: MessageRule, request_configuration: Optional[RequestCo ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/count/count_request_builder.py index 1e9a7945..f5e7f440 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/attachments_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/attachments_request_builder.py index b64468a0..6c6b1a33 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/attachments_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/attachments_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class AttachmentsRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/attachments """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new AttachmentsRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Attachme ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Attachment, request_configuration: Optional[RequestCon ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/count/count_request_builder.py index 832da87b..5a5f17d3 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/attachments/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/item/attachment_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/item/attachment_item_request_builder.py index 35401b9d..d0050bea 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/item/attachment_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/item/attachments/item/attachment_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class AttachmentItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/attachments/{attachment-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new AttachmentItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Attachme ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -126,10 +127,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/count/count_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/count/count_request_builder.py index bd136b2b..cd7e1391 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/count/count_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/extensions/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/extensions_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/extensions_request_builder.py index 95f080c2..f52ea29b 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/extensions_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/extensions_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class ExtensionsRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/extensions """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ExtensionsRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Extensio ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Extension, request_configuration: Optional[RequestConf ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/item/extension_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/item/extension_item_request_builder.py index e71f7811..d6f2fe45 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/item/extension_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/item/extensions/item/extension_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class ExtensionItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/extensions/{extension-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ExtensionItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Extensio ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -81,7 +82,7 @@ async def patch(self,body: Extension, request_configuration: Optional[RequestCon ) from .........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -164,10 +165,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/item/message_item_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/item/message_item_request_builder.py index d6a807cf..f7948163 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/item/message_item_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/item/message_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MessageItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessageItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -43,7 +44,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -61,7 +62,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MessageI ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -84,7 +85,7 @@ async def patch(self,body: Message, request_configuration: Optional[RequestConfi ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -194,10 +195,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/item/value/content_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/item/value/content_request_builder.py index 7806350c..fcf92bb4 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/item/value/content_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/item/value/content_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class ContentRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages/{message-id}/$value """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ContentRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[QueryPar ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -78,7 +79,7 @@ async def put(self,body: bytes, request_configuration: Optional[RequestConfigura ) from ........models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/mail_folders/item/messages/messages_request_builder.py b/tests/validation/validation/users/item/mail_folders/item/messages/messages_request_builder.py index 988580f0..c9db8148 100644 --- a/tests/validation/validation/users/item/mail_folders/item/messages/messages_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/item/messages/messages_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MessagesRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders/{mailFolder-id}/messages """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessagesRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Messages ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Message, request_configuration: Optional[RequestConfig ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/mail_folders/mail_folders_request_builder.py b/tests/validation/validation/users/item/mail_folders/mail_folders_request_builder.py index 2f8f9714..903e7aff 100644 --- a/tests/validation/validation/users/item/mail_folders/mail_folders_request_builder.py +++ b/tests/validation/validation/users/item/mail_folders/mail_folders_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MailFoldersRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/mailFolders """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MailFoldersRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MailFold ) from ....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: MailFolder, request_configuration: Optional[RequestCon ) from ....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -171,7 +172,7 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None @@ -180,13 +181,13 @@ def get_query_parameter(self,original_name: str) -> str: include_hidden_folders: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/messages/count/count_request_builder.py b/tests/validation/validation/users/item/messages/count/count_request_builder.py index 4ed3506b..756a29d2 100644 --- a/tests/validation/validation/users/item/messages/count/count_request_builder.py +++ b/tests/validation/validation/users/item/messages/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/messages/item/attachments/attachments_request_builder.py b/tests/validation/validation/users/item/messages/item/attachments/attachments_request_builder.py index 8ef8cd26..ac2a16c5 100644 --- a/tests/validation/validation/users/item/messages/item/attachments/attachments_request_builder.py +++ b/tests/validation/validation/users/item/messages/item/attachments/attachments_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class AttachmentsRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/{message-id}/attachments """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new AttachmentsRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Attachme ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Attachment, request_configuration: Optional[RequestCon ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/messages/item/attachments/count/count_request_builder.py b/tests/validation/validation/users/item/messages/item/attachments/count/count_request_builder.py index dab51799..87b7289b 100644 --- a/tests/validation/validation/users/item/messages/item/attachments/count/count_request_builder.py +++ b/tests/validation/validation/users/item/messages/item/attachments/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/{message-id}/attachments/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/messages/item/attachments/item/attachment_item_request_builder.py b/tests/validation/validation/users/item/messages/item/attachments/item/attachment_item_request_builder.py index 2307493f..e78c784d 100644 --- a/tests/validation/validation/users/item/messages/item/attachments/item/attachment_item_request_builder.py +++ b/tests/validation/validation/users/item/messages/item/attachments/item/attachment_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class AttachmentItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/{message-id}/attachments/{attachment-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new AttachmentItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Attachme ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -126,10 +127,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/messages/item/extensions/count/count_request_builder.py b/tests/validation/validation/users/item/messages/item/extensions/count/count_request_builder.py index 0bd7629a..697822e8 100644 --- a/tests/validation/validation/users/item/messages/item/extensions/count/count_request_builder.py +++ b/tests/validation/validation/users/item/messages/item/extensions/count/count_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class CountRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/{message-id}/extensions/$count """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new CountRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CountReq ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/messages/item/extensions/extensions_request_builder.py b/tests/validation/validation/users/item/messages/item/extensions/extensions_request_builder.py index 20cd2e37..026d09e2 100644 --- a/tests/validation/validation/users/item/messages/item/extensions/extensions_request_builder.py +++ b/tests/validation/validation/users/item/messages/item/extensions/extensions_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class ExtensionsRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/{message-id}/extensions """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ExtensionsRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Extensio ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Extension, request_configuration: Optional[RequestConf ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -169,19 +170,19 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/messages/item/extensions/item/extension_item_request_builder.py b/tests/validation/validation/users/item/messages/item/extensions/item/extension_item_request_builder.py index 1bb2199b..bc2f7912 100644 --- a/tests/validation/validation/users/item/messages/item/extensions/item/extension_item_request_builder.py +++ b/tests/validation/validation/users/item/messages/item/extensions/item/extension_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -20,7 +21,7 @@ class ExtensionItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/{message-id}/extensions/{extension-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ExtensionItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -40,7 +41,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -58,7 +59,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Extensio ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -81,7 +82,7 @@ async def patch(self,body: Extension, request_configuration: Optional[RequestCon ) from .......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -164,10 +165,10 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/messages/item/message_item_request_builder.py b/tests/validation/validation/users/item/messages/item/message_item_request_builder.py index 03e4a16d..fd0188ee 100644 --- a/tests/validation/validation/users/item/messages/item/message_item_request_builder.py +++ b/tests/validation/validation/users/item/messages/item/message_item_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MessageItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/{message-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessageItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -43,7 +44,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -61,7 +62,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MessageI ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -84,7 +85,7 @@ async def patch(self,body: Message, request_configuration: Optional[RequestConfi ) from .....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -196,13 +197,13 @@ def get_query_parameter(self,original_name: str) -> str: return original_name # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Include Hidden Messages include_hidden_messages: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None @dataclass diff --git a/tests/validation/validation/users/item/messages/item/value/content_request_builder.py b/tests/validation/validation/users/item/messages/item/value/content_request_builder.py index 588714de..1796e1d2 100644 --- a/tests/validation/validation/users/item/messages/item/value/content_request_builder.py +++ b/tests/validation/validation/users/item/messages/item/value/content_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -19,7 +20,7 @@ class ContentRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages/{message-id}/$value """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new ContentRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -39,7 +40,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[QueryPar ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -78,7 +79,7 @@ async def put(self,body: bytes, request_configuration: Optional[RequestConfigura ) from ......models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: diff --git a/tests/validation/validation/users/item/messages/messages_request_builder.py b/tests/validation/validation/users/item/messages/messages_request_builder.py index 28f7ab25..caa838c6 100644 --- a/tests/validation/validation/users/item/messages/messages_request_builder.py +++ b/tests/validation/validation/users/item/messages/messages_request_builder.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass, field from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.base_request_configuration import RequestConfiguration @@ -9,7 +10,7 @@ from kiota_abstractions.request_information import RequestInformation from kiota_abstractions.request_option import RequestOption from kiota_abstractions.serialization import Parsable, ParsableFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from warnings import warn if TYPE_CHECKING: @@ -23,7 +24,7 @@ class MessagesRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id}/messages """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new MessagesRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. @@ -57,7 +58,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Messages ) from ....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -80,7 +81,7 @@ async def post(self,body: Message, request_configuration: Optional[RequestConfig ) from ....models.o_data_errors.o_data_error import ODataError - error_mapping: Dict[str, type[ParsableFactory]] = { + error_mapping: dict[str, type[ParsableFactory]] = { "XXX": ODataError, } if not self.request_adapter: @@ -171,7 +172,7 @@ def get_query_parameter(self,original_name: str) -> str: count: Optional[bool] = None # Expand related entities - expand: Optional[List[str]] = None + expand: Optional[list[str]] = None # Filter items by property values filter: Optional[str] = None @@ -180,13 +181,13 @@ def get_query_parameter(self,original_name: str) -> str: include_hidden_messages: Optional[str] = None # Order items by property values - orderby: Optional[List[str]] = None + orderby: Optional[list[str]] = None # Search items by search phrases search: Optional[str] = None # Select properties to be returned - select: Optional[List[str]] = None + select: Optional[list[str]] = None # Skip the first n items skip: Optional[int] = None diff --git a/tests/validation/validation/users/item/user_item_request_builder.py b/tests/validation/validation/users/item/user_item_request_builder.py index cef08815..aa7212ea 100644 --- a/tests/validation/validation/users/item/user_item_request_builder.py +++ b/tests/validation/validation/users/item/user_item_request_builder.py @@ -1,8 +1,9 @@ from __future__ import annotations +from collections.abc import Callable from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.get_path_parameters import get_path_parameters from kiota_abstractions.request_adapter import RequestAdapter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .inference_classification.inference_classification_request_builder import InferenceClassificationRequestBuilder @@ -13,7 +14,7 @@ class UserItemRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users/{user-id} """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new UserItemRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. diff --git a/tests/validation/validation/users/users_request_builder.py b/tests/validation/validation/users/users_request_builder.py index 377ec1dc..abecd0d9 100644 --- a/tests/validation/validation/users/users_request_builder.py +++ b/tests/validation/validation/users/users_request_builder.py @@ -1,8 +1,9 @@ from __future__ import annotations +from collections.abc import Callable from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.get_path_parameters import get_path_parameters from kiota_abstractions.request_adapter import RequestAdapter -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .item.user_item_request_builder import UserItemRequestBuilder @@ -11,7 +12,7 @@ class UsersRequestBuilder(BaseRequestBuilder): """ Builds and executes requests for operations under /users """ - def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, dict[str, Any]]) -> None: """ Instantiates a new UsersRequestBuilder and sets the default values. param path_parameters: The raw url or the url-template parameters for the request. diff --git a/tests/validation/validation/validation_client.py b/tests/validation/validation/validation_client.py index 3a74785d..09508931 100644 --- a/tests/validation/validation/validation_client.py +++ b/tests/validation/validation/validation_client.py @@ -1,4 +1,5 @@ from __future__ import annotations +from collections.abc import Callable from kiota_abstractions.api_client_builder import enable_backing_store_for_serialization_writer_factory, register_default_deserializer, register_default_serializer from kiota_abstractions.base_request_builder import BaseRequestBuilder from kiota_abstractions.get_path_parameters import get_path_parameters @@ -11,7 +12,7 @@ from kiota_serialization_multipart.multipart_serialization_writer_factory import MultipartSerializationWriterFactory from kiota_serialization_text.text_parse_node_factory import TextParseNodeFactory from kiota_serialization_text.text_serialization_writer_factory import TextSerializationWriterFactory -from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: from .users.users_request_builder import UsersRequestBuilder