/**************************************************************************************************
 * Copyright (c) 2013-2017 Ashutosh Kumar Singh <ashutosh@aksingh.net>                            *
 *                                                                                                *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this           *
 * software and associated documentation files (the "Software"), to deal in the Software without  *
 * restriction, including without limitation the rights to use, copy, modify, merge, publish,     *
 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the  *
 * Software is furnished to do so, subject to the following conditions:                           *
 *                                                                                                *
 * The above copyright notice and this permission notice shall be included in all copies or       *
 * substantial portions of the Software.                                                          *
 *                                                                                                *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING  *
 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND     *
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.        *
 **************************************************************************************************/

package net.aksingh.owmjapis.demo

data class Change(
  val coord: Coord,
  val weather: List<Weather>,
  val base: String, //stations
  val main: Main2,
  val visibility: Int, //10000
  val wind: Wind,
  val clouds: Clouds,
  val dt: Int, //1485789600
  val sys: Sys,
  val id: Int, //2643743
  val name: String, //London
  val cod: Int //200

) {
  override fun toString(): String {
    return "Change(coord=$coord, weather=$weather, base='$base', main=$main, visibility=$visibility, windData=$wind, clouds=$clouds, dt=$dt, sys=$sys, id=$id, name='$name', code=$cod)"
  }
}

data class Clouds(
  val all: Int, //90
  var all2: Int = Int.MIN_VALUE, //90
  var all3: Float = Float.MIN_VALUE //90.0

) {
  override fun toString(): String {
    return "Cloud(all=$all, all2=$all2, all3=$all3)"
  }
}

data class Coord(
  val lon: Double, //-0.13
  val lat: Double //51.51

) {
  override fun toString(): String {
    return "Coord(lon=$lon, lat=$lat)"
  }
}

data class Wind(
  val speed: Double, //4.1
  val deg: Int //80

) {
  override fun toString(): String {
    return "Wind(speed=$speed, deg=$deg)"
  }
}

data class Sys(
  val type: Int, //1
  val id: Int, //5091
  val message: Double, //0.0103
  val country: String, //GB
  val sunrise: Int, //1485762037
  val sunset: Int //1485794875

) {
  override fun toString(): String {
    return "System(type=$type, id=$id, message=$message, country='$country', sunrise=$sunrise, sunset=$sunset)"
  }
}

data class Weather(
  val id: Int, //300
  val main: String, //Drizzle
  val description: String, //light intensity drizzle
  val icon: String //09d

) {
  override fun toString(): String {
    return "Weather(id=$id, main='$main', description='$description', icon='$icon')"
  }
}

data class Main2(
  val temp: Double, //280.32
  val pressure: Int, //1012
  val humidity: Int, //81
  val temp_min: Double, //279.15
  val temp_max: Double //281.15

) {
  override fun toString(): String {
    return "Main2(temp=$temp, pressure=$pressure, humidity=$humidity, temp_min=$temp_min, temp_max=$temp_max)"
  }
}
