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

if TYPE_CHECKING:
    from .with_response_patch_response_rfi_architects import WithResponsePatchResponse_rfi_architects
    from .with_response_patch_response_rfi_assigned_to import WithResponsePatchResponse_rfi_assignedTo
    from .with_response_patch_response_rfi_co_reviewers import WithResponsePatchResponse_rfi_coReviewers
    from .with_response_patch_response_rfi_custom_attributes import WithResponsePatchResponse_rfi_customAttributes
    from .with_response_patch_response_rfi_draft_responses import WithResponsePatchResponse_rfi_draftResponses
    from .with_response_patch_response_rfi_official_response_actors import WithResponsePatchResponse_rfi_officialResponseActors
    from .with_response_patch_response_rfi_official_response_status import WithResponsePatchResponse_rfi_officialResponseStatus
    from .with_response_patch_response_rfi_permitted_actions import WithResponsePatchResponse_rfi_permittedActions
    from .with_response_patch_response_rfi_previous_status import WithResponsePatchResponse_rfi_previousStatus
    from .with_response_patch_response_rfi_responses import WithResponsePatchResponse_rfi_responses
    from .with_response_patch_response_rfi_reviewers import WithResponsePatchResponse_rfi_reviewers
    from .with_response_patch_response_rfi_status import WithResponsePatchResponse_rfi_status
    from .with_response_patch_response_rfi_watchers import WithResponsePatchResponse_rfi_watchers
    from .with_response_patch_response_rfi_workflow_type import WithResponsePatchResponse_rfi_workflowType

