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 ResponsesPostResponse_rfi_permittedActions_updateRfi_permittedStatuses_wfEU_permittedAttributes_values(Parsable):
    # The type of the required attribute value. Indicates what kind of entity the value represents (e.g., ``user``, ``role``, or ``company``).
    type: Optional[str] = None
    # The actual value that must be used for the required attribute when updating or creating the RFI.To find details about users, call `GET users </en/docs/acc/v1/reference/http/admin-projectsprojectId-users-GET>`_, to find details about companies, call `GET companies <en/docs/acc/v1/reference/http/projects-:project_id-companies-GET/>`_.Note that we do not currently support finding details about roles for a project.
    value: Optional[str] = None
    
    @staticmethod
    def create_from_discriminator_value(parse_node: ParseNode) -> ResponsesPostResponse_rfi_permittedActions_updateRfi_permittedStatuses_wfEU_permittedAttributes_values:
        """
        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: ResponsesPostResponse_rfi_permittedActions_updateRfi_permittedStatuses_wfEU_permittedAttributes_values
        """
        if parse_node is None:
            raise TypeError("parse_node cannot be null.")
        return ResponsesPostResponse_rfi_permittedActions_updateRfi_permittedStatuses_wfEU_permittedAttributes_values()
    
    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]] = {
            "type": lambda n : setattr(self, 'type', n.get_str_value()),
            "value": lambda n : setattr(self, 'value', 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("type", self.type)
        writer.write_str_value("value", self.value)
    

