diff --git a/kotlin/commissioning/.openapi-generator-ignore b/kotlin/commissioning/.openapi-generator-ignore
new file mode 100644
index 00000000..7484ee59
--- /dev/null
+++ b/kotlin/commissioning/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/kotlin/commissioning/.openapi-generator/FILES b/kotlin/commissioning/.openapi-generator/FILES
new file mode 100644
index 00000000..c358b44e
--- /dev/null
+++ b/kotlin/commissioning/.openapi-generator/FILES
@@ -0,0 +1,132 @@
+README.md
+build.gradle
+docs/ClientError.md
+docs/ConflictError.md
+docs/ConnectionType.md
+docs/ConsumptionLifetimeResponse.md
+docs/ConsumptionStatsResponse.md
+docs/ConsumptionStatsResponseIntervalsInner.md
+docs/DefaultApi.md
+docs/EnergyLifetimeResponse.md
+docs/EnvoysResponse.md
+docs/EnvoysResponseEnvoysInner.md
+docs/InventoryResponse.md
+docs/InventoryResponseEnvoysInner.md
+docs/InventoryResponseMetersInner.md
+docs/InvertersSummaryByEnvoyOrSiteResponse.md
+docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.md
+docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.md
+docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.md
+docs/Meta.md
+docs/MonthlyProductionResponse.md
+docs/MonthlyProductionResponseMeterReadingsInner.md
+docs/NotFoundError.md
+docs/ProductionMeterReadingsResponse.md
+docs/ProductionMeterReadingsResponseMeterReadingsInner.md
+docs/RgmStatsResponse.md
+docs/RgmStatsResponseIntervalsInner.md
+docs/RgmStatsResponseMeterIntervalsInner.md
+docs/RgmStatsResponseMeterIntervalsInnerIntervalsInner.md
+docs/SearchSystemIdResponse.md
+docs/ServerError.md
+docs/StatsResponse.md
+docs/StatsResponseIntervalsInner.md
+docs/Status.md
+docs/SummaryResponse.md
+docs/SystemsResponse.md
+docs/SystemsResponseSystemsInner.md
+docs/UnprocessableEntityError.md
+gradle/wrapper/gradle-wrapper.jar
+gradle/wrapper/gradle-wrapper.properties
+gradlew
+gradlew.bat
+settings.gradle
+src/main/kotlin/enlighten/apis/DefaultApi.kt
+src/main/kotlin/enlighten/infrastructure/ApiAbstractions.kt
+src/main/kotlin/enlighten/infrastructure/ApiClient.kt
+src/main/kotlin/enlighten/infrastructure/ApiResponse.kt
+src/main/kotlin/enlighten/infrastructure/BigDecimalAdapter.kt
+src/main/kotlin/enlighten/infrastructure/BigIntegerAdapter.kt
+src/main/kotlin/enlighten/infrastructure/ByteArrayAdapter.kt
+src/main/kotlin/enlighten/infrastructure/Errors.kt
+src/main/kotlin/enlighten/infrastructure/LocalDateAdapter.kt
+src/main/kotlin/enlighten/infrastructure/LocalDateTimeAdapter.kt
+src/main/kotlin/enlighten/infrastructure/OffsetDateTimeAdapter.kt
+src/main/kotlin/enlighten/infrastructure/PartConfig.kt
+src/main/kotlin/enlighten/infrastructure/RequestConfig.kt
+src/main/kotlin/enlighten/infrastructure/RequestMethod.kt
+src/main/kotlin/enlighten/infrastructure/ResponseExtensions.kt
+src/main/kotlin/enlighten/infrastructure/Serializer.kt
+src/main/kotlin/enlighten/infrastructure/URIAdapter.kt
+src/main/kotlin/enlighten/infrastructure/UUIDAdapter.kt
+src/main/kotlin/enlighten/models/ClientError.kt
+src/main/kotlin/enlighten/models/ConflictError.kt
+src/main/kotlin/enlighten/models/ConnectionType.kt
+src/main/kotlin/enlighten/models/ConsumptionLifetimeResponse.kt
+src/main/kotlin/enlighten/models/ConsumptionStatsResponse.kt
+src/main/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInner.kt
+src/main/kotlin/enlighten/models/EnergyLifetimeResponse.kt
+src/main/kotlin/enlighten/models/EnvoysResponse.kt
+src/main/kotlin/enlighten/models/EnvoysResponseEnvoysInner.kt
+src/main/kotlin/enlighten/models/InventoryResponse.kt
+src/main/kotlin/enlighten/models/InventoryResponseEnvoysInner.kt
+src/main/kotlin/enlighten/models/InventoryResponseMetersInner.kt
+src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponse.kt
+src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.kt
+src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.kt
+src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.kt
+src/main/kotlin/enlighten/models/Meta.kt
+src/main/kotlin/enlighten/models/MonthlyProductionResponse.kt
+src/main/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInner.kt
+src/main/kotlin/enlighten/models/NotFoundError.kt
+src/main/kotlin/enlighten/models/ProductionMeterReadingsResponse.kt
+src/main/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInner.kt
+src/main/kotlin/enlighten/models/RgmStatsResponse.kt
+src/main/kotlin/enlighten/models/RgmStatsResponseIntervalsInner.kt
+src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInner.kt
+src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInner.kt
+src/main/kotlin/enlighten/models/SearchSystemIdResponse.kt
+src/main/kotlin/enlighten/models/ServerError.kt
+src/main/kotlin/enlighten/models/StatsResponse.kt
+src/main/kotlin/enlighten/models/StatsResponseIntervalsInner.kt
+src/main/kotlin/enlighten/models/Status.kt
+src/main/kotlin/enlighten/models/SummaryResponse.kt
+src/main/kotlin/enlighten/models/SystemsResponse.kt
+src/main/kotlin/enlighten/models/SystemsResponseSystemsInner.kt
+src/main/kotlin/enlighten/models/UnprocessableEntityError.kt
+src/test/kotlin/enlighten/apis/DefaultApiTest.kt
+src/test/kotlin/enlighten/models/ClientErrorTest.kt
+src/test/kotlin/enlighten/models/ConflictErrorTest.kt
+src/test/kotlin/enlighten/models/ConnectionTypeTest.kt
+src/test/kotlin/enlighten/models/ConsumptionLifetimeResponseTest.kt
+src/test/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInnerTest.kt
+src/test/kotlin/enlighten/models/ConsumptionStatsResponseTest.kt
+src/test/kotlin/enlighten/models/EnergyLifetimeResponseTest.kt
+src/test/kotlin/enlighten/models/EnvoysResponseEnvoysInnerTest.kt
+src/test/kotlin/enlighten/models/EnvoysResponseTest.kt
+src/test/kotlin/enlighten/models/InventoryResponseEnvoysInnerTest.kt
+src/test/kotlin/enlighten/models/InventoryResponseMetersInnerTest.kt
+src/test/kotlin/enlighten/models/InventoryResponseTest.kt
+src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergyTest.kt
+src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProducedTest.kt
+src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerTest.kt
+src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseTest.kt
+src/test/kotlin/enlighten/models/MetaTest.kt
+src/test/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInnerTest.kt
+src/test/kotlin/enlighten/models/MonthlyProductionResponseTest.kt
+src/test/kotlin/enlighten/models/NotFoundErrorTest.kt
+src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInnerTest.kt
+src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseTest.kt
+src/test/kotlin/enlighten/models/RgmStatsResponseIntervalsInnerTest.kt
+src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt
+src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerTest.kt
+src/test/kotlin/enlighten/models/RgmStatsResponseTest.kt
+src/test/kotlin/enlighten/models/SearchSystemIdResponseTest.kt
+src/test/kotlin/enlighten/models/ServerErrorTest.kt
+src/test/kotlin/enlighten/models/StatsResponseIntervalsInnerTest.kt
+src/test/kotlin/enlighten/models/StatsResponseTest.kt
+src/test/kotlin/enlighten/models/StatusTest.kt
+src/test/kotlin/enlighten/models/SummaryResponseTest.kt
+src/test/kotlin/enlighten/models/SystemsResponseSystemsInnerTest.kt
+src/test/kotlin/enlighten/models/SystemsResponseTest.kt
+src/test/kotlin/enlighten/models/UnprocessableEntityErrorTest.kt
diff --git a/kotlin/commissioning/.openapi-generator/VERSION b/kotlin/commissioning/.openapi-generator/VERSION
new file mode 100644
index 00000000..93c8ddab
--- /dev/null
+++ b/kotlin/commissioning/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.6.0
diff --git a/kotlin/commissioning/README.md b/kotlin/commissioning/README.md
new file mode 100644
index 00000000..21d59cb1
--- /dev/null
+++ b/kotlin/commissioning/README.md
@@ -0,0 +1,116 @@
+# enlighten - Kotlin client library for The Enlighten Systems API
+
+The Enlighten Systems API is a JSON-based API that provides access to performance data for a PV system. By using the Enlighten Systems API, you agree to the Enphase Energy API License Agreement.
+
+Please note that the Enlighten Systems API does not provide performance data at a panel or microinverter level.
+
+## Overview
+This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.
+
+- API version: 2.0
+- Package version:
+- Generator version: 7.6.0
+- Build package: org.openapitools.codegen.languages.KotlinClientCodegen
+
+## Requires
+
+* Kotlin 1.7.21
+* Gradle 7.5
+
+## Build
+
+First, create the gradle wrapper script:
+
+```
+gradle wrapper
+```
+
+Then, run:
+
+```
+./gradlew check assemble
+```
+
+This runs all tests and packages the library.
+
+## Features/Implementation Notes
+
+* Supports JSON inputs/outputs, File inputs, and Form inputs.
+* Supports collection formats for query parameters: csv, tsv, ssv, pipes.
+* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions.
+* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets.
+
+
+## Documentation for API Endpoints
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v2*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*DefaultApi* | [**consumptionLifetime**](docs/DefaultApi.md#consumptionlifetime) | **GET** /systems/{system_id}/consumption_lifetime |
+*DefaultApi* | [**consumptionStats**](docs/DefaultApi.md#consumptionstats) | **GET** /systems/{system_id}/consumption_stats |
+*DefaultApi* | [**energyLifetime**](docs/DefaultApi.md#energylifetime) | **GET** /systems/{system_id}/energy_lifetime |
+*DefaultApi* | [**envoys**](docs/DefaultApi.md#envoys) | **GET** /systems/{system_id}/envoys |
+*DefaultApi* | [**inventory**](docs/DefaultApi.md#inventory) | **GET** /systems/{system_id}/inventory |
+*DefaultApi* | [**invertersSummaryByEnvoyOrSite**](docs/DefaultApi.md#inverterssummarybyenvoyorsite) | **GET** /systems/inverters_summary_by_envoy_or_site |
+*DefaultApi* | [**monthlyProduction**](docs/DefaultApi.md#monthlyproduction) | **GET** /systems/{system_id}/monthly_production |
+*DefaultApi* | [**productionMeterReadings**](docs/DefaultApi.md#productionmeterreadings) | **GET** /systems/{system_id}/production_meter_readings |
+*DefaultApi* | [**rgmStats**](docs/DefaultApi.md#rgmstats) | **GET** /systems/{system_id}/rgm_stats |
+*DefaultApi* | [**searchSystemId**](docs/DefaultApi.md#searchsystemid) | **GET** /systems/search_system_id |
+*DefaultApi* | [**stats**](docs/DefaultApi.md#stats) | **GET** /systems/{system_id}/stats |
+*DefaultApi* | [**summary**](docs/DefaultApi.md#summary) | **GET** /systems/{system_id}/summary |
+*DefaultApi* | [**systems**](docs/DefaultApi.md#systems) | **GET** /systems |
+
+
+
+## Documentation for Models
+
+ - [enlighten.models.ClientError](docs/ClientError.md)
+ - [enlighten.models.ConflictError](docs/ConflictError.md)
+ - [enlighten.models.ConnectionType](docs/ConnectionType.md)
+ - [enlighten.models.ConsumptionLifetimeResponse](docs/ConsumptionLifetimeResponse.md)
+ - [enlighten.models.ConsumptionStatsResponse](docs/ConsumptionStatsResponse.md)
+ - [enlighten.models.ConsumptionStatsResponseIntervalsInner](docs/ConsumptionStatsResponseIntervalsInner.md)
+ - [enlighten.models.EnergyLifetimeResponse](docs/EnergyLifetimeResponse.md)
+ - [enlighten.models.EnvoysResponse](docs/EnvoysResponse.md)
+ - [enlighten.models.EnvoysResponseEnvoysInner](docs/EnvoysResponseEnvoysInner.md)
+ - [enlighten.models.InventoryResponse](docs/InventoryResponse.md)
+ - [enlighten.models.InventoryResponseEnvoysInner](docs/InventoryResponseEnvoysInner.md)
+ - [enlighten.models.InventoryResponseMetersInner](docs/InventoryResponseMetersInner.md)
+ - [enlighten.models.InvertersSummaryByEnvoyOrSiteResponse](docs/InvertersSummaryByEnvoyOrSiteResponse.md)
+ - [enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner](docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.md)
+ - [enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy](docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.md)
+ - [enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced](docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.md)
+ - [enlighten.models.Meta](docs/Meta.md)
+ - [enlighten.models.MonthlyProductionResponse](docs/MonthlyProductionResponse.md)
+ - [enlighten.models.MonthlyProductionResponseMeterReadingsInner](docs/MonthlyProductionResponseMeterReadingsInner.md)
+ - [enlighten.models.NotFoundError](docs/NotFoundError.md)
+ - [enlighten.models.ProductionMeterReadingsResponse](docs/ProductionMeterReadingsResponse.md)
+ - [enlighten.models.ProductionMeterReadingsResponseMeterReadingsInner](docs/ProductionMeterReadingsResponseMeterReadingsInner.md)
+ - [enlighten.models.RgmStatsResponse](docs/RgmStatsResponse.md)
+ - [enlighten.models.RgmStatsResponseIntervalsInner](docs/RgmStatsResponseIntervalsInner.md)
+ - [enlighten.models.RgmStatsResponseMeterIntervalsInner](docs/RgmStatsResponseMeterIntervalsInner.md)
+ - [enlighten.models.RgmStatsResponseMeterIntervalsInnerIntervalsInner](docs/RgmStatsResponseMeterIntervalsInnerIntervalsInner.md)
+ - [enlighten.models.SearchSystemIdResponse](docs/SearchSystemIdResponse.md)
+ - [enlighten.models.ServerError](docs/ServerError.md)
+ - [enlighten.models.StatsResponse](docs/StatsResponse.md)
+ - [enlighten.models.StatsResponseIntervalsInner](docs/StatsResponseIntervalsInner.md)
+ - [enlighten.models.Status](docs/Status.md)
+ - [enlighten.models.SummaryResponse](docs/SummaryResponse.md)
+ - [enlighten.models.SystemsResponse](docs/SystemsResponse.md)
+ - [enlighten.models.SystemsResponseSystemsInner](docs/SystemsResponseSystemsInner.md)
+ - [enlighten.models.UnprocessableEntityError](docs/UnprocessableEntityError.md)
+
+
+
+## Documentation for Authorization
+
+
+Authentication schemes defined for the API:
+
+### ApiKey
+
+- **Type**: API key
+- **API key parameter name**: key
+- **Location**: URL query string
+
diff --git a/kotlin/commissioning/build.gradle b/kotlin/commissioning/build.gradle
new file mode 100644
index 00000000..ae12ac6e
--- /dev/null
+++ b/kotlin/commissioning/build.gradle
@@ -0,0 +1,62 @@
+group 'org.openapitools'
+version '1.0.0'
+
+wrapper {
+ gradleVersion = '8.7'
+ distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
+}
+
+buildscript {
+ ext.kotlin_version = '1.9.23'
+ ext.spotless_version = "6.25.0"
+
+ repositories {
+ maven { url "https://repo1.maven.org/maven2" }
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotless_version"
+ }
+}
+
+apply plugin: 'kotlin'
+apply plugin: 'maven-publish'
+apply plugin: 'com.diffplug.spotless'
+
+repositories {
+ maven { url "https://repo1.maven.org/maven2" }
+}
+
+// Use spotless plugin to automatically format code, remove unused import, etc
+// To apply changes directly to the file, run `gradlew spotlessApply`
+// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
+spotless {
+ // comment out below to run spotless as part of the `check` task
+ enforceCheck false
+
+ format 'misc', {
+ // define the files (e.g. '*.gradle', '*.md') to apply `misc` to
+ target '.gitignore'
+
+ // define the steps to apply to those files
+ trimTrailingWhitespace()
+ indentWithSpaces() // Takes an integer argument if you don't like 4
+ endWithNewline()
+ }
+ kotlin {
+ ktfmt()
+ }
+}
+
+test {
+ useJUnitPlatform()
+}
+
+dependencies {
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
+ implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
+ implementation "com.squareup.moshi:moshi-kotlin:1.15.1"
+ implementation "com.squareup.moshi:moshi-adapters:1.15.1"
+ implementation "com.squareup.okhttp3:okhttp:4.12.0"
+ testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
+}
diff --git a/kotlin/commissioning/docs/Activation.md b/kotlin/commissioning/docs/Activation.md
new file mode 100644
index 00000000..3c2366ae
--- /dev/null
+++ b/kotlin/commissioning/docs/Activation.md
@@ -0,0 +1,59 @@
+
+# Activation
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | Enlighten ID of this system. System-generated. | [optional]
+**systemName** | **kotlin.String** | Name of the system. | [optional]
+**systemType** | [**SystemTypeEnum**](SystemTypeEnum.md) | | [optional]
+**status** | **kotlin.String** | System's status. | [optional]
+**timezone** | **kotlin.String** | System's timezone. | [optional]
+**stage** | **kotlin.Int** | What stage of the activation process this activation is in. System-generated. | [optional]
+**internetConnection** | [**SystemInternetConnectionEnum**](SystemInternetConnectionEnum.md) | | [optional]
+**lease** | **kotlin.Boolean** | Whether the system is leased. Default false. | [optional]
+**operational** | **kotlin.Boolean** | Whether this system is permitted to operate. Default true. | [optional]
+**owner** | [**ActivationOwner**](ActivationOwner.md) | | [optional]
+**ownerId** | **kotlin.Int** | Enlighten ID of this system owner. System-generated. This field is optional. | [optional]
+**host** | [**ActivationHost**](ActivationHost.md) | | [optional]
+**hostId** | **kotlin.Int** | Enlighten ID of this system host. System-generated. This field is optional. | [optional]
+**installerName** | **kotlin.String** | Name of the installer. | [optional]
+**installerId** | **kotlin.Int** | Enlighten ID of the installer of this system. Defaults to current user's company ID. | [optional]
+**maintainerName** | **kotlin.String** | Name of the maintainer. | [optional]
+**maintainerId** | **kotlin.Int** | The Enlighten ID of the maintainer of this system. Defaults to current user's company ID. | [optional]
+**authorizedSubcontractors** | [**kotlin.collections.List<GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner>**](GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.md) | List of sub-contractors of this system. | [optional]
+**uri** | **kotlin.String** | URI for this activation. | [optional]
+**updatedAt** | **kotlin.Long** | Activation last updated timestamp. | [optional]
+**reference** | **kotlin.String** | Identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system. | [optional]
+**otherReferences** | **kotlin.collections.List<kotlin.String>** | Identifiers assigned to this activation by other companies which have access to it. This attribute is not present if there are no other references for this system. | [optional]
+**allowPublicAccess** | **kotlin.Boolean** | When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true. | [optional]
+**interconnectDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | When the system was approved to connect to the grid. | [optional]
+**installerSupportEmail** | **kotlin.String** | Installer support email. | [optional]
+**source** | [**SystemSourceEnum**](SystemSourceEnum.md) | | [optional]
+**arrayType** | [**SystemArrayTypeEnum**](SystemArrayTypeEnum.md) | | [optional]
+**attachmentType** | [**SystemAttachmentTypeEnum**](SystemAttachmentTypeEnum.md) | | [optional]
+**ensembleEnvoy** | **kotlin.String** | Specifies serial number of ensemble envoy in multi envoy system. | [optional]
+**productionMode** | [**SystemProductionModeEnum**](SystemProductionModeEnum.md) | | [optional]
+**gridProfile** | **kotlin.String** | Grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles. | [optional]
+**requestedProfile** | **kotlin.String** | | [optional]
+**requestedReportFreq** | **kotlin.String** | | [optional]
+**voltage** | **kotlin.String** | Supported voltage/phase associated with a commercial system inside North America. If system type is not commercial, or if the installer exists & installer's country is not inside North America, or if the system's country is not inside North America, then the voltage value would be null. | [optional]
+**envoySerialNumbers** | **kotlin.collections.List<kotlin.String>** | A list of Envoys installed on this system. | [optional]
+**expectedEnvoyCount** | **kotlin.Int** | Total envoys the system is supposed to have. | [optional]
+**expectedPcuCount** | **kotlin.Int** | Total PCUs the system is supposed to have. | [optional]
+**expectedNsrCount** | **kotlin.Int** | Total nsrs the system is supposed to have. | [optional]
+**expectedMeterCount** | **kotlin.Int** | Total meters the system is supposed to have. | [optional]
+**expectedEnchargeCount** | **kotlin.Int** | Total encharges the system is supposed to have. | [optional]
+**expectedEnpowerCount** | **kotlin.Int** | Total enpowers the system is supposed to have. | [optional]
+**pvManufacturer** | **kotlin.Int** | Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs. | [optional]
+**pvManufacturerName** | **kotlin.String** | Name of the Custom PV module manufacturer associated with the system. | [optional]
+**pvModel** | **kotlin.Int** | Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs. | [optional]
+**pvModelName** | **kotlin.String** | Name of the Custom PV module model associated with the system. | [optional]
+**pvModulePowerRating** | **kotlin.Float** | Power rating (in W) of the PV module installed on the system. | [optional]
+**pvModuleType** | **kotlin.Int** | Type ID of the PV module installed on the system. 1 -> 'Mono-facial', 2 -> 'Bi-facial', 3 -> 'Split cell', 4 -> 'Other'. | [optional]
+**encharge** | [**kotlin.collections.List<ActivationEnchargeInner>**](ActivationEnchargeInner.md) | Encharge detail. | [optional]
+**enpower** | [**kotlin.collections.List<ActivationEnpowerInner>**](ActivationEnpowerInner.md) | Enpower detail. | [optional]
+**address** | [**Address**](Address.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ActivationEnchargeInner.md b/kotlin/commissioning/docs/ActivationEnchargeInner.md
new file mode 100644
index 00000000..ad17e9ad
--- /dev/null
+++ b/kotlin/commissioning/docs/ActivationEnchargeInner.md
@@ -0,0 +1,11 @@
+
+# ActivationEnchargeInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**envoySerialNumber** | **kotlin.String** | Envoy serial number. | [optional]
+**enchargeSerialNumbers** | **kotlin.collections.List<kotlin.String>** | Encharge serial numbers. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ActivationEnpowerInner.md b/kotlin/commissioning/docs/ActivationEnpowerInner.md
new file mode 100644
index 00000000..2ba9130d
--- /dev/null
+++ b/kotlin/commissioning/docs/ActivationEnpowerInner.md
@@ -0,0 +1,11 @@
+
+# ActivationEnpowerInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**envoySerialNumber** | **kotlin.String** | Envoy serial number. | [optional]
+**enpowerSerialNumbers** | **kotlin.collections.List<kotlin.String>** | Enpower serial numbers. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ActivationHost.md b/kotlin/commissioning/docs/ActivationHost.md
new file mode 100644
index 00000000..010c90a7
--- /dev/null
+++ b/kotlin/commissioning/docs/ActivationHost.md
@@ -0,0 +1,21 @@
+
+# ActivationHost
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**firstName** | **kotlin.String** | | [optional]
+**lastName** | **kotlin.String** | | [optional]
+**email** | **kotlin.String** | | [optional]
+**phone** | **kotlin.String** | | [optional]
+**active** | **kotlin.Boolean** | Whether the user is allowed to log in to Enlighten. Values true, false. Default true. | [optional]
+**userId** | **kotlin.Int** | | [optional]
+**userRoles** | [**kotlin.collections.List<UserRoleEnum>**](UserRoleEnum.md) | What type of user this is in Enlighten. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty. | [optional]
+**enlightenEmails** | **kotlin.Boolean** | | [optional]
+**enlightenView** | **kotlin.String** | | [optional]
+**uri** | **kotlin.String** | | [optional]
+**updatedAt** | **kotlin.Long** | | [optional]
+**company** | [**ActivationHostCompany**](ActivationHostCompany.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ActivationHostCompany.md b/kotlin/commissioning/docs/ActivationHostCompany.md
new file mode 100644
index 00000000..a1cbf5f9
--- /dev/null
+++ b/kotlin/commissioning/docs/ActivationHostCompany.md
@@ -0,0 +1,14 @@
+
+# ActivationHostCompany
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | | [optional]
+**companyName** | **kotlin.String** | | [optional]
+**location** | **kotlin.String** | | [optional]
+**roles** | [**kotlin.collections.List<CompanyRoleEnum>**](CompanyRoleEnum.md) | What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. | [optional]
+**uri** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ActivationOwner.md b/kotlin/commissioning/docs/ActivationOwner.md
new file mode 100644
index 00000000..9ceeebe3
--- /dev/null
+++ b/kotlin/commissioning/docs/ActivationOwner.md
@@ -0,0 +1,21 @@
+
+# ActivationOwner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**firstName** | **kotlin.String** | | [optional]
+**lastName** | **kotlin.String** | | [optional]
+**email** | **kotlin.String** | | [optional]
+**phone** | **kotlin.String** | | [optional]
+**active** | **kotlin.Boolean** | Whether the user is allowed to log in to Enlighten. Values true, false. Default true. | [optional]
+**userId** | **kotlin.Int** | | [optional]
+**userRoles** | [**kotlin.collections.List<UserRoleEnum>**](UserRoleEnum.md) | What type of user this is in Enlighten. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty. | [optional]
+**enlightenEmails** | **kotlin.Boolean** | | [optional]
+**enlightenView** | **kotlin.String** | | [optional]
+**uri** | **kotlin.String** | | [optional]
+**updatedAt** | **kotlin.Long** | | [optional]
+**company** | [**ActivationOwnerCompany**](ActivationOwnerCompany.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ActivationOwnerCompany.md b/kotlin/commissioning/docs/ActivationOwnerCompany.md
new file mode 100644
index 00000000..44c82423
--- /dev/null
+++ b/kotlin/commissioning/docs/ActivationOwnerCompany.md
@@ -0,0 +1,14 @@
+
+# ActivationOwnerCompany
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | | [optional]
+**companyName** | **kotlin.String** | | [optional]
+**location** | **kotlin.String** | | [optional]
+**roles** | [**kotlin.collections.List<CompanyRoleEnum>**](CompanyRoleEnum.md) | What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. | [optional]
+**uri** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ActivationsApi.md b/kotlin/commissioning/docs/ActivationsApi.md
new file mode 100644
index 00000000..bbda92c3
--- /dev/null
+++ b/kotlin/commissioning/docs/ActivationsApi.md
@@ -0,0 +1,511 @@
+# ActivationsApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**createPartnerActivation**](ActivationsApi.md#createPartnerActivation) | **POST** /partner/activations | Create new activation
+[**deleteActivation**](ActivationsApi.md#deleteActivation) | **DELETE** /partner/activations/{activation_id} | Delete an activation by ID
+[**getActivationOpsProductionMode**](ActivationsApi.md#getActivationOpsProductionMode) | **GET** /activations/{activation_id}/ops/production_mode | Get production mode
+[**getPartnerActivation**](ActivationsApi.md#getPartnerActivation) | **GET** /partner/activations/{activation_id} | Retrieves an Activation by ID
+[**getPartnerActivations**](ActivationsApi.md#getPartnerActivations) | **GET** /partner/activations | List of Activations
+[**grantActivationUserAccess**](ActivationsApi.md#grantActivationUserAccess) | **POST** /activations/{activation_id}/users/{user_id} | Grant Access
+[**revokeActivationUserAccess**](ActivationsApi.md#revokeActivationUserAccess) | **DELETE** /activations/{activation_id}/users/{user_id} | Revoke Access
+[**setActivationOpsProductionMode**](ActivationsApi.md#setActivationOpsProductionMode) | **POST** /activations/{activation_id}/ops/production_mode | Set production mode
+[**updatePartnerActivation**](ActivationsApi.md#updatePartnerActivation) | **PUT** /partner/activations/{activation_id} | Update an activation.
+
+
+
+# **createPartnerActivation**
+> Activation createPartnerActivation(params)
+
+Create new activation
+
+Create new activation.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val params : SystemParams = // SystemParams |
+try {
+ val result : Activation = apiInstance.createPartnerActivation(params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#createPartnerActivation")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#createPartnerActivation")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **params** | **SystemParams**| | [optional]
+
+### Return type
+
+[**Activation**](Activation.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **deleteActivation**
+> DeleteActivationResponse deleteActivation(activationId)
+
+Delete an activation by ID
+
+To delete an activation, the activation stage must be less than 3 and there are no active devices associated with it.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system).
+try {
+ val result : DeleteActivationResponse = apiInstance.deleteActivation(activationId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#deleteActivation")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#deleteActivation")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). |
+
+### Return type
+
+[**DeleteActivationResponse**](DeleteActivationResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getActivationOpsProductionMode**
+> GetActivationOpsProductionModeResponse getActivationOpsProductionMode(activationId)
+
+Get production mode
+
+Get production mode for a particular system. For that system stage must be greater than 2, Otherwise you will get 422.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated.
+try {
+ val result : GetActivationOpsProductionModeResponse = apiInstance.getActivationOpsProductionMode(activationId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#getActivationOpsProductionMode")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#getActivationOpsProductionMode")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). System-generated. |
+
+### Return type
+
+[**GetActivationOpsProductionModeResponse**](GetActivationOpsProductionModeResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getPartnerActivation**
+> Activation getPartnerActivation(activationId, expand)
+
+Retrieves an Activation by ID
+
+By default, the body of the response looks like the example below. However, you can choose to retrieve more information about the activation using response expansion, for example instead of returning only the owner's name within the system hash, the response includes detailed information about the owner by using expand=owner. You can also expand the owner's company by using expand=owner.company. The response now includes information about the owner and the company he belongs to, if any. By using expand=host will include details about the system host. You can also expand the host's company by using expand=host.company. The response now includes information about the host and the company he belongs to.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated.
+val expand : SystemExpandEnum = // SystemExpandEnum | Retrieve more information about the activation. The expand query parameter is a comma-separated list of associations to expand.
+try {
+ val result : Activation = apiInstance.getPartnerActivation(activationId, expand)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#getPartnerActivation")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#getPartnerActivation")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). System-generated. |
+ **expand** | [**SystemExpandEnum**](.md)| Retrieve more information about the activation. The expand query parameter is a comma-separated list of associations to expand. | [optional] [enum: owner, owner.company, host, host.company]
+
+### Return type
+
+[**Activation**](Activation.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getPartnerActivations**
+> GetPartnerActivationsResponse getPartnerActivations(next, limit, stage, reference, installerId, systemName, address, region, search)
+
+List of Activations
+
+Returns a list of activations for which the user can make API requests. There is a limit to the number of activations which can be returned at one time. If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. Provide only valid filters. During filter the activations empty and invalid filter fields are ignored. In case the installer ID doesn't exist, API will return an empty array.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val next : kotlin.String = next_example // kotlin.String | If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. If the returned list below the limit, then response does not include the 'next' field.
+val limit : kotlin.Int = 56 // kotlin.Int | There is a limit to the number of activations which can be returned at one time.
+val stage : SystemStageEnum = // SystemStageEnum | Filter activations by stage. Passing in_progress alone will consider as you have passed all the 1,2,3,4 stages. Passing multiple stage values using comma to filter. E.g. stage=1,2,3. Passing in_progress with any other combination will give you empty systems. This parameter searches for an exact match of the input value.
+val reference : kotlin.String = reference_example // kotlin.String | Filter activations by company reference.
+val installerId : kotlin.Int = 56 // kotlin.Int | Filter activations by installer ID.
+val systemName : kotlin.String = systemName_example // kotlin.String | Filter activations by system name.
+val address : kotlin.String = address_example // kotlin.String | Filter activations by address. This will perform a partial search and return if match found with street1, street2, country, state, zipcode of the activation.
+val region : kotlin.String = region_example // kotlin.String | Filter activations by region. Provide two latitude, longitude values to find activations between them. Format 'latitude1,longitude1,latitude2,longitude2' e.g value '44.968046,-94.420307,44.33328,-89.132008'.
+val search : kotlin.String = search_example // kotlin.String | Filter activations by search. This will perform a partial search and return if match found with system_name, reference, system_id, street1 and street2, country, state, zipcode of the activation.
+try {
+ val result : GetPartnerActivationsResponse = apiInstance.getPartnerActivations(next, limit, stage, reference, installerId, systemName, address, region, search)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#getPartnerActivations")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#getPartnerActivations")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **next** | **kotlin.String**| If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. If the returned list below the limit, then response does not include the 'next' field. | [optional]
+ **limit** | **kotlin.Int**| There is a limit to the number of activations which can be returned at one time. | [optional]
+ **stage** | [**SystemStageEnum**](.md)| Filter activations by stage. Passing in_progress alone will consider as you have passed all the 1,2,3,4 stages. Passing multiple stage values using comma to filter. E.g. stage=1,2,3. Passing in_progress with any other combination will give you empty systems. This parameter searches for an exact match of the input value. | [optional] [enum: 1, 2, 3, 4, 5, in_progress]
+ **reference** | **kotlin.String**| Filter activations by company reference. | [optional]
+ **installerId** | **kotlin.Int**| Filter activations by installer ID. | [optional]
+ **systemName** | **kotlin.String**| Filter activations by system name. | [optional]
+ **address** | **kotlin.String**| Filter activations by address. This will perform a partial search and return if match found with street1, street2, country, state, zipcode of the activation. | [optional]
+ **region** | **kotlin.String**| Filter activations by region. Provide two latitude, longitude values to find activations between them. Format 'latitude1,longitude1,latitude2,longitude2' e.g value '44.968046,-94.420307,44.33328,-89.132008'. | [optional]
+ **search** | **kotlin.String**| Filter activations by search. This will perform a partial search and return if match found with system_name, reference, system_id, street1 and street2, country, state, zipcode of the activation. | [optional]
+
+### Return type
+
+[**GetPartnerActivationsResponse**](GetPartnerActivationsResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **grantActivationUserAccess**
+> GrantActivationUserAccessResponse grantActivationUserAccess(activationId, userId)
+
+Grant Access
+
+Gives a user permission to view this system. Response status 200 indicates the access was granted. The user must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. In all other cases you will get 401 response.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system).
+val userId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the user which you want to grant access.
+try {
+ val result : GrantActivationUserAccessResponse = apiInstance.grantActivationUserAccess(activationId, userId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#grantActivationUserAccess")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#grantActivationUserAccess")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). |
+ **userId** | **kotlin.Int**| Enlighten ID of the user which you want to grant access. |
+
+### Return type
+
+[**GrantActivationUserAccessResponse**](GrantActivationUserAccessResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **revokeActivationUserAccess**
+> RevokeActivationUserAccessResponse revokeActivationUserAccess(activationId, userId)
+
+Revoke Access
+
+Revokes a user's permission to view this system. Response status 200 indicates the access was revoked. The user must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. In all other cases you will get 401 response.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system).
+val userId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the user which you want to revoke the access.
+try {
+ val result : RevokeActivationUserAccessResponse = apiInstance.revokeActivationUserAccess(activationId, userId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#revokeActivationUserAccess")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#revokeActivationUserAccess")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). |
+ **userId** | **kotlin.Int**| Enlighten ID of the user which you want to revoke the access. |
+
+### Return type
+
+[**RevokeActivationUserAccessResponse**](RevokeActivationUserAccessResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **setActivationOpsProductionMode**
+> SetActivationOpsProductionModeResponse setActivationOpsProductionMode(activationId, params)
+
+Set production mode
+
+Enable or Disable production mode for a particular system. For that system stage must be greater than 2, Otherwise you will get 422.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated.
+val params : SetActivationOpsProductionModeRequest = // SetActivationOpsProductionModeRequest |
+try {
+ val result : SetActivationOpsProductionModeResponse = apiInstance.setActivationOpsProductionMode(activationId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#setActivationOpsProductionMode")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#setActivationOpsProductionMode")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). System-generated. |
+ **params** | [**SetActivationOpsProductionModeRequest**](SetActivationOpsProductionModeRequest.md)| | [optional]
+
+### Return type
+
+[**SetActivationOpsProductionModeResponse**](SetActivationOpsProductionModeResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **updatePartnerActivation**
+> Activation updatePartnerActivation(activationId, params)
+
+Update an activation.
+
+Update an activation.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ActivationsApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated.
+val params : SystemParams = // SystemParams |
+try {
+ val result : Activation = apiInstance.updatePartnerActivation(activationId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ActivationsApi#updatePartnerActivation")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ActivationsApi#updatePartnerActivation")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). System-generated. |
+ **params** | **SystemParams**| | [optional]
+
+### Return type
+
+[**Activation**](Activation.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/Address.md b/kotlin/commissioning/docs/Address.md
new file mode 100644
index 00000000..06242e3c
--- /dev/null
+++ b/kotlin/commissioning/docs/Address.md
@@ -0,0 +1,17 @@
+
+# Address
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**street1** | **kotlin.String** | Street line 1. | [optional]
+**street2** | **kotlin.String** | Street line 2. This field is optional. | [optional]
+**city** | **kotlin.String** | City. | [optional]
+**state** | **kotlin.String** | State. | [optional]
+**country** | **kotlin.String** | Country. | [optional]
+**postalCode** | **kotlin.String** | Postal code. | [optional]
+**latitude** | **kotlin.Int** | Latitude. | [optional]
+**longitude** | **kotlin.Int** | Longitude. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ArrayParams.md b/kotlin/commissioning/docs/ArrayParams.md
new file mode 100644
index 00000000..4fa9375a
--- /dev/null
+++ b/kotlin/commissioning/docs/ArrayParams.md
@@ -0,0 +1,17 @@
+
+# ArrayParams
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**label** | **kotlin.String** | Name of the array. |
+**angle** | **kotlin.Int** | Angle of the array. Rotate the array clockwise by the given value. |
+**tilt** | **kotlin.String** | Tilt of the array. |
+**provisionedEnvoy** | **kotlin.String** | Provisioned envoy. |
+**left** | **kotlin.Int** | Left axis position of array. Increase the value to move the array to the right, and decrease to move it to the left. |
+**top** | **kotlin.Int** | Top axis position of array. Increase the value to move the array up, and decrease to move it down. |
+**modules** | [**kotlin.collections.List<ArrayParamsModulesInner>**](ArrayParamsModulesInner.md) | |
+**id** | **kotlin.Int** | ID of the array. ID cannot be changed. It is only used to identify the array that needs to be updated. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ArrayParamsModulesInner.md b/kotlin/commissioning/docs/ArrayParamsModulesInner.md
new file mode 100644
index 00000000..1885d57e
--- /dev/null
+++ b/kotlin/commissioning/docs/ArrayParamsModulesInner.md
@@ -0,0 +1,14 @@
+
+# ArrayParamsModulesInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**left** | **kotlin.Int** | Left axis position of module w.r.t Array. Increase the value to move the module to the right, and decrease to move it to the left. |
+**top** | **kotlin.Int** | Top axis position of module w.r.t Array. Increase the value to move the module up, and decrease to move it down. |
+**angle** | **kotlin.Int** | Angle of the module. Rotate the module clockwise by the given value w.r.t array angle. For example to rotate the array clockwise by 90 degrees pass 90. |
+**serialNum** | **kotlin.String** | Inverter serial number mapped with this module. |
+**id** | **kotlin.Int** | ID of the module. ID cannot be changed. It is only used to identify the array that needs to be updated. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ArraysApi.md b/kotlin/commissioning/docs/ArraysApi.md
new file mode 100644
index 00000000..536cfa47
--- /dev/null
+++ b/kotlin/commissioning/docs/ArraysApi.md
@@ -0,0 +1,283 @@
+# ArraysApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**deleteSystemArray**](ArraysApi.md#deleteSystemArray) | **DELETE** /partner/systems/{system_id}/arrays/{array_id} | Delete an array by ID
+[**getSystemArray**](ArraysApi.md#getSystemArray) | **GET** /partner/systems/{system_id}/arrays/{array_id} | Fetch array details by ID
+[**getSystemArrays**](ArraysApi.md#getSystemArrays) | **GET** /partner/systems/{system_id}/arrays | Fetch particular system Array details
+[**updateSystemArray**](ArraysApi.md#updateSystemArray) | **PUT** /partner/systems/{system_id}/arrays/{array_id} | Update particular system array details
+[**updateSystemArrays**](ArraysApi.md#updateSystemArrays) | **PUT** /partner/systems/{system_id}/arrays | Update all arrays for system
+
+
+
+# **deleteSystemArray**
+> DeleteSystemArrayResponse deleteSystemArray(systemId, arrayId)
+
+Delete an array by ID
+
+Delete an array by ID.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ArraysApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | System ID.
+val arrayId : kotlin.Int = 56 // kotlin.Int | Array ID.
+try {
+ val result : DeleteSystemArrayResponse = apiInstance.deleteSystemArray(systemId, arrayId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ArraysApi#deleteSystemArray")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ArraysApi#deleteSystemArray")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| System ID. |
+ **arrayId** | **kotlin.Int**| Array ID. |
+
+### Return type
+
+[**DeleteSystemArrayResponse**](DeleteSystemArrayResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getSystemArray**
+> SystemArray getSystemArray(systemId, arrayId)
+
+Fetch array details by ID
+
+Fetch array details by ID.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ArraysApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | System ID.
+val arrayId : kotlin.Int = 56 // kotlin.Int | Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Fetch particular system Array details' endpoint.
+try {
+ val result : SystemArray = apiInstance.getSystemArray(systemId, arrayId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ArraysApi#getSystemArray")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ArraysApi#getSystemArray")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| System ID. |
+ **arrayId** | **kotlin.Int**| Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Fetch particular system Array details' endpoint. |
+
+### Return type
+
+[**SystemArray**](SystemArray.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getSystemArrays**
+> SystemArrays getSystemArrays(systemId)
+
+Fetch particular system Array details
+
+Fetch particular system Array details.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ArraysApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | System ID.
+try {
+ val result : SystemArrays = apiInstance.getSystemArrays(systemId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ArraysApi#getSystemArrays")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ArraysApi#getSystemArrays")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| System ID. |
+
+### Return type
+
+[**SystemArrays**](SystemArrays.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **updateSystemArray**
+> SystemArray updateSystemArray(systemId, arrayId, params)
+
+Update particular system array details
+
+Update particular system array details. The angle, left, and top fields in the request parameter must be of integer type. Enlighten will rearrange the top and left values of the modules to fit the modules properly and avoid overlap. Therefore, the top and left values in the response may be slightly different from the top and left values passed in the request parameters. In array level, top and left is the total size of the modules inside that array. Overall in arrays, the top and left values should not overlap. In the module level, the size of a panel is 100 units long in the x axis and 200 units long in the y axis. Please pass the left and top values in the request parameter in multiples of 100 and 200 respectively.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ArraysApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | System ID.
+val arrayId : kotlin.Int = 56 // kotlin.Int | Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Update all Arrays' endpoint.
+val params : ArrayParams = // ArrayParams |
+try {
+ val result : SystemArray = apiInstance.updateSystemArray(systemId, arrayId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ArraysApi#updateSystemArray")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ArraysApi#updateSystemArray")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| System ID. |
+ **arrayId** | **kotlin.Int**| Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Update all Arrays' endpoint. |
+ **params** | **ArrayParams**| | [optional]
+
+### Return type
+
+[**SystemArray**](SystemArray.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **updateSystemArrays**
+> SystemArrays updateSystemArrays(systemId, params)
+
+Update all arrays for system
+
+Update all arrays for system. The angle, left, and top fields in the request parameter must be of integer type. Enlighten will rearrange the top and left values of the modules to fit the modules properly and avoid overlap. Therefore, the top and left values in the response may be slightly different from the top and left values passed in the request parameters. In array level, top and left is the total size of the modules inside that array. Overall the arrays top and left values should not overlap. In the module level, the size of a panel is 100 units long in the x axis and 200 units long in the y axis. Please pass the left and top values in the request parameter in multiples of 100 and 200 respectively.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = ArraysApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | System ID.
+val params : UpdateSystemArraysRequest = // UpdateSystemArraysRequest |
+try {
+ val result : SystemArrays = apiInstance.updateSystemArrays(systemId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling ArraysApi#updateSystemArrays")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling ArraysApi#updateSystemArrays")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| System ID. |
+ **params** | [**UpdateSystemArraysRequest**](UpdateSystemArraysRequest.md)| | [optional]
+
+### Return type
+
+[**SystemArrays**](SystemArrays.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/ClientError.md b/kotlin/commissioning/docs/ClientError.md
new file mode 100644
index 00000000..fbffc9a6
--- /dev/null
+++ b/kotlin/commissioning/docs/ClientError.md
@@ -0,0 +1,11 @@
+
+# ClientError
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**reason** | **kotlin.String** | |
+**message** | **kotlin.collections.List<kotlin.String>** | |
+
+
+
diff --git a/kotlin/commissioning/docs/CompaniesApi.md b/kotlin/commissioning/docs/CompaniesApi.md
new file mode 100644
index 00000000..c5dd2bdc
--- /dev/null
+++ b/kotlin/commissioning/docs/CompaniesApi.md
@@ -0,0 +1,328 @@
+# CompaniesApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**createCompanyUser**](CompaniesApi.md#createCompanyUser) | **POST** /companies/{company_id}/users | Create company user
+[**getCompanyUser**](CompaniesApi.md#getCompanyUser) | **GET** /companies/{company_id}/users/{user_id} | Returns the requested user
+[**getCompanyUsers**](CompaniesApi.md#getCompanyUsers) | **GET** /companies/{company_id}/users | Get all users with in a company
+[**getSelfCompanyAuthorizedSubcontractors**](CompaniesApi.md#getSelfCompanyAuthorizedSubcontractors) | **GET** /companies/self/authorized_subcontractors | User's company and its authorized subcontractors.
+[**getSelfCompanyBranches**](CompaniesApi.md#getSelfCompanyBranches) | **GET** /companies/self/branches | User's company and its branches
+[**updateCompanyUser**](CompaniesApi.md#updateCompanyUser) | **PUT** /companies/{company_id}/users/{user_id} | Update company user
+
+
+
+# **createCompanyUser**
+> User createCompanyUser(companyId, params)
+
+Create company user
+
+Create a company user. When the user is created in the context of a company, then the user is belongs to that company. Otherwise, the user does not belong to a company. Email, first name, and last name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored. Pass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = CompaniesApi()
+val companyId : kotlin.Int = 56 // kotlin.Int | Company ID.
+val params : CreateCompanyUserRequest = // CreateCompanyUserRequest |
+try {
+ val result : User = apiInstance.createCompanyUser(companyId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling CompaniesApi#createCompanyUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling CompaniesApi#createCompanyUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **companyId** | **kotlin.Int**| Company ID. |
+ **params** | [**CreateCompanyUserRequest**](CreateCompanyUserRequest.md)| | [optional]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **getCompanyUser**
+> User getCompanyUser(companyId, userId, expand)
+
+Returns the requested user
+
+Returns the requested user. If the user is requested in the scope of a company, then two conditions apply. 1) You must have access to the requested company; otherwise a 401 is returned. 2) The user must belong to the requested company; otherwise a 401 is returned. Company details are provided in the response only if 'expand' parameter is passed in the URL with value as company. Otherwise, company information will not be provided in the response.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = CompaniesApi()
+val companyId : kotlin.Int = 56 // kotlin.Int | Company ID.
+val userId : kotlin.Int = 56 // kotlin.Int | User ID.
+val expand : UserExpandEnum = // UserExpandEnum | Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response.
+try {
+ val result : User = apiInstance.getCompanyUser(companyId, userId, expand)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling CompaniesApi#getCompanyUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling CompaniesApi#getCompanyUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **companyId** | **kotlin.Int**| Company ID. |
+ **userId** | **kotlin.Int**| User ID. |
+ **expand** | [**UserExpandEnum**](.md)| Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response. | [optional] [enum: company]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getCompanyUsers**
+> GetCompanyUsersResponse getCompanyUsers(companyId)
+
+Get all users with in a company
+
+Returns the users in the given company.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = CompaniesApi()
+val companyId : kotlin.Int = 56 // kotlin.Int | Company ID.
+try {
+ val result : GetCompanyUsersResponse = apiInstance.getCompanyUsers(companyId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling CompaniesApi#getCompanyUsers")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling CompaniesApi#getCompanyUsers")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **companyId** | **kotlin.Int**| Company ID. |
+
+### Return type
+
+[**GetCompanyUsersResponse**](GetCompanyUsersResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getSelfCompanyAuthorizedSubcontractors**
+> GetSelfCompanyAuthorizedSubcontractorsResponse getSelfCompanyAuthorizedSubcontractors()
+
+User's company and its authorized subcontractors.
+
+Returns all the authorized subcontractors of a given company, if any.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = CompaniesApi()
+try {
+ val result : GetSelfCompanyAuthorizedSubcontractorsResponse = apiInstance.getSelfCompanyAuthorizedSubcontractors()
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling CompaniesApi#getSelfCompanyAuthorizedSubcontractors")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling CompaniesApi#getSelfCompanyAuthorizedSubcontractors")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**GetSelfCompanyAuthorizedSubcontractorsResponse**](GetSelfCompanyAuthorizedSubcontractorsResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getSelfCompanyBranches**
+> GetSelfCompanyBranchesResponse getSelfCompanyBranches()
+
+User's company and its branches
+
+Returns information about the API user's company and its branches, if any.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = CompaniesApi()
+try {
+ val result : GetSelfCompanyBranchesResponse = apiInstance.getSelfCompanyBranches()
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling CompaniesApi#getSelfCompanyBranches")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling CompaniesApi#getSelfCompanyBranches")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**GetSelfCompanyBranchesResponse**](GetSelfCompanyBranchesResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **updateCompanyUser**
+> User updateCompanyUser(companyId, userId, params)
+
+Update company user
+
+Updates a user. You may change a user's company if you have access to the user, the old company, and the new company. The user is requested in the scope of a company, then three conditions apply. 1) You must have access to the requested company; otherwise a 401 is returned. 2) The user must belong to the requested company; otherwise a 401 is returned. 3) Requested user must be created by API user (or) it must belong to your company or its branches.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = CompaniesApi()
+val companyId : kotlin.Int = 56 // kotlin.Int | Company ID.
+val userId : kotlin.Int = 56 // kotlin.Int | User ID.
+val params : UpdateCompanyUserRequest = // UpdateCompanyUserRequest |
+try {
+ val result : User = apiInstance.updateCompanyUser(companyId, userId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling CompaniesApi#updateCompanyUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling CompaniesApi#updateCompanyUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **companyId** | **kotlin.Int**| Company ID. |
+ **userId** | **kotlin.Int**| User ID. |
+ **params** | [**UpdateCompanyUserRequest**](UpdateCompanyUserRequest.md)| | [optional]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/Company.md b/kotlin/commissioning/docs/Company.md
new file mode 100644
index 00000000..94e546de
--- /dev/null
+++ b/kotlin/commissioning/docs/Company.md
@@ -0,0 +1,14 @@
+
+# Company
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | Enlighten-generated ID of the company to which the user belongs. | [optional]
+**companyName** | **kotlin.String** | Name of the company to which the user belongs. | [optional]
+**location** | **kotlin.String** | Company location. | [optional]
+**roles** | [**kotlin.collections.List<CompanyRoleEnum>**](CompanyRoleEnum.md) | What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. | [optional]
+**uri** | **kotlin.String** | URI to the show() method for the company. System-generated. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/CompanyRoleEnum.md b/kotlin/commissioning/docs/CompanyRoleEnum.md
new file mode 100644
index 00000000..3dfe2698
--- /dev/null
+++ b/kotlin/commissioning/docs/CompanyRoleEnum.md
@@ -0,0 +1,10 @@
+
+# CompanyRoleEnum
+
+## Enum
+
+
+ * `installer` (value: `"installer"`)
+
+
+
diff --git a/kotlin/commissioning/docs/ConflictError.md b/kotlin/commissioning/docs/ConflictError.md
new file mode 100644
index 00000000..44cacb4c
--- /dev/null
+++ b/kotlin/commissioning/docs/ConflictError.md
@@ -0,0 +1,22 @@
+
+# ConflictError
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**reason** | **kotlin.String** | |
+**message** | **kotlin.collections.List<kotlin.String>** | |
+**period** | [**inline**](#Period) | |
+**periodStart** | **kotlin.Int** | |
+**periodEnd** | **kotlin.Int** | |
+**limit** | **kotlin.Int** | |
+
+
+
+## Enum: period
+Name | Value
+---- | -----
+period | hour, minute, second
+
+
+
diff --git a/kotlin/commissioning/docs/ConnectionType.md b/kotlin/commissioning/docs/ConnectionType.md
new file mode 100644
index 00000000..e8f1ddbe
--- /dev/null
+++ b/kotlin/commissioning/docs/ConnectionType.md
@@ -0,0 +1,14 @@
+
+# ConnectionType
+
+## Enum
+
+
+ * `ethernet` (value: `"ethernet"`)
+
+ * `cellular` (value: `"cellular"`)
+
+ * `wifi` (value: `"wifi"`)
+
+
+
diff --git a/kotlin/commissioning/docs/ConsumptionLifetimeResponse.md b/kotlin/commissioning/docs/ConsumptionLifetimeResponse.md
new file mode 100644
index 00000000..1de93fd3
--- /dev/null
+++ b/kotlin/commissioning/docs/ConsumptionLifetimeResponse.md
@@ -0,0 +1,13 @@
+
+# ConsumptionLifetimeResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**startDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | When no `start_date` parameter is specified on the request, this is the `operational_date` of the system. May be null if system has never produced. When a `start_date` parameter is included in the request, it is included here in the response. |
+**consumption** | **kotlin.collections.List<kotlin.Int>** | An array of consumption measurements, one for each day since consumption metering began, or one for each day of the requested period. |
+**meta** | [**Meta**](Meta.md) | |
+**systemId** | **kotlin.Int** | The identifier of the system. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ConsumptionStatsResponse.md b/kotlin/commissioning/docs/ConsumptionStatsResponse.md
new file mode 100644
index 00000000..c83cbf77
--- /dev/null
+++ b/kotlin/commissioning/docs/ConsumptionStatsResponse.md
@@ -0,0 +1,13 @@
+
+# ConsumptionStatsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | Enlighten ID for this system. |
+**totalDevices** | **kotlin.Int** | Number of active consumption meters for this system. |
+**meta** | [**Meta**](Meta.md) | |
+**intervals** | [**kotlin.collections.List<ConsumptionStatsResponseIntervalsInner>**](ConsumptionStatsResponseIntervalsInner.md) | A list of intervals between the requested start and end times. |
+
+
+
diff --git a/kotlin/commissioning/docs/ConsumptionStatsResponseIntervalsInner.md b/kotlin/commissioning/docs/ConsumptionStatsResponseIntervalsInner.md
new file mode 100644
index 00000000..f863bb99
--- /dev/null
+++ b/kotlin/commissioning/docs/ConsumptionStatsResponseIntervalsInner.md
@@ -0,0 +1,12 @@
+
+# ConsumptionStatsResponseIntervalsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**endAt** | **kotlin.Long** | End of interval. The format is Unix epoch time unless you pass a `datetime_format` parameter as described [here](https://developer.enphase.com/docs#Datetimes). |
+**enwh** | **kotlin.Int** | Energy consumed during this interval, in Watt-hours. |
+**devicesReporting** | **kotlin.Int** | Number of consumption meters that reported data for this interval at the time of the request. |
+
+
+
diff --git a/kotlin/commissioning/docs/CreateCompanyUserRequest.md b/kotlin/commissioning/docs/CreateCompanyUserRequest.md
new file mode 100644
index 00000000..02d173a1
--- /dev/null
+++ b/kotlin/commissioning/docs/CreateCompanyUserRequest.md
@@ -0,0 +1,14 @@
+
+# CreateCompanyUserRequest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **kotlin.String** | Email address of the user. Must be unique within Enlighten. Required. |
+**firstName** | **kotlin.String** | User's first name. Required. |
+**lastName** | **kotlin.String** | User's last name. Required. |
+**enlightenEmails** | **kotlin.Boolean** | Whether the user receives automated emails from Enlighten. Default false. | [optional]
+**phone** | **kotlin.String** | Telephone number of the user. Optional. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/CreateUserRequest.md b/kotlin/commissioning/docs/CreateUserRequest.md
new file mode 100644
index 00000000..3cb22d79
--- /dev/null
+++ b/kotlin/commissioning/docs/CreateUserRequest.md
@@ -0,0 +1,16 @@
+
+# CreateUserRequest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**email** | **kotlin.String** | Email address of the user. Must be unique within Enlighten. Required. |
+**firstName** | **kotlin.String** | User's first name. Required. |
+**lastName** | **kotlin.String** | User's last name. Required. |
+**enlightenEmails** | **kotlin.Boolean** | Whether the user receives automated emails from Enlighten. Default false. | [optional]
+**enlightenView** | **kotlin.String** | Which view of Enlighten the user has. Options 'my' for MyEnlighten, 'manager' for Enlighten Manager. Default 'my'. Users who do not belong to companies should be set to 'my'. You must have an agreement with Enphase Energy to set a user to 'manager'. Company ID is required when enlighten_view is 'manager'. | [optional]
+**phone** | **kotlin.String** | Telephone number of the user. Optional. | [optional]
+**companyId** | **kotlin.Int** | Enlighten-generated ID of the company to which the user belongs, if any. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/DefaultApi.md b/kotlin/commissioning/docs/DefaultApi.md
new file mode 100644
index 00000000..3cf66388
--- /dev/null
+++ b/kotlin/commissioning/docs/DefaultApi.md
@@ -0,0 +1,751 @@
+# DefaultApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**consumptionLifetime**](DefaultApi.md#consumptionLifetime) | **GET** /systems/{system_id}/consumption_lifetime |
+[**consumptionStats**](DefaultApi.md#consumptionStats) | **GET** /systems/{system_id}/consumption_stats |
+[**energyLifetime**](DefaultApi.md#energyLifetime) | **GET** /systems/{system_id}/energy_lifetime |
+[**envoys**](DefaultApi.md#envoys) | **GET** /systems/{system_id}/envoys |
+[**inventory**](DefaultApi.md#inventory) | **GET** /systems/{system_id}/inventory |
+[**invertersSummaryByEnvoyOrSite**](DefaultApi.md#invertersSummaryByEnvoyOrSite) | **GET** /systems/inverters_summary_by_envoy_or_site |
+[**monthlyProduction**](DefaultApi.md#monthlyProduction) | **GET** /systems/{system_id}/monthly_production |
+[**productionMeterReadings**](DefaultApi.md#productionMeterReadings) | **GET** /systems/{system_id}/production_meter_readings |
+[**rgmStats**](DefaultApi.md#rgmStats) | **GET** /systems/{system_id}/rgm_stats |
+[**searchSystemId**](DefaultApi.md#searchSystemId) | **GET** /systems/search_system_id |
+[**stats**](DefaultApi.md#stats) | **GET** /systems/{system_id}/stats |
+[**summary**](DefaultApi.md#summary) | **GET** /systems/{system_id}/summary |
+[**systems**](DefaultApi.md#systems) | **GET** /systems |
+
+
+
+# **consumptionLifetime**
+> ConsumptionLifetimeResponse consumptionLifetime(systemId, userId, startDate, endDate)
+
+
+
+Returns a time series of energy consumption as measured by the consumption meter installed on the specified system. All measurements are in Watt-hours. If the system does not have a meter, returns `204` - No Content. If you don't have permission to view consumption data, the response code is `401`. The time series includes one entry for each day from the `start_date` to the `end_date`. There are no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no data has been reported for the last days in the series. You can check the system's status in the `meta` attribute of the response to determine when the system last reported and whether it has communication or metering problems.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val startDate : java.time.LocalDate = Fri Jul 01 02:00:00 CEST 2016 // java.time.LocalDate | The date on which to start the time series. Defaults to the system's operational date.
+val endDate : java.time.LocalDate = Sun Jul 31 02:00:00 CEST 2016 // java.time.LocalDate | The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier.
+try {
+ val result : ConsumptionLifetimeResponse = apiInstance.consumptionLifetime(systemId, userId, startDate, endDate)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#consumptionLifetime")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#consumptionLifetime")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+ **startDate** | **java.time.LocalDate**| The date on which to start the time series. Defaults to the system's operational date. | [optional]
+ **endDate** | **java.time.LocalDate**| The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier. | [optional]
+
+### Return type
+
+[**ConsumptionLifetimeResponse**](ConsumptionLifetimeResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **consumptionStats**
+> ConsumptionStatsResponse consumptionStats(systemId, userId, startAt, endAt)
+
+
+
+Returns consumption as measured by the consumption meter installed on the specified system. If the total duration requested is more than one month, returns one month of intervals. Intervals are 15 minutes in length and start at the top of the hour. Requests for times that do not fall on the 15-minute marks are rounded down. For example, a request for 08:01, 08:08, 08:11, or 08:14 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 15 minutes after the requested start date. If the system doesn't have any consumption meters installed, the response includes an empty intervals array. If you don't have permission to view consumption data, the response code is `401`. Under some conditions, data for a given period may be temporarily unavailable.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val startAt : kotlin.Long = 1448946000 // kotlin.Long | Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`.
+val endAt : kotlin.Long = 1449011615 // kotlin.Long | End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval.
+try {
+ val result : ConsumptionStatsResponse = apiInstance.consumptionStats(systemId, userId, startAt, endAt)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#consumptionStats")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#consumptionStats")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+ **startAt** | **kotlin.Long**| Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`. | [optional]
+ **endAt** | **kotlin.Long**| End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval. | [optional]
+
+### Return type
+
+[**ConsumptionStatsResponse**](ConsumptionStatsResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **energyLifetime**
+> EnergyLifetimeResponse energyLifetime(systemId, userId, startDate, endDate, production)
+
+
+
+Returns a time series of energy produced on the system over its lifetime. All measurements are in Watt-hours. The time series includes one entry for each day from the `start_date` to the `end_date`. There are no gaps in the time series. If the response includes trailing zeroes, such as `[909, 4970, 0, 0, 0]`, then no energy has been reported for the last days in the series. You can check the system's status in the `meta` attribute of the response to determine when the system last reported and whether it has communication or production problems. If the system has a meter, the time series includes data as measured by the microinverters until the first full day after the meter has been installed, when it switches to using the data as measured by the meter. This is called the \"merged time series\". In addition, the response includes the attribute `meter_start_date`, to indicate where in the time series the meter measurements begin to be used. You can retrieve the complete time series from the meter and from the microinverters by adding the parameter `production=all` to the request.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val startDate : java.time.LocalDate = Tue Jan 01 01:00:00 CET 2013 // java.time.LocalDate | The date on which to start the time series. Defaults to the system's operational date.
+val endDate : java.time.LocalDate = Sun Jan 06 01:00:00 CET 2013 // java.time.LocalDate | The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier.
+val production : kotlin.String = all // kotlin.String | When `all`, returns the merged time series plus the time series as reported by the microinverters and the meter on the system. Other values are ignored.
+try {
+ val result : EnergyLifetimeResponse = apiInstance.energyLifetime(systemId, userId, startDate, endDate, production)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#energyLifetime")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#energyLifetime")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+ **startDate** | **java.time.LocalDate**| The date on which to start the time series. Defaults to the system's operational date. | [optional]
+ **endDate** | **java.time.LocalDate**| The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier. | [optional]
+ **production** | **kotlin.String**| When `all`, returns the merged time series plus the time series as reported by the microinverters and the meter on the system. Other values are ignored. | [optional] [enum: all]
+
+### Return type
+
+[**EnergyLifetimeResponse**](EnergyLifetimeResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **envoys**
+> EnvoysResponse envoys(systemId, userId)
+
+
+
+Returns a listing of all active Envoys currently deployed on the system.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+try {
+ val result : EnvoysResponse = apiInstance.envoys(systemId, userId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#envoys")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#envoys")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+
+### Return type
+
+[**EnvoysResponse**](EnvoysResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **inventory**
+> InventoryResponse inventory(systemId, userId)
+
+
+
+Returns a listing of active devices on the given system. A device is considered active if it has not been retired in Enlighten. \"Active\" does not imply that the device is currently reporting, producing, or measuring energy.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+try {
+ val result : InventoryResponse = apiInstance.inventory(systemId, userId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#inventory")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#inventory")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+
+### Return type
+
+[**InventoryResponse**](InventoryResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **invertersSummaryByEnvoyOrSite**
+> kotlin.collections.List<InvertersSummaryByEnvoyOrSiteResponse> invertersSummaryByEnvoyOrSite(userId, siteId)
+
+
+
+Returns the summary along with the energy produced on the system over its lifetime.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val siteId : kotlin.Int = 66 // kotlin.Int | The identifier of the system.
+try {
+ val result : kotlin.collections.List = apiInstance.invertersSummaryByEnvoyOrSite(userId, siteId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#invertersSummaryByEnvoyOrSite")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#invertersSummaryByEnvoyOrSite")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **kotlin.String**| |
+ **siteId** | **kotlin.Int**| The identifier of the system. |
+
+### Return type
+
+[**kotlin.collections.List<InvertersSummaryByEnvoyOrSiteResponse>**](InvertersSummaryByEnvoyOrSiteResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **monthlyProduction**
+> MonthlyProductionResponse monthlyProduction(systemId, userId, startDate)
+
+
+
+This endpoint is deprecated and will be removed in a future release. Use `production_meter_readings` or `energy_lifetime` instead. Returns the energy production of the system for the month starting on the given date. The start date must be at least one month ago. If a meter or meters are installed on the system, measurements come from the meter; otherwise, measurements come from the microinverters. This endpoint can return a response of Data Temporarily Unavailable.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val startDate : java.time.LocalDate = Fri Jul 01 02:00:00 CEST 2011 // java.time.LocalDate | Start date for reporting period. The reporting period ends on the previous day of the next month; for example, a `start_date` of 2011-07-20 returns data through 2011-06-19. When the start date is the first of a calendar month, the end date is the last day of that month.
+try {
+ val result : MonthlyProductionResponse = apiInstance.monthlyProduction(systemId, userId, startDate)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#monthlyProduction")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#monthlyProduction")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+ **startDate** | **java.time.LocalDate**| Start date for reporting period. The reporting period ends on the previous day of the next month; for example, a `start_date` of 2011-07-20 returns data through 2011-06-19. When the start date is the first of a calendar month, the end date is the last day of that month. |
+
+### Return type
+
+[**MonthlyProductionResponse**](MonthlyProductionResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **productionMeterReadings**
+> ProductionMeterReadingsResponse productionMeterReadings(systemId, userId, endAt)
+
+
+
+Returns the last known \"odometer\" reading of each revenue-grade production meter on the system as of the requested time. This endpoint includes entries for every production meter on the requested system, regardless of whether the meter is currently in service or retired. `read_at` is the time at which the reading was taken, and is always less than or equal to the requested `end_at`. Commonly, the reading will be within 30 minutes of the requested `end_at`; however, larger deltas can occur and do not necessarily mean there is a problem with the meter or the system it is on. Systems that are configured to report infrequently can show large deltas on all meters, especially when `end_at` is close to the current time. Meters that have been retired from a system will show an `end_at` that doesn't change, and that eventually is far away from the current time.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val endAt : kotlin.Long = 1473901755 // kotlin.Long |
+try {
+ val result : ProductionMeterReadingsResponse = apiInstance.productionMeterReadings(systemId, userId, endAt)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#productionMeterReadings")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#productionMeterReadings")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+ **endAt** | **kotlin.Long**| | [optional]
+
+### Return type
+
+[**ProductionMeterReadingsResponse**](ProductionMeterReadingsResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **rgmStats**
+> RgmStatsResponse rgmStats(systemId, userId, startAt, endAt)
+
+
+
+Returns performance statistics as measured by the revenue-grade meters installed on the specified system. If the total duration requested is more than one month, returns one month of intervals. Intervals are 15 minutes in length and start at the top of the hour. Requests for times that do not fall on the 15-minute marks are rounded down. For example, a request for 08:01, 08:08, 08:11, or 08:14 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 15 minutes after the requested start date. If the system doesn't have any revenue-grade meters installed, the response includes an empty intervals array. Under some conditions, data for a given period may be temporarily unavailable.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val startAt : kotlin.Long = 1381474800 // kotlin.Long | Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`.
+val endAt : kotlin.Long = 1381561200 // kotlin.Long | End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval.
+try {
+ val result : RgmStatsResponse = apiInstance.rgmStats(systemId, userId, startAt, endAt)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#rgmStats")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#rgmStats")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+ **startAt** | **kotlin.Long**| Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`. | [optional]
+ **endAt** | **kotlin.Long**| End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval. | [optional]
+
+### Return type
+
+[**RgmStatsResponse**](RgmStatsResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **searchSystemId**
+> SearchSystemIdResponse searchSystemId(userId, serialNum)
+
+
+
+Get system ID by envoy serial number.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val serialNum : kotlin.String = 23435345345 // kotlin.String | Serial number of the envoy.
+try {
+ val result : SearchSystemIdResponse = apiInstance.searchSystemId(userId, serialNum)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#searchSystemId")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#searchSystemId")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **kotlin.String**| |
+ **serialNum** | **kotlin.String**| Serial number of the envoy. |
+
+### Return type
+
+[**SearchSystemIdResponse**](SearchSystemIdResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **stats**
+> StatsResponse stats(systemId, userId, startAt, endAt)
+
+
+
+Returns performance statistics for the specified system as reported by microinverters installed on the system. If the total duration requested is more than one day, returns one day of intervals. Intervals are 5 minutes in length and start at the top of the hour. Requests for times that do not fall on the 5-minute marks are rounded down. For example, a request for 08:01, 08:02, 08:03, or 08:04 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 5 minutes after the requested start date. The response includes intervals that have been reported for the requested period. Gaps in reporting are not filled with 0-value intervals. The dark hours on a system are an example of such a gap, because the microinverters do not produce at night. Sometimes a request cannot be processed because the requested dates are invalid for the system in question. Examples include asking for stats starting at a time that is later than the system's last reported interval, or asking for stats before a system has started production. In cases such as these, the response code is `422` and the response body includes an error reason as well as the parameters used to process the request. If the system doesn't have any microinverters installed, the response includes an empty intervals array. Under some conditions, data for a given period may be temporarily unavailable.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val startAt : kotlin.Long = 1381496100 // kotlin.Long | Start of reporting period in Unix epoch time. If no start is specified, defaults to midnight today, in the timezone of the system. If the start date is earlier than one year ago today, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the `operational_date`.
+val endAt : kotlin.Long = 1381497600 // kotlin.Long | End of reporting period in Unix epoch time. If no end is specified, the assumed end is now. If the end is later than the last reporting interval the response data ends with the last reported interval.
+try {
+ val result : StatsResponse = apiInstance.stats(systemId, userId, startAt, endAt)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#stats")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#stats")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+ **startAt** | **kotlin.Long**| Start of reporting period in Unix epoch time. If no start is specified, defaults to midnight today, in the timezone of the system. If the start date is earlier than one year ago today, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the `operational_date`. | [optional]
+ **endAt** | **kotlin.Long**| End of reporting period in Unix epoch time. If no end is specified, the assumed end is now. If the end is later than the last reporting interval the response data ends with the last reported interval. | [optional]
+
+### Return type
+
+[**StatsResponse**](StatsResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **summary**
+> SummaryResponse summary(systemId, userId, summaryDate)
+
+
+
+Returns summary information for the specified system.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val systemId : kotlin.Int = 66 // kotlin.Int |
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val summaryDate : java.time.LocalDate = Fri Sep 17 02:00:00 CEST 2010 // java.time.LocalDate | Start of reporting period. If no `summary_date` is provided, the start is the current day at midnight site-local time. Otherwise, the start is midnight site-local time of the requested day. If the requested date cannot be parsed or is in the future, the response includes an informative error message and `422` status.
+try {
+ val result : SummaryResponse = apiInstance.summary(systemId, userId, summaryDate)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#summary")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#summary")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| |
+ **userId** | **kotlin.String**| |
+ **summaryDate** | **java.time.LocalDate**| Start of reporting period. If no `summary_date` is provided, the start is the current day at midnight site-local time. Otherwise, the start is midnight site-local time of the requested day. If the requested date cannot be parsed or is in the future, the response includes an informative error message and `422` status. | [optional]
+
+### Return type
+
+[**SummaryResponse**](SummaryResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **systems**
+> SystemsResponse systems(userId, next, limit, systemId, systemId2, systemName, systemName2, status, status2, reference, reference2, installer, installer2, connectionType, connectionType2)
+
+
+
+Returns a list of systems for which the user can make API requests. There is a limit to the number of systems that can be returned at one time. If the first request does not return a full list, use the `next` attribute in the response body to request the next page of systems. By default, systems are returned in batches of 100. The maximum page size is 1000.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.infrastructure.*
+//import enlighten.models.*
+
+val apiInstance = DefaultApi()
+val userId : kotlin.String = 4d6a51330a // kotlin.String |
+val next : kotlin.String = 4d5467784d5445770a // kotlin.String |
+val limit : kotlin.Int = 100 // kotlin.Int |
+val systemId : kotlin.Int = 67 // kotlin.Int |
+val systemId2 : kotlin.collections.List = [67] // kotlin.collections.List |
+val systemName : kotlin.String = Green // kotlin.String |
+val systemName2 : kotlin.collections.List = ["Green"] // kotlin.collections.List |
+val status : Status = power // Status |
+val status2 : kotlin.collections.List = ["comm","micro"] // kotlin.collections.List |
+val reference : kotlin.String = reference_example // kotlin.String |
+val reference2 : kotlin.collections.List = // kotlin.collections.List |
+val installer : kotlin.String = installer_example // kotlin.String |
+val installer2 : kotlin.collections.List = // kotlin.collections.List |
+val connectionType : ConnectionType = // ConnectionType |
+val connectionType2 : kotlin.collections.List = ["ethernet"] // kotlin.collections.List |
+try {
+ val result : SystemsResponse = apiInstance.systems(userId, next, limit, systemId, systemId2, systemName, systemName2, status, status2, reference, reference2, installer, installer2, connectionType, connectionType2)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling DefaultApi#systems")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling DefaultApi#systems")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **kotlin.String**| |
+ **next** | **kotlin.String**| | [optional]
+ **limit** | **kotlin.Int**| | [optional] [default to 100]
+ **systemId** | **kotlin.Int**| | [optional]
+ **systemId2** | [**kotlin.collections.List<kotlin.Int>**](kotlin.Int.md)| | [optional]
+ **systemName** | **kotlin.String**| | [optional]
+ **systemName2** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | [optional]
+ **status** | [**Status**](.md)| | [optional] [enum: comm, power, meter, meter_issue, micro, battery, storage_idle, normal]
+ **status2** | [**kotlin.collections.List<Status>**](Status.md)| | [optional]
+ **reference** | **kotlin.String**| | [optional]
+ **reference2** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | [optional]
+ **installer** | **kotlin.String**| | [optional]
+ **installer2** | [**kotlin.collections.List<kotlin.String>**](kotlin.String.md)| | [optional]
+ **connectionType** | [**ConnectionType**](.md)| | [optional] [enum: ethernet, cellular, wifi]
+ **connectionType2** | [**kotlin.collections.List<ConnectionType>**](ConnectionType.md)| | [optional]
+
+### Return type
+
+[**SystemsResponse**](SystemsResponse.md)
+
+### Authorization
+
+
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/DeleteActivationResponse.md b/kotlin/commissioning/docs/DeleteActivationResponse.md
new file mode 100644
index 00000000..469296f4
--- /dev/null
+++ b/kotlin/commissioning/docs/DeleteActivationResponse.md
@@ -0,0 +1,10 @@
+
+# DeleteActivationResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**message** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/DeleteSystemArrayResponse.md b/kotlin/commissioning/docs/DeleteSystemArrayResponse.md
new file mode 100644
index 00000000..2a38ff72
--- /dev/null
+++ b/kotlin/commissioning/docs/DeleteSystemArrayResponse.md
@@ -0,0 +1,10 @@
+
+# DeleteSystemArrayResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**message** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/EnergyLifetimeResponse.md b/kotlin/commissioning/docs/EnergyLifetimeResponse.md
new file mode 100644
index 00000000..fcb88faf
--- /dev/null
+++ b/kotlin/commissioning/docs/EnergyLifetimeResponse.md
@@ -0,0 +1,16 @@
+
+# EnergyLifetimeResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**startDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | When no `start_date` parameter is specified on the request, this is the `operational_date` of the system. May be null if system has never produced. When a `start_date` parameter is included in the request, it is included here in the response. |
+**systemId** | **kotlin.Int** | The identifier of the system. |
+**production** | **kotlin.collections.List<kotlin.Int>** | An array of production measurements, one for each day since the system started producing, or one for each day of the requested period. If the system has never produced energy, the array may be empty. |
+**meta** | [**Meta**](Meta.md) | |
+**microProduction** | **kotlin.collections.List<kotlin.Int>** | | [optional]
+**meterProduction** | **kotlin.collections.List<kotlin.Int>** | | [optional]
+**meterStartDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | The first day in the time series when measurements are taken from a meter instead of from microinverters. This field is not present unless the system has a meter. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/EnvoysResponse.md b/kotlin/commissioning/docs/EnvoysResponse.md
new file mode 100644
index 00000000..5ab99c4e
--- /dev/null
+++ b/kotlin/commissioning/docs/EnvoysResponse.md
@@ -0,0 +1,11 @@
+
+# EnvoysResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | The identifier of the system. |
+**envoys** | [**kotlin.collections.List<EnvoysResponseEnvoysInner>**](EnvoysResponseEnvoysInner.md) | A list of active Envoys on this system. |
+
+
+
diff --git a/kotlin/commissioning/docs/EnvoysResponseEnvoysInner.md b/kotlin/commissioning/docs/EnvoysResponseEnvoysInner.md
new file mode 100644
index 00000000..f175bb64
--- /dev/null
+++ b/kotlin/commissioning/docs/EnvoysResponseEnvoysInner.md
@@ -0,0 +1,22 @@
+
+# EnvoysResponseEnvoysInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**envoyId** | **kotlin.Int** | The Enlighten ID of the Envoy. |
+**lastReportAt** | **kotlin.Long** | The last time this Envoy submitted a report, by default expressed in Unix epoch time. When the `datetime_format` query parameter is `iso8601`, `last_report_at` is in ISO 8601 format. If Enlighten has no record of a report from this Envoy, returns null. |
+**name** | **kotlin.String** | The human-friendly name of this Envoy. |
+**partNumber** | **kotlin.String** | The Enphase part number of this Envoy. |
+**serialNumber** | **kotlin.String** | The serial number of this Envoy. |
+**status** | [**inline**](#Status) | The current status of this Envoy. * `normal` - The Envoy is operating normally. * `comm` - The Envoy is not communicating to Enlighten. |
+
+
+
+## Enum: status
+Name | Value
+---- | -----
+status | normal, comm
+
+
+
diff --git a/kotlin/commissioning/docs/EstimateApi.md b/kotlin/commissioning/docs/EstimateApi.md
new file mode 100644
index 00000000..5f4ccfe3
--- /dev/null
+++ b/kotlin/commissioning/docs/EstimateApi.md
@@ -0,0 +1,116 @@
+# EstimateApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**getActivationEstimate**](EstimateApi.md#getActivationEstimate) | **GET** /activations/{activation_id}/estimate | Returns the estimate for this system.
+[**updateActivationEstimate**](EstimateApi.md#updateActivationEstimate) | **PUT** /activations/{activation_id}/estimate | Update the estimate for this system.
+
+
+
+# **getActivationEstimate**
+> SystemEstimate getActivationEstimate(activationId)
+
+Returns the estimate for this system.
+
+Provides access to production estimates for a system. An estimate includes the annual degradation factor for the system as well as estimated production, in kWh, for each month. By default degrade_factor value is 0.5 and month_estimates value is an empty array.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = EstimateApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Activation ID.
+try {
+ val result : SystemEstimate = apiInstance.getActivationEstimate(activationId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling EstimateApi#getActivationEstimate")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling EstimateApi#getActivationEstimate")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Activation ID. |
+
+### Return type
+
+[**SystemEstimate**](SystemEstimate.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **updateActivationEstimate**
+> SystemEstimate updateActivationEstimate(activationId, params)
+
+Update the estimate for this system.
+
+Updates the estimate for this system.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = EstimateApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Activation ID.
+val params : UpdateActivationEstimateRequest = // UpdateActivationEstimateRequest |
+try {
+ val result : SystemEstimate = apiInstance.updateActivationEstimate(activationId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling EstimateApi#updateActivationEstimate")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling EstimateApi#updateActivationEstimate")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Activation ID. |
+ **params** | [**UpdateActivationEstimateRequest**](UpdateActivationEstimateRequest.md)| | [optional]
+
+### Return type
+
+[**SystemEstimate**](SystemEstimate.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/GetActivationOpsProductionModeResponse.md b/kotlin/commissioning/docs/GetActivationOpsProductionModeResponse.md
new file mode 100644
index 00000000..f34b1105
--- /dev/null
+++ b/kotlin/commissioning/docs/GetActivationOpsProductionModeResponse.md
@@ -0,0 +1,12 @@
+
+# GetActivationOpsProductionModeResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mode** | **kotlin.String** | | [optional]
+**totalMicros** | **kotlin.Int** | Total number of microinverters in the system. | [optional]
+**energyProducingMicros** | **kotlin.Int** | Total number of microinverters producing energy in the system. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetCompanyUsersResponse.md b/kotlin/commissioning/docs/GetCompanyUsersResponse.md
new file mode 100644
index 00000000..6df69b14
--- /dev/null
+++ b/kotlin/commissioning/docs/GetCompanyUsersResponse.md
@@ -0,0 +1,10 @@
+
+# GetCompanyUsersResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**users** | [**kotlin.collections.List<GetCompanyUsersResponseUsersInner>**](GetCompanyUsersResponseUsersInner.md) | Zero or more users. Each user is an array. In that first value of the array is Enlighten ID of the user. System-generated. Second value of the array is the email address of the user. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetCompanyUsersResponseUsersInner.md b/kotlin/commissioning/docs/GetCompanyUsersResponseUsersInner.md
new file mode 100644
index 00000000..f48caa0b
--- /dev/null
+++ b/kotlin/commissioning/docs/GetCompanyUsersResponseUsersInner.md
@@ -0,0 +1,9 @@
+
+# GetCompanyUsersResponseUsersInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
+
diff --git a/kotlin/commissioning/docs/GetGridProfilesResponse.md b/kotlin/commissioning/docs/GetGridProfilesResponse.md
new file mode 100644
index 00000000..3267723f
--- /dev/null
+++ b/kotlin/commissioning/docs/GetGridProfilesResponse.md
@@ -0,0 +1,10 @@
+
+# GetGridProfilesResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**gridProfiles** | [**kotlin.collections.List<GetGridProfilesResponseGridProfilesInner>**](GetGridProfilesResponseGridProfilesInner.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetGridProfilesResponseGridProfilesInner.md b/kotlin/commissioning/docs/GetGridProfilesResponseGridProfilesInner.md
new file mode 100644
index 00000000..6b6cd73c
--- /dev/null
+++ b/kotlin/commissioning/docs/GetGridProfilesResponseGridProfilesInner.md
@@ -0,0 +1,21 @@
+
+# GetGridProfilesResponseGridProfilesInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **kotlin.String** | Grid profile ID. System-generated. | [optional]
+**profileId** | **kotlin.String** | | [optional]
+**created** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | Profile created date and time. | [optional]
+**updated** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | Profile last updated date and time. | [optional]
+**name** | **kotlin.String** | Profile name. | [optional]
+**description** | **kotlin.String** | Profile description. | [optional]
+**version** | **kotlin.String** | Profile version. | [optional]
+**envoyType** | **kotlin.String** | Envoy type. | [optional]
+**countries** | **kotlin.collections.List<kotlin.String>** | Name of the Countries. | [optional]
+**states** | **kotlin.collections.List<kotlin.String>** | States code. | [optional]
+**stateNames** | **kotlin.collections.List<kotlin.String>** | Name of the states. | [optional]
+**ensemble1Compatible** | **kotlin.Boolean** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetPartnerActivationsResponse.md b/kotlin/commissioning/docs/GetPartnerActivationsResponse.md
new file mode 100644
index 00000000..c821722d
--- /dev/null
+++ b/kotlin/commissioning/docs/GetPartnerActivationsResponse.md
@@ -0,0 +1,11 @@
+
+# GetPartnerActivationsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systems** | [**kotlin.collections.List<GetPartnerActivationsResponseSystemsInner>**](GetPartnerActivationsResponseSystemsInner.md) | Zero or more activations. | [optional]
+**next** | **kotlin.String** | If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 10. The maximum page size is 1000. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetPartnerActivationsResponseSystemsInner.md b/kotlin/commissioning/docs/GetPartnerActivationsResponseSystemsInner.md
new file mode 100644
index 00000000..37b899d7
--- /dev/null
+++ b/kotlin/commissioning/docs/GetPartnerActivationsResponseSystemsInner.md
@@ -0,0 +1,32 @@
+
+# GetPartnerActivationsResponseSystemsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | Enlighten ID of this system. System-generated. | [optional]
+**systemName** | **kotlin.String** | Name of the system. | [optional]
+**systemType** | [**SystemTypeEnum**](SystemTypeEnum.md) | | [optional]
+**status** | **kotlin.String** | System's status. | [optional]
+**timezone** | **kotlin.String** | System's timezone. | [optional]
+**stage** | **kotlin.Int** | What stage of the activation process this activation is in. System-generated. | [optional]
+**internetConnection** | [**SystemInternetConnectionEnum**](SystemInternetConnectionEnum.md) | | [optional]
+**lease** | **kotlin.Boolean** | Whether the system is leased. Default false. | [optional]
+**operational** | **kotlin.Boolean** | Whether this system is permitted to operate. Default true. | [optional]
+**owner** | **kotlin.String** | Name of the system owner. Owner must be an Enlighten user. If the user of the API is a self-installer, the owner must be himself. | [optional]
+**ownerId** | **kotlin.Int** | Enlighten ID of this system owner. System-generated. | [optional]
+**host** | **kotlin.String** | Name of the system host. | [optional]
+**hostId** | **kotlin.Int** | Enlighten ID of this system host. System-generated. | [optional]
+**installerName** | **kotlin.String** | Name of the installer. | [optional]
+**installerId** | **kotlin.Int** | Enlighten ID of the installer of this system. | [optional]
+**maintainerName** | **kotlin.String** | Name of the maintainer. | [optional]
+**maintainerId** | **kotlin.Int** | Enlighten ID of the maintainer of this system. | [optional]
+**authorizedSubcontractors** | [**kotlin.collections.List<GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner>**](GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.md) | List of sub-contractors of this system. | [optional]
+**uri** | **kotlin.String** | URI for this activation. | [optional]
+**updatedAt** | **kotlin.Long** | Activation last updated timestamp. | [optional]
+**reference** | **kotlin.String** | Identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system. | [optional]
+**otherReferences** | **kotlin.collections.List<kotlin.String>** | Identifiers assigned to this activation by other companies which have access to it. This attribute is not present if there are no other references for this system. | [optional]
+**address** | [**Address**](Address.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.md b/kotlin/commissioning/docs/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.md
new file mode 100644
index 00000000..70c5d5c5
--- /dev/null
+++ b/kotlin/commissioning/docs/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.md
@@ -0,0 +1,12 @@
+
+# GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**authorizedSubcontractorId** | **kotlin.Int** | The Enlighten ID of the sub-contractor of this system. System-generated. | [optional]
+**authorizedSubcontractorName** | **kotlin.String** | Name of the sub-contractor of this system. | [optional]
+**status** | **kotlin.String** | Current status of the subcontractor for the site. This field will be shown only for pending and rejected sub-contractors. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetPvManufacturerModelsResponse.md b/kotlin/commissioning/docs/GetPvManufacturerModelsResponse.md
new file mode 100644
index 00000000..735e5ac7
--- /dev/null
+++ b/kotlin/commissioning/docs/GetPvManufacturerModelsResponse.md
@@ -0,0 +1,11 @@
+
+# GetPvManufacturerModelsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pvManufacturers** | [**GetPvManufacturerModelsResponsePvManufacturers**](GetPvManufacturerModelsResponsePvManufacturers.md) | | [optional]
+**pvModels** | **kotlin.collections.List<kotlin.collections.List<GetCompanyUsersResponseUsersInner>>** | A list of PV models for this manufacturer. Each element in the list is an array including the model's primary key and name. The list may be empty. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetPvManufacturerModelsResponsePvManufacturers.md b/kotlin/commissioning/docs/GetPvManufacturerModelsResponsePvManufacturers.md
new file mode 100644
index 00000000..ec09fb60
--- /dev/null
+++ b/kotlin/commissioning/docs/GetPvManufacturerModelsResponsePvManufacturers.md
@@ -0,0 +1,11 @@
+
+# GetPvManufacturerModelsResponsePvManufacturers
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pvManufacturerId** | **kotlin.Int** | Pv manufacturer ID. | [optional]
+**name** | **kotlin.String** | Name of the Pv manufacturer. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetPvManufacturersResponse.md b/kotlin/commissioning/docs/GetPvManufacturersResponse.md
new file mode 100644
index 00000000..1568690c
--- /dev/null
+++ b/kotlin/commissioning/docs/GetPvManufacturersResponse.md
@@ -0,0 +1,10 @@
+
+# GetPvManufacturersResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pvManufacturers** | **kotlin.collections.List<kotlin.collections.List<GetCompanyUsersResponseUsersInner>>** | A list of PV manufacturers. Each element in the list is an array including the model's manufacturer's primary key and name. The list may be empty. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetSelfCompanyAuthorizedSubcontractorsResponse.md b/kotlin/commissioning/docs/GetSelfCompanyAuthorizedSubcontractorsResponse.md
new file mode 100644
index 00000000..d5ce11b8
--- /dev/null
+++ b/kotlin/commissioning/docs/GetSelfCompanyAuthorizedSubcontractorsResponse.md
@@ -0,0 +1,12 @@
+
+# GetSelfCompanyAuthorizedSubcontractorsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | Enlighten ID of the API user's company. | [optional]
+**companyName** | **kotlin.String** | Name of the API user's company. | [optional]
+**authorizedSubcontractors** | [**kotlin.collections.List<GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner>**](GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.md) | A list of subcontractors belonging to the API user's company. May be empty. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.md b/kotlin/commissioning/docs/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.md
new file mode 100644
index 00000000..6a0d0966
--- /dev/null
+++ b/kotlin/commissioning/docs/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.md
@@ -0,0 +1,15 @@
+
+# GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | Enlighten ID of the company. | [optional]
+**companyName** | **kotlin.String** | Name of the company. | [optional]
+**location** | **kotlin.String** | Company location. | [optional]
+**roles** | [**kotlin.collections.List<CompanyRoleEnum>**](CompanyRoleEnum.md) | | [optional]
+**uri** | **kotlin.String** | URI to the show() method for the company. System-generated. | [optional]
+**status** | **kotlin.String** | Whether the subcontractor is enabled or disabled. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetSelfCompanyBranchesResponse.md b/kotlin/commissioning/docs/GetSelfCompanyBranchesResponse.md
new file mode 100644
index 00000000..dacc2676
--- /dev/null
+++ b/kotlin/commissioning/docs/GetSelfCompanyBranchesResponse.md
@@ -0,0 +1,12 @@
+
+# GetSelfCompanyBranchesResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | Enlighten ID of the API user's company. | [optional]
+**companyName** | **kotlin.String** | Name of the API user's company. | [optional]
+**branches** | [**kotlin.collections.List<GetSelfCompanyBranchesResponseBranchesInner>**](GetSelfCompanyBranchesResponseBranchesInner.md) | A list of branches belonging to the API user's company. May be empty. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetSelfCompanyBranchesResponseBranchesInner.md b/kotlin/commissioning/docs/GetSelfCompanyBranchesResponseBranchesInner.md
new file mode 100644
index 00000000..a02ed8b4
--- /dev/null
+++ b/kotlin/commissioning/docs/GetSelfCompanyBranchesResponseBranchesInner.md
@@ -0,0 +1,14 @@
+
+# GetSelfCompanyBranchesResponseBranchesInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | Enlighten ID of the company. | [optional]
+**companyName** | **kotlin.String** | Name of the company. | [optional]
+**location** | **kotlin.String** | Company location. | [optional]
+**roles** | [**kotlin.collections.List<CompanyRoleEnum>**](CompanyRoleEnum.md) | What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. | [optional]
+**uri** | **kotlin.String** | URI to the show() method for the company. System-generated. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GetSystemMeterResponse.md b/kotlin/commissioning/docs/GetSystemMeterResponse.md
new file mode 100644
index 00000000..95c32035
--- /dev/null
+++ b/kotlin/commissioning/docs/GetSystemMeterResponse.md
@@ -0,0 +1,20 @@
+
+# GetSystemMeterResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**serialNumber** | **kotlin.String** | Meter serial number. | [optional]
+**manufacturer** | **kotlin.String** | Name of the manufacturer. | [optional]
+**model** | **kotlin.String** | Model. | [optional]
+**type** | **kotlin.String** | Meter type. | [optional]
+**operationalDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | Operational date. | [optional]
+**firstReportDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | First report date. | [optional]
+**lastReportDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | Last report date. | [optional]
+**phase** | **kotlin.String** | Phase. | [optional]
+**envoySerialNumber** | **kotlin.String** | Envoy serial number. | [optional]
+**status** | **kotlin.String** | Meter status. | [optional]
+**state** | **kotlin.String** | Meter state. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GrantActivationUserAccessResponse.md b/kotlin/commissioning/docs/GrantActivationUserAccessResponse.md
new file mode 100644
index 00000000..9af29f2b
--- /dev/null
+++ b/kotlin/commissioning/docs/GrantActivationUserAccessResponse.md
@@ -0,0 +1,10 @@
+
+# GrantActivationUserAccessResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**message** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/GridProfilesApi.md b/kotlin/commissioning/docs/GridProfilesApi.md
new file mode 100644
index 00000000..459aceb0
--- /dev/null
+++ b/kotlin/commissioning/docs/GridProfilesApi.md
@@ -0,0 +1,57 @@
+# GridProfilesApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**getGridProfiles**](GridProfilesApi.md#getGridProfiles) | **GET** /partner/grid_profiles | Lists the available profiles
+
+
+
+# **getGridProfiles**
+> GetGridProfilesResponse getGridProfiles()
+
+Lists the available profiles
+
+Lists the available profiles.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = GridProfilesApi()
+try {
+ val result : GetGridProfilesResponse = apiInstance.getGridProfiles()
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling GridProfilesApi#getGridProfiles")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling GridProfilesApi#getGridProfiles")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**GetGridProfilesResponse**](GetGridProfilesResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/HomeOwnerApi.md b/kotlin/commissioning/docs/HomeOwnerApi.md
new file mode 100644
index 00000000..ea82cd38
--- /dev/null
+++ b/kotlin/commissioning/docs/HomeOwnerApi.md
@@ -0,0 +1,61 @@
+# HomeOwnerApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**createUser**](HomeOwnerApi.md#createUser) | **POST** /users | Create Home owner
+
+
+
+# **createUser**
+> User createUser(params)
+
+Create Home owner
+
+Create a home owner user. Email, first name, and last name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored. Pass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields. Using this API to create both homeowner as well as a company user. If you want to create company user, then pass company_id inside the user object.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = HomeOwnerApi()
+val params : CreateUserRequest = // CreateUserRequest |
+try {
+ val result : User = apiInstance.createUser(params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling HomeOwnerApi#createUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling HomeOwnerApi#createUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **params** | [**CreateUserRequest**](CreateUserRequest.md)| | [optional]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/InventoryResponse.md b/kotlin/commissioning/docs/InventoryResponse.md
new file mode 100644
index 00000000..d7e9ee35
--- /dev/null
+++ b/kotlin/commissioning/docs/InventoryResponse.md
@@ -0,0 +1,14 @@
+
+# InventoryResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | Enlighten ID for this system. |
+**inverters** | [**kotlin.collections.List<InventoryResponseEnvoysInner>**](InventoryResponseEnvoysInner.md) | A list of inverters on this system, including serial and model numbers. |
+**meters** | [**kotlin.collections.List<InventoryResponseMetersInner>**](InventoryResponseMetersInner.md) | A list of meters on this system, including serial number, manufacturer, and model number. |
+**meta** | [**Meta**](Meta.md) | |
+**envoys** | [**kotlin.collections.List<InventoryResponseEnvoysInner>**](InventoryResponseEnvoysInner.md) | A list of Envoys on this system, including serial number. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/InventoryResponseEnvoysInner.md b/kotlin/commissioning/docs/InventoryResponseEnvoysInner.md
new file mode 100644
index 00000000..aca4c084
--- /dev/null
+++ b/kotlin/commissioning/docs/InventoryResponseEnvoysInner.md
@@ -0,0 +1,12 @@
+
+# InventoryResponseEnvoysInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sn** | **kotlin.String** | |
+**model** | **kotlin.String** | |
+**sku** | **kotlin.String** | |
+
+
+
diff --git a/kotlin/commissioning/docs/InventoryResponseMetersInner.md b/kotlin/commissioning/docs/InventoryResponseMetersInner.md
new file mode 100644
index 00000000..f42dcbc3
--- /dev/null
+++ b/kotlin/commissioning/docs/InventoryResponseMetersInner.md
@@ -0,0 +1,14 @@
+
+# InventoryResponseMetersInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sn** | **kotlin.String** | |
+**manufacturer** | **kotlin.String** | |
+**model** | **kotlin.String** | |
+**status** | **kotlin.String** | | [optional]
+**state** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponse.md b/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponse.md
new file mode 100644
index 00000000..3e52b8c2
--- /dev/null
+++ b/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponse.md
@@ -0,0 +1,11 @@
+
+# InvertersSummaryByEnvoyOrSiteResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**signalStrength** | **kotlin.Int** | |
+**microInverters** | [**kotlin.collections.List<InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner>**](InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.md) | A list of active inverters on this system, including serial and model numbers. |
+
+
+
diff --git a/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.md b/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.md
new file mode 100644
index 00000000..7dc36089
--- /dev/null
+++ b/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.md
@@ -0,0 +1,29 @@
+
+# InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **kotlin.Int** | |
+**model** | **kotlin.String** | Model number of this Microinverter. |
+**partNumber** | **kotlin.String** | The Enphase part number of this Microinverter. |
+**serialNumber** | **kotlin.String** | The serial number of this Microinverter. |
+**sku** | **kotlin.String** | |
+**status** | [**inline**](#Status) | The current status of this Microinverter. * `normal` - The microinverter is operating normally. * `power` - There is a production issue. * `micro` - The microinverter is not reporting. * `retired` - The microinverter is retired. |
+**powerProduced** | [**InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced**](InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.md) | |
+**procLoad** | **kotlin.String** | |
+**paramTable** | **kotlin.String** | |
+**envoySerialNumber** | **kotlin.String** | |
+**energy** | [**InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy**](InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.md) | |
+**gridProfile** | **kotlin.String** | |
+**lastReportDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | The last time this device submitted a report, by default expressed in Unix epoch time. If Enlighten has no record of a report from this Envoy, returns null. |
+
+
+
+## Enum: status
+Name | Value
+---- | -----
+status | normal, power, micro, retired
+
+
+
diff --git a/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.md b/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.md
new file mode 100644
index 00000000..a6d9419f
--- /dev/null
+++ b/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.md
@@ -0,0 +1,19 @@
+
+# InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**`value`** | **kotlin.Int** | |
+**units** | [**inline**](#Units) | |
+**precision** | **kotlin.Int** | |
+
+
+
+## Enum: units
+Name | Value
+---- | -----
+units | Wh, kJ
+
+
+
diff --git a/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.md b/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.md
new file mode 100644
index 00000000..2cf35db4
--- /dev/null
+++ b/kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.md
@@ -0,0 +1,19 @@
+
+# InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**`value`** | **kotlin.Int** | |
+**units** | [**inline**](#Units) | |
+**precision** | **kotlin.Int** | |
+
+
+
+## Enum: units
+Name | Value
+---- | -----
+units | W
+
+
+
diff --git a/kotlin/commissioning/docs/Meta.md b/kotlin/commissioning/docs/Meta.md
new file mode 100644
index 00000000..366b76cb
--- /dev/null
+++ b/kotlin/commissioning/docs/Meta.md
@@ -0,0 +1,13 @@
+
+# Meta
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**status** | [**Status**](Status.md) | |
+**lastReportAt** | **kotlin.Long** | |
+**lastEnergyAt** | **kotlin.Long** | |
+**operationalAt** | **kotlin.Long** | |
+
+
+
diff --git a/kotlin/commissioning/docs/MetersApi.md b/kotlin/commissioning/docs/MetersApi.md
new file mode 100644
index 00000000..ea035e60
--- /dev/null
+++ b/kotlin/commissioning/docs/MetersApi.md
@@ -0,0 +1,177 @@
+# MetersApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**getSystemMeter**](MetersApi.md#getSystemMeter) | **GET** /systems/{system_id}/meters/{serial_number} | Returns the requested meter detail.
+[**setActivationMeterStatus**](MetersApi.md#setActivationMeterStatus) | **POST** /activations/{activation_id}/meters/{serial_number}/meter_control | Enable or Disable the meters.
+[**updateSystemMeter**](MetersApi.md#updateSystemMeter) | **PUT** /systems/{system_id}/meters/{serial_number} | Update the operational date of a meter by serial number.
+
+
+
+# **getSystemMeter**
+> GetSystemMeterResponse getSystemMeter(systemId, serialNumber)
+
+Returns the requested meter detail.
+
+Returns the requested meter by serial number. You must have access to the requested system and meter; otherwise a 401 is returned.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = MetersApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | System ID.
+val serialNumber : kotlin.String = serialNumber_example // kotlin.String | Meter serial number.
+try {
+ val result : GetSystemMeterResponse = apiInstance.getSystemMeter(systemId, serialNumber)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling MetersApi#getSystemMeter")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling MetersApi#getSystemMeter")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| System ID. |
+ **serialNumber** | **kotlin.String**| Meter serial number. |
+
+### Return type
+
+[**GetSystemMeterResponse**](GetSystemMeterResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **setActivationMeterStatus**
+> SetActivationMeterStatusResponse setActivationMeterStatus(activationId, serialNumber, params)
+
+Enable or Disable the meters.
+
+Enable or Disable the meters. You must have access to the requested system and meter; otherwise a 401 is returned.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = MetersApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Activation ID.
+val serialNumber : kotlin.String = serialNumber_example // kotlin.String | Meter serial number.
+val params : SetActivationMeterStatusRequest = // SetActivationMeterStatusRequest |
+try {
+ val result : SetActivationMeterStatusResponse = apiInstance.setActivationMeterStatus(activationId, serialNumber, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling MetersApi#setActivationMeterStatus")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling MetersApi#setActivationMeterStatus")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Activation ID. |
+ **serialNumber** | **kotlin.String**| Meter serial number. |
+ **params** | [**SetActivationMeterStatusRequest**](SetActivationMeterStatusRequest.md)| | [optional]
+
+### Return type
+
+[**SetActivationMeterStatusResponse**](SetActivationMeterStatusResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **updateSystemMeter**
+> UpdateSystemMeterResponse updateSystemMeter(systemId, serialNumber, operationalDate)
+
+Update the operational date of a meter by serial number.
+
+Update the operational date of a meter. You must have access to the requested system and meter; otherwise a 401 is returned.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = MetersApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | System ID.
+val serialNumber : kotlin.String = serialNumber_example // kotlin.String | Meter serial number.
+val operationalDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Operational date in the following format YYYY-MM-DD.
+try {
+ val result : UpdateSystemMeterResponse = apiInstance.updateSystemMeter(systemId, serialNumber, operationalDate)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling MetersApi#updateSystemMeter")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling MetersApi#updateSystemMeter")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| System ID. |
+ **serialNumber** | **kotlin.String**| Meter serial number. |
+ **operationalDate** | **java.time.LocalDate**| Operational date in the following format YYYY-MM-DD. | [optional]
+
+### Return type
+
+[**UpdateSystemMeterResponse**](UpdateSystemMeterResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/MonthlyProductionResponse.md b/kotlin/commissioning/docs/MonthlyProductionResponse.md
new file mode 100644
index 00000000..20ffca16
--- /dev/null
+++ b/kotlin/commissioning/docs/MonthlyProductionResponse.md
@@ -0,0 +1,15 @@
+
+# MonthlyProductionResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | Enlighten ID for this system. |
+**startDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | First day included in the reporting period. The format is `YYYY-mm-dd` unless you pass a `datetime_format` parameter as described [here](https://developer.enphase.com/docs#Datetimes). |
+**endDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | Last day included in the reporting period. |
+**productionWh** | **kotlin.Int** | Total production for the requested period in Watt-hours. |
+**meterReadings** | [**kotlin.collections.List<MonthlyProductionResponseMeterReadingsInner>**](MonthlyProductionResponseMeterReadingsInner.md) | If the system has any revenue-grade meters installed, the meter readings at the beginning and end of the reporting period are included here. Otherwise, the array is empty. |
+**meta** | [**Meta**](Meta.md) | |
+
+
+
diff --git a/kotlin/commissioning/docs/MonthlyProductionResponseMeterReadingsInner.md b/kotlin/commissioning/docs/MonthlyProductionResponseMeterReadingsInner.md
new file mode 100644
index 00000000..e0a9f971
--- /dev/null
+++ b/kotlin/commissioning/docs/MonthlyProductionResponseMeterReadingsInner.md
@@ -0,0 +1,12 @@
+
+# MonthlyProductionResponseMeterReadingsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**serialNumber** | **kotlin.String** | |
+**start** | **kotlin.Int** | |
+**end** | **kotlin.Int** | |
+
+
+
diff --git a/kotlin/commissioning/docs/NotFoundError.md b/kotlin/commissioning/docs/NotFoundError.md
new file mode 100644
index 00000000..0454f6e5
--- /dev/null
+++ b/kotlin/commissioning/docs/NotFoundError.md
@@ -0,0 +1,12 @@
+
+# NotFoundError
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**reason** | **kotlin.String** | |
+**message** | **kotlin.collections.List<kotlin.String>** | | [optional]
+**errorMessages** | **kotlin.collections.List<kotlin.String>** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ProductionMeterReadingsResponse.md b/kotlin/commissioning/docs/ProductionMeterReadingsResponse.md
new file mode 100644
index 00000000..fb18b25c
--- /dev/null
+++ b/kotlin/commissioning/docs/ProductionMeterReadingsResponse.md
@@ -0,0 +1,12 @@
+
+# ProductionMeterReadingsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | |
+**meterReadings** | [**kotlin.collections.List<ProductionMeterReadingsResponseMeterReadingsInner>**](ProductionMeterReadingsResponseMeterReadingsInner.md) | |
+**meta** | [**Meta**](Meta.md) | |
+
+
+
diff --git a/kotlin/commissioning/docs/ProductionMeterReadingsResponseMeterReadingsInner.md b/kotlin/commissioning/docs/ProductionMeterReadingsResponseMeterReadingsInner.md
new file mode 100644
index 00000000..78fac425
--- /dev/null
+++ b/kotlin/commissioning/docs/ProductionMeterReadingsResponseMeterReadingsInner.md
@@ -0,0 +1,12 @@
+
+# ProductionMeterReadingsResponseMeterReadingsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**serialNumber** | **kotlin.String** | The serial number of the meter. |
+**`value`** | **kotlin.Int** | The odometer reading, in Watt-hours. |
+**readAt** | **kotlin.Long** | The time when the reading was taken, always prior or equal to the requested `end_at`. |
+
+
+
diff --git a/kotlin/commissioning/docs/PvManufacturersApi.md b/kotlin/commissioning/docs/PvManufacturersApi.md
new file mode 100644
index 00000000..ba8015c3
--- /dev/null
+++ b/kotlin/commissioning/docs/PvManufacturersApi.md
@@ -0,0 +1,57 @@
+# PvManufacturersApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**getPvManufacturers**](PvManufacturersApi.md#getPvManufacturers) | **GET** /pv_manufacturers | Returns PV module manufacturers
+
+
+
+# **getPvManufacturers**
+> GetPvManufacturersResponse getPvManufacturers()
+
+Returns PV module manufacturers
+
+Returns information about the PV module manufacturers known in Enlighten.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = PvManufacturersApi()
+try {
+ val result : GetPvManufacturersResponse = apiInstance.getPvManufacturers()
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling PvManufacturersApi#getPvManufacturers")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling PvManufacturersApi#getPvManufacturers")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**GetPvManufacturersResponse**](GetPvManufacturersResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/PvModelsApi.md b/kotlin/commissioning/docs/PvModelsApi.md
new file mode 100644
index 00000000..10348345
--- /dev/null
+++ b/kotlin/commissioning/docs/PvModelsApi.md
@@ -0,0 +1,61 @@
+# PvModelsApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**getPvManufacturerModels**](PvModelsApi.md#getPvManufacturerModels) | **GET** /pv_manufacturers/{pv_manufacturer_id}/pv_models | Returns PV module manufacturers
+
+
+
+# **getPvManufacturerModels**
+> GetPvManufacturerModelsResponse getPvManufacturerModels(pvManufacturerId)
+
+Returns PV module manufacturers
+
+Returns information about the PV modules known in Enlighten.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = PvModelsApi()
+val pvManufacturerId : kotlin.Int = 56 // kotlin.Int | Pv manufacturer ID.
+try {
+ val result : GetPvManufacturerModelsResponse = apiInstance.getPvManufacturerModels(pvManufacturerId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling PvModelsApi#getPvManufacturerModels")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling PvModelsApi#getPvManufacturerModels")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pvManufacturerId** | **kotlin.Int**| Pv manufacturer ID. |
+
+### Return type
+
+[**GetPvManufacturerModelsResponse**](GetPvManufacturerModelsResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/RevokeActivationUserAccessResponse.md b/kotlin/commissioning/docs/RevokeActivationUserAccessResponse.md
new file mode 100644
index 00000000..4c68ba7c
--- /dev/null
+++ b/kotlin/commissioning/docs/RevokeActivationUserAccessResponse.md
@@ -0,0 +1,10 @@
+
+# RevokeActivationUserAccessResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**message** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/RgmStatsResponse.md b/kotlin/commissioning/docs/RgmStatsResponse.md
new file mode 100644
index 00000000..65fe742f
--- /dev/null
+++ b/kotlin/commissioning/docs/RgmStatsResponse.md
@@ -0,0 +1,14 @@
+
+# RgmStatsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | Enlighten ID for this system. |
+**totalDevices** | **kotlin.Int** | Number of active revenue-grade meters for this system. |
+**meta** | [**Meta**](Meta.md) | |
+**intervals** | [**kotlin.collections.List<RgmStatsResponseIntervalsInner>**](RgmStatsResponseIntervalsInner.md) | A list of intervals between the requested start and end times. |
+**meterIntervals** | [**kotlin.collections.List<RgmStatsResponseMeterIntervalsInner>**](RgmStatsResponseMeterIntervalsInner.md) | A list of intervals of a meter between the requested start and end times. |
+
+
+
diff --git a/kotlin/commissioning/docs/RgmStatsResponseIntervalsInner.md b/kotlin/commissioning/docs/RgmStatsResponseIntervalsInner.md
new file mode 100644
index 00000000..26e7d6ab
--- /dev/null
+++ b/kotlin/commissioning/docs/RgmStatsResponseIntervalsInner.md
@@ -0,0 +1,12 @@
+
+# RgmStatsResponseIntervalsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**endAt** | **kotlin.Long** | End of interval. The format is Unix epoch time unless you pass a `datetime_format` parameter as described [here](https://developer.enphase.com/docs#Datetimes). |
+**whDel** | **kotlin.Int** | Energy delivered during this interval, in Watt-hours. |
+**devicesReporting** | **kotlin.Int** | Number of revenue-grade meters that reported data for this interval at the time of the request. |
+
+
+
diff --git a/kotlin/commissioning/docs/RgmStatsResponseMeterIntervalsInner.md b/kotlin/commissioning/docs/RgmStatsResponseMeterIntervalsInner.md
new file mode 100644
index 00000000..abc53ce7
--- /dev/null
+++ b/kotlin/commissioning/docs/RgmStatsResponseMeterIntervalsInner.md
@@ -0,0 +1,12 @@
+
+# RgmStatsResponseMeterIntervalsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**meterSerialNumber** | **kotlin.String** | Serial number of the revenue grade meter. |
+**envoySerialNumber** | **kotlin.String** | Serial number of the reporting envoy. |
+**intervals** | [**kotlin.collections.List<RgmStatsResponseMeterIntervalsInnerIntervalsInner>**](RgmStatsResponseMeterIntervalsInnerIntervalsInner.md) | Individual meter level interval. |
+
+
+
diff --git a/kotlin/commissioning/docs/RgmStatsResponseMeterIntervalsInnerIntervalsInner.md b/kotlin/commissioning/docs/RgmStatsResponseMeterIntervalsInnerIntervalsInner.md
new file mode 100644
index 00000000..cb743250
--- /dev/null
+++ b/kotlin/commissioning/docs/RgmStatsResponseMeterIntervalsInnerIntervalsInner.md
@@ -0,0 +1,13 @@
+
+# RgmStatsResponseMeterIntervalsInnerIntervalsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**channel** | **kotlin.Int** | The reporting channel identifier. |
+**endAt** | **kotlin.Long** | End of interval. The format is Unix epoch time unless you pass a `datetime_format` parameter as described [here](https://developer.enphase.com/docs#Datetimes). |
+**whDel** | **kotlin.Float** | Energy delivered during this interval, in Watt-hours. |
+**currW** | **kotlin.Int** | Energy delivered during this interval, in Watts. |
+
+
+
diff --git a/kotlin/commissioning/docs/SearchSystemIdResponse.md b/kotlin/commissioning/docs/SearchSystemIdResponse.md
new file mode 100644
index 00000000..eabe02f2
--- /dev/null
+++ b/kotlin/commissioning/docs/SearchSystemIdResponse.md
@@ -0,0 +1,10 @@
+
+# SearchSystemIdResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | The Enlighten ID of the system. |
+
+
+
diff --git a/kotlin/commissioning/docs/SearchUsersResponse.md b/kotlin/commissioning/docs/SearchUsersResponse.md
new file mode 100644
index 00000000..ffcb51b7
--- /dev/null
+++ b/kotlin/commissioning/docs/SearchUsersResponse.md
@@ -0,0 +1,11 @@
+
+# SearchUsersResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**userId** | **kotlin.Int** | Enlighten ID of the user. | [optional]
+**companyId** | **kotlin.Int** | Enlighten ID of the company that the user belongs to. If the user does not belong to a company, this field will not be present in the response. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/ServerError.md b/kotlin/commissioning/docs/ServerError.md
new file mode 100644
index 00000000..eba31f92
--- /dev/null
+++ b/kotlin/commissioning/docs/ServerError.md
@@ -0,0 +1,11 @@
+
+# ServerError
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**errorCode** | **kotlin.Int** | |
+**errorMessages** | **kotlin.collections.List<kotlin.String>** | |
+
+
+
diff --git a/kotlin/commissioning/docs/SetActivationMeterStatusRequest.md b/kotlin/commissioning/docs/SetActivationMeterStatusRequest.md
new file mode 100644
index 00000000..7f05354c
--- /dev/null
+++ b/kotlin/commissioning/docs/SetActivationMeterStatusRequest.md
@@ -0,0 +1,10 @@
+
+# SetActivationMeterStatusRequest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**status** | [**SystemMeterStatusEnum**](SystemMeterStatusEnum.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SetActivationMeterStatusResponse.md b/kotlin/commissioning/docs/SetActivationMeterStatusResponse.md
new file mode 100644
index 00000000..0b95ea5d
--- /dev/null
+++ b/kotlin/commissioning/docs/SetActivationMeterStatusResponse.md
@@ -0,0 +1,11 @@
+
+# SetActivationMeterStatusResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**reason** | **kotlin.String** | | [optional]
+**message** | **kotlin.collections.List<kotlin.String>** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SetActivationOpsProductionModeRequest.md b/kotlin/commissioning/docs/SetActivationOpsProductionModeRequest.md
new file mode 100644
index 00000000..58ec1bc1
--- /dev/null
+++ b/kotlin/commissioning/docs/SetActivationOpsProductionModeRequest.md
@@ -0,0 +1,10 @@
+
+# SetActivationOpsProductionModeRequest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mode** | [**SystemProductionModeEnum**](SystemProductionModeEnum.md) | |
+
+
+
diff --git a/kotlin/commissioning/docs/SetActivationOpsProductionModeResponse.md b/kotlin/commissioning/docs/SetActivationOpsProductionModeResponse.md
new file mode 100644
index 00000000..e39500ac
--- /dev/null
+++ b/kotlin/commissioning/docs/SetActivationOpsProductionModeResponse.md
@@ -0,0 +1,10 @@
+
+# SetActivationOpsProductionModeResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**message** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/StatsResponse.md b/kotlin/commissioning/docs/StatsResponse.md
new file mode 100644
index 00000000..9f2789d3
--- /dev/null
+++ b/kotlin/commissioning/docs/StatsResponse.md
@@ -0,0 +1,13 @@
+
+# StatsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | Enlighten ID for this system. |
+**totalDevices** | **kotlin.Int** | Number of active microinverters for this system. |
+**meta** | [**Meta**](Meta.md) | |
+**intervals** | [**kotlin.collections.List<StatsResponseIntervalsInner>**](StatsResponseIntervalsInner.md) | A list of intervals between the requested start and end times. |
+
+
+
diff --git a/kotlin/commissioning/docs/StatsResponseIntervalsInner.md b/kotlin/commissioning/docs/StatsResponseIntervalsInner.md
new file mode 100644
index 00000000..e5398d8a
--- /dev/null
+++ b/kotlin/commissioning/docs/StatsResponseIntervalsInner.md
@@ -0,0 +1,13 @@
+
+# StatsResponseIntervalsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**endAt** | **kotlin.Long** | End date for interval. The format is Unix epoch time unless you pass a `datetime_format` parameter as described [here](https://developer.enphase.com/docs#Datetimes). |
+**powr** | **kotlin.Int** | Average power produced by microinverters during this interval, in Watts. |
+**enwh** | **kotlin.Int** | Energy produced by microinverters during this interval, in Watt-hours. |
+**devicesReporting** | **kotlin.Int** | Number of microinverters that reported data for this interval at the time of the request. |
+
+
+
diff --git a/kotlin/commissioning/docs/Status.md b/kotlin/commissioning/docs/Status.md
new file mode 100644
index 00000000..e0af4e98
--- /dev/null
+++ b/kotlin/commissioning/docs/Status.md
@@ -0,0 +1,24 @@
+
+# Status
+
+## Enum
+
+
+ * `comm` (value: `"comm"`)
+
+ * `power` (value: `"power"`)
+
+ * `meter` (value: `"meter"`)
+
+ * `meter_issue` (value: `"meter_issue"`)
+
+ * `micro` (value: `"micro"`)
+
+ * `battery` (value: `"battery"`)
+
+ * `storage_idle` (value: `"storage_idle"`)
+
+ * `normal` (value: `"normal"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SummaryResponse.md b/kotlin/commissioning/docs/SummaryResponse.md
new file mode 100644
index 00000000..7cc69ab2
--- /dev/null
+++ b/kotlin/commissioning/docs/SummaryResponse.md
@@ -0,0 +1,28 @@
+
+# SummaryResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currentPower** | **kotlin.Int** | Current power production, in Watts. For historical requests, returns 0. |
+**energyLifetime** | **kotlin.Int** | Energy produced in the lifetime of the system, excluding the requested day, in Watt-hours. |
+**energyToday** | **kotlin.Int** | Energy produced on the requested day, in Watt-hours. |
+**lastIntervalEndAt** | **kotlin.Long** | The last known time that the system produced energy. When a system has not been communicating for a length of time, the `last_report_at` can be recent, whereas the `last_interval_end_at` may be further back. |
+**lastReportAt** | **kotlin.Long** | The last time an Envoy on this system reported. The format is Unix epoch time unless you pass a `datetime_format` parameter as described [here](https://developer.enphase.com/docs#Datetimes). |
+**modules** | **kotlin.Int** | Number of active (not retired) modules. For historical requests, returns 0. |
+**operationalAt** | **kotlin.Long** | The time at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first interval end time. The format is Unix epoch time unless you pass a `datetime_format` parameter as described [here](https://developer.enphase.com/docs#Datetimes). |
+**sizeW** | **kotlin.Int** | The size of the system, in Watts. For historical requests, returns 0. |
+**source** | [**inline**](#Source) | Indicates whether the production of this system is measured by its microinverters (`microinverters`) or by revenue-grade meters (`meter`) installed on the system. |
+**status** | [**Status**](Status.md) | |
+**summaryDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | Effective date of the response. For historical requests, returns the date requested. For current requests, returns the current date. The format is `YYYY-mm-dd` unless you pass a `datetime_format` parameter as described [here](https://developer.enphase.com/docs#Datetimes). |
+**systemId** | **kotlin.Int** | The Enlighten ID of the system. |
+
+
+
+## Enum: source
+Name | Value
+---- | -----
+source | microinverters, meter
+
+
+
diff --git a/kotlin/commissioning/docs/SystemArray.md b/kotlin/commissioning/docs/SystemArray.md
new file mode 100644
index 00000000..bf36312a
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemArray.md
@@ -0,0 +1,19 @@
+
+# SystemArray
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **kotlin.Int** | ID of the array. | [optional]
+**label** | **kotlin.String** | Name of the array. | [optional]
+**angle** | **kotlin.Int** | Angle of the array. | [optional]
+**tilt** | **kotlin.String** | Tilt of the array. | [optional]
+**reportingEnvoys** | **kotlin.collections.List<kotlin.String>** | List of envoys serial numbers. | [optional]
+**provisionedEnvoy** | **kotlin.String** | Provisioned envoy. | [optional]
+**updatedAt** | **kotlin.Long** | Last updated Epoch time. | [optional]
+**left** | **kotlin.Int** | Left axis position of array. | [optional]
+**top** | **kotlin.Int** | Top axis position of array. | [optional]
+**modules** | [**kotlin.collections.List<SystemArrayModulesInner>**](SystemArrayModulesInner.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemArrayModulesInner.md b/kotlin/commissioning/docs/SystemArrayModulesInner.md
new file mode 100644
index 00000000..47091da8
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemArrayModulesInner.md
@@ -0,0 +1,14 @@
+
+# SystemArrayModulesInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **kotlin.Int** | ID of the module. | [optional]
+**left** | **kotlin.Int** | Left axis position of module. | [optional]
+**top** | **kotlin.Int** | Top axis position of module. | [optional]
+**angle** | **kotlin.Int** | Angle of the module. | [optional]
+**serialNum** | **kotlin.String** | Inverter serial number mapped with this module. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemArrayTypeEnum.md b/kotlin/commissioning/docs/SystemArrayTypeEnum.md
new file mode 100644
index 00000000..83f683bb
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemArrayTypeEnum.md
@@ -0,0 +1,18 @@
+
+# SystemArrayTypeEnum
+
+## Enum
+
+
+ * `fixed_open_rack` (value: `"fixed_open_rack"`)
+
+ * `fixed_roof_mount` (value: `"fixed_roof_mount"`)
+
+ * `single_axis_tracking` (value: `"single_axis_tracking"`)
+
+ * `single_axis_backtracking` (value: `"single_axis_backtracking"`)
+
+ * `dual_axis_tracking` (value: `"dual_axis_tracking"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemArrays.md b/kotlin/commissioning/docs/SystemArrays.md
new file mode 100644
index 00000000..0681712f
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemArrays.md
@@ -0,0 +1,17 @@
+
+# SystemArrays
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | System ID. | [optional]
+**createdAt** | **kotlin.Long** | System created Epoch time. | [optional]
+**updatedAt** | **kotlin.Long** | System updated Epoch time. | [optional]
+**angle** | **kotlin.Int** | Angle of the system. | [optional]
+**arrays** | [**kotlin.collections.List<SystemArray>**](SystemArray.md) | | [optional]
+**inventory** | **kotlin.collections.List<kotlin.String>** | List of active inverter serial numbers. | [optional]
+**inventoryDetails** | [**kotlin.collections.List<SystemArraysInventoryDetailsInner>**](SystemArraysInventoryDetailsInner.md) | | [optional]
+**layers** | [**kotlin.collections.List<SystemArraysLayersInner>**](SystemArraysLayersInner.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemArraysInventoryDetailsInner.md b/kotlin/commissioning/docs/SystemArraysInventoryDetailsInner.md
new file mode 100644
index 00000000..f250bde7
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemArraysInventoryDetailsInner.md
@@ -0,0 +1,12 @@
+
+# SystemArraysInventoryDetailsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **kotlin.String** | Device type. | [optional]
+**count** | **kotlin.Int** | Device count. | [optional]
+**serialNum** | **kotlin.String** | Device serial number. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemArraysLayersInner.md b/kotlin/commissioning/docs/SystemArraysLayersInner.md
new file mode 100644
index 00000000..f0777668
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemArraysLayersInner.md
@@ -0,0 +1,17 @@
+
+# SystemArraysLayersInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **kotlin.String** | Background image url. | [optional]
+**scale** | **kotlin.Int** | Zoom level. | [optional]
+**angle** | **kotlin.Int** | Angle of the layer. | [optional]
+**opacity** | **kotlin.Int** | Opacity of the layer. | [optional]
+**width** | **kotlin.Int** | Width of the layer. | [optional]
+**height** | **kotlin.Int** | Height of the layer. | [optional]
+**left** | **kotlin.Int** | Left of the layer. | [optional]
+**top** | **kotlin.Int** | Top of the layer. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemAttachmentTypeEnum.md b/kotlin/commissioning/docs/SystemAttachmentTypeEnum.md
new file mode 100644
index 00000000..8700d9b7
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemAttachmentTypeEnum.md
@@ -0,0 +1,20 @@
+
+# SystemAttachmentTypeEnum
+
+## Enum
+
+
+ * `rack_mount` (value: `"rack_mount"`)
+
+ * `zep` (value: `"zep"`)
+
+ * `acm` (value: `"acm"`)
+
+ * `bipv` (value: `"bipv"`)
+
+ * `frame_mount` (value: `"frame_mount"`)
+
+ * `railless_mount` (value: `"railless_mount"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemEstimate.md b/kotlin/commissioning/docs/SystemEstimate.md
new file mode 100644
index 00000000..48f9eb0f
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemEstimate.md
@@ -0,0 +1,12 @@
+
+# SystemEstimate
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | System this estimate is for. | [optional]
+**degradeFactor** | **kotlin.String** | Annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. Default 0.5%. | [optional]
+**monthEstimates** | **kotlin.collections.List<kotlin.String>** | Estimated monthly production of the system, in kWh. A value for each month must be provided, and must be greater than 0. Send an empty array if you need to remove monthly estimates. Default empty array. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemExpandEnum.md b/kotlin/commissioning/docs/SystemExpandEnum.md
new file mode 100644
index 00000000..a237e0b5
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemExpandEnum.md
@@ -0,0 +1,16 @@
+
+# SystemExpandEnum
+
+## Enum
+
+
+ * `owner` (value: `"owner"`)
+
+ * `ownerPeriodCompany` (value: `"owner.company"`)
+
+ * `host` (value: `"host"`)
+
+ * `hostPeriodCompany` (value: `"host.company"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemInternetConnectionEnum.md b/kotlin/commissioning/docs/SystemInternetConnectionEnum.md
new file mode 100644
index 00000000..14a9b613
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemInternetConnectionEnum.md
@@ -0,0 +1,16 @@
+
+# SystemInternetConnectionEnum
+
+## Enum
+
+
+ * `none` (value: `"none"`)
+
+ * `cellular` (value: `"cellular"`)
+
+ * `broadband` (value: `"broadband"`)
+
+ * `dialup` (value: `"dialup"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemMeterStatusEnum.md b/kotlin/commissioning/docs/SystemMeterStatusEnum.md
new file mode 100644
index 00000000..dccb9571
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemMeterStatusEnum.md
@@ -0,0 +1,12 @@
+
+# SystemMeterStatusEnum
+
+## Enum
+
+
+ * `enabled` (value: `"enabled"`)
+
+ * `disabled` (value: `"disabled"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemParams.md b/kotlin/commissioning/docs/SystemParams.md
new file mode 100644
index 00000000..45578f0d
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemParams.md
@@ -0,0 +1,49 @@
+
+# SystemParams
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemName** | **kotlin.String** | Name of the system. Limit 255 characters. |
+**systemType** | [**SystemTypeEnum**](SystemTypeEnum.md) | | [optional]
+**internetConnection** | [**SystemInternetConnectionEnum**](SystemInternetConnectionEnum.md) | | [optional]
+**lease** | **kotlin.Boolean** | Whether the system is leased. Default false. | [optional]
+**operational** | **kotlin.Boolean** | Whether this system is permitted to operate. Default true. | [optional]
+**ownerId** | **kotlin.Int** | Enlighten ID of the system owner. Owner must be an Enlighten user. Optional. If the user of the API is a self-installer, the owner must be himself. If the user of the API is an installer then use the Search user API to get the owner user ID. If the owner not exist in the enlighten then use Create home owner API to create it newly. | [optional]
+**hostId** | **kotlin.Int** | Enlighten ID of the system host. System host must be an Enlighten user. Optional. If the user of the API is an installer then use the Search user API to get the host user ID. If the host not exist in the enlighten then use Create home owner API to create it newly. | [optional]
+**authorizedSubcontractorId** | **kotlin.Int** | Enlighten ID of the sub-contractor you want to add to the system. Optional. If you are the home owner, you cannot add subcontractors for the site. | [optional]
+**installerId** | **kotlin.Int** | Enlighten ID of the installer of this system. Defaults to current user's company ID. | [optional]
+**maintainerName** | **kotlin.String** | Name of the maintainer. | [optional]
+**maintainerId** | **kotlin.Int** | The Enlighten ID of the maintainer of this system. Defaults to current user's company ID. | [optional]
+**authorizedSubcontractors** | [**kotlin.collections.List<GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner>**](GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.md) | List of sub-contractors of this system. | [optional]
+**allowPublicAccess** | **kotlin.Boolean** | When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true. | [optional]
+**interconnectDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | When the system was approved to connect to the grid. | [optional]
+**source** | [**SystemSourceEnum**](SystemSourceEnum.md) | | [optional]
+**arrayType** | [**SystemArrayTypeEnum**](SystemArrayTypeEnum.md) | | [optional]
+**attachmentType** | [**SystemAttachmentTypeEnum**](SystemAttachmentTypeEnum.md) | | [optional]
+**ensembleEnvoy** | **kotlin.String** | Specifies serial number of ensemble envoy in multi envoy system. | [optional]
+**gridProfile** | **kotlin.String** | Grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles. | [optional]
+**requestedProfile** | **kotlin.String** | | [optional]
+**requestedReportFreq** | **kotlin.String** | | [optional]
+**voltage** | **kotlin.String** | Supported voltage/phase associated with a commercial system inside North America. If system type is not commercial, or if the installer exists & installer's country is not inside North America, or if the system's country is not inside North America, then the voltage value would be null. | [optional]
+**envoySerialNumbers** | **kotlin.collections.List<kotlin.String>** | A list of Envoys installed on this system. | [optional]
+**pvManufacturer** | **kotlin.Int** | Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs. | [optional]
+**pvManufacturerName** | **kotlin.String** | Name of the Custom PV module manufacturer associated with the system. | [optional]
+**pvModel** | **kotlin.Int** | Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs. | [optional]
+**pvModelName** | **kotlin.String** | Name of the Custom PV module model associated with the system. | [optional]
+**pvModulePowerRating** | **kotlin.Float** | Power rating (in W) of the PV module installed on the system. | [optional]
+**pvModuleType** | **kotlin.Int** | Type ID of the PV module installed on the system. 1 -> 'Mono-facial', 2 -> 'Bi-facial', 3 -> 'Split cell', 4 -> 'Other'. | [optional]
+**expectedEnvoyCount** | **kotlin.Int** | Total envoys the system is supposed to have. | [optional]
+**expectedPcuCount** | **kotlin.Int** | Total PCUs the system is supposed to have. | [optional]
+**expectedAcbCount** | **kotlin.Int** | Total acbs the system is supposed to have. | [optional]
+**expectedNsrCount** | **kotlin.Int** | Total nsrs the system is supposed to have. | [optional]
+**expectedMeterCount** | **kotlin.Int** | Total meters the system is supposed to have. | [optional]
+**expectedEnchargeCount** | **kotlin.Int** | Total encharges the system is supposed to have. | [optional]
+**expectedEnpowerCount** | **kotlin.Int** | Total enpowers the system is supposed to have. | [optional]
+**reference** | **kotlin.String** | Identifier of this system as provided by the calling user's company. This attribute is not present if the calling user's company does not have a reference for this system. This value should be alphanumeric. | [optional]
+**encharge** | [**kotlin.collections.List<SystemParamsEnchargeInner>**](SystemParamsEnchargeInner.md) | Encharge detail. | [optional]
+**enpower** | [**kotlin.collections.List<SystemParamsEnpowerInner>**](SystemParamsEnpowerInner.md) | Enpower detail. | [optional]
+**address** | [**SystemParamsAddress**](SystemParamsAddress.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemParamsAddress.md b/kotlin/commissioning/docs/SystemParamsAddress.md
new file mode 100644
index 00000000..c867045d
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemParamsAddress.md
@@ -0,0 +1,15 @@
+
+# SystemParamsAddress
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**street1** | **kotlin.String** | |
+**city** | **kotlin.String** | |
+**state** | **kotlin.String** | |
+**country** | **kotlin.String** | |
+**postalCode** | **kotlin.String** | |
+**street2** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemParamsEnchargeInner.md b/kotlin/commissioning/docs/SystemParamsEnchargeInner.md
new file mode 100644
index 00000000..fc65816e
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemParamsEnchargeInner.md
@@ -0,0 +1,11 @@
+
+# SystemParamsEnchargeInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**envoySerialNumber** | **kotlin.String** | Envoy serial number. | [optional]
+**enchargeSerialNumbers** | **kotlin.collections.List<kotlin.String>** | Encharge serial numbers. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemParamsEnpowerInner.md b/kotlin/commissioning/docs/SystemParamsEnpowerInner.md
new file mode 100644
index 00000000..df6a8c4f
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemParamsEnpowerInner.md
@@ -0,0 +1,11 @@
+
+# SystemParamsEnpowerInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**envoySerialNumber** | **kotlin.String** | Envoy serial number. | [optional]
+**enpowerSerialNumbers** | **kotlin.collections.List<kotlin.String>** | Enpower serial numbers. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemProductionModeEnum.md b/kotlin/commissioning/docs/SystemProductionModeEnum.md
new file mode 100644
index 00000000..ee645a7d
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemProductionModeEnum.md
@@ -0,0 +1,12 @@
+
+# SystemProductionModeEnum
+
+## Enum
+
+
+ * ``true`` (value: `"true"`)
+
+ * ``false`` (value: `"false"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemSourceEnum.md b/kotlin/commissioning/docs/SystemSourceEnum.md
new file mode 100644
index 00000000..5c2c38af
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemSourceEnum.md
@@ -0,0 +1,12 @@
+
+# SystemSourceEnum
+
+## Enum
+
+
+ * `meter` (value: `"meter"`)
+
+ * `microinverters` (value: `"microinverters"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemStageEnum.md b/kotlin/commissioning/docs/SystemStageEnum.md
new file mode 100644
index 00000000..bcdd87d4
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemStageEnum.md
@@ -0,0 +1,20 @@
+
+# SystemStageEnum
+
+## Enum
+
+
+ * `_1` (value: `"1"`)
+
+ * `_2` (value: `"2"`)
+
+ * `_3` (value: `"3"`)
+
+ * `_4` (value: `"4"`)
+
+ * `_5` (value: `"5"`)
+
+ * `in_progress` (value: `"in_progress"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemTypeEnum.md b/kotlin/commissioning/docs/SystemTypeEnum.md
new file mode 100644
index 00000000..6e060721
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemTypeEnum.md
@@ -0,0 +1,14 @@
+
+# SystemTypeEnum
+
+## Enum
+
+
+ * `residential` (value: `"residential"`)
+
+ * `commercial` (value: `"commercial"`)
+
+ * `other` (value: `"other"`)
+
+
+
diff --git a/kotlin/commissioning/docs/SystemsResponse.md b/kotlin/commissioning/docs/SystemsResponse.md
new file mode 100644
index 00000000..834f645e
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemsResponse.md
@@ -0,0 +1,11 @@
+
+# SystemsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systems** | [**kotlin.collections.List<SystemsResponseSystemsInner>**](SystemsResponseSystemsInner.md) | |
+**next** | **kotlin.String** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/SystemsResponseSystemsInner.md b/kotlin/commissioning/docs/SystemsResponseSystemsInner.md
new file mode 100644
index 00000000..1d6bb4ee
--- /dev/null
+++ b/kotlin/commissioning/docs/SystemsResponseSystemsInner.md
@@ -0,0 +1,29 @@
+
+# SystemsResponseSystemsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**systemId** | **kotlin.Int** | The Enlighten ID of the system. |
+**systemName** | **kotlin.String** | The name of the system. Even if the system owner has indicated their site is anonymous for public lists, the actual system name is returned here for identification purposes. |
+**systemPublicName** | **kotlin.String** | The display name of the system. Use this when displaying the system name on a public list or view. |
+**country** | **kotlin.String** | The two-letter code for the country where the system is located. See [ISO_3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) for reference. |
+**state** | **kotlin.String** | The two-letter code for the state where the system is located. See [ISO_3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) for reference. |
+**city** | **kotlin.String** | The name of the city where the system is located. |
+**postalCode** | **kotlin.String** | The postal code where the system is located. |
+**timezone** | **kotlin.String** | The timezone of the system. |
+**connectionType** | [**ConnectionType**](ConnectionType.md) | |
+**status** | [**inline**](#Status) | The current status of the system. You can find this and more in the `meta` property. |
+**meta** | [**Meta**](Meta.md) | |
+**reference** | **kotlin.String** | If the calling user belongs to a company and that company has provided its own identifiers for a system, that ID is included here. Otherwise, this attribute is not returned. | [optional]
+**otherReferences** | **kotlin.collections.List<kotlin.String>** | If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned. | [optional]
+
+
+
+## Enum: status
+Name | Value
+---- | -----
+status | comm, power, meter, meter_issue, micro, battery, storage_idle, normal
+
+
+
diff --git a/kotlin/commissioning/docs/TariffApi.md b/kotlin/commissioning/docs/TariffApi.md
new file mode 100644
index 00000000..84590361
--- /dev/null
+++ b/kotlin/commissioning/docs/TariffApi.md
@@ -0,0 +1,114 @@
+# TariffApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**getSystemTariffSettings**](TariffApi.md#getSystemTariffSettings) | **GET** /systems/config/{system_id}/tariff | Get tariff for a system
+[**updateSystemTariffSettings**](TariffApi.md#updateSystemTariffSettings) | **PUT** /systems/config/{system_id}/tariff | Update tariff for a system
+
+
+
+# **getSystemTariffSettings**
+> TariffSettings getSystemTariffSettings(systemId)
+
+Get tariff for a system
+
+Get tariff for a system.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = TariffApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system.
+try {
+ val result : TariffSettings = apiInstance.getSystemTariffSettings(systemId)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling TariffApi#getSystemTariffSettings")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling TariffApi#getSystemTariffSettings")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| Unique numeric ID of the system. |
+
+### Return type
+
+[**TariffSettings**](TariffSettings.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **updateSystemTariffSettings**
+> UpdateSystemTariffSettingsResponse updateSystemTariffSettings(systemId, params)
+
+Update tariff for a system
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = TariffApi()
+val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system.
+val params : TariffSettings = // TariffSettings |
+try {
+ val result : UpdateSystemTariffSettingsResponse = apiInstance.updateSystemTariffSettings(systemId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling TariffApi#updateSystemTariffSettings")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling TariffApi#updateSystemTariffSettings")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **systemId** | **kotlin.Int**| Unique numeric ID of the system. |
+ **params** | **TariffSettings**| | [optional]
+
+### Return type
+
+[**UpdateSystemTariffSettingsResponse**](UpdateSystemTariffSettingsResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/docs/TariffSeasonsInner.md b/kotlin/commissioning/docs/TariffSeasonsInner.md
new file mode 100644
index 00000000..f861df12
--- /dev/null
+++ b/kotlin/commissioning/docs/TariffSeasonsInner.md
@@ -0,0 +1,14 @@
+
+# TariffSeasonsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **kotlin.String** | ToU year ID. e.g='all_year_long'. | [optional]
+**start** | **kotlin.String** | Start of season. e.g='1/1'. | [optional]
+**days** | [**kotlin.collections.List<TariffSeasonsInnerDaysInner>**](TariffSeasonsInnerDaysInner.md) | ToU seasons. | [optional]
+**enableChargeFromGrid** | **kotlin.Boolean** | | [optional]
+**enableDischargeToGrid** | **kotlin.Boolean** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/TariffSeasonsInnerDaysInner.md b/kotlin/commissioning/docs/TariffSeasonsInnerDaysInner.md
new file mode 100644
index 00000000..5db6a74f
--- /dev/null
+++ b/kotlin/commissioning/docs/TariffSeasonsInnerDaysInner.md
@@ -0,0 +1,14 @@
+
+# TariffSeasonsInnerDaysInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **kotlin.String** | ToU days ID. e.g='all_days'. | [optional]
+**days** | **kotlin.String** | Comma separated days. e.g='Sun,Mon,Tue,Wed,Thu,Fri,Sat'. | [optional]
+**mustChargeStart** | **kotlin.Int** | Must charge start field. e.g=0. | [optional]
+**mustChargeDuration** | **kotlin.Int** | Must charge duration field. e.g=0. | [optional]
+**periods** | [**kotlin.collections.List<TariffSeasonsInnerDaysInnerPeriodsInner>**](TariffSeasonsInnerDaysInnerPeriodsInner.md) | Periods. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/TariffSeasonsInnerDaysInnerPeriodsInner.md b/kotlin/commissioning/docs/TariffSeasonsInnerDaysInnerPeriodsInner.md
new file mode 100644
index 00000000..6a71bc78
--- /dev/null
+++ b/kotlin/commissioning/docs/TariffSeasonsInnerDaysInnerPeriodsInner.md
@@ -0,0 +1,13 @@
+
+# TariffSeasonsInnerDaysInnerPeriodsInner
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **kotlin.String** | Period ID. e.g='period_1'. | [optional]
+**start** | **kotlin.String** | Period start. e.g=0. | [optional]
+**rate** | **kotlin.String** | Period rate. e.g=0.0. | [optional]
+**error** | [**kotlin.collections.Map<kotlin.String, kotlin.Any>**](kotlin.Any.md) | Dynamic fields will appear. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/TariffSettings.md b/kotlin/commissioning/docs/TariffSettings.md
new file mode 100644
index 00000000..e3d2f79c
--- /dev/null
+++ b/kotlin/commissioning/docs/TariffSettings.md
@@ -0,0 +1,11 @@
+
+# TariffSettings
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tariff** | [**TariffSettingsTariff**](TariffSettingsTariff.md) | | [optional]
+**task** | [**UpdateSystemTariffSettingsResponseTask**](UpdateSystemTariffSettingsResponseTask.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/TariffSettingsTariff.md b/kotlin/commissioning/docs/TariffSettingsTariff.md
new file mode 100644
index 00000000..ddb34755
--- /dev/null
+++ b/kotlin/commissioning/docs/TariffSettingsTariff.md
@@ -0,0 +1,13 @@
+
+# TariffSettingsTariff
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**currencyType** | [**TariffSettingsTariffCurrencyType**](TariffSettingsTariffCurrencyType.md) | | [optional]
+**singleRate** | [**TariffSettingsTariffSingleRate**](TariffSettingsTariffSingleRate.md) | | [optional]
+**seasons** | [**kotlin.collections.List<TariffSeasonsInner>**](TariffSeasonsInner.md) | ToU seasons. | [optional]
+**seasonsSell** | [**kotlin.collections.List<TariffSeasonsInner>**](TariffSeasonsInner.md) | ToU seasons. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/TariffSettingsTariffCurrencyType.md b/kotlin/commissioning/docs/TariffSettingsTariffCurrencyType.md
new file mode 100644
index 00000000..1627d5f4
--- /dev/null
+++ b/kotlin/commissioning/docs/TariffSettingsTariffCurrencyType.md
@@ -0,0 +1,10 @@
+
+# TariffSettingsTariffCurrencyType
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **kotlin.String** | Tariff currency code. e.g='USD'. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/TariffSettingsTariffSingleRate.md b/kotlin/commissioning/docs/TariffSettingsTariffSingleRate.md
new file mode 100644
index 00000000..8527fb0a
--- /dev/null
+++ b/kotlin/commissioning/docs/TariffSettingsTariffSingleRate.md
@@ -0,0 +1,11 @@
+
+# TariffSettingsTariffSingleRate
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**rate** | **kotlin.String** | Usage rate. e.g=0.0. | [optional]
+**sell** | **kotlin.String** | FiT rate. e.g=0.0. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/TooManyRequestsError.md b/kotlin/commissioning/docs/TooManyRequestsError.md
new file mode 100644
index 00000000..494fe0c8
--- /dev/null
+++ b/kotlin/commissioning/docs/TooManyRequestsError.md
@@ -0,0 +1,15 @@
+
+# TooManyRequestsError
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**reason** | **kotlin.String** | Response code. | [optional]
+**message** | **kotlin.collections.List<kotlin.String>** | | [optional]
+**period** | **kotlin.String** | Quota exceeded for minute/month. | [optional]
+**periodStart** | **kotlin.Int** | Starting period timestamp. | [optional]
+**periodEnd** | **kotlin.Int** | Ending period timestamp. | [optional]
+**limit** | **kotlin.Int** | Limit count for the period. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/UnprocessableEntityError.md b/kotlin/commissioning/docs/UnprocessableEntityError.md
new file mode 100644
index 00000000..a0933780
--- /dev/null
+++ b/kotlin/commissioning/docs/UnprocessableEntityError.md
@@ -0,0 +1,18 @@
+
+# UnprocessableEntityError
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**reason** | **kotlin.String** | | [optional]
+**message** | **kotlin.String** | | [optional]
+**errorMessages** | **kotlin.collections.List<kotlin.String>** | | [optional]
+**start** | [**java.time.LocalDate**](java.time.LocalDate.md) | | [optional]
+**end** | [**java.time.LocalDate**](java.time.LocalDate.md) | | [optional]
+**startAt** | **kotlin.Int** | | [optional]
+**endAt** | **kotlin.Int** | | [optional]
+**firstInterval** | **kotlin.Int** | | [optional]
+**lastInterval** | **kotlin.Int** | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/UpdateActivationEstimateRequest.md b/kotlin/commissioning/docs/UpdateActivationEstimateRequest.md
new file mode 100644
index 00000000..b8aa451b
--- /dev/null
+++ b/kotlin/commissioning/docs/UpdateActivationEstimateRequest.md
@@ -0,0 +1,11 @@
+
+# UpdateActivationEstimateRequest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**degradeFactor** | **kotlin.String** | Annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. |
+**monthEstimates** | **kotlin.collections.List<kotlin.String>** | Estimated monthly production of the system, in kWh. A value for each month must be provided, and must be greater than 0. Send an empty array if you need to remove monthly estimates. |
+
+
+
diff --git a/kotlin/commissioning/docs/UpdateCompanyUserRequest.md b/kotlin/commissioning/docs/UpdateCompanyUserRequest.md
new file mode 100644
index 00000000..58357c54
--- /dev/null
+++ b/kotlin/commissioning/docs/UpdateCompanyUserRequest.md
@@ -0,0 +1,15 @@
+
+# UpdateCompanyUserRequest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | Enlighten-generated ID of the company to which the user belongs, if any. Use the 'company' attribute instead, and the query parameter 'expand=company' to get detailed company information. | [optional]
+**email** | **kotlin.String** | Email address of the user. Must be unique within Enlighten. Required. | [optional]
+**enlightenEmails** | **kotlin.Boolean** | Whether the user receives automated emails from Enlighten. Default false. | [optional]
+**firstName** | **kotlin.String** | User's first name. Required. | [optional]
+**lastName** | **kotlin.String** | User's last name. Required. | [optional]
+**phone** | **kotlin.String** | Telephone number of the user. Optional. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/UpdateSystemArraysRequest.md b/kotlin/commissioning/docs/UpdateSystemArraysRequest.md
new file mode 100644
index 00000000..35ac777e
--- /dev/null
+++ b/kotlin/commissioning/docs/UpdateSystemArraysRequest.md
@@ -0,0 +1,11 @@
+
+# UpdateSystemArraysRequest
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**angle** | **kotlin.Int** | Angle of the system. |
+**arrays** | [**kotlin.collections.List<ArrayParams>**](ArrayParams.md) | |
+
+
+
diff --git a/kotlin/commissioning/docs/UpdateSystemMeterResponse.md b/kotlin/commissioning/docs/UpdateSystemMeterResponse.md
new file mode 100644
index 00000000..07312307
--- /dev/null
+++ b/kotlin/commissioning/docs/UpdateSystemMeterResponse.md
@@ -0,0 +1,14 @@
+
+# UpdateSystemMeterResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**serialNumber** | **kotlin.String** | Meter serial number. | [optional]
+**manufacturer** | **kotlin.String** | Name of the manufacturer. | [optional]
+**model** | **kotlin.String** | Model. | [optional]
+**type** | **kotlin.String** | Meter type. | [optional]
+**operationalDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | Operational date. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/UpdateSystemTariffSettingsResponse.md b/kotlin/commissioning/docs/UpdateSystemTariffSettingsResponse.md
new file mode 100644
index 00000000..71bb3882
--- /dev/null
+++ b/kotlin/commissioning/docs/UpdateSystemTariffSettingsResponse.md
@@ -0,0 +1,10 @@
+
+# UpdateSystemTariffSettingsResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**task** | [**UpdateSystemTariffSettingsResponseTask**](UpdateSystemTariffSettingsResponseTask.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/UpdateSystemTariffSettingsResponseTask.md b/kotlin/commissioning/docs/UpdateSystemTariffSettingsResponseTask.md
new file mode 100644
index 00000000..cb2291ab
--- /dev/null
+++ b/kotlin/commissioning/docs/UpdateSystemTariffSettingsResponseTask.md
@@ -0,0 +1,11 @@
+
+# UpdateSystemTariffSettingsResponseTask
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**status** | **kotlin.String** | Status of latest tariff update task. | [optional]
+**createdAt** | **kotlin.String** | Created time of latest tariff update task. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/User.md b/kotlin/commissioning/docs/User.md
new file mode 100644
index 00000000..fe523067
--- /dev/null
+++ b/kotlin/commissioning/docs/User.md
@@ -0,0 +1,21 @@
+
+# User
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**active** | **kotlin.Boolean** | Whether the user is allowed to log in to Enlighten. | [optional]
+**userRoles** | [**kotlin.collections.List<UserRoleEnum>**](UserRoleEnum.md) | What type of user this is in Enlighten. For self installer user user_roles will be ['self_installer']. For other users user_roles will be empty. | [optional]
+**email** | **kotlin.String** | Email address of the user. | [optional]
+**enlightenEmails** | **kotlin.Boolean** | Whether the user receives automated emails from Enlighten. | [optional]
+**enlightenView** | **kotlin.String** | Which view of Enlighten the user has. | [optional]
+**firstName** | **kotlin.String** | User's first name. | [optional]
+**lastName** | **kotlin.String** | User's last name. | [optional]
+**phone** | **kotlin.String** | Telephone number of the user. | [optional]
+**uri** | **kotlin.String** | URI to the show() method for the user. System-generated. | [optional]
+**userId** | **kotlin.Int** | Enlighten ID of the user. System-generated. | [optional]
+**updatedAt** | **kotlin.Long** | Last updated date and time in Epoch format. | [optional]
+**company** | [**Company**](Company.md) | | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/UserExpandEnum.md b/kotlin/commissioning/docs/UserExpandEnum.md
new file mode 100644
index 00000000..f18777cd
--- /dev/null
+++ b/kotlin/commissioning/docs/UserExpandEnum.md
@@ -0,0 +1,10 @@
+
+# UserExpandEnum
+
+## Enum
+
+
+ * `company` (value: `"company"`)
+
+
+
diff --git a/kotlin/commissioning/docs/UserParams.md b/kotlin/commissioning/docs/UserParams.md
new file mode 100644
index 00000000..5e41f5a3
--- /dev/null
+++ b/kotlin/commissioning/docs/UserParams.md
@@ -0,0 +1,16 @@
+
+# UserParams
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**companyId** | **kotlin.Int** | Enlighten-generated ID of the company to which the user belongs, if any. Use the 'company' attribute instead, and the query parameter 'expand=company' to get detailed company information. | [optional]
+**email** | **kotlin.String** | Email address of the user. Must be unique within Enlighten. Required. | [optional]
+**enlightenEmails** | **kotlin.Boolean** | Whether the user receives automated emails from Enlighten. Default false. | [optional]
+**enlightenView** | **kotlin.String** | Which view of Enlighten the user has. Options 'my' for MyEnlighten, 'manager' for Enlighten Manager. Default 'my'. Users who do not belong to companies should be set to 'my'. You must have an agreement with Enphase Energy to set a user to 'manager'. | [optional]
+**firstName** | **kotlin.String** | User's first name. Required. | [optional]
+**lastName** | **kotlin.String** | User's last name. Required. | [optional]
+**phone** | **kotlin.String** | Telephone number of the user. Optional. | [optional]
+
+
+
diff --git a/kotlin/commissioning/docs/UserRoleEnum.md b/kotlin/commissioning/docs/UserRoleEnum.md
new file mode 100644
index 00000000..3a2005b9
--- /dev/null
+++ b/kotlin/commissioning/docs/UserRoleEnum.md
@@ -0,0 +1,10 @@
+
+# UserRoleEnum
+
+## Enum
+
+
+ * `self_installer` (value: `"self_installer"`)
+
+
+
diff --git a/kotlin/commissioning/docs/UsersApi.md b/kotlin/commissioning/docs/UsersApi.md
new file mode 100644
index 00000000..139cb0d0
--- /dev/null
+++ b/kotlin/commissioning/docs/UsersApi.md
@@ -0,0 +1,338 @@
+# UsersApi
+
+All URIs are relative to *https://api.enphaseenergy.com/api/v4*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**getActivationUser**](UsersApi.md#getActivationUser) | **GET** /activations/{activation_id}/users/{user_id} | Returns the requested user
+[**getSelfUser**](UsersApi.md#getSelfUser) | **GET** /partner/users/self | Return the current logged in user detail
+[**getUser**](UsersApi.md#getUser) | **GET** /partner/users/{user_id} | Returns the requested user
+[**searchUsers**](UsersApi.md#searchUsers) | **GET** /users/search | Search user
+[**updateActivationUser**](UsersApi.md#updateActivationUser) | **PUT** /activations/{activation_id}/users/{user_id} | Update user
+[**updateUser**](UsersApi.md#updateUser) | **PUT** /users/{user_id} | Update user
+
+
+
+# **getActivationUser**
+> User getActivationUser(activationId, userId, expand)
+
+Returns the requested user
+
+You must have access to the requested activation and user; otherwise a 401 is returned. The user is requested in the scope of an activation, then it must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = UsersApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated.
+val userId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the user. System-generated.
+val expand : UserExpandEnum = // UserExpandEnum | Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information not include in the response.
+try {
+ val result : User = apiInstance.getActivationUser(activationId, userId, expand)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling UsersApi#getActivationUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling UsersApi#getActivationUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). System-generated. |
+ **userId** | **kotlin.Int**| Enlighten ID of the user. System-generated. |
+ **expand** | [**UserExpandEnum**](.md)| Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information not include in the response. | [optional] [enum: company]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getSelfUser**
+> User getSelfUser(expand)
+
+Return the current logged in user detail
+
+Return the current logged in user detail. Company details are provided in the response only if 'expand' parameter is passed in the URL with value as company. Otherwise, company information will not be provided in the response.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = UsersApi()
+val expand : UserExpandEnum = // UserExpandEnum | Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response.
+try {
+ val result : User = apiInstance.getSelfUser(expand)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling UsersApi#getSelfUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling UsersApi#getSelfUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **expand** | [**UserExpandEnum**](.md)| Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response. | [optional] [enum: company]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **getUser**
+> User getUser(userId, expand)
+
+Returns the requested user
+
+You must have permission to view the user. You can view yourself, users you created, and users who belong to your company or its branches. In all other cases, a 401 is returned. Company details are provided in the response only if 'expand' parameter is passed in the URL with value as company. Otherwise, company information will not be provided in the response.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = UsersApi()
+val userId : kotlin.Int = 56 // kotlin.Int | User ID.
+val expand : UserExpandEnum = // UserExpandEnum | Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response.
+try {
+ val result : User = apiInstance.getUser(userId, expand)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling UsersApi#getUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling UsersApi#getUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **kotlin.Int**| User ID. |
+ **expand** | [**UserExpandEnum**](.md)| Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response. | [optional] [enum: company]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **searchUsers**
+> SearchUsersResponse searchUsers(email)
+
+Search user
+
+Returns the user ID for the given email ID only if the user exists.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = UsersApi()
+val email : kotlin.String = email_example // kotlin.String | Email address of the user.
+try {
+ val result : SearchUsersResponse = apiInstance.searchUsers(email)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling UsersApi#searchUsers")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling UsersApi#searchUsers")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **email** | **kotlin.String**| Email address of the user. | [optional]
+
+### Return type
+
+[**SearchUsersResponse**](SearchUsersResponse.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **updateActivationUser**
+> User updateActivationUser(activationId, userId, params)
+
+Update user
+
+You must have access to the requested activation and user; otherwise a 401 is returned. The user is requested in the scope of an activation, then it must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. When 'company_id' is passed in the body param or the user company_id is already defined, we will not consider the 'enlighten_view' field value and the user will become an enlighten manager. You may change a user's company if you have access to the user, the old company, and the new company.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = UsersApi()
+val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated.
+val userId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the user. System-generated.
+val params : UserParams = // UserParams |
+try {
+ val result : User = apiInstance.updateActivationUser(activationId, userId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling UsersApi#updateActivationUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling UsersApi#updateActivationUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **activationId** | **kotlin.Int**| Enlighten ID of the activation(system). System-generated. |
+ **userId** | **kotlin.Int**| Enlighten ID of the user. System-generated. |
+ **params** | **UserParams**| | [optional]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+# **updateUser**
+> User updateUser(userId, params)
+
+Update user
+
+You must have permission to view the user. You can view yourself, users you created, and users who belong to your company or its branches. In all other cases, a 401 is returned. 'company_id' is an optional field. When you passing a 'company_id', the user become an enlighten manager and we will not consider 'enlighten_view' field value. You may change a user's company if you have access to the user, the old company, and the new company.
+
+### Example
+```kotlin
+// Import classes:
+//import enlighten.commissioning.infrastructure.*
+//import enlighten.commissioning.models.*
+
+val apiInstance = UsersApi()
+val userId : kotlin.Int = 56 // kotlin.Int | User ID.
+val params : UserParams = // UserParams |
+try {
+ val result : User = apiInstance.updateUser(userId, params)
+ println(result)
+} catch (e: ClientException) {
+ println("4xx response calling UsersApi#updateUser")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling UsersApi#updateUser")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **userId** | **kotlin.Int**| User ID. |
+ **params** | **UserParams**| | [optional]
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+
+Configure OAuth2:
+ ApiClient.accessToken = ""
+Configure ApiKey:
+ ApiClient.apiKey["key"] = ""
+ ApiClient.apiKeyPrefix["key"] = ""
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
diff --git a/kotlin/commissioning/gradle/wrapper/gradle-wrapper.jar b/kotlin/commissioning/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..d64cd491
Binary files /dev/null and b/kotlin/commissioning/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/kotlin/commissioning/gradle/wrapper/gradle-wrapper.properties b/kotlin/commissioning/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..e7646dea
--- /dev/null
+++ b/kotlin/commissioning/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
+networkTimeout=10000
+validateDistributionUrl=true
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/kotlin/commissioning/gradlew b/kotlin/commissioning/gradlew
new file mode 100644
index 00000000..9d0ce634
--- /dev/null
+++ b/kotlin/commissioning/gradlew
@@ -0,0 +1,249 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+[ -h "$app_path" ]
+do
+ls=$( ls -ld "$app_path" )
+link=${ls#*' -> '}
+case $link in #(
+/*) app_path=$link ;; #(
+*) app_path=$APP_HOME$link ;;
+esac
+done
+
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+echo "$*"
+} >&2
+
+die () {
+echo
+echo "$*"
+echo
+exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in #(
+CYGWIN* ) cygwin=true ;; #(
+Darwin* ) darwin=true ;; #(
+MSYS* | MINGW* ) msys=true ;; #(
+NONSTOP* ) nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+# IBM's JDK on AIX uses strange locations for the executables
+JAVACMD=$JAVA_HOME/jre/sh/java
+else
+JAVACMD=$JAVA_HOME/bin/java
+fi
+if [ ! -x "$JAVACMD" ] ; then
+die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+else
+JAVACMD=java
+if ! command -v java >/dev/null 2>&1
+then
+die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+case $MAX_FD in #(
+max*)
+# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+# shellcheck disable=SC2039,SC3045
+MAX_FD=$( ulimit -H -n ) ||
+warn "Could not query maximum file descriptor limit"
+esac
+case $MAX_FD in #(
+'' | soft) :;; #(
+*)
+# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+# shellcheck disable=SC2039,SC3045
+ulimit -n "$MAX_FD" ||
+warn "Could not set maximum file descriptor limit to $MAX_FD"
+esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+# Now convert the arguments - kludge to limit ourselves to /bin/sh
+for arg do
+if
+case $arg in #(
+-*) false ;; # don't mess with options #(
+/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+[ -e "$t" ] ;; #(
+*) false ;;
+esac
+then
+arg=$( cygpath --path --ignore --mixed "$arg" )
+fi
+# Roll the args list around exactly as many times as the number of
+# args, so each arg winds up back in the position where it started, but
+# possibly modified.
+#
+# NB: a `for` loop captures its iteration list before it begins, so
+# changing the positional parameters here affects neither the number of
+# iterations, nor the values presented in `arg`.
+shift # remove old arg
+set -- "$@" "$arg" # push replacement arg
+done
+fi
+
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
+
+set -- \
+"-Dorg.gradle.appname=$APP_BASE_NAME" \
+-classpath "$CLASSPATH" \
+org.gradle.wrapper.GradleWrapperMain \
+"$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+xargs -n1 |
+sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+tr '\n' ' '
+)" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/kotlin/commissioning/gradlew.bat b/kotlin/commissioning/gradlew.bat
new file mode 100644
index 00000000..9d0ce634
--- /dev/null
+++ b/kotlin/commissioning/gradlew.bat
@@ -0,0 +1,249 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+[ -h "$app_path" ]
+do
+ls=$( ls -ld "$app_path" )
+link=${ls#*' -> '}
+case $link in #(
+/*) app_path=$link ;; #(
+*) app_path=$APP_HOME$link ;;
+esac
+done
+
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+echo "$*"
+} >&2
+
+die () {
+echo
+echo "$*"
+echo
+exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in #(
+CYGWIN* ) cygwin=true ;; #(
+Darwin* ) darwin=true ;; #(
+MSYS* | MINGW* ) msys=true ;; #(
+NONSTOP* ) nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+# IBM's JDK on AIX uses strange locations for the executables
+JAVACMD=$JAVA_HOME/jre/sh/java
+else
+JAVACMD=$JAVA_HOME/bin/java
+fi
+if [ ! -x "$JAVACMD" ] ; then
+die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+else
+JAVACMD=java
+if ! command -v java >/dev/null 2>&1
+then
+die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+case $MAX_FD in #(
+max*)
+# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+# shellcheck disable=SC2039,SC3045
+MAX_FD=$( ulimit -H -n ) ||
+warn "Could not query maximum file descriptor limit"
+esac
+case $MAX_FD in #(
+'' | soft) :;; #(
+*)
+# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+# shellcheck disable=SC2039,SC3045
+ulimit -n "$MAX_FD" ||
+warn "Could not set maximum file descriptor limit to $MAX_FD"
+esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+# Now convert the arguments - kludge to limit ourselves to /bin/sh
+for arg do
+if
+case $arg in #(
+-*) false ;; # don't mess with options #(
+/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+[ -e "$t" ] ;; #(
+*) false ;;
+esac
+then
+arg=$( cygpath --path --ignore --mixed "$arg" )
+fi
+# Roll the args list around exactly as many times as the number of
+# args, so each arg winds up back in the position where it started, but
+# possibly modified.
+#
+# NB: a `for` loop captures its iteration list before it begins, so
+# changing the positional parameters here affects neither the number of
+# iterations, nor the values presented in `arg`.
+shift # remove old arg
+set -- "$@" "$arg" # push replacement arg
+done
+fi
+
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
+
+set -- \
+"-Dorg.gradle.appname=$APP_BASE_NAME" \
+-classpath "$CLASSPATH" \
+org.gradle.wrapper.GradleWrapperMain \
+"$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+xargs -n1 |
+sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+tr '\n' ' '
+)" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/kotlin/commissioning/settings.gradle b/kotlin/commissioning/settings.gradle
new file mode 100644
index 00000000..43192749
--- /dev/null
+++ b/kotlin/commissioning/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = 'kotlin-client'
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/apis/DefaultApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/apis/DefaultApi.kt
new file mode 100644
index 00000000..fc801d21
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/apis/DefaultApi.kt
@@ -0,0 +1,1248 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.models.ClientError
+import enlighten.models.ConflictError
+import enlighten.models.ConnectionType
+import enlighten.models.ConsumptionLifetimeResponse
+import enlighten.models.ConsumptionStatsResponse
+import enlighten.models.EnergyLifetimeResponse
+import enlighten.models.EnvoysResponse
+import enlighten.models.InventoryResponse
+import enlighten.models.InvertersSummaryByEnvoyOrSiteResponse
+import enlighten.models.MonthlyProductionResponse
+import enlighten.models.NotFoundError
+import enlighten.models.ProductionMeterReadingsResponse
+import enlighten.models.RgmStatsResponse
+import enlighten.models.SearchSystemIdResponse
+import enlighten.models.ServerError
+import enlighten.models.StatsResponse
+import enlighten.models.Status
+import enlighten.models.SummaryResponse
+import enlighten.models.SystemsResponse
+import enlighten.models.UnprocessableEntityError
+
+import com.squareup.moshi.Json
+
+import enlighten.infrastructure.ApiClient
+import enlighten.infrastructure.ApiResponse
+import enlighten.infrastructure.ClientException
+import enlighten.infrastructure.ClientError
+import enlighten.infrastructure.ServerException
+import enlighten.infrastructure.ServerError
+import enlighten.infrastructure.MultiValueMap
+import enlighten.infrastructure.PartConfig
+import enlighten.infrastructure.RequestConfig
+import enlighten.infrastructure.RequestMethod
+import enlighten.infrastructure.ResponseType
+import enlighten.infrastructure.Success
+import enlighten.infrastructure.toMultiValue
+
+class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v2")
+ }
+ }
+
+ /**
+ *
+ * Returns a time series of energy consumption as measured by the consumption meter installed on the specified system. All measurements are in Watt-hours. If the system does not have a meter, returns `204` - No Content. If you don't have permission to view consumption data, the response code is `401`. The time series includes one entry for each day from the `start_date` to the `end_date`. There are no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no data has been reported for the last days in the series. You can check the system's status in the `meta` attribute of the response to determine when the system last reported and whether it has communication or metering problems.
+ * @param systemId
+ * @param userId
+ * @param startDate The date on which to start the time series. Defaults to the system's operational date. (optional)
+ * @param endDate The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier. (optional)
+ * @return ConsumptionLifetimeResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun consumptionLifetime(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate? = null, endDate: java.time.LocalDate? = null) : ConsumptionLifetimeResponse {
+ val localVarResponse = consumptionLifetimeWithHttpInfo(systemId = systemId, userId = userId, startDate = startDate, endDate = endDate)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as ConsumptionLifetimeResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns a time series of energy consumption as measured by the consumption meter installed on the specified system. All measurements are in Watt-hours. If the system does not have a meter, returns `204` - No Content. If you don't have permission to view consumption data, the response code is `401`. The time series includes one entry for each day from the `start_date` to the `end_date`. There are no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no data has been reported for the last days in the series. You can check the system's status in the `meta` attribute of the response to determine when the system last reported and whether it has communication or metering problems.
+ * @param systemId
+ * @param userId
+ * @param startDate The date on which to start the time series. Defaults to the system's operational date. (optional)
+ * @param endDate The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun consumptionLifetimeWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : ApiResponse {
+ val localVariableConfig = consumptionLifetimeRequestConfig(systemId = systemId, userId = userId, startDate = startDate, endDate = endDate)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation consumptionLifetime
+ *
+ * @param systemId
+ * @param userId
+ * @param startDate The date on which to start the time series. Defaults to the system's operational date. (optional)
+ * @param endDate The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier. (optional)
+ * @return RequestConfig
+ */
+ fun consumptionLifetimeRequestConfig(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ if (startDate != null) {
+ put("start_date", listOf(parseDateToQueryString(startDate)))
+ }
+ if (endDate != null) {
+ put("end_date", listOf(parseDateToQueryString(endDate)))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/consumption_lifetime".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns consumption as measured by the consumption meter installed on the specified system. If the total duration requested is more than one month, returns one month of intervals. Intervals are 15 minutes in length and start at the top of the hour. Requests for times that do not fall on the 15-minute marks are rounded down. For example, a request for 08:01, 08:08, 08:11, or 08:14 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 15 minutes after the requested start date. If the system doesn't have any consumption meters installed, the response includes an empty intervals array. If you don't have permission to view consumption data, the response code is `401`. Under some conditions, data for a given period may be temporarily unavailable.
+ * @param systemId
+ * @param userId
+ * @param startAt Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval. (optional)
+ * @return ConsumptionStatsResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun consumptionStats(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long? = null, endAt: kotlin.Long? = null) : ConsumptionStatsResponse {
+ val localVarResponse = consumptionStatsWithHttpInfo(systemId = systemId, userId = userId, startAt = startAt, endAt = endAt)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as ConsumptionStatsResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns consumption as measured by the consumption meter installed on the specified system. If the total duration requested is more than one month, returns one month of intervals. Intervals are 15 minutes in length and start at the top of the hour. Requests for times that do not fall on the 15-minute marks are rounded down. For example, a request for 08:01, 08:08, 08:11, or 08:14 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 15 minutes after the requested start date. If the system doesn't have any consumption meters installed, the response includes an empty intervals array. If you don't have permission to view consumption data, the response code is `401`. Under some conditions, data for a given period may be temporarily unavailable.
+ * @param systemId
+ * @param userId
+ * @param startAt Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun consumptionStatsWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long?, endAt: kotlin.Long?) : ApiResponse {
+ val localVariableConfig = consumptionStatsRequestConfig(systemId = systemId, userId = userId, startAt = startAt, endAt = endAt)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation consumptionStats
+ *
+ * @param systemId
+ * @param userId
+ * @param startAt Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval. (optional)
+ * @return RequestConfig
+ */
+ fun consumptionStatsRequestConfig(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long?, endAt: kotlin.Long?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ if (startAt != null) {
+ put("start_at", listOf(startAt.toString()))
+ }
+ if (endAt != null) {
+ put("end_at", listOf(endAt.toString()))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/consumption_stats".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * enum for parameter production
+ */
+ enum class ProductionEnergyLifetime(val value: kotlin.String) {
+ @Json(name = "all") all("all")
+ }
+
+ /**
+ *
+ * Returns a time series of energy produced on the system over its lifetime. All measurements are in Watt-hours. The time series includes one entry for each day from the `start_date` to the `end_date`. There are no gaps in the time series. If the response includes trailing zeroes, such as `[909, 4970, 0, 0, 0]`, then no energy has been reported for the last days in the series. You can check the system's status in the `meta` attribute of the response to determine when the system last reported and whether it has communication or production problems. If the system has a meter, the time series includes data as measured by the microinverters until the first full day after the meter has been installed, when it switches to using the data as measured by the meter. This is called the \"merged time series\". In addition, the response includes the attribute `meter_start_date`, to indicate where in the time series the meter measurements begin to be used. You can retrieve the complete time series from the meter and from the microinverters by adding the parameter `production=all` to the request.
+ * @param systemId
+ * @param userId
+ * @param startDate The date on which to start the time series. Defaults to the system's operational date. (optional)
+ * @param endDate The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier. (optional)
+ * @param production When `all`, returns the merged time series plus the time series as reported by the microinverters and the meter on the system. Other values are ignored. (optional)
+ * @return EnergyLifetimeResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun energyLifetime(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate? = null, endDate: java.time.LocalDate? = null, production: ProductionEnergyLifetime? = null) : EnergyLifetimeResponse {
+ val localVarResponse = energyLifetimeWithHttpInfo(systemId = systemId, userId = userId, startDate = startDate, endDate = endDate, production = production)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as EnergyLifetimeResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns a time series of energy produced on the system over its lifetime. All measurements are in Watt-hours. The time series includes one entry for each day from the `start_date` to the `end_date`. There are no gaps in the time series. If the response includes trailing zeroes, such as `[909, 4970, 0, 0, 0]`, then no energy has been reported for the last days in the series. You can check the system's status in the `meta` attribute of the response to determine when the system last reported and whether it has communication or production problems. If the system has a meter, the time series includes data as measured by the microinverters until the first full day after the meter has been installed, when it switches to using the data as measured by the meter. This is called the \"merged time series\". In addition, the response includes the attribute `meter_start_date`, to indicate where in the time series the meter measurements begin to be used. You can retrieve the complete time series from the meter and from the microinverters by adding the parameter `production=all` to the request.
+ * @param systemId
+ * @param userId
+ * @param startDate The date on which to start the time series. Defaults to the system's operational date. (optional)
+ * @param endDate The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier. (optional)
+ * @param production When `all`, returns the merged time series plus the time series as reported by the microinverters and the meter on the system. Other values are ignored. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun energyLifetimeWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?, production: ProductionEnergyLifetime?) : ApiResponse {
+ val localVariableConfig = energyLifetimeRequestConfig(systemId = systemId, userId = userId, startDate = startDate, endDate = endDate, production = production)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation energyLifetime
+ *
+ * @param systemId
+ * @param userId
+ * @param startDate The date on which to start the time series. Defaults to the system's operational date. (optional)
+ * @param endDate The last date to include in the time series. Defaults to yesterday or the last day the system reported, whichever is earlier. (optional)
+ * @param production When `all`, returns the merged time series plus the time series as reported by the microinverters and the meter on the system. Other values are ignored. (optional)
+ * @return RequestConfig
+ */
+ fun energyLifetimeRequestConfig(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?, production: ProductionEnergyLifetime?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ if (startDate != null) {
+ put("start_date", listOf(parseDateToQueryString(startDate)))
+ }
+ if (endDate != null) {
+ put("end_date", listOf(parseDateToQueryString(endDate)))
+ }
+ if (production != null) {
+ put("production", listOf(production.value))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/energy_lifetime".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns a listing of all active Envoys currently deployed on the system.
+ * @param systemId
+ * @param userId
+ * @return EnvoysResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun envoys(systemId: kotlin.Int, userId: kotlin.String) : EnvoysResponse {
+ val localVarResponse = envoysWithHttpInfo(systemId = systemId, userId = userId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as EnvoysResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns a listing of all active Envoys currently deployed on the system.
+ * @param systemId
+ * @param userId
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun envoysWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String) : ApiResponse {
+ val localVariableConfig = envoysRequestConfig(systemId = systemId, userId = userId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation envoys
+ *
+ * @param systemId
+ * @param userId
+ * @return RequestConfig
+ */
+ fun envoysRequestConfig(systemId: kotlin.Int, userId: kotlin.String) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/envoys".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns a listing of active devices on the given system. A device is considered active if it has not been retired in Enlighten. \"Active\" does not imply that the device is currently reporting, producing, or measuring energy.
+ * @param systemId
+ * @param userId
+ * @return InventoryResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun inventory(systemId: kotlin.Int, userId: kotlin.String) : InventoryResponse {
+ val localVarResponse = inventoryWithHttpInfo(systemId = systemId, userId = userId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as InventoryResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns a listing of active devices on the given system. A device is considered active if it has not been retired in Enlighten. \"Active\" does not imply that the device is currently reporting, producing, or measuring energy.
+ * @param systemId
+ * @param userId
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun inventoryWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String) : ApiResponse {
+ val localVariableConfig = inventoryRequestConfig(systemId = systemId, userId = userId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation inventory
+ *
+ * @param systemId
+ * @param userId
+ * @return RequestConfig
+ */
+ fun inventoryRequestConfig(systemId: kotlin.Int, userId: kotlin.String) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/inventory".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns the summary along with the energy produced on the system over its lifetime.
+ * @param userId
+ * @param siteId The identifier of the system.
+ * @return kotlin.collections.List
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun invertersSummaryByEnvoyOrSite(userId: kotlin.String, siteId: kotlin.Int) : kotlin.collections.List {
+ val localVarResponse = invertersSummaryByEnvoyOrSiteWithHttpInfo(userId = userId, siteId = siteId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.List
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns the summary along with the energy produced on the system over its lifetime.
+ * @param userId
+ * @param siteId The identifier of the system.
+ * @return ApiResponse?>
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun invertersSummaryByEnvoyOrSiteWithHttpInfo(userId: kotlin.String, siteId: kotlin.Int) : ApiResponse?> {
+ val localVariableConfig = invertersSummaryByEnvoyOrSiteRequestConfig(userId = userId, siteId = siteId)
+
+ return request>(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation invertersSummaryByEnvoyOrSite
+ *
+ * @param userId
+ * @param siteId The identifier of the system.
+ * @return RequestConfig
+ */
+ fun invertersSummaryByEnvoyOrSiteRequestConfig(userId: kotlin.String, siteId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ put("site_id", listOf(siteId.toString()))
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/inverters_summary_by_envoy_or_site",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * This endpoint is deprecated and will be removed in a future release. Use `production_meter_readings` or `energy_lifetime` instead. Returns the energy production of the system for the month starting on the given date. The start date must be at least one month ago. If a meter or meters are installed on the system, measurements come from the meter; otherwise, measurements come from the microinverters. This endpoint can return a response of Data Temporarily Unavailable.
+ * @param systemId
+ * @param userId
+ * @param startDate Start date for reporting period. The reporting period ends on the previous day of the next month; for example, a `start_date` of 2011-07-20 returns data through 2011-06-19. When the start date is the first of a calendar month, the end date is the last day of that month.
+ * @return MonthlyProductionResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ @Deprecated(message = "This operation is deprecated.")
+ fun monthlyProduction(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate) : MonthlyProductionResponse {
+ @Suppress("DEPRECATION")
+ val localVarResponse = monthlyProductionWithHttpInfo(systemId = systemId, userId = userId, startDate = startDate)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as MonthlyProductionResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * This endpoint is deprecated and will be removed in a future release. Use `production_meter_readings` or `energy_lifetime` instead. Returns the energy production of the system for the month starting on the given date. The start date must be at least one month ago. If a meter or meters are installed on the system, measurements come from the meter; otherwise, measurements come from the microinverters. This endpoint can return a response of Data Temporarily Unavailable.
+ * @param systemId
+ * @param userId
+ * @param startDate Start date for reporting period. The reporting period ends on the previous day of the next month; for example, a `start_date` of 2011-07-20 returns data through 2011-06-19. When the start date is the first of a calendar month, the end date is the last day of that month.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ @Deprecated(message = "This operation is deprecated.")
+ fun monthlyProductionWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate) : ApiResponse {
+ @Suppress("DEPRECATION")
+ val localVariableConfig = monthlyProductionRequestConfig(systemId = systemId, userId = userId, startDate = startDate)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation monthlyProduction
+ *
+ * @param systemId
+ * @param userId
+ * @param startDate Start date for reporting period. The reporting period ends on the previous day of the next month; for example, a `start_date` of 2011-07-20 returns data through 2011-06-19. When the start date is the first of a calendar month, the end date is the last day of that month.
+ * @return RequestConfig
+ */
+ @Deprecated(message = "This operation is deprecated.")
+ fun monthlyProductionRequestConfig(systemId: kotlin.Int, userId: kotlin.String, startDate: java.time.LocalDate) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ put("start_date", listOf(parseDateToQueryString(startDate)))
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/monthly_production".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns the last known \"odometer\" reading of each revenue-grade production meter on the system as of the requested time. This endpoint includes entries for every production meter on the requested system, regardless of whether the meter is currently in service or retired. `read_at` is the time at which the reading was taken, and is always less than or equal to the requested `end_at`. Commonly, the reading will be within 30 minutes of the requested `end_at`; however, larger deltas can occur and do not necessarily mean there is a problem with the meter or the system it is on. Systems that are configured to report infrequently can show large deltas on all meters, especially when `end_at` is close to the current time. Meters that have been retired from a system will show an `end_at` that doesn't change, and that eventually is far away from the current time.
+ * @param systemId
+ * @param userId
+ * @param endAt (optional)
+ * @return ProductionMeterReadingsResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun productionMeterReadings(systemId: kotlin.Int, userId: kotlin.String, endAt: kotlin.Long? = null) : ProductionMeterReadingsResponse {
+ val localVarResponse = productionMeterReadingsWithHttpInfo(systemId = systemId, userId = userId, endAt = endAt)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as ProductionMeterReadingsResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns the last known \"odometer\" reading of each revenue-grade production meter on the system as of the requested time. This endpoint includes entries for every production meter on the requested system, regardless of whether the meter is currently in service or retired. `read_at` is the time at which the reading was taken, and is always less than or equal to the requested `end_at`. Commonly, the reading will be within 30 minutes of the requested `end_at`; however, larger deltas can occur and do not necessarily mean there is a problem with the meter or the system it is on. Systems that are configured to report infrequently can show large deltas on all meters, especially when `end_at` is close to the current time. Meters that have been retired from a system will show an `end_at` that doesn't change, and that eventually is far away from the current time.
+ * @param systemId
+ * @param userId
+ * @param endAt (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun productionMeterReadingsWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String, endAt: kotlin.Long?) : ApiResponse {
+ val localVariableConfig = productionMeterReadingsRequestConfig(systemId = systemId, userId = userId, endAt = endAt)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation productionMeterReadings
+ *
+ * @param systemId
+ * @param userId
+ * @param endAt (optional)
+ * @return RequestConfig
+ */
+ fun productionMeterReadingsRequestConfig(systemId: kotlin.Int, userId: kotlin.String, endAt: kotlin.Long?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ if (endAt != null) {
+ put("end_at", listOf(endAt.toString()))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/production_meter_readings".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns performance statistics as measured by the revenue-grade meters installed on the specified system. If the total duration requested is more than one month, returns one month of intervals. Intervals are 15 minutes in length and start at the top of the hour. Requests for times that do not fall on the 15-minute marks are rounded down. For example, a request for 08:01, 08:08, 08:11, or 08:14 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 15 minutes after the requested start date. If the system doesn't have any revenue-grade meters installed, the response includes an empty intervals array. Under some conditions, data for a given period may be temporarily unavailable.
+ * @param systemId
+ * @param userId
+ * @param startAt Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval. (optional)
+ * @return RgmStatsResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun rgmStats(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long? = null, endAt: kotlin.Long? = null) : RgmStatsResponse {
+ val localVarResponse = rgmStatsWithHttpInfo(systemId = systemId, userId = userId, startAt = startAt, endAt = endAt)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as RgmStatsResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns performance statistics as measured by the revenue-grade meters installed on the specified system. If the total duration requested is more than one month, returns one month of intervals. Intervals are 15 minutes in length and start at the top of the hour. Requests for times that do not fall on the 15-minute marks are rounded down. For example, a request for 08:01, 08:08, 08:11, or 08:14 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 15 minutes after the requested start date. If the system doesn't have any revenue-grade meters installed, the response includes an empty intervals array. Under some conditions, data for a given period may be temporarily unavailable.
+ * @param systemId
+ * @param userId
+ * @param startAt Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun rgmStatsWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long?, endAt: kotlin.Long?) : ApiResponse {
+ val localVariableConfig = rgmStatsRequestConfig(systemId = systemId, userId = userId, startAt = startAt, endAt = endAt)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation rgmStats
+ *
+ * @param systemId
+ * @param userId
+ * @param startAt Start of period to report on in Unix epoch time. If no start is specified, the assumed start is midnight today, in the timezone of the system. If the start is earlier than one year ago, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the first interval of the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, defaults to the time of the request. If the end is later than the last reported interval the response data ends with the last reported interval. (optional)
+ * @return RequestConfig
+ */
+ fun rgmStatsRequestConfig(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long?, endAt: kotlin.Long?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ if (startAt != null) {
+ put("start_at", listOf(startAt.toString()))
+ }
+ if (endAt != null) {
+ put("end_at", listOf(endAt.toString()))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/rgm_stats".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Get system ID by envoy serial number.
+ * @param userId
+ * @param serialNum Serial number of the envoy.
+ * @return SearchSystemIdResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun searchSystemId(userId: kotlin.String, serialNum: kotlin.String) : SearchSystemIdResponse {
+ val localVarResponse = searchSystemIdWithHttpInfo(userId = userId, serialNum = serialNum)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SearchSystemIdResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Get system ID by envoy serial number.
+ * @param userId
+ * @param serialNum Serial number of the envoy.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun searchSystemIdWithHttpInfo(userId: kotlin.String, serialNum: kotlin.String) : ApiResponse {
+ val localVariableConfig = searchSystemIdRequestConfig(userId = userId, serialNum = serialNum)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation searchSystemId
+ *
+ * @param userId
+ * @param serialNum Serial number of the envoy.
+ * @return RequestConfig
+ */
+ fun searchSystemIdRequestConfig(userId: kotlin.String, serialNum: kotlin.String) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ put("serial_num", listOf(serialNum.toString()))
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/search_system_id",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns performance statistics for the specified system as reported by microinverters installed on the system. If the total duration requested is more than one day, returns one day of intervals. Intervals are 5 minutes in length and start at the top of the hour. Requests for times that do not fall on the 5-minute marks are rounded down. For example, a request for 08:01, 08:02, 08:03, or 08:04 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 5 minutes after the requested start date. The response includes intervals that have been reported for the requested period. Gaps in reporting are not filled with 0-value intervals. The dark hours on a system are an example of such a gap, because the microinverters do not produce at night. Sometimes a request cannot be processed because the requested dates are invalid for the system in question. Examples include asking for stats starting at a time that is later than the system's last reported interval, or asking for stats before a system has started production. In cases such as these, the response code is `422` and the response body includes an error reason as well as the parameters used to process the request. If the system doesn't have any microinverters installed, the response includes an empty intervals array. Under some conditions, data for a given period may be temporarily unavailable.
+ * @param systemId
+ * @param userId
+ * @param startAt Start of reporting period in Unix epoch time. If no start is specified, defaults to midnight today, in the timezone of the system. If the start date is earlier than one year ago today, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, the assumed end is now. If the end is later than the last reporting interval the response data ends with the last reported interval. (optional)
+ * @return StatsResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun stats(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long? = null, endAt: kotlin.Long? = null) : StatsResponse {
+ val localVarResponse = statsWithHttpInfo(systemId = systemId, userId = userId, startAt = startAt, endAt = endAt)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as StatsResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns performance statistics for the specified system as reported by microinverters installed on the system. If the total duration requested is more than one day, returns one day of intervals. Intervals are 5 minutes in length and start at the top of the hour. Requests for times that do not fall on the 5-minute marks are rounded down. For example, a request for 08:01, 08:02, 08:03, or 08:04 is treated as a request for 08:00. Intervals are listed by their end dates; therefore, the first interval returned is 5 minutes after the requested start date. The response includes intervals that have been reported for the requested period. Gaps in reporting are not filled with 0-value intervals. The dark hours on a system are an example of such a gap, because the microinverters do not produce at night. Sometimes a request cannot be processed because the requested dates are invalid for the system in question. Examples include asking for stats starting at a time that is later than the system's last reported interval, or asking for stats before a system has started production. In cases such as these, the response code is `422` and the response body includes an error reason as well as the parameters used to process the request. If the system doesn't have any microinverters installed, the response includes an empty intervals array. Under some conditions, data for a given period may be temporarily unavailable.
+ * @param systemId
+ * @param userId
+ * @param startAt Start of reporting period in Unix epoch time. If no start is specified, defaults to midnight today, in the timezone of the system. If the start date is earlier than one year ago today, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, the assumed end is now. If the end is later than the last reporting interval the response data ends with the last reported interval. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun statsWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long?, endAt: kotlin.Long?) : ApiResponse {
+ val localVariableConfig = statsRequestConfig(systemId = systemId, userId = userId, startAt = startAt, endAt = endAt)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation stats
+ *
+ * @param systemId
+ * @param userId
+ * @param startAt Start of reporting period in Unix epoch time. If no start is specified, defaults to midnight today, in the timezone of the system. If the start date is earlier than one year ago today, the response includes an empty intervals list. If the start is earlier than the system's `operational_date`, the response data begins with the `operational_date`. (optional)
+ * @param endAt End of reporting period in Unix epoch time. If no end is specified, the assumed end is now. If the end is later than the last reporting interval the response data ends with the last reported interval. (optional)
+ * @return RequestConfig
+ */
+ fun statsRequestConfig(systemId: kotlin.Int, userId: kotlin.String, startAt: kotlin.Long?, endAt: kotlin.Long?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ if (startAt != null) {
+ put("start_at", listOf(startAt.toString()))
+ }
+ if (endAt != null) {
+ put("end_at", listOf(endAt.toString()))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/stats".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns summary information for the specified system.
+ * @param systemId
+ * @param userId
+ * @param summaryDate Start of reporting period. If no `summary_date` is provided, the start is the current day at midnight site-local time. Otherwise, the start is midnight site-local time of the requested day. If the requested date cannot be parsed or is in the future, the response includes an informative error message and `422` status. (optional)
+ * @return SummaryResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun summary(systemId: kotlin.Int, userId: kotlin.String, summaryDate: java.time.LocalDate? = null) : SummaryResponse {
+ val localVarResponse = summaryWithHttpInfo(systemId = systemId, userId = userId, summaryDate = summaryDate)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SummaryResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns summary information for the specified system.
+ * @param systemId
+ * @param userId
+ * @param summaryDate Start of reporting period. If no `summary_date` is provided, the start is the current day at midnight site-local time. Otherwise, the start is midnight site-local time of the requested day. If the requested date cannot be parsed or is in the future, the response includes an informative error message and `422` status. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun summaryWithHttpInfo(systemId: kotlin.Int, userId: kotlin.String, summaryDate: java.time.LocalDate?) : ApiResponse {
+ val localVariableConfig = summaryRequestConfig(systemId = systemId, userId = userId, summaryDate = summaryDate)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation summary
+ *
+ * @param systemId
+ * @param userId
+ * @param summaryDate Start of reporting period. If no `summary_date` is provided, the start is the current day at midnight site-local time. Otherwise, the start is midnight site-local time of the requested day. If the requested date cannot be parsed or is in the future, the response includes an informative error message and `422` status. (optional)
+ * @return RequestConfig
+ */
+ fun summaryRequestConfig(systemId: kotlin.Int, userId: kotlin.String, summaryDate: java.time.LocalDate?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ if (summaryDate != null) {
+ put("summary_date", listOf(parseDateToQueryString(summaryDate)))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/summary".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ *
+ * Returns a list of systems for which the user can make API requests. There is a limit to the number of systems that can be returned at one time. If the first request does not return a full list, use the `next` attribute in the response body to request the next page of systems. By default, systems are returned in batches of 100. The maximum page size is 1000.
+ * @param userId
+ * @param next (optional)
+ * @param limit (optional, default to 100)
+ * @param systemId (optional)
+ * @param systemId2 (optional)
+ * @param systemName (optional)
+ * @param systemName2 (optional)
+ * @param status (optional)
+ * @param status2 (optional)
+ * @param reference (optional)
+ * @param reference2 (optional)
+ * @param installer (optional)
+ * @param installer2 (optional)
+ * @param connectionType (optional)
+ * @param connectionType2 (optional)
+ * @return SystemsResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun systems(userId: kotlin.String, next: kotlin.String? = null, limit: kotlin.Int? = 100, systemId: kotlin.Int? = null, systemId2: kotlin.collections.List? = null, systemName: kotlin.String? = null, systemName2: kotlin.collections.List? = null, status: Status? = null, status2: kotlin.collections.List? = null, reference: kotlin.String? = null, reference2: kotlin.collections.List? = null, installer: kotlin.String? = null, installer2: kotlin.collections.List? = null, connectionType: ConnectionType? = null, connectionType2: kotlin.collections.List? = null) : SystemsResponse {
+ val localVarResponse = systemsWithHttpInfo(userId = userId, next = next, limit = limit, systemId = systemId, systemId2 = systemId2, systemName = systemName, systemName2 = systemName2, status = status, status2 = status2, reference = reference, reference2 = reference2, installer = installer, installer2 = installer2, connectionType = connectionType, connectionType2 = connectionType2)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SystemsResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ *
+ * Returns a list of systems for which the user can make API requests. There is a limit to the number of systems that can be returned at one time. If the first request does not return a full list, use the `next` attribute in the response body to request the next page of systems. By default, systems are returned in batches of 100. The maximum page size is 1000.
+ * @param userId
+ * @param next (optional)
+ * @param limit (optional, default to 100)
+ * @param systemId (optional)
+ * @param systemId2 (optional)
+ * @param systemName (optional)
+ * @param systemName2 (optional)
+ * @param status (optional)
+ * @param status2 (optional)
+ * @param reference (optional)
+ * @param reference2 (optional)
+ * @param installer (optional)
+ * @param installer2 (optional)
+ * @param connectionType (optional)
+ * @param connectionType2 (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun systemsWithHttpInfo(userId: kotlin.String, next: kotlin.String?, limit: kotlin.Int?, systemId: kotlin.Int?, systemId2: kotlin.collections.List?, systemName: kotlin.String?, systemName2: kotlin.collections.List?, status: Status?, status2: kotlin.collections.List?, reference: kotlin.String?, reference2: kotlin.collections.List?, installer: kotlin.String?, installer2: kotlin.collections.List?, connectionType: ConnectionType?, connectionType2: kotlin.collections.List?) : ApiResponse {
+ val localVariableConfig = systemsRequestConfig(userId = userId, next = next, limit = limit, systemId = systemId, systemId2 = systemId2, systemName = systemName, systemName2 = systemName2, status = status, status2 = status2, reference = reference, reference2 = reference2, installer = installer, installer2 = installer2, connectionType = connectionType, connectionType2 = connectionType2)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation systems
+ *
+ * @param userId
+ * @param next (optional)
+ * @param limit (optional, default to 100)
+ * @param systemId (optional)
+ * @param systemId2 (optional)
+ * @param systemName (optional)
+ * @param systemName2 (optional)
+ * @param status (optional)
+ * @param status2 (optional)
+ * @param reference (optional)
+ * @param reference2 (optional)
+ * @param installer (optional)
+ * @param installer2 (optional)
+ * @param connectionType (optional)
+ * @param connectionType2 (optional)
+ * @return RequestConfig
+ */
+ fun systemsRequestConfig(userId: kotlin.String, next: kotlin.String?, limit: kotlin.Int?, systemId: kotlin.Int?, systemId2: kotlin.collections.List?, systemName: kotlin.String?, systemName2: kotlin.collections.List?, status: Status?, status2: kotlin.collections.List?, reference: kotlin.String?, reference2: kotlin.collections.List?, installer: kotlin.String?, installer2: kotlin.collections.List?, connectionType: ConnectionType?, connectionType2: kotlin.collections.List?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ put("user_id", listOf(userId.toString()))
+ if (next != null) {
+ put("next", listOf(next.toString()))
+ }
+ if (limit != null) {
+ put("limit", listOf(limit.toString()))
+ }
+ if (systemId != null) {
+ put("system_id", listOf(systemId.toString()))
+ }
+ if (systemId2 != null) {
+ put("system_id[]", toMultiValue(systemId2.toList(), "multi"))
+ }
+ if (systemName != null) {
+ put("system_name", listOf(systemName.toString()))
+ }
+ if (systemName2 != null) {
+ put("system_name[]", toMultiValue(systemName2.toList(), "multi"))
+ }
+ if (status != null) {
+ put("status", listOf(status.toString()))
+ }
+ if (status2 != null) {
+ put("status[]", toMultiValue(status2.toList(), "multi"))
+ }
+ if (reference != null) {
+ put("reference", listOf(reference.toString()))
+ }
+ if (reference2 != null) {
+ put("reference[]", toMultiValue(reference2.toList(), "multi"))
+ }
+ if (installer != null) {
+ put("installer", listOf(installer.toString()))
+ }
+ if (installer2 != null) {
+ put("installer[]", toMultiValue(installer2.toList(), "multi"))
+ }
+ if (connectionType != null) {
+ put("connection_type", listOf(connectionType.toString()))
+ }
+ if (connectionType2 != null) {
+ put("connection_type[]", toMultiValue(connectionType2.toList(), "multi"))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+
+ private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
+ HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
+}
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/ActivationsApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/ActivationsApi.kt
new file mode 100644
index 00000000..494c190e
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/ActivationsApi.kt
@@ -0,0 +1,779 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.commissioning.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.commissioning.models.Activation
+import enlighten.commissioning.models.DeleteActivationResponse
+import enlighten.commissioning.models.GetActivationOpsProductionModeResponse
+import enlighten.commissioning.models.GetPartnerActivationsResponse
+import enlighten.commissioning.models.GrantActivationUserAccessResponse
+import enlighten.commissioning.models.RevokeActivationUserAccessResponse
+import enlighten.commissioning.models.ServerError
+import enlighten.commissioning.models.SetActivationOpsProductionModeRequest
+import enlighten.commissioning.models.SetActivationOpsProductionModeResponse
+import enlighten.commissioning.models.SystemExpandEnum
+import enlighten.commissioning.models.SystemParams
+import enlighten.commissioning.models.SystemStageEnum
+import enlighten.commissioning.models.TooManyRequestsError
+import enlighten.commissioning.models.UnprocessableEntityError
+
+import com.squareup.moshi.Json
+
+import enlighten.commissioning.infrastructure.ApiClient
+import enlighten.commissioning.infrastructure.ApiResponse
+import enlighten.commissioning.infrastructure.ClientException
+import enlighten.commissioning.infrastructure.ClientError
+import enlighten.commissioning.infrastructure.ServerException
+import enlighten.commissioning.infrastructure.ServerError
+import enlighten.commissioning.infrastructure.MultiValueMap
+import enlighten.commissioning.infrastructure.PartConfig
+import enlighten.commissioning.infrastructure.RequestConfig
+import enlighten.commissioning.infrastructure.RequestMethod
+import enlighten.commissioning.infrastructure.ResponseType
+import enlighten.commissioning.infrastructure.Success
+import enlighten.commissioning.infrastructure.toMultiValue
+
+class ActivationsApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v4")
+ }
+ }
+
+ /**
+ * Create new activation
+ * Create new activation.
+ * @param params (optional)
+ * @return Activation
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun createPartnerActivation(params: SystemParams? = null) : Activation {
+ val localVarResponse = createPartnerActivationWithHttpInfo(params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as Activation
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Create new activation
+ * Create new activation.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun createPartnerActivationWithHttpInfo(params: SystemParams?) : ApiResponse {
+ val localVariableConfig = createPartnerActivationRequestConfig(params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation createPartnerActivation
+ *
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun createPartnerActivationRequestConfig(params: SystemParams?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Content-Type"] = "application/json"
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.POST,
+ path = "/partner/activations",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Delete an activation by ID
+ * To delete an activation, the activation stage must be less than 3 and there are no active devices associated with it.
+ * @param activationId Enlighten ID of the activation(system).
+ * @return DeleteActivationResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun deleteActivation(activationId: kotlin.Int) : DeleteActivationResponse {
+ val localVarResponse = deleteActivationWithHttpInfo(activationId = activationId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteActivationResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Delete an activation by ID
+ * To delete an activation, the activation stage must be less than 3 and there are no active devices associated with it.
+ * @param activationId Enlighten ID of the activation(system).
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun deleteActivationWithHttpInfo(activationId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = deleteActivationRequestConfig(activationId = activationId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation deleteActivation
+ *
+ * @param activationId Enlighten ID of the activation(system).
+ * @return RequestConfig
+ */
+ fun deleteActivationRequestConfig(activationId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.DELETE,
+ path = "/partner/activations/{activation_id}".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Get production mode
+ * Get production mode for a particular system. For that system stage must be greater than 2, Otherwise you will get 422.
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @return GetActivationOpsProductionModeResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getActivationOpsProductionMode(activationId: kotlin.Int) : GetActivationOpsProductionModeResponse {
+ val localVarResponse = getActivationOpsProductionModeWithHttpInfo(activationId = activationId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GetActivationOpsProductionModeResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Get production mode
+ * Get production mode for a particular system. For that system stage must be greater than 2, Otherwise you will get 422.
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getActivationOpsProductionModeWithHttpInfo(activationId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = getActivationOpsProductionModeRequestConfig(activationId = activationId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getActivationOpsProductionMode
+ *
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @return RequestConfig
+ */
+ fun getActivationOpsProductionModeRequestConfig(activationId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/activations/{activation_id}/ops/production_mode".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Retrieves an Activation by ID
+ * By default, the body of the response looks like the example below. However, you can choose to retrieve more information about the activation using response expansion, for example instead of returning only the owner's name within the system hash, the response includes detailed information about the owner by using expand=owner. You can also expand the owner's company by using expand=owner.company. The response now includes information about the owner and the company he belongs to, if any. By using expand=host will include details about the system host. You can also expand the host's company by using expand=host.company. The response now includes information about the host and the company he belongs to.
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param expand Retrieve more information about the activation. The expand query parameter is a comma-separated list of associations to expand. (optional)
+ * @return Activation
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getPartnerActivation(activationId: kotlin.Int, expand: SystemExpandEnum? = null) : Activation {
+ val localVarResponse = getPartnerActivationWithHttpInfo(activationId = activationId, expand = expand)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as Activation
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Retrieves an Activation by ID
+ * By default, the body of the response looks like the example below. However, you can choose to retrieve more information about the activation using response expansion, for example instead of returning only the owner's name within the system hash, the response includes detailed information about the owner by using expand=owner. You can also expand the owner's company by using expand=owner.company. The response now includes information about the owner and the company he belongs to, if any. By using expand=host will include details about the system host. You can also expand the host's company by using expand=host.company. The response now includes information about the host and the company he belongs to.
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param expand Retrieve more information about the activation. The expand query parameter is a comma-separated list of associations to expand. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getPartnerActivationWithHttpInfo(activationId: kotlin.Int, expand: SystemExpandEnum?) : ApiResponse {
+ val localVariableConfig = getPartnerActivationRequestConfig(activationId = activationId, expand = expand)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getPartnerActivation
+ *
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param expand Retrieve more information about the activation. The expand query parameter is a comma-separated list of associations to expand. (optional)
+ * @return RequestConfig
+ */
+ fun getPartnerActivationRequestConfig(activationId: kotlin.Int, expand: SystemExpandEnum?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ if (expand != null) {
+ put("expand", listOf(expand.toString()))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/partner/activations/{activation_id}".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * List of Activations
+ * Returns a list of activations for which the user can make API requests. There is a limit to the number of activations which can be returned at one time. If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. Provide only valid filters. During filter the activations empty and invalid filter fields are ignored. In case the installer ID doesn't exist, API will return an empty array.
+ * @param next If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. If the returned list below the limit, then response does not include the 'next' field. (optional)
+ * @param limit There is a limit to the number of activations which can be returned at one time. (optional)
+ * @param stage Filter activations by stage. Passing in_progress alone will consider as you have passed all the 1,2,3,4 stages. Passing multiple stage values using comma to filter. E.g. stage=1,2,3. Passing in_progress with any other combination will give you empty systems. This parameter searches for an exact match of the input value. (optional)
+ * @param reference Filter activations by company reference. (optional)
+ * @param installerId Filter activations by installer ID. (optional)
+ * @param systemName Filter activations by system name. (optional)
+ * @param address Filter activations by address. This will perform a partial search and return if match found with street1, street2, country, state, zipcode of the activation. (optional)
+ * @param region Filter activations by region. Provide two latitude, longitude values to find activations between them. Format 'latitude1,longitude1,latitude2,longitude2' e.g value '44.968046,-94.420307,44.33328,-89.132008'. (optional)
+ * @param search Filter activations by search. This will perform a partial search and return if match found with system_name, reference, system_id, street1 and street2, country, state, zipcode of the activation. (optional)
+ * @return GetPartnerActivationsResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getPartnerActivations(next: kotlin.String? = null, limit: kotlin.Int? = null, stage: SystemStageEnum? = null, reference: kotlin.String? = null, installerId: kotlin.Int? = null, systemName: kotlin.String? = null, address: kotlin.String? = null, region: kotlin.String? = null, search: kotlin.String? = null) : GetPartnerActivationsResponse {
+ val localVarResponse = getPartnerActivationsWithHttpInfo(next = next, limit = limit, stage = stage, reference = reference, installerId = installerId, systemName = systemName, address = address, region = region, search = search)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GetPartnerActivationsResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * List of Activations
+ * Returns a list of activations for which the user can make API requests. There is a limit to the number of activations which can be returned at one time. If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. Provide only valid filters. During filter the activations empty and invalid filter fields are ignored. In case the installer ID doesn't exist, API will return an empty array.
+ * @param next If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. If the returned list below the limit, then response does not include the 'next' field. (optional)
+ * @param limit There is a limit to the number of activations which can be returned at one time. (optional)
+ * @param stage Filter activations by stage. Passing in_progress alone will consider as you have passed all the 1,2,3,4 stages. Passing multiple stage values using comma to filter. E.g. stage=1,2,3. Passing in_progress with any other combination will give you empty systems. This parameter searches for an exact match of the input value. (optional)
+ * @param reference Filter activations by company reference. (optional)
+ * @param installerId Filter activations by installer ID. (optional)
+ * @param systemName Filter activations by system name. (optional)
+ * @param address Filter activations by address. This will perform a partial search and return if match found with street1, street2, country, state, zipcode of the activation. (optional)
+ * @param region Filter activations by region. Provide two latitude, longitude values to find activations between them. Format 'latitude1,longitude1,latitude2,longitude2' e.g value '44.968046,-94.420307,44.33328,-89.132008'. (optional)
+ * @param search Filter activations by search. This will perform a partial search and return if match found with system_name, reference, system_id, street1 and street2, country, state, zipcode of the activation. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getPartnerActivationsWithHttpInfo(next: kotlin.String?, limit: kotlin.Int?, stage: SystemStageEnum?, reference: kotlin.String?, installerId: kotlin.Int?, systemName: kotlin.String?, address: kotlin.String?, region: kotlin.String?, search: kotlin.String?) : ApiResponse {
+ val localVariableConfig = getPartnerActivationsRequestConfig(next = next, limit = limit, stage = stage, reference = reference, installerId = installerId, systemName = systemName, address = address, region = region, search = search)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getPartnerActivations
+ *
+ * @param next If the first request does not return a full list, use the 'next' attribute in the response body to request the next page. By default, activations are returned in batches of 100. The maximum page size is 1000. If the returned list below the limit, then response does not include the 'next' field. (optional)
+ * @param limit There is a limit to the number of activations which can be returned at one time. (optional)
+ * @param stage Filter activations by stage. Passing in_progress alone will consider as you have passed all the 1,2,3,4 stages. Passing multiple stage values using comma to filter. E.g. stage=1,2,3. Passing in_progress with any other combination will give you empty systems. This parameter searches for an exact match of the input value. (optional)
+ * @param reference Filter activations by company reference. (optional)
+ * @param installerId Filter activations by installer ID. (optional)
+ * @param systemName Filter activations by system name. (optional)
+ * @param address Filter activations by address. This will perform a partial search and return if match found with street1, street2, country, state, zipcode of the activation. (optional)
+ * @param region Filter activations by region. Provide two latitude, longitude values to find activations between them. Format 'latitude1,longitude1,latitude2,longitude2' e.g value '44.968046,-94.420307,44.33328,-89.132008'. (optional)
+ * @param search Filter activations by search. This will perform a partial search and return if match found with system_name, reference, system_id, street1 and street2, country, state, zipcode of the activation. (optional)
+ * @return RequestConfig
+ */
+ fun getPartnerActivationsRequestConfig(next: kotlin.String?, limit: kotlin.Int?, stage: SystemStageEnum?, reference: kotlin.String?, installerId: kotlin.Int?, systemName: kotlin.String?, address: kotlin.String?, region: kotlin.String?, search: kotlin.String?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ if (next != null) {
+ put("next", listOf(next.toString()))
+ }
+ if (limit != null) {
+ put("limit", listOf(limit.toString()))
+ }
+ if (stage != null) {
+ put("stage", listOf(stage.toString()))
+ }
+ if (reference != null) {
+ put("reference", listOf(reference.toString()))
+ }
+ if (installerId != null) {
+ put("installer_id", listOf(installerId.toString()))
+ }
+ if (systemName != null) {
+ put("system_name", listOf(systemName.toString()))
+ }
+ if (address != null) {
+ put("address", listOf(address.toString()))
+ }
+ if (region != null) {
+ put("region", listOf(region.toString()))
+ }
+ if (search != null) {
+ put("search", listOf(search.toString()))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/partner/activations",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Grant Access
+ * Gives a user permission to view this system. Response status 200 indicates the access was granted. The user must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. In all other cases you will get 401 response.
+ * @param activationId Enlighten ID of the activation(system).
+ * @param userId Enlighten ID of the user which you want to grant access.
+ * @return GrantActivationUserAccessResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun grantActivationUserAccess(activationId: kotlin.Int, userId: kotlin.Int) : GrantActivationUserAccessResponse {
+ val localVarResponse = grantActivationUserAccessWithHttpInfo(activationId = activationId, userId = userId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GrantActivationUserAccessResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Grant Access
+ * Gives a user permission to view this system. Response status 200 indicates the access was granted. The user must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. In all other cases you will get 401 response.
+ * @param activationId Enlighten ID of the activation(system).
+ * @param userId Enlighten ID of the user which you want to grant access.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun grantActivationUserAccessWithHttpInfo(activationId: kotlin.Int, userId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = grantActivationUserAccessRequestConfig(activationId = activationId, userId = userId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation grantActivationUserAccess
+ *
+ * @param activationId Enlighten ID of the activation(system).
+ * @param userId Enlighten ID of the user which you want to grant access.
+ * @return RequestConfig
+ */
+ fun grantActivationUserAccessRequestConfig(activationId: kotlin.Int, userId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.POST,
+ path = "/activations/{activation_id}/users/{user_id}".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())).replace("{"+"user_id"+"}", encodeURIComponent(userId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Revoke Access
+ * Revokes a user's permission to view this system. Response status 200 indicates the access was revoked. The user must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. In all other cases you will get 401 response.
+ * @param activationId Enlighten ID of the activation(system).
+ * @param userId Enlighten ID of the user which you want to revoke the access.
+ * @return RevokeActivationUserAccessResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun revokeActivationUserAccess(activationId: kotlin.Int, userId: kotlin.Int) : RevokeActivationUserAccessResponse {
+ val localVarResponse = revokeActivationUserAccessWithHttpInfo(activationId = activationId, userId = userId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as RevokeActivationUserAccessResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Revoke Access
+ * Revokes a user's permission to view this system. Response status 200 indicates the access was revoked. The user must be the owner or the host of an activation the API user can manage (or) Users created by API user (or) Users who belong to your company or its branches. In all other cases you will get 401 response.
+ * @param activationId Enlighten ID of the activation(system).
+ * @param userId Enlighten ID of the user which you want to revoke the access.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun revokeActivationUserAccessWithHttpInfo(activationId: kotlin.Int, userId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = revokeActivationUserAccessRequestConfig(activationId = activationId, userId = userId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation revokeActivationUserAccess
+ *
+ * @param activationId Enlighten ID of the activation(system).
+ * @param userId Enlighten ID of the user which you want to revoke the access.
+ * @return RequestConfig
+ */
+ fun revokeActivationUserAccessRequestConfig(activationId: kotlin.Int, userId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.DELETE,
+ path = "/activations/{activation_id}/users/{user_id}".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())).replace("{"+"user_id"+"}", encodeURIComponent(userId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Set production mode
+ * Enable or Disable production mode for a particular system. For that system stage must be greater than 2, Otherwise you will get 422.
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param params (optional)
+ * @return SetActivationOpsProductionModeResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun setActivationOpsProductionMode(activationId: kotlin.Int, params: SetActivationOpsProductionModeRequest? = null) : SetActivationOpsProductionModeResponse {
+ val localVarResponse = setActivationOpsProductionModeWithHttpInfo(activationId = activationId, params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SetActivationOpsProductionModeResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Set production mode
+ * Enable or Disable production mode for a particular system. For that system stage must be greater than 2, Otherwise you will get 422.
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun setActivationOpsProductionModeWithHttpInfo(activationId: kotlin.Int, params: SetActivationOpsProductionModeRequest?) : ApiResponse {
+ val localVariableConfig = setActivationOpsProductionModeRequestConfig(activationId = activationId, params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation setActivationOpsProductionMode
+ *
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun setActivationOpsProductionModeRequestConfig(activationId: kotlin.Int, params: SetActivationOpsProductionModeRequest?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Content-Type"] = "application/json"
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.POST,
+ path = "/activations/{activation_id}/ops/production_mode".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Update an activation.
+ * Update an activation.
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param params (optional)
+ * @return Activation
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun updatePartnerActivation(activationId: kotlin.Int, params: SystemParams? = null) : Activation {
+ val localVarResponse = updatePartnerActivationWithHttpInfo(activationId = activationId, params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as Activation
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Update an activation.
+ * Update an activation.
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun updatePartnerActivationWithHttpInfo(activationId: kotlin.Int, params: SystemParams?) : ApiResponse {
+ val localVariableConfig = updatePartnerActivationRequestConfig(activationId = activationId, params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation updatePartnerActivation
+ *
+ * @param activationId Enlighten ID of the activation(system). System-generated.
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun updatePartnerActivationRequestConfig(activationId: kotlin.Int, params: SystemParams?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Content-Type"] = "application/json"
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.PUT,
+ path = "/partner/activations/{activation_id}".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+
+ private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
+ HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
+}
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/ArraysApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/ArraysApi.kt
new file mode 100644
index 00000000..1af38a51
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/ArraysApi.kt
@@ -0,0 +1,428 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.commissioning.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.commissioning.models.ArrayParams
+import enlighten.commissioning.models.DeleteSystemArrayResponse
+import enlighten.commissioning.models.ServerError
+import enlighten.commissioning.models.SystemArray
+import enlighten.commissioning.models.SystemArrays
+import enlighten.commissioning.models.TooManyRequestsError
+import enlighten.commissioning.models.UnprocessableEntityError
+import enlighten.commissioning.models.UpdateSystemArraysRequest
+
+import com.squareup.moshi.Json
+
+import enlighten.commissioning.infrastructure.ApiClient
+import enlighten.commissioning.infrastructure.ApiResponse
+import enlighten.commissioning.infrastructure.ClientException
+import enlighten.commissioning.infrastructure.ClientError
+import enlighten.commissioning.infrastructure.ServerException
+import enlighten.commissioning.infrastructure.ServerError
+import enlighten.commissioning.infrastructure.MultiValueMap
+import enlighten.commissioning.infrastructure.PartConfig
+import enlighten.commissioning.infrastructure.RequestConfig
+import enlighten.commissioning.infrastructure.RequestMethod
+import enlighten.commissioning.infrastructure.ResponseType
+import enlighten.commissioning.infrastructure.Success
+import enlighten.commissioning.infrastructure.toMultiValue
+
+class ArraysApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v4")
+ }
+ }
+
+ /**
+ * Delete an array by ID
+ * Delete an array by ID.
+ * @param systemId System ID.
+ * @param arrayId Array ID.
+ * @return DeleteSystemArrayResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun deleteSystemArray(systemId: kotlin.Int, arrayId: kotlin.Int) : DeleteSystemArrayResponse {
+ val localVarResponse = deleteSystemArrayWithHttpInfo(systemId = systemId, arrayId = arrayId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as DeleteSystemArrayResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Delete an array by ID
+ * Delete an array by ID.
+ * @param systemId System ID.
+ * @param arrayId Array ID.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun deleteSystemArrayWithHttpInfo(systemId: kotlin.Int, arrayId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = deleteSystemArrayRequestConfig(systemId = systemId, arrayId = arrayId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation deleteSystemArray
+ *
+ * @param systemId System ID.
+ * @param arrayId Array ID.
+ * @return RequestConfig
+ */
+ fun deleteSystemArrayRequestConfig(systemId: kotlin.Int, arrayId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.DELETE,
+ path = "/partner/systems/{system_id}/arrays/{array_id}".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())).replace("{"+"array_id"+"}", encodeURIComponent(arrayId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Fetch array details by ID
+ * Fetch array details by ID.
+ * @param systemId System ID.
+ * @param arrayId Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Fetch particular system Array details' endpoint.
+ * @return SystemArray
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getSystemArray(systemId: kotlin.Int, arrayId: kotlin.Int) : SystemArray {
+ val localVarResponse = getSystemArrayWithHttpInfo(systemId = systemId, arrayId = arrayId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SystemArray
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Fetch array details by ID
+ * Fetch array details by ID.
+ * @param systemId System ID.
+ * @param arrayId Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Fetch particular system Array details' endpoint.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getSystemArrayWithHttpInfo(systemId: kotlin.Int, arrayId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = getSystemArrayRequestConfig(systemId = systemId, arrayId = arrayId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getSystemArray
+ *
+ * @param systemId System ID.
+ * @param arrayId Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Fetch particular system Array details' endpoint.
+ * @return RequestConfig
+ */
+ fun getSystemArrayRequestConfig(systemId: kotlin.Int, arrayId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/partner/systems/{system_id}/arrays/{array_id}".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())).replace("{"+"array_id"+"}", encodeURIComponent(arrayId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Fetch particular system Array details
+ * Fetch particular system Array details.
+ * @param systemId System ID.
+ * @return SystemArrays
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getSystemArrays(systemId: kotlin.Int) : SystemArrays {
+ val localVarResponse = getSystemArraysWithHttpInfo(systemId = systemId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SystemArrays
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Fetch particular system Array details
+ * Fetch particular system Array details.
+ * @param systemId System ID.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getSystemArraysWithHttpInfo(systemId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = getSystemArraysRequestConfig(systemId = systemId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getSystemArrays
+ *
+ * @param systemId System ID.
+ * @return RequestConfig
+ */
+ fun getSystemArraysRequestConfig(systemId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/partner/systems/{system_id}/arrays".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Update particular system array details
+ * Update particular system array details. The angle, left, and top fields in the request parameter must be of integer type. Enlighten will rearrange the top and left values of the modules to fit the modules properly and avoid overlap. Therefore, the top and left values in the response may be slightly different from the top and left values passed in the request parameters. In array level, top and left is the total size of the modules inside that array. Overall in arrays, the top and left values should not overlap. In the module level, the size of a panel is 100 units long in the x axis and 200 units long in the y axis. Please pass the left and top values in the request parameter in multiples of 100 and 200 respectively.
+ * @param systemId System ID.
+ * @param arrayId Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Update all Arrays' endpoint.
+ * @param params (optional)
+ * @return SystemArray
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun updateSystemArray(systemId: kotlin.Int, arrayId: kotlin.Int, params: ArrayParams? = null) : SystemArray {
+ val localVarResponse = updateSystemArrayWithHttpInfo(systemId = systemId, arrayId = arrayId, params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SystemArray
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Update particular system array details
+ * Update particular system array details. The angle, left, and top fields in the request parameter must be of integer type. Enlighten will rearrange the top and left values of the modules to fit the modules properly and avoid overlap. Therefore, the top and left values in the response may be slightly different from the top and left values passed in the request parameters. In array level, top and left is the total size of the modules inside that array. Overall in arrays, the top and left values should not overlap. In the module level, the size of a panel is 100 units long in the x axis and 200 units long in the y axis. Please pass the left and top values in the request parameter in multiples of 100 and 200 respectively.
+ * @param systemId System ID.
+ * @param arrayId Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Update all Arrays' endpoint.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun updateSystemArrayWithHttpInfo(systemId: kotlin.Int, arrayId: kotlin.Int, params: ArrayParams?) : ApiResponse {
+ val localVariableConfig = updateSystemArrayRequestConfig(systemId = systemId, arrayId = arrayId, params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation updateSystemArray
+ *
+ * @param systemId System ID.
+ * @param arrayId Array ID. If an empty value is passed in the Array ID, this endpoint behaves as 'Update all Arrays' endpoint.
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun updateSystemArrayRequestConfig(systemId: kotlin.Int, arrayId: kotlin.Int, params: ArrayParams?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.PUT,
+ path = "/partner/systems/{system_id}/arrays/{array_id}".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())).replace("{"+"array_id"+"}", encodeURIComponent(arrayId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Update all arrays for system
+ * Update all arrays for system. The angle, left, and top fields in the request parameter must be of integer type. Enlighten will rearrange the top and left values of the modules to fit the modules properly and avoid overlap. Therefore, the top and left values in the response may be slightly different from the top and left values passed in the request parameters. In array level, top and left is the total size of the modules inside that array. Overall the arrays top and left values should not overlap. In the module level, the size of a panel is 100 units long in the x axis and 200 units long in the y axis. Please pass the left and top values in the request parameter in multiples of 100 and 200 respectively.
+ * @param systemId System ID.
+ * @param params (optional)
+ * @return SystemArrays
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun updateSystemArrays(systemId: kotlin.Int, params: UpdateSystemArraysRequest? = null) : SystemArrays {
+ val localVarResponse = updateSystemArraysWithHttpInfo(systemId = systemId, params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SystemArrays
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Update all arrays for system
+ * Update all arrays for system. The angle, left, and top fields in the request parameter must be of integer type. Enlighten will rearrange the top and left values of the modules to fit the modules properly and avoid overlap. Therefore, the top and left values in the response may be slightly different from the top and left values passed in the request parameters. In array level, top and left is the total size of the modules inside that array. Overall the arrays top and left values should not overlap. In the module level, the size of a panel is 100 units long in the x axis and 200 units long in the y axis. Please pass the left and top values in the request parameter in multiples of 100 and 200 respectively.
+ * @param systemId System ID.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun updateSystemArraysWithHttpInfo(systemId: kotlin.Int, params: UpdateSystemArraysRequest?) : ApiResponse {
+ val localVariableConfig = updateSystemArraysRequestConfig(systemId = systemId, params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation updateSystemArrays
+ *
+ * @param systemId System ID.
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun updateSystemArraysRequestConfig(systemId: kotlin.Int, params: UpdateSystemArraysRequest?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.PUT,
+ path = "/partner/systems/{system_id}/arrays".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+
+ private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
+ HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
+}
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/CompaniesApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/CompaniesApi.kt
new file mode 100644
index 00000000..3f7f5507
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/CompaniesApi.kt
@@ -0,0 +1,502 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.commissioning.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.commissioning.models.CreateCompanyUserRequest
+import enlighten.commissioning.models.GetCompanyUsersResponse
+import enlighten.commissioning.models.GetSelfCompanyAuthorizedSubcontractorsResponse
+import enlighten.commissioning.models.GetSelfCompanyBranchesResponse
+import enlighten.commissioning.models.ServerError
+import enlighten.commissioning.models.TooManyRequestsError
+import enlighten.commissioning.models.UnprocessableEntityError
+import enlighten.commissioning.models.UpdateCompanyUserRequest
+import enlighten.commissioning.models.User
+import enlighten.commissioning.models.UserExpandEnum
+
+import com.squareup.moshi.Json
+
+import enlighten.commissioning.infrastructure.ApiClient
+import enlighten.commissioning.infrastructure.ApiResponse
+import enlighten.commissioning.infrastructure.ClientException
+import enlighten.commissioning.infrastructure.ClientError
+import enlighten.commissioning.infrastructure.ServerException
+import enlighten.commissioning.infrastructure.ServerError
+import enlighten.commissioning.infrastructure.MultiValueMap
+import enlighten.commissioning.infrastructure.PartConfig
+import enlighten.commissioning.infrastructure.RequestConfig
+import enlighten.commissioning.infrastructure.RequestMethod
+import enlighten.commissioning.infrastructure.ResponseType
+import enlighten.commissioning.infrastructure.Success
+import enlighten.commissioning.infrastructure.toMultiValue
+
+class CompaniesApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v4")
+ }
+ }
+
+ /**
+ * Create company user
+ * Create a company user. When the user is created in the context of a company, then the user is belongs to that company. Otherwise, the user does not belong to a company. Email, first name, and last name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored. Pass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields.
+ * @param companyId Company ID.
+ * @param params (optional)
+ * @return User
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun createCompanyUser(companyId: kotlin.Int, params: CreateCompanyUserRequest? = null) : User {
+ val localVarResponse = createCompanyUserWithHttpInfo(companyId = companyId, params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as User
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Create company user
+ * Create a company user. When the user is created in the context of a company, then the user is belongs to that company. Otherwise, the user does not belong to a company. Email, first name, and last name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored. Pass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields.
+ * @param companyId Company ID.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun createCompanyUserWithHttpInfo(companyId: kotlin.Int, params: CreateCompanyUserRequest?) : ApiResponse {
+ val localVariableConfig = createCompanyUserRequestConfig(companyId = companyId, params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation createCompanyUser
+ *
+ * @param companyId Company ID.
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun createCompanyUserRequestConfig(companyId: kotlin.Int, params: CreateCompanyUserRequest?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Content-Type"] = "application/json"
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.POST,
+ path = "/companies/{company_id}/users".replace("{"+"company_id"+"}", encodeURIComponent(companyId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Returns the requested user
+ * Returns the requested user. If the user is requested in the scope of a company, then two conditions apply. 1) You must have access to the requested company; otherwise a 401 is returned. 2) The user must belong to the requested company; otherwise a 401 is returned. Company details are provided in the response only if 'expand' parameter is passed in the URL with value as company. Otherwise, company information will not be provided in the response.
+ * @param companyId Company ID.
+ * @param userId User ID.
+ * @param expand Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response. (optional)
+ * @return User
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getCompanyUser(companyId: kotlin.Int, userId: kotlin.Int, expand: UserExpandEnum? = null) : User {
+ val localVarResponse = getCompanyUserWithHttpInfo(companyId = companyId, userId = userId, expand = expand)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as User
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Returns the requested user
+ * Returns the requested user. If the user is requested in the scope of a company, then two conditions apply. 1) You must have access to the requested company; otherwise a 401 is returned. 2) The user must belong to the requested company; otherwise a 401 is returned. Company details are provided in the response only if 'expand' parameter is passed in the URL with value as company. Otherwise, company information will not be provided in the response.
+ * @param companyId Company ID.
+ * @param userId User ID.
+ * @param expand Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getCompanyUserWithHttpInfo(companyId: kotlin.Int, userId: kotlin.Int, expand: UserExpandEnum?) : ApiResponse {
+ val localVariableConfig = getCompanyUserRequestConfig(companyId = companyId, userId = userId, expand = expand)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getCompanyUser
+ *
+ * @param companyId Company ID.
+ * @param userId User ID.
+ * @param expand Passing expand params in the url with valid option, then the response will contain company object fields. Otherwise the company information will not be provided in the response. (optional)
+ * @return RequestConfig
+ */
+ fun getCompanyUserRequestConfig(companyId: kotlin.Int, userId: kotlin.Int, expand: UserExpandEnum?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ if (expand != null) {
+ put("expand", listOf(expand.toString()))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/companies/{company_id}/users/{user_id}".replace("{"+"company_id"+"}", encodeURIComponent(companyId.toString())).replace("{"+"user_id"+"}", encodeURIComponent(userId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Get all users with in a company
+ * Returns the users in the given company.
+ * @param companyId Company ID.
+ * @return GetCompanyUsersResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getCompanyUsers(companyId: kotlin.Int) : GetCompanyUsersResponse {
+ val localVarResponse = getCompanyUsersWithHttpInfo(companyId = companyId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GetCompanyUsersResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Get all users with in a company
+ * Returns the users in the given company.
+ * @param companyId Company ID.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getCompanyUsersWithHttpInfo(companyId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = getCompanyUsersRequestConfig(companyId = companyId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getCompanyUsers
+ *
+ * @param companyId Company ID.
+ * @return RequestConfig
+ */
+ fun getCompanyUsersRequestConfig(companyId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/companies/{company_id}/users".replace("{"+"company_id"+"}", encodeURIComponent(companyId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * User's company and its authorized subcontractors.
+ * Returns all the authorized subcontractors of a given company, if any.
+ * @return GetSelfCompanyAuthorizedSubcontractorsResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getSelfCompanyAuthorizedSubcontractors() : GetSelfCompanyAuthorizedSubcontractorsResponse {
+ val localVarResponse = getSelfCompanyAuthorizedSubcontractorsWithHttpInfo()
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GetSelfCompanyAuthorizedSubcontractorsResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * User's company and its authorized subcontractors.
+ * Returns all the authorized subcontractors of a given company, if any.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getSelfCompanyAuthorizedSubcontractorsWithHttpInfo() : ApiResponse {
+ val localVariableConfig = getSelfCompanyAuthorizedSubcontractorsRequestConfig()
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getSelfCompanyAuthorizedSubcontractors
+ *
+ * @return RequestConfig
+ */
+ fun getSelfCompanyAuthorizedSubcontractorsRequestConfig() : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/companies/self/authorized_subcontractors",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * User's company and its branches
+ * Returns information about the API user's company and its branches, if any.
+ * @return GetSelfCompanyBranchesResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getSelfCompanyBranches() : GetSelfCompanyBranchesResponse {
+ val localVarResponse = getSelfCompanyBranchesWithHttpInfo()
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GetSelfCompanyBranchesResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * User's company and its branches
+ * Returns information about the API user's company and its branches, if any.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getSelfCompanyBranchesWithHttpInfo() : ApiResponse {
+ val localVariableConfig = getSelfCompanyBranchesRequestConfig()
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getSelfCompanyBranches
+ *
+ * @return RequestConfig
+ */
+ fun getSelfCompanyBranchesRequestConfig() : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/companies/self/branches",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Update company user
+ * Updates a user. You may change a user's company if you have access to the user, the old company, and the new company. The user is requested in the scope of a company, then three conditions apply. 1) You must have access to the requested company; otherwise a 401 is returned. 2) The user must belong to the requested company; otherwise a 401 is returned. 3) Requested user must be created by API user (or) it must belong to your company or its branches.
+ * @param companyId Company ID.
+ * @param userId User ID.
+ * @param params (optional)
+ * @return User
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun updateCompanyUser(companyId: kotlin.Int, userId: kotlin.Int, params: UpdateCompanyUserRequest? = null) : User {
+ val localVarResponse = updateCompanyUserWithHttpInfo(companyId = companyId, userId = userId, params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as User
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Update company user
+ * Updates a user. You may change a user's company if you have access to the user, the old company, and the new company. The user is requested in the scope of a company, then three conditions apply. 1) You must have access to the requested company; otherwise a 401 is returned. 2) The user must belong to the requested company; otherwise a 401 is returned. 3) Requested user must be created by API user (or) it must belong to your company or its branches.
+ * @param companyId Company ID.
+ * @param userId User ID.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun updateCompanyUserWithHttpInfo(companyId: kotlin.Int, userId: kotlin.Int, params: UpdateCompanyUserRequest?) : ApiResponse {
+ val localVariableConfig = updateCompanyUserRequestConfig(companyId = companyId, userId = userId, params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation updateCompanyUser
+ *
+ * @param companyId Company ID.
+ * @param userId User ID.
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun updateCompanyUserRequestConfig(companyId: kotlin.Int, userId: kotlin.Int, params: UpdateCompanyUserRequest?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Content-Type"] = "application/json"
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.PUT,
+ path = "/companies/{company_id}/users/{user_id}".replace("{"+"company_id"+"}", encodeURIComponent(companyId.toString())).replace("{"+"user_id"+"}", encodeURIComponent(userId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+
+ private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
+ HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
+}
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/EstimateApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/EstimateApi.kt
new file mode 100644
index 00000000..857d959f
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/EstimateApi.kt
@@ -0,0 +1,201 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.commissioning.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.commissioning.models.ServerError
+import enlighten.commissioning.models.SystemEstimate
+import enlighten.commissioning.models.TooManyRequestsError
+import enlighten.commissioning.models.UnprocessableEntityError
+import enlighten.commissioning.models.UpdateActivationEstimateRequest
+
+import com.squareup.moshi.Json
+
+import enlighten.commissioning.infrastructure.ApiClient
+import enlighten.commissioning.infrastructure.ApiResponse
+import enlighten.commissioning.infrastructure.ClientException
+import enlighten.commissioning.infrastructure.ClientError
+import enlighten.commissioning.infrastructure.ServerException
+import enlighten.commissioning.infrastructure.ServerError
+import enlighten.commissioning.infrastructure.MultiValueMap
+import enlighten.commissioning.infrastructure.PartConfig
+import enlighten.commissioning.infrastructure.RequestConfig
+import enlighten.commissioning.infrastructure.RequestMethod
+import enlighten.commissioning.infrastructure.ResponseType
+import enlighten.commissioning.infrastructure.Success
+import enlighten.commissioning.infrastructure.toMultiValue
+
+class EstimateApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v4")
+ }
+ }
+
+ /**
+ * Returns the estimate for this system.
+ * Provides access to production estimates for a system. An estimate includes the annual degradation factor for the system as well as estimated production, in kWh, for each month. By default degrade_factor value is 0.5 and month_estimates value is an empty array.
+ * @param activationId Activation ID.
+ * @return SystemEstimate
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getActivationEstimate(activationId: kotlin.Int) : SystemEstimate {
+ val localVarResponse = getActivationEstimateWithHttpInfo(activationId = activationId)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SystemEstimate
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Returns the estimate for this system.
+ * Provides access to production estimates for a system. An estimate includes the annual degradation factor for the system as well as estimated production, in kWh, for each month. By default degrade_factor value is 0.5 and month_estimates value is an empty array.
+ * @param activationId Activation ID.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getActivationEstimateWithHttpInfo(activationId: kotlin.Int) : ApiResponse {
+ val localVariableConfig = getActivationEstimateRequestConfig(activationId = activationId)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getActivationEstimate
+ *
+ * @param activationId Activation ID.
+ * @return RequestConfig
+ */
+ fun getActivationEstimateRequestConfig(activationId: kotlin.Int) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/activations/{activation_id}/estimate".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Update the estimate for this system.
+ * Updates the estimate for this system.
+ * @param activationId Activation ID.
+ * @param params (optional)
+ * @return SystemEstimate
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun updateActivationEstimate(activationId: kotlin.Int, params: UpdateActivationEstimateRequest? = null) : SystemEstimate {
+ val localVarResponse = updateActivationEstimateWithHttpInfo(activationId = activationId, params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SystemEstimate
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Update the estimate for this system.
+ * Updates the estimate for this system.
+ * @param activationId Activation ID.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun updateActivationEstimateWithHttpInfo(activationId: kotlin.Int, params: UpdateActivationEstimateRequest?) : ApiResponse {
+ val localVariableConfig = updateActivationEstimateRequestConfig(activationId = activationId, params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation updateActivationEstimate
+ *
+ * @param activationId Activation ID.
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun updateActivationEstimateRequestConfig(activationId: kotlin.Int, params: UpdateActivationEstimateRequest?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Content-Type"] = "application/json"
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.PUT,
+ path = "/activations/{activation_id}/estimate".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+
+ private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
+ HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
+}
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/GridProfilesApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/GridProfilesApi.kt
new file mode 100644
index 00000000..27b3e9f9
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/GridProfilesApi.kt
@@ -0,0 +1,121 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.commissioning.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.commissioning.models.GetGridProfilesResponse
+import enlighten.commissioning.models.ServerError
+import enlighten.commissioning.models.TooManyRequestsError
+
+import com.squareup.moshi.Json
+
+import enlighten.commissioning.infrastructure.ApiClient
+import enlighten.commissioning.infrastructure.ApiResponse
+import enlighten.commissioning.infrastructure.ClientException
+import enlighten.commissioning.infrastructure.ClientError
+import enlighten.commissioning.infrastructure.ServerException
+import enlighten.commissioning.infrastructure.ServerError
+import enlighten.commissioning.infrastructure.MultiValueMap
+import enlighten.commissioning.infrastructure.PartConfig
+import enlighten.commissioning.infrastructure.RequestConfig
+import enlighten.commissioning.infrastructure.RequestMethod
+import enlighten.commissioning.infrastructure.ResponseType
+import enlighten.commissioning.infrastructure.Success
+import enlighten.commissioning.infrastructure.toMultiValue
+
+class GridProfilesApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v4")
+ }
+ }
+
+ /**
+ * Lists the available profiles
+ * Lists the available profiles.
+ * @return GetGridProfilesResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getGridProfiles() : GetGridProfilesResponse {
+ val localVarResponse = getGridProfilesWithHttpInfo()
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GetGridProfilesResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Lists the available profiles
+ * Lists the available profiles.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getGridProfilesWithHttpInfo() : ApiResponse {
+ val localVariableConfig = getGridProfilesRequestConfig()
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getGridProfiles
+ *
+ * @return RequestConfig
+ */
+ fun getGridProfilesRequestConfig() : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/partner/grid_profiles",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+
+ private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
+ HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
+}
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/HomeOwnerApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/HomeOwnerApi.kt
new file mode 100644
index 00000000..d5ac848c
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/HomeOwnerApi.kt
@@ -0,0 +1,127 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.commissioning.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.commissioning.models.CreateUserRequest
+import enlighten.commissioning.models.ServerError
+import enlighten.commissioning.models.TooManyRequestsError
+import enlighten.commissioning.models.UnprocessableEntityError
+import enlighten.commissioning.models.User
+
+import com.squareup.moshi.Json
+
+import enlighten.commissioning.infrastructure.ApiClient
+import enlighten.commissioning.infrastructure.ApiResponse
+import enlighten.commissioning.infrastructure.ClientException
+import enlighten.commissioning.infrastructure.ClientError
+import enlighten.commissioning.infrastructure.ServerException
+import enlighten.commissioning.infrastructure.ServerError
+import enlighten.commissioning.infrastructure.MultiValueMap
+import enlighten.commissioning.infrastructure.PartConfig
+import enlighten.commissioning.infrastructure.RequestConfig
+import enlighten.commissioning.infrastructure.RequestMethod
+import enlighten.commissioning.infrastructure.ResponseType
+import enlighten.commissioning.infrastructure.Success
+import enlighten.commissioning.infrastructure.toMultiValue
+
+class HomeOwnerApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v4")
+ }
+ }
+
+ /**
+ * Create Home owner
+ * Create a home owner user. Email, first name, and last name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored. Pass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields. Using this API to create both homeowner as well as a company user. If you want to create company user, then pass company_id inside the user object.
+ * @param params (optional)
+ * @return User
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun createUser(params: CreateUserRequest? = null) : User {
+ val localVarResponse = createUserWithHttpInfo(params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as User
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Create Home owner
+ * Create a home owner user. Email, first name, and last name are mandatory fields in the user. Any unneeded fields passed in the request parameter will be skipped and not stored. Pass body param in 'application/x-www-form-urlencoded' format, in this endpoint, key will be 'user' and value will be a JSON dictionary of user fields. Using this API to create both homeowner as well as a company user. If you want to create company user, then pass company_id inside the user object.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun createUserWithHttpInfo(params: CreateUserRequest?) : ApiResponse {
+ val localVariableConfig = createUserRequestConfig(params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation createUser
+ *
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun createUserRequestConfig(params: CreateUserRequest?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Content-Type"] = "application/json"
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.POST,
+ path = "/users",
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+
+ private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
+ HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
+}
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/MetersApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/MetersApi.kt
new file mode 100644
index 00000000..b8101455
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/MetersApi.kt
@@ -0,0 +1,291 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.commissioning.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.commissioning.models.GetSystemMeterResponse
+import enlighten.commissioning.models.ServerError
+import enlighten.commissioning.models.SetActivationMeterStatusRequest
+import enlighten.commissioning.models.SetActivationMeterStatusResponse
+import enlighten.commissioning.models.TooManyRequestsError
+import enlighten.commissioning.models.UnprocessableEntityError
+import enlighten.commissioning.models.UpdateSystemMeterResponse
+
+import com.squareup.moshi.Json
+
+import enlighten.commissioning.infrastructure.ApiClient
+import enlighten.commissioning.infrastructure.ApiResponse
+import enlighten.commissioning.infrastructure.ClientException
+import enlighten.commissioning.infrastructure.ClientError
+import enlighten.commissioning.infrastructure.ServerException
+import enlighten.commissioning.infrastructure.ServerError
+import enlighten.commissioning.infrastructure.MultiValueMap
+import enlighten.commissioning.infrastructure.PartConfig
+import enlighten.commissioning.infrastructure.RequestConfig
+import enlighten.commissioning.infrastructure.RequestMethod
+import enlighten.commissioning.infrastructure.ResponseType
+import enlighten.commissioning.infrastructure.Success
+import enlighten.commissioning.infrastructure.toMultiValue
+
+class MetersApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v4")
+ }
+ }
+
+ /**
+ * Returns the requested meter detail.
+ * Returns the requested meter by serial number. You must have access to the requested system and meter; otherwise a 401 is returned.
+ * @param systemId System ID.
+ * @param serialNumber Meter serial number.
+ * @return GetSystemMeterResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getSystemMeter(systemId: kotlin.Int, serialNumber: kotlin.String) : GetSystemMeterResponse {
+ val localVarResponse = getSystemMeterWithHttpInfo(systemId = systemId, serialNumber = serialNumber)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemMeterResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Returns the requested meter detail.
+ * Returns the requested meter by serial number. You must have access to the requested system and meter; otherwise a 401 is returned.
+ * @param systemId System ID.
+ * @param serialNumber Meter serial number.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getSystemMeterWithHttpInfo(systemId: kotlin.Int, serialNumber: kotlin.String) : ApiResponse {
+ val localVariableConfig = getSystemMeterRequestConfig(systemId = systemId, serialNumber = serialNumber)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getSystemMeter
+ *
+ * @param systemId System ID.
+ * @param serialNumber Meter serial number.
+ * @return RequestConfig
+ */
+ fun getSystemMeterRequestConfig(systemId: kotlin.Int, serialNumber: kotlin.String) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.GET,
+ path = "/systems/{system_id}/meters/{serial_number}".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())).replace("{"+"serial_number"+"}", encodeURIComponent(serialNumber.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Enable or Disable the meters.
+ * Enable or Disable the meters. You must have access to the requested system and meter; otherwise a 401 is returned.
+ * @param activationId Activation ID.
+ * @param serialNumber Meter serial number.
+ * @param params (optional)
+ * @return SetActivationMeterStatusResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun setActivationMeterStatus(activationId: kotlin.Int, serialNumber: kotlin.String, params: SetActivationMeterStatusRequest? = null) : SetActivationMeterStatusResponse {
+ val localVarResponse = setActivationMeterStatusWithHttpInfo(activationId = activationId, serialNumber = serialNumber, params = params)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as SetActivationMeterStatusResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Enable or Disable the meters.
+ * Enable or Disable the meters. You must have access to the requested system and meter; otherwise a 401 is returned.
+ * @param activationId Activation ID.
+ * @param serialNumber Meter serial number.
+ * @param params (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun setActivationMeterStatusWithHttpInfo(activationId: kotlin.Int, serialNumber: kotlin.String, params: SetActivationMeterStatusRequest?) : ApiResponse {
+ val localVariableConfig = setActivationMeterStatusRequestConfig(activationId = activationId, serialNumber = serialNumber, params = params)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation setActivationMeterStatus
+ *
+ * @param activationId Activation ID.
+ * @param serialNumber Meter serial number.
+ * @param params (optional)
+ * @return RequestConfig
+ */
+ fun setActivationMeterStatusRequestConfig(activationId: kotlin.Int, serialNumber: kotlin.String, params: SetActivationMeterStatusRequest?) : RequestConfig {
+ val localVariableBody = params
+ val localVariableQuery: MultiValueMap = mutableMapOf()
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Content-Type"] = "application/json"
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.POST,
+ path = "/activations/{activation_id}/meters/{serial_number}/meter_control".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())).replace("{"+"serial_number"+"}", encodeURIComponent(serialNumber.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+ /**
+ * Update the operational date of a meter by serial number.
+ * Update the operational date of a meter. You must have access to the requested system and meter; otherwise a 401 is returned.
+ * @param systemId System ID.
+ * @param serialNumber Meter serial number.
+ * @param operationalDate Operational date in the following format YYYY-MM-DD. (optional)
+ * @return UpdateSystemMeterResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun updateSystemMeter(systemId: kotlin.Int, serialNumber: kotlin.String, operationalDate: java.time.LocalDate? = null) : UpdateSystemMeterResponse {
+ val localVarResponse = updateSystemMeterWithHttpInfo(systemId = systemId, serialNumber = serialNumber, operationalDate = operationalDate)
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as UpdateSystemMeterResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Update the operational date of a meter by serial number.
+ * Update the operational date of a meter. You must have access to the requested system and meter; otherwise a 401 is returned.
+ * @param systemId System ID.
+ * @param serialNumber Meter serial number.
+ * @param operationalDate Operational date in the following format YYYY-MM-DD. (optional)
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun updateSystemMeterWithHttpInfo(systemId: kotlin.Int, serialNumber: kotlin.String, operationalDate: java.time.LocalDate?) : ApiResponse {
+ val localVariableConfig = updateSystemMeterRequestConfig(systemId = systemId, serialNumber = serialNumber, operationalDate = operationalDate)
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation updateSystemMeter
+ *
+ * @param systemId System ID.
+ * @param serialNumber Meter serial number.
+ * @param operationalDate Operational date in the following format YYYY-MM-DD. (optional)
+ * @return RequestConfig
+ */
+ fun updateSystemMeterRequestConfig(systemId: kotlin.Int, serialNumber: kotlin.String, operationalDate: java.time.LocalDate?) : RequestConfig {
+ val localVariableBody = null
+ val localVariableQuery: MultiValueMap = mutableMapOf>()
+ .apply {
+ if (operationalDate != null) {
+ put("operational_date", listOf(parseDateToQueryString(operationalDate)))
+ }
+ }
+ val localVariableHeaders: MutableMap = mutableMapOf()
+ localVariableHeaders["Accept"] = "application/json"
+
+ return RequestConfig(
+ method = RequestMethod.PUT,
+ path = "/systems/{system_id}/meters/{serial_number}".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())).replace("{"+"serial_number"+"}", encodeURIComponent(serialNumber.toString())),
+ query = localVariableQuery,
+ headers = localVariableHeaders,
+ requiresAuthentication = true,
+ body = localVariableBody
+ )
+ }
+
+
+ private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
+ HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
+}
diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/PvManufacturersApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/PvManufacturersApi.kt
new file mode 100644
index 00000000..ecaf7beb
--- /dev/null
+++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/PvManufacturersApi.kt
@@ -0,0 +1,121 @@
+/**
+ *
+ * Please note:
+ * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit this file manually.
+ *
+ */
+
+@file:Suppress(
+ "ArrayInDataClass",
+ "EnumEntryName",
+ "RemoveRedundantQualifierName",
+ "UnusedImport"
+)
+
+package enlighten.commissioning.apis
+
+import java.io.IOException
+import okhttp3.OkHttpClient
+import okhttp3.HttpUrl
+
+import enlighten.commissioning.models.GetPvManufacturersResponse
+import enlighten.commissioning.models.ServerError
+import enlighten.commissioning.models.TooManyRequestsError
+
+import com.squareup.moshi.Json
+
+import enlighten.commissioning.infrastructure.ApiClient
+import enlighten.commissioning.infrastructure.ApiResponse
+import enlighten.commissioning.infrastructure.ClientException
+import enlighten.commissioning.infrastructure.ClientError
+import enlighten.commissioning.infrastructure.ServerException
+import enlighten.commissioning.infrastructure.ServerError
+import enlighten.commissioning.infrastructure.MultiValueMap
+import enlighten.commissioning.infrastructure.PartConfig
+import enlighten.commissioning.infrastructure.RequestConfig
+import enlighten.commissioning.infrastructure.RequestMethod
+import enlighten.commissioning.infrastructure.ResponseType
+import enlighten.commissioning.infrastructure.Success
+import enlighten.commissioning.infrastructure.toMultiValue
+
+class PvManufacturersApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
+ companion object {
+ @JvmStatic
+ val defaultBasePath: String by lazy {
+ System.getProperties().getProperty(ApiClient.baseUrlKey, "https://api.enphaseenergy.com/api/v4")
+ }
+ }
+
+ /**
+ * Returns PV module manufacturers
+ * Returns information about the PV module manufacturers known in Enlighten.
+ * @return GetPvManufacturersResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ * @throws UnsupportedOperationException If the API returns an informational or redirection response
+ * @throws ClientException If the API returns a client error response
+ * @throws ServerException If the API returns a server error response
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
+ fun getPvManufacturers() : GetPvManufacturersResponse {
+ val localVarResponse = getPvManufacturersWithHttpInfo()
+
+ return when (localVarResponse.responseType) {
+ ResponseType.Success -> (localVarResponse as Success<*>).data as GetPvManufacturersResponse
+ ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
+ ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
+ ResponseType.ClientError -> {
+ val localVarError = localVarResponse as ClientError<*>
+ throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
+ }
+ ResponseType.ServerError -> {
+ val localVarError = localVarResponse as ServerError<*>
+ throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
+ }
+ }
+ }
+
+ /**
+ * Returns PV module manufacturers
+ * Returns information about the PV module manufacturers known in Enlighten.
+ * @return ApiResponse
+ * @throws IllegalStateException If the request is not correctly configured
+ * @throws IOException Rethrows the OkHttp execute method exception
+ */
+ @Suppress("UNCHECKED_CAST")
+ @Throws(IllegalStateException::class, IOException::class)
+ fun getPvManufacturersWithHttpInfo() : ApiResponse {
+ val localVariableConfig = getPvManufacturersRequestConfig()
+
+ return request(
+ localVariableConfig
+ )
+ }
+
+ /**
+ * To obtain the request config of the operation getPvManufacturers
+ *
+ * @return RequestConfig
+ */
+ fun getPvManufacturersRequestConfig() : RequestConfig