@dataclass
class WithResponsePatchResponse_rfi(Parsable):
    # The date and time when the official response to the RFI was submitted, in ISO 8601 format (``YYYY-MM-DDThh:mm:ss.sZ``).Empty when creating an RFI.
    answered_at: Optional[datetime.datetime] = None
    # The Autodesk ID of the user who submitted the official response to the RFI.To find details about the user, call `GET users </en/docs/acc/v1/reference/http/admin-projectsprojectId-users-GET>`_.Empty when creating an RFI.
    answered_by: Optional[str] = None
    # The list of architect users associated with the RFI.
    architects: Optional[list[WithResponsePatchResponse_rfi_architects]] = None
    # The list of users assigned to the RFI.
    assigned_to: Optional[list[WithResponsePatchResponse_rfi_assignedTo]] = None
    # Not relevant
    bridge_sync_outdated: Optional[bool] = None
    # Not relevant
    bridged_source: Optional[bool] = None
    # Not relevant
    bridged_target: Optional[bool] = None
    # A list of predefined categories to assign to the RFI.Categories help group RFIs for filtering and reporting. Each value must match a category configured in the project’s RFI settings. Categories are case-sensitive and project-specific.RFI categories are configured in Project Admin and may differ between projects. Call `GET rfi-types </en/docs/acc/v1/reference/http/rfis-rfi-types-GET>`_ to retrieve the allowed values for this field.Some possible values: ``Code Compliance``, ``Constructability``, ``Design Coordination``, ``Documentation Conflict``, ``Documentation Incomplete``, ``Field condition``, ``Other``.
    category: Optional[list[str]] = None
    # The date and time when the RFI was closed, in ISO 8601 format (``YYYY-MM-DDThh:mm:ss.sZ``).
    closed_at: Optional[datetime.datetime] = None
    # The Autodesk ID of the user who closed the RFI.To find details about the user, call `GET users </en/docs/acc/v1/reference/http/admin-projectsprojectId-users-GET>`_.
    closed_by: Optional[str] = None
    # A list of reviewers assigned to the RFI. Each entry may represent a user, role, or company.
    co_reviewers: Optional[list[WithResponsePatchResponse_rfi_coReviewers]] = None
    # The number of comments associated with the RFI.
    comments_count: Optional[int] = None
    # The Autodesk ID of the user designated as the Construction Manager for this RFI.To find details about the user, call `GET users </en/docs/acc/v1/reference/http/admin-projectsprojectId-users-GET>`_.
    construction_manager_id: Optional[str] = None
    # The ID of the container.
    container_id: Optional[str] = None
    # The default cost impact value for new RFIs of this type.Possible values: ``null``, ``Yes``, ``No``, ``Unknown``.To check whether cost impact options are enabled and to retrieve the default value, call `GET rfi-types <en/docs/acc/v1/reference/http/rfis-RFI-types-GET/>`_.
    cost_impact: Optional[str] = None
    # The date and time when the RFI was created, in ISO 8601 format (``YYYY-MM-DDThh:mm:ss.sZ``).
    created_at: Optional[datetime.datetime] = None
    # The Autodesk ID of the user who created the RFI.To find details about the user, call `GET users </en/docs/acc/v1/reference/http/admin-projectsprojectId-users-GET>`_.
    created_by: Optional[str] = None
    # A list of custom attributes associated with the RFI.
    custom_attributes: Optional[list[WithResponsePatchResponse_rfi_customAttributes]] = None
    # The user-defined identifier of the RFI.
    custom_identifier: Optional[str] = None
    # The discipline associated with the RFI. To retrieve the supported values for the current project, call `GET rfi-types </en/docs/acc/v1/reference/http/rfis-rfi-types-GET>`_.Some possible values: ``Building Management System``, ``Electrical Substation``, ``Security``, ``Audio Visual``, ``Food Service``, ``Fire Alarm``, ``Power Systems``, ``Design Systems Integrator``, ``Signage``, ``Pathways``, ``Cabling``, ``Networks``, ``Distributed Antenna System``, ``Lighting``, ``Vertical Transportation``, ``Roofing``, ``Architectural``, ``Civil/Site``, ``Concrete``, ``Electrical``, ``Exterior Envelope``, ``Fire Protection``, ``Interior/Finishes``, ``Landscaping``, ``Masonry``, ``Mechanical``, ``Plumbing``, ``Structural``, ``Other``.'
    discipline: Optional[list[str]] = None
    # A list of draft responses associated with this RFI.Always empty when creating an RFI.
    draft_responses: Optional[list[WithResponsePatchResponse_rfi_draftResponses]] = None
    # The date and time by which a response to the RFI is expected, in ISO 8601 format (``YYYY-MM-DDThh:mm:ss.sZ``).
    due_date: Optional[str] = None
    # The system-generated ID of the RFI.
    id: Optional[str] = None
    # The default text for the Location field when creating a new RFI.Note that the API does not auto-populate this value.Clients are responsible for applying the default if desired.To retrieve the default value configured for this field, call `GET rfi-types </en/docs/acc/v1/reference/http/rfis-rfi-types-GET>`_.
    location_description: Optional[str] = None
    # A list of predefined location IDs associated with the RFI, based on the project’s Location Breakdown Structure (LBS). To get more information about the locations, call `GET nodes </en/docs/acc/v1/reference/http/locations-nodes-GET/>`_.
    locations: Optional[list[str]] = None
    # The Autodesk ID of the user designated as the RFI Manager.To find details about the user, call `GET users </en/docs/acc/v1/reference/http/admin-projectsprojectId-users-GET>`_.
    manager_id: Optional[str] = None
    # The max amount of assignees permitted base on the RFIs current status.
    max_assignees: Optional[int] = None
    # The text of the official response submitted for the RFI.Always empty when creating an RFI.
    official_response: Optional[str] = None
    # The list of users who contributed to the official response.Always empty when creating an RFI.
    official_response_actors: Optional[list[WithResponsePatchResponse_rfi_officialResponseActors]] = None
    # ``true``: the RFI Manager is allowed to edit the official response after submission.``false``: editing the official response is disabled. (default).
    official_response_edit_by_manager_state: Optional[bool] = None
    # The status of the official response to the RFI.Possible values: ``unanswered``, ``answered``.Always ``unanswered`` when creating an RFI.
    official_response_status: Optional[WithResponsePatchResponse_rfi_officialResponseStatus] = None
    # The list of actions that are permitted for the user.
    permitted_actions: Optional[WithResponsePatchResponse_rfi_permittedActions] = None
    # The previous status of the RFI, if one exists.This field is omitted if the RFI has no prior status (e.g., when newly created).- For single-reviewer workflows (US):Possible values:``draft``, ``submitted``, ``open``, ``answered``, ``rejected``, ``closed``, ``void``.- For multi-reviewer workflows (EMEA):Possible values:``draft``, ``submitted``, ``openRev1`` (manager), ``openRev2`` (reviewers), ``answeredRev1``, ``answeredManager``, ``closed``, ``void``.To determine the workflow type, call `GET users/me </en/docs/acc/v1/reference/http/rfis-users-me-GET/>`_ and check the ``workflowType`` value.For details on RFI workflows in the ACC UI, see `About RFI Workflows – Autodesk Help <https://help.autodesk.com/view/BUILD/ENU/?guid=RFI_Workflow_Setup>`_.
    previous_status: Optional[WithResponsePatchResponse_rfi_previousStatus] = None
    # The default priority for new RFIs of this type.The available priority values are configured in Project Admin.If no default is set, this field is ``null``.Note that the API does not auto-populate this value when creating an RFI.Clients are responsible for applying the default if desired.The valid priority options can be retrieved by calling `GET rfi-types <en/docs/acc/v1/reference/http/rfis-RFI-types-GET/>_. Some possible values: ``null``, ``High``, ``Normal``, ``Low``.
    priority: Optional[str] = None
    # The Autodesk ID of the project the RFI belongs to.
    project_id: Optional[str] = None
    # The question submitted in the RFI.
    question: Optional[str] = None
    # A user-provided text reference related to the RFI, such as a model number or spec reference, typically used when the RFI was created in another system.Max length: 20
    reference: Optional[str] = None
    # The date and time when the RFI was officially responded to, in ISO 8601 format (``YYYY-MM-DDThh:mm:ss.sZ``).
    responded_at: Optional[datetime.datetime] = None
    # The Autodesk ID of the user who submitted the official response to the RFI.To find details about the user, call `GET users </en/docs/acc/v1/reference/http/admin-projectsprojectId-users-GET>`_.
    responded_by: Optional[str] = None
    # A list of responses associated with this RFI.Always empty when creating an RFI.
    responses: Optional[list[WithResponsePatchResponse_rfi_responses]] = None
    # The list of users assigned to review the RFI before it is closed.
    reviewers: Optional[list[WithResponsePatchResponse_rfi_reviewers]] = None
    # The ID of the default RFI type assigned to the project. This is the unique identifier of the RFI type that will be selected by default when creating a new RFI.
    rfi_type_id: Optional[UUID] = None
    # The default schedule impact value for new RFIs of this type.Possible values: ``null``, ``Yes``, ``No``, ``Unknown``.To verify whether schedule impact tracking is enabled for the project and what the default value is, call `GET rfi-types <en/docs/acc/v1/reference/http/rfis-RFI-types-GET/>`_.
    schedule_impact: Optional[str] = None
    # The current status of the RFI. Available values depend on the RFI’s workflow type:- For single-reviewer workflows (US):Possible values:``draft``, ``submitted``, ``open``, ``answered``, ``rejected``, ``closed``, ``void``.- For multi-reviewer workflows (EMEA):Possible values:``draft``, ``submitted``, ``openRev1`` (manager), ``openRev2`` (reviewers), ``answeredRev1``, ``answeredManager``, ``closed``, ``void``.To determine the workflow type, call `GET users/me </en/docs/acc/v1/reference/http/rfis-users-me-GET/>`_ and check the ``workflowType`` value.For details on RFI workflows in the ACC UI, see `About RFI  Workflows – Autodesk Help <https://help.autodesk.com/view/BUILD/ENU/?guid=RFI_Workflow_Setup>`_.
    status: Optional[WithResponsePatchResponse_rfi_status] = None
    # A suggested answer for the RFI, typically entered by the assignee before submission of the official response.
    suggested_answer: Optional[str] = None
    # Not relevant
    sync_token: Optional[str] = None
    # Not relevant
    sync_version: Optional[float] = None
    # The title of the RFI.
    title: Optional[str] = None
    # The date and time when the RFI was last updated, in ISO 8601 format (``YYYY-MM-DDThh:mm:ss.sZ``).
    updated_at: Optional[datetime.datetime] = None
    # The Autodesk ID of the user who last updated the RFI.To find details about the user, call `GET users </en/docs/acc/v1/reference/http/admin-projectsprojectId-users-GET>`_.
    updated_by: Optional[str] = None
    # The URN of the virtual folder created for the RFI.This folder stores all attachments related to the RFI.The ``virtualFolderUrn`` is required when uploading attachments to an RFI. See the `Upload Attachment </en/docs/acc/v1/tutorials/files/upload-document-s3/>`_ tutorial for more details.
    virtual_folder_urn: Optional[str] = None
    # A list of watchers who are notified about changes to the RFI. Each entry may represent a user, role, or company.
    watchers: Optional[list[WithResponsePatchResponse_rfi_watchers]] = None
    # The workflow type assigned to the RFI, which determines the allowed status transitions and the review path.Possible values:- ``US``: Single-reviewer workflow- ``EU``: Multi-reviewer workflowThis value affects how statuses like ``submitted``, ``openRev1``, or ``answeredManager`` behave.For status definitions, see the ``status`` and ``previousStatus`` fields.
    workflow_type: Optional[WithResponsePatchResponse_rfi_workflowType] = None
    
    @staticmethod
    def create_from_discriminator_value(parse_node: ParseNode) -> WithResponsePatchResponse_rfi:
        """
        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: WithResponsePatchResponse_rfi
        """
        if parse_node is None:
            raise TypeError("parse_node cannot be null.")
        return WithResponsePatchResponse_rfi()
    
    def get_field_deserializers(self,) -> dict[str, Callable[[ParseNode], None]]:
        """
        The deserialization information for the current model
        Returns: dict[str, Callable[[ParseNode], None]]
        """
        from .with_response_patch_response_rfi_architects import WithResponsePatchResponse_rfi_architects
        from .with_response_patch_response_rfi_assigned_to import WithResponsePatchResponse_rfi_assignedTo
        from .with_response_patch_response_rfi_co_reviewers import WithResponsePatchResponse_rfi_coReviewers
        from .with_response_patch_response_rfi_custom_attributes import WithResponsePatchResponse_rfi_customAttributes
        from .with_response_patch_response_rfi_draft_responses import WithResponsePatchResponse_rfi_draftResponses
        from .with_response_patch_response_rfi_official_response_actors import WithResponsePatchResponse_rfi_officialResponseActors
        from .with_response_patch_response_rfi_official_response_status import WithResponsePatchResponse_rfi_officialResponseStatus
        from .with_response_patch_response_rfi_permitted_actions import WithResponsePatchResponse_rfi_permittedActions
        from .with_response_patch_response_rfi_previous_status import WithResponsePatchResponse_rfi_previousStatus
        from .with_response_patch_response_rfi_responses import WithResponsePatchResponse_rfi_responses
        from .with_response_patch_response_rfi_reviewers import WithResponsePatchResponse_rfi_reviewers
        from .with_response_patch_response_rfi_status import WithResponsePatchResponse_rfi_status
        from .with_response_patch_response_rfi_watchers import WithResponsePatchResponse_rfi_watchers
        from .with_response_patch_response_rfi_workflow_type import WithResponsePatchResponse_rfi_workflowType

        from .with_response_patch_response_rfi_architects import WithResponsePatchResponse_rfi_architects
        from .with_response_patch_response_rfi_assigned_to import WithResponsePatchResponse_rfi_assignedTo
        from .with_response_patch_response_rfi_co_reviewers import WithResponsePatchResponse_rfi_coReviewers
        from .with_response_patch_response_rfi_custom_attributes import WithResponsePatchResponse_rfi_customAttributes
        from .with_response_patch_response_rfi_draft_responses import WithResponsePatchResponse_rfi_draftResponses
        from .with_response_patch_response_rfi_official_response_actors import WithResponsePatchResponse_rfi_officialResponseActors
        from .with_response_patch_response_rfi_official_response_status import WithResponsePatchResponse_rfi_officialResponseStatus
        from .with_response_patch_response_rfi_permitted_actions import WithResponsePatchResponse_rfi_permittedActions
        from .with_response_patch_response_rfi_previous_status import WithResponsePatchResponse_rfi_previousStatus
        from .with_response_patch_response_rfi_responses import WithResponsePatchResponse_rfi_responses
        from .with_response_patch_response_rfi_reviewers import WithResponsePatchResponse_rfi_reviewers
        from .with_response_patch_response_rfi_status import WithResponsePatchResponse_rfi_status
        from .with_response_patch_response_rfi_watchers import WithResponsePatchResponse_rfi_watchers
        from .with_response_patch_response_rfi_workflow_type import WithResponsePatchResponse_rfi_workflowType

        fields: dict[str, Callable[[Any], None]] = {
            "answeredAt": lambda n : setattr(self, 'answered_at', n.get_datetime_value()),
            "answeredBy": lambda n : setattr(self, 'answered_by', n.get_str_value()),
            "architects": lambda n : setattr(self, 'architects', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_architects)),
            "assignedTo": lambda n : setattr(self, 'assigned_to', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_assignedTo)),
            "bridgeSyncOutdated": lambda n : setattr(self, 'bridge_sync_outdated', n.get_bool_value()),
            "bridgedSource": lambda n : setattr(self, 'bridged_source', n.get_bool_value()),
            "bridgedTarget": lambda n : setattr(self, 'bridged_target', n.get_bool_value()),
            "category": lambda n : setattr(self, 'category', n.get_collection_of_primitive_values(str)),
            "closedAt": lambda n : setattr(self, 'closed_at', n.get_datetime_value()),
            "closedBy": lambda n : setattr(self, 'closed_by', n.get_str_value()),
            "coReviewers": lambda n : setattr(self, 'co_reviewers', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_coReviewers)),
            "commentsCount": lambda n : setattr(self, 'comments_count', n.get_int_value()),
            "constructionManagerId": lambda n : setattr(self, 'construction_manager_id', n.get_str_value()),
            "containerId": lambda n : setattr(self, 'container_id', n.get_str_value()),
            "costImpact": lambda n : setattr(self, 'cost_impact', n.get_str_value()),
            "createdAt": lambda n : setattr(self, 'created_at', n.get_datetime_value()),
            "createdBy": lambda n : setattr(self, 'created_by', n.get_str_value()),
            "customAttributes": lambda n : setattr(self, 'custom_attributes', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_customAttributes)),
            "customIdentifier": lambda n : setattr(self, 'custom_identifier', n.get_str_value()),
            "discipline": lambda n : setattr(self, 'discipline', n.get_collection_of_primitive_values(str)),
            "draftResponses": lambda n : setattr(self, 'draft_responses', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_draftResponses)),
            "dueDate": lambda n : setattr(self, 'due_date', n.get_str_value()),
            "id": lambda n : setattr(self, 'id', n.get_str_value()),
            "locationDescription": lambda n : setattr(self, 'location_description', n.get_str_value()),
            "locations": lambda n : setattr(self, 'locations', n.get_collection_of_primitive_values(str)),
            "managerId": lambda n : setattr(self, 'manager_id', n.get_str_value()),
            "maxAssignees": lambda n : setattr(self, 'max_assignees', n.get_int_value()),
            "officialResponse": lambda n : setattr(self, 'official_response', n.get_str_value()),
            "officialResponseActors": lambda n : setattr(self, 'official_response_actors', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_officialResponseActors)),
            "officialResponseEditByManagerState": lambda n : setattr(self, 'official_response_edit_by_manager_state', n.get_bool_value()),
            "officialResponseStatus": lambda n : setattr(self, 'official_response_status', n.get_enum_value(WithResponsePatchResponse_rfi_officialResponseStatus)),
            "permittedActions": lambda n : setattr(self, 'permitted_actions', n.get_object_value(WithResponsePatchResponse_rfi_permittedActions)),
            "previousStatus": lambda n : setattr(self, 'previous_status', n.get_enum_value(WithResponsePatchResponse_rfi_previousStatus)),
            "priority": lambda n : setattr(self, 'priority', n.get_str_value()),
            "projectId": lambda n : setattr(self, 'project_id', n.get_str_value()),
            "question": lambda n : setattr(self, 'question', n.get_str_value()),
            "reference": lambda n : setattr(self, 'reference', n.get_str_value()),
            "respondedAt": lambda n : setattr(self, 'responded_at', n.get_datetime_value()),
            "respondedBy": lambda n : setattr(self, 'responded_by', n.get_str_value()),
            "responses": lambda n : setattr(self, 'responses', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_responses)),
            "reviewers": lambda n : setattr(self, 'reviewers', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_reviewers)),
            "rfiTypeId": lambda n : setattr(self, 'rfi_type_id', n.get_uuid_value()),
            "scheduleImpact": lambda n : setattr(self, 'schedule_impact', n.get_str_value()),
            "status": lambda n : setattr(self, 'status', n.get_enum_value(WithResponsePatchResponse_rfi_status)),
            "suggestedAnswer": lambda n : setattr(self, 'suggested_answer', n.get_str_value()),
            "syncToken": lambda n : setattr(self, 'sync_token', n.get_str_value()),
            "syncVersion": lambda n : setattr(self, 'sync_version', n.get_float_value()),
            "title": lambda n : setattr(self, 'title', n.get_str_value()),
            "updatedAt": lambda n : setattr(self, 'updated_at', n.get_datetime_value()),
            "updatedBy": lambda n : setattr(self, 'updated_by', n.get_str_value()),
            "virtualFolderUrn": lambda n : setattr(self, 'virtual_folder_urn', n.get_str_value()),
            "watchers": lambda n : setattr(self, 'watchers', n.get_collection_of_object_values(WithResponsePatchResponse_rfi_watchers)),
            "workflowType": lambda n : setattr(self, 'workflow_type', n.get_enum_value(WithResponsePatchResponse_rfi_workflowType)),
        }
        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_datetime_value("answeredAt", self.answered_at)
        writer.write_str_value("answeredBy", self.answered_by)
        writer.write_collection_of_object_values("architects", self.architects)
        writer.write_collection_of_object_values("assignedTo", self.assigned_to)
        writer.write_bool_value("bridgeSyncOutdated", self.bridge_sync_outdated)
        writer.write_bool_value("bridgedSource", self.bridged_source)
        writer.write_bool_value("bridgedTarget", self.bridged_target)
        writer.write_collection_of_primitive_values("category", self.category)
        writer.write_datetime_value("closedAt", self.closed_at)
        writer.write_str_value("closedBy", self.closed_by)
        writer.write_collection_of_object_values("coReviewers", self.co_reviewers)
        writer.write_int_value("commentsCount", self.comments_count)
        writer.write_str_value("constructionManagerId", self.construction_manager_id)
        writer.write_str_value("containerId", self.container_id)
        writer.write_str_value("costImpact", self.cost_impact)
        writer.write_datetime_value("createdAt", self.created_at)
        writer.write_str_value("createdBy", self.created_by)
        writer.write_collection_of_object_values("customAttributes", self.custom_attributes)
        writer.write_str_value("customIdentifier", self.custom_identifier)
        writer.write_collection_of_primitive_values("discipline", self.discipline)
        writer.write_collection_of_object_values("draftResponses", self.draft_responses)
        writer.write_str_value("dueDate", self.due_date)
        writer.write_str_value("id", self.id)
        writer.write_str_value("locationDescription", self.location_description)
        writer.write_collection_of_primitive_values("locations", self.locations)
        writer.write_str_value("managerId", self.manager_id)
        writer.write_int_value("maxAssignees", self.max_assignees)
        writer.write_str_value("officialResponse", self.official_response)
        writer.write_collection_of_object_values("officialResponseActors", self.official_response_actors)
        writer.write_bool_value("officialResponseEditByManagerState", self.official_response_edit_by_manager_state)
        writer.write_enum_value("officialResponseStatus", self.official_response_status)
        writer.write_object_value("permittedActions", self.permitted_actions)
        writer.write_enum_value("previousStatus", self.previous_status)
        writer.write_str_value("priority", self.priority)
        writer.write_str_value("projectId", self.project_id)
        writer.write_str_value("question", self.question)
        writer.write_str_value("reference", self.reference)
        writer.write_datetime_value("respondedAt", self.responded_at)
        writer.write_str_value("respondedBy", self.responded_by)
        writer.write_collection_of_object_values("responses", self.responses)
        writer.write_collection_of_object_values("reviewers", self.reviewers)
        writer.write_uuid_value("rfiTypeId", self.rfi_type_id)
        writer.write_str_value("scheduleImpact", self.schedule_impact)
        writer.write_enum_value("status", self.status)
        writer.write_str_value("suggestedAnswer", self.suggested_answer)
        writer.write_str_value("syncToken", self.sync_token)
        writer.write_float_value("syncVersion", self.sync_version)
        writer.write_str_value("title", self.title)
        writer.write_datetime_value("updatedAt", self.updated_at)
        writer.write_str_value("updatedBy", self.updated_by)
        writer.write_str_value("virtualFolderUrn", self.virtual_folder_urn)
        writer.write_collection_of_object_values("watchers", self.watchers)
        writer.write_enum_value("workflowType", self.workflow_type)
    

