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 to include with the exported files.Note that unpublished markups are those visible only to their creator.
    """
    # The options for which Issues markups to export.No Issues markups will be exported if both options are set to ``false``.
    issue_markups: Optional[ExportsPostRequestBody_options_issueMarkups] = None
    # The name of the file that will be produced by the export operation. This should not include the filename extension.
    output_file_name: Optional[str] = None
    # The options for which Photos markups to export.No Photos markups will be exported if both options are set to ``false``.
    photo_markups: Optional[ExportsPostRequestBody_options_photoMarkups] = None
    # The options for which standard markups and associated links to export.No markups or links will be exported if all options are set to ``false``.
    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)
    

