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, Optional, TYPE_CHECKING, Union

if TYPE_CHECKING:
    from .thumbnails_batch_get_post_request_body_type import ThumbnailsBatchGetPostRequestBody_type

@dataclass
class ThumbnailsBatchGetPostRequestBody(Parsable):
    # The IDs of the review sheets you want to get the thumbnails from.To find the review sheet IDs, call `GET review-sheets </en/docs/acc/v1/reference/http/sheets-review-sheets-GET/>`_.- The max number of items is 100.
    review_sheet_ids: Optional[list[str]] = None
    # The size type of the thumbnails. Possible values:- ``big``: the max size will be 512 pixels.- ``small``: the max size will be 256 pixels.- ``tiny``: the max size will be 64 pixels.
    type: Optional[ThumbnailsBatchGetPostRequestBody_type] = None
    
    @staticmethod
    def create_from_discriminator_value(parse_node: ParseNode) -> ThumbnailsBatchGetPostRequestBody:
        """
        Creates a new instance of the appropriate class based on discriminator value
        param parse_node: The parse node to use to read the discriminator value and create the object
        Returns: ThumbnailsBatchGetPostRequestBody
        """
        if parse_node is None:
            raise TypeError("parse_node cannot be null.")
        return ThumbnailsBatchGetPostRequestBody()
    
    def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
        """
        The deserialization information for the current model
        Returns: dict[str, Callable[[ParseNode], None]]
        """
        from .thumbnails_batch_get_post_request_body_type import ThumbnailsBatchGetPostRequestBody_type

        from .thumbnails_batch_get_post_request_body_type import ThumbnailsBatchGetPostRequestBody_type

        fields: dict[str, Callable[[Any], None]] = {
            "reviewSheetIds": lambda n : setattr(self, 'review_sheet_ids', n.get_collection_of_primitive_values(str)),
            "type": lambda n : setattr(self, 'type', n.get_enum_value(ThumbnailsBatchGetPostRequestBody_type)),
        }
        return fields
    
    def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        writer.write_collection_of_primitive_values("reviewSheetIds", self.review_sheet_ids)
        writer.write_enum_value("type", self.type)
    

