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

@dataclass
class WithContractGetResponse_additionalContacts(Parsable):
    # Not relevant
    cost_payment_application_contact_id: Optional[str] = None
    # Not relevant
    rfq_recipient_id: Optional[list[str]] = None
    # Not relevant
    sco_signatory_id: Optional[str] = None
    # Not relevant
    signatory_id: Optional[str] = None
    # Not relevant
    sov_contact_id: Optional[str] = None
    
    @staticmethod
    def create_from_discriminator_value(parse_node: ParseNode) -> WithContractGetResponse_additionalContacts:
        """
        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: WithContractGetResponse_additionalContacts
        """
        if parse_node is None:
            raise TypeError("parse_node cannot be null.")
        return WithContractGetResponse_additionalContacts()
    
    def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
        """
        The deserialization information for the current model
        Returns: dict[str, Callable[[ParseNode], None]]
        """
        fields: dict[str, Callable[[Any], None]] = {
            "costPaymentApplicationContactId": lambda n : setattr(self, 'cost_payment_application_contact_id', n.get_str_value()),
            "rfqRecipientId": lambda n : setattr(self, 'rfq_recipient_id', n.get_collection_of_primitive_values(str)),
            "scoSignatoryId": lambda n : setattr(self, 'sco_signatory_id', n.get_str_value()),
            "signatoryId": lambda n : setattr(self, 'signatory_id', n.get_str_value()),
            "sovContactId": lambda n : setattr(self, 'sov_contact_id', n.get_str_value()),
        }
        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_str_value("costPaymentApplicationContactId", self.cost_payment_application_contact_id)
        writer.write_collection_of_primitive_values("rfqRecipientId", self.rfq_recipient_id)
        writer.write_str_value("scoSignatoryId", self.sco_signatory_id)
        writer.write_str_value("signatoryId", self.signatory_id)
        writer.write_str_value("sovContactId", self.sov_contact_id)
    

