<commit_before>﻿using GalaSoft.MvvmLight;
using Newtonsoft.Json;

namespace ParkenDD.Api.Models
{
    /// <summary>
    ///     Data for single parking lot
    /// </summary>
    public sealed class ParkingLot : ViewModelBase
    {
        /// <summary>
        ///     Address of the parking lot
        /// </summary>
        [JsonProperty("address")]
        public string Address
        {
            get { return _address; }
            set { Set(ref _address, value); }
        }
        private string _address;

        /// <summary>
        ///     Coordinates of the parking lot
        /// </summary>
        [JsonProperty("coords")]
        public Coordinate Coordinates
        {
            get { return _coordinates; }
            set { Set(ref _coordinates, value); }
        }
        private Coordinate _coordinates;

        /// <summary>
        ///     Amount of free parking space
        /// </summary>
        [JsonProperty("free")]
        public int FreeLots
        {
            get { return _freeLots; }
            set { Set(ref _freeLots, value); }
        }
        private int _freeLots;

        /// <summary>
        ///     Total amount of parking space
        /// </summary>
        [JsonProperty("total")] 
        public int TotalLots
        {
            get { return _totalLots >= _freeLots ? _totalLots : _freeLots; }
            set { Set(ref _totalLots, value); }
        }
        private int _totalLots;

        /// <summary>
        ///     Id of the parking lot
        /// </summary>
        [JsonProperty("id")]
        public string Id
        {
            get { return _id; }
            set { Set(ref _id, value); }
        }
        private string _id;

        /// <summary>
        ///     Type of the Parking lot
        /// </summary>
        [JsonProperty("lot_type")]
        public string LotType
        {
            get { return _lotType; }
            set { Set(ref _lotType, value); }
        }
        private string _lotType;
<commit_msg>Change parking lot invalid free lots value behavior by letting free lot count only be smaller or equal to total lot count, never larger.<commit_after>﻿using System;
using GalaSoft.MvvmLight;
using Newtonsoft.Json;

namespace ParkenDD.Api.Models
{
    /// <summary>
    ///     Data for single parking lot
    /// </summary>
    public sealed class ParkingLot : ViewModelBase
    {
        /// <summary>
        ///     Address of the parking lot
        /// </summary>
        [JsonProperty("address")]
        public string Address
        {
            get { return _address; }
            set { Set(ref _address, value); }
        }
        private string _address;

        /// <summary>
        ///     Coordinates of the parking lot
        /// </summary>
        [JsonProperty("coords")]
        public Coordinate Coordinates
        {
            get { return _coordinates; }
            set { Set(ref _coordinates, value); }
        }
        private Coordinate _coordinates;

        /// <summary>
        ///     Amount of free parking space
        /// </summary>
        [JsonProperty("free")]
        public int FreeLots
        {
            get { return Math.Min(_freeLots, _totalLots); }
            set { Set(ref _freeLots, value); }
        }
        private int _freeLots;

        /// <summary>
        ///     Total amount of parking space
        /// </summary>
        [JsonProperty("total")] 
        public int TotalLots
        {
            get { return _totalLots; }
            set { Set(ref _totalLots, value); }
        }
        private int _totalLots;

        /// <summary>
        ///     Id of the parking lot
        /// </summary>
        [JsonProperty("id")]
        public string Id
        {
            get { return _id; }
            set { Set(ref _id, value); }
        }
        private string _id;

        /// <summary>
        ///     Type of the Parking lot
        /// </summary>
        [JsonProperty("lot_type")]
        public string LotType
        {
            get { return _lotType; }
            set { Set(ref _lotType, value); }
        }
        private string _lotType;

{'fraction_non_alphanumeric': 0.10837557325609462, 'fraction_numerical': 0.0, 'mean_word_length': 1.3585657370517927, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 32, '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': '5280407', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1093, 'n_words': 317}