diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Address.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Address.kt new file mode 100644 index 0000000..bc0f0d0 --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Address.kt @@ -0,0 +1,10 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class Address( + val address_line_1: String, + val city: String, + val state: String, + val country: String +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Graphs.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Graphs.kt new file mode 100644 index 0000000..c99ef30 --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Graphs.kt @@ -0,0 +1,9 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class Graphs( + val realtime_power: Map, + val daily_output: Map, + val monthly_output: Map +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Inverter.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Inverter.kt new file mode 100644 index 0000000..260a21a --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Inverter.kt @@ -0,0 +1,15 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class Inverter( + val inverternr: Int, + val product_code: String, + val serial_number: String, + val comm_type: String, + val comm_identifier: String, + val dt_installed: String, + val dt_replaced: Any, + val mppts: Map, + val dma_device_type: String +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Kpis.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Kpis.kt new file mode 100644 index 0000000..6040e9f --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Kpis.kt @@ -0,0 +1,11 @@ + +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class Kpis( + val current_production: Int, + val output_today: Int, + val output_month: Int, + val output_to_date: Int +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Models.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Models.kt deleted file mode 100644 index 98e1700..0000000 --- a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Models.kt +++ /dev/null @@ -1,85 +0,0 @@ -// generated using https://github.com/wuseal/JsonToKotlinClass - -package eu.rickvanschijndel.solargraph.models - -data class SiteResponse( - val public_key: String, - val name: String, - val address: String, - val date: String -) - -data class ProductionResponse( - val site: Site, - val inverters: List, - val stats: Stats -) - -data class Site( - val public_key: String, - val name: String, - val address: Address, - val timezone: String, - val nominal_pv_power: String, - val systems: List, - val dt_created: String, - val dt_updated: String -) - -data class System( - val name: String, - val retailer: String, - val acpog_number: String, - val nominal_power: Int, - val inverters: List, - val dt_created: String, - val dt_updated: String -) - -data class Inverter( - val inverternr: Int, - val product_code: String, - val serial_number: String, - val comm_type: String, - val comm_identifier: String, - val dt_installed: String, - val dt_replaced: Any, - val mppts: Map, - val dma_device_type: String -) - -data class Mppt( - val mpptnr: String, - val module_group: String, - val strings: List -) - -data class Address( - val address_line_1: String, - val city: String, - val state: String, - val country: String -) - -data class Stats( - val graphs: Graphs, - val kpis: Kpis -) - -data class Kpis( - val current_production: Int, - val output_today: Int, - val output_month: Int, - val output_to_date: Int -) - -data class Graphs( - val realtime_power: Map, - val daily_output: Map, - val monthly_output: Map -) - -data class MonitorData( - val dt_first_msg: String, - val dt_latest_msg: String -) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/MonitorData.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/MonitorData.kt new file mode 100644 index 0000000..32da6e7 --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/MonitorData.kt @@ -0,0 +1,8 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class MonitorData( + val dt_first_msg: String, + val dt_latest_msg: String +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Mppt.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Mppt.kt new file mode 100644 index 0000000..85e30bf --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Mppt.kt @@ -0,0 +1,9 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class Mppt( + val mpptnr: String, + val module_group: String, + val strings: List +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/ProductionResponse.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/ProductionResponse.kt new file mode 100644 index 0000000..22756d5 --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/ProductionResponse.kt @@ -0,0 +1,9 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class ProductionResponse( + val site: Site, + val inverters: List, + val stats: Stats +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Site.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Site.kt new file mode 100644 index 0000000..600a256 --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Site.kt @@ -0,0 +1,14 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class Site( + val public_key: String, + val name: String, + val address: Address, + val timezone: String, + val nominal_pv_power: String, + val systems: List, + val dt_created: String, + val dt_updated: String +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/SiteResponse.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/SiteResponse.kt new file mode 100644 index 0000000..e809e93 --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/SiteResponse.kt @@ -0,0 +1,10 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class SiteResponse( + val public_key: String, + val name: String, + val address: String, + val date: String +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/Stats.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Stats.kt new file mode 100644 index 0000000..b0ecd96 --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/Stats.kt @@ -0,0 +1,8 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class Stats( + val graphs: Graphs, + val kpis: Kpis +) diff --git a/app/src/main/java/eu/rickvanschijndel/solargraph/models/System.kt b/app/src/main/java/eu/rickvanschijndel/solargraph/models/System.kt new file mode 100644 index 0000000..76b82dd --- /dev/null +++ b/app/src/main/java/eu/rickvanschijndel/solargraph/models/System.kt @@ -0,0 +1,13 @@ +// generated using https://github.com/wuseal/JsonToKotlinClass + +package eu.rickvanschijndel.solargraph.models + +data class System( + val name: String, + val retailer: String, + val acpog_number: String, + val nominal_power: Int, + val inverters: List, + val dt_created: String, + val dt_updated: String +)