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 PaymentsGetResponse_additionalCollaborators(Parsable):
    # The BIM360/ACC ID of the firm.
    company_id: Optional[str] = None
    # The unique ID (UUID) of the company in this account. Detailed company information can be retrieved using this UUID by calling `GET companies/:company_id <en/docs/bim360/v1/reference/http/companies-:company_id-GET/>`_ in the response.
    company_uid: Optional[str] = None
    # The BIM360/ACC user ID of the contacts in the firm.
    contact_ids: Optional[list[str]] = None
    
    @staticmethod
    def create_from_discriminator_value(parse_node: ParseNode) -> PaymentsGetResponse_additionalCollaborators:
        """
        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: PaymentsGetResponse_additionalCollaborators
        """
        if parse_node is None:
            raise TypeError("parse_node cannot be null.")
        return PaymentsGetResponse_additionalCollaborators()
    
    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]] = {
            "companyId": lambda n : setattr(self, 'company_id', n.get_str_value()),
            "companyUid": lambda n : setattr(self, 'company_uid', n.get_str_value()),
            "contactIds": lambda n : setattr(self, 'contact_ids', n.get_collection_of_primitive_values(str)),
        }
        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("companyId", self.company_id)
        writer.write_str_value("companyUid", self.company_uid)
        writer.write_collection_of_primitive_values("contactIds", self.contact_ids)
    

