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 .exports_post_request_body_options_issue_markups import ExportsPostRequestBody_options_issueMarkups
    from .exports_post_request_body_options_photo_markups import ExportsPostRequestBody_options_photoMarkups
    from .exports_post_request_body_options_standard_markups import ExportsPostRequestBody_options_standardMarkups

@dataclass
class ExportsPostRequestBody_options(Parsable):
    """
    The criteria for the markups and links that should be included with the exported sheets.Note that unpublished markups are only visible to their creator.
    """
    # The list of types of issue markups to export.
    issue_markups: Optional[ExportsPostRequestBody_options_issueMarkups] = None
    # The name of the file that will be generated by the export process. Note that this name should not include the file extension. The maximum character limit for this field is 255 characters.
    output_file_name: Optional[str] = None
    # The list of types of photo markups to export.
    photo_markups: Optional[ExportsPostRequestBody_options_photoMarkups] = None
    # The list of types of standard markups and their associated links that you want to include in the export.By default markups will be exported and hyperlinks will not be exported.
    standard_markups: Optional[ExportsPostRequestBody_options_standardMarkups] = None
    
    @staticmethod
    def create_from_discriminator_value(parse_node: ParseNode) -> ExportsPostRequestBody_options:
        """
        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: ExportsPostRequestBody_options
        """
        if parse_node is None:
            raise TypeError("parse_node cannot be null.")
        return ExportsPostRequestBody_options()
    
    def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
        """
        The deserialization information for the current model
        Returns: dict[str, Callable[[ParseNode], None]]
        """
        from .exports_post_request_body_options_issue_markups import ExportsPostRequestBody_options_issueMarkups
        from .exports_post_request_body_options_photo_markups import ExportsPostRequestBody_options_photoMarkups
        from .exports_post_request_body_options_standard_markups import ExportsPostRequestBody_options_standardMarkups

        from .exports_post_request_body_options_issue_markups import ExportsPostRequestBody_options_issueMarkups
        from .exports_post_request_body_options_photo_markups import ExportsPostRequestBody_options_photoMarkups
        from .exports_post_request_body_options_standard_markups import ExportsPostRequestBody_options_standardMarkups

        fields: dict[str, Callable[[Any], None]] = {
            "issueMarkups": lambda n : setattr(self, 'issue_markups', n.get_object_value(ExportsPostRequestBody_options_issueMarkups)),
            "outputFileName": lambda n : setattr(self, 'output_file_name', n.get_str_value()),
            "photoMarkups": lambda n : setattr(self, 'photo_markups', n.get_object_value(ExportsPostRequestBody_options_photoMarkups)),
            "standardMarkups": lambda n : setattr(self, 'standard_markups', n.get_object_value(ExportsPostRequestBody_options_standardMarkups)),
        }
        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_object_value("issueMarkups", self.issue_markups)
        writer.write_str_value("outputFileName", self.output_file_name)
        writer.write_object_value("photoMarkups", self.photo_markups)
        writer.write_object_value("standardMarkups", self.standard_markups)
    

