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_object_value("artifactQuery", self.artifact_query)
        writer.write_object_value("protectionTimePeriod", self.protection_time_period)
        writer.write_collection_of_primitive_values("protectionUnitIds", self.protection_unit_ids)
        writer.write_enum_value("restorePointPreference", self.restore_point_preference)
        writer.write_enum_value("tags", self.tags)
        writer.write_additional_data_value(self.additional_data)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/solutions/backup_restore/restore_points/search/search_post_request_body.py