<commit_before>﻿using Digipost.Api.Client.Domain.Enums;
using Digipost.Api.Client.Domain.Print;

namespace Digipost.Api.Client.Domain.SendMessage
{
    public class Recipient : IRecipient
    {
        /// <summary>
        ///     Preferred digital delivery with fallback to physical delivery.
        /// </summary>
        public Recipient(RecipientByNameAndAddress recipientByNameAndAddress, PrintDetails printDetails = null)
            :this(IdentificationChoiceType.NameAndAddress, recipientByNameAndAddress, printDetails)
        {
        }

        /// <summary>
        ///     Preferred digital delivery with fallback to physical delivery.
        /// </summary>
        public Recipient(IdentificationChoiceType identificationChoiceType, string id, PrintDetails printDetails = null)
            :this(identificationChoiceType, (object) id, printDetails)
        {
        }

        private Recipient(IdentificationChoiceType identificationChoiceType, object value, PrintDetails printDetails = null)
        {
            IdentificationType = identificationChoiceType;
            IdentificationValue = value;
            PrintDetails = printDetails;
        }

        /// <summary>
        ///     Preferred physical delivery (not Digital).
        /// </summary>
        public Recipient(PrintDetails printDetails)
        {
            PrintDetails = printDetails;
        }

        public object IdentificationValue { get; set; }
        
        public PrintDetails PrintDetails { get; set; }
        
        public IdentificationChoiceType IdentificationType { get; set; }
    }
}<commit_msg>Gjør identificationType til optional på Recipient, da den ikke settes om vi kun har PrintDetails<commit_after>﻿using Digipost.Api.Client.Domain.Enums;
using Digipost.Api.Client.Domain.Print;

namespace Digipost.Api.Client.Domain.SendMessage
{
    public class Recipient : IRecipient
    {
        /// <summary>
        ///     Preferred digital delivery with fallback to physical delivery.
        /// </summary>
        public Recipient(RecipientByNameAndAddress recipientByNameAndAddress, PrintDetails printDetails = null)
            :this(IdentificationChoiceType.NameAndAddress, recipientByNameAndAddress, printDetails)
        {
        }

        /// <summary>
        ///     Preferred digital delivery with fallback to physical delivery.
        /// </summary>
        public Recipient(IdentificationChoiceType identificationChoiceType, string id, PrintDetails printDetails = null)
            :this(identificationChoiceType, (object) id, printDetails)
        {
        }

        private Recipient(IdentificationChoiceType identificationChoiceType, object value, PrintDetails printDetails = null)
        {
            IdentificationType = identificationChoiceType;
            IdentificationValue = value;
            PrintDetails = printDetails;
        }

        /// <summary>
        ///     Preferred physical delivery (not Digital).
        /// </summary>
        public Recipient(PrintDetails printDetails)
        {
            PrintDetails = printDetails;
        }

        public object IdentificationValue { get; set; }
        
        public PrintDetails PrintDetails { get; set; }
        
        public IdentificationChoiceType? IdentificationType { get; set; }
    }
}
{'fraction_non_alphanumeric': 0.07729468599033816, 'fraction_numerical': 0.0, 'mean_word_length': 2.3771661569826708, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5707747', 'n_tokens_mistral': 798, 'n_tokens_neox': 784, 'n_words': 198}