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.")
        super().serialize(writer)
        writer.write_str_value("customExtensionStageInstanceDetail", self.custom_extension_stage_instance_detail)
        writer.write_str_value("customExtensionStageInstanceId", self.custom_extension_stage_instance_id)
        writer.write_enum_value("stage", self.stage)
        writer.write_str_value("state", self.state)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/access_package_assignment_request_callback_data.py