from __future__ import annotations
import datetime
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
from uuid import UUID

@dataclass
class SearchGetResponse(Parsable):
    # The about_me property
    about_me: Optional[str] = None
    # The account_id property
    account_id: Optional[UUID] = None
    # The address_line_1 property
    address_line_1: Optional[str] = None
    # The address_line_2 property
    address_line_2: Optional[str] = None
    # The city property
    city: Optional[str] = None
    # The company property
    company: Optional[str] = None
    # The company_id property
    company_id: Optional[UUID] = None
    # The company_name property
    company_name: Optional[str] = None
    # The country property
    country: Optional[str] = None
    # The created_at property
    created_at: Optional[datetime.datetime] = None
    # The default_role property
    default_role: Optional[str] = None
    # The default_role_id property
    default_role_id: Optional[str] = None
    # The email property
    email: Optional[str] = None
    # The first_name property
    first_name: Optional[str] = None
    # The id property
    id: Optional[UUID] = None
    # The image_url property
    image_url: Optional[str] = None
    # The industry property
    industry: Optional[str] = None
    # The job_title property
    job_title: Optional[str] = None
    # The last_name property
    last_name: Optional[str] = None
    # The last_sign_in property
    last_sign_in: Optional[datetime.datetime] = None
    # The name property
    name: Optional[str] = None
    # The nickname property
    nickname: Optional[str] = None
    # The phone property
    phone: Optional[str] = None
    # The postal_code property
    postal_code: Optional[str] = None
    # The role property
    role: Optional[str] = None
    # The state_or_province property
    state_or_province: Optional[str] = None
    # The status property
    status: Optional[str] = None
    # The uid property
    uid: Optional[str] = None
    # The updated_at property
    updated_at: Optional[datetime.datetime] = None
    
    @staticmethod
    def create_from_discriminator_value(parse_node: ParseNode) -> SearchGetResponse:
        """
        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: SearchGetResponse
        """
        if parse_node is None:
            raise TypeError("parse_node cannot be null.")
        return SearchGetResponse()
    
    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]] = {
            "about_me": lambda n : setattr(self, 'about_me', n.get_str_value()),
            "account_id": lambda n : setattr(self, 'account_id', n.get_uuid_value()),
            "address_line_1": lambda n : setattr(self, 'address_line_1', n.get_str_value()),
            "address_line_2": lambda n : setattr(self, 'address_line_2', n.get_str_value()),
            "city": lambda n : setattr(self, 'city', n.get_str_value()),
            "company": lambda n : setattr(self, 'company', n.get_str_value()),
            "company_id": lambda n : setattr(self, 'company_id', n.get_uuid_value()),
            "company_name": lambda n : setattr(self, 'company_name', n.get_str_value()),
            "country": lambda n : setattr(self, 'country', n.get_str_value()),
            "created_at": lambda n : setattr(self, 'created_at', n.get_datetime_value()),
            "default_role": lambda n : setattr(self, 'default_role', n.get_str_value()),
            "default_role_id": lambda n : setattr(self, 'default_role_id', n.get_str_value()),
            "email": lambda n : setattr(self, 'email', n.get_str_value()),
            "first_name": lambda n : setattr(self, 'first_name', n.get_str_value()),
            "id": lambda n : setattr(self, 'id', n.get_uuid_value()),
            "image_url": lambda n : setattr(self, 'image_url', n.get_str_value()),
            "industry": lambda n : setattr(self, 'industry', n.get_str_value()),
            "job_title": lambda n : setattr(self, 'job_title', n.get_str_value()),
            "last_name": lambda n : setattr(self, 'last_name', n.get_str_value()),
            "last_sign_in": lambda n : setattr(self, 'last_sign_in', n.get_datetime_value()),
            "name": lambda n : setattr(self, 'name', n.get_str_value()),
            "nickname": lambda n : setattr(self, 'nickname', n.get_str_value()),
            "phone": lambda n : setattr(self, 'phone', n.get_str_value()),
            "postal_code": lambda n : setattr(self, 'postal_code', n.get_str_value()),
            "role": lambda n : setattr(self, 'role', n.get_str_value()),
            "state_or_province": lambda n : setattr(self, 'state_or_province', n.get_str_value()),
            "status": lambda n : setattr(self, 'status', n.get_str_value()),
            "uid": lambda n : setattr(self, 'uid', n.get_str_value()),
            "updated_at": lambda n : setattr(self, 'updated_at', n.get_datetime_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("about_me", self.about_me)
        writer.write_uuid_value("account_id", self.account_id)
        writer.write_str_value("address_line_1", self.address_line_1)
        writer.write_str_value("address_line_2", self.address_line_2)
        writer.write_str_value("city", self.city)
        writer.write_str_value("company", self.company)
        writer.write_uuid_value("company_id", self.company_id)
        writer.write_str_value("company_name", self.company_name)
        writer.write_str_value("country", self.country)
        writer.write_datetime_value("created_at", self.created_at)
        writer.write_str_value("default_role", self.default_role)
        writer.write_str_value("default_role_id", self.default_role_id)
        writer.write_str_value("email", self.email)
        writer.write_str_value("first_name", self.first_name)
        writer.write_uuid_value("id", self.id)
        writer.write_str_value("image_url", self.image_url)
        writer.write_str_value("industry", self.industry)
        writer.write_str_value("job_title", self.job_title)
        writer.write_str_value("last_name", self.last_name)
        writer.write_datetime_value("last_sign_in", self.last_sign_in)
        writer.write_str_value("name", self.name)
        writer.write_str_value("nickname", self.nickname)
        writer.write_str_value("phone", self.phone)
        writer.write_str_value("postal_code", self.postal_code)
        writer.write_str_value("role", self.role)
        writer.write_str_value("state_or_province", self.state_or_province)
        writer.write_str_value("status", self.status)
        writer.write_str_value("uid", self.uid)
        writer.write_datetime_value("updated_at", self.updated_at)
    

