/// <summary>
 /// Create a new QR code identification.
 /// </summary>
 /// <param name="EVCOId">The e-mobility contract identification.</param>
 /// <param name="HashedPIN">An optional QR code identification.</param>
 /// <param name="PIN">An optional PIN.</param>
 private QRCodeIdentification(EVCO_Id EVCOId,
                              HashedPIN?HashedPIN,
                              PIN?PIN)
 {
     this.EVCOId    = EVCOId;
     this.HashedPIN = HashedPIN;
     this.PIN       = PIN;
 }
        /// <summary>
        /// Create a new QR code identification for uploading authentication data.
        /// </summary>
        /// <param name="EVCOId">The e-mobility contract identification.</param>
        /// <param name="HashedPIN">The QR code identification.</param>
        public QRCodeIdentification(EVCO_Id EVCOId,
                                    HashedPIN HashedPIN)

            : this(EVCOId,
                   HashedPIN,
                   default)

        {
        }
        /// <summary>
        /// Create a new QR code identification for authorization requests.
        /// </summary>
        /// <param name="EVCOId">The e-mobility contract identification.</param>
        /// <param name="PIN">The PIN.</param>
        public QRCodeIdentification(EVCO_Id EVCOId,
                                    PIN PIN)

            : this(EVCOId,
                   default,
                   PIN)

        {
        }
        /// <summary>
        /// Create a new identification.
        /// </summary>
        /// <param name="EVCOId">A QR code identification.</param>
        /// <param name="HashedPIN">A hashed PIN.</param>
        /// <param name="CustomData">Optional customer specific data.</param>
        public static Identification FromQRCodeIdentification(EVCO_Id EVCOId,
                                                              HashedPIN HashedPIN,
                                                              JObject CustomData = null)

        => new Identification(QRCodeIdentification:  new QRCodeIdentification(
                                  EVCOId,
                                  HashedPIN
                                  ),
                              CustomData:            CustomData);
        /// <summary>
        /// Create a new identification.
        /// </summary>
        /// <param name="EVCOId">A QR code identification.</param>
        /// <param name="HashValue">Hash value created by partner.</param>
        /// <param name="HashFunction">Function that was used to generate the hash value.</param>
        /// <param name="CustomData">Optional customer specific data.</param>
        public static Identification FromQRCodeIdentification(EVCO_Id EVCOId,
                                                              Hash_Value HashValue,
                                                              HashFunctions HashFunction,
                                                              JObject CustomData = null)

        => new Identification(QRCodeIdentification:  new QRCodeIdentification(
                                  EVCOId,
                                  new HashedPIN(
                                      HashValue,
                                      HashFunction
                                      )
                                  ),
                              CustomData:            CustomData);
        /// <summary>
        /// Create a new identification.
        /// </summary>
        /// <param name="RemoteIdentification">A remote identification (EVCO Id).</param>
        /// <param name="CustomData">Optional customer specific data.</param>
        public static Identification FromRemoteIdentification(EVCO_Id RemoteIdentification,
                                                              JObject CustomData = null)

        => new Identification(RemoteIdentification:  RemoteIdentification,
                              CustomData:            CustomData);
        /// <summary>
        /// Create a new identification.
        /// </summary>
        /// <param name="PlugAndChargeIdentification">A plug'n'charge identification (EVCO Id).</param>
        /// <param name="CustomData">Optional customer specific data.</param>
        public static Identification FromPlugAndChargeIdentification(EVCO_Id PlugAndChargeIdentification,
                                                                     JObject CustomData = null)

        => new Identification(PlugAndChargeIdentification:  PlugAndChargeIdentification,
                              CustomData:                   CustomData);