From 0926641aa72eaf60bfdc27ff2b7cf8fe7714d678 Mon Sep 17 00:00:00 2001 From: alarvi Date: Sun, 30 Jun 2024 19:06:04 +0200 Subject: [PATCH] Generate kotlin v4 client --- .../commissioning/.openapi-generator-ignore | 23 + kotlin/commissioning/.openapi-generator/FILES | 132 ++ .../commissioning/.openapi-generator/VERSION | 1 + kotlin/commissioning/README.md | 116 ++ kotlin/commissioning/build.gradle | 62 + kotlin/commissioning/docs/Activation.md | 59 + .../docs/ActivationEnchargeInner.md | 11 + .../docs/ActivationEnpowerInner.md | 11 + kotlin/commissioning/docs/ActivationHost.md | 21 + .../docs/ActivationHostCompany.md | 14 + kotlin/commissioning/docs/ActivationOwner.md | 21 + .../docs/ActivationOwnerCompany.md | 14 + kotlin/commissioning/docs/ActivationsApi.md | 511 +++++++ kotlin/commissioning/docs/Address.md | 17 + kotlin/commissioning/docs/ArrayParams.md | 17 + .../docs/ArrayParamsModulesInner.md | 14 + kotlin/commissioning/docs/ArraysApi.md | 283 ++++ kotlin/commissioning/docs/ClientError.md | 11 + kotlin/commissioning/docs/CompaniesApi.md | 328 +++++ kotlin/commissioning/docs/Company.md | 14 + kotlin/commissioning/docs/CompanyRoleEnum.md | 10 + kotlin/commissioning/docs/ConflictError.md | 22 + kotlin/commissioning/docs/ConnectionType.md | 14 + .../docs/ConsumptionLifetimeResponse.md | 13 + .../docs/ConsumptionStatsResponse.md | 13 + .../ConsumptionStatsResponseIntervalsInner.md | 12 + .../docs/CreateCompanyUserRequest.md | 14 + .../commissioning/docs/CreateUserRequest.md | 16 + kotlin/commissioning/docs/DefaultApi.md | 751 ++++++++++ .../docs/DeleteActivationResponse.md | 10 + .../docs/DeleteSystemArrayResponse.md | 10 + .../docs/EnergyLifetimeResponse.md | 16 + kotlin/commissioning/docs/EnvoysResponse.md | 11 + .../docs/EnvoysResponseEnvoysInner.md | 22 + kotlin/commissioning/docs/EstimateApi.md | 116 ++ .../GetActivationOpsProductionModeResponse.md | 12 + .../docs/GetCompanyUsersResponse.md | 10 + .../docs/GetCompanyUsersResponseUsersInner.md | 9 + .../docs/GetGridProfilesResponse.md | 10 + ...etGridProfilesResponseGridProfilesInner.md | 21 + .../docs/GetPartnerActivationsResponse.md | 11 + ...tPartnerActivationsResponseSystemsInner.md | 32 + ...stemsInnerAuthorizedSubcontractorsInner.md | 12 + .../docs/GetPvManufacturerModelsResponse.md | 11 + ...nufacturerModelsResponsePvManufacturers.md | 11 + .../docs/GetPvManufacturersResponse.md | 10 + ...CompanyAuthorizedSubcontractorsResponse.md | 12 + ...rsResponseAuthorizedSubcontractorsInner.md | 15 + .../docs/GetSelfCompanyBranchesResponse.md | 12 + ...elfCompanyBranchesResponseBranchesInner.md | 14 + .../docs/GetSystemMeterResponse.md | 20 + .../docs/GrantActivationUserAccessResponse.md | 10 + kotlin/commissioning/docs/GridProfilesApi.md | 57 + kotlin/commissioning/docs/HomeOwnerApi.md | 61 + .../commissioning/docs/InventoryResponse.md | 14 + .../docs/InventoryResponseEnvoysInner.md | 12 + .../docs/InventoryResponseMetersInner.md | 14 + .../InvertersSummaryByEnvoyOrSiteResponse.md | 11 + ...yEnvoyOrSiteResponseMicroInvertersInner.md | 29 + ...OrSiteResponseMicroInvertersInnerEnergy.md | 19 + ...esponseMicroInvertersInnerPowerProduced.md | 19 + kotlin/commissioning/docs/Meta.md | 13 + kotlin/commissioning/docs/MetersApi.md | 177 +++ .../docs/MonthlyProductionResponse.md | 15 + ...hlyProductionResponseMeterReadingsInner.md | 12 + kotlin/commissioning/docs/NotFoundError.md | 12 + .../docs/ProductionMeterReadingsResponse.md | 12 + ...MeterReadingsResponseMeterReadingsInner.md | 12 + .../commissioning/docs/PvManufacturersApi.md | 57 + kotlin/commissioning/docs/PvModelsApi.md | 61 + .../RevokeActivationUserAccessResponse.md | 10 + kotlin/commissioning/docs/RgmStatsResponse.md | 14 + .../docs/RgmStatsResponseIntervalsInner.md | 12 + .../RgmStatsResponseMeterIntervalsInner.md | 12 + ...sponseMeterIntervalsInnerIntervalsInner.md | 13 + .../docs/SearchSystemIdResponse.md | 10 + .../commissioning/docs/SearchUsersResponse.md | 11 + kotlin/commissioning/docs/ServerError.md | 11 + .../docs/SetActivationMeterStatusRequest.md | 10 + .../docs/SetActivationMeterStatusResponse.md | 11 + .../SetActivationOpsProductionModeRequest.md | 10 + .../SetActivationOpsProductionModeResponse.md | 10 + kotlin/commissioning/docs/StatsResponse.md | 13 + .../docs/StatsResponseIntervalsInner.md | 13 + kotlin/commissioning/docs/Status.md | 24 + kotlin/commissioning/docs/SummaryResponse.md | 28 + kotlin/commissioning/docs/SystemArray.md | 19 + .../docs/SystemArrayModulesInner.md | 14 + .../commissioning/docs/SystemArrayTypeEnum.md | 18 + kotlin/commissioning/docs/SystemArrays.md | 17 + .../docs/SystemArraysInventoryDetailsInner.md | 12 + .../docs/SystemArraysLayersInner.md | 17 + .../docs/SystemAttachmentTypeEnum.md | 20 + kotlin/commissioning/docs/SystemEstimate.md | 12 + kotlin/commissioning/docs/SystemExpandEnum.md | 16 + .../docs/SystemInternetConnectionEnum.md | 16 + .../docs/SystemMeterStatusEnum.md | 12 + kotlin/commissioning/docs/SystemParams.md | 49 + .../commissioning/docs/SystemParamsAddress.md | 15 + .../docs/SystemParamsEnchargeInner.md | 11 + .../docs/SystemParamsEnpowerInner.md | 11 + .../docs/SystemProductionModeEnum.md | 12 + kotlin/commissioning/docs/SystemSourceEnum.md | 12 + kotlin/commissioning/docs/SystemStageEnum.md | 20 + kotlin/commissioning/docs/SystemTypeEnum.md | 14 + kotlin/commissioning/docs/SystemsResponse.md | 11 + .../docs/SystemsResponseSystemsInner.md | 29 + kotlin/commissioning/docs/TariffApi.md | 114 ++ .../commissioning/docs/TariffSeasonsInner.md | 14 + .../docs/TariffSeasonsInnerDaysInner.md | 14 + ...TariffSeasonsInnerDaysInnerPeriodsInner.md | 13 + kotlin/commissioning/docs/TariffSettings.md | 11 + .../docs/TariffSettingsTariff.md | 13 + .../docs/TariffSettingsTariffCurrencyType.md | 10 + .../docs/TariffSettingsTariffSingleRate.md | 11 + .../docs/TooManyRequestsError.md | 15 + .../docs/UnprocessableEntityError.md | 18 + .../docs/UpdateActivationEstimateRequest.md | 11 + .../docs/UpdateCompanyUserRequest.md | 15 + .../docs/UpdateSystemArraysRequest.md | 11 + .../docs/UpdateSystemMeterResponse.md | 14 + .../UpdateSystemTariffSettingsResponse.md | 10 + .../UpdateSystemTariffSettingsResponseTask.md | 11 + kotlin/commissioning/docs/User.md | 21 + kotlin/commissioning/docs/UserExpandEnum.md | 10 + kotlin/commissioning/docs/UserParams.md | 16 + kotlin/commissioning/docs/UserRoleEnum.md | 10 + kotlin/commissioning/docs/UsersApi.md | 338 +++++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43462 bytes .../gradle/wrapper/gradle-wrapper.properties | 7 + kotlin/commissioning/gradlew | 249 ++++ kotlin/commissioning/gradlew.bat | 249 ++++ kotlin/commissioning/settings.gradle | 1 + .../main/kotlin/enlighten/apis/DefaultApi.kt | 1248 +++++++++++++++++ .../commissioning/apis/ActivationsApi.kt | 779 ++++++++++ .../enlighten/commissioning/apis/ArraysApi.kt | 428 ++++++ .../commissioning/apis/CompaniesApi.kt | 502 +++++++ .../commissioning/apis/EstimateApi.kt | 201 +++ .../commissioning/apis/GridProfilesApi.kt | 121 ++ .../commissioning/apis/HomeOwnerApi.kt | 127 ++ .../enlighten/commissioning/apis/MetersApi.kt | 291 ++++ .../commissioning/apis/PvManufacturersApi.kt | 121 ++ .../commissioning/apis/PvModelsApi.kt | 124 ++ .../enlighten/commissioning/apis/TariffApi.kt | 199 +++ .../enlighten/commissioning/apis/UsersApi.kt | 523 +++++++ .../infrastructure/ApiAbstractions.kt | 23 + .../commissioning/infrastructure/ApiClient.kt | 272 ++++ .../infrastructure/ApiResponse.kt | 43 + .../infrastructure/BigDecimalAdapter.kt | 17 + .../infrastructure/BigIntegerAdapter.kt | 17 + .../infrastructure/ByteArrayAdapter.kt | 12 + .../commissioning/infrastructure/Errors.kt | 18 + .../infrastructure/LocalDateAdapter.kt | 19 + .../infrastructure/LocalDateTimeAdapter.kt | 19 + .../infrastructure/OffsetDateTimeAdapter.kt | 19 + .../infrastructure/PartConfig.kt | 11 + .../infrastructure/RequestConfig.kt | 19 + .../infrastructure/RequestMethod.kt | 8 + .../infrastructure/ResponseExtensions.kt | 24 + .../infrastructure/Serializer.kt | 23 + .../infrastructure/URIAdapter.kt | 13 + .../infrastructure/UUIDAdapter.kt | 13 + .../commissioning/models/Activation.kt | 282 ++++ .../models/ActivationEnchargeInner.kt | 41 + .../models/ActivationEnpowerInner.kt | 41 + .../commissioning/models/ActivationHost.kt | 83 ++ .../models/ActivationHostCompany.kt | 53 + .../commissioning/models/ActivationOwner.kt | 83 ++ .../models/ActivationOwnerCompany.kt | 53 + .../enlighten/commissioning/models/Address.kt | 71 + .../commissioning/models/ArrayParams.kt | 71 + .../models/ArrayParamsModulesInner.kt | 56 + .../enlighten/commissioning/models/Company.kt | 57 + .../commissioning/models/CompanyRoleEnum.kt | 60 + .../models/CreateCompanyUserRequest.kt | 56 + .../commissioning/models/CreateUserRequest.kt | 66 + .../models/DeleteActivationResponse.kt | 35 + .../models/DeleteSystemArrayResponse.kt | 35 + .../GetActivationOpsProductionModeResponse.kt | 45 + .../models/GetCompanyUsersResponse.kt | 37 + .../GetCompanyUsersResponseUsersInner.kt | 31 + .../models/GetGridProfilesResponse.kt | 36 + ...etGridProfilesResponseGridProfilesInner.kt | 89 ++ .../models/GetPartnerActivationsResponse.kt | 42 + ...tPartnerActivationsResponseSystemsInner.kt | 147 ++ ...stemsInnerAuthorizedSubcontractorsInner.kt | 46 + .../models/GetPvManufacturerModelsResponse.kt | 42 + ...nufacturerModelsResponsePvManufacturers.kt | 41 + .../models/GetPvManufacturersResponse.kt | 37 + ...CompanyAuthorizedSubcontractorsResponse.kt | 47 + ...rsResponseAuthorizedSubcontractorsInner.kt | 61 + .../models/GetSelfCompanyBranchesResponse.kt | 47 + ...elfCompanyBranchesResponseBranchesInner.kt | 57 + .../models/GetSystemMeterResponse.kt | 86 ++ .../GrantActivationUserAccessResponse.kt | 35 + .../RevokeActivationUserAccessResponse.kt | 35 + .../models/SearchUsersResponse.kt | 41 + .../commissioning/models/ServerError.kt | 39 + .../models/SetActivationMeterStatusRequest.kt | 36 + .../SetActivationMeterStatusResponse.kt | 39 + .../SetActivationOpsProductionModeRequest.kt | 36 + .../SetActivationOpsProductionModeResponse.kt | 35 + .../commissioning/models/SystemArray.kt | 81 ++ .../models/SystemArrayModulesInner.kt | 56 + .../models/SystemArrayTypeEnum.kt | 72 + .../commissioning/models/SystemArrays.kt | 71 + .../SystemArraysInventoryDetailsInner.kt | 46 + .../models/SystemArraysLayersInner.kt | 71 + .../models/SystemAttachmentTypeEnum.kt | 75 + .../commissioning/models/SystemEstimate.kt | 46 + .../commissioning/models/SystemExpandEnum.kt | 69 + .../models/SystemInternetConnectionEnum.kt | 69 + .../models/SystemMeterStatusEnum.kt | 63 + .../commissioning/models/SystemParams.kt | 232 +++ .../models/SystemParamsAddress.kt | 55 + .../models/SystemParamsEnchargeInner.kt | 41 + .../models/SystemParamsEnpowerInner.kt | 41 + .../models/SystemProductionModeEnum.kt | 63 + .../commissioning/models/SystemSourceEnum.kt | 63 + .../commissioning/models/SystemStageEnum.kt | 75 + .../commissioning/models/SystemTypeEnum.kt | 66 + .../models/TariffSeasonsInner.kt | 55 + .../models/TariffSeasonsInnerDaysInner.kt | 57 + ...TariffSeasonsInnerDaysInnerPeriodsInner.kt | 51 + .../commissioning/models/TariffSettings.kt | 41 + .../models/TariffSettingsTariff.kt | 52 + .../TariffSettingsTariffCurrencyType.kt | 36 + .../models/TariffSettingsTariffSingleRate.kt | 41 + .../models/TooManyRequestsError.kt | 60 + .../models/UnprocessableEntityError.kt | 39 + .../models/UpdateActivationEstimateRequest.kt | 41 + .../models/UpdateCompanyUserRequest.kt | 62 + .../models/UpdateSystemArraysRequest.kt | 41 + .../models/UpdateSystemMeterResponse.kt | 56 + .../UpdateSystemTariffSettingsResponse.kt | 36 + .../UpdateSystemTariffSettingsResponseTask.kt | 41 + .../enlighten/commissioning/models/User.kt | 92 ++ .../commissioning/models/UserExpandEnum.kt | 60 + .../commissioning/models/UserParams.kt | 67 + .../commissioning/models/UserRoleEnum.kt | 60 + .../infrastructure/ApiAbstractions.kt | 23 + .../enlighten/infrastructure/ApiClient.kt | 267 ++++ .../enlighten/infrastructure/ApiResponse.kt | 43 + .../infrastructure/BigDecimalAdapter.kt | 17 + .../infrastructure/BigIntegerAdapter.kt | 17 + .../infrastructure/ByteArrayAdapter.kt | 12 + .../kotlin/enlighten/infrastructure/Errors.kt | 18 + .../infrastructure/LocalDateAdapter.kt | 19 + .../infrastructure/LocalDateTimeAdapter.kt | 19 + .../infrastructure/OffsetDateTimeAdapter.kt | 19 + .../enlighten/infrastructure/PartConfig.kt | 11 + .../enlighten/infrastructure/RequestConfig.kt | 19 + .../enlighten/infrastructure/RequestMethod.kt | 8 + .../infrastructure/ResponseExtensions.kt | 24 + .../enlighten/infrastructure/Serializer.kt | 23 + .../enlighten/infrastructure/URIAdapter.kt | 13 + .../enlighten/infrastructure/UUIDAdapter.kt | 13 + .../kotlin/enlighten/models/ClientError.kt | 39 + .../kotlin/enlighten/models/ConflictError.kt | 68 + .../kotlin/enlighten/models/ConnectionType.kt | 66 + .../models/ConsumptionLifetimeResponse.kt | 51 + .../models/ConsumptionStatsResponse.kt | 52 + .../ConsumptionStatsResponseIntervalsInner.kt | 46 + .../models/EnergyLifetimeResponse.kt | 64 + .../kotlin/enlighten/models/EnvoysResponse.kt | 42 + .../models/EnvoysResponseEnvoysInner.kt | 73 + .../enlighten/models/InventoryResponse.kt | 58 + .../models/InventoryResponseEnvoysInner.kt | 43 + .../models/InventoryResponseMetersInner.kt | 51 + .../InvertersSummaryByEnvoyOrSiteResponse.kt | 41 + ...yEnvoyOrSiteResponseMicroInvertersInner.kt | 104 ++ ...OrSiteResponseMicroInvertersInnerEnergy.kt | 55 + ...esponseMicroInvertersInnerPowerProduced.kt | 54 + .../src/main/kotlin/enlighten/models/Meta.kt | 48 + .../models/MonthlyProductionResponse.kt | 62 + ...hlyProductionResponseMeterReadingsInner.kt | 43 + .../kotlin/enlighten/models/NotFoundError.kt | 43 + .../models/ProductionMeterReadingsResponse.kt | 45 + ...MeterReadingsResponseMeterReadingsInner.kt | 46 + .../enlighten/models/RgmStatsResponse.kt | 58 + .../models/RgmStatsResponseIntervalsInner.kt | 46 + .../RgmStatsResponseMeterIntervalsInner.kt | 47 + ...sponseMeterIntervalsInnerIntervalsInner.kt | 51 + .../models/SearchSystemIdResponse.kt | 36 + .../kotlin/enlighten/models/ServerError.kt | 39 + .../kotlin/enlighten/models/StatsResponse.kt | 52 + .../models/StatsResponseIntervalsInner.kt | 51 + .../main/kotlin/enlighten/models/Status.kt | 81 ++ .../enlighten/models/SummaryResponse.kt | 103 ++ .../enlighten/models/SystemsResponse.kt | 40 + .../models/SystemsResponseSystemsInner.kt | 115 ++ .../models/UnprocessableEntityError.kt | 67 + .../kotlin/enlighten/apis/DefaultApiTest.kt | 193 +++ .../commissioning/apis/ActivationsApiTest.kt | 128 ++ .../commissioning/apis/ArraysApiTest.kt | 82 ++ .../commissioning/apis/CompaniesApiTest.kt | 90 ++ .../commissioning/apis/EstimateApiTest.kt | 51 + .../commissioning/apis/GridProfilesApiTest.kt | 39 + .../commissioning/apis/HomeOwnerApiTest.kt | 42 + .../commissioning/apis/MetersApiTest.kt | 65 + .../apis/PvManufacturersApiTest.kt | 39 + .../commissioning/apis/PvModelsApiTest.kt | 40 + .../commissioning/apis/TariffApiTest.kt | 50 + .../commissioning/apis/UsersApiTest.kt | 90 ++ .../models/ActivationEnchargeInnerTest.kt | 41 + .../models/ActivationEnpowerInnerTest.kt | 41 + .../models/ActivationHostCompanyTest.kt | 60 + .../models/ActivationHostTest.kt | 103 ++ .../models/ActivationOwnerCompanyTest.kt | 60 + .../models/ActivationOwnerTest.kt | 103 ++ .../commissioning/models/ActivationTest.kt | 341 +++++ .../commissioning/models/AddressTest.kt | 77 + .../models/ArrayParamsModulesInnerTest.kt | 59 + .../commissioning/models/ArrayParamsTest.kt | 78 ++ .../models/CompanyRoleEnumTest.kt | 29 + .../commissioning/models/CompanyTest.kt | 60 + .../models/CreateCompanyUserRequestTest.kt | 59 + .../models/CreateUserRequestTest.kt | 71 + .../models/DeleteActivationResponseTest.kt | 35 + .../models/DeleteSystemArrayResponseTest.kt | 35 + ...ActivationOpsProductionModeResponseTest.kt | 47 + .../models/GetCompanyUsersResponseTest.kt | 36 + .../GetCompanyUsersResponseUsersInnerTest.kt | 29 + ...idProfilesResponseGridProfilesInnerTest.kt | 101 ++ .../models/GetGridProfilesResponseTest.kt | 36 + ...sInnerAuthorizedSubcontractorsInnerTest.kt | 47 + ...tnerActivationsResponseSystemsInnerTest.kt | 171 +++ .../GetPartnerActivationsResponseTest.kt | 42 + ...cturerModelsResponsePvManufacturersTest.kt | 41 + .../GetPvManufacturerModelsResponseTest.kt | 43 + .../models/GetPvManufacturersResponseTest.kt | 36 + ...sponseAuthorizedSubcontractorsInnerTest.kt | 66 + ...anyAuthorizedSubcontractorsResponseTest.kt | 48 + ...ompanyBranchesResponseBranchesInnerTest.kt | 60 + .../GetSelfCompanyBranchesResponseTest.kt | 48 + .../models/GetSystemMeterResponseTest.kt | 95 ++ .../GrantActivationUserAccessResponseTest.kt | 35 + .../RevokeActivationUserAccessResponseTest.kt | 35 + .../models/SearchUsersResponseTest.kt | 41 + .../commissioning/models/ServerErrorTest.kt | 41 + .../SetActivationMeterStatusRequestTest.kt | 36 + .../SetActivationMeterStatusResponseTest.kt | 41 + ...tActivationOpsProductionModeRequestTest.kt | 36 + ...ActivationOpsProductionModeResponseTest.kt | 35 + .../models/SystemArrayModulesInnerTest.kt | 59 + .../commissioning/models/SystemArrayTest.kt | 90 ++ .../models/SystemArrayTypeEnumTest.kt | 29 + .../SystemArraysInventoryDetailsInnerTest.kt | 47 + .../models/SystemArraysLayersInnerTest.kt | 77 + .../commissioning/models/SystemArraysTest.kt | 80 ++ .../models/SystemAttachmentTypeEnumTest.kt | 29 + .../models/SystemEstimateTest.kt | 47 + .../models/SystemExpandEnumTest.kt | 29 + .../SystemInternetConnectionEnumTest.kt | 29 + .../models/SystemMeterStatusEnumTest.kt | 29 + .../models/SystemParamsAddressTest.kt | 65 + .../models/SystemParamsEnchargeInnerTest.kt | 41 + .../models/SystemParamsEnpowerInnerTest.kt | 41 + .../commissioning/models/SystemParamsTest.kt | 278 ++++ .../models/SystemProductionModeEnumTest.kt | 29 + .../models/SystemSourceEnumTest.kt | 29 + .../models/SystemStageEnumTest.kt | 29 + .../models/SystemTypeEnumTest.kt | 29 + ...ffSeasonsInnerDaysInnerPeriodsInnerTest.kt | 53 + .../models/TariffSeasonsInnerDaysInnerTest.kt | 60 + .../models/TariffSeasonsInnerTest.kt | 60 + .../TariffSettingsTariffCurrencyTypeTest.kt | 35 + .../TariffSettingsTariffSingleRateTest.kt | 41 + .../models/TariffSettingsTariffTest.kt | 56 + .../models/TariffSettingsTest.kt | 43 + .../models/TooManyRequestsErrorTest.kt | 65 + .../models/UnprocessableEntityErrorTest.kt | 41 + .../UpdateActivationEstimateRequestTest.kt | 41 + .../models/UpdateCompanyUserRequestTest.kt | 65 + .../models/UpdateSystemArraysRequestTest.kt | 42 + .../models/UpdateSystemMeterResponseTest.kt | 59 + ...ateSystemTariffSettingsResponseTaskTest.kt | 41 + .../UpdateSystemTariffSettingsResponseTest.kt | 36 + .../models/UserExpandEnumTest.kt | 29 + .../commissioning/models/UserParamsTest.kt | 71 + .../commissioning/models/UserRoleEnumTest.kt | 29 + .../commissioning/models/UserTest.kt | 103 ++ .../enlighten/models/ClientErrorTest.kt | 41 + .../enlighten/models/ConflictErrorTest.kt | 65 + .../enlighten/models/ConnectionTypeTest.kt | 29 + .../models/ConsumptionLifetimeResponseTest.kt | 54 + ...sumptionStatsResponseIntervalsInnerTest.kt | 47 + .../models/ConsumptionStatsResponseTest.kt | 55 + .../models/EnergyLifetimeResponseTest.kt | 72 + .../models/EnvoysResponseEnvoysInnerTest.kt | 65 + .../enlighten/models/EnvoysResponseTest.kt | 42 + .../InventoryResponseEnvoysInnerTest.kt | 47 + .../InventoryResponseMetersInnerTest.kt | 59 + .../enlighten/models/InventoryResponseTest.kt | 62 + ...teResponseMicroInvertersInnerEnergyTest.kt | 47 + ...nseMicroInvertersInnerPowerProducedTest.kt | 47 + ...oyOrSiteResponseMicroInvertersInnerTest.kt | 109 ++ ...vertersSummaryByEnvoyOrSiteResponseTest.kt | 42 + .../test/kotlin/enlighten/models/MetaTest.kt | 54 + ...roductionResponseMeterReadingsInnerTest.kt | 47 + .../models/MonthlyProductionResponseTest.kt | 67 + .../enlighten/models/NotFoundErrorTest.kt | 47 + ...rReadingsResponseMeterReadingsInnerTest.kt | 47 + .../ProductionMeterReadingsResponseTest.kt | 49 + .../RgmStatsResponseIntervalsInnerTest.kt | 47 + ...seMeterIntervalsInnerIntervalsInnerTest.kt | 53 + ...RgmStatsResponseMeterIntervalsInnerTest.kt | 48 + .../enlighten/models/RgmStatsResponseTest.kt | 62 + .../models/SearchSystemIdResponseTest.kt | 35 + .../enlighten/models/ServerErrorTest.kt | 41 + .../models/StatsResponseIntervalsInnerTest.kt | 53 + .../enlighten/models/StatsResponseTest.kt | 55 + .../kotlin/enlighten/models/StatusTest.kt | 29 + .../enlighten/models/SummaryResponseTest.kt | 102 ++ .../models/SystemsResponseSystemsInnerTest.kt | 109 ++ .../enlighten/models/SystemsResponseTest.kt | 42 + .../models/UnprocessableEntityErrorTest.kt | 83 ++ kotlin/monitoring/.openapi-generator-ignore | 23 + kotlin/monitoring/.openapi-generator/FILES | 271 ++++ kotlin/monitoring/.openapi-generator/VERSION | 1 + kotlin/monitoring/README.md | 181 +++ kotlin/monitoring/build.gradle | 62 + .../monitoring/docs/BatteryDeviceTelemetry.md | 19 + .../BatteryDeviceTelemetryIntervalsInner.md | 13 + ...teryDeviceTelemetryIntervalsInnerCharge.md | 10 + ...yDeviceTelemetryIntervalsInnerDischarge.md | 10 + ...BatteryDeviceTelemetryIntervalsInnerSoc.md | 10 + kotlin/monitoring/docs/BatterySettings.md | 15 + kotlin/monitoring/docs/ClientError.md | 12 + .../docs/DataTemporarilyUnavailableError.md | 11 + .../DeviceLevelProductionMonitoringApi.md | 185 +++ ...ertersSummaryByEnvoyOrSiteResponseInner.md | 11 + ...yOrSiteResponseInnerMicroInvertersInner.md | 22 + ...eResponseInnerMicroInvertersInnerEnergy.md | 12 + ...seInnerMicroInvertersInnerPowerProduced.md | 12 + .../docs/GetSystemBatteryLifetimeResponse.md | 14 + .../docs/GetSystemBatteryTelemetryResponse.md | 17 + ...mBatteryTelemetryResponseIntervalsInner.md | 13 + ...ryTelemetryResponseIntervalsInnerCharge.md | 11 + ...elemetryResponseIntervalsInnerDischarge.md | 11 + ...tteryTelemetryResponseIntervalsInnerSoc.md | 11 + .../GetSystemConsumptionLifetimeResponse.md | 13 + ...SystemConsumptionMeterTelemetryResponse.md | 17 + ...ionMeterTelemetryResponseIntervalsInner.md | 12 + .../docs/GetSystemDevicesResponse.md | 13 + ...tSystemDevicesResponseDevicesValueInner.md | 22 + ...sResponseDevicesValueInnerCellularModem.md | 14 + .../GetSystemEnergyExportLifetimeResponse.md | 13 + .../GetSystemEnergyExportTelemetryResponse.md | 17 + ...ortTelemetryResponseIntervalsInnerInner.md | 11 + .../GetSystemEnergyImportLifetimeResponse.md | 13 + .../GetSystemEnergyImportTelemetryResponse.md | 17 + ...ortTelemetryResponseIntervalsInnerInner.md | 11 + .../docs/GetSystemEnergyLifetimeResponse.md | 16 + .../GetSystemGridStatusSettingsResponse.md | 12 + .../GetSystemMicroDeviceTelemetryResponse.md | 17 + ...roDeviceTelemetryResponseIntervalsInner.md | 12 + ...etSystemProductionMeterReadingsResponse.md | 12 + ...MeterReadingsResponseMeterReadingsInner.md | 12 + ...tSystemProductionMeterTelemetryResponse.md | 16 + ...ionMeterTelemetryResponseIntervalsInner.md | 12 + ...tSystemProductionMicroTelemetryResponse.md | 17 + ...ionMicroTelemetryResponseIntervalsInner.md | 13 + .../docs/GetSystemRgmStatsResponse.md | 14 + ...GetSystemRgmStatsResponseIntervalsInner.md | 12 + ...stemRgmStatsResponseMeterIntervalsInner.md | 12 + ...sponseMeterIntervalsInnerIntervalsInner.md | 13 + .../docs/GetSystemSummaryResponse.md | 21 + .../monitoring/docs/GetSystems500Response.md | 13 + kotlin/monitoring/docs/GetSystemsResponse.md | 15 + kotlin/monitoring/docs/InternalServerError.md | 11 + kotlin/monitoring/docs/LoadControlSettings.md | 11 + ...LoadControlSettingsLoadControlDataInner.md | 18 + kotlin/monitoring/docs/Meta.md | 13 + .../monitoring/docs/MethodNotAllowedError.md | 11 + kotlin/monitoring/docs/NotImplementedError.md | 12 + .../docs/RetrieveSystemIdResponse.md | 10 + .../monitoring/docs/SearchSystemsRequest.md | 11 + .../docs/SearchSystemsRequestSystem.md | 14 + .../monitoring/docs/SearchSystemsResponse.md | 15 + .../docs/SiteLevelConsumptionMonitoringApi.md | 464 ++++++ .../docs/SiteLevelProductionMonitoringApi.md | 293 ++++ kotlin/monitoring/docs/StormGuardSettings.md | 12 + .../docs/StreamSystemLiveDataError.md | 13 + .../docs/StreamSystemLiveDataErrorError.md | 13 + .../docs/StreamSystemLiveDataResponse.md | 10 + .../docs/StreamSystemLiveDataResponseData.md | 13 + .../StreamSystemLiveDataResponseDataData.md | 19 + kotlin/monitoring/docs/StreamingApi.md | 63 + .../docs/SystemAttachmentTypeEnum.md | 20 + .../docs/SystemConfigurationsApi.md | 385 +++++ .../docs/SystemConnectionTypeEnum.md | 14 + kotlin/monitoring/docs/SystemDetails.md | 26 + .../monitoring/docs/SystemDetailsAddress.md | 13 + kotlin/monitoring/docs/SystemDetailsApi.md | 389 +++++ .../SystemEnergyLifetimeProductionEnum.md | 10 + .../monitoring/docs/SystemPublicNameEnum.md | 16 + kotlin/monitoring/docs/SystemSortByEnum.md | 20 + kotlin/monitoring/docs/SystemStatusEnum.md | 72 + .../docs/TelemetryGranularityEnum.md | 14 + .../monitoring/docs/TooManyRequestsError.md | 16 + .../UpdateSystemBatterySettingsRequest.md | 12 + .../UpdateSystemLoadControlSettingsRequest.md | 15 + .../UpdateSystemStormGuardSettingsRequest.md | 10 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43462 bytes .../gradle/wrapper/gradle-wrapper.properties | 7 + kotlin/monitoring/gradlew | 249 ++++ kotlin/monitoring/gradlew.bat | 249 ++++ kotlin/monitoring/settings.gradle | 1 + .../DeviceLevelProductionMonitoringApi.kt | 322 +++++ .../apis/SiteLevelConsumptionMonitoringApi.kt | 744 ++++++++++ .../apis/SiteLevelProductionMonitoringApi.kt | 487 +++++++ .../enlighten/monitoring/apis/StreamingApi.kt | 126 ++ .../apis/SystemConfigurationsApi.kt | 571 ++++++++ .../monitoring/apis/SystemDetailsApi.kt | 607 ++++++++ .../infrastructure/ApiAbstractions.kt | 23 + .../monitoring/infrastructure/ApiClient.kt | 272 ++++ .../monitoring/infrastructure/ApiResponse.kt | 43 + .../infrastructure/BigDecimalAdapter.kt | 17 + .../infrastructure/BigIntegerAdapter.kt | 17 + .../infrastructure/ByteArrayAdapter.kt | 12 + .../monitoring/infrastructure/Errors.kt | 18 + .../infrastructure/LocalDateAdapter.kt | 19 + .../infrastructure/LocalDateTimeAdapter.kt | 19 + .../infrastructure/OffsetDateTimeAdapter.kt | 19 + .../monitoring/infrastructure/PartConfig.kt | 11 + .../infrastructure/RequestConfig.kt | 19 + .../infrastructure/RequestMethod.kt | 8 + .../infrastructure/ResponseExtensions.kt | 24 + .../monitoring/infrastructure/Serializer.kt | 23 + .../monitoring/infrastructure/URIAdapter.kt | 13 + .../monitoring/infrastructure/UUIDAdapter.kt | 13 + .../models/BatteryDeviceTelemetry.kt | 81 ++ .../BatteryDeviceTelemetryIntervalsInner.kt | 51 + ...teryDeviceTelemetryIntervalsInnerCharge.kt | 36 + ...yDeviceTelemetryIntervalsInnerDischarge.kt | 36 + ...BatteryDeviceTelemetryIntervalsInnerSoc.kt | 36 + .../monitoring/models/BatterySettings.kt | 60 + .../monitoring/models/ClientError.kt | 46 + .../models/DataTemporarilyUnavailableError.kt | 41 + ...ertersSummaryByEnvoyOrSiteResponseInner.kt | 42 + ...yOrSiteResponseInnerMicroInvertersInner.kt | 96 ++ ...eResponseInnerMicroInvertersInnerEnergy.kt | 45 + ...seInnerMicroInvertersInnerPowerProduced.kt | 45 + .../GetSystemBatteryLifetimeResponse.kt | 56 + .../GetSystemBatteryTelemetryResponse.kt | 71 + ...mBatteryTelemetryResponseIntervalsInner.kt | 51 + ...ryTelemetryResponseIntervalsInnerCharge.kt | 41 + ...elemetryResponseIntervalsInnerDischarge.kt | 41 + ...tteryTelemetryResponseIntervalsInnerSoc.kt | 41 + .../GetSystemConsumptionLifetimeResponse.kt | 51 + ...SystemConsumptionMeterTelemetryResponse.kt | 71 + ...ionMeterTelemetryResponseIntervalsInner.kt | 46 + .../models/GetSystemDevicesResponse.kt | 52 + ...tSystemDevicesResponseDevicesValueInner.kt | 84 ++ ...sResponseDevicesValueInnerCellularModem.kt | 51 + .../GetSystemEnergyExportLifetimeResponse.kt | 51 + .../GetSystemEnergyExportTelemetryResponse.kt | 72 + ...ortTelemetryResponseIntervalsInnerInner.kt | 41 + .../GetSystemEnergyImportLifetimeResponse.kt | 51 + .../GetSystemEnergyImportTelemetryResponse.kt | 72 + ...ortTelemetryResponseIntervalsInnerInner.kt | 41 + .../models/GetSystemEnergyLifetimeResponse.kt | 64 + .../GetSystemGridStatusSettingsResponse.kt | 45 + .../GetSystemMicroDeviceTelemetryResponse.kt | 71 + ...roDeviceTelemetryResponseIntervalsInner.kt | 46 + ...etSystemProductionMeterReadingsResponse.kt | 47 + ...MeterReadingsResponseMeterReadingsInner.kt | 46 + ...tSystemProductionMeterTelemetryResponse.kt | 66 + ...ionMeterTelemetryResponseIntervalsInner.kt | 46 + ...tSystemProductionMicroTelemetryResponse.kt | 72 + ...ionMicroTelemetryResponseIntervalsInner.kt | 51 + .../models/GetSystemRgmStatsResponse.kt | 58 + ...GetSystemRgmStatsResponseIntervalsInner.kt | 46 + ...stemRgmStatsResponseMeterIntervalsInner.kt | 47 + ...sponseMeterIntervalsInnerIntervalsInner.kt | 51 + .../models/GetSystemSummaryResponse.kt | 91 ++ .../models/GetSystems500Response.kt | 51 + .../monitoring/models/GetSystemsResponse.kt | 62 + .../monitoring/models/InternalServerError.kt | 39 + .../monitoring/models/LoadControlSettings.kt | 41 + ...LoadControlSettingsLoadControlDataInner.kt | 76 + .../enlighten/monitoring/models/Meta.kt | 51 + .../models/MethodNotAllowedError.kt | 39 + .../monitoring/models/NotImplementedError.kt | 46 + .../models/RetrieveSystemIdResponse.kt | 36 + .../monitoring/models/SearchSystemsRequest.kt | 41 + .../models/SearchSystemsRequestSystem.kt | 57 + .../models/SearchSystemsResponse.kt | 62 + .../monitoring/models/StormGuardSettings.kt | 45 + .../models/StreamSystemLiveDataError.kt | 50 + .../models/StreamSystemLiveDataErrorError.kt | 47 + .../models/StreamSystemLiveDataResponse.kt | 36 + .../StreamSystemLiveDataResponseData.kt | 51 + .../StreamSystemLiveDataResponseDataData.kt | 80 ++ .../models/SystemAttachmentTypeEnum.kt | 75 + .../models/SystemConnectionTypeEnum.kt | 66 + .../monitoring/models/SystemDetails.kt | 116 ++ .../monitoring/models/SystemDetailsAddress.kt | 51 + .../SystemEnergyLifetimeProductionEnum.kt | 60 + .../monitoring/models/SystemPublicNameEnum.kt | 69 + .../monitoring/models/SystemSortByEnum.kt | 75 + .../monitoring/models/SystemStatusEnum.kt | 153 ++ .../models/TelemetryGranularityEnum.kt | 66 + .../monitoring/models/TooManyRequestsError.kt | 66 + .../UpdateSystemBatterySettingsRequest.kt | 46 + .../UpdateSystemLoadControlSettingsRequest.kt | 61 + .../UpdateSystemStormGuardSettingsRequest.kt | 36 + .../DeviceLevelProductionMonitoringApiTest.kt | 70 + .../SiteLevelConsumptionMonitoringApiTest.kt | 123 ++ .../SiteLevelProductionMonitoringApiTest.kt | 91 ++ .../monitoring/apis/StreamingApiTest.kt | 40 + .../apis/SystemConfigurationsApiTest.kt | 100 ++ .../monitoring/apis/SystemDetailsApiTest.kt | 104 ++ ...DeviceTelemetryIntervalsInnerChargeTest.kt | 35 + ...iceTelemetryIntervalsInnerDischargeTest.kt | 35 + ...eryDeviceTelemetryIntervalsInnerSocTest.kt | 35 + ...atteryDeviceTelemetryIntervalsInnerTest.kt | 56 + .../models/BatteryDeviceTelemetryTest.kt | 91 ++ .../monitoring/models/BatterySettingsTest.kt | 65 + .../monitoring/models/ClientErrorTest.kt | 47 + .../DataTemporarilyUnavailableErrorTest.kt | 41 + ...ponseInnerMicroInvertersInnerEnergyTest.kt | 47 + ...nerMicroInvertersInnerPowerProducedTest.kt | 47 + ...iteResponseInnerMicroInvertersInnerTest.kt | 109 ++ ...rsSummaryByEnvoyOrSiteResponseInnerTest.kt | 42 + .../GetSystemBatteryLifetimeResponseTest.kt | 60 + ...lemetryResponseIntervalsInnerChargeTest.kt | 41 + ...etryResponseIntervalsInnerDischargeTest.kt | 41 + ...yTelemetryResponseIntervalsInnerSocTest.kt | 41 + ...teryTelemetryResponseIntervalsInnerTest.kt | 56 + .../GetSystemBatteryTelemetryResponseTest.kt | 79 ++ ...etSystemConsumptionLifetimeResponseTest.kt | 54 + ...eterTelemetryResponseIntervalsInnerTest.kt | 47 + ...emConsumptionMeterTelemetryResponseTest.kt | 80 ++ ...ponseDevicesValueInnerCellularModemTest.kt | 59 + ...temDevicesResponseDevicesValueInnerTest.kt | 108 ++ .../models/GetSystemDevicesResponseTest.kt | 54 + ...tSystemEnergyExportLifetimeResponseTest.kt | 54 + ...elemetryResponseIntervalsInnerInnerTest.kt | 41 + ...SystemEnergyExportTelemetryResponseTest.kt | 79 ++ ...tSystemEnergyImportLifetimeResponseTest.kt | 54 + ...elemetryResponseIntervalsInnerInnerTest.kt | 41 + ...SystemEnergyImportTelemetryResponseTest.kt | 79 ++ .../GetSystemEnergyLifetimeResponseTest.kt | 72 + ...GetSystemGridStatusSettingsResponseTest.kt | 47 + ...viceTelemetryResponseIntervalsInnerTest.kt | 47 + ...tSystemMicroDeviceTelemetryResponseTest.kt | 79 ++ ...rReadingsResponseMeterReadingsInnerTest.kt | 47 + ...stemProductionMeterReadingsResponseTest.kt | 49 + ...eterTelemetryResponseIntervalsInnerTest.kt | 47 + ...temProductionMeterTelemetryResponseTest.kt | 73 + ...icroTelemetryResponseIntervalsInnerTest.kt | 53 + ...temProductionMicroTelemetryResponseTest.kt | 80 ++ ...ystemRgmStatsResponseIntervalsInnerTest.kt | 47 + ...seMeterIntervalsInnerIntervalsInnerTest.kt | 53 + ...RgmStatsResponseMeterIntervalsInnerTest.kt | 48 + .../models/GetSystemRgmStatsResponseTest.kt | 62 + .../models/GetSystemSummaryResponseTest.kt | 102 ++ .../models/GetSystems500ResponseTest.kt | 55 + .../models/GetSystemsResponseTest.kt | 66 + .../models/InternalServerErrorTest.kt | 41 + ...ControlSettingsLoadControlDataInnerTest.kt | 83 ++ .../models/LoadControlSettingsTest.kt | 42 + .../enlighten/monitoring/models/MetaTest.kt | 54 + .../models/MethodNotAllowedErrorTest.kt | 41 + .../models/NotImplementedErrorTest.kt | 47 + .../models/RetrieveSystemIdResponseTest.kt | 35 + .../models/SearchSystemsRequestSystemTest.kt | 62 + .../models/SearchSystemsRequestTest.kt | 43 + .../models/SearchSystemsResponseTest.kt | 66 + .../models/StormGuardSettingsTest.kt | 47 + .../StreamSystemLiveDataErrorErrorTest.kt | 53 + .../models/StreamSystemLiveDataErrorTest.kt | 54 + ...treamSystemLiveDataResponseDataDataTest.kt | 89 ++ .../StreamSystemLiveDataResponseDataTest.kt | 54 + .../StreamSystemLiveDataResponseTest.kt | 36 + .../models/SystemAttachmentTypeEnumTest.kt | 29 + .../models/SystemConnectionTypeEnumTest.kt | 29 + .../models/SystemDetailsAddressTest.kt | 53 + .../monitoring/models/SystemDetailsTest.kt | 135 ++ .../SystemEnergyLifetimeProductionEnumTest.kt | 29 + .../models/SystemPublicNameEnumTest.kt | 29 + .../monitoring/models/SystemSortByEnumTest.kt | 29 + .../monitoring/models/SystemStatusEnumTest.kt | 29 + .../models/TelemetryGranularityEnumTest.kt | 29 + .../models/TooManyRequestsErrorTest.kt | 71 + .../UpdateSystemBatterySettingsRequestTest.kt | 47 + ...ateSystemLoadControlSettingsRequestTest.kt | 65 + ...dateSystemStormGuardSettingsRequestTest.kt | 35 + 690 files changed, 41597 insertions(+) create mode 100644 kotlin/commissioning/.openapi-generator-ignore create mode 100644 kotlin/commissioning/.openapi-generator/FILES create mode 100644 kotlin/commissioning/.openapi-generator/VERSION create mode 100644 kotlin/commissioning/README.md create mode 100644 kotlin/commissioning/build.gradle create mode 100644 kotlin/commissioning/docs/Activation.md create mode 100644 kotlin/commissioning/docs/ActivationEnchargeInner.md create mode 100644 kotlin/commissioning/docs/ActivationEnpowerInner.md create mode 100644 kotlin/commissioning/docs/ActivationHost.md create mode 100644 kotlin/commissioning/docs/ActivationHostCompany.md create mode 100644 kotlin/commissioning/docs/ActivationOwner.md create mode 100644 kotlin/commissioning/docs/ActivationOwnerCompany.md create mode 100644 kotlin/commissioning/docs/ActivationsApi.md create mode 100644 kotlin/commissioning/docs/Address.md create mode 100644 kotlin/commissioning/docs/ArrayParams.md create mode 100644 kotlin/commissioning/docs/ArrayParamsModulesInner.md create mode 100644 kotlin/commissioning/docs/ArraysApi.md create mode 100644 kotlin/commissioning/docs/ClientError.md create mode 100644 kotlin/commissioning/docs/CompaniesApi.md create mode 100644 kotlin/commissioning/docs/Company.md create mode 100644 kotlin/commissioning/docs/CompanyRoleEnum.md create mode 100644 kotlin/commissioning/docs/ConflictError.md create mode 100644 kotlin/commissioning/docs/ConnectionType.md create mode 100644 kotlin/commissioning/docs/ConsumptionLifetimeResponse.md create mode 100644 kotlin/commissioning/docs/ConsumptionStatsResponse.md create mode 100644 kotlin/commissioning/docs/ConsumptionStatsResponseIntervalsInner.md create mode 100644 kotlin/commissioning/docs/CreateCompanyUserRequest.md create mode 100644 kotlin/commissioning/docs/CreateUserRequest.md create mode 100644 kotlin/commissioning/docs/DefaultApi.md create mode 100644 kotlin/commissioning/docs/DeleteActivationResponse.md create mode 100644 kotlin/commissioning/docs/DeleteSystemArrayResponse.md create mode 100644 kotlin/commissioning/docs/EnergyLifetimeResponse.md create mode 100644 kotlin/commissioning/docs/EnvoysResponse.md create mode 100644 kotlin/commissioning/docs/EnvoysResponseEnvoysInner.md create mode 100644 kotlin/commissioning/docs/EstimateApi.md create mode 100644 kotlin/commissioning/docs/GetActivationOpsProductionModeResponse.md create mode 100644 kotlin/commissioning/docs/GetCompanyUsersResponse.md create mode 100644 kotlin/commissioning/docs/GetCompanyUsersResponseUsersInner.md create mode 100644 kotlin/commissioning/docs/GetGridProfilesResponse.md create mode 100644 kotlin/commissioning/docs/GetGridProfilesResponseGridProfilesInner.md create mode 100644 kotlin/commissioning/docs/GetPartnerActivationsResponse.md create mode 100644 kotlin/commissioning/docs/GetPartnerActivationsResponseSystemsInner.md create mode 100644 kotlin/commissioning/docs/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.md create mode 100644 kotlin/commissioning/docs/GetPvManufacturerModelsResponse.md create mode 100644 kotlin/commissioning/docs/GetPvManufacturerModelsResponsePvManufacturers.md create mode 100644 kotlin/commissioning/docs/GetPvManufacturersResponse.md create mode 100644 kotlin/commissioning/docs/GetSelfCompanyAuthorizedSubcontractorsResponse.md create mode 100644 kotlin/commissioning/docs/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.md create mode 100644 kotlin/commissioning/docs/GetSelfCompanyBranchesResponse.md create mode 100644 kotlin/commissioning/docs/GetSelfCompanyBranchesResponseBranchesInner.md create mode 100644 kotlin/commissioning/docs/GetSystemMeterResponse.md create mode 100644 kotlin/commissioning/docs/GrantActivationUserAccessResponse.md create mode 100644 kotlin/commissioning/docs/GridProfilesApi.md create mode 100644 kotlin/commissioning/docs/HomeOwnerApi.md create mode 100644 kotlin/commissioning/docs/InventoryResponse.md create mode 100644 kotlin/commissioning/docs/InventoryResponseEnvoysInner.md create mode 100644 kotlin/commissioning/docs/InventoryResponseMetersInner.md create mode 100644 kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponse.md create mode 100644 kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.md create mode 100644 kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.md create mode 100644 kotlin/commissioning/docs/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.md create mode 100644 kotlin/commissioning/docs/Meta.md create mode 100644 kotlin/commissioning/docs/MetersApi.md create mode 100644 kotlin/commissioning/docs/MonthlyProductionResponse.md create mode 100644 kotlin/commissioning/docs/MonthlyProductionResponseMeterReadingsInner.md create mode 100644 kotlin/commissioning/docs/NotFoundError.md create mode 100644 kotlin/commissioning/docs/ProductionMeterReadingsResponse.md create mode 100644 kotlin/commissioning/docs/ProductionMeterReadingsResponseMeterReadingsInner.md create mode 100644 kotlin/commissioning/docs/PvManufacturersApi.md create mode 100644 kotlin/commissioning/docs/PvModelsApi.md create mode 100644 kotlin/commissioning/docs/RevokeActivationUserAccessResponse.md create mode 100644 kotlin/commissioning/docs/RgmStatsResponse.md create mode 100644 kotlin/commissioning/docs/RgmStatsResponseIntervalsInner.md create mode 100644 kotlin/commissioning/docs/RgmStatsResponseMeterIntervalsInner.md create mode 100644 kotlin/commissioning/docs/RgmStatsResponseMeterIntervalsInnerIntervalsInner.md create mode 100644 kotlin/commissioning/docs/SearchSystemIdResponse.md create mode 100644 kotlin/commissioning/docs/SearchUsersResponse.md create mode 100644 kotlin/commissioning/docs/ServerError.md create mode 100644 kotlin/commissioning/docs/SetActivationMeterStatusRequest.md create mode 100644 kotlin/commissioning/docs/SetActivationMeterStatusResponse.md create mode 100644 kotlin/commissioning/docs/SetActivationOpsProductionModeRequest.md create mode 100644 kotlin/commissioning/docs/SetActivationOpsProductionModeResponse.md create mode 100644 kotlin/commissioning/docs/StatsResponse.md create mode 100644 kotlin/commissioning/docs/StatsResponseIntervalsInner.md create mode 100644 kotlin/commissioning/docs/Status.md create mode 100644 kotlin/commissioning/docs/SummaryResponse.md create mode 100644 kotlin/commissioning/docs/SystemArray.md create mode 100644 kotlin/commissioning/docs/SystemArrayModulesInner.md create mode 100644 kotlin/commissioning/docs/SystemArrayTypeEnum.md create mode 100644 kotlin/commissioning/docs/SystemArrays.md create mode 100644 kotlin/commissioning/docs/SystemArraysInventoryDetailsInner.md create mode 100644 kotlin/commissioning/docs/SystemArraysLayersInner.md create mode 100644 kotlin/commissioning/docs/SystemAttachmentTypeEnum.md create mode 100644 kotlin/commissioning/docs/SystemEstimate.md create mode 100644 kotlin/commissioning/docs/SystemExpandEnum.md create mode 100644 kotlin/commissioning/docs/SystemInternetConnectionEnum.md create mode 100644 kotlin/commissioning/docs/SystemMeterStatusEnum.md create mode 100644 kotlin/commissioning/docs/SystemParams.md create mode 100644 kotlin/commissioning/docs/SystemParamsAddress.md create mode 100644 kotlin/commissioning/docs/SystemParamsEnchargeInner.md create mode 100644 kotlin/commissioning/docs/SystemParamsEnpowerInner.md create mode 100644 kotlin/commissioning/docs/SystemProductionModeEnum.md create mode 100644 kotlin/commissioning/docs/SystemSourceEnum.md create mode 100644 kotlin/commissioning/docs/SystemStageEnum.md create mode 100644 kotlin/commissioning/docs/SystemTypeEnum.md create mode 100644 kotlin/commissioning/docs/SystemsResponse.md create mode 100644 kotlin/commissioning/docs/SystemsResponseSystemsInner.md create mode 100644 kotlin/commissioning/docs/TariffApi.md create mode 100644 kotlin/commissioning/docs/TariffSeasonsInner.md create mode 100644 kotlin/commissioning/docs/TariffSeasonsInnerDaysInner.md create mode 100644 kotlin/commissioning/docs/TariffSeasonsInnerDaysInnerPeriodsInner.md create mode 100644 kotlin/commissioning/docs/TariffSettings.md create mode 100644 kotlin/commissioning/docs/TariffSettingsTariff.md create mode 100644 kotlin/commissioning/docs/TariffSettingsTariffCurrencyType.md create mode 100644 kotlin/commissioning/docs/TariffSettingsTariffSingleRate.md create mode 100644 kotlin/commissioning/docs/TooManyRequestsError.md create mode 100644 kotlin/commissioning/docs/UnprocessableEntityError.md create mode 100644 kotlin/commissioning/docs/UpdateActivationEstimateRequest.md create mode 100644 kotlin/commissioning/docs/UpdateCompanyUserRequest.md create mode 100644 kotlin/commissioning/docs/UpdateSystemArraysRequest.md create mode 100644 kotlin/commissioning/docs/UpdateSystemMeterResponse.md create mode 100644 kotlin/commissioning/docs/UpdateSystemTariffSettingsResponse.md create mode 100644 kotlin/commissioning/docs/UpdateSystemTariffSettingsResponseTask.md create mode 100644 kotlin/commissioning/docs/User.md create mode 100644 kotlin/commissioning/docs/UserExpandEnum.md create mode 100644 kotlin/commissioning/docs/UserParams.md create mode 100644 kotlin/commissioning/docs/UserRoleEnum.md create mode 100644 kotlin/commissioning/docs/UsersApi.md create mode 100644 kotlin/commissioning/gradle/wrapper/gradle-wrapper.jar create mode 100644 kotlin/commissioning/gradle/wrapper/gradle-wrapper.properties create mode 100644 kotlin/commissioning/gradlew create mode 100644 kotlin/commissioning/gradlew.bat create mode 100644 kotlin/commissioning/settings.gradle create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/apis/DefaultApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/ActivationsApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/ArraysApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/CompaniesApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/EstimateApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/GridProfilesApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/HomeOwnerApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/MetersApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/PvManufacturersApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/PvModelsApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/TariffApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/UsersApi.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiAbstractions.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiClient.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/BigDecimalAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/BigIntegerAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ByteArrayAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/Errors.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/LocalDateAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/LocalDateTimeAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/OffsetDateTimeAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/PartConfig.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/RequestConfig.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/RequestMethod.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ResponseExtensions.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/Serializer.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/URIAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/UUIDAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Activation.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationEnchargeInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationEnpowerInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationHost.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationHostCompany.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationOwner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationOwnerCompany.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Address.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ArrayParams.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ArrayParamsModulesInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Company.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CompanyRoleEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CreateCompanyUserRequest.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CreateUserRequest.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/DeleteActivationResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/DeleteSystemArrayResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetActivationOpsProductionModeResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetCompanyUsersResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseUsersInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetGridProfilesResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetGridProfilesResponseGridProfilesInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponsePvManufacturers.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturersResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseBranchesInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSystemMeterResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GrantActivationUserAccessResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/RevokeActivationUserAccessResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SearchUsersResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ServerError.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationMeterStatusRequest.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationMeterStatusResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeRequest.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArray.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrayModulesInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrayTypeEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrays.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArraysInventoryDetailsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArraysLayersInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemAttachmentTypeEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemEstimate.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemExpandEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemInternetConnectionEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemMeterStatusEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParams.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsAddress.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsEnchargeInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsEnpowerInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemProductionModeEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemSourceEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemStageEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemTypeEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerPeriodsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettings.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariff.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariffCurrencyType.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariffSingleRate.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TooManyRequestsError.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UnprocessableEntityError.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateActivationEstimateRequest.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateCompanyUserRequest.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemArraysRequest.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemMeterResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTask.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/User.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserExpandEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserParams.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserRoleEnum.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiAbstractions.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiClient.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/BigDecimalAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/BigIntegerAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ByteArrayAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/Errors.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/LocalDateAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/LocalDateTimeAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/OffsetDateTimeAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/PartConfig.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/RequestConfig.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/RequestMethod.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ResponseExtensions.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/Serializer.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/URIAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/UUIDAdapter.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ClientError.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ConflictError.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ConnectionType.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionLifetimeResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionStatsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/EnergyLifetimeResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/EnvoysResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/EnvoysResponseEnvoysInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponseEnvoysInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponseMetersInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/Meta.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/MonthlyProductionResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/NotFoundError.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ProductionMeterReadingsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseIntervalsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/SearchSystemIdResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/ServerError.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/StatsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/StatsResponseIntervalsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/Status.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/SummaryResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/SystemsResponse.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/SystemsResponseSystemsInner.kt create mode 100644 kotlin/commissioning/src/main/kotlin/enlighten/models/UnprocessableEntityError.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/apis/DefaultApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/ActivationsApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/ArraysApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/CompaniesApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/EstimateApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/GridProfilesApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/HomeOwnerApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/MetersApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/PvManufacturersApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/PvModelsApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/TariffApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/UsersApiTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationEnchargeInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationEnpowerInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationHostCompanyTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationHostTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationOwnerCompanyTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationOwnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/AddressTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ArrayParamsModulesInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ArrayParamsTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CompanyRoleEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CompanyTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CreateCompanyUserRequestTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CreateUserRequestTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/DeleteActivationResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/DeleteSystemArrayResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetActivationOpsProductionModeResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseUsersInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetGridProfilesResponseGridProfilesInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetGridProfilesResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponsePvManufacturersTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturersResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseBranchesInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSystemMeterResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GrantActivationUserAccessResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/RevokeActivationUserAccessResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SearchUsersResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ServerErrorTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationMeterStatusRequestTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationMeterStatusResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeRequestTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayModulesInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayTypeEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysInventoryDetailsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysLayersInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemAttachmentTypeEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemEstimateTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemExpandEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemInternetConnectionEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemMeterStatusEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsAddressTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsEnchargeInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsEnpowerInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemProductionModeEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemSourceEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemStageEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemTypeEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerPeriodsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffCurrencyTypeTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffSingleRateTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TooManyRequestsErrorTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UnprocessableEntityErrorTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateActivationEstimateRequestTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateCompanyUserRequestTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemArraysRequestTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemMeterResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTaskTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserExpandEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserParamsTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserRoleEnumTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ClientErrorTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ConflictErrorTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ConnectionTypeTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionLifetimeResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionStatsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/EnergyLifetimeResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/EnvoysResponseEnvoysInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/EnvoysResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseEnvoysInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseMetersInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergyTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProducedTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/MetaTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/MonthlyProductionResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/NotFoundErrorTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseIntervalsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/SearchSystemIdResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/ServerErrorTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/StatsResponseIntervalsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/StatsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/StatusTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/SummaryResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/SystemsResponseSystemsInnerTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/SystemsResponseTest.kt create mode 100644 kotlin/commissioning/src/test/kotlin/enlighten/models/UnprocessableEntityErrorTest.kt create mode 100644 kotlin/monitoring/.openapi-generator-ignore create mode 100644 kotlin/monitoring/.openapi-generator/FILES create mode 100644 kotlin/monitoring/.openapi-generator/VERSION create mode 100644 kotlin/monitoring/README.md create mode 100644 kotlin/monitoring/build.gradle create mode 100644 kotlin/monitoring/docs/BatteryDeviceTelemetry.md create mode 100644 kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInner.md create mode 100644 kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerCharge.md create mode 100644 kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerDischarge.md create mode 100644 kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerSoc.md create mode 100644 kotlin/monitoring/docs/BatterySettings.md create mode 100644 kotlin/monitoring/docs/ClientError.md create mode 100644 kotlin/monitoring/docs/DataTemporarilyUnavailableError.md create mode 100644 kotlin/monitoring/docs/DeviceLevelProductionMonitoringApi.md create mode 100644 kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInner.md create mode 100644 kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.md create mode 100644 kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.md create mode 100644 kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.md create mode 100644 kotlin/monitoring/docs/GetSystemBatteryLifetimeResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemBatteryTelemetryResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.md create mode 100644 kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.md create mode 100644 kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.md create mode 100644 kotlin/monitoring/docs/GetSystemConsumptionLifetimeResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemConsumptionMeterTelemetryResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemDevicesResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemDevicesResponseDevicesValueInner.md create mode 100644 kotlin/monitoring/docs/GetSystemDevicesResponseDevicesValueInnerCellularModem.md create mode 100644 kotlin/monitoring/docs/GetSystemEnergyExportLifetimeResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemEnergyExportTelemetryResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.md create mode 100644 kotlin/monitoring/docs/GetSystemEnergyImportLifetimeResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemEnergyImportTelemetryResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.md create mode 100644 kotlin/monitoring/docs/GetSystemEnergyLifetimeResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemGridStatusSettingsResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemMicroDeviceTelemetryResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemMicroDeviceTelemetryResponseIntervalsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemProductionMeterReadingsResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemProductionMeterReadingsResponseMeterReadingsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemProductionMeterTelemetryResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemProductionMeterTelemetryResponseIntervalsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemProductionMicroTelemetryResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemProductionMicroTelemetryResponseIntervalsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemRgmStatsResponse.md create mode 100644 kotlin/monitoring/docs/GetSystemRgmStatsResponseIntervalsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemRgmStatsResponseMeterIntervalsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.md create mode 100644 kotlin/monitoring/docs/GetSystemSummaryResponse.md create mode 100644 kotlin/monitoring/docs/GetSystems500Response.md create mode 100644 kotlin/monitoring/docs/GetSystemsResponse.md create mode 100644 kotlin/monitoring/docs/InternalServerError.md create mode 100644 kotlin/monitoring/docs/LoadControlSettings.md create mode 100644 kotlin/monitoring/docs/LoadControlSettingsLoadControlDataInner.md create mode 100644 kotlin/monitoring/docs/Meta.md create mode 100644 kotlin/monitoring/docs/MethodNotAllowedError.md create mode 100644 kotlin/monitoring/docs/NotImplementedError.md create mode 100644 kotlin/monitoring/docs/RetrieveSystemIdResponse.md create mode 100644 kotlin/monitoring/docs/SearchSystemsRequest.md create mode 100644 kotlin/monitoring/docs/SearchSystemsRequestSystem.md create mode 100644 kotlin/monitoring/docs/SearchSystemsResponse.md create mode 100644 kotlin/monitoring/docs/SiteLevelConsumptionMonitoringApi.md create mode 100644 kotlin/monitoring/docs/SiteLevelProductionMonitoringApi.md create mode 100644 kotlin/monitoring/docs/StormGuardSettings.md create mode 100644 kotlin/monitoring/docs/StreamSystemLiveDataError.md create mode 100644 kotlin/monitoring/docs/StreamSystemLiveDataErrorError.md create mode 100644 kotlin/monitoring/docs/StreamSystemLiveDataResponse.md create mode 100644 kotlin/monitoring/docs/StreamSystemLiveDataResponseData.md create mode 100644 kotlin/monitoring/docs/StreamSystemLiveDataResponseDataData.md create mode 100644 kotlin/monitoring/docs/StreamingApi.md create mode 100644 kotlin/monitoring/docs/SystemAttachmentTypeEnum.md create mode 100644 kotlin/monitoring/docs/SystemConfigurationsApi.md create mode 100644 kotlin/monitoring/docs/SystemConnectionTypeEnum.md create mode 100644 kotlin/monitoring/docs/SystemDetails.md create mode 100644 kotlin/monitoring/docs/SystemDetailsAddress.md create mode 100644 kotlin/monitoring/docs/SystemDetailsApi.md create mode 100644 kotlin/monitoring/docs/SystemEnergyLifetimeProductionEnum.md create mode 100644 kotlin/monitoring/docs/SystemPublicNameEnum.md create mode 100644 kotlin/monitoring/docs/SystemSortByEnum.md create mode 100644 kotlin/monitoring/docs/SystemStatusEnum.md create mode 100644 kotlin/monitoring/docs/TelemetryGranularityEnum.md create mode 100644 kotlin/monitoring/docs/TooManyRequestsError.md create mode 100644 kotlin/monitoring/docs/UpdateSystemBatterySettingsRequest.md create mode 100644 kotlin/monitoring/docs/UpdateSystemLoadControlSettingsRequest.md create mode 100644 kotlin/monitoring/docs/UpdateSystemStormGuardSettingsRequest.md create mode 100644 kotlin/monitoring/gradle/wrapper/gradle-wrapper.jar create mode 100644 kotlin/monitoring/gradle/wrapper/gradle-wrapper.properties create mode 100644 kotlin/monitoring/gradlew create mode 100644 kotlin/monitoring/gradlew.bat create mode 100644 kotlin/monitoring/settings.gradle create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApi.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApi.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApi.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/StreamingApi.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SystemConfigurationsApi.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SystemDetailsApi.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiAbstractions.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiClient.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/BigDecimalAdapter.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/BigIntegerAdapter.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ByteArrayAdapter.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/Errors.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateAdapter.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateTimeAdapter.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/OffsetDateTimeAdapter.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/PartConfig.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/RequestConfig.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/RequestMethod.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ResponseExtensions.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/Serializer.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/URIAdapter.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/UUIDAdapter.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetry.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerCharge.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischarge.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSoc.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatterySettings.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/ClientError.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableError.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModem.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemSummaryResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystems500Response.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemsResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/InternalServerError.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/LoadControlSettings.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInner.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/Meta.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/MethodNotAllowedError.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/NotImplementedError.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequest.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystem.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StormGuardSettings.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataError.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorError.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponse.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseData.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataData.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnum.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnum.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemDetails.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemDetailsAddress.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnum.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemPublicNameEnum.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemSortByEnum.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemStatusEnum.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/TelemetryGranularityEnum.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/TooManyRequestsError.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequest.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequest.kt create mode 100644 kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApiTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApiTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApiTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/StreamingApiTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SystemConfigurationsApiTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SystemDetailsApiTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerChargeTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischargeTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSocTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatterySettingsTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/ClientErrorTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableErrorTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergyTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProducedTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerChargeTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischargeTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSocTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModemTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemSummaryResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystems500ResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemsResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/InternalServerErrorTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInnerTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/MetaTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/MethodNotAllowedErrorTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/NotImplementedErrorTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystemTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StormGuardSettingsTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorErrorTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataDataTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnumTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnumTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemDetailsAddressTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemDetailsTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnumTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemPublicNameEnumTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemSortByEnumTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemStatusEnumTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/TelemetryGranularityEnumTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/TooManyRequestsErrorTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequestTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequestTest.kt create mode 100644 kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequestTest.kt 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 0000000000000000000000000000000000000000..d64cd4917707c1f8861d8cb53dd15194d4248596 GIT binary patch literal 43462 zcma&NWl&^owk(X(xVyW%ySuwf;qI=D6|RlDJ2cR^yEKh!@I- zp9QeisK*rlxC>+~7Dk4IxIRsKBHqdR9b3+fyL=ynHmIDe&|>O*VlvO+%z5;9Z$|DJ zb4dO}-R=MKr^6EKJiOrJdLnCJn>np?~vU-1sSFgPu;pthGwf}bG z(1db%xwr#x)r+`4AGu$j7~u2MpVs3VpLp|mx&;>`0p0vH6kF+D2CY0fVdQOZ@h;A` z{infNyvmFUiu*XG}RNMNwXrbec_*a3N=2zJ|Wh5z* z5rAX$JJR{#zP>KY**>xHTuw?|-Rg|o24V)74HcfVT;WtQHXlE+_4iPE8QE#DUm%x0 zEKr75ur~W%w#-My3Tj`hH6EuEW+8K-^5P62$7Sc5OK+22qj&Pd1;)1#4tKihi=~8C zHiQSst0cpri6%OeaR`PY>HH_;CPaRNty%WTm4{wDK8V6gCZlG@U3$~JQZ;HPvDJcT1V{ z?>H@13MJcCNe#5z+MecYNi@VT5|&UiN1D4ATT+%M+h4c$t;C#UAs3O_q=GxK0}8%8 z8J(_M9bayxN}69ex4dzM_P3oh@ZGREjVvn%%r7=xjkqxJP4kj}5tlf;QosR=%4L5y zWhgejO=vao5oX%mOHbhJ8V+SG&K5dABn6!WiKl{|oPkq(9z8l&Mm%(=qGcFzI=eLu zWc_oCLyf;hVlB@dnwY98?75B20=n$>u3b|NB28H0u-6Rpl((%KWEBOfElVWJx+5yg z#SGqwza7f}$z;n~g%4HDU{;V{gXIhft*q2=4zSezGK~nBgu9-Q*rZ#2f=Q}i2|qOp z!!y4p)4o=LVUNhlkp#JL{tfkhXNbB=Ox>M=n6soptJw-IDI|_$is2w}(XY>a=H52d z3zE$tjPUhWWS+5h=KVH&uqQS=$v3nRs&p$%11b%5qtF}S2#Pc`IiyBIF4%A!;AVoI zXU8-Rpv!DQNcF~(qQnyyMy=-AN~U>#&X1j5BLDP{?K!%h!;hfJI>$mdLSvktEr*89 zdJHvby^$xEX0^l9g$xW-d?J;L0#(`UT~zpL&*cEh$L|HPAu=P8`OQZV!-}l`noSp_ zQ-1$q$R-gDL)?6YaM!=8H=QGW$NT2SeZlb8PKJdc=F-cT@j7Xags+Pr*jPtlHFnf- zh?q<6;)27IdPc^Wdy-mX%2s84C1xZq9Xms+==F4);O`VUASmu3(RlgE#0+#giLh-& zcxm3_e}n4{%|X zJp{G_j+%`j_q5}k{eW&TlP}J2wtZ2^<^E(O)4OQX8FDp6RJq!F{(6eHWSD3=f~(h} zJXCf7=r<16X{pHkm%yzYI_=VDP&9bmI1*)YXZeB}F? z(%QsB5fo*FUZxK$oX~X^69;x~j7ms8xlzpt-T15e9}$4T-pC z6PFg@;B-j|Ywajpe4~bk#S6(fO^|mm1hKOPfA%8-_iGCfICE|=P_~e;Wz6my&)h_~ zkv&_xSAw7AZ%ThYF(4jADW4vg=oEdJGVOs>FqamoL3Np8>?!W#!R-0%2Bg4h?kz5I zKV-rKN2n(vUL%D<4oj@|`eJ>0i#TmYBtYmfla;c!ATW%;xGQ0*TW@PTlGG><@dxUI zg>+3SiGdZ%?5N=8uoLA|$4isK$aJ%i{hECP$bK{J#0W2gQ3YEa zZQ50Stn6hqdfxJ*9#NuSLwKFCUGk@c=(igyVL;;2^wi4o30YXSIb2g_ud$ zgpCr@H0qWtk2hK8Q|&wx)}4+hTYlf;$a4#oUM=V@Cw#!$(nOFFpZ;0lc!qd=c$S}Z zGGI-0jg~S~cgVT=4Vo)b)|4phjStD49*EqC)IPwyeKBLcN;Wu@Aeph;emROAwJ-0< z_#>wVm$)ygH|qyxZaet&(Vf%pVdnvKWJn9`%DAxj3ot;v>S$I}jJ$FLBF*~iZ!ZXE zkvui&p}fI0Y=IDX)mm0@tAd|fEHl~J&K}ZX(Mm3cm1UAuwJ42+AO5@HwYfDH7ipIc zmI;1J;J@+aCNG1M`Btf>YT>~c&3j~Qi@Py5JT6;zjx$cvOQW@3oQ>|}GH?TW-E z1R;q^QFjm5W~7f}c3Ww|awg1BAJ^slEV~Pk`Kd`PS$7;SqJZNj->it4DW2l15}xP6 zoCl$kyEF%yJni0(L!Z&14m!1urXh6Btj_5JYt1{#+H8w?5QI%% zo-$KYWNMJVH?Hh@1n7OSu~QhSswL8x0=$<8QG_zepi_`y_79=nK=_ZP_`Em2UI*tyQoB+r{1QYZCpb?2OrgUw#oRH$?^Tj!Req>XiE#~B|~ z+%HB;=ic+R@px4Ld8mwpY;W^A%8%l8$@B@1m5n`TlKI6bz2mp*^^^1mK$COW$HOfp zUGTz-cN9?BGEp}5A!mDFjaiWa2_J2Iq8qj0mXzk; z66JBKRP{p%wN7XobR0YjhAuW9T1Gw3FDvR5dWJ8ElNYF94eF3ebu+QwKjtvVu4L zI9ip#mQ@4uqVdkl-TUQMb^XBJVLW(-$s;Nq;@5gr4`UfLgF$adIhd?rHOa%D);whv z=;krPp~@I+-Z|r#s3yCH+c1US?dnm+C*)r{m+86sTJusLdNu^sqLrfWed^ndHXH`m zd3#cOe3>w-ga(Dus_^ppG9AC>Iq{y%%CK+Cro_sqLCs{VLuK=dev>OL1dis4(PQ5R zcz)>DjEkfV+MO;~>VUlYF00SgfUo~@(&9$Iy2|G0T9BSP?&T22>K46D zL*~j#yJ?)^*%J3!16f)@Y2Z^kS*BzwfAQ7K96rFRIh>#$*$_Io;z>ux@}G98!fWR@ zGTFxv4r~v)Gsd|pF91*-eaZ3Qw1MH$K^7JhWIdX%o$2kCbvGDXy)a?@8T&1dY4`;L z4Kn+f%SSFWE_rpEpL9bnlmYq`D!6F%di<&Hh=+!VI~j)2mfil03T#jJ_s?}VV0_hp z7T9bWxc>Jm2Z0WMU?`Z$xE74Gu~%s{mW!d4uvKCx@WD+gPUQ zV0vQS(Ig++z=EHN)BR44*EDSWIyT~R4$FcF*VEY*8@l=218Q05D2$|fXKFhRgBIEE zdDFB}1dKkoO^7}{5crKX!p?dZWNz$m>1icsXG2N+((x0OIST9Zo^DW_tytvlwXGpn zs8?pJXjEG;T@qrZi%#h93?FP$!&P4JA(&H61tqQi=opRzNpm zkrG}$^t9&XduK*Qa1?355wd8G2CI6QEh@Ua>AsD;7oRUNLPb76m4HG3K?)wF~IyS3`fXuNM>${?wmB zpVz;?6_(Fiadfd{vUCBM*_kt$+F3J+IojI;9L(gc9n3{sEZyzR9o!_mOwFC#tQ{Q~ zP3-`#uK#tP3Q7~Q;4H|wjZHO8h7e4IuBxl&vz2w~D8)w=Wtg31zpZhz%+kzSzL*dV zwp@{WU4i;hJ7c2f1O;7Mz6qRKeASoIv0_bV=i@NMG*l<#+;INk-^`5w@}Dj~;k=|}qM1vq_P z|GpBGe_IKq|LNy9SJhKOQ$c=5L{Dv|Q_lZl=-ky*BFBJLW9&y_C|!vyM~rQx=!vun z?rZJQB5t}Dctmui5i31C_;_}CEn}_W%>oSXtt>@kE1=JW*4*v4tPp;O6 zmAk{)m!)}34pTWg8{i>($%NQ(Tl;QC@J@FfBoc%Gr&m560^kgSfodAFrIjF}aIw)X zoXZ`@IsMkc8_=w%-7`D6Y4e*CG8k%Ud=GXhsTR50jUnm+R*0A(O3UKFg0`K;qp1bl z7``HN=?39ic_kR|^R^~w-*pa?Vj#7|e9F1iRx{GN2?wK!xR1GW!qa=~pjJb-#u1K8 zeR?Y2i-pt}yJq;SCiVHODIvQJX|ZJaT8nO+(?HXbLefulKKgM^B(UIO1r+S=7;kLJ zcH}1J=Px2jsh3Tec&v8Jcbng8;V-`#*UHt?hB(pmOipKwf3Lz8rG$heEB30Sg*2rx zV<|KN86$soN(I!BwO`1n^^uF2*x&vJ$2d$>+`(romzHP|)K_KkO6Hc>_dwMW-M(#S zK(~SiXT1@fvc#U+?|?PniDRm01)f^#55;nhM|wi?oG>yBsa?~?^xTU|fX-R(sTA+5 zaq}-8Tx7zrOy#3*JLIIVsBmHYLdD}!0NP!+ITW+Thn0)8SS!$@)HXwB3tY!fMxc#1 zMp3H?q3eD?u&Njx4;KQ5G>32+GRp1Ee5qMO0lZjaRRu&{W<&~DoJNGkcYF<5(Ab+J zgO>VhBl{okDPn78<%&e2mR{jwVCz5Og;*Z;;3%VvoGo_;HaGLWYF7q#jDX=Z#Ml`H z858YVV$%J|e<1n`%6Vsvq7GmnAV0wW4$5qQ3uR@1i>tW{xrl|ExywIc?fNgYlA?C5 zh$ezAFb5{rQu6i7BSS5*J-|9DQ{6^BVQ{b*lq`xS@RyrsJN?-t=MTMPY;WYeKBCNg z^2|pN!Q^WPJuuO4!|P@jzt&tY1Y8d%FNK5xK(!@`jO2aEA*4 zkO6b|UVBipci?){-Ke=+1;mGlND8)6+P;8sq}UXw2hn;fc7nM>g}GSMWu&v&fqh

iViYT=fZ(|3Ox^$aWPp4a8h24tD<|8-!aK0lHgL$N7Efw}J zVIB!7=T$U`ao1?upi5V4Et*-lTG0XvExbf!ya{cua==$WJyVG(CmA6Of*8E@DSE%L z`V^$qz&RU$7G5mg;8;=#`@rRG`-uS18$0WPN@!v2d{H2sOqP|!(cQ@ zUHo!d>>yFArLPf1q`uBvY32miqShLT1B@gDL4XoVTK&@owOoD)OIHXrYK-a1d$B{v zF^}8D3Y^g%^cnvScOSJR5QNH+BI%d|;J;wWM3~l>${fb8DNPg)wrf|GBP8p%LNGN# z3EaIiItgwtGgT&iYCFy9-LG}bMI|4LdmmJt@V@% zb6B)1kc=T)(|L@0;wr<>=?r04N;E&ef+7C^`wPWtyQe(*pD1pI_&XHy|0gIGHMekd zF_*M4yi6J&Z4LQj65)S zXwdM{SwUo%3SbPwFsHgqF@V|6afT|R6?&S;lw=8% z3}@9B=#JI3@B*#4s!O))~z zc>2_4Q_#&+5V`GFd?88^;c1i7;Vv_I*qt!_Yx*n=;rj!82rrR2rQ8u5(Ejlo{15P% zs~!{%XJ>FmJ})H^I9bn^Re&38H{xA!0l3^89k(oU;bZWXM@kn$#aoS&Y4l^-WEn-fH39Jb9lA%s*WsKJQl?n9B7_~P z-XM&WL7Z!PcoF6_D>V@$CvUIEy=+Z&0kt{szMk=f1|M+r*a43^$$B^MidrT0J;RI` z(?f!O<8UZkm$_Ny$Hth1J#^4ni+im8M9mr&k|3cIgwvjAgjH z8`N&h25xV#v*d$qBX5jkI|xOhQn!>IYZK7l5#^P4M&twe9&Ey@@GxYMxBZq2e7?`q z$~Szs0!g{2fGcp9PZEt|rdQ6bhAgpcLHPz?f-vB?$dc*!9OL?Q8mn7->bFD2Si60* z!O%y)fCdMSV|lkF9w%x~J*A&srMyYY3{=&$}H zGQ4VG_?$2X(0|vT0{=;W$~icCI{b6W{B!Q8xdGhF|D{25G_5_+%s(46lhvNLkik~R z>nr(&C#5wwOzJZQo9m|U<;&Wk!_#q|V>fsmj1g<6%hB{jGoNUPjgJslld>xmODzGjYc?7JSuA?A_QzjDw5AsRgi@Y|Z0{F{!1=!NES-#*f^s4l0Hu zz468))2IY5dmD9pa*(yT5{EyP^G>@ZWumealS-*WeRcZ}B%gxq{MiJ|RyX-^C1V=0 z@iKdrGi1jTe8Ya^x7yyH$kBNvM4R~`fbPq$BzHum-3Zo8C6=KW@||>zsA8-Y9uV5V z#oq-f5L5}V<&wF4@X@<3^C%ptp6+Ce)~hGl`kwj)bsAjmo_GU^r940Z-|`<)oGnh7 zFF0Tde3>ui?8Yj{sF-Z@)yQd~CGZ*w-6p2U<8}JO-sRsVI5dBji`01W8A&3$?}lxBaC&vn0E$c5tW* zX>5(zzZ=qn&!J~KdsPl;P@bmA-Pr8T*)eh_+Dv5=Ma|XSle6t(k8qcgNyar{*ReQ8 zTXwi=8vr>!3Ywr+BhggHDw8ke==NTQVMCK`$69fhzEFB*4+H9LIvdt-#IbhZvpS}} zO3lz;P?zr0*0$%-Rq_y^k(?I{Mk}h@w}cZpMUp|ucs55bcloL2)($u%mXQw({Wzc~ z;6nu5MkjP)0C(@%6Q_I_vsWrfhl7Zpoxw#WoE~r&GOSCz;_ro6i(^hM>I$8y>`!wW z*U^@?B!MMmb89I}2(hcE4zN2G^kwyWCZp5JG>$Ez7zP~D=J^LMjSM)27_0B_X^C(M z`fFT+%DcKlu?^)FCK>QzSnV%IsXVcUFhFdBP!6~se&xxrIxsvySAWu++IrH;FbcY$ z2DWTvSBRfLwdhr0nMx+URA$j3i7_*6BWv#DXfym?ZRDcX9C?cY9sD3q)uBDR3uWg= z(lUIzB)G$Hr!){>E{s4Dew+tb9kvToZp-1&c?y2wn@Z~(VBhqz`cB;{E4(P3N2*nJ z_>~g@;UF2iG{Kt(<1PyePTKahF8<)pozZ*xH~U-kfoAayCwJViIrnqwqO}7{0pHw$ zs2Kx?s#vQr7XZ264>5RNKSL8|Ty^=PsIx^}QqOOcfpGUU4tRkUc|kc7-!Ae6!+B{o~7nFpm3|G5^=0#Bnm6`V}oSQlrX(u%OWnC zoLPy&Q;1Jui&7ST0~#+}I^&?vcE*t47~Xq#YwvA^6^} z`WkC)$AkNub|t@S!$8CBlwbV~?yp&@9h{D|3z-vJXgzRC5^nYm+PyPcgRzAnEi6Q^gslXYRv4nycsy-SJu?lMps-? zV`U*#WnFsdPLL)Q$AmD|0`UaC4ND07+&UmOu!eHruzV|OUox<+Jl|Mr@6~C`T@P%s zW7sgXLF2SSe9Fl^O(I*{9wsFSYb2l%-;&Pi^dpv!{)C3d0AlNY6!4fgmSgj_wQ*7Am7&$z;Jg&wgR-Ih;lUvWS|KTSg!&s_E9_bXBkZvGiC6bFKDWZxsD$*NZ#_8bl zG1P-#@?OQzED7@jlMJTH@V!6k;W>auvft)}g zhoV{7$q=*;=l{O>Q4a@ ziMjf_u*o^PsO)#BjC%0^h>Xp@;5$p{JSYDt)zbb}s{Kbt!T*I@Pk@X0zds6wsefuU zW$XY%yyRGC94=6mf?x+bbA5CDQ2AgW1T-jVAJbm7K(gp+;v6E0WI#kuACgV$r}6L? zd|Tj?^%^*N&b>Dd{Wr$FS2qI#Ucs1yd4N+RBUQiSZGujH`#I)mG&VKoDh=KKFl4=G z&MagXl6*<)$6P}*Tiebpz5L=oMaPrN+caUXRJ`D?=K9!e0f{@D&cZLKN?iNP@X0aF zE(^pl+;*T5qt?1jRC=5PMgV!XNITRLS_=9{CJExaQj;lt!&pdzpK?8p>%Mb+D z?yO*uSung=-`QQ@yX@Hyd4@CI^r{2oiu`%^bNkz+Nkk!IunjwNC|WcqvX~k=><-I3 zDQdbdb|!v+Iz01$w@aMl!R)koD77Xp;eZwzSl-AT zr@Vu{=xvgfq9akRrrM)}=!=xcs+U1JO}{t(avgz`6RqiiX<|hGG1pmop8k6Q+G_mv zJv|RfDheUp2L3=^C=4aCBMBn0aRCU(DQwX-W(RkRwmLeuJYF<0urcaf(=7)JPg<3P zQs!~G)9CT18o!J4{zX{_e}4eS)U-E)0FAt}wEI(c0%HkxgggW;(1E=>J17_hsH^sP z%lT0LGgbUXHx-K*CI-MCrP66UP0PvGqM$MkeLyqHdbgP|_Cm!7te~b8p+e6sQ_3k| zVcwTh6d83ltdnR>D^)BYQpDKlLk3g0Hdcgz2}%qUs9~~Rie)A-BV1mS&naYai#xcZ z(d{8=-LVpTp}2*y)|gR~;qc7fp26}lPcLZ#=JpYcn3AT9(UIdOyg+d(P5T7D&*P}# zQCYplZO5|7+r19%9e`v^vfSS1sbX1c%=w1;oyruXB%Kl$ACgKQ6=qNWLsc=28xJjg zwvsI5-%SGU|3p>&zXVl^vVtQT3o-#$UT9LI@Npz~6=4!>mc431VRNN8od&Ul^+G_kHC`G=6WVWM z%9eWNyy(FTO|A+@x}Ou3CH)oi;t#7rAxdIXfNFwOj_@Y&TGz6P_sqiB`Q6Lxy|Q{`|fgmRG(k+!#b*M+Z9zFce)f-7;?Km5O=LHV9f9_87; zF7%R2B+$?@sH&&-$@tzaPYkw0;=i|;vWdI|Wl3q_Zu>l;XdIw2FjV=;Mq5t1Q0|f< zs08j54Bp`3RzqE=2enlkZxmX6OF+@|2<)A^RNQpBd6o@OXl+i)zO%D4iGiQNuXd+zIR{_lb96{lc~bxsBveIw6umhShTX+3@ZJ=YHh@ zWY3(d0azg;7oHn>H<>?4@*RQbi>SmM=JrHvIG(~BrvI)#W(EAeO6fS+}mxxcc+X~W6&YVl86W9WFSS}Vz-f9vS?XUDBk)3TcF z8V?$4Q)`uKFq>xT=)Y9mMFVTUk*NIA!0$?RP6Ig0TBmUFrq*Q-Agq~DzxjStQyJ({ zBeZ;o5qUUKg=4Hypm|}>>L=XKsZ!F$yNTDO)jt4H0gdQ5$f|d&bnVCMMXhNh)~mN z@_UV6D7MVlsWz+zM+inZZp&P4fj=tm6fX)SG5H>OsQf_I8c~uGCig$GzuwViK54bcgL;VN|FnyQl>Ed7(@>=8$a_UKIz|V6CeVSd2(P z0Uu>A8A+muM%HLFJQ9UZ5c)BSAv_zH#1f02x?h9C}@pN@6{>UiAp>({Fn(T9Q8B z^`zB;kJ5b`>%dLm+Ol}ty!3;8f1XDSVX0AUe5P#@I+FQ-`$(a;zNgz)4x5hz$Hfbg z!Q(z26wHLXko(1`;(BAOg_wShpX0ixfWq3ponndY+u%1gyX)_h=v1zR#V}#q{au6; z!3K=7fQwnRfg6FXtNQmP>`<;!N137paFS%y?;lb1@BEdbvQHYC{976l`cLqn;b8lp zIDY>~m{gDj(wfnK!lpW6pli)HyLEiUrNc%eXTil|F2s(AY+LW5hkKb>TQ3|Q4S9rr zpDs4uK_co6XPsn_z$LeS{K4jFF`2>U`tbgKdyDne`xmR<@6AA+_hPNKCOR-Zqv;xk zu5!HsBUb^!4uJ7v0RuH-7?l?}b=w5lzzXJ~gZcxRKOovSk@|#V+MuX%Y+=;14i*%{)_gSW9(#4%)AV#3__kac1|qUy!uyP{>?U#5wYNq}y$S9pCc zFc~4mgSC*G~j0u#qqp9 z${>3HV~@->GqEhr_Xwoxq?Hjn#=s2;i~g^&Hn|aDKpA>Oc%HlW(KA1?BXqpxB;Ydx)w;2z^MpjJ(Qi(X!$5RC z*P{~%JGDQqojV>2JbEeCE*OEu!$XJ>bWA9Oa_Hd;y)F%MhBRi*LPcdqR8X`NQ&1L# z5#9L*@qxrx8n}LfeB^J{%-?SU{FCwiWyHp682F+|pa+CQa3ZLzBqN1{)h4d6+vBbV zC#NEbQLC;}me3eeYnOG*nXOJZEU$xLZ1<1Y=7r0(-U0P6-AqwMAM`a(Ed#7vJkn6plb4eI4?2y3yOTGmmDQ!z9`wzbf z_OY#0@5=bnep;MV0X_;;SJJWEf^E6Bd^tVJ9znWx&Ks8t*B>AM@?;D4oWUGc z!H*`6d7Cxo6VuyS4Eye&L1ZRhrRmN6Lr`{NL(wDbif|y&z)JN>Fl5#Wi&mMIr5i;x zBx}3YfF>>8EC(fYnmpu~)CYHuHCyr5*`ECap%t@y=jD>!_%3iiE|LN$mK9>- zHdtpy8fGZtkZF?%TW~29JIAfi2jZT8>OA7=h;8T{{k?c2`nCEx9$r zS+*&vt~2o^^J+}RDG@+9&M^K*z4p{5#IEVbz`1%`m5c2};aGt=V?~vIM}ZdPECDI)47|CWBCfDWUbxBCnmYivQ*0Nu_xb*C>~C9(VjHM zxe<*D<#dQ8TlpMX2c@M<9$w!RP$hpG4cs%AI){jp*Sj|*`m)5(Bw*A0$*i-(CA5#%>a)$+jI2C9r6|(>J8InryENI z$NohnxDUB;wAYDwrb*!N3noBTKPpPN}~09SEL18tkG zxgz(RYU_;DPT{l?Q$+eaZaxnsWCA^ds^0PVRkIM%bOd|G2IEBBiz{&^JtNsODs;5z zICt_Zj8wo^KT$7Bg4H+y!Df#3mbl%%?|EXe!&(Vmac1DJ*y~3+kRKAD=Ovde4^^%~ zw<9av18HLyrf*_>Slp;^i`Uy~`mvBjZ|?Ad63yQa#YK`4+c6;pW4?XIY9G1(Xh9WO8{F-Aju+nS9Vmv=$Ac0ienZ+p9*O%NG zMZKy5?%Z6TAJTE?o5vEr0r>f>hb#2w2U3DL64*au_@P!J!TL`oH2r*{>ffu6|A7tv zL4juf$DZ1MW5ZPsG!5)`k8d8c$J$o;%EIL0va9&GzWvkS%ZsGb#S(?{!UFOZ9<$a| zY|a+5kmD5N&{vRqkgY>aHsBT&`rg|&kezoD)gP0fsNYHsO#TRc_$n6Lf1Z{?+DLziXlHrq4sf(!>O{?Tj;Eh@%)+nRE_2VxbN&&%%caU#JDU%vL3}Cb zsb4AazPI{>8H&d=jUaZDS$-0^AxE@utGs;-Ez_F(qC9T=UZX=>ok2k2 ziTn{K?y~a5reD2A)P${NoI^>JXn>`IeArow(41c-Wm~)wiryEP(OS{YXWi7;%dG9v zI?mwu1MxD{yp_rrk!j^cKM)dc4@p4Ezyo%lRN|XyD}}>v=Xoib0gOcdXrQ^*61HNj z=NP|pd>@yfvr-=m{8$3A8TQGMTE7g=z!%yt`8`Bk-0MMwW~h^++;qyUP!J~ykh1GO z(FZ59xuFR$(WE;F@UUyE@Sp>`aVNjyj=Ty>_Vo}xf`e7`F;j-IgL5`1~-#70$9_=uBMq!2&1l zomRgpD58@)YYfvLtPW}{C5B35R;ZVvB<<#)x%srmc_S=A7F@DW8>QOEGwD6suhwCg z>Pa+YyULhmw%BA*4yjDp|2{!T98~<6Yfd(wo1mQ!KWwq0eg+6)o1>W~f~kL<-S+P@$wx*zeI|1t7z#Sxr5 zt6w+;YblPQNplq4Z#T$GLX#j6yldXAqj>4gAnnWtBICUnA&-dtnlh=t0Ho_vEKwV` z)DlJi#!@nkYV#$!)@>udAU*hF?V`2$Hf=V&6PP_|r#Iv*J$9)pF@X3`k;5})9^o4y z&)~?EjX5yX12O(BsFy-l6}nYeuKkiq`u9145&3Ssg^y{5G3Pse z9w(YVa0)N-fLaBq1`P!_#>SS(8fh_5!f{UrgZ~uEdeMJIz7DzI5!NHHqQtm~#CPij z?=N|J>nPR6_sL7!f4hD_|KH`vf8(Wpnj-(gPWH+ZvID}%?~68SwhPTC3u1_cB`otq z)U?6qo!ZLi5b>*KnYHWW=3F!p%h1;h{L&(Q&{qY6)_qxNfbP6E3yYpW!EO+IW3?@J z);4>g4gnl^8klu7uA>eGF6rIGSynacogr)KUwE_R4E5Xzi*Qir@b-jy55-JPC8c~( zo!W8y9OGZ&`xmc8;=4-U9=h{vCqfCNzYirONmGbRQlR`WWlgnY+1wCXbMz&NT~9*| z6@FrzP!LX&{no2!Ln_3|I==_4`@}V?4a;YZKTdw;vT<+K+z=uWbW(&bXEaWJ^W8Td z-3&1bY^Z*oM<=M}LVt>_j+p=2Iu7pZmbXrhQ_k)ysE9yXKygFNw$5hwDn(M>H+e1&9BM5!|81vd%r%vEm zqxY3?F@fb6O#5UunwgAHR9jp_W2zZ}NGp2%mTW@(hz7$^+a`A?mb8|_G*GNMJ) zjqegXQio=i@AINre&%ofexAr95aop5C+0MZ0m-l=MeO8m3epm7U%vZB8+I+C*iNFM z#T3l`gknX;D$-`2XT^Cg*vrv=RH+P;_dfF++cP?B_msQI4j+lt&rX2)3GaJx%W*Nn zkML%D{z5tpHH=dksQ*gzc|}gzW;lwAbxoR07VNgS*-c3d&8J|;@3t^ zVUz*J*&r7DFRuFVDCJDK8V9NN5hvpgGjwx+5n)qa;YCKe8TKtdnh{I7NU9BCN!0dq zczrBk8pE{{@vJa9ywR@mq*J=v+PG;?fwqlJVhijG!3VmIKs>9T6r7MJpC)m!Tc#>g zMtVsU>wbwFJEfwZ{vB|ZlttNe83)$iz`~#8UJ^r)lJ@HA&G#}W&ZH*;k{=TavpjWE z7hdyLZPf*X%Gm}i`Y{OGeeu^~nB8=`{r#TUrM-`;1cBvEd#d!kPqIgYySYhN-*1;L z^byj%Yi}Gx)Wnkosi337BKs}+5H5dth1JA{Ir-JKN$7zC)*}hqeoD(WfaUDPT>0`- z(6sa0AoIqASwF`>hP}^|)a_j2s^PQn*qVC{Q}htR z5-)duBFXT_V56-+UohKXlq~^6uf!6sA#ttk1o~*QEy_Y-S$gAvq47J9Vtk$5oA$Ct zYhYJ@8{hsC^98${!#Ho?4y5MCa7iGnfz}b9jE~h%EAAv~Qxu)_rAV;^cygV~5r_~?l=B`zObj7S=H=~$W zPtI_m%g$`kL_fVUk9J@>EiBH zOO&jtn~&`hIFMS5S`g8w94R4H40mdNUH4W@@XQk1sr17b{@y|JB*G9z1|CrQjd+GX z6+KyURG3;!*BQrentw{B2R&@2&`2}n(z-2&X7#r!{yg@Soy}cRD~j zj9@UBW+N|4HW4AWapy4wfUI- zZ`gSL6DUlgj*f1hSOGXG0IVH8HxK?o2|3HZ;KW{K+yPAlxtb)NV_2AwJm|E)FRs&& z=c^e7bvUsztY|+f^k7NXs$o1EUq>cR7C0$UKi6IooHWlK_#?IWDkvywnzg&ThWo^? z2O_N{5X39#?eV9l)xI(>@!vSB{DLt*oY!K1R8}_?%+0^C{d9a%N4 zoxHVT1&Lm|uDX%$QrBun5e-F`HJ^T$ zmzv)p@4ZHd_w9!%Hf9UYNvGCw2TTTbrj9pl+T9%-_-}L(tES>Or-}Z4F*{##n3~L~TuxjirGuIY#H7{%$E${?p{Q01 zi6T`n;rbK1yIB9jmQNycD~yZq&mbIsFWHo|ZAChSFPQa<(%d8mGw*V3fh|yFoxOOiWJd(qvVb!Z$b88cg->N=qO*4k~6;R==|9ihg&riu#P~s4Oap9O7f%crSr^rljeIfXDEg>wi)&v*a%7zpz<9w z*r!3q9J|390x`Zk;g$&OeN&ctp)VKRpDSV@kU2Q>jtok($Y-*x8_$2piTxun81@vt z!Vj?COa0fg2RPXMSIo26T=~0d`{oGP*eV+$!0I<(4azk&Vj3SiG=Q!6mX0p$z7I}; z9BJUFgT-K9MQQ-0@Z=^7R<{bn2Fm48endsSs`V7_@%8?Bxkqv>BDoVcj?K#dV#uUP zL1ND~?D-|VGKe3Rw_7-Idpht>H6XRLh*U7epS6byiGvJpr%d}XwfusjH9g;Z98H`x zyde%%5mhGOiL4wljCaWCk-&uE4_OOccb9c!ZaWt4B(wYl!?vyzl%7n~QepN&eFUrw zFIOl9c({``6~QD+43*_tzP{f2x41h(?b43^y6=iwyB)2os5hBE!@YUS5?N_tXd=h( z)WE286Fbd>R4M^P{!G)f;h<3Q>Fipuy+d2q-)!RyTgt;wr$(?9ox3;q+{E*ZQHhOn;lM`cjnu9 zXa48ks-v(~b*;MAI<>YZH(^NV8vjb34beE<_cwKlJoR;k6lJNSP6v}uiyRD?|0w+X@o1ONrH8a$fCxXpf? z?$DL0)7|X}Oc%h^zrMKWc-NS9I0Utu@>*j}b@tJ=ixQSJ={4@854wzW@E>VSL+Y{i z#0b=WpbCZS>kUCO_iQz)LoE>P5LIG-hv9E+oG}DtlIDF>$tJ1aw9^LuhLEHt?BCj& z(O4I8v1s#HUi5A>nIS-JK{v!7dJx)^Yg%XjNmlkWAq2*cv#tHgz`Y(bETc6CuO1VkN^L-L3j_x<4NqYb5rzrLC-7uOv z!5e`GZt%B782C5-fGnn*GhDF$%(qP<74Z}3xx+{$4cYKy2ikxI7B2N+2r07DN;|-T->nU&!=Cm#rZt%O_5c&1Z%nlWq3TKAW0w zQqemZw_ue--2uKQsx+niCUou?HjD`xhEjjQd3%rrBi82crq*~#uA4+>vR<_S{~5ce z-2EIl?~s z1=GVL{NxP1N3%=AOaC}j_Fv=ur&THz zyO!d9kHq|c73kpq`$+t+8Bw7MgeR5~`d7ChYyGCBWSteTB>8WAU(NPYt2Dk`@#+}= zI4SvLlyk#pBgVigEe`?NG*vl7V6m+<}%FwPV=~PvvA)=#ths==DRTDEYh4V5}Cf$z@#;< zyWfLY_5sP$gc3LLl2x+Ii)#b2nhNXJ{R~vk`s5U7Nyu^3yFg&D%Txwj6QezMX`V(x z=C`{76*mNb!qHHs)#GgGZ_7|vkt9izl_&PBrsu@}L`X{95-2jf99K)0=*N)VxBX2q z((vkpP2RneSIiIUEnGb?VqbMb=Zia+rF~+iqslydE34cSLJ&BJW^3knX@M;t*b=EA zNvGzv41Ld_T+WT#XjDB840vovUU^FtN_)G}7v)1lPetgpEK9YS^OWFkPoE{ovj^=@ zO9N$S=G$1ecndT_=5ehth2Lmd1II-PuT~C9`XVePw$y8J#dpZ?Tss<6wtVglm(Ok7 z3?^oi@pPio6l&!z8JY(pJvG=*pI?GIOu}e^EB6QYk$#FJQ%^AIK$I4epJ+9t?KjqA+bkj&PQ*|vLttme+`9G=L% ziadyMw_7-M)hS(3E$QGNCu|o23|%O+VN7;Qggp?PB3K-iSeBa2b}V4_wY`G1Jsfz4 z9|SdB^;|I8E8gWqHKx!vj_@SMY^hLEIbSMCuE?WKq=c2mJK z8LoG-pnY!uhqFv&L?yEuxo{dpMTsmCn)95xanqBrNPTgXP((H$9N${Ow~Is-FBg%h z53;|Y5$MUN)9W2HBe2TD`ct^LHI<(xWrw}$qSoei?}s)&w$;&!14w6B6>Yr6Y8b)S z0r71`WmAvJJ`1h&poLftLUS6Ir zC$bG9!Im_4Zjse)#K=oJM9mHW1{%l8sz$1o?ltdKlLTxWWPB>Vk22czVt|1%^wnN@*!l)}?EgtvhC>vlHm^t+ogpgHI1_$1ox9e;>0!+b(tBrmXRB`PY1vp-R**8N7 zGP|QqI$m(Rdu#=(?!(N}G9QhQ%o!aXE=aN{&wtGP8|_qh+7a_j_sU5|J^)vxq;# zjvzLn%_QPHZZIWu1&mRAj;Sa_97p_lLq_{~j!M9N^1yp3U_SxRqK&JnR%6VI#^E12 z>CdOVI^_9aPK2eZ4h&^{pQs}xsijXgFYRIxJ~N7&BB9jUR1fm!(xl)mvy|3e6-B3j zJn#ajL;bFTYJ2+Q)tDjx=3IklO@Q+FFM}6UJr6km7hj7th9n_&JR7fnqC!hTZoM~T zBeaVFp%)0cbPhejX<8pf5HyRUj2>aXnXBqDJe73~J%P(2C?-RT{c3NjE`)om! zl$uewSgWkE66$Kb34+QZZvRn`fob~Cl9=cRk@Es}KQm=?E~CE%spXaMO6YmrMl%9Q zlA3Q$3|L1QJ4?->UjT&CBd!~ru{Ih^in&JXO=|<6J!&qp zRe*OZ*cj5bHYlz!!~iEKcuE|;U4vN1rk$xq6>bUWD*u(V@8sG^7>kVuo(QL@Ki;yL zWC!FT(q{E8#on>%1iAS0HMZDJg{Z{^!De(vSIq&;1$+b)oRMwA3nc3mdTSG#3uYO_ z>+x;7p4I;uHz?ZB>dA-BKl+t-3IB!jBRgdvAbW!aJ(Q{aT>+iz?91`C-xbe)IBoND z9_Xth{6?(y3rddwY$GD65IT#f3<(0o#`di{sh2gm{dw*#-Vnc3r=4==&PU^hCv$qd zjw;>i&?L*Wq#TxG$mFIUf>eK+170KG;~+o&1;Tom9}}mKo23KwdEM6UonXgc z!6N(@k8q@HPw{O8O!lAyi{rZv|DpgfU{py+j(X_cwpKqcalcqKIr0kM^%Br3SdeD> zHSKV94Yxw;pjzDHo!Q?8^0bb%L|wC;4U^9I#pd5O&eexX+Im{ z?jKnCcsE|H?{uGMqVie_C~w7GX)kYGWAg%-?8|N_1#W-|4F)3YTDC+QSq1s!DnOML3@d`mG%o2YbYd#jww|jD$gotpa)kntakp#K;+yo-_ZF9qrNZw<%#C zuPE@#3RocLgPyiBZ+R_-FJ_$xP!RzWm|aN)S+{$LY9vvN+IW~Kf3TsEIvP+B9Mtm! zpfNNxObWQpLoaO&cJh5>%slZnHl_Q~(-Tfh!DMz(dTWld@LG1VRF`9`DYKhyNv z2pU|UZ$#_yUx_B_|MxUq^glT}O5Xt(Vm4Mr02><%C)@v;vPb@pT$*yzJ4aPc_FZ3z z3}PLoMBIM>q_9U2rl^sGhk1VUJ89=*?7|v`{!Z{6bqFMq(mYiA?%KbsI~JwuqVA9$H5vDE+VocjX+G^%bieqx->s;XWlKcuv(s%y%D5Xbc9+ zc(_2nYS1&^yL*ey664&4`IoOeDIig}y-E~_GS?m;D!xv5-xwz+G`5l6V+}CpeJDi^ z%4ed$qowm88=iYG+(`ld5Uh&>Dgs4uPHSJ^TngXP_V6fPyl~>2bhi20QB%lSd#yYn zO05?KT1z@?^-bqO8Cg`;ft>ilejsw@2%RR7;`$Vs;FmO(Yr3Fp`pHGr@P2hC%QcA|X&N2Dn zYf`MqXdHi%cGR@%y7Rg7?d3?an){s$zA{!H;Ie5exE#c~@NhQUFG8V=SQh%UxUeiV zd7#UcYqD=lk-}sEwlpu&H^T_V0{#G?lZMxL7ih_&{(g)MWBnCZxtXg znr#}>U^6!jA%e}@Gj49LWG@*&t0V>Cxc3?oO7LSG%~)Y5}f7vqUUnQ;STjdDU}P9IF9d9<$;=QaXc zL1^X7>fa^jHBu_}9}J~#-oz3Oq^JmGR#?GO7b9a(=R@fw@}Q{{@`Wy1vIQ#Bw?>@X z-_RGG@wt|%u`XUc%W{J z>iSeiz8C3H7@St3mOr_mU+&bL#Uif;+Xw-aZdNYUpdf>Rvu0i0t6k*}vwU`XNO2he z%miH|1tQ8~ZK!zmL&wa3E;l?!!XzgV#%PMVU!0xrDsNNZUWKlbiOjzH-1Uoxm8E#r`#2Sz;-o&qcqB zC-O_R{QGuynW14@)7&@yw1U}uP(1cov)twxeLus0s|7ayrtT8c#`&2~Fiu2=R;1_4bCaD=*E@cYI>7YSnt)nQc zohw5CsK%m?8Ack)qNx`W0_v$5S}nO|(V|RZKBD+btO?JXe|~^Qqur%@eO~<8-L^9d z=GA3-V14ng9L29~XJ>a5k~xT2152zLhM*@zlp2P5Eu}bywkcqR;ISbas&#T#;HZSf z2m69qTV(V@EkY(1Dk3`}j)JMo%ZVJ*5eB zYOjIisi+igK0#yW*gBGj?@I{~mUOvRFQR^pJbEbzFxTubnrw(Muk%}jI+vXmJ;{Q6 zrSobKD>T%}jV4Ub?L1+MGOD~0Ir%-`iTnWZN^~YPrcP5y3VMAzQ+&en^VzKEb$K!Q z<7Dbg&DNXuow*eD5yMr+#08nF!;%4vGrJI++5HdCFcGLfMW!KS*Oi@=7hFwDG!h2< zPunUEAF+HncQkbfFj&pbzp|MU*~60Z(|Ik%Tn{BXMN!hZOosNIseT?R;A`W?=d?5X zK(FB=9mZusYahp|K-wyb={rOpdn=@;4YI2W0EcbMKyo~-#^?h`BA9~o285%oY zfifCh5Lk$SY@|2A@a!T2V+{^!psQkx4?x0HSV`(w9{l75QxMk!)U52Lbhn{8ol?S) zCKo*7R(z!uk<6*qO=wh!Pul{(qq6g6xW;X68GI_CXp`XwO zxuSgPRAtM8K7}5E#-GM!*ydOOG_{A{)hkCII<|2=ma*71ci_-}VPARm3crFQjLYV! z9zbz82$|l01mv`$WahE2$=fAGWkd^X2kY(J7iz}WGS z@%MyBEO=A?HB9=^?nX`@nh;7;laAjs+fbo!|K^mE!tOB>$2a_O0y-*uaIn8k^6Y zSbuv;5~##*4Y~+y7Z5O*3w4qgI5V^17u*ZeupVGH^nM&$qmAk|anf*>r zWc5CV;-JY-Z@Uq1Irpb^O`L_7AGiqd*YpGUShb==os$uN3yYvb`wm6d=?T*it&pDk zo`vhw)RZX|91^^Wa_ti2zBFyWy4cJu#g)_S6~jT}CC{DJ_kKpT`$oAL%b^!2M;JgT zM3ZNbUB?}kP(*YYvXDIH8^7LUxz5oE%kMhF!rnPqv!GiY0o}NR$OD=ITDo9r%4E>E0Y^R(rS^~XjWyVI6 zMOR5rPXhTp*G*M&X#NTL`Hu*R+u*QNoiOKg4CtNPrjgH>c?Hi4MUG#I917fx**+pJfOo!zFM&*da&G_x)L(`k&TPI*t3e^{crd zX<4I$5nBQ8Ax_lmNRa~E*zS-R0sxkz`|>7q_?*e%7bxqNm3_eRG#1ae3gtV9!fQpY z+!^a38o4ZGy9!J5sylDxZTx$JmG!wg7;>&5H1)>f4dXj;B+@6tMlL=)cLl={jLMxY zbbf1ax3S4>bwB9-$;SN2?+GULu;UA-35;VY*^9Blx)Jwyb$=U!D>HhB&=jSsd^6yw zL)?a|>GxU!W}ocTC(?-%z3!IUhw^uzc`Vz_g>-tv)(XA#JK^)ZnC|l1`@CdX1@|!| z_9gQ)7uOf?cR@KDp97*>6X|;t@Y`k_N@)aH7gY27)COv^P3ya9I{4z~vUjLR9~z1Z z5=G{mVtKH*&$*t0@}-i_v|3B$AHHYale7>E+jP`ClqG%L{u;*ff_h@)al?RuL7tOO z->;I}>%WI{;vbLP3VIQ^iA$4wl6@0sDj|~112Y4OFjMs`13!$JGkp%b&E8QzJw_L5 zOnw9joc0^;O%OpF$Qp)W1HI!$4BaXX84`%@#^dk^hFp^pQ@rx4g(8Xjy#!X%+X5Jd@fs3amGT`}mhq#L97R>OwT5-m|h#yT_-v@(k$q7P*9X~T*3)LTdzP!*B} z+SldbVWrrwQo9wX*%FyK+sRXTa@O?WM^FGWOE?S`R(0P{<6p#f?0NJvnBia?k^fX2 zNQs7K-?EijgHJY}&zsr;qJ<*PCZUd*x|dD=IQPUK_nn)@X4KWtqoJNHkT?ZWL_hF? zS8lp2(q>;RXR|F;1O}EE#}gCrY~#n^O`_I&?&z5~7N;zL0)3Tup`%)oHMK-^r$NT% zbFg|o?b9w(q@)6w5V%si<$!U<#}s#x@0aX-hP>zwS#9*75VXA4K*%gUc>+yzupTDBOKH8WR4V0pM(HrfbQ&eJ79>HdCvE=F z|J>s;;iDLB^3(9}?biKbxf1$lI!*Z%*0&8UUq}wMyPs_hclyQQi4;NUY+x2qy|0J; zhn8;5)4ED1oHwg+VZF|80<4MrL97tGGXc5Sw$wAI#|2*cvQ=jB5+{AjMiDHmhUC*a zlmiZ`LAuAn_}hftXh;`Kq0zblDk8?O-`tnilIh|;3lZp@F_osJUV9`*R29M?7H{Fy z`nfVEIDIWXmU&YW;NjU8)EJpXhxe5t+scf|VXM!^bBlwNh)~7|3?fWwo_~ZFk(22% zTMesYw+LNx3J-_|DM~`v93yXe=jPD{q;li;5PD?Dyk+b? zo21|XpT@)$BM$%F=P9J19Vi&1#{jM3!^Y&fr&_`toi`XB1!n>sbL%U9I5<7!@?t)~ z;&H%z>bAaQ4f$wIzkjH70;<8tpUoxzKrPhn#IQfS%9l5=Iu))^XC<58D!-O z{B+o5R^Z21H0T9JQ5gNJnqh#qH^na|z92=hONIM~@_iuOi|F>jBh-?aA20}Qx~EpDGElELNn~|7WRXRFnw+Wdo`|# zBpU=Cz3z%cUJ0mx_1($X<40XEIYz(`noWeO+x#yb_pwj6)R(__%@_Cf>txOQ74wSJ z0#F3(zWWaR-jMEY$7C*3HJrohc79>MCUu26mfYN)f4M~4gD`}EX4e}A!U}QV8!S47 z6y-U-%+h`1n`*pQuKE%Av0@)+wBZr9mH}@vH@i{v(m-6QK7Ncf17x_D=)32`FOjjo zg|^VPf5c6-!FxN{25dvVh#fog=NNpXz zfB$o+0jbRkHH{!TKhE709f+jI^$3#v1Nmf80w`@7-5$1Iv_`)W^px8P-({xwb;D0y z7LKDAHgX<84?l!I*Dvi2#D@oAE^J|g$3!)x1Ua;_;<@#l1fD}lqU2_tS^6Ht$1Wl} zBESo7o^)9-Tjuz$8YQSGhfs{BQV6zW7dA?0b(Dbt=UnQs&4zHfe_sj{RJ4uS-vQpC zX;Bbsuju4%!o8?&m4UZU@~ZZjeFF6ex2ss5_60_JS_|iNc+R0GIjH1@Z z=rLT9%B|WWgOrR7IiIwr2=T;Ne?30M!@{%Qf8o`!>=s<2CBpCK_TWc(DX51>e^xh8 z&@$^b6CgOd7KXQV&Y4%}_#uN*mbanXq(2=Nj`L7H7*k(6F8s6{FOw@(DzU`4-*77{ zF+dxpv}%mFpYK?>N_2*#Y?oB*qEKB}VoQ@bzm>ptmVS_EC(#}Lxxx730trt0G)#$b zE=wVvtqOct1%*9}U{q<)2?{+0TzZzP0jgf9*)arV)*e!f`|jgT{7_9iS@e)recI#z zbzolURQ+TOzE!ymqvBY7+5NnAbWxvMLsLTwEbFqW=CPyCsmJ}P1^V30|D5E|p3BC5 z)3|qgw@ra7aXb-wsa|l^in~1_fm{7bS9jhVRkYVO#U{qMp z)Wce+|DJ}4<2gp8r0_xfZpMo#{Hl2MfjLcZdRB9(B(A(f;+4s*FxV{1F|4d`*sRNd zp4#@sEY|?^FIJ;tmH{@keZ$P(sLh5IdOk@k^0uB^BWr@pk6mHy$qf&~rI>P*a;h0C{%oA*i!VjWn&D~O#MxN&f@1Po# zKN+ zrGrkSjcr?^R#nGl<#Q722^wbYcgW@{+6CBS<1@%dPA8HC!~a`jTz<`g_l5N1M@9wn9GOAZ>nqNgq!yOCbZ@1z`U_N`Z>}+1HIZxk*5RDc&rd5{3qjRh8QmT$VyS;jK z;AF+r6XnnCp=wQYoG|rT2@8&IvKq*IB_WvS%nt%e{MCFm`&W*#LXc|HrD?nVBo=(8*=Aq?u$sDA_sC_RPDUiQ+wnIJET8vx$&fxkW~kP9qXKt zozR)@xGC!P)CTkjeWvXW5&@2?)qt)jiYWWBU?AUtzAN}{JE1I)dfz~7$;}~BmQF`k zpn11qmObXwRB8&rnEG*#4Xax3XBkKlw(;tb?Np^i+H8m(Wyz9k{~ogba@laiEk;2! zV*QV^6g6(QG%vX5Um#^sT&_e`B1pBW5yVth~xUs#0}nv?~C#l?W+9Lsb_5)!71rirGvY zTIJ$OPOY516Y|_014sNv+Z8cc5t_V=i>lWV=vNu#!58y9Zl&GsMEW#pPYPYGHQ|;vFvd*9eM==$_=vc7xnyz0~ zY}r??$<`wAO?JQk@?RGvkWVJlq2dk9vB(yV^vm{=NVI8dhsX<)O(#nr9YD?I?(VmQ z^r7VfUBn<~p3()8yOBjm$#KWx!5hRW)5Jl7wY@ky9lNM^jaT##8QGVsYeaVywmpv>X|Xj7gWE1Ezai&wVLt3p)k4w~yrskT-!PR!kiyQlaxl(( zXhF%Q9x}1TMt3~u@|#wWm-Vq?ZerK={8@~&@9r5JW}r#45#rWii};t`{5#&3$W)|@ zbAf2yDNe0q}NEUvq_Quq3cTjcw z@H_;$hu&xllCI9CFDLuScEMg|x{S7GdV8<&Mq=ezDnRZAyX-8gv97YTm0bg=d)(>N z+B2FcqvI9>jGtnK%eO%y zoBPkJTk%y`8TLf4)IXPBn`U|9>O~WL2C~C$z~9|0m*YH<-vg2CD^SX#&)B4ngOSG$ zV^wmy_iQk>dfN@Pv(ckfy&#ak@MLC7&Q6Ro#!ezM*VEh`+b3Jt%m(^T&p&WJ2Oqvj zs-4nq0TW6cv~(YI$n0UkfwN}kg3_fp?(ijSV#tR9L0}l2qjc7W?i*q01=St0eZ=4h zyGQbEw`9OEH>NMuIe)hVwYHsGERWOD;JxEiO7cQv%pFCeR+IyhwQ|y@&^24k+|8fD zLiOWFNJ2&vu2&`Jv96_z-Cd5RLgmeY3*4rDOQo?Jm`;I_(+ejsPM03!ly!*Cu}Cco zrQSrEDHNyzT(D5s1rZq!8#?f6@v6dB7a-aWs(Qk>N?UGAo{gytlh$%_IhyL7h?DLXDGx zgxGEBQoCAWo-$LRvM=F5MTle`M})t3vVv;2j0HZY&G z22^iGhV@uaJh(XyyY%} zd4iH_UfdV#T=3n}(Lj^|n;O4|$;xhu*8T3hR1mc_A}fK}jfZ7LX~*n5+`8N2q#rI$ z@<_2VANlYF$vIH$ zl<)+*tIWW78IIINA7Rr7i{<;#^yzxoLNkXL)eSs=%|P>$YQIh+ea_3k z_s7r4%j7%&*NHSl?R4k%1>Z=M9o#zxY!n8sL5>BO-ZP;T3Gut>iLS@U%IBrX6BA3k z)&@q}V8a{X<5B}K5s(c(LQ=%v1ocr`t$EqqY0EqVjr65usa=0bkf|O#ky{j3)WBR(((L^wmyHRzoWuL2~WTC=`yZ zn%VX`L=|Ok0v7?s>IHg?yArBcync5rG#^+u)>a%qjES%dRZoIyA8gQ;StH z1Ao7{<&}6U=5}4v<)1T7t!J_CL%U}CKNs-0xWoTTeqj{5{?Be$L0_tk>M9o8 zo371}S#30rKZFM{`H_(L`EM9DGp+Mifk&IP|C2Zu_)Ghr4Qtpmkm1osCf@%Z$%t+7 zYH$Cr)Ro@3-QDeQJ8m+x6%;?YYT;k6Z0E-?kr>x33`H%*ueBD7Zx~3&HtWn0?2Wt} zTG}*|v?{$ajzt}xPzV%lL1t-URi8*Zn)YljXNGDb>;!905Td|mpa@mHjIH%VIiGx- zd@MqhpYFu4_?y5N4xiHn3vX&|e6r~Xt> zZG`aGq|yTNjv;9E+Txuoa@A(9V7g?1_T5FzRI;!=NP1Kqou1z5?%X~Wwb{trRfd>i z8&y^H)8YnKyA_Fyx>}RNmQIczT?w2J4SNvI{5J&}Wto|8FR(W;Qw#b1G<1%#tmYzQ zQ2mZA-PAdi%RQOhkHy9Ea#TPSw?WxwL@H@cbkZwIq0B!@ns}niALidmn&W?!Vd4Gj zO7FiuV4*6Mr^2xlFSvM;Cp_#r8UaqIzHJQg_z^rEJw&OMm_8NGAY2)rKvki|o1bH~ z$2IbfVeY2L(^*rMRU1lM5Y_sgrDS`Z??nR2lX;zyR=c%UyGb*%TC-Dil?SihkjrQy~TMv6;BMs7P8il`H7DmpVm@rJ;b)hW)BL)GjS154b*xq-NXq2cwE z^;VP7ua2pxvCmxrnqUYQMH%a%nHmwmI33nJM(>4LznvY*k&C0{8f*%?zggpDgkuz&JBx{9mfb@wegEl2v!=}Sq2Gaty0<)UrOT0{MZtZ~j5y&w zXlYa_jY)I_+VA-^#mEox#+G>UgvM!Ac8zI<%JRXM_73Q!#i3O|)lOP*qBeJG#BST0 zqohi)O!|$|2SeJQo(w6w7%*92S})XfnhrH_Z8qe!G5>CglP=nI7JAOW?(Z29;pXJ9 zR9`KzQ=WEhy*)WH>$;7Cdz|>*i>=##0bB)oU0OR>>N<21e4rMCHDemNi2LD>Nc$;& zQRFthpWniC1J6@Zh~iJCoLOxN`oCKD5Q4r%ynwgUKPlIEd#?QViIqovY|czyK8>6B zSP%{2-<;%;1`#0mG^B(8KbtXF;Nf>K#Di72UWE4gQ%(_26Koiad)q$xRL~?pN71ZZ zujaaCx~jXjygw;rI!WB=xrOJO6HJ!!w}7eiivtCg5K|F6$EXa)=xUC za^JXSX98W`7g-tm@uo|BKj39Dl;sg5ta;4qjo^pCh~{-HdLl6qI9Ix6f$+qiZ$}s= zNguKrU;u+T@ko(Vr1>)Q%h$?UKXCY>3se%&;h2osl2D zE4A9bd7_|^njDd)6cI*FupHpE3){4NQ*$k*cOWZ_?CZ>Z4_fl@n(mMnYK62Q1d@+I zr&O))G4hMihgBqRIAJkLdk(p(D~X{-oBUA+If@B}j& zsHbeJ3RzTq96lB7d($h$xTeZ^gP0c{t!Y0c)aQE;$FY2!mACg!GDEMKXFOPI^)nHZ z`aSPJpvV0|bbrzhWWkuPURlDeN%VT8tndV8?d)eN*i4I@u zVKl^6{?}A?P)Fsy?3oi#clf}L18t;TjNI2>eI&(ezDK7RyqFxcv%>?oxUlonv(px) z$vnPzRH`y5A(x!yOIfL0bmgeMQB$H5wenx~!ujQK*nUBW;@Em&6Xv2%s(~H5WcU2R z;%Nw<$tI)a`Ve!>x+qegJnQsN2N7HaKzrFqM>`6R*gvh%O*-%THt zrB$Nk;lE;z{s{r^PPm5qz(&lM{sO*g+W{sK+m3M_z=4=&CC>T`{X}1Vg2PEfSj2x_ zmT*(x;ov%3F?qoEeeM>dUn$a*?SIGyO8m806J1W1o+4HRhc2`9$s6hM#qAm zChQ87b~GEw{ADfs+5}FJ8+|bIlIv(jT$Ap#hSHoXdd9#w<#cA<1Rkq^*EEkknUd4& zoIWIY)sAswy6fSERVm&!SO~#iN$OgOX*{9@_BWFyJTvC%S++ilSfCrO(?u=Dc?CXZ zzCG&0yVR{Z`|ZF0eEApWEo#s9osV>F{uK{QA@BES#&;#KsScf>y zvs?vIbI>VrT<*!;XmQS=bhq%46-aambZ(8KU-wOO2=en~D}MCToB_u;Yz{)1ySrPZ z@=$}EvjTdzTWU7c0ZI6L8=yP+YRD_eMMos}b5vY^S*~VZysrkq<`cK3>>v%uy7jgq z0ilW9KjVDHLv0b<1K_`1IkbTOINs0=m-22c%M~l=^S}%hbli-3?BnNq?b`hx^HX2J zIe6ECljRL0uBWb`%{EA=%!i^4sMcj+U_TaTZRb+~GOk z^ZW!nky0n*Wb*r+Q|9H@ml@Z5gU&W`(z4-j!OzC1wOke`TRAYGZVl$PmQ16{3196( zO*?`--I}Qf(2HIwb2&1FB^!faPA2=sLg(@6P4mN)>Dc3i(B0;@O-y2;lM4akD>@^v z=u>*|!s&9zem70g7zfw9FXl1bpJW(C#5w#uy5!V?Q(U35A~$dR%LDVnq@}kQm13{} zd53q3N(s$Eu{R}k2esbftfjfOITCL;jWa$}(mmm}d(&7JZ6d3%IABCapFFYjdEjdK z&4Edqf$G^MNAtL=uCDRs&Fu@FXRgX{*0<(@c3|PNHa>L%zvxWS={L8%qw`STm+=Rd zA}FLspESSIpE_^41~#5yI2bJ=9`oc;GIL!JuW&7YetZ?0H}$$%8rW@*J37L-~Rsx!)8($nI4 zZhcZ2^=Y+p4YPl%j!nFJA|*M^gc(0o$i3nlphe+~-_m}jVkRN{spFs(o0ajW@f3K{ zDV!#BwL322CET$}Y}^0ixYj2w>&Xh12|R8&yEw|wLDvF!lZ#dOTHM9pK6@Nm-@9Lnng4ZHBgBSrr7KI8YCC9DX5Kg|`HsiwJHg2(7#nS;A{b3tVO?Z% za{m5b3rFV6EpX;=;n#wltDv1LE*|g5pQ+OY&*6qCJZc5oDS6Z6JD#6F)bWxZSF@q% z+1WV;m!lRB!n^PC>RgQCI#D1br_o^#iPk>;K2hB~0^<~)?p}LG%kigm@moD#q3PE+ zA^Qca)(xnqw6x>XFhV6ku9r$E>bWNrVH9fum0?4s?Rn2LG{Vm_+QJHse6xa%nzQ?k zKug4PW~#Gtb;#5+9!QBgyB@q=sk9=$S{4T>wjFICStOM?__fr+Kei1 z3j~xPqW;W@YkiUM;HngG!;>@AITg}vAE`M2Pj9Irl4w1fo4w<|Bu!%rh%a(Ai^Zhi zs92>v5;@Y(Zi#RI*ua*h`d_7;byQSa*v9E{2x$<-_=5Z<7{%)}4XExANcz@rK69T0x3%H<@frW>RA8^swA+^a(FxK| zFl3LD*ImHN=XDUkrRhp6RY5$rQ{bRgSO*(vEHYV)3Mo6Jy3puiLmU&g82p{qr0F?ohmbz)f2r{X2|T2 z$4fdQ=>0BeKbiVM!e-lIIs8wVTuC_m7}y4A_%ikI;Wm5$9j(^Y z(cD%U%k)X>_>9~t8;pGzL6L-fmQO@K; zo&vQzMlgY95;1BSkngY)e{`n0!NfVgf}2mB3t}D9@*N;FQ{HZ3Pb%BK6;5#-O|WI( zb6h@qTLU~AbVW#_6?c!?Dj65Now7*pU{h!1+eCV^KCuPAGs28~3k@ueL5+u|Z-7}t z9|lskE`4B7W8wMs@xJa{#bsCGDFoRSNSnmNYB&U7 zVGKWe%+kFB6kb)e;TyHfqtU6~fRg)f|>=5(N36)0+C z`hv65J<$B}WUc!wFAb^QtY31yNleq4dzmG`1wHTj=c*=hay9iD071Hc?oYoUk|M*_ zU1GihAMBsM@5rUJ(qS?9ZYJ6@{bNqJ`2Mr+5#hKf?doa?F|+^IR!8lq9)wS3tF_9n zW_?hm)G(M+MYb?V9YoX^_mu5h-LP^TL^!Q9Z7|@sO(rg_4+@=PdI)WL(B7`!K^ND- z-uIuVDCVEdH_C@c71YGYT^_Scf_dhB8Z2Xy6vGtBSlYud9vggOqv^L~F{BraSE_t} zIkP+Hp2&nH^-MNEs}^`oMLy11`PQW$T|K(`Bu*(f@)mv1-qY(_YG&J2M2<7k;;RK~ zL{Fqj9yCz8(S{}@c)S!65aF<=&eLI{hAMErCx&>i7OeDN>okvegO87OaG{Jmi<|}D zaT@b|0X{d@OIJ7zvT>r+eTzgLq~|Dpu)Z&db-P4z*`M$UL51lf>FLlq6rfG)%doyp z)3kk_YIM!03eQ8Vu_2fg{+osaEJPtJ-s36R+5_AEG12`NG)IQ#TF9c@$99%0iye+ zUzZ57=m2)$D(5Nx!n)=5Au&O0BBgwxIBaeI(mro$#&UGCr<;C{UjJVAbVi%|+WP(a zL$U@TYCxJ=1{Z~}rnW;7UVb7+ZnzgmrogDxhjLGo>c~MiJAWs&&;AGg@%U?Y^0JhL ze(x6Z74JG6FlOFK(T}SXQfhr}RIFl@QXKnIcXYF)5|V~e-}suHILKT-k|<*~Ij|VF zC;t@=uj=hot~*!C68G8hTA%8SzOfETOXQ|3FSaIEjvBJp(A)7SWUi5!Eu#yWgY+;n zlm<$+UDou*V+246_o#V4kMdto8hF%%Lki#zPh}KYXmMf?hrN0;>Mv%`@{0Qn`Ujp) z=lZe+13>^Q!9zT);H<(#bIeRWz%#*}sgUX9P|9($kexOyKIOc`dLux}c$7It4u|Rl z6SSkY*V~g_B-hMPo_ak>>z@AVQ(_N)VY2kB3IZ0G(iDUYw+2d7W^~(Jq}KY=JnWS( z#rzEa&0uNhJ>QE8iiyz;n2H|SV#Og+wEZv=f2%1ELX!SX-(d3tEj$5$1}70Mp<&eI zCkfbByL7af=qQE@5vDVxx1}FSGt_a1DoE3SDI+G)mBAna)KBG4p8Epxl9QZ4BfdAN zFnF|Y(umr;gRgG6NLQ$?ZWgllEeeq~z^ZS7L?<(~O&$5|y)Al^iMKy}&W+eMm1W z7EMU)u^ke(A1#XCV>CZ71}P}0x)4wtHO8#JRG3MA-6g=`ZM!FcICCZ{IEw8Dm2&LQ z1|r)BUG^0GzI6f946RrBlfB1Vs)~8toZf~7)+G;pv&XiUO(%5bm)pl=p>nV^o*;&T z;}@oZSibzto$arQgfkp|z4Z($P>dTXE{4O=vY0!)kDO* zGF8a4wq#VaFpLfK!iELy@?-SeRrdz%F*}hjKcA*y@mj~VD3!it9lhRhX}5YOaR9$} z3mS%$2Be7{l(+MVx3 z(4?h;P!jnRmX9J9sYN#7i=iyj_5q7n#X(!cdqI2lnr8T$IfOW<_v`eB!d9xY1P=2q&WtOXY=D9QYteP)De?S4}FK6#6Ma z=E*V+#s8>L;8aVroK^6iKo=MH{4yEZ_>N-N z`(|;aOATba1^asjxlILk<4}f~`39dBFlxj>Dw(hMYKPO3EEt1@S`1lxFNM+J@uB7T zZ8WKjz7HF1-5&2=l=fqF-*@>n5J}jIxdDwpT?oKM3s8Nr`x8JnN-kCE?~aM1H!hAE z%%w(3kHfGwMnMmNj(SU(w42OrC-euI>Dsjk&jz3ts}WHqmMpzQ3vZrsXrZ|}+MHA7 z068obeXZTsO*6RS@o3x80E4ok``rV^Y3hr&C1;|ZZ0|*EKO`$lECUYG2gVFtUTw)R z4Um<0ZzlON`zTdvVdL#KFoMFQX*a5wM0Czp%wTtfK4Sjs)P**RW&?lP$(<}q%r68Z zS53Y!d@&~ne9O)A^tNrXHhXBkj~$8j%pT1%%mypa9AW5E&s9)rjF4@O3ytH{0z6riz|@< zB~UPh*wRFg2^7EbQrHf0y?E~dHlkOxof_a?M{LqQ^C!i2dawHTPYUE=X@2(3<=OOxs8qn_(y>pU>u^}3y&df{JarR0@VJn0f+U%UiF=$Wyq zQvnVHESil@d|8&R<%}uidGh7@u^(%?$#|&J$pvFC-n8&A>utA=n3#)yMkz+qnG3wd zP7xCnF|$9Dif@N~L)Vde3hW8W!UY0BgT2v(wzp;tlLmyk2%N|0jfG$%<;A&IVrOI< z!L)o>j>;dFaqA3pL}b-Je(bB@VJ4%!JeX@3x!i{yIeIso^=n?fDX`3bU=eG7sTc%g%ye8$v8P@yKE^XD=NYxTb zbf!Mk=h|otpqjFaA-vs5YOF-*GwWPc7VbaOW&stlANnCN8iftFMMrUdYNJ_Bnn5Vt zxfz@Ah|+4&P;reZxp;MmEI7C|FOv8NKUm8njF7Wb6Gi7DeODLl&G~}G4be&*Hi0Qw z5}77vL0P+7-B%UL@3n1&JPxW^d@vVwp?u#gVcJqY9#@-3X{ok#UfW3<1fb%FT`|)V~ggq z(3AUoUS-;7)^hCjdT0Kf{i}h)mBg4qhtHHBti=~h^n^OTH5U*XMgDLIR@sre`AaB$ zg)IGBET_4??m@cx&c~bA80O7B8CHR7(LX7%HThkeC*@vi{-pL%e)yXp!B2InafbDF zjPXf1mko3h59{lT6EEbxKO1Z5GF71)WwowO6kY|6tjSVSWdQ}NsK2x{>i|MKZK8%Q zfu&_0D;CO-Jg0#YmyfctyJ!mRJp)e#@O0mYdp|8x;G1%OZQ3Q847YWTyy|%^cpA;m zze0(5p{tMu^lDkpe?HynyO?a1$_LJl2L&mpeKu%8YvgRNr=%2z${%WThHG=vrWY@4 zsA`OP#O&)TetZ>s%h!=+CE15lOOls&nvC~$Qz0Ph7tHiP;O$i|eDwpT{cp>+)0-|; zY$|bB+Gbel>5aRN3>c0x)4U=|X+z+{ zn*_p*EQoquRL+=+p;=lm`d71&1NqBz&_ph)MXu(Nv6&XE7(RsS)^MGj5Q?Fwude-(sq zjJ>aOq!7!EN>@(fK7EE#;i_BGvli`5U;r!YA{JRodLBc6-`n8K+Fjgwb%sX;j=qHQ z7&Tr!)!{HXoO<2BQrV9Sw?JRaLXV8HrsNevvnf>Y-6|{T!pYLl7jp$-nEE z#X!4G4L#K0qG_4Z;Cj6=;b|Be$hi4JvMH!-voxqx^@8cXp`B??eFBz2lLD8RRaRGh zn7kUfy!YV~p(R|p7iC1Rdgt$_24i0cd-S8HpG|`@my70g^y`gu%#Tf_L21-k?sRRZHK&at(*ED0P8iw{7?R$9~OF$Ko;Iu5)ur5<->x!m93Eb zFYpIx60s=Wxxw=`$aS-O&dCO_9?b1yKiPCQmSQb>T)963`*U+Ydj5kI(B(B?HNP8r z*bfSBpSu)w(Z3j7HQoRjUG(+d=IaE~tv}y14zHHs|0UcN52fT8V_<@2ep_ee{QgZG zmgp8iv4V{k;~8@I%M3<#B;2R>Ef(Gg_cQM7%}0s*^)SK6!Ym+~P^58*wnwV1BW@eG z4sZLqsUvBbFsr#8u7S1r4teQ;t)Y@jnn_m5jS$CsW1um!p&PqAcc8!zyiXHVta9QC zY~wCwCF0U%xiQPD_INKtTb;A|Zf29(mu9NI;E zc-e>*1%(LSXB`g}kd`#}O;veb<(sk~RWL|f3ljxCnEZDdNSTDV6#Td({6l&y4IjKF z^}lIUq*ZUqgTPumD)RrCN{M^jhY>E~1pn|KOZ5((%F)G|*ZQ|r4zIbrEiV%42hJV8 z3xS)=!X1+=olbdGJ=yZil?oXLct8FM{(6ikLL3E%=q#O6(H$p~gQu6T8N!plf!96| z&Q3=`L~>U0zZh;z(pGR2^S^{#PrPxTRHD1RQOON&f)Siaf`GLj#UOk&(|@0?zm;Sx ztsGt8=29-MZs5CSf1l1jNFtNt5rFNZxJPvkNu~2}7*9468TWm>nN9TP&^!;J{-h)_ z7WsHH9|F%I`Pb!>KAS3jQWKfGivTVkMJLO-HUGM_a4UQ_%RgL6WZvrW+Z4ujZn;y@ zz9$=oO!7qVTaQAA^BhX&ZxS*|5dj803M=k&2%QrXda`-Q#IoZL6E(g+tN!6CA!CP* zCpWtCujIea)ENl0liwVfj)Nc<9mV%+e@=d`haoZ*`B7+PNjEbXBkv=B+Pi^~L#EO$D$ZqTiD8f<5$eyb54-(=3 zh)6i8i|jp(@OnRrY5B8t|LFXFQVQ895n*P16cEKTrT*~yLH6Z4e*bZ5otpRDri&+A zfNbK1D5@O=sm`fN=WzWyse!za5n%^+6dHPGX#8DyIK>?9qyX}2XvBWVqbP%%D)7$= z=#$WulZlZR<{m#gU7lwqK4WS1Ne$#_P{b17qe$~UOXCl>5b|6WVh;5vVnR<%d+Lnp z$uEmML38}U4vaW8>shm6CzB(Wei3s#NAWE3)a2)z@i{4jTn;;aQS)O@l{rUM`J@K& l00vQ5JBs~;vo!vr%%-k{2_Fq1Mn4QF81S)AQ99zk{{c4yR+0b! literal 0 HcmV?d00001 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 { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/pv_manufacturers", + 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/PvModelsApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/PvModelsApi.kt new file mode 100644 index 00000000..8538818f --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/PvModelsApi.kt @@ -0,0 +1,124 @@ +/** + * + * 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.GetPvManufacturerModelsResponse +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 PvModelsApi(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 modules known in Enlighten. + * @param pvManufacturerId Pv manufacturer ID. + * @return GetPvManufacturerModelsResponse + * @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 getPvManufacturerModels(pvManufacturerId: kotlin.Int) : GetPvManufacturerModelsResponse { + val localVarResponse = getPvManufacturerModelsWithHttpInfo(pvManufacturerId = pvManufacturerId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetPvManufacturerModelsResponse + 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 modules known in Enlighten. + * @param pvManufacturerId Pv manufacturer 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 getPvManufacturerModelsWithHttpInfo(pvManufacturerId: kotlin.Int) : ApiResponse { + val localVariableConfig = getPvManufacturerModelsRequestConfig(pvManufacturerId = pvManufacturerId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getPvManufacturerModels + * + * @param pvManufacturerId Pv manufacturer ID. + * @return RequestConfig + */ + fun getPvManufacturerModelsRequestConfig(pvManufacturerId: kotlin.Int) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/pv_manufacturers/{pv_manufacturer_id}/pv_models".replace("{"+"pv_manufacturer_id"+"}", encodeURIComponent(pvManufacturerId.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/TariffApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/TariffApi.kt new file mode 100644 index 00000000..e66c0510 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/TariffApi.kt @@ -0,0 +1,199 @@ +/** + * + * 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.TariffSettings +import enlighten.commissioning.models.TooManyRequestsError +import enlighten.commissioning.models.UpdateSystemTariffSettingsResponse + +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 TariffApi(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") + } + } + + /** + * Get tariff for a system + * Get tariff for a system. + * @param systemId Unique numeric ID of the system. + * @return TariffSettings + * @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 getSystemTariffSettings(systemId: kotlin.Int) : TariffSettings { + val localVarResponse = getSystemTariffSettingsWithHttpInfo(systemId = systemId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as TariffSettings + 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 tariff for a system + * Get tariff for a system. + * @param systemId Unique numeric ID 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 getSystemTariffSettingsWithHttpInfo(systemId: kotlin.Int) : ApiResponse { + val localVariableConfig = getSystemTariffSettingsRequestConfig(systemId = systemId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemTariffSettings + * + * @param systemId Unique numeric ID of the system. + * @return RequestConfig + */ + fun getSystemTariffSettingsRequestConfig(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 = "/systems/config/{system_id}/tariff".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Update tariff for a system + * + * @param systemId Unique numeric ID of the system. + * @param params (optional) + * @return UpdateSystemTariffSettingsResponse + * @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 updateSystemTariffSettings(systemId: kotlin.Int, params: TariffSettings? = null) : UpdateSystemTariffSettingsResponse { + val localVarResponse = updateSystemTariffSettingsWithHttpInfo(systemId = systemId, params = params) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as UpdateSystemTariffSettingsResponse + 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 tariff for a system + * + * @param systemId Unique numeric ID of the system. + * @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 updateSystemTariffSettingsWithHttpInfo(systemId: kotlin.Int, params: TariffSettings?) : ApiResponse { + val localVariableConfig = updateSystemTariffSettingsRequestConfig(systemId = systemId, params = params) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateSystemTariffSettings + * + * @param systemId Unique numeric ID of the system. + * @param params (optional) + * @return RequestConfig + */ + fun updateSystemTariffSettingsRequestConfig(systemId: kotlin.Int, params: TariffSettings?) : RequestConfig { + val localVariableBody = params + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.PUT, + path = "/systems/config/{system_id}/tariff".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/UsersApi.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/UsersApi.kt new file mode 100644 index 00000000..c731b84c --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/apis/UsersApi.kt @@ -0,0 +1,523 @@ +/** + * + * 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.SearchUsersResponse +import enlighten.commissioning.models.ServerError +import enlighten.commissioning.models.TooManyRequestsError +import enlighten.commissioning.models.UnprocessableEntityError +import enlighten.commissioning.models.User +import enlighten.commissioning.models.UserExpandEnum +import enlighten.commissioning.models.UserParams + +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 UsersApi(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 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. + * @param activationId Enlighten ID of the activation(system). System-generated. + * @param userId Enlighten ID of the user. System-generated. + * @param expand 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) + * @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 getActivationUser(activationId: kotlin.Int, userId: kotlin.Int, expand: UserExpandEnum? = null) : User { + val localVarResponse = getActivationUserWithHttpInfo(activationId = activationId, 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 + * 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. + * @param activationId Enlighten ID of the activation(system). System-generated. + * @param userId Enlighten ID of the user. System-generated. + * @param expand 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) + * @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 getActivationUserWithHttpInfo(activationId: kotlin.Int, userId: kotlin.Int, expand: UserExpandEnum?) : ApiResponse { + val localVariableConfig = getActivationUserRequestConfig(activationId = activationId, userId = userId, expand = expand) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getActivationUser + * + * @param activationId Enlighten ID of the activation(system). System-generated. + * @param userId Enlighten ID of the user. System-generated. + * @param expand 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) + * @return RequestConfig + */ + fun getActivationUserRequestConfig(activationId: 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 = "/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 + ) + } + + /** + * 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. + * @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 getSelfUser(expand: UserExpandEnum? = null) : User { + val localVarResponse = getSelfUserWithHttpInfo(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) + } + } + } + + /** + * 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. + * @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 getSelfUserWithHttpInfo(expand: UserExpandEnum?) : ApiResponse { + val localVariableConfig = getSelfUserRequestConfig(expand = expand) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSelfUser + * + * @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 getSelfUserRequestConfig(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 = "/partner/users/self", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * 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. + * @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 getUser(userId: kotlin.Int, expand: UserExpandEnum? = null) : User { + val localVarResponse = getUserWithHttpInfo(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 + * 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. + * @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 getUserWithHttpInfo(userId: kotlin.Int, expand: UserExpandEnum?) : ApiResponse { + val localVariableConfig = getUserRequestConfig(userId = userId, expand = expand) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getUser + * + * @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 getUserRequestConfig(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 = "/partner/users/{user_id}".replace("{"+"user_id"+"}", encodeURIComponent(userId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Search user + * Returns the user ID for the given email ID only if the user exists. + * @param email Email address of the user. (optional) + * @return SearchUsersResponse + * @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 searchUsers(email: kotlin.String? = null) : SearchUsersResponse { + val localVarResponse = searchUsersWithHttpInfo(email = email) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as SearchUsersResponse + 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) + } + } + } + + /** + * Search user + * Returns the user ID for the given email ID only if the user exists. + * @param email Email address of the user. (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 searchUsersWithHttpInfo(email: kotlin.String?) : ApiResponse { + val localVariableConfig = searchUsersRequestConfig(email = email) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation searchUsers + * + * @param email Email address of the user. (optional) + * @return RequestConfig + */ + fun searchUsersRequestConfig(email: kotlin.String?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (email != null) { + put("email", listOf(email.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/users/search", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * 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. + * @param activationId Enlighten ID of the activation(system). System-generated. + * @param userId Enlighten ID of the user. System-generated. + * @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 updateActivationUser(activationId: kotlin.Int, userId: kotlin.Int, params: UserParams? = null) : User { + val localVarResponse = updateActivationUserWithHttpInfo(activationId = activationId, 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 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. + * @param activationId Enlighten ID of the activation(system). System-generated. + * @param userId Enlighten ID of the user. 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 updateActivationUserWithHttpInfo(activationId: kotlin.Int, userId: kotlin.Int, params: UserParams?) : ApiResponse { + val localVariableConfig = updateActivationUserRequestConfig(activationId = activationId, userId = userId, params = params) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateActivationUser + * + * @param activationId Enlighten ID of the activation(system). System-generated. + * @param userId Enlighten ID of the user. System-generated. + * @param params (optional) + * @return RequestConfig + */ + fun updateActivationUserRequestConfig(activationId: kotlin.Int, userId: kotlin.Int, params: UserParams?) : 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}/users/{user_id}".replace("{"+"activation_id"+"}", encodeURIComponent(activationId.toString())).replace("{"+"user_id"+"}", encodeURIComponent(userId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * 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. + * @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 updateUser(userId: kotlin.Int, params: UserParams? = null) : User { + val localVarResponse = updateUserWithHttpInfo(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 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. + * @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 updateUserWithHttpInfo(userId: kotlin.Int, params: UserParams?) : ApiResponse { + val localVariableConfig = updateUserRequestConfig(userId = userId, params = params) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateUser + * + * @param userId User ID. + * @param params (optional) + * @return RequestConfig + */ + fun updateUserRequestConfig(userId: kotlin.Int, params: UserParams?) : 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 = "/users/{user_id}".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/infrastructure/ApiAbstractions.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiAbstractions.kt new file mode 100644 index 00000000..0ffd0200 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiAbstractions.kt @@ -0,0 +1,23 @@ +package enlighten.commissioning.infrastructure + +typealias MultiValueMap = MutableMap> + +fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { + "csv" -> "," + "tsv" -> "\t" + "pipe" -> "|" + "space" -> " " + else -> "" +} + +val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } + +fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) + = toMultiValue(items.asIterable(), collectionFormat, map) + +fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { + return when(collectionFormat) { + "multi" -> items.map(map) + else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiClient.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiClient.kt new file mode 100644 index 00000000..d0459cf0 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiClient.kt @@ -0,0 +1,272 @@ +package enlighten.commissioning.infrastructure + +import okhttp3.OkHttpClient +import okhttp3.RequestBody +import okhttp3.RequestBody.Companion.asRequestBody +import okhttp3.RequestBody.Companion.toRequestBody +import okhttp3.FormBody +import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.ResponseBody +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.Request +import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders +import okhttp3.MultipartBody +import okhttp3.Call +import okhttp3.Callback +import okhttp3.Response +import java.io.BufferedWriter +import java.io.File +import java.io.FileWriter +import java.io.IOException +import java.net.URLConnection +import java.time.LocalDate +import java.time.LocalDateTime +import java.time.LocalTime +import java.time.OffsetDateTime +import java.time.OffsetTime +import java.util.Locale +import com.squareup.moshi.adapter + + val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody() + +open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { + companion object { + protected const val ContentType = "Content-Type" + protected const val Accept = "Accept" + protected const val Authorization = "Authorization" + protected const val JsonMediaType = "application/json" + protected const val FormDataMediaType = "multipart/form-data" + protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" + protected const val XmlMediaType = "application/xml" + protected const val OctetMediaType = "application/octet-stream" + + val apiKey: MutableMap = mutableMapOf() + val apiKeyPrefix: MutableMap = mutableMapOf() + var username: String? = null + var password: String? = null + var accessToken: String? = null + const val baseUrlKey = "enlighten.commissioning.baseUrl" + + @JvmStatic + val defaultClient: OkHttpClient by lazy { + builder.build() + } + + @JvmStatic + val builder: OkHttpClient.Builder = OkHttpClient.Builder() + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + protected fun guessContentTypeFromFile(file: File): String { + val contentType = URLConnection.guessContentTypeFromName(file.name) + return contentType ?: "application/octet-stream" + } + + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) + mediaType == FormDataMediaType -> + MultipartBody.Builder() + .setType(MultipartBody.FORM) + .apply { + // content's type *must* be Map> + @Suppress("UNCHECKED_CAST") + (content as Map>).forEach { (name, part) -> + if (part.body is File) { + val partHeaders = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") + val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() + addPart( + partHeaders.toHeaders(), + part.body.asRequestBody(fileMediaType) + ) + } else { + val partHeaders = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"") + addPart( + partHeaders.toHeaders(), + parameterToString(part.body).toRequestBody(null) + ) + } + } + }.build() + mediaType == FormUrlEncMediaType -> { + FormBody.Builder().apply { + // content's type *must* be Map> + @Suppress("UNCHECKED_CAST") + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) + } + }.build() + } + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> + if (content == null) { + EMPTY_REQUEST + } else { + Serializer.moshi.adapter(T::class.java).toJson(content) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) + } + mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") + mediaType == OctetMediaType && content is ByteArray -> + content.toRequestBody(OctetMediaType.toMediaTypeOrNull()) + // TODO: this should be extended with other serializers + else -> throw UnsupportedOperationException("requestBody currently only supports JSON body, byte body and File body.") + } + + @OptIn(ExperimentalStdlibApi::class) + protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { + if(body == null) { + return null + } + if (T::class.java == File::class.java) { + // return tempFile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options + val tempFile = java.nio.file.Files.createTempFile("tmp.enlighten.commissioning", null).toFile() + tempFile.deleteOnExit() + body.byteStream().use { inputStream -> + tempFile.outputStream().use { tempFileOutputStream -> + inputStream.copyTo(tempFileOutputStream) + } + } + return tempFile as T + } + + return when { + mediaType == null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> { + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } + Serializer.moshi.adapter().fromJson(bodyContent) + } + mediaType == OctetMediaType -> body.bytes() as? T + else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") + } + } + + protected fun updateAuthParams(requestConfig: RequestConfig) { + if (requestConfig.headers[Authorization].isNullOrEmpty()) { + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer $accessToken " + } + } + if (requestConfig.query["key"].isNullOrEmpty()) { + if (apiKey["key"] != null) { + if (apiKeyPrefix["key"] != null) { + requestConfig.query["key"] = listOf(apiKeyPrefix["key"]!! + " " + apiKey["key"]!!) + } else { + requestConfig.query["key"] = listOf(apiKey["key"]!!) + } + } + } + } + + protected inline fun request(requestConfig: RequestConfig): ApiResponse { + val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") + + // take authMethod from operation + updateAuthParams(requestConfig) + + val url = httpUrl.newBuilder() + .addEncodedPathSegments(requestConfig.path.trimStart('/')) + .apply { + requestConfig.query.forEach { query -> + query.value.forEach { queryValue -> + addQueryParameter(query.key, queryValue) + } + } + }.build() + + // take content-type/accept from spec or set to default (application/json) if not defined + if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { + requestConfig.headers[ContentType] = JsonMediaType + } + if (requestConfig.headers[Accept].isNullOrEmpty()) { + requestConfig.headers[Accept] = JsonMediaType + } + val headers = requestConfig.headers + + if (headers[Accept].isNullOrEmpty()) { + throw kotlin.IllegalStateException("Missing Accept header. This is required.") + } + + val contentType = if (headers[ContentType] != null) { + // TODO: support multiple contentType options here. + (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) + } else { + null + } + + val request = when (requestConfig.method) { + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) + RequestMethod.GET -> Request.Builder().url(url) + RequestMethod.HEAD -> Request.Builder().url(url).head() + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) + RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) + }.apply { + headers.forEach { header -> addHeader(header.key, header.value) } + }.build() + + val response = client.newCall(request).execute() + + val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) + + // TODO: handle specific mapping types. e.g. Map> + @Suppress("UNNECESSARY_SAFE_CALL") + return when { + response.isRedirect -> Redirection( + response.code, + response.headers.toMultimap() + ) + response.isInformational -> Informational( + response.message, + response.code, + response.headers.toMultimap() + ) + response.isSuccessful -> Success( + responseBody(response.body, accept), + response.code, + response.headers.toMultimap() + ) + response.isClientError -> ClientError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + else -> ServerError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + } + } + + protected fun parameterToString(value: Any?): String = when (value) { + null -> "" + is Array<*> -> toMultiValue(value, "csv").toString() + is Iterable<*> -> toMultiValue(value, "csv").toString() + is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> + parseDateToQueryString(value) + else -> value.toString() + } + + protected inline fun parseDateToQueryString(value : T): String { + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiResponse.kt new file mode 100644 index 00000000..717ad604 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ApiResponse.kt @@ -0,0 +1,43 @@ +package enlighten.commissioning.infrastructure + +enum class ResponseType { + Success, Informational, Redirection, ClientError, ServerError +} + +interface Response + +abstract class ApiResponse(val responseType: ResponseType): Response { + abstract val statusCode: Int + abstract val headers: Map> +} + +class Success( + val data: T, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +): ApiResponse(ResponseType.Success) + +class Informational( + val statusText: String, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Informational) + +class Redirection( + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Redirection) + +class ClientError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.ClientError) + +class ServerError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> +): ApiResponse(ResponseType.ServerError) diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/BigDecimalAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/BigDecimalAdapter.kt new file mode 100644 index 00000000..47a10007 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/BigDecimalAdapter.kt @@ -0,0 +1,17 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigDecimal + +class BigDecimalAdapter { + @ToJson + fun toJson(value: BigDecimal): String { + return value.toPlainString() + } + + @FromJson + fun fromJson(value: String): BigDecimal { + return BigDecimal(value) + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/BigIntegerAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/BigIntegerAdapter.kt new file mode 100644 index 00000000..3f36b398 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/BigIntegerAdapter.kt @@ -0,0 +1,17 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigInteger + +class BigIntegerAdapter { + @ToJson + fun toJson(value: BigInteger): String { + return value.toString() + } + + @FromJson + fun fromJson(value: String): BigInteger { + return BigInteger(value) + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ByteArrayAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ByteArrayAdapter.kt new file mode 100644 index 00000000..1d30c918 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ByteArrayAdapter.kt @@ -0,0 +1,12 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson + +class ByteArrayAdapter { + @ToJson + fun toJson(data: ByteArray): String = String(data) + + @FromJson + fun fromJson(data: String): ByteArray = data.toByteArray() +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/Errors.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/Errors.kt new file mode 100644 index 00000000..da975ee5 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/Errors.kt @@ -0,0 +1,18 @@ +@file:Suppress("unused") +package enlighten.commissioning.infrastructure + +import java.lang.RuntimeException + +open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 123L + } +} + +open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 456L + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/LocalDateAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/LocalDateAdapter.kt new file mode 100644 index 00000000..9c95a5ac --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/LocalDateAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class LocalDateAdapter { + @ToJson + fun toJson(value: LocalDate): String { + return DateTimeFormatter.ISO_LOCAL_DATE.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDate { + return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) + } + +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/LocalDateTimeAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/LocalDateTimeAdapter.kt new file mode 100644 index 00000000..e3db82d3 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/LocalDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +class LocalDateTimeAdapter { + @ToJson + fun toJson(value: LocalDateTime): String { + return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDateTime { + return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } + +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/OffsetDateTimeAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/OffsetDateTimeAdapter.kt new file mode 100644 index 00000000..35ccf8e8 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/OffsetDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.OffsetDateTime +import java.time.format.DateTimeFormatter + +class OffsetDateTimeAdapter { + @ToJson + fun toJson(value: OffsetDateTime): String { + return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): OffsetDateTime { + return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) + } + +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/PartConfig.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/PartConfig.kt new file mode 100644 index 00000000..2a5a15a5 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package enlighten.commissioning.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/RequestConfig.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/RequestConfig.kt new file mode 100644 index 00000000..788c2cf0 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/RequestConfig.kt @@ -0,0 +1,19 @@ +package enlighten.commissioning.infrastructure + +/** + * Defines a config object for a given request. + * NOTE: This object doesn't include 'body' because it + * allows for caching of the constructed object + * for many request definitions. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class RequestConfig( + val method: RequestMethod, + val path: String, + val headers: MutableMap = mutableMapOf(), + val params: MutableMap = mutableMapOf(), + val query: MutableMap> = mutableMapOf(), + val requiresAuthentication: Boolean, + val body: T? = null +) diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/RequestMethod.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/RequestMethod.kt new file mode 100644 index 00000000..23313a69 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/RequestMethod.kt @@ -0,0 +1,8 @@ +package enlighten.commissioning.infrastructure + +/** + * Provides enumerated HTTP verbs + */ +enum class RequestMethod { + GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ResponseExtensions.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ResponseExtensions.kt new file mode 100644 index 00000000..4d65fdf0 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/ResponseExtensions.kt @@ -0,0 +1,24 @@ +package enlighten.commissioning.infrastructure + +import okhttp3.Response + +/** + * Provides an extension to evaluation whether the response is a 1xx code + */ +val Response.isInformational : Boolean get() = this.code in 100..199 + +/** + * Provides an extension to evaluation whether the response is a 3xx code + */ +@Suppress("EXTENSION_SHADOWED_BY_MEMBER") +val Response.isRedirect : Boolean get() = this.code in 300..399 + +/** + * Provides an extension to evaluation whether the response is a 4xx code + */ +val Response.isClientError : Boolean get() = this.code in 400..499 + +/** + * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code + */ +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/Serializer.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/Serializer.kt new file mode 100644 index 00000000..253b8e38 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/Serializer.kt @@ -0,0 +1,23 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.Moshi +import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory + +object Serializer { + @JvmStatic + val moshiBuilder: Moshi.Builder = Moshi.Builder() + .add(OffsetDateTimeAdapter()) + .add(LocalDateTimeAdapter()) + .add(LocalDateAdapter()) + .add(UUIDAdapter()) + .add(ByteArrayAdapter()) + .add(URIAdapter()) + .add(KotlinJsonAdapterFactory()) + .add(BigDecimalAdapter()) + .add(BigIntegerAdapter()) + + @JvmStatic + val moshi: Moshi by lazy { + moshiBuilder.build() + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/URIAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/URIAdapter.kt new file mode 100644 index 00000000..9e3b59b8 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/URIAdapter.kt @@ -0,0 +1,13 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.net.URI + +class URIAdapter { + @ToJson + fun toJson(uri: URI) = uri.toString() + + @FromJson + fun fromJson(s: String): URI = URI.create(s) +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/UUIDAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/UUIDAdapter.kt new file mode 100644 index 00000000..f1e07464 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/infrastructure/UUIDAdapter.kt @@ -0,0 +1,13 @@ +package enlighten.commissioning.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.util.UUID + +class UUIDAdapter { + @ToJson + fun toJson(uuid: UUID) = uuid.toString() + + @FromJson + fun fromJson(s: String): UUID = UUID.fromString(s) +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Activation.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Activation.kt new file mode 100644 index 00000000..e5be3f8d --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Activation.kt @@ -0,0 +1,282 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.ActivationEnchargeInner +import enlighten.commissioning.models.ActivationEnpowerInner +import enlighten.commissioning.models.ActivationHost +import enlighten.commissioning.models.ActivationOwner +import enlighten.commissioning.models.Address +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner +import enlighten.commissioning.models.SystemArrayTypeEnum +import enlighten.commissioning.models.SystemAttachmentTypeEnum +import enlighten.commissioning.models.SystemInternetConnectionEnum +import enlighten.commissioning.models.SystemProductionModeEnum +import enlighten.commissioning.models.SystemSourceEnum +import enlighten.commissioning.models.SystemTypeEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Enlighten ID of this system. System-generated. + * @param systemName Name of the system. + * @param systemType + * @param status System's status. + * @param timezone System's timezone. + * @param stage What stage of the activation process this activation is in. System-generated. + * @param internetConnection + * @param lease Whether the system is leased. Default false. + * @param operational Whether this system is permitted to operate. Default true. + * @param owner + * @param ownerId Enlighten ID of this system owner. System-generated. This field is optional. + * @param host + * @param hostId Enlighten ID of this system host. System-generated. This field is optional. + * @param installerName Name of the installer. + * @param installerId Enlighten ID of the installer of this system. Defaults to current user's company ID. + * @param maintainerName Name of the maintainer. + * @param maintainerId The Enlighten ID of the maintainer of this system. Defaults to current user's company ID. + * @param authorizedSubcontractors List of sub-contractors of this system. + * @param uri URI for this activation. + * @param updatedAt Activation last updated timestamp. + * @param reference 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. + * @param otherReferences 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. + * @param allowPublicAccess When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true. + * @param interconnectDate When the system was approved to connect to the grid. + * @param installerSupportEmail Installer support email. + * @param source + * @param arrayType + * @param attachmentType + * @param ensembleEnvoy Specifies serial number of ensemble envoy in multi envoy system. + * @param productionMode + * @param gridProfile Grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles. + * @param requestedProfile + * @param requestedReportFreq + * @param voltage 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. + * @param envoySerialNumbers A list of Envoys installed on this system. + * @param expectedEnvoyCount Total envoys the system is supposed to have. + * @param expectedPcuCount Total PCUs the system is supposed to have. + * @param expectedNsrCount Total nsrs the system is supposed to have. + * @param expectedMeterCount Total meters the system is supposed to have. + * @param expectedEnchargeCount Total encharges the system is supposed to have. + * @param expectedEnpowerCount Total enpowers the system is supposed to have. + * @param pvManufacturer Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs. + * @param pvManufacturerName Name of the Custom PV module manufacturer associated with the system. + * @param pvModel Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs. + * @param pvModelName Name of the Custom PV module model associated with the system. + * @param pvModulePowerRating Power rating (in W) of the PV module installed on the system. + * @param pvModuleType Type ID of the PV module installed on the system. 1 -> 'Mono-facial', 2 -> 'Bi-facial', 3 -> 'Split cell', 4 -> 'Other'. + * @param encharge Encharge detail. + * @param enpower Enpower detail. + * @param address + */ + + +data class Activation ( + + /* Enlighten ID of this system. System-generated. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Name of the system. */ + @Json(name = "system_name") + val systemName: kotlin.String? = null, + + @Json(name = "system_type") + val systemType: SystemTypeEnum? = null, + + /* System's status. */ + @Json(name = "status") + val status: kotlin.String? = null, + + /* System's timezone. */ + @Json(name = "timezone") + val timezone: kotlin.String? = null, + + /* What stage of the activation process this activation is in. System-generated. */ + @Json(name = "stage") + val stage: kotlin.Int? = null, + + @Json(name = "internet_connection") + val internetConnection: SystemInternetConnectionEnum? = null, + + /* Whether the system is leased. Default false. */ + @Json(name = "lease") + val lease: kotlin.Boolean? = null, + + /* Whether this system is permitted to operate. Default true. */ + @Json(name = "operational") + val operational: kotlin.Boolean? = null, + + @Json(name = "owner") + val owner: ActivationOwner? = null, + + /* Enlighten ID of this system owner. System-generated. This field is optional. */ + @Json(name = "owner_id") + val ownerId: kotlin.Int? = null, + + @Json(name = "host") + val host: ActivationHost? = null, + + /* Enlighten ID of this system host. System-generated. This field is optional. */ + @Json(name = "host_id") + val hostId: kotlin.Int? = null, + + /* Name of the installer. */ + @Json(name = "installer_name") + val installerName: kotlin.String? = null, + + /* Enlighten ID of the installer of this system. Defaults to current user's company ID. */ + @Json(name = "installer_id") + val installerId: kotlin.Int? = null, + + /* Name of the maintainer. */ + @Json(name = "maintainer_name") + val maintainerName: kotlin.String? = null, + + /* The Enlighten ID of the maintainer of this system. Defaults to current user's company ID. */ + @Json(name = "maintainer_id") + val maintainerId: kotlin.Int? = null, + + /* List of sub-contractors of this system. */ + @Json(name = "authorized_subcontractors") + val authorizedSubcontractors: kotlin.collections.List? = null, + + /* URI for this activation. */ + @Json(name = "uri") + val uri: kotlin.String? = null, + + /* Activation last updated timestamp. */ + @Json(name = "updated_at") + val updatedAt: kotlin.Long? = null, + + /* 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. */ + @Json(name = "reference") + val reference: kotlin.String? = null, + + /* 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. */ + @Json(name = "other_references") + val otherReferences: kotlin.collections.List? = null, + + /* When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true. */ + @Json(name = "allow_public_access") + val allowPublicAccess: kotlin.Boolean? = null, + + /* When the system was approved to connect to the grid. */ + @Json(name = "interconnect_date") + val interconnectDate: java.time.LocalDate? = null, + + /* Installer support email. */ + @Json(name = "installer_support_email") + val installerSupportEmail: kotlin.String? = null, + + @Json(name = "source") + val source: SystemSourceEnum? = null, + + @Json(name = "array_type") + val arrayType: SystemArrayTypeEnum? = null, + + @Json(name = "attachment_type") + val attachmentType: SystemAttachmentTypeEnum? = null, + + /* Specifies serial number of ensemble envoy in multi envoy system. */ + @Json(name = "ensemble_envoy") + val ensembleEnvoy: kotlin.String? = null, + + @Json(name = "production_mode") + val productionMode: SystemProductionModeEnum? = null, + + /* Grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles. */ + @Json(name = "grid_profile") + val gridProfile: kotlin.String? = null, + + @Json(name = "requested_profile") + val requestedProfile: kotlin.String? = null, + + @Json(name = "requested_report_freq") + val requestedReportFreq: kotlin.String? = null, + + /* 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. */ + @Json(name = "voltage") + val voltage: kotlin.String? = null, + + /* A list of Envoys installed on this system. */ + @Json(name = "envoy_serial_numbers") + val envoySerialNumbers: kotlin.collections.List? = null, + + /* Total envoys the system is supposed to have. */ + @Json(name = "expected_envoy_count") + val expectedEnvoyCount: kotlin.Int? = null, + + /* Total PCUs the system is supposed to have. */ + @Json(name = "expected_pcu_count") + val expectedPcuCount: kotlin.Int? = null, + + /* Total nsrs the system is supposed to have. */ + @Json(name = "expected_nsr_count") + val expectedNsrCount: kotlin.Int? = null, + + /* Total meters the system is supposed to have. */ + @Json(name = "expected_meter_count") + val expectedMeterCount: kotlin.Int? = null, + + /* Total encharges the system is supposed to have. */ + @Json(name = "expected_encharge_count") + val expectedEnchargeCount: kotlin.Int? = null, + + /* Total enpowers the system is supposed to have. */ + @Json(name = "expected_enpower_count") + val expectedEnpowerCount: kotlin.Int? = null, + + /* Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs. */ + @Json(name = "pv_manufacturer") + val pvManufacturer: kotlin.Int? = null, + + /* Name of the Custom PV module manufacturer associated with the system. */ + @Json(name = "pv_manufacturer_name") + val pvManufacturerName: kotlin.String? = null, + + /* Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs. */ + @Json(name = "pv_model") + val pvModel: kotlin.Int? = null, + + /* Name of the Custom PV module model associated with the system. */ + @Json(name = "pv_model_name") + val pvModelName: kotlin.String? = null, + + /* Power rating (in W) of the PV module installed on the system. */ + @Json(name = "pv_module_power_rating") + val pvModulePowerRating: kotlin.Float? = null, + + /* Type ID of the PV module installed on the system. 1 -> 'Mono-facial', 2 -> 'Bi-facial', 3 -> 'Split cell', 4 -> 'Other'. */ + @Json(name = "pv_module_type") + val pvModuleType: kotlin.Int? = null, + + /* Encharge detail. */ + @Json(name = "encharge") + val encharge: kotlin.collections.List? = null, + + /* Enpower detail. */ + @Json(name = "enpower") + val enpower: kotlin.collections.List? = null, + + @Json(name = "address") + val address: Address? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationEnchargeInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationEnchargeInner.kt new file mode 100644 index 00000000..5229354e --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationEnchargeInner.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param envoySerialNumber Envoy serial number. + * @param enchargeSerialNumbers Encharge serial numbers. + */ + + +data class ActivationEnchargeInner ( + + /* Envoy serial number. */ + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String? = null, + + /* Encharge serial numbers. */ + @Json(name = "encharge_serial_numbers") + val enchargeSerialNumbers: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationEnpowerInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationEnpowerInner.kt new file mode 100644 index 00000000..46652667 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationEnpowerInner.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param envoySerialNumber Envoy serial number. + * @param enpowerSerialNumbers Enpower serial numbers. + */ + + +data class ActivationEnpowerInner ( + + /* Envoy serial number. */ + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String? = null, + + /* Enpower serial numbers. */ + @Json(name = "enpower_serial_numbers") + val enpowerSerialNumbers: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationHost.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationHost.kt new file mode 100644 index 00000000..978fc731 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationHost.kt @@ -0,0 +1,83 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.ActivationHostCompany +import enlighten.commissioning.models.UserRoleEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Name of the system host. If the query parameter 'expand=host' passed in the request host detail will appear in the response. + * + * @param firstName + * @param lastName + * @param email + * @param phone + * @param active Whether the user is allowed to log in to Enlighten. Values true, false. Default true. + * @param userId + * @param userRoles 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. + * @param enlightenEmails + * @param enlightenView + * @param uri + * @param updatedAt + * @param company + */ + + +data class ActivationHost ( + + @Json(name = "first_name") + val firstName: kotlin.String? = null, + + @Json(name = "last_name") + val lastName: kotlin.String? = null, + + @Json(name = "email") + val email: kotlin.String? = null, + + @Json(name = "phone") + val phone: kotlin.String? = null, + + /* Whether the user is allowed to log in to Enlighten. Values true, false. Default true. */ + @Json(name = "active") + val active: kotlin.Boolean? = null, + + @Json(name = "user_id") + val userId: kotlin.Int? = null, + + /* 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. */ + @Json(name = "user_roles") + val userRoles: kotlin.collections.List? = null, + + @Json(name = "enlighten_emails") + val enlightenEmails: kotlin.Boolean? = null, + + @Json(name = "enlighten_view") + val enlightenView: kotlin.String? = null, + + @Json(name = "uri") + val uri: kotlin.String? = null, + + @Json(name = "updated_at") + val updatedAt: kotlin.Long? = null, + + @Json(name = "company") + val company: ActivationHostCompany? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationHostCompany.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationHostCompany.kt new file mode 100644 index 00000000..65c838dc --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationHostCompany.kt @@ -0,0 +1,53 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.CompanyRoleEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * A hash of information about the system host's company. Use the query parameter 'expand=host.company' to get system host company detail. + * + * @param companyId + * @param companyName + * @param location + * @param roles What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. + * @param uri + */ + + +data class ActivationHostCompany ( + + @Json(name = "company_id") + val companyId: kotlin.Int? = null, + + @Json(name = "company_name") + val companyName: kotlin.String? = null, + + @Json(name = "location") + val location: kotlin.String? = null, + + /* What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. */ + @Json(name = "roles") + val roles: kotlin.collections.List? = null, + + @Json(name = "uri") + val uri: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationOwner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationOwner.kt new file mode 100644 index 00000000..70e0f988 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationOwner.kt @@ -0,0 +1,83 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.ActivationOwnerCompany +import enlighten.commissioning.models.UserRoleEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * 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. If the query parameter 'expand=owner' passed in the request owner detail will appear in the response. + * + * @param firstName + * @param lastName + * @param email + * @param phone + * @param active Whether the user is allowed to log in to Enlighten. Values true, false. Default true. + * @param userId + * @param userRoles 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. + * @param enlightenEmails + * @param enlightenView + * @param uri + * @param updatedAt + * @param company + */ + + +data class ActivationOwner ( + + @Json(name = "first_name") + val firstName: kotlin.String? = null, + + @Json(name = "last_name") + val lastName: kotlin.String? = null, + + @Json(name = "email") + val email: kotlin.String? = null, + + @Json(name = "phone") + val phone: kotlin.String? = null, + + /* Whether the user is allowed to log in to Enlighten. Values true, false. Default true. */ + @Json(name = "active") + val active: kotlin.Boolean? = null, + + @Json(name = "user_id") + val userId: kotlin.Int? = null, + + /* 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. */ + @Json(name = "user_roles") + val userRoles: kotlin.collections.List? = null, + + @Json(name = "enlighten_emails") + val enlightenEmails: kotlin.Boolean? = null, + + @Json(name = "enlighten_view") + val enlightenView: kotlin.String? = null, + + @Json(name = "uri") + val uri: kotlin.String? = null, + + @Json(name = "updated_at") + val updatedAt: kotlin.Long? = null, + + @Json(name = "company") + val company: ActivationOwnerCompany? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationOwnerCompany.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationOwnerCompany.kt new file mode 100644 index 00000000..81c60b34 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ActivationOwnerCompany.kt @@ -0,0 +1,53 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.CompanyRoleEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * A hash of information about the owner's company. Use the query parameter 'expand=owner.company' to get owner company detail. + * + * @param companyId + * @param companyName + * @param location + * @param roles What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. + * @param uri + */ + + +data class ActivationOwnerCompany ( + + @Json(name = "company_id") + val companyId: kotlin.Int? = null, + + @Json(name = "company_name") + val companyName: kotlin.String? = null, + + @Json(name = "location") + val location: kotlin.String? = null, + + /* What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. */ + @Json(name = "roles") + val roles: kotlin.collections.List? = null, + + @Json(name = "uri") + val uri: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Address.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Address.kt new file mode 100644 index 00000000..aacf8d79 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Address.kt @@ -0,0 +1,71 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Location of the system. Use the ISO 3166-1 2-letter code for the country. Latitude and longitude are calculated by Enlighten, not provided by the client. + * + * @param street1 Street line 1. + * @param street2 Street line 2. This field is optional. + * @param city City. + * @param state State. + * @param country Country. + * @param postalCode Postal code. + * @param latitude Latitude. + * @param longitude Longitude. + */ + + +data class Address ( + + /* Street line 1. */ + @Json(name = "street1") + val street1: kotlin.String? = null, + + /* Street line 2. This field is optional. */ + @Json(name = "street2") + val street2: kotlin.String? = null, + + /* City. */ + @Json(name = "city") + val city: kotlin.String? = null, + + /* State. */ + @Json(name = "state") + val state: kotlin.String? = null, + + /* Country. */ + @Json(name = "country") + val country: kotlin.String? = null, + + /* Postal code. */ + @Json(name = "postal_code") + val postalCode: kotlin.String? = null, + + /* Latitude. */ + @Json(name = "latitude") + val latitude: kotlin.Int? = null, + + /* Longitude. */ + @Json(name = "longitude") + val longitude: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ArrayParams.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ArrayParams.kt new file mode 100644 index 00000000..13841fc9 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ArrayParams.kt @@ -0,0 +1,71 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.ArrayParamsModulesInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param label Name of the array. + * @param angle Angle of the array. Rotate the array clockwise by the given value. + * @param tilt Tilt of the array. + * @param provisionedEnvoy Provisioned envoy. + * @param left Left axis position of array. Increase the value to move the array to the right, and decrease to move it to the left. + * @param top Top axis position of array. Increase the value to move the array up, and decrease to move it down. + * @param modules + * @param id ID of the array. ID cannot be changed. It is only used to identify the array that needs to be updated. + */ + + +data class ArrayParams ( + + /* Name of the array. */ + @Json(name = "label") + val label: kotlin.String, + + /* Angle of the array. Rotate the array clockwise by the given value. */ + @Json(name = "angle") + val angle: kotlin.Int, + + /* Tilt of the array. */ + @Json(name = "tilt") + val tilt: kotlin.String, + + /* Provisioned envoy. */ + @Json(name = "provisioned_envoy") + val provisionedEnvoy: kotlin.String, + + /* Left axis position of array. Increase the value to move the array to the right, and decrease to move it to the left. */ + @Json(name = "left") + val left: kotlin.Int, + + /* Top axis position of array. Increase the value to move the array up, and decrease to move it down. */ + @Json(name = "top") + val top: kotlin.Int, + + @Json(name = "modules") + val modules: kotlin.collections.List, + + /* ID of the array. ID cannot be changed. It is only used to identify the array that needs to be updated. */ + @Json(name = "id") + val id: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ArrayParamsModulesInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ArrayParamsModulesInner.kt new file mode 100644 index 00000000..f15931b2 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ArrayParamsModulesInner.kt @@ -0,0 +1,56 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param left 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. + * @param top Top axis position of module w.r.t Array. Increase the value to move the module up, and decrease to move it down. + * @param angle 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. + * @param serialNum Inverter serial number mapped with this module. + * @param id ID of the module. ID cannot be changed. It is only used to identify the array that needs to be updated. + */ + + +data class ArrayParamsModulesInner ( + + /* 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. */ + @Json(name = "left") + val left: 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. */ + @Json(name = "top") + val top: 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. */ + @Json(name = "angle") + val angle: kotlin.Int, + + /* Inverter serial number mapped with this module. */ + @Json(name = "serial_num") + val serialNum: kotlin.String, + + /* ID of the module. ID cannot be changed. It is only used to identify the array that needs to be updated. */ + @Json(name = "id") + val id: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Company.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Company.kt new file mode 100644 index 00000000..55bf7897 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/Company.kt @@ -0,0 +1,57 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.CompanyRoleEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * 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. If the query parameter 'expand=owner' passed in the request owner detail will appear in the response. + * + * @param companyId Enlighten-generated ID of the company to which the user belongs. + * @param companyName Name of the company to which the user belongs. + * @param location Company location. + * @param roles What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. + * @param uri URI to the show() method for the company. System-generated. + */ + + +data class Company ( + + /* Enlighten-generated ID of the company to which the user belongs. */ + @Json(name = "company_id") + val companyId: kotlin.Int? = null, + + /* Name of the company to which the user belongs. */ + @Json(name = "company_name") + val companyName: kotlin.String? = null, + + /* Company location. */ + @Json(name = "location") + val location: kotlin.String? = null, + + /* What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. */ + @Json(name = "roles") + val roles: kotlin.collections.List? = null, + + /* URI to the show() method for the company. System-generated. */ + @Json(name = "uri") + val uri: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CompanyRoleEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CompanyRoleEnum.kt new file mode 100644 index 00000000..8e2eab25 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CompanyRoleEnum.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: installer + */ + +@JsonClass(generateAdapter = false) +enum class CompanyRoleEnum(val value: kotlin.String) { + + @Json(name = "installer") + installer("installer"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is CompanyRoleEnum) "$data" else null + + /** + * Returns a valid [CompanyRoleEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): CompanyRoleEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CreateCompanyUserRequest.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CreateCompanyUserRequest.kt new file mode 100644 index 00000000..f4f2bf95 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CreateCompanyUserRequest.kt @@ -0,0 +1,56 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param email Email address of the user. Must be unique within Enlighten. Required. + * @param firstName User's first name. Required. + * @param lastName User's last name. Required. + * @param enlightenEmails Whether the user receives automated emails from Enlighten. Default false. + * @param phone Telephone number of the user. Optional. + */ + + +data class CreateCompanyUserRequest ( + + /* Email address of the user. Must be unique within Enlighten. Required. */ + @Json(name = "email") + val email: kotlin.String, + + /* User's first name. Required. */ + @Json(name = "first_name") + val firstName: kotlin.String, + + /* User's last name. Required. */ + @Json(name = "last_name") + val lastName: kotlin.String, + + /* Whether the user receives automated emails from Enlighten. Default false. */ + @Json(name = "enlighten_emails") + val enlightenEmails: kotlin.Boolean? = null, + + /* Telephone number of the user. Optional. */ + @Json(name = "phone") + val phone: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CreateUserRequest.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CreateUserRequest.kt new file mode 100644 index 00000000..fd23a7b0 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/CreateUserRequest.kt @@ -0,0 +1,66 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param email Email address of the user. Must be unique within Enlighten. Required. + * @param firstName User's first name. Required. + * @param lastName User's last name. Required. + * @param enlightenEmails Whether the user receives automated emails from Enlighten. Default false. + * @param enlightenView 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'. + * @param phone Telephone number of the user. Optional. + * @param companyId Enlighten-generated ID of the company to which the user belongs, if any. + */ + + +data class CreateUserRequest ( + + /* Email address of the user. Must be unique within Enlighten. Required. */ + @Json(name = "email") + val email: kotlin.String, + + /* User's first name. Required. */ + @Json(name = "first_name") + val firstName: kotlin.String, + + /* User's last name. Required. */ + @Json(name = "last_name") + val lastName: kotlin.String, + + /* Whether the user receives automated emails from Enlighten. Default false. */ + @Json(name = "enlighten_emails") + val enlightenEmails: kotlin.Boolean? = null, + + /* 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'. */ + @Json(name = "enlighten_view") + val enlightenView: kotlin.String? = null, + + /* Telephone number of the user. Optional. */ + @Json(name = "phone") + val phone: kotlin.String? = null, + + /* Enlighten-generated ID of the company to which the user belongs, if any. */ + @Json(name = "company_id") + val companyId: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/DeleteActivationResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/DeleteActivationResponse.kt new file mode 100644 index 00000000..4525bc23 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/DeleteActivationResponse.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param message + */ + + +data class DeleteActivationResponse ( + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/DeleteSystemArrayResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/DeleteSystemArrayResponse.kt new file mode 100644 index 00000000..ba089933 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/DeleteSystemArrayResponse.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param message + */ + + +data class DeleteSystemArrayResponse ( + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetActivationOpsProductionModeResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetActivationOpsProductionModeResponse.kt new file mode 100644 index 00000000..b5b49406 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetActivationOpsProductionModeResponse.kt @@ -0,0 +1,45 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param mode + * @param totalMicros Total number of microinverters in the system. + * @param energyProducingMicros Total number of microinverters producing energy in the system. + */ + + +data class GetActivationOpsProductionModeResponse ( + + @Json(name = "mode") + val mode: kotlin.String? = null, + + /* Total number of microinverters in the system. */ + @Json(name = "total_micros") + val totalMicros: kotlin.Int? = null, + + /* Total number of microinverters producing energy in the system. */ + @Json(name = "energy_producing_micros") + val energyProducingMicros: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetCompanyUsersResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetCompanyUsersResponse.kt new file mode 100644 index 00000000..03151035 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetCompanyUsersResponse.kt @@ -0,0 +1,37 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.GetCompanyUsersResponseUsersInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param users 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. + */ + + +data class GetCompanyUsersResponse ( + + /* 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. */ + @Json(name = "users") + val users: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseUsersInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseUsersInner.kt new file mode 100644 index 00000000..8197ced3 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseUsersInner.kt @@ -0,0 +1,31 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + */ + + +data class GetCompanyUsersResponseUsersInner ( + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetGridProfilesResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetGridProfilesResponse.kt new file mode 100644 index 00000000..59e83487 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetGridProfilesResponse.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.GetGridProfilesResponseGridProfilesInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param gridProfiles + */ + + +data class GetGridProfilesResponse ( + + @Json(name = "grid_profiles") + val gridProfiles: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetGridProfilesResponseGridProfilesInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetGridProfilesResponseGridProfilesInner.kt new file mode 100644 index 00000000..fcbefcef --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetGridProfilesResponseGridProfilesInner.kt @@ -0,0 +1,89 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id Grid profile ID. System-generated. + * @param profileId + * @param created Profile created date and time. + * @param updated Profile last updated date and time. + * @param name Profile name. + * @param description Profile description. + * @param version Profile version. + * @param envoyType Envoy type. + * @param countries Name of the Countries. + * @param states States code. + * @param stateNames Name of the states. + * @param ensemble1Compatible + */ + + +data class GetGridProfilesResponseGridProfilesInner ( + + /* Grid profile ID. System-generated. */ + @Json(name = "id") + val id: kotlin.String? = null, + + @Json(name = "profile_id") + val profileId: kotlin.String? = null, + + /* Profile created date and time. */ + @Json(name = "created") + val created: java.time.OffsetDateTime? = null, + + /* Profile last updated date and time. */ + @Json(name = "updated") + val updated: java.time.OffsetDateTime? = null, + + /* Profile name. */ + @Json(name = "name") + val name: kotlin.String? = null, + + /* Profile description. */ + @Json(name = "description") + val description: kotlin.String? = null, + + /* Profile version. */ + @Json(name = "version") + val version: kotlin.String? = null, + + /* Envoy type. */ + @Json(name = "envoy_type") + val envoyType: kotlin.String? = null, + + /* Name of the Countries. */ + @Json(name = "countries") + val countries: kotlin.collections.List? = null, + + /* States code. */ + @Json(name = "states") + val states: kotlin.collections.List? = null, + + /* Name of the states. */ + @Json(name = "state_names") + val stateNames: kotlin.collections.List? = null, + + @Json(name = "ensemble_1_compatible") + val ensemble1Compatible: kotlin.Boolean? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponse.kt new file mode 100644 index 00000000..4a50afe2 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponse.kt @@ -0,0 +1,42 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systems Zero or more activations. + * @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 10. The maximum page size is 1000. + */ + + +data class GetPartnerActivationsResponse ( + + /* Zero or more activations. */ + @Json(name = "systems") + val systems: kotlin.collections.List? = null, + + /* 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. */ + @Json(name = "next") + val next: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInner.kt new file mode 100644 index 00000000..3c430665 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInner.kt @@ -0,0 +1,147 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.Address +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner +import enlighten.commissioning.models.SystemInternetConnectionEnum +import enlighten.commissioning.models.SystemTypeEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Enlighten ID of this system. System-generated. + * @param systemName Name of the system. + * @param systemType + * @param status System's status. + * @param timezone System's timezone. + * @param stage What stage of the activation process this activation is in. System-generated. + * @param internetConnection + * @param lease Whether the system is leased. Default false. + * @param operational Whether this system is permitted to operate. Default true. + * @param owner 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. + * @param ownerId Enlighten ID of this system owner. System-generated. + * @param host Name of the system host. + * @param hostId Enlighten ID of this system host. System-generated. + * @param installerName Name of the installer. + * @param installerId Enlighten ID of the installer of this system. + * @param maintainerName Name of the maintainer. + * @param maintainerId Enlighten ID of the maintainer of this system. + * @param authorizedSubcontractors List of sub-contractors of this system. + * @param uri URI for this activation. + * @param updatedAt Activation last updated timestamp. + * @param reference 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. + * @param otherReferences 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. + * @param address + */ + + +data class GetPartnerActivationsResponseSystemsInner ( + + /* Enlighten ID of this system. System-generated. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Name of the system. */ + @Json(name = "system_name") + val systemName: kotlin.String? = null, + + @Json(name = "system_type") + val systemType: SystemTypeEnum? = null, + + /* System's status. */ + @Json(name = "status") + val status: kotlin.String? = null, + + /* System's timezone. */ + @Json(name = "timezone") + val timezone: kotlin.String? = null, + + /* What stage of the activation process this activation is in. System-generated. */ + @Json(name = "stage") + val stage: kotlin.Int? = null, + + @Json(name = "internet_connection") + val internetConnection: SystemInternetConnectionEnum? = null, + + /* Whether the system is leased. Default false. */ + @Json(name = "lease") + val lease: kotlin.Boolean? = null, + + /* Whether this system is permitted to operate. Default true. */ + @Json(name = "operational") + val operational: kotlin.Boolean? = null, + + /* 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. */ + @Json(name = "owner") + val owner: kotlin.String? = null, + + /* Enlighten ID of this system owner. System-generated. */ + @Json(name = "owner_id") + val ownerId: kotlin.Int? = null, + + /* Name of the system host. */ + @Json(name = "host") + val host: kotlin.String? = null, + + /* Enlighten ID of this system host. System-generated. */ + @Json(name = "host_id") + val hostId: kotlin.Int? = null, + + /* Name of the installer. */ + @Json(name = "installer_name") + val installerName: kotlin.String? = null, + + /* Enlighten ID of the installer of this system. */ + @Json(name = "installer_id") + val installerId: kotlin.Int? = null, + + /* Name of the maintainer. */ + @Json(name = "maintainer_name") + val maintainerName: kotlin.String? = null, + + /* Enlighten ID of the maintainer of this system. */ + @Json(name = "maintainer_id") + val maintainerId: kotlin.Int? = null, + + /* List of sub-contractors of this system. */ + @Json(name = "authorized_subcontractors") + val authorizedSubcontractors: kotlin.collections.List? = null, + + /* URI for this activation. */ + @Json(name = "uri") + val uri: kotlin.String? = null, + + /* Activation last updated timestamp. */ + @Json(name = "updated_at") + val updatedAt: kotlin.Long? = null, + + /* 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. */ + @Json(name = "reference") + val reference: kotlin.String? = null, + + /* 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. */ + @Json(name = "other_references") + val otherReferences: kotlin.collections.List? = null, + + @Json(name = "address") + val address: Address? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.kt new file mode 100644 index 00000000..cbbcc94e --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param authorizedSubcontractorId The Enlighten ID of the sub-contractor of this system. System-generated. + * @param authorizedSubcontractorName Name of the sub-contractor of this system. + * @param status Current status of the subcontractor for the site. This field will be shown only for pending and rejected sub-contractors. + */ + + +data class GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner ( + + /* The Enlighten ID of the sub-contractor of this system. System-generated. */ + @Json(name = "authorized_subcontractor_id") + val authorizedSubcontractorId: kotlin.Int? = null, + + /* Name of the sub-contractor of this system. */ + @Json(name = "authorized_subcontractor_name") + val authorizedSubcontractorName: kotlin.String? = null, + + /* Current status of the subcontractor for the site. This field will be shown only for pending and rejected sub-contractors. */ + @Json(name = "status") + val status: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponse.kt new file mode 100644 index 00000000..216db456 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponse.kt @@ -0,0 +1,42 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.GetCompanyUsersResponseUsersInner +import enlighten.commissioning.models.GetPvManufacturerModelsResponsePvManufacturers + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param pvManufacturers + * @param pvModels 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. + */ + + +data class GetPvManufacturerModelsResponse ( + + @Json(name = "pv_manufacturers") + val pvManufacturers: GetPvManufacturerModelsResponsePvManufacturers? = null, + + /* 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. */ + @Json(name = "pv_models") + val pvModels: kotlin.collections.List>? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponsePvManufacturers.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponsePvManufacturers.kt new file mode 100644 index 00000000..f844c514 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponsePvManufacturers.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Information about the manufacturer whose PV module models are in the response. + * + * @param pvManufacturerId Pv manufacturer ID. + * @param name Name of the Pv manufacturer. + */ + + +data class GetPvManufacturerModelsResponsePvManufacturers ( + + /* Pv manufacturer ID. */ + @Json(name = "pv_manufacturer_id") + val pvManufacturerId: kotlin.Int? = null, + + /* Name of the Pv manufacturer. */ + @Json(name = "name") + val name: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturersResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturersResponse.kt new file mode 100644 index 00000000..2f974d60 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetPvManufacturersResponse.kt @@ -0,0 +1,37 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.GetCompanyUsersResponseUsersInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param pvManufacturers 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. + */ + + +data class GetPvManufacturersResponse ( + + /* 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. */ + @Json(name = "pv_manufacturers") + val pvManufacturers: kotlin.collections.List>? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponse.kt new file mode 100644 index 00000000..484ba290 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponse.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param companyId Enlighten ID of the API user's company. + * @param companyName Name of the API user's company. + * @param authorizedSubcontractors A list of subcontractors belonging to the API user's company. May be empty. + */ + + +data class GetSelfCompanyAuthorizedSubcontractorsResponse ( + + /* Enlighten ID of the API user's company. */ + @Json(name = "company_id") + val companyId: kotlin.Int? = null, + + /* Name of the API user's company. */ + @Json(name = "company_name") + val companyName: kotlin.String? = null, + + /* A list of subcontractors belonging to the API user's company. May be empty. */ + @Json(name = "authorized_subcontractors") + val authorizedSubcontractors: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.kt new file mode 100644 index 00000000..5dbdee6c --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner.kt @@ -0,0 +1,61 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.CompanyRoleEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param companyId Enlighten ID of the company. + * @param companyName Name of the company. + * @param location Company location. + * @param roles + * @param uri URI to the show() method for the company. System-generated. + * @param status Whether the subcontractor is enabled or disabled. + */ + + +data class GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner ( + + /* Enlighten ID of the company. */ + @Json(name = "company_id") + val companyId: kotlin.Int? = null, + + /* Name of the company. */ + @Json(name = "company_name") + val companyName: kotlin.String? = null, + + /* Company location. */ + @Json(name = "location") + val location: kotlin.String? = null, + + @Json(name = "roles") + val roles: kotlin.collections.List? = null, + + /* URI to the show() method for the company. System-generated. */ + @Json(name = "uri") + val uri: kotlin.String? = null, + + /* Whether the subcontractor is enabled or disabled. */ + @Json(name = "status") + val status: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponse.kt new file mode 100644 index 00000000..41955461 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponse.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.GetSelfCompanyBranchesResponseBranchesInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param companyId Enlighten ID of the API user's company. + * @param companyName Name of the API user's company. + * @param branches A list of branches belonging to the API user's company. May be empty. + */ + + +data class GetSelfCompanyBranchesResponse ( + + /* Enlighten ID of the API user's company. */ + @Json(name = "company_id") + val companyId: kotlin.Int? = null, + + /* Name of the API user's company. */ + @Json(name = "company_name") + val companyName: kotlin.String? = null, + + /* A list of branches belonging to the API user's company. May be empty. */ + @Json(name = "branches") + val branches: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseBranchesInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseBranchesInner.kt new file mode 100644 index 00000000..df2a9b65 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseBranchesInner.kt @@ -0,0 +1,57 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.CompanyRoleEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param companyId Enlighten ID of the company. + * @param companyName Name of the company. + * @param location Company location. + * @param roles What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. + * @param uri URI to the show() method for the company. System-generated. + */ + + +data class GetSelfCompanyBranchesResponseBranchesInner ( + + /* Enlighten ID of the company. */ + @Json(name = "company_id") + val companyId: kotlin.Int? = null, + + /* Name of the company. */ + @Json(name = "company_name") + val companyName: kotlin.String? = null, + + /* Company location. */ + @Json(name = "location") + val location: kotlin.String? = null, + + /* What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. */ + @Json(name = "roles") + val roles: kotlin.collections.List? = null, + + /* URI to the show() method for the company. System-generated. */ + @Json(name = "uri") + val uri: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSystemMeterResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSystemMeterResponse.kt new file mode 100644 index 00000000..46ef5a21 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GetSystemMeterResponse.kt @@ -0,0 +1,86 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param serialNumber Meter serial number. + * @param manufacturer Name of the manufacturer. + * @param model Model. + * @param type Meter type. + * @param operationalDate Operational date. + * @param firstReportDate First report date. + * @param lastReportDate Last report date. + * @param phase Phase. + * @param envoySerialNumber Envoy serial number. + * @param status Meter status. + * @param state Meter state. + */ + + +data class GetSystemMeterResponse ( + + /* Meter serial number. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String? = null, + + /* Name of the manufacturer. */ + @Json(name = "manufacturer") + val manufacturer: kotlin.String? = null, + + /* Model. */ + @Json(name = "model") + val model: kotlin.String? = null, + + /* Meter type. */ + @Json(name = "type") + val type: kotlin.String? = null, + + /* Operational date. */ + @Json(name = "operational_date") + val operationalDate: java.time.LocalDate? = null, + + /* First report date. */ + @Json(name = "first_report_date") + val firstReportDate: java.time.OffsetDateTime? = null, + + /* Last report date. */ + @Json(name = "last_report_date") + val lastReportDate: java.time.OffsetDateTime? = null, + + /* Phase. */ + @Json(name = "phase") + val phase: kotlin.String? = null, + + /* Envoy serial number. */ + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String? = null, + + /* Meter status. */ + @Json(name = "status") + val status: kotlin.String? = null, + + /* Meter state. */ + @Json(name = "state") + val state: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GrantActivationUserAccessResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GrantActivationUserAccessResponse.kt new file mode 100644 index 00000000..2433a655 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/GrantActivationUserAccessResponse.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param message + */ + + +data class GrantActivationUserAccessResponse ( + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/RevokeActivationUserAccessResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/RevokeActivationUserAccessResponse.kt new file mode 100644 index 00000000..3269c04f --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/RevokeActivationUserAccessResponse.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param message + */ + + +data class RevokeActivationUserAccessResponse ( + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SearchUsersResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SearchUsersResponse.kt new file mode 100644 index 00000000..6d267a74 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SearchUsersResponse.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param userId Enlighten ID of the user. + * @param companyId 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. + */ + + +data class SearchUsersResponse ( + + /* Enlighten ID of the user. */ + @Json(name = "user_id") + val userId: kotlin.Int? = null, + + /* 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. */ + @Json(name = "company_id") + val companyId: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ServerError.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ServerError.kt new file mode 100644 index 00000000..b8bc4227 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/ServerError.kt @@ -0,0 +1,39 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + */ + + +data class ServerError ( + + @Json(name = "reason") + val reason: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationMeterStatusRequest.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationMeterStatusRequest.kt new file mode 100644 index 00000000..92d86783 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationMeterStatusRequest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.SystemMeterStatusEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param status + */ + + +data class SetActivationMeterStatusRequest ( + + @Json(name = "status") + val status: SystemMeterStatusEnum? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationMeterStatusResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationMeterStatusResponse.kt new file mode 100644 index 00000000..2bbb11c1 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationMeterStatusResponse.kt @@ -0,0 +1,39 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + */ + + +data class SetActivationMeterStatusResponse ( + + @Json(name = "reason") + val reason: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeRequest.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeRequest.kt new file mode 100644 index 00000000..652fba6e --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeRequest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.SystemProductionModeEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param mode + */ + + +data class SetActivationOpsProductionModeRequest ( + + @Json(name = "mode") + val mode: SystemProductionModeEnum + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeResponse.kt new file mode 100644 index 00000000..18944d27 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeResponse.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param message + */ + + +data class SetActivationOpsProductionModeResponse ( + + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArray.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArray.kt new file mode 100644 index 00000000..b224ef25 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArray.kt @@ -0,0 +1,81 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.SystemArrayModulesInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id ID of the array. + * @param label Name of the array. + * @param angle Angle of the array. + * @param tilt Tilt of the array. + * @param reportingEnvoys List of envoys serial numbers. + * @param provisionedEnvoy Provisioned envoy. + * @param updatedAt Last updated Epoch time. + * @param left Left axis position of array. + * @param top Top axis position of array. + * @param modules + */ + + +data class SystemArray ( + + /* ID of the array. */ + @Json(name = "id") + val id: kotlin.Int? = null, + + /* Name of the array. */ + @Json(name = "label") + val label: kotlin.String? = null, + + /* Angle of the array. */ + @Json(name = "angle") + val angle: kotlin.Int? = null, + + /* Tilt of the array. */ + @Json(name = "tilt") + val tilt: kotlin.String? = null, + + /* List of envoys serial numbers. */ + @Json(name = "reporting_envoys") + val reportingEnvoys: kotlin.collections.List? = null, + + /* Provisioned envoy. */ + @Json(name = "provisioned_envoy") + val provisionedEnvoy: kotlin.String? = null, + + /* Last updated Epoch time. */ + @Json(name = "updated_at") + val updatedAt: kotlin.Long? = null, + + /* Left axis position of array. */ + @Json(name = "left") + val left: kotlin.Int? = null, + + /* Top axis position of array. */ + @Json(name = "top") + val top: kotlin.Int? = null, + + @Json(name = "modules") + val modules: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrayModulesInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrayModulesInner.kt new file mode 100644 index 00000000..498ad494 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrayModulesInner.kt @@ -0,0 +1,56 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id ID of the module. + * @param left Left axis position of module. + * @param top Top axis position of module. + * @param angle Angle of the module. + * @param serialNum Inverter serial number mapped with this module. + */ + + +data class SystemArrayModulesInner ( + + /* ID of the module. */ + @Json(name = "id") + val id: kotlin.Int? = null, + + /* Left axis position of module. */ + @Json(name = "left") + val left: kotlin.Int? = null, + + /* Top axis position of module. */ + @Json(name = "top") + val top: kotlin.Int? = null, + + /* Angle of the module. */ + @Json(name = "angle") + val angle: kotlin.Int? = null, + + /* Inverter serial number mapped with this module. */ + @Json(name = "serial_num") + val serialNum: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrayTypeEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrayTypeEnum.kt new file mode 100644 index 00000000..df7fad7c --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrayTypeEnum.kt @@ -0,0 +1,72 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Type of array installed. All other values will be ignored. To unset array_type, pass null. + * + * Values: fixed_open_rack,fixed_roof_mount,single_axis_tracking,single_axis_backtracking,dual_axis_tracking + */ + +@JsonClass(generateAdapter = false) +enum class SystemArrayTypeEnum(val value: kotlin.String) { + + @Json(name = "fixed_open_rack") + fixed_open_rack("fixed_open_rack"), + + @Json(name = "fixed_roof_mount") + fixed_roof_mount("fixed_roof_mount"), + + @Json(name = "single_axis_tracking") + single_axis_tracking("single_axis_tracking"), + + @Json(name = "single_axis_backtracking") + single_axis_backtracking("single_axis_backtracking"), + + @Json(name = "dual_axis_tracking") + dual_axis_tracking("dual_axis_tracking"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemArrayTypeEnum) "$data" else null + + /** + * Returns a valid [SystemArrayTypeEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemArrayTypeEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrays.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrays.kt new file mode 100644 index 00000000..7a817086 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArrays.kt @@ -0,0 +1,71 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.SystemArray +import enlighten.commissioning.models.SystemArraysInventoryDetailsInner +import enlighten.commissioning.models.SystemArraysLayersInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId System ID. + * @param createdAt System created Epoch time. + * @param updatedAt System updated Epoch time. + * @param angle Angle of the system. + * @param arrays + * @param inventory List of active inverter serial numbers. + * @param inventoryDetails + * @param layers + */ + + +data class SystemArrays ( + + /* System ID. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* System created Epoch time. */ + @Json(name = "created_at") + val createdAt: kotlin.Long? = null, + + /* System updated Epoch time. */ + @Json(name = "updated_at") + val updatedAt: kotlin.Long? = null, + + /* Angle of the system. */ + @Json(name = "angle") + val angle: kotlin.Int? = null, + + @Json(name = "arrays") + val arrays: kotlin.collections.List? = null, + + /* List of active inverter serial numbers. */ + @Json(name = "inventory") + val inventory: kotlin.collections.List? = null, + + @Json(name = "inventory_details") + val inventoryDetails: kotlin.collections.List? = null, + + @Json(name = "layers") + val layers: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArraysInventoryDetailsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArraysInventoryDetailsInner.kt new file mode 100644 index 00000000..6c1f300a --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArraysInventoryDetailsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param type Device type. + * @param count Device count. + * @param serialNum Device serial number. + */ + + +data class SystemArraysInventoryDetailsInner ( + + /* Device type. */ + @Json(name = "type") + val type: kotlin.String? = null, + + /* Device count. */ + @Json(name = "count") + val count: kotlin.Int? = null, + + /* Device serial number. */ + @Json(name = "serialNum") + val serialNum: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArraysLayersInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArraysLayersInner.kt new file mode 100644 index 00000000..d0be852d --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemArraysLayersInner.kt @@ -0,0 +1,71 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param file Background image url. + * @param scale Zoom level. + * @param angle Angle of the layer. + * @param opacity Opacity of the layer. + * @param width Width of the layer. + * @param height Height of the layer. + * @param left Left of the layer. + * @param top Top of the layer. + */ + + +data class SystemArraysLayersInner ( + + /* Background image url. */ + @Json(name = "file") + val file: kotlin.String? = null, + + /* Zoom level. */ + @Json(name = "scale") + val scale: kotlin.Int? = null, + + /* Angle of the layer. */ + @Json(name = "angle") + val angle: kotlin.Int? = null, + + /* Opacity of the layer. */ + @Json(name = "opacity") + val opacity: kotlin.Int? = null, + + /* Width of the layer. */ + @Json(name = "width") + val width: kotlin.Int? = null, + + /* Height of the layer. */ + @Json(name = "height") + val height: kotlin.Int? = null, + + /* Left of the layer. */ + @Json(name = "left") + val left: kotlin.Int? = null, + + /* Top of the layer. */ + @Json(name = "top") + val top: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemAttachmentTypeEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemAttachmentTypeEnum.kt new file mode 100644 index 00000000..9970dae6 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemAttachmentTypeEnum.kt @@ -0,0 +1,75 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * How the microinverters are attached to the panels. Possible values are acm (AC Module), rack_mount (rack- or rail-mounted), zep (Zep Solar compatible), bipv (Building Integrated PV), frame_mount (Enphase Frame Mount), railless_mount (Other Railless Mount). + * + * Values: rack_mount,zep,acm,bipv,frame_mount,railless_mount + */ + +@JsonClass(generateAdapter = false) +enum class SystemAttachmentTypeEnum(val value: kotlin.String) { + + @Json(name = "rack_mount") + rack_mount("rack_mount"), + + @Json(name = "zep") + zep("zep"), + + @Json(name = "acm") + acm("acm"), + + @Json(name = "bipv") + bipv("bipv"), + + @Json(name = "frame_mount") + frame_mount("frame_mount"), + + @Json(name = "railless_mount") + railless_mount("railless_mount"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemAttachmentTypeEnum) "$data" else null + + /** + * Returns a valid [SystemAttachmentTypeEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemAttachmentTypeEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemEstimate.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemEstimate.kt new file mode 100644 index 00000000..7c90faa7 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemEstimate.kt @@ -0,0 +1,46 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId System this estimate is for. + * @param degradeFactor Annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. Default 0.5%. + * @param monthEstimates 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. + */ + + +data class SystemEstimate ( + + /* System this estimate is for. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. Default 0.5%. */ + @Json(name = "degrade_factor") + val degradeFactor: kotlin.String? = null, + + /* 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. */ + @Json(name = "month_estimates") + val monthEstimates: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemExpandEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemExpandEnum.kt new file mode 100644 index 00000000..45363745 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemExpandEnum.kt @@ -0,0 +1,69 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: owner,ownerPeriodCompany,host,hostPeriodCompany + */ + +@JsonClass(generateAdapter = false) +enum class SystemExpandEnum(val value: kotlin.String) { + + @Json(name = "owner") + owner("owner"), + + @Json(name = "owner.company") + ownerPeriodCompany("owner.company"), + + @Json(name = "host") + host("host"), + + @Json(name = "host.company") + hostPeriodCompany("host.company"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemExpandEnum) "$data" else null + + /** + * Returns a valid [SystemExpandEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemExpandEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemInternetConnectionEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemInternetConnectionEnum.kt new file mode 100644 index 00000000..2f00ca9d --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemInternetConnectionEnum.kt @@ -0,0 +1,69 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * How the system's Envoys connect to the Internet. Use 'dialup' if the Internet connection is satellite or dial-up. + * + * Values: none,cellular,broadband,dialup + */ + +@JsonClass(generateAdapter = false) +enum class SystemInternetConnectionEnum(val value: kotlin.String) { + + @Json(name = "none") + none("none"), + + @Json(name = "cellular") + cellular("cellular"), + + @Json(name = "broadband") + broadband("broadband"), + + @Json(name = "dialup") + dialup("dialup"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemInternetConnectionEnum) "$data" else null + + /** + * Returns a valid [SystemInternetConnectionEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemInternetConnectionEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemMeterStatusEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemMeterStatusEnum.kt new file mode 100644 index 00000000..b16d539b --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemMeterStatusEnum.kt @@ -0,0 +1,63 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: enabled,disabled + */ + +@JsonClass(generateAdapter = false) +enum class SystemMeterStatusEnum(val value: kotlin.String) { + + @Json(name = "enabled") + enabled("enabled"), + + @Json(name = "disabled") + disabled("disabled"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemMeterStatusEnum) "$data" else null + + /** + * Returns a valid [SystemMeterStatusEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemMeterStatusEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParams.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParams.kt new file mode 100644 index 00000000..32bd783a --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParams.kt @@ -0,0 +1,232 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner +import enlighten.commissioning.models.SystemArrayTypeEnum +import enlighten.commissioning.models.SystemAttachmentTypeEnum +import enlighten.commissioning.models.SystemInternetConnectionEnum +import enlighten.commissioning.models.SystemParamsAddress +import enlighten.commissioning.models.SystemParamsEnchargeInner +import enlighten.commissioning.models.SystemParamsEnpowerInner +import enlighten.commissioning.models.SystemSourceEnum +import enlighten.commissioning.models.SystemTypeEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemName Name of the system. Limit 255 characters. + * @param systemType + * @param internetConnection + * @param lease Whether the system is leased. Default false. + * @param operational Whether this system is permitted to operate. Default true. + * @param ownerId 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. + * @param hostId 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. + * @param authorizedSubcontractorId 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. + * @param installerId Enlighten ID of the installer of this system. Defaults to current user's company ID. + * @param maintainerName Name of the maintainer. + * @param maintainerId The Enlighten ID of the maintainer of this system. Defaults to current user's company ID. + * @param authorizedSubcontractors List of sub-contractors of this system. + * @param allowPublicAccess When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true. + * @param interconnectDate When the system was approved to connect to the grid. + * @param source + * @param arrayType + * @param attachmentType + * @param ensembleEnvoy Specifies serial number of ensemble envoy in multi envoy system. + * @param gridProfile Grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles. + * @param requestedProfile + * @param requestedReportFreq + * @param voltage 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. + * @param envoySerialNumbers A list of Envoys installed on this system. + * @param pvManufacturer Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs. + * @param pvManufacturerName Name of the Custom PV module manufacturer associated with the system. + * @param pvModel Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs. + * @param pvModelName Name of the Custom PV module model associated with the system. + * @param pvModulePowerRating Power rating (in W) of the PV module installed on the system. + * @param pvModuleType Type ID of the PV module installed on the system. 1 -> 'Mono-facial', 2 -> 'Bi-facial', 3 -> 'Split cell', 4 -> 'Other'. + * @param expectedEnvoyCount Total envoys the system is supposed to have. + * @param expectedPcuCount Total PCUs the system is supposed to have. + * @param expectedAcbCount Total acbs the system is supposed to have. + * @param expectedNsrCount Total nsrs the system is supposed to have. + * @param expectedMeterCount Total meters the system is supposed to have. + * @param expectedEnchargeCount Total encharges the system is supposed to have. + * @param expectedEnpowerCount Total enpowers the system is supposed to have. + * @param reference 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. + * @param encharge Encharge detail. + * @param enpower Enpower detail. + * @param address + */ + + +data class SystemParams ( + + /* Name of the system. Limit 255 characters. */ + @Json(name = "system_name") + val systemName: kotlin.String, + + @Json(name = "system_type") + val systemType: SystemTypeEnum? = null, + + @Json(name = "internet_connection") + val internetConnection: SystemInternetConnectionEnum? = null, + + /* Whether the system is leased. Default false. */ + @Json(name = "lease") + val lease: kotlin.Boolean? = null, + + /* Whether this system is permitted to operate. Default true. */ + @Json(name = "operational") + val operational: kotlin.Boolean? = null, + + /* 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. */ + @Json(name = "owner_id") + val ownerId: kotlin.Int? = null, + + /* 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. */ + @Json(name = "host_id") + val hostId: kotlin.Int? = null, + + /* 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. */ + @Json(name = "authorized_subcontractor_id") + val authorizedSubcontractorId: kotlin.Int? = null, + + /* Enlighten ID of the installer of this system. Defaults to current user's company ID. */ + @Json(name = "installer_id") + val installerId: kotlin.Int? = null, + + /* Name of the maintainer. */ + @Json(name = "maintainer_name") + val maintainerName: kotlin.String? = null, + + /* The Enlighten ID of the maintainer of this system. Defaults to current user's company ID. */ + @Json(name = "maintainer_id") + val maintainerId: kotlin.Int? = null, + + /* List of sub-contractors of this system. */ + @Json(name = "authorized_subcontractors") + val authorizedSubcontractors: kotlin.collections.List? = null, + + /* When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true. */ + @Json(name = "allow_public_access") + val allowPublicAccess: kotlin.Boolean? = null, + + /* When the system was approved to connect to the grid. */ + @Json(name = "interconnect_date") + val interconnectDate: java.time.LocalDate? = null, + + @Json(name = "source") + val source: SystemSourceEnum? = null, + + @Json(name = "array_type") + val arrayType: SystemArrayTypeEnum? = null, + + @Json(name = "attachment_type") + val attachmentType: SystemAttachmentTypeEnum? = null, + + /* Specifies serial number of ensemble envoy in multi envoy system. */ + @Json(name = "ensemble_envoy") + val ensembleEnvoy: kotlin.String? = null, + + /* Grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles. */ + @Json(name = "grid_profile") + val gridProfile: kotlin.String? = null, + + @Json(name = "requested_profile") + val requestedProfile: kotlin.String? = null, + + @Json(name = "requested_report_freq") + val requestedReportFreq: kotlin.String? = null, + + /* 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. */ + @Json(name = "voltage") + val voltage: kotlin.String? = null, + + /* A list of Envoys installed on this system. */ + @Json(name = "envoy_serial_numbers") + val envoySerialNumbers: kotlin.collections.List? = null, + + /* Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs. */ + @Json(name = "pv_manufacturer") + val pvManufacturer: kotlin.Int? = null, + + /* Name of the Custom PV module manufacturer associated with the system. */ + @Json(name = "pv_manufacturer_name") + val pvManufacturerName: kotlin.String? = null, + + /* Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs. */ + @Json(name = "pv_model") + val pvModel: kotlin.Int? = null, + + /* Name of the Custom PV module model associated with the system. */ + @Json(name = "pv_model_name") + val pvModelName: kotlin.String? = null, + + /* Power rating (in W) of the PV module installed on the system. */ + @Json(name = "pv_module_power_rating") + val pvModulePowerRating: kotlin.Float? = null, + + /* Type ID of the PV module installed on the system. 1 -> 'Mono-facial', 2 -> 'Bi-facial', 3 -> 'Split cell', 4 -> 'Other'. */ + @Json(name = "pv_module_type") + val pvModuleType: kotlin.Int? = null, + + /* Total envoys the system is supposed to have. */ + @Json(name = "expected_envoy_count") + val expectedEnvoyCount: kotlin.Int? = null, + + /* Total PCUs the system is supposed to have. */ + @Json(name = "expected_pcu_count") + val expectedPcuCount: kotlin.Int? = null, + + /* Total acbs the system is supposed to have. */ + @Json(name = "expected_acb_count") + val expectedAcbCount: kotlin.Int? = null, + + /* Total nsrs the system is supposed to have. */ + @Json(name = "expected_nsr_count") + val expectedNsrCount: kotlin.Int? = null, + + /* Total meters the system is supposed to have. */ + @Json(name = "expected_meter_count") + val expectedMeterCount: kotlin.Int? = null, + + /* Total encharges the system is supposed to have. */ + @Json(name = "expected_encharge_count") + val expectedEnchargeCount: kotlin.Int? = null, + + /* Total enpowers the system is supposed to have. */ + @Json(name = "expected_enpower_count") + val expectedEnpowerCount: kotlin.Int? = null, + + /* 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. */ + @Json(name = "reference") + val reference: kotlin.String? = null, + + /* Encharge detail. */ + @Json(name = "encharge") + val encharge: kotlin.collections.List? = null, + + /* Enpower detail. */ + @Json(name = "enpower") + val enpower: kotlin.collections.List? = null, + + @Json(name = "address") + val address: SystemParamsAddress? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsAddress.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsAddress.kt new file mode 100644 index 00000000..b0c8c56d --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsAddress.kt @@ -0,0 +1,55 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Location of the system. Use the ISO 3166-1 2-letter code for the country. Latitude and longitude are calculated by Enlighten, not provided by the client. + * + * @param street1 + * @param city + * @param state + * @param country + * @param postalCode + * @param street2 + */ + + +data class SystemParamsAddress ( + + @Json(name = "street1") + val street1: kotlin.String, + + @Json(name = "city") + val city: kotlin.String, + + @Json(name = "state") + val state: kotlin.String, + + @Json(name = "country") + val country: kotlin.String, + + @Json(name = "postal_code") + val postalCode: kotlin.String, + + @Json(name = "street2") + val street2: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsEnchargeInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsEnchargeInner.kt new file mode 100644 index 00000000..a68be0f1 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsEnchargeInner.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param envoySerialNumber Envoy serial number. + * @param enchargeSerialNumbers Encharge serial numbers. + */ + + +data class SystemParamsEnchargeInner ( + + /* Envoy serial number. */ + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String? = null, + + /* Encharge serial numbers. */ + @Json(name = "encharge_serial_numbers") + val enchargeSerialNumbers: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsEnpowerInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsEnpowerInner.kt new file mode 100644 index 00000000..f84cce7f --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemParamsEnpowerInner.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param envoySerialNumber Envoy serial number. + * @param enpowerSerialNumbers Enpower serial numbers. + */ + + +data class SystemParamsEnpowerInner ( + + /* Envoy serial number. */ + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String? = null, + + /* Enpower serial numbers. */ + @Json(name = "enpower_serial_numbers") + val enpowerSerialNumbers: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemProductionModeEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemProductionModeEnum.kt new file mode 100644 index 00000000..7cf3cefa --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemProductionModeEnum.kt @@ -0,0 +1,63 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: `true`,`false` + */ + +@JsonClass(generateAdapter = false) +enum class SystemProductionModeEnum(val value: kotlin.String) { + + @Json(name = "true") + `true`("true"), + + @Json(name = "false") + `false`("false"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemProductionModeEnum) "$data" else null + + /** + * Returns a valid [SystemProductionModeEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemProductionModeEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemSourceEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemSourceEnum.kt new file mode 100644 index 00000000..99beb580 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemSourceEnum.kt @@ -0,0 +1,63 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Source of production measurements taken on the system. When 'meter', production values come from a revenue-grade meter on the system. When 'microinverters', production values come from the microinverters on the system. + * + * Values: meter,microinverters + */ + +@JsonClass(generateAdapter = false) +enum class SystemSourceEnum(val value: kotlin.String) { + + @Json(name = "meter") + meter("meter"), + + @Json(name = "microinverters") + microinverters("microinverters"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemSourceEnum) "$data" else null + + /** + * Returns a valid [SystemSourceEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemSourceEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemStageEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemStageEnum.kt new file mode 100644 index 00000000..584db25c --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemStageEnum.kt @@ -0,0 +1,75 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: _1,_2,_3,_4,_5,in_progress + */ + +@JsonClass(generateAdapter = false) +enum class SystemStageEnum(val value: kotlin.String) { + + @Json(name = "1") + _1("1"), + + @Json(name = "2") + _2("2"), + + @Json(name = "3") + _3("3"), + + @Json(name = "4") + _4("4"), + + @Json(name = "5") + _5("5"), + + @Json(name = "in_progress") + in_progress("in_progress"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemStageEnum) "$data" else null + + /** + * Returns a valid [SystemStageEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemStageEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemTypeEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemTypeEnum.kt new file mode 100644 index 00000000..b26a9434 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/SystemTypeEnum.kt @@ -0,0 +1,66 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Type of the system. Default 'residential'. + * + * Values: residential,commercial,other + */ + +@JsonClass(generateAdapter = false) +enum class SystemTypeEnum(val value: kotlin.String) { + + @Json(name = "residential") + residential("residential"), + + @Json(name = "commercial") + commercial("commercial"), + + @Json(name = "other") + other("other"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemTypeEnum) "$data" else null + + /** + * Returns a valid [SystemTypeEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemTypeEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInner.kt new file mode 100644 index 00000000..8a92d0ee --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInner.kt @@ -0,0 +1,55 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.TariffSeasonsInnerDaysInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id ToU year ID. e.g='all_year_long'. + * @param start Start of season. e.g='1/1'. + * @param days ToU seasons. + * @param enableChargeFromGrid + * @param enableDischargeToGrid + */ + + +data class TariffSeasonsInner ( + + /* ToU year ID. e.g='all_year_long'. */ + @Json(name = "id") + val id: kotlin.String? = null, + + /* Start of season. e.g='1/1'. */ + @Json(name = "start") + val start: kotlin.String? = null, + + /* ToU seasons. */ + @Json(name = "days") + val days: kotlin.collections.List? = null, + + @Json(name = "enable_charge_from_grid") + val enableChargeFromGrid: kotlin.Boolean? = null, + + @Json(name = "enable_discharge_to_grid") + val enableDischargeToGrid: kotlin.Boolean? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInner.kt new file mode 100644 index 00000000..2a48553a --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInner.kt @@ -0,0 +1,57 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.TariffSeasonsInnerDaysInnerPeriodsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id ToU days ID. e.g='all_days'. + * @param days Comma separated days. e.g='Sun,Mon,Tue,Wed,Thu,Fri,Sat'. + * @param mustChargeStart Must charge start field. e.g=0. + * @param mustChargeDuration Must charge duration field. e.g=0. + * @param periods Periods. + */ + + +data class TariffSeasonsInnerDaysInner ( + + /* ToU days ID. e.g='all_days'. */ + @Json(name = "id") + val id: kotlin.String? = null, + + /* Comma separated days. e.g='Sun,Mon,Tue,Wed,Thu,Fri,Sat'. */ + @Json(name = "days") + val days: kotlin.String? = null, + + /* Must charge start field. e.g=0. */ + @Json(name = "must_charge_start") + val mustChargeStart: kotlin.Int? = null, + + /* Must charge duration field. e.g=0. */ + @Json(name = "must_charge_duration") + val mustChargeDuration: kotlin.Int? = null, + + /* Periods. */ + @Json(name = "periods") + val periods: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerPeriodsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerPeriodsInner.kt new file mode 100644 index 00000000..e52a05b3 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerPeriodsInner.kt @@ -0,0 +1,51 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id Period ID. e.g='period_1'. + * @param start Period start. e.g=0. + * @param rate Period rate. e.g=0.0. + * @param error Dynamic fields will appear. + */ + + +data class TariffSeasonsInnerDaysInnerPeriodsInner ( + + /* Period ID. e.g='period_1'. */ + @Json(name = "id") + val id: kotlin.String? = null, + + /* Period start. e.g=0. */ + @Json(name = "start") + val start: kotlin.String? = null, + + /* Period rate. e.g=0.0. */ + @Json(name = "rate") + val rate: kotlin.String? = null, + + /* Dynamic fields will appear. */ + @Json(name = "error") + val error: kotlin.collections.Map? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettings.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettings.kt new file mode 100644 index 00000000..b874d3ce --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettings.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.TariffSettingsTariff +import enlighten.commissioning.models.UpdateSystemTariffSettingsResponseTask + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param tariff + * @param task + */ + + +data class TariffSettings ( + + @Json(name = "tariff") + val tariff: TariffSettingsTariff? = null, + + @Json(name = "task") + val task: UpdateSystemTariffSettingsResponseTask? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariff.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariff.kt new file mode 100644 index 00000000..1fa30f68 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariff.kt @@ -0,0 +1,52 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.TariffSeasonsInner +import enlighten.commissioning.models.TariffSettingsTariffCurrencyType +import enlighten.commissioning.models.TariffSettingsTariffSingleRate + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param currencyType + * @param singleRate + * @param seasons ToU seasons. + * @param seasonsSell ToU seasons. + */ + + +data class TariffSettingsTariff ( + + @Json(name = "currency_type") + val currencyType: TariffSettingsTariffCurrencyType? = null, + + @Json(name = "single_rate") + val singleRate: TariffSettingsTariffSingleRate? = null, + + /* ToU seasons. */ + @Json(name = "seasons") + val seasons: kotlin.collections.List? = null, + + /* ToU seasons. */ + @Json(name = "seasons_sell") + val seasonsSell: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariffCurrencyType.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariffCurrencyType.kt new file mode 100644 index 00000000..dd3625f4 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariffCurrencyType.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Currency type. + * + * @param code Tariff currency code. e.g='USD'. + */ + + +data class TariffSettingsTariffCurrencyType ( + + /* Tariff currency code. e.g='USD'. */ + @Json(name = "code") + val code: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariffSingleRate.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariffSingleRate.kt new file mode 100644 index 00000000..978c1524 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TariffSettingsTariffSingleRate.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Single rate. + * + * @param rate Usage rate. e.g=0.0. + * @param sell FiT rate. e.g=0.0. + */ + + +data class TariffSettingsTariffSingleRate ( + + /* Usage rate. e.g=0.0. */ + @Json(name = "rate") + val rate: kotlin.String? = null, + + /* FiT rate. e.g=0.0. */ + @Json(name = "sell") + val sell: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TooManyRequestsError.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TooManyRequestsError.kt new file mode 100644 index 00000000..700579a0 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/TooManyRequestsError.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason Response code. + * @param message + * @param period Quota exceeded for minute/month. + * @param periodStart Starting period timestamp. + * @param periodEnd Ending period timestamp. + * @param limit Limit count for the period. + */ + + +data class TooManyRequestsError ( + + /* Response code. */ + @Json(name = "reason") + val reason: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.collections.List? = null, + + /* Quota exceeded for minute/month. */ + @Json(name = "period") + val period: kotlin.String? = null, + + /* Starting period timestamp. */ + @Json(name = "period_start") + val periodStart: kotlin.Int? = null, + + /* Ending period timestamp. */ + @Json(name = "period_end") + val periodEnd: kotlin.Int? = null, + + /* Limit count for the period. */ + @Json(name = "limit") + val limit: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UnprocessableEntityError.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UnprocessableEntityError.kt new file mode 100644 index 00000000..10276927 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UnprocessableEntityError.kt @@ -0,0 +1,39 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param errorCode + * @param errorMessages + */ + + +data class UnprocessableEntityError ( + + @Json(name = "errorCode") + val errorCode: kotlin.Int? = null, + + @Json(name = "errorMessages") + val errorMessages: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateActivationEstimateRequest.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateActivationEstimateRequest.kt new file mode 100644 index 00000000..2d266742 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateActivationEstimateRequest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param degradeFactor Annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. + * @param monthEstimates 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. + */ + + +data class UpdateActivationEstimateRequest ( + + /* Annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. */ + @Json(name = "degrade_factor") + val degradeFactor: 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. */ + @Json(name = "month_estimates") + val monthEstimates: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateCompanyUserRequest.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateCompanyUserRequest.kt new file mode 100644 index 00000000..c7da66a9 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateCompanyUserRequest.kt @@ -0,0 +1,62 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param companyId 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. + * @param email Email address of the user. Must be unique within Enlighten. Required. + * @param enlightenEmails Whether the user receives automated emails from Enlighten. Default false. + * @param firstName User's first name. Required. + * @param lastName User's last name. Required. + * @param phone Telephone number of the user. Optional. + */ + + +data class UpdateCompanyUserRequest ( + + /* 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. */ + @Json(name = "company_id") + @Deprecated(message = "This property is deprecated.") + val companyId: kotlin.Int? = null, + + /* Email address of the user. Must be unique within Enlighten. Required. */ + @Json(name = "email") + val email: kotlin.String? = null, + + /* Whether the user receives automated emails from Enlighten. Default false. */ + @Json(name = "enlighten_emails") + val enlightenEmails: kotlin.Boolean? = null, + + /* User's first name. Required. */ + @Json(name = "first_name") + val firstName: kotlin.String? = null, + + /* User's last name. Required. */ + @Json(name = "last_name") + val lastName: kotlin.String? = null, + + /* Telephone number of the user. Optional. */ + @Json(name = "phone") + val phone: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemArraysRequest.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemArraysRequest.kt new file mode 100644 index 00000000..16a22b18 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemArraysRequest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.ArrayParams + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param angle Angle of the system. + * @param arrays + */ + + +data class UpdateSystemArraysRequest ( + + /* Angle of the system. */ + @Json(name = "angle") + val angle: kotlin.Int, + + @Json(name = "arrays") + val arrays: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemMeterResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemMeterResponse.kt new file mode 100644 index 00000000..90236f31 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemMeterResponse.kt @@ -0,0 +1,56 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param serialNumber Meter serial number. + * @param manufacturer Name of the manufacturer. + * @param model Model. + * @param type Meter type. + * @param operationalDate Operational date. + */ + + +data class UpdateSystemMeterResponse ( + + /* Meter serial number. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String? = null, + + /* Name of the manufacturer. */ + @Json(name = "manufacturer") + val manufacturer: kotlin.String? = null, + + /* Model. */ + @Json(name = "model") + val model: kotlin.String? = null, + + /* Meter type. */ + @Json(name = "type") + val type: kotlin.String? = null, + + /* Operational date. */ + @Json(name = "operational_date") + val operationalDate: java.time.LocalDate? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponse.kt new file mode 100644 index 00000000..6acaa9ae --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponse.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.UpdateSystemTariffSettingsResponseTask + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param task + */ + + +data class UpdateSystemTariffSettingsResponse ( + + @Json(name = "task") + val task: UpdateSystemTariffSettingsResponseTask? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTask.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTask.kt new file mode 100644 index 00000000..308a28df --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTask.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param status Status of latest tariff update task. + * @param createdAt Created time of latest tariff update task. + */ + + +data class UpdateSystemTariffSettingsResponseTask ( + + /* Status of latest tariff update task. */ + @Json(name = "status") + val status: kotlin.String? = null, + + /* Created time of latest tariff update task. */ + @Json(name = "created_at") + val createdAt: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/User.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/User.kt new file mode 100644 index 00000000..aac817f8 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/User.kt @@ -0,0 +1,92 @@ +/** + * + * 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.models + +import enlighten.commissioning.models.Company +import enlighten.commissioning.models.UserRoleEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param active Whether the user is allowed to log in to Enlighten. + * @param userRoles 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. + * @param email Email address of the user. + * @param enlightenEmails Whether the user receives automated emails from Enlighten. + * @param enlightenView Which view of Enlighten the user has. + * @param firstName User's first name. + * @param lastName User's last name. + * @param phone Telephone number of the user. + * @param uri URI to the show() method for the user. System-generated. + * @param userId Enlighten ID of the user. System-generated. + * @param updatedAt Last updated date and time in Epoch format. + * @param company + */ + + +data class User ( + + /* Whether the user is allowed to log in to Enlighten. */ + @Json(name = "active") + val active: kotlin.Boolean? = null, + + /* 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. */ + @Json(name = "user_roles") + val userRoles: kotlin.collections.List? = null, + + /* Email address of the user. */ + @Json(name = "email") + val email: kotlin.String? = null, + + /* Whether the user receives automated emails from Enlighten. */ + @Json(name = "enlighten_emails") + val enlightenEmails: kotlin.Boolean? = null, + + /* Which view of Enlighten the user has. */ + @Json(name = "enlighten_view") + val enlightenView: kotlin.String? = null, + + /* User's first name. */ + @Json(name = "first_name") + val firstName: kotlin.String? = null, + + /* User's last name. */ + @Json(name = "last_name") + val lastName: kotlin.String? = null, + + /* Telephone number of the user. */ + @Json(name = "phone") + val phone: kotlin.String? = null, + + /* URI to the show() method for the user. System-generated. */ + @Json(name = "uri") + val uri: kotlin.String? = null, + + /* Enlighten ID of the user. System-generated. */ + @Json(name = "user_id") + val userId: kotlin.Int? = null, + + /* Last updated date and time in Epoch format. */ + @Json(name = "updated_at") + val updatedAt: kotlin.Long? = null, + + @Json(name = "company") + val company: Company? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserExpandEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserExpandEnum.kt new file mode 100644 index 00000000..99bc4cf9 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserExpandEnum.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: company + */ + +@JsonClass(generateAdapter = false) +enum class UserExpandEnum(val value: kotlin.String) { + + @Json(name = "company") + company("company"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is UserExpandEnum) "$data" else null + + /** + * Returns a valid [UserExpandEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): UserExpandEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserParams.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserParams.kt new file mode 100644 index 00000000..1a694282 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserParams.kt @@ -0,0 +1,67 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param companyId 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. + * @param email Email address of the user. Must be unique within Enlighten. Required. + * @param enlightenEmails Whether the user receives automated emails from Enlighten. Default false. + * @param enlightenView 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'. + * @param firstName User's first name. Required. + * @param lastName User's last name. Required. + * @param phone Telephone number of the user. Optional. + */ + + +data class UserParams ( + + /* 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. */ + @Json(name = "company_id") + @Deprecated(message = "This property is deprecated.") + val companyId: kotlin.Int? = null, + + /* Email address of the user. Must be unique within Enlighten. Required. */ + @Json(name = "email") + val email: kotlin.String? = null, + + /* Whether the user receives automated emails from Enlighten. Default false. */ + @Json(name = "enlighten_emails") + val enlightenEmails: kotlin.Boolean? = null, + + /* 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'. */ + @Json(name = "enlighten_view") + val enlightenView: kotlin.String? = null, + + /* User's first name. Required. */ + @Json(name = "first_name") + val firstName: kotlin.String? = null, + + /* User's last name. Required. */ + @Json(name = "last_name") + val lastName: kotlin.String? = null, + + /* Telephone number of the user. Optional. */ + @Json(name = "phone") + val phone: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserRoleEnum.kt b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserRoleEnum.kt new file mode 100644 index 00000000..92b2346b --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/commissioning/models/UserRoleEnum.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: self_installer + */ + +@JsonClass(generateAdapter = false) +enum class UserRoleEnum(val value: kotlin.String) { + + @Json(name = "self_installer") + self_installer("self_installer"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is UserRoleEnum) "$data" else null + + /** + * Returns a valid [UserRoleEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): UserRoleEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiAbstractions.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiAbstractions.kt new file mode 100644 index 00000000..d1b12389 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiAbstractions.kt @@ -0,0 +1,23 @@ +package enlighten.infrastructure + +typealias MultiValueMap = MutableMap> + +fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { + "csv" -> "," + "tsv" -> "\t" + "pipe" -> "|" + "space" -> " " + else -> "" +} + +val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } + +fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) + = toMultiValue(items.asIterable(), collectionFormat, map) + +fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { + return when(collectionFormat) { + "multi" -> items.map(map) + else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiClient.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiClient.kt new file mode 100644 index 00000000..84511479 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiClient.kt @@ -0,0 +1,267 @@ +package enlighten.infrastructure + +import okhttp3.OkHttpClient +import okhttp3.RequestBody +import okhttp3.RequestBody.Companion.asRequestBody +import okhttp3.RequestBody.Companion.toRequestBody +import okhttp3.FormBody +import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.ResponseBody +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.Request +import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders +import okhttp3.MultipartBody +import okhttp3.Call +import okhttp3.Callback +import okhttp3.Response +import java.io.BufferedWriter +import java.io.File +import java.io.FileWriter +import java.io.IOException +import java.net.URLConnection +import java.time.LocalDate +import java.time.LocalDateTime +import java.time.LocalTime +import java.time.OffsetDateTime +import java.time.OffsetTime +import java.util.Locale +import com.squareup.moshi.adapter + + val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody() + +open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { + companion object { + protected const val ContentType = "Content-Type" + protected const val Accept = "Accept" + protected const val Authorization = "Authorization" + protected const val JsonMediaType = "application/json" + protected const val FormDataMediaType = "multipart/form-data" + protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" + protected const val XmlMediaType = "application/xml" + protected const val OctetMediaType = "application/octet-stream" + + val apiKey: MutableMap = mutableMapOf() + val apiKeyPrefix: MutableMap = mutableMapOf() + var username: String? = null + var password: String? = null + var accessToken: String? = null + const val baseUrlKey = "enlighten.baseUrl" + + @JvmStatic + val defaultClient: OkHttpClient by lazy { + builder.build() + } + + @JvmStatic + val builder: OkHttpClient.Builder = OkHttpClient.Builder() + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + protected fun guessContentTypeFromFile(file: File): String { + val contentType = URLConnection.guessContentTypeFromName(file.name) + return contentType ?: "application/octet-stream" + } + + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) + mediaType == FormDataMediaType -> + MultipartBody.Builder() + .setType(MultipartBody.FORM) + .apply { + // content's type *must* be Map> + @Suppress("UNCHECKED_CAST") + (content as Map>).forEach { (name, part) -> + if (part.body is File) { + val partHeaders = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") + val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() + addPart( + partHeaders.toHeaders(), + part.body.asRequestBody(fileMediaType) + ) + } else { + val partHeaders = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"") + addPart( + partHeaders.toHeaders(), + parameterToString(part.body).toRequestBody(null) + ) + } + } + }.build() + mediaType == FormUrlEncMediaType -> { + FormBody.Builder().apply { + // content's type *must* be Map> + @Suppress("UNCHECKED_CAST") + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) + } + }.build() + } + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> + if (content == null) { + EMPTY_REQUEST + } else { + Serializer.moshi.adapter(T::class.java).toJson(content) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) + } + mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") + mediaType == OctetMediaType && content is ByteArray -> + content.toRequestBody(OctetMediaType.toMediaTypeOrNull()) + // TODO: this should be extended with other serializers + else -> throw UnsupportedOperationException("requestBody currently only supports JSON body, byte body and File body.") + } + + @OptIn(ExperimentalStdlibApi::class) + protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { + if(body == null) { + return null + } + if (T::class.java == File::class.java) { + // return tempFile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options + val tempFile = java.nio.file.Files.createTempFile("tmp.enlighten", null).toFile() + tempFile.deleteOnExit() + body.byteStream().use { inputStream -> + tempFile.outputStream().use { tempFileOutputStream -> + inputStream.copyTo(tempFileOutputStream) + } + } + return tempFile as T + } + + return when { + mediaType == null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> { + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } + Serializer.moshi.adapter().fromJson(bodyContent) + } + mediaType == OctetMediaType -> body.bytes() as? T + else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") + } + } + + protected fun updateAuthParams(requestConfig: RequestConfig) { + if (requestConfig.query["key"].isNullOrEmpty()) { + if (apiKey["key"] != null) { + if (apiKeyPrefix["key"] != null) { + requestConfig.query["key"] = listOf(apiKeyPrefix["key"]!! + " " + apiKey["key"]!!) + } else { + requestConfig.query["key"] = listOf(apiKey["key"]!!) + } + } + } + } + + protected inline fun request(requestConfig: RequestConfig): ApiResponse { + val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") + + // take authMethod from operation + updateAuthParams(requestConfig) + + val url = httpUrl.newBuilder() + .addEncodedPathSegments(requestConfig.path.trimStart('/')) + .apply { + requestConfig.query.forEach { query -> + query.value.forEach { queryValue -> + addQueryParameter(query.key, queryValue) + } + } + }.build() + + // take content-type/accept from spec or set to default (application/json) if not defined + if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { + requestConfig.headers[ContentType] = JsonMediaType + } + if (requestConfig.headers[Accept].isNullOrEmpty()) { + requestConfig.headers[Accept] = JsonMediaType + } + val headers = requestConfig.headers + + if (headers[Accept].isNullOrEmpty()) { + throw kotlin.IllegalStateException("Missing Accept header. This is required.") + } + + val contentType = if (headers[ContentType] != null) { + // TODO: support multiple contentType options here. + (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) + } else { + null + } + + val request = when (requestConfig.method) { + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) + RequestMethod.GET -> Request.Builder().url(url) + RequestMethod.HEAD -> Request.Builder().url(url).head() + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) + RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) + }.apply { + headers.forEach { header -> addHeader(header.key, header.value) } + }.build() + + val response = client.newCall(request).execute() + + val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) + + // TODO: handle specific mapping types. e.g. Map> + @Suppress("UNNECESSARY_SAFE_CALL") + return when { + response.isRedirect -> Redirection( + response.code, + response.headers.toMultimap() + ) + response.isInformational -> Informational( + response.message, + response.code, + response.headers.toMultimap() + ) + response.isSuccessful -> Success( + responseBody(response.body, accept), + response.code, + response.headers.toMultimap() + ) + response.isClientError -> ClientError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + else -> ServerError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + } + } + + protected fun parameterToString(value: Any?): String = when (value) { + null -> "" + is Array<*> -> toMultiValue(value, "csv").toString() + is Iterable<*> -> toMultiValue(value, "csv").toString() + is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> + parseDateToQueryString(value) + else -> value.toString() + } + + protected inline fun parseDateToQueryString(value : T): String { + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiResponse.kt new file mode 100644 index 00000000..1ddf7a3e --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ApiResponse.kt @@ -0,0 +1,43 @@ +package enlighten.infrastructure + +enum class ResponseType { + Success, Informational, Redirection, ClientError, ServerError +} + +interface Response + +abstract class ApiResponse(val responseType: ResponseType): Response { + abstract val statusCode: Int + abstract val headers: Map> +} + +class Success( + val data: T, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +): ApiResponse(ResponseType.Success) + +class Informational( + val statusText: String, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Informational) + +class Redirection( + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Redirection) + +class ClientError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.ClientError) + +class ServerError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> +): ApiResponse(ResponseType.ServerError) diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/BigDecimalAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/BigDecimalAdapter.kt new file mode 100644 index 00000000..6d3a8e6d --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/BigDecimalAdapter.kt @@ -0,0 +1,17 @@ +package enlighten.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigDecimal + +class BigDecimalAdapter { + @ToJson + fun toJson(value: BigDecimal): String { + return value.toPlainString() + } + + @FromJson + fun fromJson(value: String): BigDecimal { + return BigDecimal(value) + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/BigIntegerAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/BigIntegerAdapter.kt new file mode 100644 index 00000000..eeef6384 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/BigIntegerAdapter.kt @@ -0,0 +1,17 @@ +package enlighten.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigInteger + +class BigIntegerAdapter { + @ToJson + fun toJson(value: BigInteger): String { + return value.toString() + } + + @FromJson + fun fromJson(value: String): BigInteger { + return BigInteger(value) + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ByteArrayAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ByteArrayAdapter.kt new file mode 100644 index 00000000..29752167 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ByteArrayAdapter.kt @@ -0,0 +1,12 @@ +package enlighten.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson + +class ByteArrayAdapter { + @ToJson + fun toJson(data: ByteArray): String = String(data) + + @FromJson + fun fromJson(data: String): ByteArray = data.toByteArray() +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/Errors.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/Errors.kt new file mode 100644 index 00000000..a82780a6 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/Errors.kt @@ -0,0 +1,18 @@ +@file:Suppress("unused") +package enlighten.infrastructure + +import java.lang.RuntimeException + +open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 123L + } +} + +open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 456L + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/LocalDateAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/LocalDateAdapter.kt new file mode 100644 index 00000000..4d0fba56 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/LocalDateAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class LocalDateAdapter { + @ToJson + fun toJson(value: LocalDate): String { + return DateTimeFormatter.ISO_LOCAL_DATE.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDate { + return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) + } + +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/LocalDateTimeAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/LocalDateTimeAdapter.kt new file mode 100644 index 00000000..5774349b --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/LocalDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +class LocalDateTimeAdapter { + @ToJson + fun toJson(value: LocalDateTime): String { + return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDateTime { + return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } + +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/OffsetDateTimeAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/OffsetDateTimeAdapter.kt new file mode 100644 index 00000000..cf73adae --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/OffsetDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.OffsetDateTime +import java.time.format.DateTimeFormatter + +class OffsetDateTimeAdapter { + @ToJson + fun toJson(value: OffsetDateTime): String { + return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): OffsetDateTime { + return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) + } + +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/PartConfig.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/PartConfig.kt new file mode 100644 index 00000000..bb19ff5d --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package enlighten.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/RequestConfig.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/RequestConfig.kt new file mode 100644 index 00000000..6d5bf5ce --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/RequestConfig.kt @@ -0,0 +1,19 @@ +package enlighten.infrastructure + +/** + * Defines a config object for a given request. + * NOTE: This object doesn't include 'body' because it + * allows for caching of the constructed object + * for many request definitions. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class RequestConfig( + val method: RequestMethod, + val path: String, + val headers: MutableMap = mutableMapOf(), + val params: MutableMap = mutableMapOf(), + val query: MutableMap> = mutableMapOf(), + val requiresAuthentication: Boolean, + val body: T? = null +) diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/RequestMethod.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/RequestMethod.kt new file mode 100644 index 00000000..05df82b7 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/RequestMethod.kt @@ -0,0 +1,8 @@ +package enlighten.infrastructure + +/** + * Provides enumerated HTTP verbs + */ +enum class RequestMethod { + GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ResponseExtensions.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ResponseExtensions.kt new file mode 100644 index 00000000..30a5ccbe --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/ResponseExtensions.kt @@ -0,0 +1,24 @@ +package enlighten.infrastructure + +import okhttp3.Response + +/** + * Provides an extension to evaluation whether the response is a 1xx code + */ +val Response.isInformational : Boolean get() = this.code in 100..199 + +/** + * Provides an extension to evaluation whether the response is a 3xx code + */ +@Suppress("EXTENSION_SHADOWED_BY_MEMBER") +val Response.isRedirect : Boolean get() = this.code in 300..399 + +/** + * Provides an extension to evaluation whether the response is a 4xx code + */ +val Response.isClientError : Boolean get() = this.code in 400..499 + +/** + * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code + */ +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/Serializer.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/Serializer.kt new file mode 100644 index 00000000..a8ac0436 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/Serializer.kt @@ -0,0 +1,23 @@ +package enlighten.infrastructure + +import com.squareup.moshi.Moshi +import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory + +object Serializer { + @JvmStatic + val moshiBuilder: Moshi.Builder = Moshi.Builder() + .add(OffsetDateTimeAdapter()) + .add(LocalDateTimeAdapter()) + .add(LocalDateAdapter()) + .add(UUIDAdapter()) + .add(ByteArrayAdapter()) + .add(URIAdapter()) + .add(KotlinJsonAdapterFactory()) + .add(BigDecimalAdapter()) + .add(BigIntegerAdapter()) + + @JvmStatic + val moshi: Moshi by lazy { + moshiBuilder.build() + } +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/URIAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/URIAdapter.kt new file mode 100644 index 00000000..db83fce9 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/URIAdapter.kt @@ -0,0 +1,13 @@ +package enlighten.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.net.URI + +class URIAdapter { + @ToJson + fun toJson(uri: URI) = uri.toString() + + @FromJson + fun fromJson(s: String): URI = URI.create(s) +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/UUIDAdapter.kt b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/UUIDAdapter.kt new file mode 100644 index 00000000..9c897e7a --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/infrastructure/UUIDAdapter.kt @@ -0,0 +1,13 @@ +package enlighten.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.util.UUID + +class UUIDAdapter { + @ToJson + fun toJson(uuid: UUID) = uuid.toString() + + @FromJson + fun fromJson(s: String): UUID = UUID.fromString(s) +} diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ClientError.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ClientError.kt new file mode 100644 index 00000000..50a47b3c --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ClientError.kt @@ -0,0 +1,39 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + */ + + +data class ClientError ( + + @Json(name = "reason") + val reason: kotlin.String, + + @Json(name = "message") + val message: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ConflictError.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConflictError.kt new file mode 100644 index 00000000..9223495b --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConflictError.kt @@ -0,0 +1,68 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + * @param period + * @param periodStart + * @param periodEnd + * @param limit + */ + + +data class ConflictError ( + + @Json(name = "reason") + val reason: kotlin.String, + + @Json(name = "message") + val message: kotlin.collections.List, + + @Json(name = "period") + val period: ConflictError.Period, + + @Json(name = "period_start") + val periodStart: kotlin.Int, + + @Json(name = "period_end") + val periodEnd: kotlin.Int, + + @Json(name = "limit") + val limit: kotlin.Int + +) { + + /** + * + * + * Values: hour,minute,second + */ + @JsonClass(generateAdapter = false) + enum class Period(val value: kotlin.String) { + @Json(name = "hour") hour("hour"), + @Json(name = "minute") minute("minute"), + @Json(name = "second") second("second"); + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ConnectionType.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConnectionType.kt new file mode 100644 index 00000000..e05cbdaa --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConnectionType.kt @@ -0,0 +1,66 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * How the system is connected to the Internet. + * + * Values: ethernet,cellular,wifi + */ + +@JsonClass(generateAdapter = false) +enum class ConnectionType(val value: kotlin.String) { + + @Json(name = "ethernet") + ethernet("ethernet"), + + @Json(name = "cellular") + cellular("cellular"), + + @Json(name = "wifi") + wifi("wifi"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is ConnectionType) "$data" else null + + /** + * Returns a valid [ConnectionType] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): ConnectionType? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionLifetimeResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionLifetimeResponse.kt new file mode 100644 index 00000000..5b8a0e2d --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionLifetimeResponse.kt @@ -0,0 +1,51 @@ +/** + * + * 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.models + +import enlighten.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param startDate 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. + * @param consumption An array of consumption measurements, one for each day since consumption metering began, or one for each day of the requested period. + * @param meta + * @param systemId The identifier of the system. + */ + + +data class ConsumptionLifetimeResponse ( + + /* 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. */ + @Json(name = "start_date") + val startDate: java.time.LocalDate, + + /* An array of consumption measurements, one for each day since consumption metering began, or one for each day of the requested period. */ + @Json(name = "consumption") + val consumption: kotlin.collections.List, + + @Json(name = "meta") + val meta: Meta, + + /* The identifier of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionStatsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionStatsResponse.kt new file mode 100644 index 00000000..d80b360d --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionStatsResponse.kt @@ -0,0 +1,52 @@ +/** + * + * 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.models + +import enlighten.models.ConsumptionStatsResponseIntervalsInner +import enlighten.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Enlighten ID for this system. + * @param totalDevices Number of active consumption meters for this system. + * @param meta + * @param intervals A list of intervals between the requested start and end times. + */ + + +data class ConsumptionStatsResponse ( + + /* Enlighten ID for this system. */ + @Json(name = "system_id") + val systemId: kotlin.Int, + + /* Number of active consumption meters for this system. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int, + + @Json(name = "meta") + val meta: Meta, + + /* A list of intervals between the requested start and end times. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInner.kt new file mode 100644 index 00000000..ed775d31 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt 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). + * @param enwh Energy consumed during this interval, in Watt-hours. + * @param devicesReporting Number of consumption meters that reported data for this interval at the time of the request. + */ + + +data class ConsumptionStatsResponseIntervalsInner ( + + /* 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). */ + @Json(name = "end_at") + val endAt: kotlin.Long, + + /* Energy consumed during this interval, in Watt-hours. */ + @Json(name = "enwh") + val enwh: kotlin.Int, + + /* Number of consumption meters that reported data for this interval at the time of the request. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/EnergyLifetimeResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/EnergyLifetimeResponse.kt new file mode 100644 index 00000000..a8363c24 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/EnergyLifetimeResponse.kt @@ -0,0 +1,64 @@ +/** + * + * 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.models + +import enlighten.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param startDate 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. + * @param systemId The identifier of the system. + * @param production 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. + * @param meta + * @param microProduction + * @param meterProduction + * @param meterStartDate 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. + */ + + +data class EnergyLifetimeResponse ( + + /* 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. */ + @Json(name = "start_date") + val startDate: java.time.LocalDate, + + /* The identifier of the system. */ + @Json(name = "system_id") + val systemId: 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. */ + @Json(name = "production") + val production: kotlin.collections.List, + + @Json(name = "meta") + val meta: Meta, + + @Json(name = "micro_production") + val microProduction: kotlin.collections.List? = null, + + @Json(name = "meter_production") + val meterProduction: kotlin.collections.List? = null, + + /* 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. */ + @Json(name = "meter_start_date") + val meterStartDate: java.time.LocalDate? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/EnvoysResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/EnvoysResponse.kt new file mode 100644 index 00000000..6620fa23 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/EnvoysResponse.kt @@ -0,0 +1,42 @@ +/** + * + * 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.models + +import enlighten.models.EnvoysResponseEnvoysInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId The identifier of the system. + * @param envoys A list of active Envoys on this system. + */ + + +data class EnvoysResponse ( + + /* The identifier of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int, + + /* A list of active Envoys on this system. */ + @Json(name = "envoys") + val envoys: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/EnvoysResponseEnvoysInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/EnvoysResponseEnvoysInner.kt new file mode 100644 index 00000000..2b3bca33 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/EnvoysResponseEnvoysInner.kt @@ -0,0 +1,73 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param envoyId The Enlighten ID of the Envoy. + * @param lastReportAt 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. + * @param name The human-friendly name of this Envoy. + * @param partNumber The Enphase part number of this Envoy. + * @param serialNumber The serial number of this Envoy. + * @param status The current status of this Envoy. * `normal` - The Envoy is operating normally. * `comm` - The Envoy is not communicating to Enlighten. + */ + + +data class EnvoysResponseEnvoysInner ( + + /* The Enlighten ID of the Envoy. */ + @Json(name = "envoy_id") + val envoyId: kotlin.Int, + + /* 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. */ + @Json(name = "last_report_at") + val lastReportAt: kotlin.Long, + + /* The human-friendly name of this Envoy. */ + @Json(name = "name") + val name: kotlin.String, + + /* The Enphase part number of this Envoy. */ + @Json(name = "part_number") + val partNumber: kotlin.String, + + /* The serial number of this Envoy. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String, + + /* The current status of this Envoy. * `normal` - The Envoy is operating normally. * `comm` - The Envoy is not communicating to Enlighten. */ + @Json(name = "status") + val status: EnvoysResponseEnvoysInner.Status + +) { + + /** + * The current status of this Envoy. * `normal` - The Envoy is operating normally. * `comm` - The Envoy is not communicating to Enlighten. + * + * Values: normal,comm + */ + @JsonClass(generateAdapter = false) + enum class Status(val value: kotlin.String) { + @Json(name = "normal") normal("normal"), + @Json(name = "comm") comm("comm"); + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponse.kt new file mode 100644 index 00000000..213f2a80 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponse.kt @@ -0,0 +1,58 @@ +/** + * + * 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.models + +import enlighten.models.InventoryResponseEnvoysInner +import enlighten.models.InventoryResponseMetersInner +import enlighten.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Enlighten ID for this system. + * @param inverters A list of inverters on this system, including serial and model numbers. + * @param meters A list of meters on this system, including serial number, manufacturer, and model number. + * @param meta + * @param envoys A list of Envoys on this system, including serial number. + */ + + +data class InventoryResponse ( + + /* Enlighten ID for this system. */ + @Json(name = "system_id") + val systemId: kotlin.Int, + + /* A list of inverters on this system, including serial and model numbers. */ + @Json(name = "inverters") + val inverters: kotlin.collections.List, + + /* A list of meters on this system, including serial number, manufacturer, and model number. */ + @Json(name = "meters") + val meters: kotlin.collections.List, + + @Json(name = "meta") + val meta: Meta, + + /* A list of Envoys on this system, including serial number. */ + @Json(name = "envoys") + val envoys: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponseEnvoysInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponseEnvoysInner.kt new file mode 100644 index 00000000..03e6faa7 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponseEnvoysInner.kt @@ -0,0 +1,43 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param sn + * @param model + * @param sku + */ + + +data class InventoryResponseEnvoysInner ( + + @Json(name = "sn") + val sn: kotlin.String, + + @Json(name = "model") + val model: kotlin.String, + + @Json(name = "sku") + val sku: kotlin.String + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponseMetersInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponseMetersInner.kt new file mode 100644 index 00000000..be9ec8b9 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/InventoryResponseMetersInner.kt @@ -0,0 +1,51 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param sn + * @param manufacturer + * @param model + * @param status + * @param state + */ + + +data class InventoryResponseMetersInner ( + + @Json(name = "sn") + val sn: kotlin.String, + + @Json(name = "manufacturer") + val manufacturer: kotlin.String, + + @Json(name = "model") + val model: kotlin.String, + + @Json(name = "status") + val status: kotlin.String? = null, + + @Json(name = "state") + val state: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponse.kt new file mode 100644 index 00000000..2ffb8541 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponse.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param signalStrength + * @param microInverters A list of active inverters on this system, including serial and model numbers. + */ + + +data class InvertersSummaryByEnvoyOrSiteResponse ( + + @Json(name = "signal_strength") + val signalStrength: kotlin.Int, + + /* A list of active inverters on this system, including serial and model numbers. */ + @Json(name = "micro_inverters") + val microInverters: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.kt new file mode 100644 index 00000000..3f2e56cc --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.kt @@ -0,0 +1,104 @@ +/** + * + * 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.models + +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id + * @param model Model number of this Microinverter. + * @param partNumber The Enphase part number of this Microinverter. + * @param serialNumber The serial number of this Microinverter. + * @param sku + * @param 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. + * @param powerProduced + * @param procLoad + * @param paramTable + * @param envoySerialNumber + * @param energy + * @param gridProfile + * @param lastReportDate 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. + */ + + +data class InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner ( + + @Json(name = "id") + val id: kotlin.Int, + + /* Model number of this Microinverter. */ + @Json(name = "model") + val model: kotlin.String, + + /* The Enphase part number of this Microinverter. */ + @Json(name = "part_number") + val partNumber: kotlin.String, + + /* The serial number of this Microinverter. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String, + + @Json(name = "sku") + val sku: kotlin.String, + + /* 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. */ + @Json(name = "status") + val status: InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner.Status, + + @Json(name = "power_produced") + val powerProduced: InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced, + + @Json(name = "proc_load") + val procLoad: kotlin.String, + + @Json(name = "param_table") + val paramTable: kotlin.String, + + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String, + + @Json(name = "energy") + val energy: InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy, + + @Json(name = "grid_profile") + val gridProfile: kotlin.String, + + /* 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. */ + @Json(name = "last_report_date") + val lastReportDate: java.time.LocalDate + +) { + + /** + * 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. + * + * Values: normal,power,micro,retired + */ + @JsonClass(generateAdapter = false) + enum class Status(val value: kotlin.String) { + @Json(name = "normal") normal("normal"), + @Json(name = "power") power("power"), + @Json(name = "micro") micro("micro"), + @Json(name = "retired") retired("retired"); + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.kt new file mode 100644 index 00000000..89e59f60 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.kt @@ -0,0 +1,55 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Returns the lifetime energy of the Microinverter. If the system has never produced energy, the energy value would be 0. + * + * @param `value` + * @param units + * @param precision + */ + + +data class InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy ( + + @Json(name = "value") + val `value`: kotlin.Int, + + @Json(name = "units") + val units: InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy.Units, + + @Json(name = "precision") + val precision: kotlin.Int + +) { + + /** + * + * + * Values: Wh,kJ + */ + @JsonClass(generateAdapter = false) + enum class Units(val value: kotlin.String) { + @Json(name = "Wh") Wh("Wh"), + @Json(name = "kJ") kJ("kJ"); + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.kt new file mode 100644 index 00000000..0390423b --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.kt @@ -0,0 +1,54 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param `value` + * @param units + * @param precision + */ + + +data class InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced ( + + @Json(name = "value") + val `value`: kotlin.Int, + + @Json(name = "units") + val units: InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced.Units, + + @Json(name = "precision") + val precision: kotlin.Int + +) { + + /** + * + * + * Values: W + */ + @JsonClass(generateAdapter = false) + enum class Units(val value: kotlin.String) { + @Json(name = "W") W("W"); + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/Meta.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/Meta.kt new file mode 100644 index 00000000..252c22ea --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/Meta.kt @@ -0,0 +1,48 @@ +/** + * + * 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.models + +import enlighten.models.Status + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Information about the system that you can use to ascertain the timeliness of the production data included in the response. + * + * @param status + * @param lastReportAt + * @param lastEnergyAt + * @param operationalAt + */ + + +data class Meta ( + + @Json(name = "status") + val status: Status, + + @Json(name = "last_report_at") + val lastReportAt: kotlin.Long, + + @Json(name = "last_energy_at") + val lastEnergyAt: kotlin.Long, + + @Json(name = "operational_at") + val operationalAt: kotlin.Long + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/MonthlyProductionResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/MonthlyProductionResponse.kt new file mode 100644 index 00000000..e730758e --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/MonthlyProductionResponse.kt @@ -0,0 +1,62 @@ +/** + * + * 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.models + +import enlighten.models.Meta +import enlighten.models.MonthlyProductionResponseMeterReadingsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Enlighten ID for this system. + * @param startDate 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). + * @param endDate Last day included in the reporting period. + * @param productionWh Total production for the requested period in Watt-hours. + * @param meterReadings 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. + * @param meta + */ + + +data class MonthlyProductionResponse ( + + /* Enlighten ID for this system. */ + @Json(name = "system_id") + val systemId: kotlin.Int, + + /* 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). */ + @Json(name = "start_date") + val startDate: java.time.LocalDate, + + /* Last day included in the reporting period. */ + @Json(name = "end_date") + val endDate: java.time.LocalDate, + + /* Total production for the requested period in Watt-hours. */ + @Json(name = "production_wh") + val productionWh: kotlin.Int, + + /* 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. */ + @Json(name = "meter_readings") + val meterReadings: kotlin.collections.List, + + @Json(name = "meta") + val meta: Meta + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInner.kt new file mode 100644 index 00000000..224523ea --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInner.kt @@ -0,0 +1,43 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param serialNumber + * @param start + * @param end + */ + + +data class MonthlyProductionResponseMeterReadingsInner ( + + @Json(name = "serial_number") + val serialNumber: kotlin.String, + + @Json(name = "start") + val start: kotlin.Int, + + @Json(name = "end") + val end: kotlin.Int + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/NotFoundError.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/NotFoundError.kt new file mode 100644 index 00000000..5f640202 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/NotFoundError.kt @@ -0,0 +1,43 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + * @param errorMessages + */ + + +data class NotFoundError ( + + @Json(name = "reason") + val reason: kotlin.String, + + @Json(name = "message") + val message: kotlin.collections.List? = null, + + @Json(name = "errorMessages") + val errorMessages: kotlin.collections.List? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ProductionMeterReadingsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ProductionMeterReadingsResponse.kt new file mode 100644 index 00000000..d352dcb8 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ProductionMeterReadingsResponse.kt @@ -0,0 +1,45 @@ +/** + * + * 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.models + +import enlighten.models.Meta +import enlighten.models.ProductionMeterReadingsResponseMeterReadingsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId + * @param meterReadings + * @param meta + */ + + +data class ProductionMeterReadingsResponse ( + + @Json(name = "system_id") + val systemId: kotlin.Int, + + @Json(name = "meter_readings") + val meterReadings: kotlin.collections.List, + + @Json(name = "meta") + val meta: Meta + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInner.kt new file mode 100644 index 00000000..c4475c14 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param serialNumber The serial number of the meter. + * @param `value` The odometer reading, in Watt-hours. + * @param readAt The time when the reading was taken, always prior or equal to the requested `end_at`. + */ + + +data class ProductionMeterReadingsResponseMeterReadingsInner ( + + /* The serial number of the meter. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String, + + /* The odometer reading, in Watt-hours. */ + @Json(name = "value") + val `value`: kotlin.Int, + + /* The time when the reading was taken, always prior or equal to the requested `end_at`. */ + @Json(name = "read_at") + val readAt: kotlin.Long + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponse.kt new file mode 100644 index 00000000..19db6882 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponse.kt @@ -0,0 +1,58 @@ +/** + * + * 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.models + +import enlighten.models.Meta +import enlighten.models.RgmStatsResponseIntervalsInner +import enlighten.models.RgmStatsResponseMeterIntervalsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Enlighten ID for this system. + * @param totalDevices Number of active revenue-grade meters for this system. + * @param meta + * @param intervals A list of intervals between the requested start and end times. + * @param meterIntervals A list of intervals of a meter between the requested start and end times. + */ + + +data class RgmStatsResponse ( + + /* Enlighten ID for this system. */ + @Json(name = "system_id") + val systemId: kotlin.Int, + + /* Number of active revenue-grade meters for this system. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int, + + @Json(name = "meta") + val meta: Meta, + + /* A list of intervals between the requested start and end times. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List, + + /* A list of intervals of a meter between the requested start and end times. */ + @Json(name = "meter_intervals") + val meterIntervals: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseIntervalsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseIntervalsInner.kt new file mode 100644 index 00000000..2dbca3f4 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseIntervalsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt 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). + * @param whDel Energy delivered during this interval, in Watt-hours. + * @param devicesReporting Number of revenue-grade meters that reported data for this interval at the time of the request. + */ + + +data class RgmStatsResponseIntervalsInner ( + + /* 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). */ + @Json(name = "end_at") + val endAt: kotlin.Long, + + /* Energy delivered during this interval, in Watt-hours. */ + @Json(name = "wh_del") + val whDel: kotlin.Int, + + /* Number of revenue-grade meters that reported data for this interval at the time of the request. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInner.kt new file mode 100644 index 00000000..759dcf11 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInner.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import enlighten.models.RgmStatsResponseMeterIntervalsInnerIntervalsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param meterSerialNumber Serial number of the revenue grade meter. + * @param envoySerialNumber Serial number of the reporting envoy. + * @param intervals Individual meter level interval. + */ + + +data class RgmStatsResponseMeterIntervalsInner ( + + /* Serial number of the revenue grade meter. */ + @Json(name = "meter_serial_number") + val meterSerialNumber: kotlin.String, + + /* Serial number of the reporting envoy. */ + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String, + + /* Individual meter level interval. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInner.kt new file mode 100644 index 00000000..177691f0 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInner.kt @@ -0,0 +1,51 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param channel The reporting channel identifier. + * @param endAt 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). + * @param whDel Energy delivered during this interval, in Watt-hours. + * @param currW Energy delivered during this interval, in Watts. + */ + + +data class RgmStatsResponseMeterIntervalsInnerIntervalsInner ( + + /* The reporting channel identifier. */ + @Json(name = "channel") + val channel: kotlin.Int, + + /* 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). */ + @Json(name = "end_at") + val endAt: kotlin.Long, + + /* Energy delivered during this interval, in Watt-hours. */ + @Json(name = "wh_del") + val whDel: kotlin.Float?, + + /* Energy delivered during this interval, in Watts. */ + @Json(name = "curr_w") + val currW: kotlin.Int? + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/SearchSystemIdResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/SearchSystemIdResponse.kt new file mode 100644 index 00000000..90c662b1 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/SearchSystemIdResponse.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId The Enlighten ID of the system. + */ + + +data class SearchSystemIdResponse ( + + /* The Enlighten ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/ServerError.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/ServerError.kt new file mode 100644 index 00000000..dc7fae17 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/ServerError.kt @@ -0,0 +1,39 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param errorCode + * @param errorMessages + */ + + +data class ServerError ( + + @Json(name = "errorCode") + val errorCode: kotlin.Int, + + @Json(name = "errorMessages") + val errorMessages: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/StatsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/StatsResponse.kt new file mode 100644 index 00000000..9618495a --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/StatsResponse.kt @@ -0,0 +1,52 @@ +/** + * + * 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.models + +import enlighten.models.Meta +import enlighten.models.StatsResponseIntervalsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Enlighten ID for this system. + * @param totalDevices Number of active microinverters for this system. + * @param meta + * @param intervals A list of intervals between the requested start and end times. + */ + + +data class StatsResponse ( + + /* Enlighten ID for this system. */ + @Json(name = "system_id") + val systemId: kotlin.Int, + + /* Number of active microinverters for this system. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int, + + @Json(name = "meta") + val meta: Meta, + + /* A list of intervals between the requested start and end times. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/StatsResponseIntervalsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/StatsResponseIntervalsInner.kt new file mode 100644 index 00000000..1212de8a --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/StatsResponseIntervalsInner.kt @@ -0,0 +1,51 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt 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). + * @param powr Average power produced by microinverters during this interval, in Watts. + * @param enwh Energy produced by microinverters during this interval, in Watt-hours. + * @param devicesReporting Number of microinverters that reported data for this interval at the time of the request. + */ + + +data class StatsResponseIntervalsInner ( + + /* 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). */ + @Json(name = "end_at") + val endAt: kotlin.Long, + + /* Average power produced by microinverters during this interval, in Watts. */ + @Json(name = "powr") + val powr: kotlin.Int, + + /* Energy produced by microinverters during this interval, in Watt-hours. */ + @Json(name = "enwh") + val enwh: kotlin.Int, + + /* Number of microinverters that reported data for this interval at the time of the request. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/Status.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/Status.kt new file mode 100644 index 00000000..7578edf3 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/Status.kt @@ -0,0 +1,81 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * The current status of the system. * `comm` - One or more Envoys on the system are not communicating to Enlighten. * `power` - There is a production issue on the system. * `meter` - There is a communication problem between an Envoy and a revenue-grade meter on the system. * `meter_issue` - One or more meters on the system are reporting unusual measurements. * `micro` - There is a communication problem between an Envoy and microinverters that it monitors. * `battery` - There is a communication problem between an Envoy and an AC battery on the system. * `storage_idle` - An AC battery on the system has not changed its state of charge for more than 72 hours. * `normal` - The system is operating normally. + * + * Values: comm,power,meter,meter_issue,micro,battery,storage_idle,normal + */ + +@JsonClass(generateAdapter = false) +enum class Status(val value: kotlin.String) { + + @Json(name = "comm") + comm("comm"), + + @Json(name = "power") + power("power"), + + @Json(name = "meter") + meter("meter"), + + @Json(name = "meter_issue") + meter_issue("meter_issue"), + + @Json(name = "micro") + micro("micro"), + + @Json(name = "battery") + battery("battery"), + + @Json(name = "storage_idle") + storage_idle("storage_idle"), + + @Json(name = "normal") + normal("normal"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is Status) "$data" else null + + /** + * Returns a valid [Status] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): Status? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/SummaryResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/SummaryResponse.kt new file mode 100644 index 00000000..e472e236 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/SummaryResponse.kt @@ -0,0 +1,103 @@ +/** + * + * 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.models + +import enlighten.models.Status + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param currentPower Current power production, in Watts. For historical requests, returns 0. + * @param energyLifetime Energy produced in the lifetime of the system, excluding the requested day, in Watt-hours. + * @param energyToday Energy produced on the requested day, in Watt-hours. + * @param lastIntervalEndAt 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. + * @param lastReportAt 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). + * @param modules Number of active (not retired) modules. For historical requests, returns 0. + * @param operationalAt 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). + * @param sizeW The size of the system, in Watts. For historical requests, returns 0. + * @param source Indicates whether the production of this system is measured by its microinverters (`microinverters`) or by revenue-grade meters (`meter`) installed on the system. + * @param status + * @param summaryDate 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). + * @param systemId The Enlighten ID of the system. + */ + + +data class SummaryResponse ( + + /* Current power production, in Watts. For historical requests, returns 0. */ + @Json(name = "current_power") + val currentPower: kotlin.Int, + + /* Energy produced in the lifetime of the system, excluding the requested day, in Watt-hours. */ + @Json(name = "energy_lifetime") + val energyLifetime: kotlin.Int, + + /* Energy produced on the requested day, in Watt-hours. */ + @Json(name = "energy_today") + val energyToday: kotlin.Int, + + /* 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. */ + @Json(name = "last_interval_end_at") + val lastIntervalEndAt: 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). */ + @Json(name = "last_report_at") + val lastReportAt: kotlin.Long, + + /* Number of active (not retired) modules. For historical requests, returns 0. */ + @Json(name = "modules") + val modules: kotlin.Int, + + /* 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). */ + @Json(name = "operational_at") + val operationalAt: kotlin.Long, + + /* The size of the system, in Watts. For historical requests, returns 0. */ + @Json(name = "size_w") + val sizeW: kotlin.Int, + + /* Indicates whether the production of this system is measured by its microinverters (`microinverters`) or by revenue-grade meters (`meter`) installed on the system. */ + @Json(name = "source") + val source: SummaryResponse.Source, + + @Json(name = "status") + val status: Status, + + /* 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). */ + @Json(name = "summary_date") + val summaryDate: java.time.LocalDate, + + /* The Enlighten ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int + +) { + + /** + * Indicates whether the production of this system is measured by its microinverters (`microinverters`) or by revenue-grade meters (`meter`) installed on the system. + * + * Values: microinverters,meter + */ + @JsonClass(generateAdapter = false) + enum class Source(val value: kotlin.String) { + @Json(name = "microinverters") microinverters("microinverters"), + @Json(name = "meter") meter("meter"); + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/SystemsResponse.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/SystemsResponse.kt new file mode 100644 index 00000000..6c01f912 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/SystemsResponse.kt @@ -0,0 +1,40 @@ +/** + * + * 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.models + +import enlighten.models.SystemsResponseSystemsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systems + * @param next + */ + + +data class SystemsResponse ( + + @Json(name = "systems") + val systems: kotlin.collections.List, + + @Json(name = "next") + val next: kotlin.String? = null + +) + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/SystemsResponseSystemsInner.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/SystemsResponseSystemsInner.kt new file mode 100644 index 00000000..80db8a6b --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/SystemsResponseSystemsInner.kt @@ -0,0 +1,115 @@ +/** + * + * 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.models + +import enlighten.models.ConnectionType +import enlighten.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId The Enlighten ID of the system. + * @param systemName 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. + * @param systemPublicName The display name of the system. Use this when displaying the system name on a public list or view. + * @param country 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. + * @param state 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. + * @param city The name of the city where the system is located. + * @param postalCode The postal code where the system is located. + * @param timezone The timezone of the system. + * @param connectionType + * @param status The current status of the system. You can find this and more in the `meta` property. + * @param meta + * @param reference 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. + * @param otherReferences If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned. + */ + + +data class SystemsResponseSystemsInner ( + + /* The Enlighten ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int, + + /* 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. */ + @Json(name = "system_name") + val systemName: kotlin.String, + + /* The display name of the system. Use this when displaying the system name on a public list or view. */ + @Json(name = "system_public_name") + val systemPublicName: 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. */ + @Json(name = "country") + val country: 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. */ + @Json(name = "state") + val state: kotlin.String, + + /* The name of the city where the system is located. */ + @Json(name = "city") + val city: kotlin.String, + + /* The postal code where the system is located. */ + @Json(name = "postal_code") + val postalCode: kotlin.String, + + /* The timezone of the system. */ + @Json(name = "timezone") + val timezone: kotlin.String, + + @Json(name = "connection_type") + val connectionType: ConnectionType, + + /* The current status of the system. You can find this and more in the `meta` property. */ + @Json(name = "status") + @Deprecated(message = "This property is deprecated.") + val status: SystemsResponseSystemsInner.Status, + + @Json(name = "meta") + val meta: Meta, + + /* 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. */ + @Json(name = "reference") + val reference: kotlin.String? = null, + + /* If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned. */ + @Json(name = "other_references") + val otherReferences: kotlin.collections.List? = null + +) { + + /** + * The current status of the system. You can find this and more in the `meta` property. + * + * Values: comm,power,meter,meter_issue,micro,battery,storage_idle,normal + */ + @JsonClass(generateAdapter = false) + enum class Status(val value: kotlin.String) { + @Json(name = "comm") comm("comm"), + @Json(name = "power") power("power"), + @Json(name = "meter") meter("meter"), + @Json(name = "meter_issue") meter_issue("meter_issue"), + @Json(name = "micro") micro("micro"), + @Json(name = "battery") battery("battery"), + @Json(name = "storage_idle") storage_idle("storage_idle"), + @Json(name = "normal") normal("normal"); + } +} + diff --git a/kotlin/commissioning/src/main/kotlin/enlighten/models/UnprocessableEntityError.kt b/kotlin/commissioning/src/main/kotlin/enlighten/models/UnprocessableEntityError.kt new file mode 100644 index 00000000..f37ca135 --- /dev/null +++ b/kotlin/commissioning/src/main/kotlin/enlighten/models/UnprocessableEntityError.kt @@ -0,0 +1,67 @@ +/** + * + * 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.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + * @param errorMessages + * @param start + * @param end + * @param startAt + * @param endAt + * @param firstInterval + * @param lastInterval + */ + + +data class UnprocessableEntityError ( + + @Json(name = "reason") + val reason: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null, + + @Json(name = "errorMessages") + val errorMessages: kotlin.collections.List? = null, + + @Json(name = "start") + val start: java.time.LocalDate? = null, + + @Json(name = "end") + val end: java.time.LocalDate? = null, + + @Json(name = "start_at") + val startAt: kotlin.Int? = null, + + @Json(name = "end_at") + val endAt: kotlin.Int? = null, + + @Json(name = "first_interval") + val firstInterval: kotlin.Int? = null, + + @Json(name = "last_interval") + val lastInterval: kotlin.Int? = null + +) + diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/apis/DefaultApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/apis/DefaultApiTest.kt new file mode 100644 index 00000000..9cc1c33c --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/apis/DefaultApiTest.kt @@ -0,0 +1,193 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.apis.DefaultApi +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 + +class DefaultApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of DefaultApi + //val apiInstance = DefaultApi() + + // to test consumptionLifetime + should("test consumptionLifetime") { + // uncomment below to test consumptionLifetime + //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. + //val result : ConsumptionLifetimeResponse = apiInstance.consumptionLifetime(systemId, userId, startDate, endDate) + //result shouldBe ("TODO") + } + + // to test consumptionStats + should("test consumptionStats") { + // uncomment below to test consumptionStats + //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. + //val result : ConsumptionStatsResponse = apiInstance.consumptionStats(systemId, userId, startAt, endAt) + //result shouldBe ("TODO") + } + + // to test energyLifetime + should("test energyLifetime") { + // uncomment below to test energyLifetime + //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. + //val result : EnergyLifetimeResponse = apiInstance.energyLifetime(systemId, userId, startDate, endDate, production) + //result shouldBe ("TODO") + } + + // to test envoys + should("test envoys") { + // uncomment below to test envoys + //val systemId : kotlin.Int = 66 // kotlin.Int | + //val userId : kotlin.String = 4d6a51330a // kotlin.String | + //val result : EnvoysResponse = apiInstance.envoys(systemId, userId) + //result shouldBe ("TODO") + } + + // to test inventory + should("test inventory") { + // uncomment below to test inventory + //val systemId : kotlin.Int = 66 // kotlin.Int | + //val userId : kotlin.String = 4d6a51330a // kotlin.String | + //val result : InventoryResponse = apiInstance.inventory(systemId, userId) + //result shouldBe ("TODO") + } + + // to test invertersSummaryByEnvoyOrSite + should("test invertersSummaryByEnvoyOrSite") { + // uncomment below to test invertersSummaryByEnvoyOrSite + //val userId : kotlin.String = 4d6a51330a // kotlin.String | + //val siteId : kotlin.Int = 66 // kotlin.Int | The identifier of the system. + //val result : kotlin.collections.List = apiInstance.invertersSummaryByEnvoyOrSite(userId, siteId) + //result shouldBe ("TODO") + } + + // to test monthlyProduction + should("test monthlyProduction") { + // uncomment below to test monthlyProduction + //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. + //val result : MonthlyProductionResponse = apiInstance.monthlyProduction(systemId, userId, startDate) + //result shouldBe ("TODO") + } + + // to test productionMeterReadings + should("test productionMeterReadings") { + // uncomment below to test productionMeterReadings + //val systemId : kotlin.Int = 66 // kotlin.Int | + //val userId : kotlin.String = 4d6a51330a // kotlin.String | + //val endAt : kotlin.Long = 1473901755 // kotlin.Long | + //val result : ProductionMeterReadingsResponse = apiInstance.productionMeterReadings(systemId, userId, endAt) + //result shouldBe ("TODO") + } + + // to test rgmStats + should("test rgmStats") { + // uncomment below to test rgmStats + //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. + //val result : RgmStatsResponse = apiInstance.rgmStats(systemId, userId, startAt, endAt) + //result shouldBe ("TODO") + } + + // to test searchSystemId + should("test searchSystemId") { + // uncomment below to test searchSystemId + //val userId : kotlin.String = 4d6a51330a // kotlin.String | + //val serialNum : kotlin.String = 23435345345 // kotlin.String | Serial number of the envoy. + //val result : SearchSystemIdResponse = apiInstance.searchSystemId(userId, serialNum) + //result shouldBe ("TODO") + } + + // to test stats + should("test stats") { + // uncomment below to test stats + //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. + //val result : StatsResponse = apiInstance.stats(systemId, userId, startAt, endAt) + //result shouldBe ("TODO") + } + + // to test summary + should("test summary") { + // uncomment below to test summary + //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. + //val result : SummaryResponse = apiInstance.summary(systemId, userId, summaryDate) + //result shouldBe ("TODO") + } + + // to test systems + should("test systems") { + // uncomment below to test systems + //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 | + //val result : SystemsResponse = apiInstance.systems(userId, next, limit, systemId, systemId2, systemName, systemName2, status, status2, reference, reference2, installer, installer2, connectionType, connectionType2) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/ActivationsApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/ActivationsApiTest.kt new file mode 100644 index 00000000..b9de627b --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/ActivationsApiTest.kt @@ -0,0 +1,128 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.ActivationsApi +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 + +class ActivationsApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of ActivationsApi + //val apiInstance = ActivationsApi() + + // to test createPartnerActivation + should("test createPartnerActivation") { + // uncomment below to test createPartnerActivation + //val params : SystemParams = // SystemParams | + //val result : Activation = apiInstance.createPartnerActivation(params) + //result shouldBe ("TODO") + } + + // to test deleteActivation + should("test deleteActivation") { + // uncomment below to test deleteActivation + //val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). + //val result : DeleteActivationResponse = apiInstance.deleteActivation(activationId) + //result shouldBe ("TODO") + } + + // to test getActivationOpsProductionMode + should("test getActivationOpsProductionMode") { + // uncomment below to test getActivationOpsProductionMode + //val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated. + //val result : GetActivationOpsProductionModeResponse = apiInstance.getActivationOpsProductionMode(activationId) + //result shouldBe ("TODO") + } + + // to test getPartnerActivation + should("test getPartnerActivation") { + // uncomment below to test getPartnerActivation + //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. + //val result : Activation = apiInstance.getPartnerActivation(activationId, expand) + //result shouldBe ("TODO") + } + + // to test getPartnerActivations + should("test getPartnerActivations") { + // uncomment below to test getPartnerActivations + //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. + //val result : GetPartnerActivationsResponse = apiInstance.getPartnerActivations(next, limit, stage, reference, installerId, systemName, address, region, search) + //result shouldBe ("TODO") + } + + // to test grantActivationUserAccess + should("test grantActivationUserAccess") { + // uncomment below to test grantActivationUserAccess + //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. + //val result : GrantActivationUserAccessResponse = apiInstance.grantActivationUserAccess(activationId, userId) + //result shouldBe ("TODO") + } + + // to test revokeActivationUserAccess + should("test revokeActivationUserAccess") { + // uncomment below to test revokeActivationUserAccess + //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. + //val result : RevokeActivationUserAccessResponse = apiInstance.revokeActivationUserAccess(activationId, userId) + //result shouldBe ("TODO") + } + + // to test setActivationOpsProductionMode + should("test setActivationOpsProductionMode") { + // uncomment below to test setActivationOpsProductionMode + //val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated. + //val params : SetActivationOpsProductionModeRequest = // SetActivationOpsProductionModeRequest | + //val result : SetActivationOpsProductionModeResponse = apiInstance.setActivationOpsProductionMode(activationId, params) + //result shouldBe ("TODO") + } + + // to test updatePartnerActivation + should("test updatePartnerActivation") { + // uncomment below to test updatePartnerActivation + //val activationId : kotlin.Int = 56 // kotlin.Int | Enlighten ID of the activation(system). System-generated. + //val params : SystemParams = // SystemParams | + //val result : Activation = apiInstance.updatePartnerActivation(activationId, params) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/ArraysApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/ArraysApiTest.kt new file mode 100644 index 00000000..6530f934 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/ArraysApiTest.kt @@ -0,0 +1,82 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.ArraysApi +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 + +class ArraysApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of ArraysApi + //val apiInstance = ArraysApi() + + // to test deleteSystemArray + should("test deleteSystemArray") { + // uncomment below to test deleteSystemArray + //val systemId : kotlin.Int = 56 // kotlin.Int | System ID. + //val arrayId : kotlin.Int = 56 // kotlin.Int | Array ID. + //val result : DeleteSystemArrayResponse = apiInstance.deleteSystemArray(systemId, arrayId) + //result shouldBe ("TODO") + } + + // to test getSystemArray + should("test getSystemArray") { + // uncomment below to test getSystemArray + //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. + //val result : SystemArray = apiInstance.getSystemArray(systemId, arrayId) + //result shouldBe ("TODO") + } + + // to test getSystemArrays + should("test getSystemArrays") { + // uncomment below to test getSystemArrays + //val systemId : kotlin.Int = 56 // kotlin.Int | System ID. + //val result : SystemArrays = apiInstance.getSystemArrays(systemId) + //result shouldBe ("TODO") + } + + // to test updateSystemArray + should("test updateSystemArray") { + // uncomment below to test updateSystemArray + //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 | + //val result : SystemArray = apiInstance.updateSystemArray(systemId, arrayId, params) + //result shouldBe ("TODO") + } + + // to test updateSystemArrays + should("test updateSystemArrays") { + // uncomment below to test updateSystemArrays + //val systemId : kotlin.Int = 56 // kotlin.Int | System ID. + //val params : UpdateSystemArraysRequest = // UpdateSystemArraysRequest | + //val result : SystemArrays = apiInstance.updateSystemArrays(systemId, params) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/CompaniesApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/CompaniesApiTest.kt new file mode 100644 index 00000000..1d8e79c9 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/CompaniesApiTest.kt @@ -0,0 +1,90 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.CompaniesApi +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 + +class CompaniesApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of CompaniesApi + //val apiInstance = CompaniesApi() + + // to test createCompanyUser + should("test createCompanyUser") { + // uncomment below to test createCompanyUser + //val companyId : kotlin.Int = 56 // kotlin.Int | Company ID. + //val params : CreateCompanyUserRequest = // CreateCompanyUserRequest | + //val result : User = apiInstance.createCompanyUser(companyId, params) + //result shouldBe ("TODO") + } + + // to test getCompanyUser + should("test getCompanyUser") { + // uncomment below to test getCompanyUser + //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. + //val result : User = apiInstance.getCompanyUser(companyId, userId, expand) + //result shouldBe ("TODO") + } + + // to test getCompanyUsers + should("test getCompanyUsers") { + // uncomment below to test getCompanyUsers + //val companyId : kotlin.Int = 56 // kotlin.Int | Company ID. + //val result : GetCompanyUsersResponse = apiInstance.getCompanyUsers(companyId) + //result shouldBe ("TODO") + } + + // to test getSelfCompanyAuthorizedSubcontractors + should("test getSelfCompanyAuthorizedSubcontractors") { + // uncomment below to test getSelfCompanyAuthorizedSubcontractors + //val result : GetSelfCompanyAuthorizedSubcontractorsResponse = apiInstance.getSelfCompanyAuthorizedSubcontractors() + //result shouldBe ("TODO") + } + + // to test getSelfCompanyBranches + should("test getSelfCompanyBranches") { + // uncomment below to test getSelfCompanyBranches + //val result : GetSelfCompanyBranchesResponse = apiInstance.getSelfCompanyBranches() + //result shouldBe ("TODO") + } + + // to test updateCompanyUser + should("test updateCompanyUser") { + // uncomment below to test updateCompanyUser + //val companyId : kotlin.Int = 56 // kotlin.Int | Company ID. + //val userId : kotlin.Int = 56 // kotlin.Int | User ID. + //val params : UpdateCompanyUserRequest = // UpdateCompanyUserRequest | + //val result : User = apiInstance.updateCompanyUser(companyId, userId, params) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/EstimateApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/EstimateApiTest.kt new file mode 100644 index 00000000..6413817a --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/EstimateApiTest.kt @@ -0,0 +1,51 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.EstimateApi +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 + +class EstimateApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of EstimateApi + //val apiInstance = EstimateApi() + + // to test getActivationEstimate + should("test getActivationEstimate") { + // uncomment below to test getActivationEstimate + //val activationId : kotlin.Int = 56 // kotlin.Int | Activation ID. + //val result : SystemEstimate = apiInstance.getActivationEstimate(activationId) + //result shouldBe ("TODO") + } + + // to test updateActivationEstimate + should("test updateActivationEstimate") { + // uncomment below to test updateActivationEstimate + //val activationId : kotlin.Int = 56 // kotlin.Int | Activation ID. + //val params : UpdateActivationEstimateRequest = // UpdateActivationEstimateRequest | + //val result : SystemEstimate = apiInstance.updateActivationEstimate(activationId, params) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/GridProfilesApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/GridProfilesApiTest.kt new file mode 100644 index 00000000..654349be --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/GridProfilesApiTest.kt @@ -0,0 +1,39 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.GridProfilesApi +import enlighten.commissioning.models.GetGridProfilesResponse +import enlighten.commissioning.models.ServerError +import enlighten.commissioning.models.TooManyRequestsError + +class GridProfilesApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of GridProfilesApi + //val apiInstance = GridProfilesApi() + + // to test getGridProfiles + should("test getGridProfiles") { + // uncomment below to test getGridProfiles + //val result : GetGridProfilesResponse = apiInstance.getGridProfiles() + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/HomeOwnerApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/HomeOwnerApiTest.kt new file mode 100644 index 00000000..09f22991 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/HomeOwnerApiTest.kt @@ -0,0 +1,42 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.HomeOwnerApi +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 + +class HomeOwnerApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of HomeOwnerApi + //val apiInstance = HomeOwnerApi() + + // to test createUser + should("test createUser") { + // uncomment below to test createUser + //val params : CreateUserRequest = // CreateUserRequest | + //val result : User = apiInstance.createUser(params) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/MetersApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/MetersApiTest.kt new file mode 100644 index 00000000..4b6156bf --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/MetersApiTest.kt @@ -0,0 +1,65 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.MetersApi +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 + +class MetersApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of MetersApi + //val apiInstance = MetersApi() + + // to test getSystemMeter + should("test getSystemMeter") { + // uncomment below to test getSystemMeter + //val systemId : kotlin.Int = 56 // kotlin.Int | System ID. + //val serialNumber : kotlin.String = serialNumber_example // kotlin.String | Meter serial number. + //val result : GetSystemMeterResponse = apiInstance.getSystemMeter(systemId, serialNumber) + //result shouldBe ("TODO") + } + + // to test setActivationMeterStatus + should("test setActivationMeterStatus") { + // uncomment below to test setActivationMeterStatus + //val activationId : kotlin.Int = 56 // kotlin.Int | Activation ID. + //val serialNumber : kotlin.String = serialNumber_example // kotlin.String | Meter serial number. + //val params : SetActivationMeterStatusRequest = // SetActivationMeterStatusRequest | + //val result : SetActivationMeterStatusResponse = apiInstance.setActivationMeterStatus(activationId, serialNumber, params) + //result shouldBe ("TODO") + } + + // to test updateSystemMeter + should("test updateSystemMeter") { + // uncomment below to test updateSystemMeter + //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. + //val result : UpdateSystemMeterResponse = apiInstance.updateSystemMeter(systemId, serialNumber, operationalDate) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/PvManufacturersApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/PvManufacturersApiTest.kt new file mode 100644 index 00000000..7870b7fe --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/PvManufacturersApiTest.kt @@ -0,0 +1,39 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.PvManufacturersApi +import enlighten.commissioning.models.GetPvManufacturersResponse +import enlighten.commissioning.models.ServerError +import enlighten.commissioning.models.TooManyRequestsError + +class PvManufacturersApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of PvManufacturersApi + //val apiInstance = PvManufacturersApi() + + // to test getPvManufacturers + should("test getPvManufacturers") { + // uncomment below to test getPvManufacturers + //val result : GetPvManufacturersResponse = apiInstance.getPvManufacturers() + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/PvModelsApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/PvModelsApiTest.kt new file mode 100644 index 00000000..2645eaa5 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/PvModelsApiTest.kt @@ -0,0 +1,40 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.PvModelsApi +import enlighten.commissioning.models.GetPvManufacturerModelsResponse +import enlighten.commissioning.models.ServerError +import enlighten.commissioning.models.TooManyRequestsError + +class PvModelsApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of PvModelsApi + //val apiInstance = PvModelsApi() + + // to test getPvManufacturerModels + should("test getPvManufacturerModels") { + // uncomment below to test getPvManufacturerModels + //val pvManufacturerId : kotlin.Int = 56 // kotlin.Int | Pv manufacturer ID. + //val result : GetPvManufacturerModelsResponse = apiInstance.getPvManufacturerModels(pvManufacturerId) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/TariffApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/TariffApiTest.kt new file mode 100644 index 00000000..3ba9525b --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/TariffApiTest.kt @@ -0,0 +1,50 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.TariffApi +import enlighten.commissioning.models.ServerError +import enlighten.commissioning.models.TariffSettings +import enlighten.commissioning.models.TooManyRequestsError +import enlighten.commissioning.models.UpdateSystemTariffSettingsResponse + +class TariffApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of TariffApi + //val apiInstance = TariffApi() + + // to test getSystemTariffSettings + should("test getSystemTariffSettings") { + // uncomment below to test getSystemTariffSettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val result : TariffSettings = apiInstance.getSystemTariffSettings(systemId) + //result shouldBe ("TODO") + } + + // to test updateSystemTariffSettings + should("test updateSystemTariffSettings") { + // uncomment below to test updateSystemTariffSettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val params : TariffSettings = // TariffSettings | + //val result : UpdateSystemTariffSettingsResponse = apiInstance.updateSystemTariffSettings(systemId, params) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/UsersApiTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/UsersApiTest.kt new file mode 100644 index 00000000..44fc4246 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/apis/UsersApiTest.kt @@ -0,0 +1,90 @@ +/** + * + * 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 io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.apis.UsersApi +import enlighten.commissioning.models.SearchUsersResponse +import enlighten.commissioning.models.ServerError +import enlighten.commissioning.models.TooManyRequestsError +import enlighten.commissioning.models.UnprocessableEntityError +import enlighten.commissioning.models.User +import enlighten.commissioning.models.UserExpandEnum +import enlighten.commissioning.models.UserParams + +class UsersApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of UsersApi + //val apiInstance = UsersApi() + + // to test getActivationUser + should("test getActivationUser") { + // uncomment below to test getActivationUser + //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. + //val result : User = apiInstance.getActivationUser(activationId, userId, expand) + //result shouldBe ("TODO") + } + + // to test getSelfUser + should("test getSelfUser") { + // uncomment below to test getSelfUser + //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. + //val result : User = apiInstance.getSelfUser(expand) + //result shouldBe ("TODO") + } + + // to test getUser + should("test getUser") { + // uncomment below to test getUser + //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. + //val result : User = apiInstance.getUser(userId, expand) + //result shouldBe ("TODO") + } + + // to test searchUsers + should("test searchUsers") { + // uncomment below to test searchUsers + //val email : kotlin.String = email_example // kotlin.String | Email address of the user. + //val result : SearchUsersResponse = apiInstance.searchUsers(email) + //result shouldBe ("TODO") + } + + // to test updateActivationUser + should("test updateActivationUser") { + // uncomment below to test updateActivationUser + //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 | + //val result : User = apiInstance.updateActivationUser(activationId, userId, params) + //result shouldBe ("TODO") + } + + // to test updateUser + should("test updateUser") { + // uncomment below to test updateUser + //val userId : kotlin.Int = 56 // kotlin.Int | User ID. + //val params : UserParams = // UserParams | + //val result : User = apiInstance.updateUser(userId, params) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationEnchargeInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationEnchargeInnerTest.kt new file mode 100644 index 00000000..e17fa32c --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationEnchargeInnerTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ActivationEnchargeInner + +class ActivationEnchargeInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of ActivationEnchargeInner + //val modelInstance = ActivationEnchargeInner() + + // to test the property `envoySerialNumber` - Envoy serial number. + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `enchargeSerialNumbers` - Encharge serial numbers. + should("test enchargeSerialNumbers") { + // uncomment below to test the property + //modelInstance.enchargeSerialNumbers shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationEnpowerInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationEnpowerInnerTest.kt new file mode 100644 index 00000000..ae00f3bb --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationEnpowerInnerTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ActivationEnpowerInner + +class ActivationEnpowerInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of ActivationEnpowerInner + //val modelInstance = ActivationEnpowerInner() + + // to test the property `envoySerialNumber` - Envoy serial number. + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `enpowerSerialNumbers` - Enpower serial numbers. + should("test enpowerSerialNumbers") { + // uncomment below to test the property + //modelInstance.enpowerSerialNumbers shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationHostCompanyTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationHostCompanyTest.kt new file mode 100644 index 00000000..995cc14d --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationHostCompanyTest.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ActivationHostCompany +import enlighten.commissioning.models.CompanyRoleEnum + +class ActivationHostCompanyTest : ShouldSpec() { + init { + // uncomment below to create an instance of ActivationHostCompany + //val modelInstance = ActivationHostCompany() + + // to test the property `companyId` + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `companyName` + should("test companyName") { + // uncomment below to test the property + //modelInstance.companyName shouldBe ("TODO") + } + + // to test the property `location` + should("test location") { + // uncomment below to test the property + //modelInstance.location shouldBe ("TODO") + } + + // to test the property `roles` - What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. + should("test roles") { + // uncomment below to test the property + //modelInstance.roles shouldBe ("TODO") + } + + // to test the property `uri` + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationHostTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationHostTest.kt new file mode 100644 index 00000000..6c7ad65e --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationHostTest.kt @@ -0,0 +1,103 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ActivationHost +import enlighten.commissioning.models.ActivationHostCompany +import enlighten.commissioning.models.UserRoleEnum + +class ActivationHostTest : ShouldSpec() { + init { + // uncomment below to create an instance of ActivationHost + //val modelInstance = ActivationHost() + + // to test the property `firstName` + should("test firstName") { + // uncomment below to test the property + //modelInstance.firstName shouldBe ("TODO") + } + + // to test the property `lastName` + should("test lastName") { + // uncomment below to test the property + //modelInstance.lastName shouldBe ("TODO") + } + + // to test the property `email` + should("test email") { + // uncomment below to test the property + //modelInstance.email shouldBe ("TODO") + } + + // to test the property `phone` + should("test phone") { + // uncomment below to test the property + //modelInstance.phone shouldBe ("TODO") + } + + // to test the property `active` - Whether the user is allowed to log in to Enlighten. Values true, false. Default true. + should("test active") { + // uncomment below to test the property + //modelInstance.active shouldBe ("TODO") + } + + // to test the property `userId` + should("test userId") { + // uncomment below to test the property + //modelInstance.userId shouldBe ("TODO") + } + + // to test the property `userRoles` - 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. + should("test userRoles") { + // uncomment below to test the property + //modelInstance.userRoles shouldBe ("TODO") + } + + // to test the property `enlightenEmails` + should("test enlightenEmails") { + // uncomment below to test the property + //modelInstance.enlightenEmails shouldBe ("TODO") + } + + // to test the property `enlightenView` + should("test enlightenView") { + // uncomment below to test the property + //modelInstance.enlightenView shouldBe ("TODO") + } + + // to test the property `uri` + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + // to test the property `updatedAt` + should("test updatedAt") { + // uncomment below to test the property + //modelInstance.updatedAt shouldBe ("TODO") + } + + // to test the property `company` + should("test company") { + // uncomment below to test the property + //modelInstance.company shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationOwnerCompanyTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationOwnerCompanyTest.kt new file mode 100644 index 00000000..aa223127 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationOwnerCompanyTest.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ActivationOwnerCompany +import enlighten.commissioning.models.CompanyRoleEnum + +class ActivationOwnerCompanyTest : ShouldSpec() { + init { + // uncomment below to create an instance of ActivationOwnerCompany + //val modelInstance = ActivationOwnerCompany() + + // to test the property `companyId` + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `companyName` + should("test companyName") { + // uncomment below to test the property + //modelInstance.companyName shouldBe ("TODO") + } + + // to test the property `location` + should("test location") { + // uncomment below to test the property + //modelInstance.location shouldBe ("TODO") + } + + // to test the property `roles` - What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. + should("test roles") { + // uncomment below to test the property + //modelInstance.roles shouldBe ("TODO") + } + + // to test the property `uri` + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationOwnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationOwnerTest.kt new file mode 100644 index 00000000..68cd75ae --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationOwnerTest.kt @@ -0,0 +1,103 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ActivationOwner +import enlighten.commissioning.models.ActivationOwnerCompany +import enlighten.commissioning.models.UserRoleEnum + +class ActivationOwnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of ActivationOwner + //val modelInstance = ActivationOwner() + + // to test the property `firstName` + should("test firstName") { + // uncomment below to test the property + //modelInstance.firstName shouldBe ("TODO") + } + + // to test the property `lastName` + should("test lastName") { + // uncomment below to test the property + //modelInstance.lastName shouldBe ("TODO") + } + + // to test the property `email` + should("test email") { + // uncomment below to test the property + //modelInstance.email shouldBe ("TODO") + } + + // to test the property `phone` + should("test phone") { + // uncomment below to test the property + //modelInstance.phone shouldBe ("TODO") + } + + // to test the property `active` - Whether the user is allowed to log in to Enlighten. Values true, false. Default true. + should("test active") { + // uncomment below to test the property + //modelInstance.active shouldBe ("TODO") + } + + // to test the property `userId` + should("test userId") { + // uncomment below to test the property + //modelInstance.userId shouldBe ("TODO") + } + + // to test the property `userRoles` - 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. + should("test userRoles") { + // uncomment below to test the property + //modelInstance.userRoles shouldBe ("TODO") + } + + // to test the property `enlightenEmails` + should("test enlightenEmails") { + // uncomment below to test the property + //modelInstance.enlightenEmails shouldBe ("TODO") + } + + // to test the property `enlightenView` + should("test enlightenView") { + // uncomment below to test the property + //modelInstance.enlightenView shouldBe ("TODO") + } + + // to test the property `uri` + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + // to test the property `updatedAt` + should("test updatedAt") { + // uncomment below to test the property + //modelInstance.updatedAt shouldBe ("TODO") + } + + // to test the property `company` + should("test company") { + // uncomment below to test the property + //modelInstance.company shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationTest.kt new file mode 100644 index 00000000..461ebe29 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ActivationTest.kt @@ -0,0 +1,341 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.Activation +import enlighten.commissioning.models.ActivationEnchargeInner +import enlighten.commissioning.models.ActivationEnpowerInner +import enlighten.commissioning.models.ActivationHost +import enlighten.commissioning.models.ActivationOwner +import enlighten.commissioning.models.Address +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner +import enlighten.commissioning.models.SystemArrayTypeEnum +import enlighten.commissioning.models.SystemAttachmentTypeEnum +import enlighten.commissioning.models.SystemInternetConnectionEnum +import enlighten.commissioning.models.SystemProductionModeEnum +import enlighten.commissioning.models.SystemSourceEnum +import enlighten.commissioning.models.SystemTypeEnum + +class ActivationTest : ShouldSpec() { + init { + // uncomment below to create an instance of Activation + //val modelInstance = Activation() + + // to test the property `systemId` - Enlighten ID of this system. System-generated. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `systemName` - Name of the system. + should("test systemName") { + // uncomment below to test the property + //modelInstance.systemName shouldBe ("TODO") + } + + // to test the property `systemType` + should("test systemType") { + // uncomment below to test the property + //modelInstance.systemType shouldBe ("TODO") + } + + // to test the property `status` - System's status. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `timezone` - System's timezone. + should("test timezone") { + // uncomment below to test the property + //modelInstance.timezone shouldBe ("TODO") + } + + // to test the property `stage` - What stage of the activation process this activation is in. System-generated. + should("test stage") { + // uncomment below to test the property + //modelInstance.stage shouldBe ("TODO") + } + + // to test the property `internetConnection` + should("test internetConnection") { + // uncomment below to test the property + //modelInstance.internetConnection shouldBe ("TODO") + } + + // to test the property `lease` - Whether the system is leased. Default false. + should("test lease") { + // uncomment below to test the property + //modelInstance.lease shouldBe ("TODO") + } + + // to test the property `operational` - Whether this system is permitted to operate. Default true. + should("test operational") { + // uncomment below to test the property + //modelInstance.operational shouldBe ("TODO") + } + + // to test the property `owner` + should("test owner") { + // uncomment below to test the property + //modelInstance.owner shouldBe ("TODO") + } + + // to test the property `ownerId` - Enlighten ID of this system owner. System-generated. This field is optional. + should("test ownerId") { + // uncomment below to test the property + //modelInstance.ownerId shouldBe ("TODO") + } + + // to test the property `host` + should("test host") { + // uncomment below to test the property + //modelInstance.host shouldBe ("TODO") + } + + // to test the property `hostId` - Enlighten ID of this system host. System-generated. This field is optional. + should("test hostId") { + // uncomment below to test the property + //modelInstance.hostId shouldBe ("TODO") + } + + // to test the property `installerName` - Name of the installer. + should("test installerName") { + // uncomment below to test the property + //modelInstance.installerName shouldBe ("TODO") + } + + // to test the property `installerId` - Enlighten ID of the installer of this system. Defaults to current user's company ID. + should("test installerId") { + // uncomment below to test the property + //modelInstance.installerId shouldBe ("TODO") + } + + // to test the property `maintainerName` - Name of the maintainer. + should("test maintainerName") { + // uncomment below to test the property + //modelInstance.maintainerName shouldBe ("TODO") + } + + // to test the property `maintainerId` - The Enlighten ID of the maintainer of this system. Defaults to current user's company ID. + should("test maintainerId") { + // uncomment below to test the property + //modelInstance.maintainerId shouldBe ("TODO") + } + + // to test the property `authorizedSubcontractors` - List of sub-contractors of this system. + should("test authorizedSubcontractors") { + // uncomment below to test the property + //modelInstance.authorizedSubcontractors shouldBe ("TODO") + } + + // to test the property `uri` - URI for this activation. + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + // to test the property `updatedAt` - Activation last updated timestamp. + should("test updatedAt") { + // uncomment below to test the property + //modelInstance.updatedAt shouldBe ("TODO") + } + + // to test the property `reference` - 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. + should("test reference") { + // uncomment below to test the property + //modelInstance.reference shouldBe ("TODO") + } + + // to test the property `otherReferences` - 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. + should("test otherReferences") { + // uncomment below to test the property + //modelInstance.otherReferences shouldBe ("TODO") + } + + // to test the property `allowPublicAccess` - When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true. + should("test allowPublicAccess") { + // uncomment below to test the property + //modelInstance.allowPublicAccess shouldBe ("TODO") + } + + // to test the property `interconnectDate` - When the system was approved to connect to the grid. + should("test interconnectDate") { + // uncomment below to test the property + //modelInstance.interconnectDate shouldBe ("TODO") + } + + // to test the property `installerSupportEmail` - Installer support email. + should("test installerSupportEmail") { + // uncomment below to test the property + //modelInstance.installerSupportEmail shouldBe ("TODO") + } + + // to test the property `source` + should("test source") { + // uncomment below to test the property + //modelInstance.source shouldBe ("TODO") + } + + // to test the property `arrayType` + should("test arrayType") { + // uncomment below to test the property + //modelInstance.arrayType shouldBe ("TODO") + } + + // to test the property `attachmentType` + should("test attachmentType") { + // uncomment below to test the property + //modelInstance.attachmentType shouldBe ("TODO") + } + + // to test the property `ensembleEnvoy` - Specifies serial number of ensemble envoy in multi envoy system. + should("test ensembleEnvoy") { + // uncomment below to test the property + //modelInstance.ensembleEnvoy shouldBe ("TODO") + } + + // to test the property `productionMode` + should("test productionMode") { + // uncomment below to test the property + //modelInstance.productionMode shouldBe ("TODO") + } + + // to test the property `gridProfile` - Grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles. + should("test gridProfile") { + // uncomment below to test the property + //modelInstance.gridProfile shouldBe ("TODO") + } + + // to test the property `requestedProfile` + should("test requestedProfile") { + // uncomment below to test the property + //modelInstance.requestedProfile shouldBe ("TODO") + } + + // to test the property `requestedReportFreq` + should("test requestedReportFreq") { + // uncomment below to test the property + //modelInstance.requestedReportFreq shouldBe ("TODO") + } + + // to test the property `voltage` - 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. + should("test voltage") { + // uncomment below to test the property + //modelInstance.voltage shouldBe ("TODO") + } + + // to test the property `envoySerialNumbers` - A list of Envoys installed on this system. + should("test envoySerialNumbers") { + // uncomment below to test the property + //modelInstance.envoySerialNumbers shouldBe ("TODO") + } + + // to test the property `expectedEnvoyCount` - Total envoys the system is supposed to have. + should("test expectedEnvoyCount") { + // uncomment below to test the property + //modelInstance.expectedEnvoyCount shouldBe ("TODO") + } + + // to test the property `expectedPcuCount` - Total PCUs the system is supposed to have. + should("test expectedPcuCount") { + // uncomment below to test the property + //modelInstance.expectedPcuCount shouldBe ("TODO") + } + + // to test the property `expectedNsrCount` - Total nsrs the system is supposed to have. + should("test expectedNsrCount") { + // uncomment below to test the property + //modelInstance.expectedNsrCount shouldBe ("TODO") + } + + // to test the property `expectedMeterCount` - Total meters the system is supposed to have. + should("test expectedMeterCount") { + // uncomment below to test the property + //modelInstance.expectedMeterCount shouldBe ("TODO") + } + + // to test the property `expectedEnchargeCount` - Total encharges the system is supposed to have. + should("test expectedEnchargeCount") { + // uncomment below to test the property + //modelInstance.expectedEnchargeCount shouldBe ("TODO") + } + + // to test the property `expectedEnpowerCount` - Total enpowers the system is supposed to have. + should("test expectedEnpowerCount") { + // uncomment below to test the property + //modelInstance.expectedEnpowerCount shouldBe ("TODO") + } + + // to test the property `pvManufacturer` - Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs. + should("test pvManufacturer") { + // uncomment below to test the property + //modelInstance.pvManufacturer shouldBe ("TODO") + } + + // to test the property `pvManufacturerName` - Name of the Custom PV module manufacturer associated with the system. + should("test pvManufacturerName") { + // uncomment below to test the property + //modelInstance.pvManufacturerName shouldBe ("TODO") + } + + // to test the property `pvModel` - Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs. + should("test pvModel") { + // uncomment below to test the property + //modelInstance.pvModel shouldBe ("TODO") + } + + // to test the property `pvModelName` - Name of the Custom PV module model associated with the system. + should("test pvModelName") { + // uncomment below to test the property + //modelInstance.pvModelName shouldBe ("TODO") + } + + // to test the property `pvModulePowerRating` - Power rating (in W) of the PV module installed on the system. + should("test pvModulePowerRating") { + // uncomment below to test the property + //modelInstance.pvModulePowerRating shouldBe ("TODO") + } + + // to test the property `pvModuleType` - Type ID of the PV module installed on the system. 1 -> 'Mono-facial', 2 -> 'Bi-facial', 3 -> 'Split cell', 4 -> 'Other'. + should("test pvModuleType") { + // uncomment below to test the property + //modelInstance.pvModuleType shouldBe ("TODO") + } + + // to test the property `encharge` - Encharge detail. + should("test encharge") { + // uncomment below to test the property + //modelInstance.encharge shouldBe ("TODO") + } + + // to test the property `enpower` - Enpower detail. + should("test enpower") { + // uncomment below to test the property + //modelInstance.enpower shouldBe ("TODO") + } + + // to test the property `address` + should("test address") { + // uncomment below to test the property + //modelInstance.address shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/AddressTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/AddressTest.kt new file mode 100644 index 00000000..a55300db --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/AddressTest.kt @@ -0,0 +1,77 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.Address + +class AddressTest : ShouldSpec() { + init { + // uncomment below to create an instance of Address + //val modelInstance = Address() + + // to test the property `street1` - Street line 1. + should("test street1") { + // uncomment below to test the property + //modelInstance.street1 shouldBe ("TODO") + } + + // to test the property `street2` - Street line 2. This field is optional. + should("test street2") { + // uncomment below to test the property + //modelInstance.street2 shouldBe ("TODO") + } + + // to test the property `city` - City. + should("test city") { + // uncomment below to test the property + //modelInstance.city shouldBe ("TODO") + } + + // to test the property `state` - State. + should("test state") { + // uncomment below to test the property + //modelInstance.state shouldBe ("TODO") + } + + // to test the property `country` - Country. + should("test country") { + // uncomment below to test the property + //modelInstance.country shouldBe ("TODO") + } + + // to test the property `postalCode` - Postal code. + should("test postalCode") { + // uncomment below to test the property + //modelInstance.postalCode shouldBe ("TODO") + } + + // to test the property `latitude` - Latitude. + should("test latitude") { + // uncomment below to test the property + //modelInstance.latitude shouldBe ("TODO") + } + + // to test the property `longitude` - Longitude. + should("test longitude") { + // uncomment below to test the property + //modelInstance.longitude shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ArrayParamsModulesInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ArrayParamsModulesInnerTest.kt new file mode 100644 index 00000000..b49545da --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ArrayParamsModulesInnerTest.kt @@ -0,0 +1,59 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ArrayParamsModulesInner + +class ArrayParamsModulesInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of ArrayParamsModulesInner + //val modelInstance = ArrayParamsModulesInner() + + // to test the property `left` - 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. + should("test left") { + // uncomment below to test the property + //modelInstance.left shouldBe ("TODO") + } + + // to test the property `top` - Top axis position of module w.r.t Array. Increase the value to move the module up, and decrease to move it down. + should("test top") { + // uncomment below to test the property + //modelInstance.top shouldBe ("TODO") + } + + // to test the property `angle` - 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. + should("test angle") { + // uncomment below to test the property + //modelInstance.angle shouldBe ("TODO") + } + + // to test the property `serialNum` - Inverter serial number mapped with this module. + should("test serialNum") { + // uncomment below to test the property + //modelInstance.serialNum shouldBe ("TODO") + } + + // to test the property `id` - ID of the module. ID cannot be changed. It is only used to identify the array that needs to be updated. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ArrayParamsTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ArrayParamsTest.kt new file mode 100644 index 00000000..2f2c54c1 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ArrayParamsTest.kt @@ -0,0 +1,78 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ArrayParams +import enlighten.commissioning.models.ArrayParamsModulesInner + +class ArrayParamsTest : ShouldSpec() { + init { + // uncomment below to create an instance of ArrayParams + //val modelInstance = ArrayParams() + + // to test the property `label` - Name of the array. + should("test label") { + // uncomment below to test the property + //modelInstance.label shouldBe ("TODO") + } + + // to test the property `angle` - Angle of the array. Rotate the array clockwise by the given value. + should("test angle") { + // uncomment below to test the property + //modelInstance.angle shouldBe ("TODO") + } + + // to test the property `tilt` - Tilt of the array. + should("test tilt") { + // uncomment below to test the property + //modelInstance.tilt shouldBe ("TODO") + } + + // to test the property `provisionedEnvoy` - Provisioned envoy. + should("test provisionedEnvoy") { + // uncomment below to test the property + //modelInstance.provisionedEnvoy shouldBe ("TODO") + } + + // to test the property `left` - Left axis position of array. Increase the value to move the array to the right, and decrease to move it to the left. + should("test left") { + // uncomment below to test the property + //modelInstance.left shouldBe ("TODO") + } + + // to test the property `top` - Top axis position of array. Increase the value to move the array up, and decrease to move it down. + should("test top") { + // uncomment below to test the property + //modelInstance.top shouldBe ("TODO") + } + + // to test the property `modules` + should("test modules") { + // uncomment below to test the property + //modelInstance.modules shouldBe ("TODO") + } + + // to test the property `id` - ID of the array. ID cannot be changed. It is only used to identify the array that needs to be updated. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CompanyRoleEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CompanyRoleEnumTest.kt new file mode 100644 index 00000000..4713e546 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CompanyRoleEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.CompanyRoleEnum + +class CompanyRoleEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of CompanyRoleEnum + //val modelInstance = CompanyRoleEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CompanyTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CompanyTest.kt new file mode 100644 index 00000000..f96a3e68 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CompanyTest.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.Company +import enlighten.commissioning.models.CompanyRoleEnum + +class CompanyTest : ShouldSpec() { + init { + // uncomment below to create an instance of Company + //val modelInstance = Company() + + // to test the property `companyId` - Enlighten-generated ID of the company to which the user belongs. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `companyName` - Name of the company to which the user belongs. + should("test companyName") { + // uncomment below to test the property + //modelInstance.companyName shouldBe ("TODO") + } + + // to test the property `location` - Company location. + should("test location") { + // uncomment below to test the property + //modelInstance.location shouldBe ("TODO") + } + + // to test the property `roles` - What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. + should("test roles") { + // uncomment below to test the property + //modelInstance.roles shouldBe ("TODO") + } + + // to test the property `uri` - URI to the show() method for the company. System-generated. + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CreateCompanyUserRequestTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CreateCompanyUserRequestTest.kt new file mode 100644 index 00000000..45827415 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CreateCompanyUserRequestTest.kt @@ -0,0 +1,59 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.CreateCompanyUserRequest + +class CreateCompanyUserRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of CreateCompanyUserRequest + //val modelInstance = CreateCompanyUserRequest() + + // to test the property `email` - Email address of the user. Must be unique within Enlighten. Required. + should("test email") { + // uncomment below to test the property + //modelInstance.email shouldBe ("TODO") + } + + // to test the property `firstName` - User's first name. Required. + should("test firstName") { + // uncomment below to test the property + //modelInstance.firstName shouldBe ("TODO") + } + + // to test the property `lastName` - User's last name. Required. + should("test lastName") { + // uncomment below to test the property + //modelInstance.lastName shouldBe ("TODO") + } + + // to test the property `enlightenEmails` - Whether the user receives automated emails from Enlighten. Default false. + should("test enlightenEmails") { + // uncomment below to test the property + //modelInstance.enlightenEmails shouldBe ("TODO") + } + + // to test the property `phone` - Telephone number of the user. Optional. + should("test phone") { + // uncomment below to test the property + //modelInstance.phone shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CreateUserRequestTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CreateUserRequestTest.kt new file mode 100644 index 00000000..36a7339a --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/CreateUserRequestTest.kt @@ -0,0 +1,71 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.CreateUserRequest + +class CreateUserRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of CreateUserRequest + //val modelInstance = CreateUserRequest() + + // to test the property `email` - Email address of the user. Must be unique within Enlighten. Required. + should("test email") { + // uncomment below to test the property + //modelInstance.email shouldBe ("TODO") + } + + // to test the property `firstName` - User's first name. Required. + should("test firstName") { + // uncomment below to test the property + //modelInstance.firstName shouldBe ("TODO") + } + + // to test the property `lastName` - User's last name. Required. + should("test lastName") { + // uncomment below to test the property + //modelInstance.lastName shouldBe ("TODO") + } + + // to test the property `enlightenEmails` - Whether the user receives automated emails from Enlighten. Default false. + should("test enlightenEmails") { + // uncomment below to test the property + //modelInstance.enlightenEmails shouldBe ("TODO") + } + + // to test the property `enlightenView` - 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'. + should("test enlightenView") { + // uncomment below to test the property + //modelInstance.enlightenView shouldBe ("TODO") + } + + // to test the property `phone` - Telephone number of the user. Optional. + should("test phone") { + // uncomment below to test the property + //modelInstance.phone shouldBe ("TODO") + } + + // to test the property `companyId` - Enlighten-generated ID of the company to which the user belongs, if any. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/DeleteActivationResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/DeleteActivationResponseTest.kt new file mode 100644 index 00000000..0a3e95a9 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/DeleteActivationResponseTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.DeleteActivationResponse + +class DeleteActivationResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of DeleteActivationResponse + //val modelInstance = DeleteActivationResponse() + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/DeleteSystemArrayResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/DeleteSystemArrayResponseTest.kt new file mode 100644 index 00000000..0d23cc50 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/DeleteSystemArrayResponseTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.DeleteSystemArrayResponse + +class DeleteSystemArrayResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of DeleteSystemArrayResponse + //val modelInstance = DeleteSystemArrayResponse() + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetActivationOpsProductionModeResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetActivationOpsProductionModeResponseTest.kt new file mode 100644 index 00000000..91352f62 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetActivationOpsProductionModeResponseTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetActivationOpsProductionModeResponse + +class GetActivationOpsProductionModeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetActivationOpsProductionModeResponse + //val modelInstance = GetActivationOpsProductionModeResponse() + + // to test the property `mode` + should("test mode") { + // uncomment below to test the property + //modelInstance.mode shouldBe ("TODO") + } + + // to test the property `totalMicros` - Total number of microinverters in the system. + should("test totalMicros") { + // uncomment below to test the property + //modelInstance.totalMicros shouldBe ("TODO") + } + + // to test the property `energyProducingMicros` - Total number of microinverters producing energy in the system. + should("test energyProducingMicros") { + // uncomment below to test the property + //modelInstance.energyProducingMicros shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseTest.kt new file mode 100644 index 00000000..8e310e97 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseTest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetCompanyUsersResponse +import enlighten.commissioning.models.GetCompanyUsersResponseUsersInner + +class GetCompanyUsersResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetCompanyUsersResponse + //val modelInstance = GetCompanyUsersResponse() + + // to test the property `users` - 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. + should("test users") { + // uncomment below to test the property + //modelInstance.users shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseUsersInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseUsersInnerTest.kt new file mode 100644 index 00000000..41d8e534 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetCompanyUsersResponseUsersInnerTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetCompanyUsersResponseUsersInner + +class GetCompanyUsersResponseUsersInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetCompanyUsersResponseUsersInner + //val modelInstance = GetCompanyUsersResponseUsersInner() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetGridProfilesResponseGridProfilesInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetGridProfilesResponseGridProfilesInnerTest.kt new file mode 100644 index 00000000..9287477b --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetGridProfilesResponseGridProfilesInnerTest.kt @@ -0,0 +1,101 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetGridProfilesResponseGridProfilesInner + +class GetGridProfilesResponseGridProfilesInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetGridProfilesResponseGridProfilesInner + //val modelInstance = GetGridProfilesResponseGridProfilesInner() + + // to test the property `id` - Grid profile ID. System-generated. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `profileId` + should("test profileId") { + // uncomment below to test the property + //modelInstance.profileId shouldBe ("TODO") + } + + // to test the property `created` - Profile created date and time. + should("test created") { + // uncomment below to test the property + //modelInstance.created shouldBe ("TODO") + } + + // to test the property `updated` - Profile last updated date and time. + should("test updated") { + // uncomment below to test the property + //modelInstance.updated shouldBe ("TODO") + } + + // to test the property `name` - Profile name. + should("test name") { + // uncomment below to test the property + //modelInstance.name shouldBe ("TODO") + } + + // to test the property `description` - Profile description. + should("test description") { + // uncomment below to test the property + //modelInstance.description shouldBe ("TODO") + } + + // to test the property `version` - Profile version. + should("test version") { + // uncomment below to test the property + //modelInstance.version shouldBe ("TODO") + } + + // to test the property `envoyType` - Envoy type. + should("test envoyType") { + // uncomment below to test the property + //modelInstance.envoyType shouldBe ("TODO") + } + + // to test the property `countries` - Name of the Countries. + should("test countries") { + // uncomment below to test the property + //modelInstance.countries shouldBe ("TODO") + } + + // to test the property `states` - States code. + should("test states") { + // uncomment below to test the property + //modelInstance.states shouldBe ("TODO") + } + + // to test the property `stateNames` - Name of the states. + should("test stateNames") { + // uncomment below to test the property + //modelInstance.stateNames shouldBe ("TODO") + } + + // to test the property `ensemble1Compatible` + should("test ensemble1Compatible") { + // uncomment below to test the property + //modelInstance.ensemble1Compatible shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetGridProfilesResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetGridProfilesResponseTest.kt new file mode 100644 index 00000000..83643824 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetGridProfilesResponseTest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetGridProfilesResponse +import enlighten.commissioning.models.GetGridProfilesResponseGridProfilesInner + +class GetGridProfilesResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetGridProfilesResponse + //val modelInstance = GetGridProfilesResponse() + + // to test the property `gridProfiles` + should("test gridProfiles") { + // uncomment below to test the property + //modelInstance.gridProfiles shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInnerTest.kt new file mode 100644 index 00000000..b53ab731 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner + +class GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner + //val modelInstance = GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner() + + // to test the property `authorizedSubcontractorId` - The Enlighten ID of the sub-contractor of this system. System-generated. + should("test authorizedSubcontractorId") { + // uncomment below to test the property + //modelInstance.authorizedSubcontractorId shouldBe ("TODO") + } + + // to test the property `authorizedSubcontractorName` - Name of the sub-contractor of this system. + should("test authorizedSubcontractorName") { + // uncomment below to test the property + //modelInstance.authorizedSubcontractorName shouldBe ("TODO") + } + + // to test the property `status` - Current status of the subcontractor for the site. This field will be shown only for pending and rejected sub-contractors. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerTest.kt new file mode 100644 index 00000000..d02ab6c0 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseSystemsInnerTest.kt @@ -0,0 +1,171 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInner +import enlighten.commissioning.models.Address +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner +import enlighten.commissioning.models.SystemInternetConnectionEnum +import enlighten.commissioning.models.SystemTypeEnum + +class GetPartnerActivationsResponseSystemsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetPartnerActivationsResponseSystemsInner + //val modelInstance = GetPartnerActivationsResponseSystemsInner() + + // to test the property `systemId` - Enlighten ID of this system. System-generated. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `systemName` - Name of the system. + should("test systemName") { + // uncomment below to test the property + //modelInstance.systemName shouldBe ("TODO") + } + + // to test the property `systemType` + should("test systemType") { + // uncomment below to test the property + //modelInstance.systemType shouldBe ("TODO") + } + + // to test the property `status` - System's status. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `timezone` - System's timezone. + should("test timezone") { + // uncomment below to test the property + //modelInstance.timezone shouldBe ("TODO") + } + + // to test the property `stage` - What stage of the activation process this activation is in. System-generated. + should("test stage") { + // uncomment below to test the property + //modelInstance.stage shouldBe ("TODO") + } + + // to test the property `internetConnection` + should("test internetConnection") { + // uncomment below to test the property + //modelInstance.internetConnection shouldBe ("TODO") + } + + // to test the property `lease` - Whether the system is leased. Default false. + should("test lease") { + // uncomment below to test the property + //modelInstance.lease shouldBe ("TODO") + } + + // to test the property `operational` - Whether this system is permitted to operate. Default true. + should("test operational") { + // uncomment below to test the property + //modelInstance.operational shouldBe ("TODO") + } + + // to test the property `owner` - 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. + should("test owner") { + // uncomment below to test the property + //modelInstance.owner shouldBe ("TODO") + } + + // to test the property `ownerId` - Enlighten ID of this system owner. System-generated. + should("test ownerId") { + // uncomment below to test the property + //modelInstance.ownerId shouldBe ("TODO") + } + + // to test the property `host` - Name of the system host. + should("test host") { + // uncomment below to test the property + //modelInstance.host shouldBe ("TODO") + } + + // to test the property `hostId` - Enlighten ID of this system host. System-generated. + should("test hostId") { + // uncomment below to test the property + //modelInstance.hostId shouldBe ("TODO") + } + + // to test the property `installerName` - Name of the installer. + should("test installerName") { + // uncomment below to test the property + //modelInstance.installerName shouldBe ("TODO") + } + + // to test the property `installerId` - Enlighten ID of the installer of this system. + should("test installerId") { + // uncomment below to test the property + //modelInstance.installerId shouldBe ("TODO") + } + + // to test the property `maintainerName` - Name of the maintainer. + should("test maintainerName") { + // uncomment below to test the property + //modelInstance.maintainerName shouldBe ("TODO") + } + + // to test the property `maintainerId` - Enlighten ID of the maintainer of this system. + should("test maintainerId") { + // uncomment below to test the property + //modelInstance.maintainerId shouldBe ("TODO") + } + + // to test the property `authorizedSubcontractors` - List of sub-contractors of this system. + should("test authorizedSubcontractors") { + // uncomment below to test the property + //modelInstance.authorizedSubcontractors shouldBe ("TODO") + } + + // to test the property `uri` - URI for this activation. + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + // to test the property `updatedAt` - Activation last updated timestamp. + should("test updatedAt") { + // uncomment below to test the property + //modelInstance.updatedAt shouldBe ("TODO") + } + + // to test the property `reference` - 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. + should("test reference") { + // uncomment below to test the property + //modelInstance.reference shouldBe ("TODO") + } + + // to test the property `otherReferences` - 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. + should("test otherReferences") { + // uncomment below to test the property + //modelInstance.otherReferences shouldBe ("TODO") + } + + // to test the property `address` + should("test address") { + // uncomment below to test the property + //modelInstance.address shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseTest.kt new file mode 100644 index 00000000..ee80be00 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPartnerActivationsResponseTest.kt @@ -0,0 +1,42 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetPartnerActivationsResponse +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInner + +class GetPartnerActivationsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetPartnerActivationsResponse + //val modelInstance = GetPartnerActivationsResponse() + + // to test the property `systems` - Zero or more activations. + should("test systems") { + // uncomment below to test the property + //modelInstance.systems shouldBe ("TODO") + } + + // to test the property `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 10. The maximum page size is 1000. + should("test next") { + // uncomment below to test the property + //modelInstance.next shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponsePvManufacturersTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponsePvManufacturersTest.kt new file mode 100644 index 00000000..6fa13713 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponsePvManufacturersTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetPvManufacturerModelsResponsePvManufacturers + +class GetPvManufacturerModelsResponsePvManufacturersTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetPvManufacturerModelsResponsePvManufacturers + //val modelInstance = GetPvManufacturerModelsResponsePvManufacturers() + + // to test the property `pvManufacturerId` - Pv manufacturer ID. + should("test pvManufacturerId") { + // uncomment below to test the property + //modelInstance.pvManufacturerId shouldBe ("TODO") + } + + // to test the property `name` - Name of the Pv manufacturer. + should("test name") { + // uncomment below to test the property + //modelInstance.name shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponseTest.kt new file mode 100644 index 00000000..2bd492e8 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturerModelsResponseTest.kt @@ -0,0 +1,43 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetPvManufacturerModelsResponse +import enlighten.commissioning.models.GetCompanyUsersResponseUsersInner +import enlighten.commissioning.models.GetPvManufacturerModelsResponsePvManufacturers + +class GetPvManufacturerModelsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetPvManufacturerModelsResponse + //val modelInstance = GetPvManufacturerModelsResponse() + + // to test the property `pvManufacturers` + should("test pvManufacturers") { + // uncomment below to test the property + //modelInstance.pvManufacturers shouldBe ("TODO") + } + + // to test the property `pvModels` - 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. + should("test pvModels") { + // uncomment below to test the property + //modelInstance.pvModels shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturersResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturersResponseTest.kt new file mode 100644 index 00000000..c2e7c4cb --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetPvManufacturersResponseTest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetPvManufacturersResponse +import enlighten.commissioning.models.GetCompanyUsersResponseUsersInner + +class GetPvManufacturersResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetPvManufacturersResponse + //val modelInstance = GetPvManufacturersResponse() + + // to test the property `pvManufacturers` - 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. + should("test pvManufacturers") { + // uncomment below to test the property + //modelInstance.pvManufacturers shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInnerTest.kt new file mode 100644 index 00000000..a1464af3 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInnerTest.kt @@ -0,0 +1,66 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner +import enlighten.commissioning.models.CompanyRoleEnum + +class GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner + //val modelInstance = GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner() + + // to test the property `companyId` - Enlighten ID of the company. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `companyName` - Name of the company. + should("test companyName") { + // uncomment below to test the property + //modelInstance.companyName shouldBe ("TODO") + } + + // to test the property `location` - Company location. + should("test location") { + // uncomment below to test the property + //modelInstance.location shouldBe ("TODO") + } + + // to test the property `roles` + should("test roles") { + // uncomment below to test the property + //modelInstance.roles shouldBe ("TODO") + } + + // to test the property `uri` - URI to the show() method for the company. System-generated. + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + // to test the property `status` - Whether the subcontractor is enabled or disabled. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseTest.kt new file mode 100644 index 00000000..98002e2e --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyAuthorizedSubcontractorsResponseTest.kt @@ -0,0 +1,48 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetSelfCompanyAuthorizedSubcontractorsResponse +import enlighten.commissioning.models.GetSelfCompanyAuthorizedSubcontractorsResponseAuthorizedSubcontractorsInner + +class GetSelfCompanyAuthorizedSubcontractorsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSelfCompanyAuthorizedSubcontractorsResponse + //val modelInstance = GetSelfCompanyAuthorizedSubcontractorsResponse() + + // to test the property `companyId` - Enlighten ID of the API user's company. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `companyName` - Name of the API user's company. + should("test companyName") { + // uncomment below to test the property + //modelInstance.companyName shouldBe ("TODO") + } + + // to test the property `authorizedSubcontractors` - A list of subcontractors belonging to the API user's company. May be empty. + should("test authorizedSubcontractors") { + // uncomment below to test the property + //modelInstance.authorizedSubcontractors shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseBranchesInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseBranchesInnerTest.kt new file mode 100644 index 00000000..4b9ae231 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseBranchesInnerTest.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetSelfCompanyBranchesResponseBranchesInner +import enlighten.commissioning.models.CompanyRoleEnum + +class GetSelfCompanyBranchesResponseBranchesInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSelfCompanyBranchesResponseBranchesInner + //val modelInstance = GetSelfCompanyBranchesResponseBranchesInner() + + // to test the property `companyId` - Enlighten ID of the company. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `companyName` - Name of the company. + should("test companyName") { + // uncomment below to test the property + //modelInstance.companyName shouldBe ("TODO") + } + + // to test the property `location` - Company location. + should("test location") { + // uncomment below to test the property + //modelInstance.location shouldBe ("TODO") + } + + // to test the property `roles` - What type of company this is in Enphase. For installer company roles will be ['installer']. For other role roles will be empty. + should("test roles") { + // uncomment below to test the property + //modelInstance.roles shouldBe ("TODO") + } + + // to test the property `uri` - URI to the show() method for the company. System-generated. + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseTest.kt new file mode 100644 index 00000000..80abb069 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSelfCompanyBranchesResponseTest.kt @@ -0,0 +1,48 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetSelfCompanyBranchesResponse +import enlighten.commissioning.models.GetSelfCompanyBranchesResponseBranchesInner + +class GetSelfCompanyBranchesResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSelfCompanyBranchesResponse + //val modelInstance = GetSelfCompanyBranchesResponse() + + // to test the property `companyId` - Enlighten ID of the API user's company. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `companyName` - Name of the API user's company. + should("test companyName") { + // uncomment below to test the property + //modelInstance.companyName shouldBe ("TODO") + } + + // to test the property `branches` - A list of branches belonging to the API user's company. May be empty. + should("test branches") { + // uncomment below to test the property + //modelInstance.branches shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSystemMeterResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSystemMeterResponseTest.kt new file mode 100644 index 00000000..7371d1de --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GetSystemMeterResponseTest.kt @@ -0,0 +1,95 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GetSystemMeterResponse + +class GetSystemMeterResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemMeterResponse + //val modelInstance = GetSystemMeterResponse() + + // to test the property `serialNumber` - Meter serial number. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `manufacturer` - Name of the manufacturer. + should("test manufacturer") { + // uncomment below to test the property + //modelInstance.manufacturer shouldBe ("TODO") + } + + // to test the property `model` - Model. + should("test model") { + // uncomment below to test the property + //modelInstance.model shouldBe ("TODO") + } + + // to test the property `type` - Meter type. + should("test type") { + // uncomment below to test the property + //modelInstance.type shouldBe ("TODO") + } + + // to test the property `operationalDate` - Operational date. + should("test operationalDate") { + // uncomment below to test the property + //modelInstance.operationalDate shouldBe ("TODO") + } + + // to test the property `firstReportDate` - First report date. + should("test firstReportDate") { + // uncomment below to test the property + //modelInstance.firstReportDate shouldBe ("TODO") + } + + // to test the property `lastReportDate` - Last report date. + should("test lastReportDate") { + // uncomment below to test the property + //modelInstance.lastReportDate shouldBe ("TODO") + } + + // to test the property `phase` - Phase. + should("test phase") { + // uncomment below to test the property + //modelInstance.phase shouldBe ("TODO") + } + + // to test the property `envoySerialNumber` - Envoy serial number. + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `status` - Meter status. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `state` - Meter state. + should("test state") { + // uncomment below to test the property + //modelInstance.state shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GrantActivationUserAccessResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GrantActivationUserAccessResponseTest.kt new file mode 100644 index 00000000..d6173c90 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/GrantActivationUserAccessResponseTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.GrantActivationUserAccessResponse + +class GrantActivationUserAccessResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GrantActivationUserAccessResponse + //val modelInstance = GrantActivationUserAccessResponse() + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/RevokeActivationUserAccessResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/RevokeActivationUserAccessResponseTest.kt new file mode 100644 index 00000000..9750c307 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/RevokeActivationUserAccessResponseTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.RevokeActivationUserAccessResponse + +class RevokeActivationUserAccessResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of RevokeActivationUserAccessResponse + //val modelInstance = RevokeActivationUserAccessResponse() + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SearchUsersResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SearchUsersResponseTest.kt new file mode 100644 index 00000000..efa9ab8a --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SearchUsersResponseTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SearchUsersResponse + +class SearchUsersResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of SearchUsersResponse + //val modelInstance = SearchUsersResponse() + + // to test the property `userId` - Enlighten ID of the user. + should("test userId") { + // uncomment below to test the property + //modelInstance.userId shouldBe ("TODO") + } + + // to test the property `companyId` - 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. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ServerErrorTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ServerErrorTest.kt new file mode 100644 index 00000000..eea9676f --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/ServerErrorTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.ServerError + +class ServerErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of ServerError + //val modelInstance = ServerError() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationMeterStatusRequestTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationMeterStatusRequestTest.kt new file mode 100644 index 00000000..84ce91fa --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationMeterStatusRequestTest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SetActivationMeterStatusRequest +import enlighten.commissioning.models.SystemMeterStatusEnum + +class SetActivationMeterStatusRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of SetActivationMeterStatusRequest + //val modelInstance = SetActivationMeterStatusRequest() + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationMeterStatusResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationMeterStatusResponseTest.kt new file mode 100644 index 00000000..496ab275 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationMeterStatusResponseTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SetActivationMeterStatusResponse + +class SetActivationMeterStatusResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of SetActivationMeterStatusResponse + //val modelInstance = SetActivationMeterStatusResponse() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeRequestTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeRequestTest.kt new file mode 100644 index 00000000..3c20c2aa --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeRequestTest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SetActivationOpsProductionModeRequest +import enlighten.commissioning.models.SystemProductionModeEnum + +class SetActivationOpsProductionModeRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of SetActivationOpsProductionModeRequest + //val modelInstance = SetActivationOpsProductionModeRequest() + + // to test the property `mode` + should("test mode") { + // uncomment below to test the property + //modelInstance.mode shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeResponseTest.kt new file mode 100644 index 00000000..7a32839e --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SetActivationOpsProductionModeResponseTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SetActivationOpsProductionModeResponse + +class SetActivationOpsProductionModeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of SetActivationOpsProductionModeResponse + //val modelInstance = SetActivationOpsProductionModeResponse() + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayModulesInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayModulesInnerTest.kt new file mode 100644 index 00000000..9b7ae3f8 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayModulesInnerTest.kt @@ -0,0 +1,59 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemArrayModulesInner + +class SystemArrayModulesInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemArrayModulesInner + //val modelInstance = SystemArrayModulesInner() + + // to test the property `id` - ID of the module. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `left` - Left axis position of module. + should("test left") { + // uncomment below to test the property + //modelInstance.left shouldBe ("TODO") + } + + // to test the property `top` - Top axis position of module. + should("test top") { + // uncomment below to test the property + //modelInstance.top shouldBe ("TODO") + } + + // to test the property `angle` - Angle of the module. + should("test angle") { + // uncomment below to test the property + //modelInstance.angle shouldBe ("TODO") + } + + // to test the property `serialNum` - Inverter serial number mapped with this module. + should("test serialNum") { + // uncomment below to test the property + //modelInstance.serialNum shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayTest.kt new file mode 100644 index 00000000..1bbc4474 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayTest.kt @@ -0,0 +1,90 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemArray +import enlighten.commissioning.models.SystemArrayModulesInner + +class SystemArrayTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemArray + //val modelInstance = SystemArray() + + // to test the property `id` - ID of the array. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `label` - Name of the array. + should("test label") { + // uncomment below to test the property + //modelInstance.label shouldBe ("TODO") + } + + // to test the property `angle` - Angle of the array. + should("test angle") { + // uncomment below to test the property + //modelInstance.angle shouldBe ("TODO") + } + + // to test the property `tilt` - Tilt of the array. + should("test tilt") { + // uncomment below to test the property + //modelInstance.tilt shouldBe ("TODO") + } + + // to test the property `reportingEnvoys` - List of envoys serial numbers. + should("test reportingEnvoys") { + // uncomment below to test the property + //modelInstance.reportingEnvoys shouldBe ("TODO") + } + + // to test the property `provisionedEnvoy` - Provisioned envoy. + should("test provisionedEnvoy") { + // uncomment below to test the property + //modelInstance.provisionedEnvoy shouldBe ("TODO") + } + + // to test the property `updatedAt` - Last updated Epoch time. + should("test updatedAt") { + // uncomment below to test the property + //modelInstance.updatedAt shouldBe ("TODO") + } + + // to test the property `left` - Left axis position of array. + should("test left") { + // uncomment below to test the property + //modelInstance.left shouldBe ("TODO") + } + + // to test the property `top` - Top axis position of array. + should("test top") { + // uncomment below to test the property + //modelInstance.top shouldBe ("TODO") + } + + // to test the property `modules` + should("test modules") { + // uncomment below to test the property + //modelInstance.modules shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayTypeEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayTypeEnumTest.kt new file mode 100644 index 00000000..a1c94d49 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArrayTypeEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemArrayTypeEnum + +class SystemArrayTypeEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemArrayTypeEnum + //val modelInstance = SystemArrayTypeEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysInventoryDetailsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysInventoryDetailsInnerTest.kt new file mode 100644 index 00000000..3b03536e --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysInventoryDetailsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemArraysInventoryDetailsInner + +class SystemArraysInventoryDetailsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemArraysInventoryDetailsInner + //val modelInstance = SystemArraysInventoryDetailsInner() + + // to test the property `type` - Device type. + should("test type") { + // uncomment below to test the property + //modelInstance.type shouldBe ("TODO") + } + + // to test the property `count` - Device count. + should("test count") { + // uncomment below to test the property + //modelInstance.count shouldBe ("TODO") + } + + // to test the property `serialNum` - Device serial number. + should("test serialNum") { + // uncomment below to test the property + //modelInstance.serialNum shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysLayersInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysLayersInnerTest.kt new file mode 100644 index 00000000..65e016c2 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysLayersInnerTest.kt @@ -0,0 +1,77 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemArraysLayersInner + +class SystemArraysLayersInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemArraysLayersInner + //val modelInstance = SystemArraysLayersInner() + + // to test the property `file` - Background image url. + should("test file") { + // uncomment below to test the property + //modelInstance.file shouldBe ("TODO") + } + + // to test the property `scale` - Zoom level. + should("test scale") { + // uncomment below to test the property + //modelInstance.scale shouldBe ("TODO") + } + + // to test the property `angle` - Angle of the layer. + should("test angle") { + // uncomment below to test the property + //modelInstance.angle shouldBe ("TODO") + } + + // to test the property `opacity` - Opacity of the layer. + should("test opacity") { + // uncomment below to test the property + //modelInstance.opacity shouldBe ("TODO") + } + + // to test the property `width` - Width of the layer. + should("test width") { + // uncomment below to test the property + //modelInstance.width shouldBe ("TODO") + } + + // to test the property `height` - Height of the layer. + should("test height") { + // uncomment below to test the property + //modelInstance.height shouldBe ("TODO") + } + + // to test the property `left` - Left of the layer. + should("test left") { + // uncomment below to test the property + //modelInstance.left shouldBe ("TODO") + } + + // to test the property `top` - Top of the layer. + should("test top") { + // uncomment below to test the property + //modelInstance.top shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysTest.kt new file mode 100644 index 00000000..5b6559e7 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemArraysTest.kt @@ -0,0 +1,80 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemArrays +import enlighten.commissioning.models.SystemArray +import enlighten.commissioning.models.SystemArraysInventoryDetailsInner +import enlighten.commissioning.models.SystemArraysLayersInner + +class SystemArraysTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemArrays + //val modelInstance = SystemArrays() + + // to test the property `systemId` - System ID. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `createdAt` - System created Epoch time. + should("test createdAt") { + // uncomment below to test the property + //modelInstance.createdAt shouldBe ("TODO") + } + + // to test the property `updatedAt` - System updated Epoch time. + should("test updatedAt") { + // uncomment below to test the property + //modelInstance.updatedAt shouldBe ("TODO") + } + + // to test the property `angle` - Angle of the system. + should("test angle") { + // uncomment below to test the property + //modelInstance.angle shouldBe ("TODO") + } + + // to test the property `arrays` + should("test arrays") { + // uncomment below to test the property + //modelInstance.arrays shouldBe ("TODO") + } + + // to test the property `inventory` - List of active inverter serial numbers. + should("test inventory") { + // uncomment below to test the property + //modelInstance.inventory shouldBe ("TODO") + } + + // to test the property `inventoryDetails` + should("test inventoryDetails") { + // uncomment below to test the property + //modelInstance.inventoryDetails shouldBe ("TODO") + } + + // to test the property `layers` + should("test layers") { + // uncomment below to test the property + //modelInstance.layers shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemAttachmentTypeEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemAttachmentTypeEnumTest.kt new file mode 100644 index 00000000..1f2b403c --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemAttachmentTypeEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemAttachmentTypeEnum + +class SystemAttachmentTypeEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemAttachmentTypeEnum + //val modelInstance = SystemAttachmentTypeEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemEstimateTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemEstimateTest.kt new file mode 100644 index 00000000..9e2c8625 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemEstimateTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemEstimate + +class SystemEstimateTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemEstimate + //val modelInstance = SystemEstimate() + + // to test the property `systemId` - System this estimate is for. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `degradeFactor` - Annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. Default 0.5%. + should("test degradeFactor") { + // uncomment below to test the property + //modelInstance.degradeFactor shouldBe ("TODO") + } + + // to test the property `monthEstimates` - 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. + should("test monthEstimates") { + // uncomment below to test the property + //modelInstance.monthEstimates shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemExpandEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemExpandEnumTest.kt new file mode 100644 index 00000000..0d360338 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemExpandEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemExpandEnum + +class SystemExpandEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemExpandEnum + //val modelInstance = SystemExpandEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemInternetConnectionEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemInternetConnectionEnumTest.kt new file mode 100644 index 00000000..f62d03d4 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemInternetConnectionEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemInternetConnectionEnum + +class SystemInternetConnectionEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemInternetConnectionEnum + //val modelInstance = SystemInternetConnectionEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemMeterStatusEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemMeterStatusEnumTest.kt new file mode 100644 index 00000000..a9e4e469 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemMeterStatusEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemMeterStatusEnum + +class SystemMeterStatusEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemMeterStatusEnum + //val modelInstance = SystemMeterStatusEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsAddressTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsAddressTest.kt new file mode 100644 index 00000000..5762d3f1 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsAddressTest.kt @@ -0,0 +1,65 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemParamsAddress + +class SystemParamsAddressTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemParamsAddress + //val modelInstance = SystemParamsAddress() + + // to test the property `street1` + should("test street1") { + // uncomment below to test the property + //modelInstance.street1 shouldBe ("TODO") + } + + // to test the property `city` + should("test city") { + // uncomment below to test the property + //modelInstance.city shouldBe ("TODO") + } + + // to test the property `state` + should("test state") { + // uncomment below to test the property + //modelInstance.state shouldBe ("TODO") + } + + // to test the property `country` + should("test country") { + // uncomment below to test the property + //modelInstance.country shouldBe ("TODO") + } + + // to test the property `postalCode` + should("test postalCode") { + // uncomment below to test the property + //modelInstance.postalCode shouldBe ("TODO") + } + + // to test the property `street2` + should("test street2") { + // uncomment below to test the property + //modelInstance.street2 shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsEnchargeInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsEnchargeInnerTest.kt new file mode 100644 index 00000000..82d5b703 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsEnchargeInnerTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemParamsEnchargeInner + +class SystemParamsEnchargeInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemParamsEnchargeInner + //val modelInstance = SystemParamsEnchargeInner() + + // to test the property `envoySerialNumber` - Envoy serial number. + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `enchargeSerialNumbers` - Encharge serial numbers. + should("test enchargeSerialNumbers") { + // uncomment below to test the property + //modelInstance.enchargeSerialNumbers shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsEnpowerInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsEnpowerInnerTest.kt new file mode 100644 index 00000000..216e7864 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsEnpowerInnerTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemParamsEnpowerInner + +class SystemParamsEnpowerInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemParamsEnpowerInner + //val modelInstance = SystemParamsEnpowerInner() + + // to test the property `envoySerialNumber` - Envoy serial number. + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `enpowerSerialNumbers` - Enpower serial numbers. + should("test enpowerSerialNumbers") { + // uncomment below to test the property + //modelInstance.enpowerSerialNumbers shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsTest.kt new file mode 100644 index 00000000..d2651524 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemParamsTest.kt @@ -0,0 +1,278 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemParams +import enlighten.commissioning.models.GetPartnerActivationsResponseSystemsInnerAuthorizedSubcontractorsInner +import enlighten.commissioning.models.SystemArrayTypeEnum +import enlighten.commissioning.models.SystemAttachmentTypeEnum +import enlighten.commissioning.models.SystemInternetConnectionEnum +import enlighten.commissioning.models.SystemParamsAddress +import enlighten.commissioning.models.SystemParamsEnchargeInner +import enlighten.commissioning.models.SystemParamsEnpowerInner +import enlighten.commissioning.models.SystemSourceEnum +import enlighten.commissioning.models.SystemTypeEnum + +class SystemParamsTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemParams + //val modelInstance = SystemParams() + + // to test the property `systemName` - Name of the system. Limit 255 characters. + should("test systemName") { + // uncomment below to test the property + //modelInstance.systemName shouldBe ("TODO") + } + + // to test the property `systemType` + should("test systemType") { + // uncomment below to test the property + //modelInstance.systemType shouldBe ("TODO") + } + + // to test the property `internetConnection` + should("test internetConnection") { + // uncomment below to test the property + //modelInstance.internetConnection shouldBe ("TODO") + } + + // to test the property `lease` - Whether the system is leased. Default false. + should("test lease") { + // uncomment below to test the property + //modelInstance.lease shouldBe ("TODO") + } + + // to test the property `operational` - Whether this system is permitted to operate. Default true. + should("test operational") { + // uncomment below to test the property + //modelInstance.operational shouldBe ("TODO") + } + + // to test the property `ownerId` - 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. + should("test ownerId") { + // uncomment below to test the property + //modelInstance.ownerId shouldBe ("TODO") + } + + // to test the property `hostId` - 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. + should("test hostId") { + // uncomment below to test the property + //modelInstance.hostId shouldBe ("TODO") + } + + // to test the property `authorizedSubcontractorId` - 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. + should("test authorizedSubcontractorId") { + // uncomment below to test the property + //modelInstance.authorizedSubcontractorId shouldBe ("TODO") + } + + // to test the property `installerId` - Enlighten ID of the installer of this system. Defaults to current user's company ID. + should("test installerId") { + // uncomment below to test the property + //modelInstance.installerId shouldBe ("TODO") + } + + // to test the property `maintainerName` - Name of the maintainer. + should("test maintainerName") { + // uncomment below to test the property + //modelInstance.maintainerName shouldBe ("TODO") + } + + // to test the property `maintainerId` - The Enlighten ID of the maintainer of this system. Defaults to current user's company ID. + should("test maintainerId") { + // uncomment below to test the property + //modelInstance.maintainerId shouldBe ("TODO") + } + + // to test the property `authorizedSubcontractors` - List of sub-contractors of this system. + should("test authorizedSubcontractors") { + // uncomment below to test the property + //modelInstance.authorizedSubcontractors shouldBe ("TODO") + } + + // to test the property `allowPublicAccess` - When true, the system will be eligible to appear in the public systems lists of Enphase and the system's installer. Default true. + should("test allowPublicAccess") { + // uncomment below to test the property + //modelInstance.allowPublicAccess shouldBe ("TODO") + } + + // to test the property `interconnectDate` - When the system was approved to connect to the grid. + should("test interconnectDate") { + // uncomment below to test the property + //modelInstance.interconnectDate shouldBe ("TODO") + } + + // to test the property `source` + should("test source") { + // uncomment below to test the property + //modelInstance.source shouldBe ("TODO") + } + + // to test the property `arrayType` + should("test arrayType") { + // uncomment below to test the property + //modelInstance.arrayType shouldBe ("TODO") + } + + // to test the property `attachmentType` + should("test attachmentType") { + // uncomment below to test the property + //modelInstance.attachmentType shouldBe ("TODO") + } + + // to test the property `ensembleEnvoy` - Specifies serial number of ensemble envoy in multi envoy system. + should("test ensembleEnvoy") { + // uncomment below to test the property + //modelInstance.ensembleEnvoy shouldBe ("TODO") + } + + // to test the property `gridProfile` - Grid profile to set on this system's microinverters. See GridProfiles API for how to retrieve a list of known profiles. + should("test gridProfile") { + // uncomment below to test the property + //modelInstance.gridProfile shouldBe ("TODO") + } + + // to test the property `requestedProfile` + should("test requestedProfile") { + // uncomment below to test the property + //modelInstance.requestedProfile shouldBe ("TODO") + } + + // to test the property `requestedReportFreq` + should("test requestedReportFreq") { + // uncomment below to test the property + //modelInstance.requestedReportFreq shouldBe ("TODO") + } + + // to test the property `voltage` - 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. + should("test voltage") { + // uncomment below to test the property + //modelInstance.voltage shouldBe ("TODO") + } + + // to test the property `envoySerialNumbers` - A list of Envoys installed on this system. + should("test envoySerialNumbers") { + // uncomment below to test the property + //modelInstance.envoySerialNumbers shouldBe ("TODO") + } + + // to test the property `pvManufacturer` - Enlighten ID of the PV manufacturer associated with the PV model installed on the system. See PvManufacturers for how to retrieve PV manufacturer IDs. + should("test pvManufacturer") { + // uncomment below to test the property + //modelInstance.pvManufacturer shouldBe ("TODO") + } + + // to test the property `pvManufacturerName` - Name of the Custom PV module manufacturer associated with the system. + should("test pvManufacturerName") { + // uncomment below to test the property + //modelInstance.pvManufacturerName shouldBe ("TODO") + } + + // to test the property `pvModel` - Enlighten ID of the PV model installed on the system. See PvManufacturers and PvModels for how to retrieve PV model IDs. + should("test pvModel") { + // uncomment below to test the property + //modelInstance.pvModel shouldBe ("TODO") + } + + // to test the property `pvModelName` - Name of the Custom PV module model associated with the system. + should("test pvModelName") { + // uncomment below to test the property + //modelInstance.pvModelName shouldBe ("TODO") + } + + // to test the property `pvModulePowerRating` - Power rating (in W) of the PV module installed on the system. + should("test pvModulePowerRating") { + // uncomment below to test the property + //modelInstance.pvModulePowerRating shouldBe ("TODO") + } + + // to test the property `pvModuleType` - Type ID of the PV module installed on the system. 1 -> 'Mono-facial', 2 -> 'Bi-facial', 3 -> 'Split cell', 4 -> 'Other'. + should("test pvModuleType") { + // uncomment below to test the property + //modelInstance.pvModuleType shouldBe ("TODO") + } + + // to test the property `expectedEnvoyCount` - Total envoys the system is supposed to have. + should("test expectedEnvoyCount") { + // uncomment below to test the property + //modelInstance.expectedEnvoyCount shouldBe ("TODO") + } + + // to test the property `expectedPcuCount` - Total PCUs the system is supposed to have. + should("test expectedPcuCount") { + // uncomment below to test the property + //modelInstance.expectedPcuCount shouldBe ("TODO") + } + + // to test the property `expectedAcbCount` - Total acbs the system is supposed to have. + should("test expectedAcbCount") { + // uncomment below to test the property + //modelInstance.expectedAcbCount shouldBe ("TODO") + } + + // to test the property `expectedNsrCount` - Total nsrs the system is supposed to have. + should("test expectedNsrCount") { + // uncomment below to test the property + //modelInstance.expectedNsrCount shouldBe ("TODO") + } + + // to test the property `expectedMeterCount` - Total meters the system is supposed to have. + should("test expectedMeterCount") { + // uncomment below to test the property + //modelInstance.expectedMeterCount shouldBe ("TODO") + } + + // to test the property `expectedEnchargeCount` - Total encharges the system is supposed to have. + should("test expectedEnchargeCount") { + // uncomment below to test the property + //modelInstance.expectedEnchargeCount shouldBe ("TODO") + } + + // to test the property `expectedEnpowerCount` - Total enpowers the system is supposed to have. + should("test expectedEnpowerCount") { + // uncomment below to test the property + //modelInstance.expectedEnpowerCount shouldBe ("TODO") + } + + // to test the property `reference` - 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. + should("test reference") { + // uncomment below to test the property + //modelInstance.reference shouldBe ("TODO") + } + + // to test the property `encharge` - Encharge detail. + should("test encharge") { + // uncomment below to test the property + //modelInstance.encharge shouldBe ("TODO") + } + + // to test the property `enpower` - Enpower detail. + should("test enpower") { + // uncomment below to test the property + //modelInstance.enpower shouldBe ("TODO") + } + + // to test the property `address` + should("test address") { + // uncomment below to test the property + //modelInstance.address shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemProductionModeEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemProductionModeEnumTest.kt new file mode 100644 index 00000000..ea533cda --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemProductionModeEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemProductionModeEnum + +class SystemProductionModeEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemProductionModeEnum + //val modelInstance = SystemProductionModeEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemSourceEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemSourceEnumTest.kt new file mode 100644 index 00000000..907d1018 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemSourceEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemSourceEnum + +class SystemSourceEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemSourceEnum + //val modelInstance = SystemSourceEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemStageEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemStageEnumTest.kt new file mode 100644 index 00000000..17964fb0 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemStageEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemStageEnum + +class SystemStageEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemStageEnum + //val modelInstance = SystemStageEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemTypeEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemTypeEnumTest.kt new file mode 100644 index 00000000..87f40fc2 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/SystemTypeEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.SystemTypeEnum + +class SystemTypeEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemTypeEnum + //val modelInstance = SystemTypeEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerPeriodsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerPeriodsInnerTest.kt new file mode 100644 index 00000000..c038b6fd --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerPeriodsInnerTest.kt @@ -0,0 +1,53 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.TariffSeasonsInnerDaysInnerPeriodsInner + +class TariffSeasonsInnerDaysInnerPeriodsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of TariffSeasonsInnerDaysInnerPeriodsInner + //val modelInstance = TariffSeasonsInnerDaysInnerPeriodsInner() + + // to test the property `id` - Period ID. e.g='period_1'. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `start` - Period start. e.g=0. + should("test start") { + // uncomment below to test the property + //modelInstance.start shouldBe ("TODO") + } + + // to test the property `rate` - Period rate. e.g=0.0. + should("test rate") { + // uncomment below to test the property + //modelInstance.rate shouldBe ("TODO") + } + + // to test the property `error` - Dynamic fields will appear. + should("test error") { + // uncomment below to test the property + //modelInstance.error shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerTest.kt new file mode 100644 index 00000000..5c36f986 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerDaysInnerTest.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.TariffSeasonsInnerDaysInner +import enlighten.commissioning.models.TariffSeasonsInnerDaysInnerPeriodsInner + +class TariffSeasonsInnerDaysInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of TariffSeasonsInnerDaysInner + //val modelInstance = TariffSeasonsInnerDaysInner() + + // to test the property `id` - ToU days ID. e.g='all_days'. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `days` - Comma separated days. e.g='Sun,Mon,Tue,Wed,Thu,Fri,Sat'. + should("test days") { + // uncomment below to test the property + //modelInstance.days shouldBe ("TODO") + } + + // to test the property `mustChargeStart` - Must charge start field. e.g=0. + should("test mustChargeStart") { + // uncomment below to test the property + //modelInstance.mustChargeStart shouldBe ("TODO") + } + + // to test the property `mustChargeDuration` - Must charge duration field. e.g=0. + should("test mustChargeDuration") { + // uncomment below to test the property + //modelInstance.mustChargeDuration shouldBe ("TODO") + } + + // to test the property `periods` - Periods. + should("test periods") { + // uncomment below to test the property + //modelInstance.periods shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerTest.kt new file mode 100644 index 00000000..b058623b --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSeasonsInnerTest.kt @@ -0,0 +1,60 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.TariffSeasonsInner +import enlighten.commissioning.models.TariffSeasonsInnerDaysInner + +class TariffSeasonsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of TariffSeasonsInner + //val modelInstance = TariffSeasonsInner() + + // to test the property `id` - ToU year ID. e.g='all_year_long'. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `start` - Start of season. e.g='1/1'. + should("test start") { + // uncomment below to test the property + //modelInstance.start shouldBe ("TODO") + } + + // to test the property `days` - ToU seasons. + should("test days") { + // uncomment below to test the property + //modelInstance.days shouldBe ("TODO") + } + + // to test the property `enableChargeFromGrid` + should("test enableChargeFromGrid") { + // uncomment below to test the property + //modelInstance.enableChargeFromGrid shouldBe ("TODO") + } + + // to test the property `enableDischargeToGrid` + should("test enableDischargeToGrid") { + // uncomment below to test the property + //modelInstance.enableDischargeToGrid shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffCurrencyTypeTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffCurrencyTypeTest.kt new file mode 100644 index 00000000..df7872f6 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffCurrencyTypeTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.TariffSettingsTariffCurrencyType + +class TariffSettingsTariffCurrencyTypeTest : ShouldSpec() { + init { + // uncomment below to create an instance of TariffSettingsTariffCurrencyType + //val modelInstance = TariffSettingsTariffCurrencyType() + + // to test the property `code` - Tariff currency code. e.g='USD'. + should("test code") { + // uncomment below to test the property + //modelInstance.code shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffSingleRateTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffSingleRateTest.kt new file mode 100644 index 00000000..b94df58e --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffSingleRateTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.TariffSettingsTariffSingleRate + +class TariffSettingsTariffSingleRateTest : ShouldSpec() { + init { + // uncomment below to create an instance of TariffSettingsTariffSingleRate + //val modelInstance = TariffSettingsTariffSingleRate() + + // to test the property `rate` - Usage rate. e.g=0.0. + should("test rate") { + // uncomment below to test the property + //modelInstance.rate shouldBe ("TODO") + } + + // to test the property `sell` - FiT rate. e.g=0.0. + should("test sell") { + // uncomment below to test the property + //modelInstance.sell shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffTest.kt new file mode 100644 index 00000000..46ffae0c --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTariffTest.kt @@ -0,0 +1,56 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.TariffSettingsTariff +import enlighten.commissioning.models.TariffSeasonsInner +import enlighten.commissioning.models.TariffSettingsTariffCurrencyType +import enlighten.commissioning.models.TariffSettingsTariffSingleRate + +class TariffSettingsTariffTest : ShouldSpec() { + init { + // uncomment below to create an instance of TariffSettingsTariff + //val modelInstance = TariffSettingsTariff() + + // to test the property `currencyType` + should("test currencyType") { + // uncomment below to test the property + //modelInstance.currencyType shouldBe ("TODO") + } + + // to test the property `singleRate` + should("test singleRate") { + // uncomment below to test the property + //modelInstance.singleRate shouldBe ("TODO") + } + + // to test the property `seasons` - ToU seasons. + should("test seasons") { + // uncomment below to test the property + //modelInstance.seasons shouldBe ("TODO") + } + + // to test the property `seasonsSell` - ToU seasons. + should("test seasonsSell") { + // uncomment below to test the property + //modelInstance.seasonsSell shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTest.kt new file mode 100644 index 00000000..fec3eb4b --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TariffSettingsTest.kt @@ -0,0 +1,43 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.TariffSettings +import enlighten.commissioning.models.TariffSettingsTariff +import enlighten.commissioning.models.UpdateSystemTariffSettingsResponseTask + +class TariffSettingsTest : ShouldSpec() { + init { + // uncomment below to create an instance of TariffSettings + //val modelInstance = TariffSettings() + + // to test the property `tariff` + should("test tariff") { + // uncomment below to test the property + //modelInstance.tariff shouldBe ("TODO") + } + + // to test the property `task` + should("test task") { + // uncomment below to test the property + //modelInstance.task shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TooManyRequestsErrorTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TooManyRequestsErrorTest.kt new file mode 100644 index 00000000..6541772a --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/TooManyRequestsErrorTest.kt @@ -0,0 +1,65 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.TooManyRequestsError + +class TooManyRequestsErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of TooManyRequestsError + //val modelInstance = TooManyRequestsError() + + // to test the property `reason` - Response code. + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + // to test the property `period` - Quota exceeded for minute/month. + should("test period") { + // uncomment below to test the property + //modelInstance.period shouldBe ("TODO") + } + + // to test the property `periodStart` - Starting period timestamp. + should("test periodStart") { + // uncomment below to test the property + //modelInstance.periodStart shouldBe ("TODO") + } + + // to test the property `periodEnd` - Ending period timestamp. + should("test periodEnd") { + // uncomment below to test the property + //modelInstance.periodEnd shouldBe ("TODO") + } + + // to test the property `limit` - Limit count for the period. + should("test limit") { + // uncomment below to test the property + //modelInstance.limit shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UnprocessableEntityErrorTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UnprocessableEntityErrorTest.kt new file mode 100644 index 00000000..b452cdaf --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UnprocessableEntityErrorTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UnprocessableEntityError + +class UnprocessableEntityErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of UnprocessableEntityError + //val modelInstance = UnprocessableEntityError() + + // to test the property `errorCode` + should("test errorCode") { + // uncomment below to test the property + //modelInstance.errorCode shouldBe ("TODO") + } + + // to test the property `errorMessages` + should("test errorMessages") { + // uncomment below to test the property + //modelInstance.errorMessages shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateActivationEstimateRequestTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateActivationEstimateRequestTest.kt new file mode 100644 index 00000000..5abcb7f0 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateActivationEstimateRequestTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UpdateActivationEstimateRequest + +class UpdateActivationEstimateRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateActivationEstimateRequest + //val modelInstance = UpdateActivationEstimateRequest() + + // to test the property `degradeFactor` - Annual production degradation factor for the system, from year 0 of the system's life. Must be 0.0% or higher. + should("test degradeFactor") { + // uncomment below to test the property + //modelInstance.degradeFactor shouldBe ("TODO") + } + + // to test the property `monthEstimates` - 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. + should("test monthEstimates") { + // uncomment below to test the property + //modelInstance.monthEstimates shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateCompanyUserRequestTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateCompanyUserRequestTest.kt new file mode 100644 index 00000000..2081e9d7 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateCompanyUserRequestTest.kt @@ -0,0 +1,65 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UpdateCompanyUserRequest + +class UpdateCompanyUserRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateCompanyUserRequest + //val modelInstance = UpdateCompanyUserRequest() + + // to test the property `companyId` - 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. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `email` - Email address of the user. Must be unique within Enlighten. Required. + should("test email") { + // uncomment below to test the property + //modelInstance.email shouldBe ("TODO") + } + + // to test the property `enlightenEmails` - Whether the user receives automated emails from Enlighten. Default false. + should("test enlightenEmails") { + // uncomment below to test the property + //modelInstance.enlightenEmails shouldBe ("TODO") + } + + // to test the property `firstName` - User's first name. Required. + should("test firstName") { + // uncomment below to test the property + //modelInstance.firstName shouldBe ("TODO") + } + + // to test the property `lastName` - User's last name. Required. + should("test lastName") { + // uncomment below to test the property + //modelInstance.lastName shouldBe ("TODO") + } + + // to test the property `phone` - Telephone number of the user. Optional. + should("test phone") { + // uncomment below to test the property + //modelInstance.phone shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemArraysRequestTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemArraysRequestTest.kt new file mode 100644 index 00000000..d326cf32 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemArraysRequestTest.kt @@ -0,0 +1,42 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UpdateSystemArraysRequest +import enlighten.commissioning.models.ArrayParams + +class UpdateSystemArraysRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateSystemArraysRequest + //val modelInstance = UpdateSystemArraysRequest() + + // to test the property `angle` - Angle of the system. + should("test angle") { + // uncomment below to test the property + //modelInstance.angle shouldBe ("TODO") + } + + // to test the property `arrays` + should("test arrays") { + // uncomment below to test the property + //modelInstance.arrays shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemMeterResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemMeterResponseTest.kt new file mode 100644 index 00000000..f41b53a0 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemMeterResponseTest.kt @@ -0,0 +1,59 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UpdateSystemMeterResponse + +class UpdateSystemMeterResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateSystemMeterResponse + //val modelInstance = UpdateSystemMeterResponse() + + // to test the property `serialNumber` - Meter serial number. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `manufacturer` - Name of the manufacturer. + should("test manufacturer") { + // uncomment below to test the property + //modelInstance.manufacturer shouldBe ("TODO") + } + + // to test the property `model` - Model. + should("test model") { + // uncomment below to test the property + //modelInstance.model shouldBe ("TODO") + } + + // to test the property `type` - Meter type. + should("test type") { + // uncomment below to test the property + //modelInstance.type shouldBe ("TODO") + } + + // to test the property `operationalDate` - Operational date. + should("test operationalDate") { + // uncomment below to test the property + //modelInstance.operationalDate shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTaskTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTaskTest.kt new file mode 100644 index 00000000..78a51cc8 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTaskTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UpdateSystemTariffSettingsResponseTask + +class UpdateSystemTariffSettingsResponseTaskTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateSystemTariffSettingsResponseTask + //val modelInstance = UpdateSystemTariffSettingsResponseTask() + + // to test the property `status` - Status of latest tariff update task. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `createdAt` - Created time of latest tariff update task. + should("test createdAt") { + // uncomment below to test the property + //modelInstance.createdAt shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTest.kt new file mode 100644 index 00000000..2e8a783d --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UpdateSystemTariffSettingsResponseTest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UpdateSystemTariffSettingsResponse +import enlighten.commissioning.models.UpdateSystemTariffSettingsResponseTask + +class UpdateSystemTariffSettingsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateSystemTariffSettingsResponse + //val modelInstance = UpdateSystemTariffSettingsResponse() + + // to test the property `task` + should("test task") { + // uncomment below to test the property + //modelInstance.task shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserExpandEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserExpandEnumTest.kt new file mode 100644 index 00000000..bbff8839 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserExpandEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UserExpandEnum + +class UserExpandEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of UserExpandEnum + //val modelInstance = UserExpandEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserParamsTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserParamsTest.kt new file mode 100644 index 00000000..c32f107c --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserParamsTest.kt @@ -0,0 +1,71 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UserParams + +class UserParamsTest : ShouldSpec() { + init { + // uncomment below to create an instance of UserParams + //val modelInstance = UserParams() + + // to test the property `companyId` - 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. + should("test companyId") { + // uncomment below to test the property + //modelInstance.companyId shouldBe ("TODO") + } + + // to test the property `email` - Email address of the user. Must be unique within Enlighten. Required. + should("test email") { + // uncomment below to test the property + //modelInstance.email shouldBe ("TODO") + } + + // to test the property `enlightenEmails` - Whether the user receives automated emails from Enlighten. Default false. + should("test enlightenEmails") { + // uncomment below to test the property + //modelInstance.enlightenEmails shouldBe ("TODO") + } + + // to test the property `enlightenView` - 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'. + should("test enlightenView") { + // uncomment below to test the property + //modelInstance.enlightenView shouldBe ("TODO") + } + + // to test the property `firstName` - User's first name. Required. + should("test firstName") { + // uncomment below to test the property + //modelInstance.firstName shouldBe ("TODO") + } + + // to test the property `lastName` - User's last name. Required. + should("test lastName") { + // uncomment below to test the property + //modelInstance.lastName shouldBe ("TODO") + } + + // to test the property `phone` - Telephone number of the user. Optional. + should("test phone") { + // uncomment below to test the property + //modelInstance.phone shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserRoleEnumTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserRoleEnumTest.kt new file mode 100644 index 00000000..453f6815 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserRoleEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.UserRoleEnum + +class UserRoleEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of UserRoleEnum + //val modelInstance = UserRoleEnum() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserTest.kt new file mode 100644 index 00000000..fc6bfefa --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/commissioning/models/UserTest.kt @@ -0,0 +1,103 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.commissioning.models.User +import enlighten.commissioning.models.Company +import enlighten.commissioning.models.UserRoleEnum + +class UserTest : ShouldSpec() { + init { + // uncomment below to create an instance of User + //val modelInstance = User() + + // to test the property `active` - Whether the user is allowed to log in to Enlighten. + should("test active") { + // uncomment below to test the property + //modelInstance.active shouldBe ("TODO") + } + + // to test the property `userRoles` - 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. + should("test userRoles") { + // uncomment below to test the property + //modelInstance.userRoles shouldBe ("TODO") + } + + // to test the property `email` - Email address of the user. + should("test email") { + // uncomment below to test the property + //modelInstance.email shouldBe ("TODO") + } + + // to test the property `enlightenEmails` - Whether the user receives automated emails from Enlighten. + should("test enlightenEmails") { + // uncomment below to test the property + //modelInstance.enlightenEmails shouldBe ("TODO") + } + + // to test the property `enlightenView` - Which view of Enlighten the user has. + should("test enlightenView") { + // uncomment below to test the property + //modelInstance.enlightenView shouldBe ("TODO") + } + + // to test the property `firstName` - User's first name. + should("test firstName") { + // uncomment below to test the property + //modelInstance.firstName shouldBe ("TODO") + } + + // to test the property `lastName` - User's last name. + should("test lastName") { + // uncomment below to test the property + //modelInstance.lastName shouldBe ("TODO") + } + + // to test the property `phone` - Telephone number of the user. + should("test phone") { + // uncomment below to test the property + //modelInstance.phone shouldBe ("TODO") + } + + // to test the property `uri` - URI to the show() method for the user. System-generated. + should("test uri") { + // uncomment below to test the property + //modelInstance.uri shouldBe ("TODO") + } + + // to test the property `userId` - Enlighten ID of the user. System-generated. + should("test userId") { + // uncomment below to test the property + //modelInstance.userId shouldBe ("TODO") + } + + // to test the property `updatedAt` - Last updated date and time in Epoch format. + should("test updatedAt") { + // uncomment below to test the property + //modelInstance.updatedAt shouldBe ("TODO") + } + + // to test the property `company` + should("test company") { + // uncomment below to test the property + //modelInstance.company shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ClientErrorTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ClientErrorTest.kt new file mode 100644 index 00000000..f6a49f5a --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ClientErrorTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ClientError + +class ClientErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of ClientError + //val modelInstance = ClientError() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ConflictErrorTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConflictErrorTest.kt new file mode 100644 index 00000000..46fe6c3e --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConflictErrorTest.kt @@ -0,0 +1,65 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ConflictError + +class ConflictErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of ConflictError + //val modelInstance = ConflictError() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + // to test the property `period` + should("test period") { + // uncomment below to test the property + //modelInstance.period shouldBe ("TODO") + } + + // to test the property `periodStart` + should("test periodStart") { + // uncomment below to test the property + //modelInstance.periodStart shouldBe ("TODO") + } + + // to test the property `periodEnd` + should("test periodEnd") { + // uncomment below to test the property + //modelInstance.periodEnd shouldBe ("TODO") + } + + // to test the property `limit` + should("test limit") { + // uncomment below to test the property + //modelInstance.limit shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ConnectionTypeTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConnectionTypeTest.kt new file mode 100644 index 00000000..41c3d2ab --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConnectionTypeTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ConnectionType + +class ConnectionTypeTest : ShouldSpec() { + init { + // uncomment below to create an instance of ConnectionType + //val modelInstance = ConnectionType() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionLifetimeResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionLifetimeResponseTest.kt new file mode 100644 index 00000000..ca126609 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionLifetimeResponseTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ConsumptionLifetimeResponse +import enlighten.models.Meta + +class ConsumptionLifetimeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of ConsumptionLifetimeResponse + //val modelInstance = ConsumptionLifetimeResponse() + + // to test the property `startDate` - 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. + should("test startDate") { + // uncomment below to test the property + //modelInstance.startDate shouldBe ("TODO") + } + + // to test the property `consumption` - An array of consumption measurements, one for each day since consumption metering began, or one for each day of the requested period. + should("test consumption") { + // uncomment below to test the property + //modelInstance.consumption shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + // to test the property `systemId` - The identifier of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..0e1a27ac --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionStatsResponseIntervalsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ConsumptionStatsResponseIntervalsInner + +class ConsumptionStatsResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of ConsumptionStatsResponseIntervalsInner + //val modelInstance = ConsumptionStatsResponseIntervalsInner() + + // to test the property `endAt` - 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). + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `enwh` - Energy consumed during this interval, in Watt-hours. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of consumption meters that reported data for this interval at the time of the request. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionStatsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionStatsResponseTest.kt new file mode 100644 index 00000000..23fc1682 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ConsumptionStatsResponseTest.kt @@ -0,0 +1,55 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ConsumptionStatsResponse +import enlighten.models.ConsumptionStatsResponseIntervalsInner +import enlighten.models.Meta + +class ConsumptionStatsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of ConsumptionStatsResponse + //val modelInstance = ConsumptionStatsResponse() + + // to test the property `systemId` - Enlighten ID for this system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of active consumption meters for this system. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + // to test the property `intervals` - A list of intervals between the requested start and end times. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/EnergyLifetimeResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/EnergyLifetimeResponseTest.kt new file mode 100644 index 00000000..d1400ab3 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/EnergyLifetimeResponseTest.kt @@ -0,0 +1,72 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.EnergyLifetimeResponse +import enlighten.models.Meta + +class EnergyLifetimeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of EnergyLifetimeResponse + //val modelInstance = EnergyLifetimeResponse() + + // to test the property `startDate` - 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. + should("test startDate") { + // uncomment below to test the property + //modelInstance.startDate shouldBe ("TODO") + } + + // to test the property `systemId` - The identifier of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `production` - 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. + should("test production") { + // uncomment below to test the property + //modelInstance.production shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + // to test the property `microProduction` + should("test microProduction") { + // uncomment below to test the property + //modelInstance.microProduction shouldBe ("TODO") + } + + // to test the property `meterProduction` + should("test meterProduction") { + // uncomment below to test the property + //modelInstance.meterProduction shouldBe ("TODO") + } + + // to test the property `meterStartDate` - 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. + should("test meterStartDate") { + // uncomment below to test the property + //modelInstance.meterStartDate shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/EnvoysResponseEnvoysInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/EnvoysResponseEnvoysInnerTest.kt new file mode 100644 index 00000000..028dde68 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/EnvoysResponseEnvoysInnerTest.kt @@ -0,0 +1,65 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.EnvoysResponseEnvoysInner + +class EnvoysResponseEnvoysInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of EnvoysResponseEnvoysInner + //val modelInstance = EnvoysResponseEnvoysInner() + + // to test the property `envoyId` - The Enlighten ID of the Envoy. + should("test envoyId") { + // uncomment below to test the property + //modelInstance.envoyId shouldBe ("TODO") + } + + // to test the property `lastReportAt` - 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. + should("test lastReportAt") { + // uncomment below to test the property + //modelInstance.lastReportAt shouldBe ("TODO") + } + + // to test the property `name` - The human-friendly name of this Envoy. + should("test name") { + // uncomment below to test the property + //modelInstance.name shouldBe ("TODO") + } + + // to test the property `partNumber` - The Enphase part number of this Envoy. + should("test partNumber") { + // uncomment below to test the property + //modelInstance.partNumber shouldBe ("TODO") + } + + // to test the property `serialNumber` - The serial number of this Envoy. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `status` - The current status of this Envoy. * `normal` - The Envoy is operating normally. * `comm` - The Envoy is not communicating to Enlighten. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/EnvoysResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/EnvoysResponseTest.kt new file mode 100644 index 00000000..e1f741c1 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/EnvoysResponseTest.kt @@ -0,0 +1,42 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.EnvoysResponse +import enlighten.models.EnvoysResponseEnvoysInner + +class EnvoysResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of EnvoysResponse + //val modelInstance = EnvoysResponse() + + // to test the property `systemId` - The identifier of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `envoys` - A list of active Envoys on this system. + should("test envoys") { + // uncomment below to test the property + //modelInstance.envoys shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseEnvoysInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseEnvoysInnerTest.kt new file mode 100644 index 00000000..57772232 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseEnvoysInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.InventoryResponseEnvoysInner + +class InventoryResponseEnvoysInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of InventoryResponseEnvoysInner + //val modelInstance = InventoryResponseEnvoysInner() + + // to test the property `sn` + should("test sn") { + // uncomment below to test the property + //modelInstance.sn shouldBe ("TODO") + } + + // to test the property `model` + should("test model") { + // uncomment below to test the property + //modelInstance.model shouldBe ("TODO") + } + + // to test the property `sku` + should("test sku") { + // uncomment below to test the property + //modelInstance.sku shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseMetersInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseMetersInnerTest.kt new file mode 100644 index 00000000..7f640a1c --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseMetersInnerTest.kt @@ -0,0 +1,59 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.InventoryResponseMetersInner + +class InventoryResponseMetersInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of InventoryResponseMetersInner + //val modelInstance = InventoryResponseMetersInner() + + // to test the property `sn` + should("test sn") { + // uncomment below to test the property + //modelInstance.sn shouldBe ("TODO") + } + + // to test the property `manufacturer` + should("test manufacturer") { + // uncomment below to test the property + //modelInstance.manufacturer shouldBe ("TODO") + } + + // to test the property `model` + should("test model") { + // uncomment below to test the property + //modelInstance.model shouldBe ("TODO") + } + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `state` + should("test state") { + // uncomment below to test the property + //modelInstance.state shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseTest.kt new file mode 100644 index 00000000..5aa8b99d --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/InventoryResponseTest.kt @@ -0,0 +1,62 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.InventoryResponse +import enlighten.models.InventoryResponseEnvoysInner +import enlighten.models.InventoryResponseMetersInner +import enlighten.models.Meta + +class InventoryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of InventoryResponse + //val modelInstance = InventoryResponse() + + // to test the property `systemId` - Enlighten ID for this system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `inverters` - A list of inverters on this system, including serial and model numbers. + should("test inverters") { + // uncomment below to test the property + //modelInstance.inverters shouldBe ("TODO") + } + + // to test the property `meters` - A list of meters on this system, including serial number, manufacturer, and model number. + should("test meters") { + // uncomment below to test the property + //modelInstance.meters shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + // to test the property `envoys` - A list of Envoys on this system, including serial number. + should("test envoys") { + // uncomment below to test the property + //modelInstance.envoys shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergyTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergyTest.kt new file mode 100644 index 00000000..efa399ec --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergyTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy + +class InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergyTest : ShouldSpec() { + init { + // uncomment below to create an instance of InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy + //val modelInstance = InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy() + + // to test the property ``value`` + should("test `value`") { + // uncomment below to test the property + //modelInstance.`value` shouldBe ("TODO") + } + + // to test the property `units` + should("test units") { + // uncomment below to test the property + //modelInstance.units shouldBe ("TODO") + } + + // to test the property `precision` + should("test precision") { + // uncomment below to test the property + //modelInstance.precision shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProducedTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProducedTest.kt new file mode 100644 index 00000000..179ca13f --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProducedTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced + +class InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProducedTest : ShouldSpec() { + init { + // uncomment below to create an instance of InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced + //val modelInstance = InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced() + + // to test the property ``value`` + should("test `value`") { + // uncomment below to test the property + //modelInstance.`value` shouldBe ("TODO") + } + + // to test the property `units` + should("test units") { + // uncomment below to test the property + //modelInstance.units shouldBe ("TODO") + } + + // to test the property `precision` + should("test precision") { + // uncomment below to test the property + //modelInstance.precision shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerTest.kt new file mode 100644 index 00000000..599124ed --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerTest.kt @@ -0,0 +1,109 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerEnergy +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerPowerProduced + +class InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner + //val modelInstance = InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner() + + // to test the property `id` + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `model` - Model number of this Microinverter. + should("test model") { + // uncomment below to test the property + //modelInstance.model shouldBe ("TODO") + } + + // to test the property `partNumber` - The Enphase part number of this Microinverter. + should("test partNumber") { + // uncomment below to test the property + //modelInstance.partNumber shouldBe ("TODO") + } + + // to test the property `serialNumber` - The serial number of this Microinverter. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `sku` + should("test sku") { + // uncomment below to test the property + //modelInstance.sku shouldBe ("TODO") + } + + // to test the property `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. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `powerProduced` + should("test powerProduced") { + // uncomment below to test the property + //modelInstance.powerProduced shouldBe ("TODO") + } + + // to test the property `procLoad` + should("test procLoad") { + // uncomment below to test the property + //modelInstance.procLoad shouldBe ("TODO") + } + + // to test the property `paramTable` + should("test paramTable") { + // uncomment below to test the property + //modelInstance.paramTable shouldBe ("TODO") + } + + // to test the property `envoySerialNumber` + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `energy` + should("test energy") { + // uncomment below to test the property + //modelInstance.energy shouldBe ("TODO") + } + + // to test the property `gridProfile` + should("test gridProfile") { + // uncomment below to test the property + //modelInstance.gridProfile shouldBe ("TODO") + } + + // to test the property `lastReportDate` - 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. + should("test lastReportDate") { + // uncomment below to test the property + //modelInstance.lastReportDate shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseTest.kt new file mode 100644 index 00000000..16c6b1c7 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/InvertersSummaryByEnvoyOrSiteResponseTest.kt @@ -0,0 +1,42 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponse +import enlighten.models.InvertersSummaryByEnvoyOrSiteResponseMicroInvertersInner + +class InvertersSummaryByEnvoyOrSiteResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of InvertersSummaryByEnvoyOrSiteResponse + //val modelInstance = InvertersSummaryByEnvoyOrSiteResponse() + + // to test the property `signalStrength` + should("test signalStrength") { + // uncomment below to test the property + //modelInstance.signalStrength shouldBe ("TODO") + } + + // to test the property `microInverters` - A list of active inverters on this system, including serial and model numbers. + should("test microInverters") { + // uncomment below to test the property + //modelInstance.microInverters shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/MetaTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/MetaTest.kt new file mode 100644 index 00000000..d479b500 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/MetaTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.Meta +import enlighten.models.Status + +class MetaTest : ShouldSpec() { + init { + // uncomment below to create an instance of Meta + //val modelInstance = Meta() + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `lastReportAt` + should("test lastReportAt") { + // uncomment below to test the property + //modelInstance.lastReportAt shouldBe ("TODO") + } + + // to test the property `lastEnergyAt` + should("test lastEnergyAt") { + // uncomment below to test the property + //modelInstance.lastEnergyAt shouldBe ("TODO") + } + + // to test the property `operationalAt` + should("test operationalAt") { + // uncomment below to test the property + //modelInstance.operationalAt shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInnerTest.kt new file mode 100644 index 00000000..9b4a6543 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/MonthlyProductionResponseMeterReadingsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.MonthlyProductionResponseMeterReadingsInner + +class MonthlyProductionResponseMeterReadingsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of MonthlyProductionResponseMeterReadingsInner + //val modelInstance = MonthlyProductionResponseMeterReadingsInner() + + // to test the property `serialNumber` + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `start` + should("test start") { + // uncomment below to test the property + //modelInstance.start shouldBe ("TODO") + } + + // to test the property `end` + should("test end") { + // uncomment below to test the property + //modelInstance.end shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/MonthlyProductionResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/MonthlyProductionResponseTest.kt new file mode 100644 index 00000000..a8769980 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/MonthlyProductionResponseTest.kt @@ -0,0 +1,67 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.MonthlyProductionResponse +import enlighten.models.Meta +import enlighten.models.MonthlyProductionResponseMeterReadingsInner + +class MonthlyProductionResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of MonthlyProductionResponse + //val modelInstance = MonthlyProductionResponse() + + // to test the property `systemId` - Enlighten ID for this system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `startDate` - 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). + should("test startDate") { + // uncomment below to test the property + //modelInstance.startDate shouldBe ("TODO") + } + + // to test the property `endDate` - Last day included in the reporting period. + should("test endDate") { + // uncomment below to test the property + //modelInstance.endDate shouldBe ("TODO") + } + + // to test the property `productionWh` - Total production for the requested period in Watt-hours. + should("test productionWh") { + // uncomment below to test the property + //modelInstance.productionWh shouldBe ("TODO") + } + + // to test the property `meterReadings` - 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. + should("test meterReadings") { + // uncomment below to test the property + //modelInstance.meterReadings shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/NotFoundErrorTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/NotFoundErrorTest.kt new file mode 100644 index 00000000..6bc7e374 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/NotFoundErrorTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.NotFoundError + +class NotFoundErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of NotFoundError + //val modelInstance = NotFoundError() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + // to test the property `errorMessages` + should("test errorMessages") { + // uncomment below to test the property + //modelInstance.errorMessages shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInnerTest.kt new file mode 100644 index 00000000..8dbe2fdb --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseMeterReadingsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ProductionMeterReadingsResponseMeterReadingsInner + +class ProductionMeterReadingsResponseMeterReadingsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of ProductionMeterReadingsResponseMeterReadingsInner + //val modelInstance = ProductionMeterReadingsResponseMeterReadingsInner() + + // to test the property `serialNumber` - The serial number of the meter. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property ``value`` - The odometer reading, in Watt-hours. + should("test `value`") { + // uncomment below to test the property + //modelInstance.`value` shouldBe ("TODO") + } + + // to test the property `readAt` - The time when the reading was taken, always prior or equal to the requested `end_at`. + should("test readAt") { + // uncomment below to test the property + //modelInstance.readAt shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseTest.kt new file mode 100644 index 00000000..65132b9b --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ProductionMeterReadingsResponseTest.kt @@ -0,0 +1,49 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ProductionMeterReadingsResponse +import enlighten.models.Meta +import enlighten.models.ProductionMeterReadingsResponseMeterReadingsInner + +class ProductionMeterReadingsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of ProductionMeterReadingsResponse + //val modelInstance = ProductionMeterReadingsResponse() + + // to test the property `systemId` + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `meterReadings` + should("test meterReadings") { + // uncomment below to test the property + //modelInstance.meterReadings shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseIntervalsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..56d43acc --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseIntervalsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.RgmStatsResponseIntervalsInner + +class RgmStatsResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of RgmStatsResponseIntervalsInner + //val modelInstance = RgmStatsResponseIntervalsInner() + + // to test the property `endAt` - 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). + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `whDel` - Energy delivered during this interval, in Watt-hours. + should("test whDel") { + // uncomment below to test the property + //modelInstance.whDel shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of revenue-grade meters that reported data for this interval at the time of the request. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt new file mode 100644 index 00000000..9c31ab99 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt @@ -0,0 +1,53 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.RgmStatsResponseMeterIntervalsInnerIntervalsInner + +class RgmStatsResponseMeterIntervalsInnerIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of RgmStatsResponseMeterIntervalsInnerIntervalsInner + //val modelInstance = RgmStatsResponseMeterIntervalsInnerIntervalsInner() + + // to test the property `channel` - The reporting channel identifier. + should("test channel") { + // uncomment below to test the property + //modelInstance.channel shouldBe ("TODO") + } + + // to test the property `endAt` - 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). + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `whDel` - Energy delivered during this interval, in Watt-hours. + should("test whDel") { + // uncomment below to test the property + //modelInstance.whDel shouldBe ("TODO") + } + + // to test the property `currW` - Energy delivered during this interval, in Watts. + should("test currW") { + // uncomment below to test the property + //modelInstance.currW shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerTest.kt new file mode 100644 index 00000000..586925c2 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseMeterIntervalsInnerTest.kt @@ -0,0 +1,48 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.RgmStatsResponseMeterIntervalsInner +import enlighten.models.RgmStatsResponseMeterIntervalsInnerIntervalsInner + +class RgmStatsResponseMeterIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of RgmStatsResponseMeterIntervalsInner + //val modelInstance = RgmStatsResponseMeterIntervalsInner() + + // to test the property `meterSerialNumber` - Serial number of the revenue grade meter. + should("test meterSerialNumber") { + // uncomment below to test the property + //modelInstance.meterSerialNumber shouldBe ("TODO") + } + + // to test the property `envoySerialNumber` - Serial number of the reporting envoy. + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `intervals` - Individual meter level interval. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseTest.kt new file mode 100644 index 00000000..35cfd82b --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/RgmStatsResponseTest.kt @@ -0,0 +1,62 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.RgmStatsResponse +import enlighten.models.Meta +import enlighten.models.RgmStatsResponseIntervalsInner +import enlighten.models.RgmStatsResponseMeterIntervalsInner + +class RgmStatsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of RgmStatsResponse + //val modelInstance = RgmStatsResponse() + + // to test the property `systemId` - Enlighten ID for this system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of active revenue-grade meters for this system. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + // to test the property `intervals` - A list of intervals between the requested start and end times. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + // to test the property `meterIntervals` - A list of intervals of a meter between the requested start and end times. + should("test meterIntervals") { + // uncomment below to test the property + //modelInstance.meterIntervals shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/SearchSystemIdResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/SearchSystemIdResponseTest.kt new file mode 100644 index 00000000..734cb336 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/SearchSystemIdResponseTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.SearchSystemIdResponse + +class SearchSystemIdResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of SearchSystemIdResponse + //val modelInstance = SearchSystemIdResponse() + + // to test the property `systemId` - The Enlighten ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/ServerErrorTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/ServerErrorTest.kt new file mode 100644 index 00000000..70eeb353 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/ServerErrorTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.ServerError + +class ServerErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of ServerError + //val modelInstance = ServerError() + + // to test the property `errorCode` + should("test errorCode") { + // uncomment below to test the property + //modelInstance.errorCode shouldBe ("TODO") + } + + // to test the property `errorMessages` + should("test errorMessages") { + // uncomment below to test the property + //modelInstance.errorMessages shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/StatsResponseIntervalsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/StatsResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..349d37e9 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/StatsResponseIntervalsInnerTest.kt @@ -0,0 +1,53 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.StatsResponseIntervalsInner + +class StatsResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of StatsResponseIntervalsInner + //val modelInstance = StatsResponseIntervalsInner() + + // to test the property `endAt` - 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). + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `powr` - Average power produced by microinverters during this interval, in Watts. + should("test powr") { + // uncomment below to test the property + //modelInstance.powr shouldBe ("TODO") + } + + // to test the property `enwh` - Energy produced by microinverters during this interval, in Watt-hours. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of microinverters that reported data for this interval at the time of the request. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/StatsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/StatsResponseTest.kt new file mode 100644 index 00000000..17113804 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/StatsResponseTest.kt @@ -0,0 +1,55 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.StatsResponse +import enlighten.models.Meta +import enlighten.models.StatsResponseIntervalsInner + +class StatsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of StatsResponse + //val modelInstance = StatsResponse() + + // to test the property `systemId` - Enlighten ID for this system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of active microinverters for this system. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + // to test the property `intervals` - A list of intervals between the requested start and end times. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/StatusTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/StatusTest.kt new file mode 100644 index 00000000..1570e730 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/StatusTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.Status + +class StatusTest : ShouldSpec() { + init { + // uncomment below to create an instance of Status + //val modelInstance = Status() + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/SummaryResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/SummaryResponseTest.kt new file mode 100644 index 00000000..7a48d67c --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/SummaryResponseTest.kt @@ -0,0 +1,102 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.SummaryResponse +import enlighten.models.Status + +class SummaryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of SummaryResponse + //val modelInstance = SummaryResponse() + + // to test the property `currentPower` - Current power production, in Watts. For historical requests, returns 0. + should("test currentPower") { + // uncomment below to test the property + //modelInstance.currentPower shouldBe ("TODO") + } + + // to test the property `energyLifetime` - Energy produced in the lifetime of the system, excluding the requested day, in Watt-hours. + should("test energyLifetime") { + // uncomment below to test the property + //modelInstance.energyLifetime shouldBe ("TODO") + } + + // to test the property `energyToday` - Energy produced on the requested day, in Watt-hours. + should("test energyToday") { + // uncomment below to test the property + //modelInstance.energyToday shouldBe ("TODO") + } + + // to test the property `lastIntervalEndAt` - 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. + should("test lastIntervalEndAt") { + // uncomment below to test the property + //modelInstance.lastIntervalEndAt shouldBe ("TODO") + } + + // to test the property `lastReportAt` - 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). + should("test lastReportAt") { + // uncomment below to test the property + //modelInstance.lastReportAt shouldBe ("TODO") + } + + // to test the property `modules` - Number of active (not retired) modules. For historical requests, returns 0. + should("test modules") { + // uncomment below to test the property + //modelInstance.modules shouldBe ("TODO") + } + + // to test the property `operationalAt` - 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). + should("test operationalAt") { + // uncomment below to test the property + //modelInstance.operationalAt shouldBe ("TODO") + } + + // to test the property `sizeW` - The size of the system, in Watts. For historical requests, returns 0. + should("test sizeW") { + // uncomment below to test the property + //modelInstance.sizeW shouldBe ("TODO") + } + + // to test the property `source` - Indicates whether the production of this system is measured by its microinverters (`microinverters`) or by revenue-grade meters (`meter`) installed on the system. + should("test source") { + // uncomment below to test the property + //modelInstance.source shouldBe ("TODO") + } + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `summaryDate` - 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). + should("test summaryDate") { + // uncomment below to test the property + //modelInstance.summaryDate shouldBe ("TODO") + } + + // to test the property `systemId` - The Enlighten ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/SystemsResponseSystemsInnerTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/SystemsResponseSystemsInnerTest.kt new file mode 100644 index 00000000..8819a21e --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/SystemsResponseSystemsInnerTest.kt @@ -0,0 +1,109 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.SystemsResponseSystemsInner +import enlighten.models.ConnectionType +import enlighten.models.Meta + +class SystemsResponseSystemsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemsResponseSystemsInner + //val modelInstance = SystemsResponseSystemsInner() + + // to test the property `systemId` - The Enlighten ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `systemName` - 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. + should("test systemName") { + // uncomment below to test the property + //modelInstance.systemName shouldBe ("TODO") + } + + // to test the property `systemPublicName` - The display name of the system. Use this when displaying the system name on a public list or view. + should("test systemPublicName") { + // uncomment below to test the property + //modelInstance.systemPublicName shouldBe ("TODO") + } + + // to test the property `country` - 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. + should("test country") { + // uncomment below to test the property + //modelInstance.country shouldBe ("TODO") + } + + // to test the property `state` - 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. + should("test state") { + // uncomment below to test the property + //modelInstance.state shouldBe ("TODO") + } + + // to test the property `city` - The name of the city where the system is located. + should("test city") { + // uncomment below to test the property + //modelInstance.city shouldBe ("TODO") + } + + // to test the property `postalCode` - The postal code where the system is located. + should("test postalCode") { + // uncomment below to test the property + //modelInstance.postalCode shouldBe ("TODO") + } + + // to test the property `timezone` - The timezone of the system. + should("test timezone") { + // uncomment below to test the property + //modelInstance.timezone shouldBe ("TODO") + } + + // to test the property `connectionType` + should("test connectionType") { + // uncomment below to test the property + //modelInstance.connectionType shouldBe ("TODO") + } + + // to test the property `status` - The current status of the system. You can find this and more in the `meta` property. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + // to test the property `reference` - 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. + should("test reference") { + // uncomment below to test the property + //modelInstance.reference shouldBe ("TODO") + } + + // to test the property `otherReferences` - If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned. + should("test otherReferences") { + // uncomment below to test the property + //modelInstance.otherReferences shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/SystemsResponseTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/SystemsResponseTest.kt new file mode 100644 index 00000000..f1fa3c36 --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/SystemsResponseTest.kt @@ -0,0 +1,42 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.SystemsResponse +import enlighten.models.SystemsResponseSystemsInner + +class SystemsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemsResponse + //val modelInstance = SystemsResponse() + + // to test the property `systems` + should("test systems") { + // uncomment below to test the property + //modelInstance.systems shouldBe ("TODO") + } + + // to test the property `next` + should("test next") { + // uncomment below to test the property + //modelInstance.next shouldBe ("TODO") + } + + } +} diff --git a/kotlin/commissioning/src/test/kotlin/enlighten/models/UnprocessableEntityErrorTest.kt b/kotlin/commissioning/src/test/kotlin/enlighten/models/UnprocessableEntityErrorTest.kt new file mode 100644 index 00000000..9eaf304f --- /dev/null +++ b/kotlin/commissioning/src/test/kotlin/enlighten/models/UnprocessableEntityErrorTest.kt @@ -0,0 +1,83 @@ +/** + * + * 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.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.models.UnprocessableEntityError + +class UnprocessableEntityErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of UnprocessableEntityError + //val modelInstance = UnprocessableEntityError() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + // to test the property `errorMessages` + should("test errorMessages") { + // uncomment below to test the property + //modelInstance.errorMessages shouldBe ("TODO") + } + + // to test the property `start` + should("test start") { + // uncomment below to test the property + //modelInstance.start shouldBe ("TODO") + } + + // to test the property `end` + should("test end") { + // uncomment below to test the property + //modelInstance.end shouldBe ("TODO") + } + + // to test the property `startAt` + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `firstInterval` + should("test firstInterval") { + // uncomment below to test the property + //modelInstance.firstInterval shouldBe ("TODO") + } + + // to test the property `lastInterval` + should("test lastInterval") { + // uncomment below to test the property + //modelInstance.lastInterval shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/.openapi-generator-ignore b/kotlin/monitoring/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/kotlin/monitoring/.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/monitoring/.openapi-generator/FILES b/kotlin/monitoring/.openapi-generator/FILES new file mode 100644 index 00000000..3a9f50f9 --- /dev/null +++ b/kotlin/monitoring/.openapi-generator/FILES @@ -0,0 +1,271 @@ +.openapi-generator-ignore +README.md +build.gradle +docs/BatteryDeviceTelemetry.md +docs/BatteryDeviceTelemetryIntervalsInner.md +docs/BatteryDeviceTelemetryIntervalsInnerCharge.md +docs/BatteryDeviceTelemetryIntervalsInnerDischarge.md +docs/BatteryDeviceTelemetryIntervalsInnerSoc.md +docs/BatterySettings.md +docs/ClientError.md +docs/DataTemporarilyUnavailableError.md +docs/DeviceLevelProductionMonitoringApi.md +docs/GetInvertersSummaryByEnvoyOrSiteResponseInner.md +docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.md +docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.md +docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.md +docs/GetSystemBatteryLifetimeResponse.md +docs/GetSystemBatteryTelemetryResponse.md +docs/GetSystemBatteryTelemetryResponseIntervalsInner.md +docs/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.md +docs/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.md +docs/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.md +docs/GetSystemConsumptionLifetimeResponse.md +docs/GetSystemConsumptionMeterTelemetryResponse.md +docs/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.md +docs/GetSystemDevicesResponse.md +docs/GetSystemDevicesResponseDevicesValueInner.md +docs/GetSystemDevicesResponseDevicesValueInnerCellularModem.md +docs/GetSystemEnergyExportLifetimeResponse.md +docs/GetSystemEnergyExportTelemetryResponse.md +docs/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.md +docs/GetSystemEnergyImportLifetimeResponse.md +docs/GetSystemEnergyImportTelemetryResponse.md +docs/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.md +docs/GetSystemEnergyLifetimeResponse.md +docs/GetSystemGridStatusSettingsResponse.md +docs/GetSystemMicroDeviceTelemetryResponse.md +docs/GetSystemMicroDeviceTelemetryResponseIntervalsInner.md +docs/GetSystemProductionMeterReadingsResponse.md +docs/GetSystemProductionMeterReadingsResponseMeterReadingsInner.md +docs/GetSystemProductionMeterTelemetryResponse.md +docs/GetSystemProductionMeterTelemetryResponseIntervalsInner.md +docs/GetSystemProductionMicroTelemetryResponse.md +docs/GetSystemProductionMicroTelemetryResponseIntervalsInner.md +docs/GetSystemRgmStatsResponse.md +docs/GetSystemRgmStatsResponseIntervalsInner.md +docs/GetSystemRgmStatsResponseMeterIntervalsInner.md +docs/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.md +docs/GetSystemSummaryResponse.md +docs/GetSystems500Response.md +docs/GetSystemsResponse.md +docs/InternalServerError.md +docs/LoadControlSettings.md +docs/LoadControlSettingsLoadControlDataInner.md +docs/Meta.md +docs/MethodNotAllowedError.md +docs/NotImplementedError.md +docs/RetrieveSystemIdResponse.md +docs/SearchSystemsRequest.md +docs/SearchSystemsRequestSystem.md +docs/SearchSystemsResponse.md +docs/SiteLevelConsumptionMonitoringApi.md +docs/SiteLevelProductionMonitoringApi.md +docs/StormGuardSettings.md +docs/StreamSystemLiveDataError.md +docs/StreamSystemLiveDataErrorError.md +docs/StreamSystemLiveDataResponse.md +docs/StreamSystemLiveDataResponseData.md +docs/StreamSystemLiveDataResponseDataData.md +docs/StreamingApi.md +docs/SystemAttachmentTypeEnum.md +docs/SystemConfigurationsApi.md +docs/SystemConnectionTypeEnum.md +docs/SystemDetails.md +docs/SystemDetailsAddress.md +docs/SystemDetailsApi.md +docs/SystemEnergyLifetimeProductionEnum.md +docs/SystemPublicNameEnum.md +docs/SystemSortByEnum.md +docs/SystemStatusEnum.md +docs/TelemetryGranularityEnum.md +docs/TooManyRequestsError.md +docs/UpdateSystemBatterySettingsRequest.md +docs/UpdateSystemLoadControlSettingsRequest.md +docs/UpdateSystemStormGuardSettingsRequest.md +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +settings.gradle +src/main/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApi.kt +src/main/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApi.kt +src/main/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApi.kt +src/main/kotlin/enlighten/monitoring/apis/StreamingApi.kt +src/main/kotlin/enlighten/monitoring/apis/SystemConfigurationsApi.kt +src/main/kotlin/enlighten/monitoring/apis/SystemDetailsApi.kt +src/main/kotlin/enlighten/monitoring/infrastructure/ApiAbstractions.kt +src/main/kotlin/enlighten/monitoring/infrastructure/ApiClient.kt +src/main/kotlin/enlighten/monitoring/infrastructure/ApiResponse.kt +src/main/kotlin/enlighten/monitoring/infrastructure/BigDecimalAdapter.kt +src/main/kotlin/enlighten/monitoring/infrastructure/BigIntegerAdapter.kt +src/main/kotlin/enlighten/monitoring/infrastructure/ByteArrayAdapter.kt +src/main/kotlin/enlighten/monitoring/infrastructure/Errors.kt +src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateAdapter.kt +src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateTimeAdapter.kt +src/main/kotlin/enlighten/monitoring/infrastructure/OffsetDateTimeAdapter.kt +src/main/kotlin/enlighten/monitoring/infrastructure/PartConfig.kt +src/main/kotlin/enlighten/monitoring/infrastructure/RequestConfig.kt +src/main/kotlin/enlighten/monitoring/infrastructure/RequestMethod.kt +src/main/kotlin/enlighten/monitoring/infrastructure/ResponseExtensions.kt +src/main/kotlin/enlighten/monitoring/infrastructure/Serializer.kt +src/main/kotlin/enlighten/monitoring/infrastructure/URIAdapter.kt +src/main/kotlin/enlighten/monitoring/infrastructure/UUIDAdapter.kt +src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetry.kt +src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerCharge.kt +src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischarge.kt +src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSoc.kt +src/main/kotlin/enlighten/monitoring/models/BatterySettings.kt +src/main/kotlin/enlighten/monitoring/models/ClientError.kt +src/main/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableError.kt +src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInner.kt +src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.kt +src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.kt +src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModem.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemSummaryResponse.kt +src/main/kotlin/enlighten/monitoring/models/GetSystems500Response.kt +src/main/kotlin/enlighten/monitoring/models/GetSystemsResponse.kt +src/main/kotlin/enlighten/monitoring/models/InternalServerError.kt +src/main/kotlin/enlighten/monitoring/models/LoadControlSettings.kt +src/main/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInner.kt +src/main/kotlin/enlighten/monitoring/models/Meta.kt +src/main/kotlin/enlighten/monitoring/models/MethodNotAllowedError.kt +src/main/kotlin/enlighten/monitoring/models/NotImplementedError.kt +src/main/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponse.kt +src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequest.kt +src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystem.kt +src/main/kotlin/enlighten/monitoring/models/SearchSystemsResponse.kt +src/main/kotlin/enlighten/monitoring/models/StormGuardSettings.kt +src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataError.kt +src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorError.kt +src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponse.kt +src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseData.kt +src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataData.kt +src/main/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnum.kt +src/main/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnum.kt +src/main/kotlin/enlighten/monitoring/models/SystemDetails.kt +src/main/kotlin/enlighten/monitoring/models/SystemDetailsAddress.kt +src/main/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnum.kt +src/main/kotlin/enlighten/monitoring/models/SystemPublicNameEnum.kt +src/main/kotlin/enlighten/monitoring/models/SystemSortByEnum.kt +src/main/kotlin/enlighten/monitoring/models/SystemStatusEnum.kt +src/main/kotlin/enlighten/monitoring/models/TelemetryGranularityEnum.kt +src/main/kotlin/enlighten/monitoring/models/TooManyRequestsError.kt +src/main/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequest.kt +src/main/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequest.kt +src/main/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequest.kt +src/test/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApiTest.kt +src/test/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApiTest.kt +src/test/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApiTest.kt +src/test/kotlin/enlighten/monitoring/apis/StreamingApiTest.kt +src/test/kotlin/enlighten/monitoring/apis/SystemConfigurationsApiTest.kt +src/test/kotlin/enlighten/monitoring/apis/SystemDetailsApiTest.kt +src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerChargeTest.kt +src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischargeTest.kt +src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSocTest.kt +src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryTest.kt +src/test/kotlin/enlighten/monitoring/models/BatterySettingsTest.kt +src/test/kotlin/enlighten/monitoring/models/ClientErrorTest.kt +src/test/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableErrorTest.kt +src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergyTest.kt +src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProducedTest.kt +src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerChargeTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischargeTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSocTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModemTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemSummaryResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystems500ResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/GetSystemsResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/InternalServerErrorTest.kt +src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInnerTest.kt +src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsTest.kt +src/test/kotlin/enlighten/monitoring/models/MetaTest.kt +src/test/kotlin/enlighten/monitoring/models/MethodNotAllowedErrorTest.kt +src/test/kotlin/enlighten/monitoring/models/NotImplementedErrorTest.kt +src/test/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystemTest.kt +src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestTest.kt +src/test/kotlin/enlighten/monitoring/models/SearchSystemsResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/StormGuardSettingsTest.kt +src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorErrorTest.kt +src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorTest.kt +src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataDataTest.kt +src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataTest.kt +src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseTest.kt +src/test/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnumTest.kt +src/test/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnumTest.kt +src/test/kotlin/enlighten/monitoring/models/SystemDetailsAddressTest.kt +src/test/kotlin/enlighten/monitoring/models/SystemDetailsTest.kt +src/test/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnumTest.kt +src/test/kotlin/enlighten/monitoring/models/SystemPublicNameEnumTest.kt +src/test/kotlin/enlighten/monitoring/models/SystemSortByEnumTest.kt +src/test/kotlin/enlighten/monitoring/models/SystemStatusEnumTest.kt +src/test/kotlin/enlighten/monitoring/models/TelemetryGranularityEnumTest.kt +src/test/kotlin/enlighten/monitoring/models/TooManyRequestsErrorTest.kt +src/test/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequestTest.kt +src/test/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequestTest.kt +src/test/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequestTest.kt diff --git a/kotlin/monitoring/.openapi-generator/VERSION b/kotlin/monitoring/.openapi-generator/VERSION new file mode 100644 index 00000000..93c8ddab --- /dev/null +++ b/kotlin/monitoring/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/kotlin/monitoring/README.md b/kotlin/monitoring/README.md new file mode 100644 index 00000000..8524647a --- /dev/null +++ b/kotlin/monitoring/README.md @@ -0,0 +1,181 @@ +# enlighten.monitoring - Kotlin client library for The Enphase Monitoring API + +Monitoring API can be used to fetch system details on a site, system-level production and consumption data, and device-level production data. + +## 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: 4.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/v4* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DeviceLevelProductionMonitoringApi* | [**getSystemAcbDeviceTelemetry**](docs/DeviceLevelProductionMonitoringApi.md#getsystemacbdevicetelemetry) | **GET** /systems/{system_id}/devices/acbs/{serial_no}/telemetry | Retrieves telemetry for single ACB +*DeviceLevelProductionMonitoringApi* | [**getSystemEnchargeDeviceTelemetry**](docs/DeviceLevelProductionMonitoringApi.md#getsystemenchargedevicetelemetry) | **GET** /systems/{system_id}/devices/encharges/{serial_no}/telemetry | Retrieves telemetry for single Encharge +*DeviceLevelProductionMonitoringApi* | [**getSystemMicroDeviceTelemetry**](docs/DeviceLevelProductionMonitoringApi.md#getsystemmicrodevicetelemetry) | **GET** /systems/{system_id}/devices/micros/{serial_no}/telemetry | Retrieves telemetry for single micro/pcu +*SiteLevelConsumptionMonitoringApi* | [**getSystemBatteryLifetime**](docs/SiteLevelConsumptionMonitoringApi.md#getsystembatterylifetime) | **GET** /systems/{system_id}/battery_lifetime | battery_lifetime +*SiteLevelConsumptionMonitoringApi* | [**getSystemBatteryTelemetry**](docs/SiteLevelConsumptionMonitoringApi.md#getsystembatterytelemetry) | **GET** /systems/{system_id}/telemetry/battery | Retrieves telemetry for all batteries for a system +*SiteLevelConsumptionMonitoringApi* | [**getSystemConsumptionLifetime**](docs/SiteLevelConsumptionMonitoringApi.md#getsystemconsumptionlifetime) | **GET** /systems/{system_id}/consumption_lifetime | consumption_lifetime +*SiteLevelConsumptionMonitoringApi* | [**getSystemConsumptionMeterTelemetry**](docs/SiteLevelConsumptionMonitoringApi.md#getsystemconsumptionmetertelemetry) | **GET** /systems/{system_id}/telemetry/consumption_meter | Retrieves telemetry for all consumption meters for a system +*SiteLevelConsumptionMonitoringApi* | [**getSystemEnergyExportLifetime**](docs/SiteLevelConsumptionMonitoringApi.md#getsystemenergyexportlifetime) | **GET** /systems/{system_id}/energy_export_lifetime | export_lifetime +*SiteLevelConsumptionMonitoringApi* | [**getSystemEnergyExportTelemetry**](docs/SiteLevelConsumptionMonitoringApi.md#getsystemenergyexporttelemetry) | **GET** /systems/{system_id}/energy_export_telemetry | Retrieves energy exported to grid in regular intervals +*SiteLevelConsumptionMonitoringApi* | [**getSystemEnergyImportLifetime**](docs/SiteLevelConsumptionMonitoringApi.md#getsystemenergyimportlifetime) | **GET** /systems/{system_id}/energy_import_lifetime | import_lifetime +*SiteLevelConsumptionMonitoringApi* | [**getSystemEnergyImportTelemetry**](docs/SiteLevelConsumptionMonitoringApi.md#getsystemenergyimporttelemetry) | **GET** /systems/{system_id}/energy_import_telemetry | Retrieves energy imported from grid in regular intervals +*SiteLevelProductionMonitoringApi* | [**getSystemEnergyLifetime**](docs/SiteLevelProductionMonitoringApi.md#getsystemenergylifetime) | **GET** /systems/{system_id}/energy_lifetime | energy_lifetime +*SiteLevelProductionMonitoringApi* | [**getSystemProductionMeterReadings**](docs/SiteLevelProductionMonitoringApi.md#getsystemproductionmeterreadings) | **GET** /systems/{system_id}/production_meter_readings | production_meter_readings +*SiteLevelProductionMonitoringApi* | [**getSystemProductionMeterTelemetry**](docs/SiteLevelProductionMonitoringApi.md#getsystemproductionmetertelemetry) | **GET** /systems/{system_id}/telemetry/production_meter | Retrieves telemetry for all production meters for a system +*SiteLevelProductionMonitoringApi* | [**getSystemProductionMicroTelemetry**](docs/SiteLevelProductionMonitoringApi.md#getsystemproductionmicrotelemetry) | **GET** /systems/{system_id}/telemetry/production_micro | Retrieves telemetry for all production micros for a system +*SiteLevelProductionMonitoringApi* | [**getSystemRgmStats**](docs/SiteLevelProductionMonitoringApi.md#getsystemrgmstats) | **GET** /systems/{system_id}/rgm_stats | rgm_stats +*StreamingApi* | [**streamSystemLiveData**](docs/StreamingApi.md#streamsystemlivedata) | **GET** /systems/{system_id}/live_data | Site Level Live Status +*SystemConfigurationsApi* | [**getSystemBatterySettings**](docs/SystemConfigurationsApi.md#getsystembatterysettings) | **GET** /systems/config/{system_id}/battery_settings | Returns the current battery settings of a system +*SystemConfigurationsApi* | [**getSystemGridStatusSettings**](docs/SystemConfigurationsApi.md#getsystemgridstatussettings) | **GET** /systems/config/{system_id}/grid_status | Returns the current grid status of a system. +*SystemConfigurationsApi* | [**getSystemLoadControlSettings**](docs/SystemConfigurationsApi.md#getsystemloadcontrolsettings) | **GET** /systems/config/{system_id}/load_control | Returns the current load control settings of a system +*SystemConfigurationsApi* | [**getSystemStormGuardSettings**](docs/SystemConfigurationsApi.md#getsystemstormguardsettings) | **GET** /systems/config/{system_id}/storm_guard | Returns the current storm guard settings of a system +*SystemConfigurationsApi* | [**updateSystemBatterySettings**](docs/SystemConfigurationsApi.md#updatesystembatterysettings) | **PUT** /systems/config/{system_id}/battery_settings | Updates the current battery settings of a system +*SystemConfigurationsApi* | [**updateSystemLoadControlSettings**](docs/SystemConfigurationsApi.md#updatesystemloadcontrolsettings) | **PUT** /systems/config/{system_id}/load_control | Updates the current load control settings of a system +*SystemConfigurationsApi* | [**updateSystemStormGuardSettings**](docs/SystemConfigurationsApi.md#updatesystemstormguardsettings) | **PUT** /systems/config/{system_id}/storm_guard | Updates the current storm guard settings of a system +*SystemDetailsApi* | [**getInvertersSummaryByEnvoyOrSite**](docs/SystemDetailsApi.md#getinverterssummarybyenvoyorsite) | **GET** /systems/inverters_summary_by_envoy_or_site | inverters_summary_by_envoy_or_site +*SystemDetailsApi* | [**getSystem**](docs/SystemDetailsApi.md#getsystem) | **GET** /systems/{system_id} | Retrieves a System by ID +*SystemDetailsApi* | [**getSystemDevices**](docs/SystemDetailsApi.md#getsystemdevices) | **GET** /systems/{system_id}/devices | Retrieves devices for a given system +*SystemDetailsApi* | [**getSystemSummary**](docs/SystemDetailsApi.md#getsystemsummary) | **GET** /systems/{system_id}/summary | Retrieves a system summary +*SystemDetailsApi* | [**getSystems**](docs/SystemDetailsApi.md#getsystems) | **GET** /systems | Fetch systems +*SystemDetailsApi* | [**retrieveSystemId**](docs/SystemDetailsApi.md#retrievesystemid) | **GET** /systems/retrieve_system_id | Retrieve system for a given envoy serial number +*SystemDetailsApi* | [**searchSystems**](docs/SystemDetailsApi.md#searchsystems) | **POST** /systems/search | Search and filter systems + + + +## Documentation for Models + + - [enlighten.monitoring.models.BatteryDeviceTelemetry](docs/BatteryDeviceTelemetry.md) + - [enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInner](docs/BatteryDeviceTelemetryIntervalsInner.md) + - [enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerCharge](docs/BatteryDeviceTelemetryIntervalsInnerCharge.md) + - [enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerDischarge](docs/BatteryDeviceTelemetryIntervalsInnerDischarge.md) + - [enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerSoc](docs/BatteryDeviceTelemetryIntervalsInnerSoc.md) + - [enlighten.monitoring.models.BatterySettings](docs/BatterySettings.md) + - [enlighten.monitoring.models.ClientError](docs/ClientError.md) + - [enlighten.monitoring.models.DataTemporarilyUnavailableError](docs/DataTemporarilyUnavailableError.md) + - [enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInner](docs/GetInvertersSummaryByEnvoyOrSiteResponseInner.md) + - [enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner](docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.md) + - [enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy](docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.md) + - [enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced](docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.md) + - [enlighten.monitoring.models.GetSystemBatteryLifetimeResponse](docs/GetSystemBatteryLifetimeResponse.md) + - [enlighten.monitoring.models.GetSystemBatteryTelemetryResponse](docs/GetSystemBatteryTelemetryResponse.md) + - [enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInner](docs/GetSystemBatteryTelemetryResponseIntervalsInner.md) + - [enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerCharge](docs/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.md) + - [enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerDischarge](docs/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.md) + - [enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerSoc](docs/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.md) + - [enlighten.monitoring.models.GetSystemConsumptionLifetimeResponse](docs/GetSystemConsumptionLifetimeResponse.md) + - [enlighten.monitoring.models.GetSystemConsumptionMeterTelemetryResponse](docs/GetSystemConsumptionMeterTelemetryResponse.md) + - [enlighten.monitoring.models.GetSystemConsumptionMeterTelemetryResponseIntervalsInner](docs/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.md) + - [enlighten.monitoring.models.GetSystemDevicesResponse](docs/GetSystemDevicesResponse.md) + - [enlighten.monitoring.models.GetSystemDevicesResponseDevicesValueInner](docs/GetSystemDevicesResponseDevicesValueInner.md) + - [enlighten.monitoring.models.GetSystemDevicesResponseDevicesValueInnerCellularModem](docs/GetSystemDevicesResponseDevicesValueInnerCellularModem.md) + - [enlighten.monitoring.models.GetSystemEnergyExportLifetimeResponse](docs/GetSystemEnergyExportLifetimeResponse.md) + - [enlighten.monitoring.models.GetSystemEnergyExportTelemetryResponse](docs/GetSystemEnergyExportTelemetryResponse.md) + - [enlighten.monitoring.models.GetSystemEnergyExportTelemetryResponseIntervalsInnerInner](docs/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.md) + - [enlighten.monitoring.models.GetSystemEnergyImportLifetimeResponse](docs/GetSystemEnergyImportLifetimeResponse.md) + - [enlighten.monitoring.models.GetSystemEnergyImportTelemetryResponse](docs/GetSystemEnergyImportTelemetryResponse.md) + - [enlighten.monitoring.models.GetSystemEnergyImportTelemetryResponseIntervalsInnerInner](docs/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.md) + - [enlighten.monitoring.models.GetSystemEnergyLifetimeResponse](docs/GetSystemEnergyLifetimeResponse.md) + - [enlighten.monitoring.models.GetSystemGridStatusSettingsResponse](docs/GetSystemGridStatusSettingsResponse.md) + - [enlighten.monitoring.models.GetSystemMicroDeviceTelemetryResponse](docs/GetSystemMicroDeviceTelemetryResponse.md) + - [enlighten.monitoring.models.GetSystemMicroDeviceTelemetryResponseIntervalsInner](docs/GetSystemMicroDeviceTelemetryResponseIntervalsInner.md) + - [enlighten.monitoring.models.GetSystemProductionMeterReadingsResponse](docs/GetSystemProductionMeterReadingsResponse.md) + - [enlighten.monitoring.models.GetSystemProductionMeterReadingsResponseMeterReadingsInner](docs/GetSystemProductionMeterReadingsResponseMeterReadingsInner.md) + - [enlighten.monitoring.models.GetSystemProductionMeterTelemetryResponse](docs/GetSystemProductionMeterTelemetryResponse.md) + - [enlighten.monitoring.models.GetSystemProductionMeterTelemetryResponseIntervalsInner](docs/GetSystemProductionMeterTelemetryResponseIntervalsInner.md) + - [enlighten.monitoring.models.GetSystemProductionMicroTelemetryResponse](docs/GetSystemProductionMicroTelemetryResponse.md) + - [enlighten.monitoring.models.GetSystemProductionMicroTelemetryResponseIntervalsInner](docs/GetSystemProductionMicroTelemetryResponseIntervalsInner.md) + - [enlighten.monitoring.models.GetSystemRgmStatsResponse](docs/GetSystemRgmStatsResponse.md) + - [enlighten.monitoring.models.GetSystemRgmStatsResponseIntervalsInner](docs/GetSystemRgmStatsResponseIntervalsInner.md) + - [enlighten.monitoring.models.GetSystemRgmStatsResponseMeterIntervalsInner](docs/GetSystemRgmStatsResponseMeterIntervalsInner.md) + - [enlighten.monitoring.models.GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner](docs/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.md) + - [enlighten.monitoring.models.GetSystemSummaryResponse](docs/GetSystemSummaryResponse.md) + - [enlighten.monitoring.models.GetSystems500Response](docs/GetSystems500Response.md) + - [enlighten.monitoring.models.GetSystemsResponse](docs/GetSystemsResponse.md) + - [enlighten.monitoring.models.InternalServerError](docs/InternalServerError.md) + - [enlighten.monitoring.models.LoadControlSettings](docs/LoadControlSettings.md) + - [enlighten.monitoring.models.LoadControlSettingsLoadControlDataInner](docs/LoadControlSettingsLoadControlDataInner.md) + - [enlighten.monitoring.models.Meta](docs/Meta.md) + - [enlighten.monitoring.models.MethodNotAllowedError](docs/MethodNotAllowedError.md) + - [enlighten.monitoring.models.NotImplementedError](docs/NotImplementedError.md) + - [enlighten.monitoring.models.RetrieveSystemIdResponse](docs/RetrieveSystemIdResponse.md) + - [enlighten.monitoring.models.SearchSystemsRequest](docs/SearchSystemsRequest.md) + - [enlighten.monitoring.models.SearchSystemsRequestSystem](docs/SearchSystemsRequestSystem.md) + - [enlighten.monitoring.models.SearchSystemsResponse](docs/SearchSystemsResponse.md) + - [enlighten.monitoring.models.StormGuardSettings](docs/StormGuardSettings.md) + - [enlighten.monitoring.models.StreamSystemLiveDataError](docs/StreamSystemLiveDataError.md) + - [enlighten.monitoring.models.StreamSystemLiveDataErrorError](docs/StreamSystemLiveDataErrorError.md) + - [enlighten.monitoring.models.StreamSystemLiveDataResponse](docs/StreamSystemLiveDataResponse.md) + - [enlighten.monitoring.models.StreamSystemLiveDataResponseData](docs/StreamSystemLiveDataResponseData.md) + - [enlighten.monitoring.models.StreamSystemLiveDataResponseDataData](docs/StreamSystemLiveDataResponseDataData.md) + - [enlighten.monitoring.models.SystemAttachmentTypeEnum](docs/SystemAttachmentTypeEnum.md) + - [enlighten.monitoring.models.SystemConnectionTypeEnum](docs/SystemConnectionTypeEnum.md) + - [enlighten.monitoring.models.SystemDetails](docs/SystemDetails.md) + - [enlighten.monitoring.models.SystemDetailsAddress](docs/SystemDetailsAddress.md) + - [enlighten.monitoring.models.SystemEnergyLifetimeProductionEnum](docs/SystemEnergyLifetimeProductionEnum.md) + - [enlighten.monitoring.models.SystemPublicNameEnum](docs/SystemPublicNameEnum.md) + - [enlighten.monitoring.models.SystemSortByEnum](docs/SystemSortByEnum.md) + - [enlighten.monitoring.models.SystemStatusEnum](docs/SystemStatusEnum.md) + - [enlighten.monitoring.models.TelemetryGranularityEnum](docs/TelemetryGranularityEnum.md) + - [enlighten.monitoring.models.TooManyRequestsError](docs/TooManyRequestsError.md) + - [enlighten.monitoring.models.UpdateSystemBatterySettingsRequest](docs/UpdateSystemBatterySettingsRequest.md) + - [enlighten.monitoring.models.UpdateSystemLoadControlSettingsRequest](docs/UpdateSystemLoadControlSettingsRequest.md) + - [enlighten.monitoring.models.UpdateSystemStormGuardSettingsRequest](docs/UpdateSystemStormGuardSettingsRequest.md) + + + +## Documentation for Authorization + + +Authentication schemes defined for the API: + +### OAuth2 + +- **Type**: OAuth +- **Flow**: accessCode +- **Authorization URL**: https://api.enphaseenergy.com/oauth/authorize +- **Scopes**: N/A + + +### ApiKey + +- **Type**: API key +- **API key parameter name**: key +- **Location**: URL query string + diff --git a/kotlin/monitoring/build.gradle b/kotlin/monitoring/build.gradle new file mode 100644 index 00000000..ae12ac6e --- /dev/null +++ b/kotlin/monitoring/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/monitoring/docs/BatteryDeviceTelemetry.md b/kotlin/monitoring/docs/BatteryDeviceTelemetry.md new file mode 100644 index 00000000..175bdb5b --- /dev/null +++ b/kotlin/monitoring/docs/BatteryDeviceTelemetry.md @@ -0,0 +1,19 @@ + +# BatteryDeviceTelemetry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | System ID. | [optional] +**serialNumber** | **kotlin.String** | Device serial number. | [optional] +**granularity** | [**TelemetryGranularityEnum**](TelemetryGranularityEnum.md) | | [optional] +**totalDevices** | **kotlin.Int** | Shall always be 1 since this is telemetry from individual micros. | [optional] +**startAt** | **kotlin.Long** | Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response. | [optional] +**endAt** | **kotlin.Long** | End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response. | [optional] +**items** | **kotlin.String** | List key 'intervals'. | [optional] +**intervals** | [**kotlin.collections.List<BatteryDeviceTelemetryIntervalsInner>**](BatteryDeviceTelemetryIntervalsInner.md) | | [optional] +**lastReportedTime** | **kotlin.Int** | Last reported timestamp. | [optional] +**lastReportedSoc** | **kotlin.String** | Last reported soc percentage. | [optional] + + + diff --git a/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInner.md b/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInner.md new file mode 100644 index 00000000..0f7e79d7 --- /dev/null +++ b/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInner.md @@ -0,0 +1,13 @@ + +# BatteryDeviceTelemetryIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**charge** | [**BatteryDeviceTelemetryIntervalsInnerCharge**](BatteryDeviceTelemetryIntervalsInnerCharge.md) | | [optional] +**discharge** | [**BatteryDeviceTelemetryIntervalsInnerDischarge**](BatteryDeviceTelemetryIntervalsInnerDischarge.md) | | [optional] +**soc** | [**BatteryDeviceTelemetryIntervalsInnerSoc**](BatteryDeviceTelemetryIntervalsInnerSoc.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerCharge.md b/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerCharge.md new file mode 100644 index 00000000..513f6d20 --- /dev/null +++ b/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerCharge.md @@ -0,0 +1,10 @@ + +# BatteryDeviceTelemetryIntervalsInnerCharge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enwh** | **kotlin.Int** | Energy into the battery during the interval. | [optional] + + + diff --git a/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerDischarge.md b/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerDischarge.md new file mode 100644 index 00000000..0417c017 --- /dev/null +++ b/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerDischarge.md @@ -0,0 +1,10 @@ + +# BatteryDeviceTelemetryIntervalsInnerDischarge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enwh** | **kotlin.Int** | Energy discharged from the battery during the interval. | [optional] + + + diff --git a/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerSoc.md b/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerSoc.md new file mode 100644 index 00000000..3430aa78 --- /dev/null +++ b/kotlin/monitoring/docs/BatteryDeviceTelemetryIntervalsInnerSoc.md @@ -0,0 +1,10 @@ + +# BatteryDeviceTelemetryIntervalsInnerSoc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**percent** | **kotlin.Int** | Battery soc percentage. | [optional] + + + diff --git a/kotlin/monitoring/docs/BatterySettings.md b/kotlin/monitoring/docs/BatterySettings.md new file mode 100644 index 00000000..2996c1c4 --- /dev/null +++ b/kotlin/monitoring/docs/BatterySettings.md @@ -0,0 +1,15 @@ + +# BatterySettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | | [optional] +**batteryMode** | **kotlin.String** | Current battery mode of the system. Available values are Savings Mode, Full Backup, and Self - Consumption. | [optional] +**reserveSoc** | **kotlin.Int** | Reserve soc for the current mode. | [optional] +**energyIndependence** | **kotlin.String** | Energy independence after peak hours enabled/disabled. Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period. Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period. | [optional] +**chargeFromGrid** | **kotlin.String** | Charge battery from grid enabled/disabled. Enabled: Battery may also charge from the grid when in full backup mode or when battery charge is below the reserve capacity in savings or self-consumption mode. | [optional] +**batteryShutdownLevel** | **kotlin.Int** | Level at which battery shutdowns to conserve energy. Battery restarts by using the conserved energy when the utility grid restores power or solar panels start producing energy. | [optional] + + + diff --git a/kotlin/monitoring/docs/ClientError.md b/kotlin/monitoring/docs/ClientError.md new file mode 100644 index 00000000..34d7d663 --- /dev/null +++ b/kotlin/monitoring/docs/ClientError.md @@ -0,0 +1,12 @@ + +# ClientError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**details** | **kotlin.String** | Error details. | +**code** | **kotlin.Int** | Error code. | +**message** | **kotlin.String** | Error type. | [optional] + + + diff --git a/kotlin/monitoring/docs/DataTemporarilyUnavailableError.md b/kotlin/monitoring/docs/DataTemporarilyUnavailableError.md new file mode 100644 index 00000000..97908dfb --- /dev/null +++ b/kotlin/monitoring/docs/DataTemporarilyUnavailableError.md @@ -0,0 +1,11 @@ + +# DataTemporarilyUnavailableError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errorCode** | **kotlin.Int** | Error code. | [optional] +**errorMessages** | **kotlin.collections.List<kotlin.String>** | Error messages. | [optional] + + + diff --git a/kotlin/monitoring/docs/DeviceLevelProductionMonitoringApi.md b/kotlin/monitoring/docs/DeviceLevelProductionMonitoringApi.md new file mode 100644 index 00000000..b5b07d74 --- /dev/null +++ b/kotlin/monitoring/docs/DeviceLevelProductionMonitoringApi.md @@ -0,0 +1,185 @@ +# DeviceLevelProductionMonitoringApi + +All URIs are relative to *https://api.enphaseenergy.com/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getSystemAcbDeviceTelemetry**](DeviceLevelProductionMonitoringApi.md#getSystemAcbDeviceTelemetry) | **GET** /systems/{system_id}/devices/acbs/{serial_no}/telemetry | Retrieves telemetry for single ACB +[**getSystemEnchargeDeviceTelemetry**](DeviceLevelProductionMonitoringApi.md#getSystemEnchargeDeviceTelemetry) | **GET** /systems/{system_id}/devices/encharges/{serial_no}/telemetry | Retrieves telemetry for single Encharge +[**getSystemMicroDeviceTelemetry**](DeviceLevelProductionMonitoringApi.md#getSystemMicroDeviceTelemetry) | **GET** /systems/{system_id}/devices/micros/{serial_no}/telemetry | Retrieves telemetry for single micro/pcu + + + +# **getSystemAcbDeviceTelemetry** +> BatteryDeviceTelemetry getSystemAcbDeviceTelemetry(systemId, serialNo, startAt, granularity) + +Retrieves telemetry for single ACB + +Retrieves telemetry for single ACB. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = DeviceLevelProductionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val serialNo : kotlin.String = serialNo_example // kotlin.String | Serial number of the acb. +val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : BatteryDeviceTelemetry = apiInstance.getSystemAcbDeviceTelemetry(systemId, serialNo, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling DeviceLevelProductionMonitoringApi#getSystemAcbDeviceTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling DeviceLevelProductionMonitoringApi#getSystemAcbDeviceTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **serialNo** | **kotlin.String**| Serial number of the acb. | + **startAt** | **kotlin.Long**| Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**BatteryDeviceTelemetry**](BatteryDeviceTelemetry.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemEnchargeDeviceTelemetry** +> BatteryDeviceTelemetry getSystemEnchargeDeviceTelemetry(systemId, serialNo, startAt, granularity) + +Retrieves telemetry for single Encharge + +Retrieves telemetry for single Encharge. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = DeviceLevelProductionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val serialNo : kotlin.String = serialNo_example // kotlin.String | Serial number of the Encharge. +val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : BatteryDeviceTelemetry = apiInstance.getSystemEnchargeDeviceTelemetry(systemId, serialNo, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling DeviceLevelProductionMonitoringApi#getSystemEnchargeDeviceTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling DeviceLevelProductionMonitoringApi#getSystemEnchargeDeviceTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **serialNo** | **kotlin.String**| Serial number of the Encharge. | + **startAt** | **kotlin.Long**| Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**BatteryDeviceTelemetry**](BatteryDeviceTelemetry.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemMicroDeviceTelemetry** +> GetSystemMicroDeviceTelemetryResponse getSystemMicroDeviceTelemetry(systemId, serialNo, startAt, granularity) + +Retrieves telemetry for single micro/pcu + +Retrieves telemetry for single micro/pcu. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 3 intervals will appear in response. If granularity is day, maximum 288 intervals will appear in response where each interval is of 5 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = DeviceLevelProductionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val serialNo : kotlin.String = serialNo_example // kotlin.String | Serial number of the individual solar Microinverter. +val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : GetSystemMicroDeviceTelemetryResponse = apiInstance.getSystemMicroDeviceTelemetry(systemId, serialNo, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling DeviceLevelProductionMonitoringApi#getSystemMicroDeviceTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling DeviceLevelProductionMonitoringApi#getSystemMicroDeviceTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **serialNo** | **kotlin.String**| Serial number of the individual solar Microinverter. | + **startAt** | **kotlin.Long**| Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**GetSystemMicroDeviceTelemetryResponse**](GetSystemMicroDeviceTelemetryResponse.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/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInner.md b/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInner.md new file mode 100644 index 00000000..8cd1d045 --- /dev/null +++ b/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInner.md @@ -0,0 +1,11 @@ + +# GetInvertersSummaryByEnvoyOrSiteResponseInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**signalStrength** | **kotlin.Int** | Signal strength. | [optional] +**microInverters** | [**kotlin.collections.List<GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner>**](GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.md) | Microinverters. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.md b/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.md new file mode 100644 index 00000000..71c2ddbc --- /dev/null +++ b/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.md @@ -0,0 +1,22 @@ + +# GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Int** | Numeric ID of the microinverter. | [optional] +**serialNumber** | **kotlin.String** | Serial number of the microinverter. | [optional] +**model** | **kotlin.String** | Microinverter model type. | [optional] +**partNumber** | **kotlin.String** | Microinverter part number. | [optional] +**sku** | **kotlin.String** | SKU of the microinverter. | [optional] +**status** | **kotlin.String** | Current status of the micro inverter. | [optional] +**powerProduced** | [**GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced**](GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.md) | | [optional] +**procLoad** | **kotlin.String** | Processor load. | [optional] +**paramTable** | **kotlin.String** | Parameter table. | [optional] +**envoySerialNumber** | **kotlin.String** | Envoy serial number of the system that the micro reports to. | [optional] +**energy** | [**GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy**](GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.md) | | [optional] +**gridProfile** | **kotlin.String** | Grid profile ID. | [optional] +**lastReportDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | Date on which the microinverter last reported. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.md b/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.md new file mode 100644 index 00000000..1591c4f5 --- /dev/null +++ b/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.md @@ -0,0 +1,12 @@ + +# GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**`value`** | **kotlin.Int** | Lifetime energy produced by the microinverter. | [optional] +**units** | **kotlin.String** | Energy units. | [optional] +**precision** | **kotlin.Int** | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.md b/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.md new file mode 100644 index 00000000..48a974fa --- /dev/null +++ b/kotlin/monitoring/docs/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.md @@ -0,0 +1,12 @@ + +# GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**`value`** | **kotlin.Int** | Current power produced by the microinverter. | [optional] +**units** | **kotlin.String** | Power units. | [optional] +**precision** | **kotlin.Int** | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemBatteryLifetimeResponse.md b/kotlin/monitoring/docs/GetSystemBatteryLifetimeResponse.md new file mode 100644 index 00000000..8e0536cf --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemBatteryLifetimeResponse.md @@ -0,0 +1,14 @@ + +# GetSystemBatteryLifetimeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**startDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. | [optional] +**charge** | **kotlin.collections.List<kotlin.Int>** | An array of charge 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. | [optional] +**discharge** | **kotlin.collections.List<kotlin.Int>** | An array of discharge 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. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponse.md b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponse.md new file mode 100644 index 00000000..73b86d23 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponse.md @@ -0,0 +1,17 @@ + +# GetSystemBatteryTelemetryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**granularity** | [**TelemetryGranularityEnum**](TelemetryGranularityEnum.md) | | [optional] +**totalDevices** | **kotlin.Int** | Number of batteries in the site. | [optional] +**startAt** | **kotlin.Long** | Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] +**endAt** | **kotlin.Long** | End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. | [optional] +**items** | **kotlin.String** | List key 'intervals'. | [optional] +**intervals** | [**kotlin.collections.List<GetSystemBatteryTelemetryResponseIntervalsInner>**](GetSystemBatteryTelemetryResponseIntervalsInner.md) | | [optional] +**lastReportedAggregateSoc** | **kotlin.String** | Last reported aggregate soc percentage. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInner.md b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInner.md new file mode 100644 index 00000000..ef025e29 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInner.md @@ -0,0 +1,13 @@ + +# GetSystemBatteryTelemetryResponseIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**charge** | [**GetSystemBatteryTelemetryResponseIntervalsInnerCharge**](GetSystemBatteryTelemetryResponseIntervalsInnerCharge.md) | | [optional] +**discharge** | [**GetSystemBatteryTelemetryResponseIntervalsInnerDischarge**](GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.md) | | [optional] +**soc** | [**GetSystemBatteryTelemetryResponseIntervalsInnerSoc**](GetSystemBatteryTelemetryResponseIntervalsInnerSoc.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.md b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.md new file mode 100644 index 00000000..1a2cab2d --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.md @@ -0,0 +1,11 @@ + +# GetSystemBatteryTelemetryResponseIntervalsInnerCharge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enwh** | **kotlin.Int** | Energy into the battery during the interval. | [optional] +**devicesReporting** | **kotlin.Int** | Number of devices reporting. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.md b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.md new file mode 100644 index 00000000..0d1e9db6 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.md @@ -0,0 +1,11 @@ + +# GetSystemBatteryTelemetryResponseIntervalsInnerDischarge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enwh** | **kotlin.Int** | Energy discharged from the battery during the interval. | [optional] +**devicesReporting** | **kotlin.Int** | Number of devices reporting. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.md b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.md new file mode 100644 index 00000000..ce2c0c58 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.md @@ -0,0 +1,11 @@ + +# GetSystemBatteryTelemetryResponseIntervalsInnerSoc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**percent** | **kotlin.Int** | Battery soc percentage. | [optional] +**devicesReporting** | **kotlin.Int** | Number of devices reporting. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemConsumptionLifetimeResponse.md b/kotlin/monitoring/docs/GetSystemConsumptionLifetimeResponse.md new file mode 100644 index 00000000..4fe29326 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemConsumptionLifetimeResponse.md @@ -0,0 +1,13 @@ + +# GetSystemConsumptionLifetimeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**startDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. | [optional] +**consumption** | **kotlin.collections.List<kotlin.Int>** | An array of consumption measurements in Wh, one for each day since consumption metering began, or one for each day of the requested period. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemConsumptionMeterTelemetryResponse.md b/kotlin/monitoring/docs/GetSystemConsumptionMeterTelemetryResponse.md new file mode 100644 index 00000000..d68083b3 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemConsumptionMeterTelemetryResponse.md @@ -0,0 +1,17 @@ + +# GetSystemConsumptionMeterTelemetryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**granularity** | [**TelemetryGranularityEnum**](TelemetryGranularityEnum.md) | | [optional] +**totalDevices** | **kotlin.Int** | Number of non-retired consumption meters in the site. | [optional] +**startAt** | **kotlin.Long** | Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] +**endAt** | **kotlin.Long** | End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. | [optional] +**items** | **kotlin.String** | List key 'intervals'. | [optional] +**intervals** | [**kotlin.collections.List<GetSystemConsumptionMeterTelemetryResponseIntervalsInner>**](GetSystemConsumptionMeterTelemetryResponseIntervalsInner.md) | | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.md b/kotlin/monitoring/docs/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.md new file mode 100644 index 00000000..4917ff9f --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.md @@ -0,0 +1,12 @@ + +# GetSystemConsumptionMeterTelemetryResponseIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**devicesReporting** | **kotlin.Int** | Number of devices reporting. | [optional] +**enwh** | **kotlin.Int** | Units produced per interval. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemDevicesResponse.md b/kotlin/monitoring/docs/GetSystemDevicesResponse.md new file mode 100644 index 00000000..9380a779 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemDevicesResponse.md @@ -0,0 +1,13 @@ + +# GetSystemDevicesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | System ID. | [optional] +**totalDevices** | **kotlin.Int** | Total active devices associated with the system. | [optional] +**items** | **kotlin.String** | List key. | [optional] +**devices** | **kotlin.collections.Map<kotlin.String, kotlin.collections.List<GetSystemDevicesResponseDevicesValueInner>>** | Hash keys include all the possible device types micros, meters, gateways, mids, q_relays, ACBs, Encharges, Enpowers (if the devices of this type are present). For all the device types, the object will contain the serial_number and model with some additional information pertaining to the device type. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemDevicesResponseDevicesValueInner.md b/kotlin/monitoring/docs/GetSystemDevicesResponseDevicesValueInner.md new file mode 100644 index 00000000..72603790 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemDevicesResponseDevicesValueInner.md @@ -0,0 +1,22 @@ + +# GetSystemDevicesResponseDevicesValueInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.Int** | | [optional] +**lastReportAt** | **kotlin.Long** | | [optional] +**name** | **kotlin.String** | | [optional] +**serialNumber** | **kotlin.String** | | [optional] +**partNumber** | **kotlin.String** | | [optional] +**emuSwVersion** | **kotlin.String** | | [optional] +**sku** | **kotlin.String** | | [optional] +**model** | **kotlin.String** | | [optional] +**status** | **kotlin.String** | | [optional] +**active** | **kotlin.Boolean** | | [optional] +**state** | **kotlin.String** | | [optional] +**configType** | **kotlin.String** | | [optional] +**cellularModem** | [**GetSystemDevicesResponseDevicesValueInnerCellularModem**](GetSystemDevicesResponseDevicesValueInnerCellularModem.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemDevicesResponseDevicesValueInnerCellularModem.md b/kotlin/monitoring/docs/GetSystemDevicesResponseDevicesValueInnerCellularModem.md new file mode 100644 index 00000000..a1b8d270 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemDevicesResponseDevicesValueInnerCellularModem.md @@ -0,0 +1,14 @@ + +# GetSystemDevicesResponseDevicesValueInnerCellularModem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**imei** | **kotlin.String** | | [optional] +**partNum** | **kotlin.String** | | [optional] +**sku** | **kotlin.String** | | [optional] +**planStartDate** | **kotlin.Long** | | [optional] +**planEndDate** | **kotlin.Long** | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemEnergyExportLifetimeResponse.md b/kotlin/monitoring/docs/GetSystemEnergyExportLifetimeResponse.md new file mode 100644 index 00000000..c5ed8bd3 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemEnergyExportLifetimeResponse.md @@ -0,0 +1,13 @@ + +# GetSystemEnergyExportLifetimeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**startDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. | [optional] +**export** | **kotlin.collections.List<kotlin.Int>** | An array of export 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. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemEnergyExportTelemetryResponse.md b/kotlin/monitoring/docs/GetSystemEnergyExportTelemetryResponse.md new file mode 100644 index 00000000..4854a603 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemEnergyExportTelemetryResponse.md @@ -0,0 +1,17 @@ + +# GetSystemEnergyExportTelemetryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**granularity** | **kotlin.String** | Granularity of the telemetry data. Default is 'day'. | [optional] +**totalDevices** | **kotlin.Int** | Number of production meters in the site. | [optional] +**startAt** | **kotlin.Long** | Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] +**endAt** | **kotlin.Long** | End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. | [optional] +**items** | **kotlin.String** | List key 'intervals'. | [optional] +**intervals** | **kotlin.collections.List<kotlin.collections.List<GetSystemEnergyExportTelemetryResponseIntervalsInnerInner>>** | An array of telemetry objects. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.md b/kotlin/monitoring/docs/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.md new file mode 100644 index 00000000..30f8025c --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.md @@ -0,0 +1,11 @@ + +# GetSystemEnergyExportTelemetryResponseIntervalsInnerInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**whExported** | **kotlin.Int** | Energy exported (in Watt-Hours) during that period. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemEnergyImportLifetimeResponse.md b/kotlin/monitoring/docs/GetSystemEnergyImportLifetimeResponse.md new file mode 100644 index 00000000..b38b2989 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemEnergyImportLifetimeResponse.md @@ -0,0 +1,13 @@ + +# GetSystemEnergyImportLifetimeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**startDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. | [optional] +**`import`** | **kotlin.collections.List<kotlin.Int>** | An array of import 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. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemEnergyImportTelemetryResponse.md b/kotlin/monitoring/docs/GetSystemEnergyImportTelemetryResponse.md new file mode 100644 index 00000000..9c13cd2d --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemEnergyImportTelemetryResponse.md @@ -0,0 +1,17 @@ + +# GetSystemEnergyImportTelemetryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**granularity** | **kotlin.String** | Granularity of the telemetry data. Default is 'day'. | [optional] +**totalDevices** | **kotlin.Int** | Number of consumption meters in the site. | [optional] +**startAt** | **kotlin.Long** | Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] +**endAt** | **kotlin.Long** | End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. | [optional] +**items** | **kotlin.String** | List key 'intervals'. | [optional] +**intervals** | **kotlin.collections.List<kotlin.collections.List<GetSystemEnergyImportTelemetryResponseIntervalsInnerInner>>** | An array of telemetry objects. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.md b/kotlin/monitoring/docs/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.md new file mode 100644 index 00000000..556a4120 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.md @@ -0,0 +1,11 @@ + +# GetSystemEnergyImportTelemetryResponseIntervalsInnerInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**whImported** | **kotlin.Int** | Energy imported (in Watt-Hours) during that period. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemEnergyLifetimeResponse.md b/kotlin/monitoring/docs/GetSystemEnergyLifetimeResponse.md new file mode 100644 index 00000000..a6b9fddf --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemEnergyLifetimeResponse.md @@ -0,0 +1,16 @@ + +# GetSystemEnergyLifetimeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | System ID. | [optional] +**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. | [optional] +**meterStartDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | 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] +**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. | [optional] +**microProduction** | **kotlin.collections.List<kotlin.Int>** | | [optional] +**meterProduction** | **kotlin.collections.List<kotlin.Int>** | | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemGridStatusSettingsResponse.md b/kotlin/monitoring/docs/GetSystemGridStatusSettingsResponse.md new file mode 100644 index 00000000..d058a1b7 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemGridStatusSettingsResponse.md @@ -0,0 +1,12 @@ + +# GetSystemGridStatusSettingsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | | [optional] +**gridState** | **kotlin.String** | Indicates whether the site is On Grid, Off Grid or grid status of site is Unknown. | [optional] +**lastReportDate** | **kotlin.Int** | Timestamp (in epoch format) at which the system's Envoy last submitted a report. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemMicroDeviceTelemetryResponse.md b/kotlin/monitoring/docs/GetSystemMicroDeviceTelemetryResponse.md new file mode 100644 index 00000000..0bbdaf1f --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemMicroDeviceTelemetryResponse.md @@ -0,0 +1,17 @@ + +# GetSystemMicroDeviceTelemetryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**serialNumber** | **kotlin.String** | Device serial number. | [optional] +**granularity** | [**TelemetryGranularityEnum**](TelemetryGranularityEnum.md) | | [optional] +**totalDevices** | **kotlin.Int** | Shall always be 1 since this is telemetry from individual micros. | [optional] +**startAt** | **kotlin.Long** | Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response. | [optional] +**endAt** | **kotlin.Long** | End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response. | [optional] +**items** | **kotlin.String** | List key 'intervals'. | [optional] +**intervals** | [**kotlin.collections.List<GetSystemMicroDeviceTelemetryResponseIntervalsInner>**](GetSystemMicroDeviceTelemetryResponseIntervalsInner.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemMicroDeviceTelemetryResponseIntervalsInner.md b/kotlin/monitoring/docs/GetSystemMicroDeviceTelemetryResponseIntervalsInner.md new file mode 100644 index 00000000..5b559cd5 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemMicroDeviceTelemetryResponseIntervalsInner.md @@ -0,0 +1,12 @@ + +# GetSystemMicroDeviceTelemetryResponseIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**powr** | **kotlin.Int** | Average power (in Watt) produced by all the microinverters during this interval, measured in Watts. | [optional] +**enwh** | **kotlin.Int** | Energy produced (in Watt-Hours) from all the microinverters combined during that period. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemProductionMeterReadingsResponse.md b/kotlin/monitoring/docs/GetSystemProductionMeterReadingsResponse.md new file mode 100644 index 00000000..526536f1 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemProductionMeterReadingsResponse.md @@ -0,0 +1,12 @@ + +# GetSystemProductionMeterReadingsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | System ID. | [optional] +**meterReadings** | [**kotlin.collections.List<GetSystemProductionMeterReadingsResponseMeterReadingsInner>**](GetSystemProductionMeterReadingsResponseMeterReadingsInner.md) | Production meter readings. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemProductionMeterReadingsResponseMeterReadingsInner.md b/kotlin/monitoring/docs/GetSystemProductionMeterReadingsResponseMeterReadingsInner.md new file mode 100644 index 00000000..0a5e1eaa --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemProductionMeterReadingsResponseMeterReadingsInner.md @@ -0,0 +1,12 @@ + +# GetSystemProductionMeterReadingsResponseMeterReadingsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**serialNumber** | **kotlin.String** | Serial number of the meter. | [optional] +**`value`** | **kotlin.Int** | Meter reading, in Wh. | [optional] +**readAt** | **kotlin.Long** | Time when the reading was taken, always prior or equal to the requested 'end_at'. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemProductionMeterTelemetryResponse.md b/kotlin/monitoring/docs/GetSystemProductionMeterTelemetryResponse.md new file mode 100644 index 00000000..d566f714 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemProductionMeterTelemetryResponse.md @@ -0,0 +1,16 @@ + +# GetSystemProductionMeterTelemetryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**granularity** | [**TelemetryGranularityEnum**](TelemetryGranularityEnum.md) | | [optional] +**totalDevices** | **kotlin.Int** | Number of production meters in the site. | [optional] +**startAt** | **kotlin.Long** | Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] +**endAt** | **kotlin.Long** | End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. | [optional] +**items** | **kotlin.String** | List key 'intervals'. | [optional] +**intervals** | [**kotlin.collections.List<GetSystemProductionMeterTelemetryResponseIntervalsInner>**](GetSystemProductionMeterTelemetryResponseIntervalsInner.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemProductionMeterTelemetryResponseIntervalsInner.md b/kotlin/monitoring/docs/GetSystemProductionMeterTelemetryResponseIntervalsInner.md new file mode 100644 index 00000000..59a49e7f --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemProductionMeterTelemetryResponseIntervalsInner.md @@ -0,0 +1,12 @@ + +# GetSystemProductionMeterTelemetryResponseIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**devicesReporting** | **kotlin.Int** | Number of devices reporting. | [optional] +**whDel** | **kotlin.Int** | Units produced per interval. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemProductionMicroTelemetryResponse.md b/kotlin/monitoring/docs/GetSystemProductionMicroTelemetryResponse.md new file mode 100644 index 00000000..00347b00 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemProductionMicroTelemetryResponse.md @@ -0,0 +1,17 @@ + +# GetSystemProductionMicroTelemetryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**granularity** | [**TelemetryGranularityEnum**](TelemetryGranularityEnum.md) | | [optional] +**totalDevices** | **kotlin.Int** | Number of micro inverters in the site. | [optional] +**startAt** | **kotlin.Long** | Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] +**endAt** | **kotlin.Long** | End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. | [optional] +**items** | **kotlin.String** | List key 'intervals'. | [optional] +**intervals** | [**kotlin.collections.List<GetSystemProductionMicroTelemetryResponseIntervalsInner>**](GetSystemProductionMicroTelemetryResponseIntervalsInner.md) | An array of telemetry objects. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemProductionMicroTelemetryResponseIntervalsInner.md b/kotlin/monitoring/docs/GetSystemProductionMicroTelemetryResponseIntervalsInner.md new file mode 100644 index 00000000..285d31c0 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemProductionMicroTelemetryResponseIntervalsInner.md @@ -0,0 +1,13 @@ + +# GetSystemProductionMicroTelemetryResponseIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**devicesReporting** | **kotlin.Int** | Number of devices reporting. | [optional] +**powr** | **kotlin.Int** | Average power (in Watt) produced by all the microinverters during this interval, measured in Watts. | [optional] +**enwh** | **kotlin.Int** | Energy produced (in Watt-Hours) from all the microinverters combined during that period. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemRgmStatsResponse.md b/kotlin/monitoring/docs/GetSystemRgmStatsResponse.md new file mode 100644 index 00000000..8a0fd493 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemRgmStatsResponse.md @@ -0,0 +1,14 @@ + +# GetSystemRgmStatsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | System ID. | [optional] +**totalDevices** | **kotlin.Int** | Number of active revenue-grade meters for this system. | [optional] +**meta** | [**Meta**](Meta.md) | | [optional] +**intervals** | [**kotlin.collections.List<GetSystemRgmStatsResponseIntervalsInner>**](GetSystemRgmStatsResponseIntervalsInner.md) | A list of intervals between the requested start and end times. | [optional] +**meterIntervals** | [**kotlin.collections.List<GetSystemRgmStatsResponseMeterIntervalsInner>**](GetSystemRgmStatsResponseMeterIntervalsInner.md) | A list of intervals of a meter between the requested start and end times. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemRgmStatsResponseIntervalsInner.md b/kotlin/monitoring/docs/GetSystemRgmStatsResponseIntervalsInner.md new file mode 100644 index 00000000..eec96cf3 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemRgmStatsResponseIntervalsInner.md @@ -0,0 +1,12 @@ + +# GetSystemRgmStatsResponseIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**devicesReporting** | **kotlin.Int** | Number of revenue-grade meters that reported data for this interval at the time of the request. | [optional] +**whDel** | **kotlin.Int** | Energy delivered during this interval, in Wh. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemRgmStatsResponseMeterIntervalsInner.md b/kotlin/monitoring/docs/GetSystemRgmStatsResponseMeterIntervalsInner.md new file mode 100644 index 00000000..a439bb02 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemRgmStatsResponseMeterIntervalsInner.md @@ -0,0 +1,12 @@ + +# GetSystemRgmStatsResponseMeterIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meterSerialNumber** | **kotlin.String** | Meter serial number. | [optional] +**envoySerialNumber** | **kotlin.String** | Envoy serial number of the system that the micro reports to. | [optional] +**intervals** | [**kotlin.collections.List<GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner>**](GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.md) | Individual meter level interval. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.md b/kotlin/monitoring/docs/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.md new file mode 100644 index 00000000..57731d52 --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.md @@ -0,0 +1,13 @@ + +# GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channel** | **kotlin.Int** | Reporting channel ID. | [optional] +**endAt** | **kotlin.Long** | End time of the telemetry interval. | [optional] +**whDel** | **kotlin.Float** | Energy delivered during this interval, in Wh (Watt-Hour). | [optional] +**currW** | **kotlin.Int** | Energy delivered during this interval, in W (Watts). | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemSummaryResponse.md b/kotlin/monitoring/docs/GetSystemSummaryResponse.md new file mode 100644 index 00000000..294df91e --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemSummaryResponse.md @@ -0,0 +1,21 @@ + +# GetSystemSummaryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] +**currentPower** | **kotlin.Int** | Current power production of the system in Watts. | [optional] +**energyLifetime** | **kotlin.Int** | Energy generated by the system during its lifetime in Wh. | [optional] +**energyToday** | **kotlin.Int** | Energy generated by the system today in Wh. | [optional] +**lastIntervalEndAt** | **kotlin.Long** | 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. | [optional] +**lastReportAt** | **kotlin.Long** | Timestamp (in epoch format) at which the system's Envoy last submitted a report. | [optional] +**modules** | **kotlin.Int** | Total number of modules in the system. | [optional] +**operationalAt** | **kotlin.Long** | Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. | [optional] +**sizeW** | **kotlin.Int** | System size in watts. | [optional] +**source** | **kotlin.String** | Source of energy measurement. | [optional] +**status** | [**SystemStatusEnum**](SystemStatusEnum.md) | | [optional] +**summaryDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | Summary date. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystems500Response.md b/kotlin/monitoring/docs/GetSystems500Response.md new file mode 100644 index 00000000..ccdaf36a --- /dev/null +++ b/kotlin/monitoring/docs/GetSystems500Response.md @@ -0,0 +1,13 @@ + +# GetSystems500Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **kotlin.String** | | [optional] +**message** | **kotlin.collections.List<kotlin.String>** | | [optional] +**errorCode** | **kotlin.Int** | Error code. | [optional] +**errorMessages** | **kotlin.collections.List<kotlin.String>** | Error messages. | [optional] + + + diff --git a/kotlin/monitoring/docs/GetSystemsResponse.md b/kotlin/monitoring/docs/GetSystemsResponse.md new file mode 100644 index 00000000..25c6303d --- /dev/null +++ b/kotlin/monitoring/docs/GetSystemsResponse.md @@ -0,0 +1,15 @@ + +# GetSystemsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**propertySize** | **kotlin.Int** | Maximum number of records shown per page. Default=10, Min=1, Max=100. | +**count** | **kotlin.Int** | Total number of systems actually returned for the current page. | +**total** | **kotlin.Int** | Total number of systems. | [optional] +**currentPage** | **kotlin.Int** | Number of the current page fetched. | [optional] +**items** | **kotlin.String** | Named key of the list data. In this endpoint, it is systems. | [optional] +**systems** | [**kotlin.collections.List<SystemDetails>**](SystemDetails.md) | List of systems. | [optional] + + + diff --git a/kotlin/monitoring/docs/InternalServerError.md b/kotlin/monitoring/docs/InternalServerError.md new file mode 100644 index 00000000..0be11060 --- /dev/null +++ b/kotlin/monitoring/docs/InternalServerError.md @@ -0,0 +1,11 @@ + +# InternalServerError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **kotlin.String** | | [optional] +**message** | **kotlin.collections.List<kotlin.String>** | | [optional] + + + diff --git a/kotlin/monitoring/docs/LoadControlSettings.md b/kotlin/monitoring/docs/LoadControlSettings.md new file mode 100644 index 00000000..b6afe67a --- /dev/null +++ b/kotlin/monitoring/docs/LoadControlSettings.md @@ -0,0 +1,11 @@ + +# LoadControlSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | | [optional] +**loadControlData** | [**kotlin.collections.List<LoadControlSettingsLoadControlDataInner>**](LoadControlSettingsLoadControlDataInner.md) | Load control data for all the configured loads. | [optional] + + + diff --git a/kotlin/monitoring/docs/LoadControlSettingsLoadControlDataInner.md b/kotlin/monitoring/docs/LoadControlSettingsLoadControlDataInner.md new file mode 100644 index 00000000..9b37b3c1 --- /dev/null +++ b/kotlin/monitoring/docs/LoadControlSettingsLoadControlDataInner.md @@ -0,0 +1,18 @@ + +# LoadControlSettingsLoadControlDataInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **kotlin.String** | Name of the dry contact. | [optional] +**loadName** | **kotlin.String** | Name of the load. | [optional] +**ownerCanOverride** | **kotlin.String** | HOs ability to override the load control settings. | [optional] +**mode** | **kotlin.String** | Current load control configuration. | [optional] +**socLow** | **kotlin.Int** | Applicable for advanced mode. Load will be powered off when the battery soc reaches this level. | [optional] +**socHigh** | **kotlin.Int** | Applicable for advanced mode. Load powers off when battery reaches soc_low. The load will be powered on when the battery soc reaches soc_high. | [optional] +**status** | **kotlin.String** | Available values are enabled, disabled. | [optional] +**essentialStartTime** | **kotlin.Int** | Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. | [optional] +**essentialEndTime** | **kotlin.Int** | Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. | [optional] + + + diff --git a/kotlin/monitoring/docs/Meta.md b/kotlin/monitoring/docs/Meta.md new file mode 100644 index 00000000..d63680e8 --- /dev/null +++ b/kotlin/monitoring/docs/Meta.md @@ -0,0 +1,13 @@ + +# Meta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**SystemStatusEnum**](SystemStatusEnum.md) | | [optional] +**lastReportAt** | **kotlin.Int** | Timestamp (in epoch format) at which the system's Envoy last submitted a report. | [optional] +**lastEnergyAt** | **kotlin.Int** | Timestamp (in epoch format) at which the system's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned. | [optional] +**operationalAt** | **kotlin.Int** | Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. | [optional] + + + diff --git a/kotlin/monitoring/docs/MethodNotAllowedError.md b/kotlin/monitoring/docs/MethodNotAllowedError.md new file mode 100644 index 00000000..abff99a9 --- /dev/null +++ b/kotlin/monitoring/docs/MethodNotAllowedError.md @@ -0,0 +1,11 @@ + +# MethodNotAllowedError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **kotlin.String** | | [optional] +**message** | **kotlin.collections.List<kotlin.String>** | | [optional] + + + diff --git a/kotlin/monitoring/docs/NotImplementedError.md b/kotlin/monitoring/docs/NotImplementedError.md new file mode 100644 index 00000000..42a8f57a --- /dev/null +++ b/kotlin/monitoring/docs/NotImplementedError.md @@ -0,0 +1,12 @@ + +# NotImplementedError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **kotlin.String** | Error type. | [optional] +**details** | **kotlin.String** | Error details. | [optional] +**code** | **kotlin.Int** | Error code. | [optional] + + + diff --git a/kotlin/monitoring/docs/RetrieveSystemIdResponse.md b/kotlin/monitoring/docs/RetrieveSystemIdResponse.md new file mode 100644 index 00000000..275cbc51 --- /dev/null +++ b/kotlin/monitoring/docs/RetrieveSystemIdResponse.md @@ -0,0 +1,10 @@ + +# RetrieveSystemIdResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | [optional] + + + diff --git a/kotlin/monitoring/docs/SearchSystemsRequest.md b/kotlin/monitoring/docs/SearchSystemsRequest.md new file mode 100644 index 00000000..51a7fcac --- /dev/null +++ b/kotlin/monitoring/docs/SearchSystemsRequest.md @@ -0,0 +1,11 @@ + +# SearchSystemsRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**system** | [**SearchSystemsRequestSystem**](SearchSystemsRequestSystem.md) | | +**sortBy** | [**SystemSortByEnum**](SystemSortByEnum.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/SearchSystemsRequestSystem.md b/kotlin/monitoring/docs/SearchSystemsRequestSystem.md new file mode 100644 index 00000000..f1acde21 --- /dev/null +++ b/kotlin/monitoring/docs/SearchSystemsRequestSystem.md @@ -0,0 +1,14 @@ + +# SearchSystemsRequestSystem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **kotlin.collections.List<kotlin.Int>** | Filter system by particular Ids. | [optional] +**name** | **kotlin.String** | Search by name of the system. | [optional] +**publicName** | [**SystemPublicNameEnum**](SystemPublicNameEnum.md) | | [optional] +**statuses** | [**kotlin.collections.List<SystemStatusEnum>**](SystemStatusEnum.md) | Search by System status. | [optional] +**connectionType** | [**SystemConnectionTypeEnum**](SystemConnectionTypeEnum.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/SearchSystemsResponse.md b/kotlin/monitoring/docs/SearchSystemsResponse.md new file mode 100644 index 00000000..02434bd1 --- /dev/null +++ b/kotlin/monitoring/docs/SearchSystemsResponse.md @@ -0,0 +1,15 @@ + +# SearchSystemsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **kotlin.Int** | Total number of systems available. | [optional] +**currentPage** | **kotlin.Int** | Current page of the systems result. Default is 1. | [optional] +**propertySize** | **kotlin.Int** | Max number of records from API per page is 100. Default is 10. | [optional] +**count** | **kotlin.Int** | Total number of systems actually returned for the current page. | [optional] +**items** | **kotlin.String** | Named key of the list data. In this endpoint, it is systems. | [optional] +**systems** | [**kotlin.collections.List<SystemDetails>**](SystemDetails.md) | List of filtered systems. | [optional] + + + diff --git a/kotlin/monitoring/docs/SiteLevelConsumptionMonitoringApi.md b/kotlin/monitoring/docs/SiteLevelConsumptionMonitoringApi.md new file mode 100644 index 00000000..6a61970c --- /dev/null +++ b/kotlin/monitoring/docs/SiteLevelConsumptionMonitoringApi.md @@ -0,0 +1,464 @@ +# SiteLevelConsumptionMonitoringApi + +All URIs are relative to *https://api.enphaseenergy.com/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getSystemBatteryLifetime**](SiteLevelConsumptionMonitoringApi.md#getSystemBatteryLifetime) | **GET** /systems/{system_id}/battery_lifetime | battery_lifetime +[**getSystemBatteryTelemetry**](SiteLevelConsumptionMonitoringApi.md#getSystemBatteryTelemetry) | **GET** /systems/{system_id}/telemetry/battery | Retrieves telemetry for all batteries for a system +[**getSystemConsumptionLifetime**](SiteLevelConsumptionMonitoringApi.md#getSystemConsumptionLifetime) | **GET** /systems/{system_id}/consumption_lifetime | consumption_lifetime +[**getSystemConsumptionMeterTelemetry**](SiteLevelConsumptionMonitoringApi.md#getSystemConsumptionMeterTelemetry) | **GET** /systems/{system_id}/telemetry/consumption_meter | Retrieves telemetry for all consumption meters for a system +[**getSystemEnergyExportLifetime**](SiteLevelConsumptionMonitoringApi.md#getSystemEnergyExportLifetime) | **GET** /systems/{system_id}/energy_export_lifetime | export_lifetime +[**getSystemEnergyExportTelemetry**](SiteLevelConsumptionMonitoringApi.md#getSystemEnergyExportTelemetry) | **GET** /systems/{system_id}/energy_export_telemetry | Retrieves energy exported to grid in regular intervals +[**getSystemEnergyImportLifetime**](SiteLevelConsumptionMonitoringApi.md#getSystemEnergyImportLifetime) | **GET** /systems/{system_id}/energy_import_lifetime | import_lifetime +[**getSystemEnergyImportTelemetry**](SiteLevelConsumptionMonitoringApi.md#getSystemEnergyImportTelemetry) | **GET** /systems/{system_id}/energy_import_telemetry | Retrieves energy imported from grid in regular intervals + + + +# **getSystemBatteryLifetime** +> GetSystemBatteryLifetimeResponse getSystemBatteryLifetime(systemId, startDate, endDate) + +battery_lifetime + +Returns a daily time series of energy charged into the batteries and energy discharged from the batteries for a 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 with no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been charged/discharged for the last days in the series. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelConsumptionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. +val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. +try { + val result : GetSystemBatteryLifetimeResponse = apiInstance.getSystemBatteryLifetime(systemId, startDate, endDate) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelConsumptionMonitoringApi#getSystemBatteryLifetime") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelConsumptionMonitoringApi#getSystemBatteryLifetime") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startDate** | **java.time.LocalDate**| Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. | [optional] + **endDate** | **java.time.LocalDate**| End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. | [optional] + +### Return type + +[**GetSystemBatteryLifetimeResponse**](GetSystemBatteryLifetimeResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemBatteryTelemetry** +> GetSystemBatteryTelemetryResponse getSystemBatteryTelemetry(systemId, startAt, granularity) + +Retrieves telemetry for all batteries for a system + +Retrieves telemetry for all the batteries of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelConsumptionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : GetSystemBatteryTelemetryResponse = apiInstance.getSystemBatteryTelemetry(systemId, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelConsumptionMonitoringApi#getSystemBatteryTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelConsumptionMonitoringApi#getSystemBatteryTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startAt** | **kotlin.Long**| Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**GetSystemBatteryTelemetryResponse**](GetSystemBatteryTelemetryResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemConsumptionLifetime** +> GetSystemConsumptionLifetimeResponse getSystemConsumptionLifetime(systemId, startDate, endDate) + +consumption_lifetime + +Returns a daily time series of energy consumption as measured by the consumption meter installed on the specified system. 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 data has been reported for the last three days. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelConsumptionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. +val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. +try { + val result : GetSystemConsumptionLifetimeResponse = apiInstance.getSystemConsumptionLifetime(systemId, startDate, endDate) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelConsumptionMonitoringApi#getSystemConsumptionLifetime") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelConsumptionMonitoringApi#getSystemConsumptionLifetime") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startDate** | **java.time.LocalDate**| Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. | [optional] + **endDate** | **java.time.LocalDate**| End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. | [optional] + +### Return type + +[**GetSystemConsumptionLifetimeResponse**](GetSystemConsumptionLifetimeResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemConsumptionMeterTelemetry** +> GetSystemConsumptionMeterTelemetryResponse getSystemConsumptionMeterTelemetry(systemId, startAt, granularity) + +Retrieves telemetry for all consumption meters for a system + +Retrieves telemetry for all the consumption meters of a system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelConsumptionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startAt : kotlin.Long = 789 // kotlin.Long | Requested start time for telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then the system first reported date is considered as start_at. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : GetSystemConsumptionMeterTelemetryResponse = apiInstance.getSystemConsumptionMeterTelemetry(systemId, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelConsumptionMonitoringApi#getSystemConsumptionMeterTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelConsumptionMonitoringApi#getSystemConsumptionMeterTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startAt** | **kotlin.Long**| Requested start time for telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then the system first reported date is considered as start_at. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**GetSystemConsumptionMeterTelemetryResponse**](GetSystemConsumptionMeterTelemetryResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemEnergyExportLifetime** +> GetSystemEnergyExportLifetimeResponse getSystemEnergyExportLifetime(systemId, startDate, endDate) + +export_lifetime + +Returns a daily time series of energy exported to the grid by 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 with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been exported for the last days in the series. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelConsumptionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. +val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. +try { + val result : GetSystemEnergyExportLifetimeResponse = apiInstance.getSystemEnergyExportLifetime(systemId, startDate, endDate) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelConsumptionMonitoringApi#getSystemEnergyExportLifetime") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelConsumptionMonitoringApi#getSystemEnergyExportLifetime") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startDate** | **java.time.LocalDate**| Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. | [optional] + **endDate** | **java.time.LocalDate**| End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. | [optional] + +### Return type + +[**GetSystemEnergyExportLifetimeResponse**](GetSystemEnergyExportLifetimeResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemEnergyExportTelemetry** +> GetSystemEnergyExportTelemetryResponse getSystemEnergyExportTelemetry(systemId, startAt, granularity) + +Retrieves energy exported to grid in regular intervals + +Retrieves energy exported to grid in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelConsumptionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : GetSystemEnergyExportTelemetryResponse = apiInstance.getSystemEnergyExportTelemetry(systemId, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelConsumptionMonitoringApi#getSystemEnergyExportTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelConsumptionMonitoringApi#getSystemEnergyExportTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startAt** | **kotlin.Long**| Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**GetSystemEnergyExportTelemetryResponse**](GetSystemEnergyExportTelemetryResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemEnergyImportLifetime** +> GetSystemEnergyImportLifetimeResponse getSystemEnergyImportLifetime(systemId, startDate, endDate) + +import_lifetime + +Returns a daily time series of energy imported to the grid by 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 with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been imported for the last days in the series. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelConsumptionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. +val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. +try { + val result : GetSystemEnergyImportLifetimeResponse = apiInstance.getSystemEnergyImportLifetime(systemId, startDate, endDate) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelConsumptionMonitoringApi#getSystemEnergyImportLifetime") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelConsumptionMonitoringApi#getSystemEnergyImportLifetime") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startDate** | **java.time.LocalDate**| Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. | [optional] + **endDate** | **java.time.LocalDate**| End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. | [optional] + +### Return type + +[**GetSystemEnergyImportLifetimeResponse**](GetSystemEnergyImportLifetimeResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemEnergyImportTelemetry** +> GetSystemEnergyImportTelemetryResponse getSystemEnergyImportTelemetry(systemId, startAt, granularity) + +Retrieves energy imported from grid in regular intervals + +Retrieves energy imported from grid in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelConsumptionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : GetSystemEnergyImportTelemetryResponse = apiInstance.getSystemEnergyImportTelemetry(systemId, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelConsumptionMonitoringApi#getSystemEnergyImportTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelConsumptionMonitoringApi#getSystemEnergyImportTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startAt** | **kotlin.Long**| Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**GetSystemEnergyImportTelemetryResponse**](GetSystemEnergyImportTelemetryResponse.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/monitoring/docs/SiteLevelProductionMonitoringApi.md b/kotlin/monitoring/docs/SiteLevelProductionMonitoringApi.md new file mode 100644 index 00000000..a338c04d --- /dev/null +++ b/kotlin/monitoring/docs/SiteLevelProductionMonitoringApi.md @@ -0,0 +1,293 @@ +# SiteLevelProductionMonitoringApi + +All URIs are relative to *https://api.enphaseenergy.com/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getSystemEnergyLifetime**](SiteLevelProductionMonitoringApi.md#getSystemEnergyLifetime) | **GET** /systems/{system_id}/energy_lifetime | energy_lifetime +[**getSystemProductionMeterReadings**](SiteLevelProductionMonitoringApi.md#getSystemProductionMeterReadings) | **GET** /systems/{system_id}/production_meter_readings | production_meter_readings +[**getSystemProductionMeterTelemetry**](SiteLevelProductionMonitoringApi.md#getSystemProductionMeterTelemetry) | **GET** /systems/{system_id}/telemetry/production_meter | Retrieves telemetry for all production meters for a system +[**getSystemProductionMicroTelemetry**](SiteLevelProductionMonitoringApi.md#getSystemProductionMicroTelemetry) | **GET** /systems/{system_id}/telemetry/production_micro | Retrieves telemetry for all production micros for a system +[**getSystemRgmStats**](SiteLevelProductionMonitoringApi.md#getSystemRgmStats) | **GET** /systems/{system_id}/rgm_stats | rgm_stats + + + +# **getSystemEnergyLifetime** +> GetSystemEnergyLifetimeResponse getSystemEnergyLifetime(systemId, startDate, endDate, production) + +energy_lifetime + +Returns a daily time series of energy produced by 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 with 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. 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. Later, it switches to using the data as measured by the meter. This is called the \"merged time series\". The attribute 'meter_start_date' indicates the time when 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.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelProductionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. +val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. +val production : SystemEnergyLifetimeProductionEnum = // SystemEnergyLifetimeProductionEnum | 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 : GetSystemEnergyLifetimeResponse = apiInstance.getSystemEnergyLifetime(systemId, startDate, endDate, production) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelProductionMonitoringApi#getSystemEnergyLifetime") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelProductionMonitoringApi#getSystemEnergyLifetime") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startDate** | **java.time.LocalDate**| Start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. | [optional] + **endDate** | **java.time.LocalDate**| End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. | [optional] + **production** | [**SystemEnergyLifetimeProductionEnum**](.md)| 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 + +[**GetSystemEnergyLifetimeResponse**](GetSystemEnergyLifetimeResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemProductionMeterReadings** +> GetSystemProductionMeterReadingsResponse getSystemProductionMeterReadings(systemId, endAt) + +production_meter_readings + +Returns the last known reading of each production meter on the system as of the requested time, 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. 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.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelProductionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val endAt : kotlin.Long = 789 // 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 : GetSystemProductionMeterReadingsResponse = apiInstance.getSystemProductionMeterReadings(systemId, endAt) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelProductionMonitoringApi#getSystemProductionMeterReadings") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelProductionMonitoringApi#getSystemProductionMeterReadings") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **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 + +[**GetSystemProductionMeterReadingsResponse**](GetSystemProductionMeterReadingsResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemProductionMeterTelemetry** +> GetSystemProductionMeterTelemetryResponse getSystemProductionMeterTelemetry(systemId, startAt, granularity) + +Retrieves telemetry for all production meters for a system + +Retrieves telemetry for all the production meters of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelProductionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : GetSystemProductionMeterTelemetryResponse = apiInstance.getSystemProductionMeterTelemetry(systemId, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelProductionMonitoringApi#getSystemProductionMeterTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelProductionMonitoringApi#getSystemProductionMeterTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startAt** | **kotlin.Long**| Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**GetSystemProductionMeterTelemetryResponse**](GetSystemProductionMeterTelemetryResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemProductionMicroTelemetry** +> GetSystemProductionMicroTelemetryResponse getSystemProductionMicroTelemetry(systemId, startAt, granularity) + +Retrieves telemetry for all production micros for a system + +Retrieves telemetry for all the production micros of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 3 intervals will appear in response. If granularity is day, maximum 288 intervals will appear in response where each interval is of 5 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelProductionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. +val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. +try { + val result : GetSystemProductionMicroTelemetryResponse = apiInstance.getSystemProductionMicroTelemetry(systemId, startAt, granularity) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelProductionMonitoringApi#getSystemProductionMicroTelemetry") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelProductionMonitoringApi#getSystemProductionMicroTelemetry") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **startAt** | **kotlin.Long**| Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. | [optional] + **granularity** | [**TelemetryGranularityEnum**](.md)| Granularity of the telemetry data. Default is 'day'. | [optional] [enum: 15mins, day, week] + +### Return type + +[**GetSystemProductionMicroTelemetryResponse**](GetSystemProductionMicroTelemetryResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemRgmStats** +> GetSystemRgmStatsResponse getSystemRgmStats(systemId, startAt, endAt) + +rgm_stats + +Returns performance statistics as measured by the revenue-grade meters installed on the specified system. If the total duration requested is more than one week, returns one week 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 (in epoch format) is treated as a request for 08:00 (in epoch format). Intervals are listed by their end times in epoch format. The requested date range in one API hit cannot be more than 7 days and the requested start at must be within 2 years from current time. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SiteLevelProductionMonitoringApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val startAt : kotlin.Long = 789 // 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 at midnight of the first reported interval date. +val endAt : kotlin.Long = 789 // kotlin.Long | End of reporting period in Unix epoch time. If no end is specified, default to the time of the request or (start time + 1 week), whichever is earlier. If the end is later than the last reported interval the response data ends with the last reported interval. +try { + val result : GetSystemRgmStatsResponse = apiInstance.getSystemRgmStats(systemId, startAt, endAt) + println(result) +} catch (e: ClientException) { + println("4xx response calling SiteLevelProductionMonitoringApi#getSystemRgmStats") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SiteLevelProductionMonitoringApi#getSystemRgmStats") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **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 at midnight of the first reported interval date. | [optional] + **endAt** | **kotlin.Long**| End of reporting period in Unix epoch time. If no end is specified, default to the time of the request or (start time + 1 week), whichever is earlier. If the end is later than the last reported interval the response data ends with the last reported interval. | [optional] + +### Return type + +[**GetSystemRgmStatsResponse**](GetSystemRgmStatsResponse.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/monitoring/docs/StormGuardSettings.md b/kotlin/monitoring/docs/StormGuardSettings.md new file mode 100644 index 00000000..362c8487 --- /dev/null +++ b/kotlin/monitoring/docs/StormGuardSettings.md @@ -0,0 +1,12 @@ + +# StormGuardSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | | [optional] +**stormGuardStatus** | **kotlin.String** | Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the locality. | [optional] +**stormAlert** | **kotlin.Boolean** | True if severe weather condition alert is issued in the locality. | [optional] + + + diff --git a/kotlin/monitoring/docs/StreamSystemLiveDataError.md b/kotlin/monitoring/docs/StreamSystemLiveDataError.md new file mode 100644 index 00000000..54284498 --- /dev/null +++ b/kotlin/monitoring/docs/StreamSystemLiveDataError.md @@ -0,0 +1,13 @@ + +# StreamSystemLiveDataError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**StreamSystemLiveDataErrorError**](StreamSystemLiveDataErrorError.md) | | [optional] +**timestampEpoch** | **kotlin.Int** | Timestamp in epoch format. | [optional] +**timestampUtc** | **kotlin.String** | Timestamp in UTC format. | [optional] +**type** | **kotlin.String** | | [optional] + + + diff --git a/kotlin/monitoring/docs/StreamSystemLiveDataErrorError.md b/kotlin/monitoring/docs/StreamSystemLiveDataErrorError.md new file mode 100644 index 00000000..0048fce0 --- /dev/null +++ b/kotlin/monitoring/docs/StreamSystemLiveDataErrorError.md @@ -0,0 +1,13 @@ + +# StreamSystemLiveDataErrorError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **kotlin.Int** | | [optional] +**details** | [**kotlin.collections.List<kotlin.Any>**](kotlin.Any.md) | | [optional] +**message** | **kotlin.String** | | [optional] +**status** | **kotlin.String** | | [optional] + + + diff --git a/kotlin/monitoring/docs/StreamSystemLiveDataResponse.md b/kotlin/monitoring/docs/StreamSystemLiveDataResponse.md new file mode 100644 index 00000000..fba9519b --- /dev/null +++ b/kotlin/monitoring/docs/StreamSystemLiveDataResponse.md @@ -0,0 +1,10 @@ + +# StreamSystemLiveDataResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**`data`** | [**StreamSystemLiveDataResponseData**](StreamSystemLiveDataResponseData.md) | | [optional] + + + diff --git a/kotlin/monitoring/docs/StreamSystemLiveDataResponseData.md b/kotlin/monitoring/docs/StreamSystemLiveDataResponseData.md new file mode 100644 index 00000000..2eda079e --- /dev/null +++ b/kotlin/monitoring/docs/StreamSystemLiveDataResponseData.md @@ -0,0 +1,13 @@ + +# StreamSystemLiveDataResponseData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**`data`** | [**StreamSystemLiveDataResponseDataData**](StreamSystemLiveDataResponseDataData.md) | | [optional] +**timestampEpoch** | **kotlin.Int** | Timestamp in epoch format. | [optional] +**timestampUtc** | **kotlin.String** | Timestamp in UTC format. | [optional] +**type** | **kotlin.String** | response | [optional] + + + diff --git a/kotlin/monitoring/docs/StreamSystemLiveDataResponseDataData.md b/kotlin/monitoring/docs/StreamSystemLiveDataResponseDataData.md new file mode 100644 index 00000000..6e162ec5 --- /dev/null +++ b/kotlin/monitoring/docs/StreamSystemLiveDataResponseDataData.md @@ -0,0 +1,19 @@ + +# StreamSystemLiveDataResponseDataData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batteryMode** | **kotlin.String** | Battery mode of the site. Available values are Savings Mode, Full Backup, and Self-consumption. | [optional] +**batteryPower** | **kotlin.Int** | Battery power in watts; Power will be positive in case of discharge and negative in case of charge. | [optional] +**batterySoc** | **kotlin.Int** | Battery soc in percentage. | [optional] +**consumptionPower** | **kotlin.Int** | Consumption power in watts. | [optional] +**envoySerialNumber** | **kotlin.collections.List<kotlin.String>** | | [optional] +**generatorPower** | **kotlin.Int** | Generator power in watts. | [optional] +**gridPower** | **kotlin.Int** | Grid power in watts; Power will be negative in case of export and positive in case of import. | [optional] +**gridStatus** | **kotlin.String** | Grid state of the site. Available values are On Grid, Off Grid, Unknown. | [optional] +**pvPower** | **kotlin.Int** | PV power in watts. | [optional] +**systemId** | **kotlin.Int** | The unique numeric ID of the system. | [optional] + + + diff --git a/kotlin/monitoring/docs/StreamingApi.md b/kotlin/monitoring/docs/StreamingApi.md new file mode 100644 index 00000000..5020367c --- /dev/null +++ b/kotlin/monitoring/docs/StreamingApi.md @@ -0,0 +1,63 @@ +# StreamingApi + +All URIs are relative to *https://api.enphaseenergy.com/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**streamSystemLiveData**](StreamingApi.md#streamSystemLiveData) | **GET** /systems/{system_id}/live_data | Site Level Live Status + + + +# **streamSystemLiveData** +> StreamSystemLiveDataResponse streamSystemLiveData(systemId, duration) + +Site Level Live Status + +API users can get real time live status data on demand for a given system. User can retrieve real time power for PV Production, Grid Import/Export, Consumption, Battery Charge/Discharge, and Generator. Users can also retrieve Grid Status, Battery Mode, and Battery State of Charge. User will receive the stream for a duration of 30 seconds by default and can configure the time in seconds by passing 'duration' as a header parameter with a minimum value of 30 and maximum value of 300. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = StreamingApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val duration : kotlin.Int = 56 // kotlin.Int | Duration of the stream in seconds. Default=30, Min=30, Max=300, e.g=30. +try { + val result : StreamSystemLiveDataResponse = apiInstance.streamSystemLiveData(systemId, duration) + println(result) +} catch (e: ClientException) { + println("4xx response calling StreamingApi#streamSystemLiveData") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling StreamingApi#streamSystemLiveData") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **duration** | **kotlin.Int**| Duration of the stream in seconds. Default=30, Min=30, Max=300, e.g=30. | [optional] + +### Return type + +[**StreamSystemLiveDataResponse**](StreamSystemLiveDataResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/kotlin/monitoring/docs/SystemAttachmentTypeEnum.md b/kotlin/monitoring/docs/SystemAttachmentTypeEnum.md new file mode 100644 index 00000000..8700d9b7 --- /dev/null +++ b/kotlin/monitoring/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/monitoring/docs/SystemConfigurationsApi.md b/kotlin/monitoring/docs/SystemConfigurationsApi.md new file mode 100644 index 00000000..6f1d965e --- /dev/null +++ b/kotlin/monitoring/docs/SystemConfigurationsApi.md @@ -0,0 +1,385 @@ +# SystemConfigurationsApi + +All URIs are relative to *https://api.enphaseenergy.com/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getSystemBatterySettings**](SystemConfigurationsApi.md#getSystemBatterySettings) | **GET** /systems/config/{system_id}/battery_settings | Returns the current battery settings of a system +[**getSystemGridStatusSettings**](SystemConfigurationsApi.md#getSystemGridStatusSettings) | **GET** /systems/config/{system_id}/grid_status | Returns the current grid status of a system. +[**getSystemLoadControlSettings**](SystemConfigurationsApi.md#getSystemLoadControlSettings) | **GET** /systems/config/{system_id}/load_control | Returns the current load control settings of a system +[**getSystemStormGuardSettings**](SystemConfigurationsApi.md#getSystemStormGuardSettings) | **GET** /systems/config/{system_id}/storm_guard | Returns the current storm guard settings of a system +[**updateSystemBatterySettings**](SystemConfigurationsApi.md#updateSystemBatterySettings) | **PUT** /systems/config/{system_id}/battery_settings | Updates the current battery settings of a system +[**updateSystemLoadControlSettings**](SystemConfigurationsApi.md#updateSystemLoadControlSettings) | **PUT** /systems/config/{system_id}/load_control | Updates the current load control settings of a system +[**updateSystemStormGuardSettings**](SystemConfigurationsApi.md#updateSystemStormGuardSettings) | **PUT** /systems/config/{system_id}/storm_guard | Updates the current storm guard settings of a system + + + +# **getSystemBatterySettings** +> BatterySettings getSystemBatterySettings(systemId) + +Returns the current battery settings of a system + +Returns the current battery settings of a system. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemConfigurationsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +try { + val result : BatterySettings = apiInstance.getSystemBatterySettings(systemId) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemConfigurationsApi#getSystemBatterySettings") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemConfigurationsApi#getSystemBatterySettings") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + +### Return type + +[**BatterySettings**](BatterySettings.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemGridStatusSettings** +> GetSystemGridStatusSettingsResponse getSystemGridStatusSettings(systemId) + +Returns the current grid status of a system. + +Returns the current grid status of a system. Please note that the status returned in the response is not real-time and is updated only after the IQ Gateway sends a new report to the Enphase cloud. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemConfigurationsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +try { + val result : GetSystemGridStatusSettingsResponse = apiInstance.getSystemGridStatusSettings(systemId) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemConfigurationsApi#getSystemGridStatusSettings") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemConfigurationsApi#getSystemGridStatusSettings") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + +### Return type + +[**GetSystemGridStatusSettingsResponse**](GetSystemGridStatusSettingsResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemLoadControlSettings** +> LoadControlSettings getSystemLoadControlSettings(systemId) + +Returns the current load control settings of a system + +Returns the current load control settings of a system. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemConfigurationsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +try { + val result : LoadControlSettings = apiInstance.getSystemLoadControlSettings(systemId) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemConfigurationsApi#getSystemLoadControlSettings") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemConfigurationsApi#getSystemLoadControlSettings") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + +### Return type + +[**LoadControlSettings**](LoadControlSettings.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemStormGuardSettings** +> StormGuardSettings getSystemStormGuardSettings(systemId) + +Returns the current storm guard settings of a system + +Returns the current storm guard settings of a system. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemConfigurationsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +try { + val result : StormGuardSettings = apiInstance.getSystemStormGuardSettings(systemId) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemConfigurationsApi#getSystemStormGuardSettings") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemConfigurationsApi#getSystemStormGuardSettings") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + +### Return type + +[**StormGuardSettings**](StormGuardSettings.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateSystemBatterySettings** +> BatterySettings updateSystemBatterySettings(systemId, batterySettings) + +Updates the current battery settings of a system + +Updates the current battery settings of a system. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemConfigurationsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val batterySettings : UpdateSystemBatterySettingsRequest = // UpdateSystemBatterySettingsRequest | +try { + val result : BatterySettings = apiInstance.updateSystemBatterySettings(systemId, batterySettings) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemConfigurationsApi#updateSystemBatterySettings") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemConfigurationsApi#updateSystemBatterySettings") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **batterySettings** | [**UpdateSystemBatterySettingsRequest**](UpdateSystemBatterySettingsRequest.md)| | [optional] + +### Return type + +[**BatterySettings**](BatterySettings.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateSystemLoadControlSettings** +> LoadControlSettings updateSystemLoadControlSettings(systemId, updateSystemLoadControlSettingsRequest) + +Updates the current load control settings of a system + +Updates the current load control settings of a system. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemConfigurationsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val updateSystemLoadControlSettingsRequest : UpdateSystemLoadControlSettingsRequest = // UpdateSystemLoadControlSettingsRequest | +try { + val result : LoadControlSettings = apiInstance.updateSystemLoadControlSettings(systemId, updateSystemLoadControlSettingsRequest) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemConfigurationsApi#updateSystemLoadControlSettings") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemConfigurationsApi#updateSystemLoadControlSettings") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **updateSystemLoadControlSettingsRequest** | [**UpdateSystemLoadControlSettingsRequest**](UpdateSystemLoadControlSettingsRequest.md)| | [optional] + +### Return type + +[**LoadControlSettings**](LoadControlSettings.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateSystemStormGuardSettings** +> StormGuardSettings updateSystemStormGuardSettings(systemId, stormGuard) + +Updates the current storm guard settings of a system + +Updates the current storm guard status of a system. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemConfigurationsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +val stormGuard : UpdateSystemStormGuardSettingsRequest = // UpdateSystemStormGuardSettingsRequest | +try { + val result : StormGuardSettings = apiInstance.updateSystemStormGuardSettings(systemId, stormGuard) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemConfigurationsApi#updateSystemStormGuardSettings") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemConfigurationsApi#updateSystemStormGuardSettings") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + **stormGuard** | [**UpdateSystemStormGuardSettingsRequest**](UpdateSystemStormGuardSettingsRequest.md)| | [optional] + +### Return type + +[**StormGuardSettings**](StormGuardSettings.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/monitoring/docs/SystemConnectionTypeEnum.md b/kotlin/monitoring/docs/SystemConnectionTypeEnum.md new file mode 100644 index 00000000..d29873ca --- /dev/null +++ b/kotlin/monitoring/docs/SystemConnectionTypeEnum.md @@ -0,0 +1,14 @@ + +# SystemConnectionTypeEnum + +## Enum + + + * `wifi` (value: `"wifi"`) + + * `cellular` (value: `"cellular"`) + + * `ethernet` (value: `"ethernet"`) + + + diff --git a/kotlin/monitoring/docs/SystemDetails.md b/kotlin/monitoring/docs/SystemDetails.md new file mode 100644 index 00000000..fc9a0876 --- /dev/null +++ b/kotlin/monitoring/docs/SystemDetails.md @@ -0,0 +1,26 @@ + +# SystemDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**systemId** | **kotlin.Int** | Unique numeric ID of the system. | +**name** | **kotlin.String** | Name of the system. | [optional] +**publicName** | **kotlin.String** | Name displayed on the public system page. Available values are All, Residential System, Commercial etc. Default='Residential System'. Only for systems that allow public access. | [optional] +**timezone** | **kotlin.String** | Timezone to which the system belongs. | [optional] +**address** | [**SystemDetailsAddress**](SystemDetailsAddress.md) | | [optional] +**connectionType** | [**SystemConnectionTypeEnum**](SystemConnectionTypeEnum.md) | | [optional] +**energyLifetime** | **kotlin.Int** | Energy generated by the system during its lifetime in Wh. It is returned only if the count is less than or equal to 100. | [optional] +**energyToday** | **kotlin.Int** | Energy generated by the system today in Wh. It is returned only if the count is less than or equal to 100. | [optional] +**systemSize** | **kotlin.Int** | Size of the system. It is returned only if the count is less than or equal to 100. | [optional] +**status** | [**SystemStatusEnum**](SystemStatusEnum.md) | | [optional] +**lastReportAt** | **kotlin.Long** | Timestamp (in epoch format) at which the system's Envoy last submitted a report. | [optional] +**lastEnergyAt** | **kotlin.Long** | Timestamp (in epoch format) at which the system's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned. | [optional] +**operationalAt** | **kotlin.Long** | Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. | [optional] +**attachmentType** | [**SystemAttachmentTypeEnum**](SystemAttachmentTypeEnum.md) | | [optional] +**interconnectDate** | [**java.time.LocalDate**](java.time.LocalDate.md) | Date on which the system was approved to connect to the grid. | [optional] +**reference** | **kotlin.String** | If the calling user belongs to a company and that company has provided its own identifier 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] + + + diff --git a/kotlin/monitoring/docs/SystemDetailsAddress.md b/kotlin/monitoring/docs/SystemDetailsAddress.md new file mode 100644 index 00000000..bf164432 --- /dev/null +++ b/kotlin/monitoring/docs/SystemDetailsAddress.md @@ -0,0 +1,13 @@ + +# SystemDetailsAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**city** | **kotlin.String** | City in which the system is located. | [optional] +**state** | **kotlin.String** | State in which the system is located. | [optional] +**country** | **kotlin.String** | Country in which the system is located. | [optional] +**postalCode** | **kotlin.String** | Postal code of the system's location. | [optional] + + + diff --git a/kotlin/monitoring/docs/SystemDetailsApi.md b/kotlin/monitoring/docs/SystemDetailsApi.md new file mode 100644 index 00000000..9501c5e4 --- /dev/null +++ b/kotlin/monitoring/docs/SystemDetailsApi.md @@ -0,0 +1,389 @@ +# SystemDetailsApi + +All URIs are relative to *https://api.enphaseenergy.com/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getInvertersSummaryByEnvoyOrSite**](SystemDetailsApi.md#getInvertersSummaryByEnvoyOrSite) | **GET** /systems/inverters_summary_by_envoy_or_site | inverters_summary_by_envoy_or_site +[**getSystem**](SystemDetailsApi.md#getSystem) | **GET** /systems/{system_id} | Retrieves a System by ID +[**getSystemDevices**](SystemDetailsApi.md#getSystemDevices) | **GET** /systems/{system_id}/devices | Retrieves devices for a given system +[**getSystemSummary**](SystemDetailsApi.md#getSystemSummary) | **GET** /systems/{system_id}/summary | Retrieves a system summary +[**getSystems**](SystemDetailsApi.md#getSystems) | **GET** /systems | Fetch systems +[**retrieveSystemId**](SystemDetailsApi.md#retrieveSystemId) | **GET** /systems/retrieve_system_id | Retrieve system for a given envoy serial number +[**searchSystems**](SystemDetailsApi.md#searchSystems) | **POST** /systems/search | Search and filter systems + + + +# **getInvertersSummaryByEnvoyOrSite** +> kotlin.collections.List<GetInvertersSummaryByEnvoyOrSiteResponseInner> getInvertersSummaryByEnvoyOrSite(siteId, envoySerialNumber) + +inverters_summary_by_envoy_or_site + +Returns the microinverters summary based on the specified active envoy serial number or system. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemDetailsApi() +val siteId : kotlin.Int = 56 // kotlin.Int | Site ID. The response will contain only those microinverters reporting to one of the active envoys of the given site. +val envoySerialNumber : kotlin.String = envoySerialNumber_example // kotlin.String | Active envoy serial number. Only microinverters reporting to the given active envoy will be present in the response. +try { + val result : kotlin.collections.List = apiInstance.getInvertersSummaryByEnvoyOrSite(siteId, envoySerialNumber) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemDetailsApi#getInvertersSummaryByEnvoyOrSite") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemDetailsApi#getInvertersSummaryByEnvoyOrSite") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **siteId** | **kotlin.Int**| Site ID. The response will contain only those microinverters reporting to one of the active envoys of the given site. | [optional] + **envoySerialNumber** | **kotlin.String**| Active envoy serial number. Only microinverters reporting to the given active envoy will be present in the response. | [optional] + +### Return type + +[**kotlin.collections.List<GetInvertersSummaryByEnvoyOrSiteResponseInner>**](GetInvertersSummaryByEnvoyOrSiteResponseInner.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystem** +> SystemDetails getSystem(systemId) + +Retrieves a System by ID + +Retrieves a system by ID. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemDetailsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +try { + val result : SystemDetails = apiInstance.getSystem(systemId) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemDetailsApi#getSystem") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemDetailsApi#getSystem") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + +### Return type + +[**SystemDetails**](SystemDetails.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemDevices** +> GetSystemDevicesResponse getSystemDevices(systemId) + +Retrieves devices for a given system + +Retrieves devices for a given system. Only devices that are active will be returned in the response. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemDetailsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +try { + val result : GetSystemDevicesResponse = apiInstance.getSystemDevices(systemId) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemDetailsApi#getSystemDevices") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemDetailsApi#getSystemDevices") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + +### Return type + +[**GetSystemDevicesResponse**](GetSystemDevicesResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystemSummary** +> GetSystemSummaryResponse getSystemSummary(systemId) + +Retrieves a system summary + +Returns system summary based on the specified system ID. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemDetailsApi() +val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. +try { + val result : GetSystemSummaryResponse = apiInstance.getSystemSummary(systemId) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemDetailsApi#getSystemSummary") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemDetailsApi#getSystemSummary") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **kotlin.Int**| Unique numeric ID of the system. | + +### Return type + +[**GetSystemSummaryResponse**](GetSystemSummaryResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getSystems** +> GetSystemsResponse getSystems(page, size, sortBy) + +Fetch systems + +Returns a list of systems for which the user can make API requests. By default, systems are returned in batches of 10. The maximum size is 100. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemDetailsApi() +val page : kotlin.Int = 56 // kotlin.Int | Page to be returned. Default=1, Min=1. For example, if page is set to 2, 2nd page is returned. +val size : kotlin.Int = 56 // kotlin.Int | Maximum number of records shown per page. Default=10, Min=1, Max=100. For example, if set to 5, 5 records are shown per page. +val sortBy : SystemSortByEnum = // SystemSortByEnum | Returns list of systems sorted by field. To get ASC order sorted list, user sort_by = . To get DESC order sorted list, use sort_by = (-). Current sort keys supported are id, name, and last_report_date. By default the list is sorted by decreasing system ID. +try { + val result : GetSystemsResponse = apiInstance.getSystems(page, size, sortBy) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemDetailsApi#getSystems") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemDetailsApi#getSystems") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **kotlin.Int**| Page to be returned. Default=1, Min=1. For example, if page is set to 2, 2nd page is returned. | [optional] + **size** | **kotlin.Int**| Maximum number of records shown per page. Default=10, Min=1, Max=100. For example, if set to 5, 5 records are shown per page. | [optional] + **sortBy** | [**SystemSortByEnum**](.md)| Returns list of systems sorted by <sort_by> field. To get ASC order sorted list, user sort_by = <key>. To get DESC order sorted list, use sort_by = (-)<key>. Current sort keys supported are id, name, and last_report_date. By default the list is sorted by decreasing system ID. | [optional] [enum: id, name, last_report_date, -id, -name, -last_report_date] + +### Return type + +[**GetSystemsResponse**](GetSystemsResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **retrieveSystemId** +> RetrieveSystemIdResponse retrieveSystemId(serialNum) + +Retrieve system for a given envoy serial number + +Get system ID by passing envoy serial number. If the serial number of a retired envoy is passed in the request param, a 404 Not Found response will be returned. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemDetailsApi() +val serialNum : kotlin.String = serialNum_example // kotlin.String | Envoy serial number. +try { + val result : RetrieveSystemIdResponse = apiInstance.retrieveSystemId(serialNum) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemDetailsApi#retrieveSystemId") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemDetailsApi#retrieveSystemId") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **serialNum** | **kotlin.String**| Envoy serial number. | + +### Return type + +[**RetrieveSystemIdResponse**](RetrieveSystemIdResponse.md) + +### Authorization + + +Configure OAuth2: + ApiClient.accessToken = "" +Configure ApiKey: + ApiClient.apiKey["key"] = "" + ApiClient.apiKeyPrefix["key"] = "" + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **searchSystems** +> SearchSystemsResponse searchSystems(page, size, params) + +Search and filter systems + +Search and filter systems. Provide only valid values in request parameters. Empty and invalid values will be ignored. Invalid keys will be rejected. + +### Example +```kotlin +// Import classes: +//import enlighten.monitoring.infrastructure.* +//import enlighten.monitoring.models.* + +val apiInstance = SystemDetailsApi() +val page : kotlin.Int = 56 // kotlin.Int | Page to be returned. Default=1, Min=1, e.g=2. +val size : kotlin.Int = 56 // kotlin.Int | Maximum number of records shown per page. Default=10, Min=1, Max=1000, e.g=5. +val params : SearchSystemsRequest = // SearchSystemsRequest | +try { + val result : SearchSystemsResponse = apiInstance.searchSystems(page, size, params) + println(result) +} catch (e: ClientException) { + println("4xx response calling SystemDetailsApi#searchSystems") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling SystemDetailsApi#searchSystems") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **kotlin.Int**| Page to be returned. Default=1, Min=1, e.g=2. | [optional] + **size** | **kotlin.Int**| Maximum number of records shown per page. Default=10, Min=1, Max=1000, e.g=5. | [optional] + **params** | [**SearchSystemsRequest**](SearchSystemsRequest.md)| | [optional] + +### Return type + +[**SearchSystemsResponse**](SearchSystemsResponse.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/monitoring/docs/SystemEnergyLifetimeProductionEnum.md b/kotlin/monitoring/docs/SystemEnergyLifetimeProductionEnum.md new file mode 100644 index 00000000..1f7bf274 --- /dev/null +++ b/kotlin/monitoring/docs/SystemEnergyLifetimeProductionEnum.md @@ -0,0 +1,10 @@ + +# SystemEnergyLifetimeProductionEnum + +## Enum + + + * `all` (value: `"all"`) + + + diff --git a/kotlin/monitoring/docs/SystemPublicNameEnum.md b/kotlin/monitoring/docs/SystemPublicNameEnum.md new file mode 100644 index 00000000..947953a5 --- /dev/null +++ b/kotlin/monitoring/docs/SystemPublicNameEnum.md @@ -0,0 +1,16 @@ + +# SystemPublicNameEnum + +## Enum + + + * `residential` (value: `"residential"`) + + * `all` (value: `"all"`) + + * `commercial` (value: `"commercial"`) + + * `other` (value: `"other"`) + + + diff --git a/kotlin/monitoring/docs/SystemSortByEnum.md b/kotlin/monitoring/docs/SystemSortByEnum.md new file mode 100644 index 00000000..da3fb6b6 --- /dev/null +++ b/kotlin/monitoring/docs/SystemSortByEnum.md @@ -0,0 +1,20 @@ + +# SystemSortByEnum + +## Enum + + + * `id` (value: `"id"`) + + * `name` (value: `"name"`) + + * `last_report_date` (value: `"last_report_date"`) + + * `MinusId` (value: `"-id"`) + + * `MinusName` (value: `"-name"`) + + * `MinusLast_report_date` (value: `"-last_report_date"`) + + + diff --git a/kotlin/monitoring/docs/SystemStatusEnum.md b/kotlin/monitoring/docs/SystemStatusEnum.md new file mode 100644 index 00000000..e2ad59dc --- /dev/null +++ b/kotlin/monitoring/docs/SystemStatusEnum.md @@ -0,0 +1,72 @@ + +# SystemStatusEnum + +## Enum + + + * `deactivated` (value: `"deactivated"`) + + * `normal` (value: `"normal"`) + + * `comm` (value: `"comm"`) + + * `micro` (value: `"micro"`) + + * `power` (value: `"power"`) + + * `meter` (value: `"meter"`) + + * `meter_issue` (value: `"meter_issue"`) + + * `battery` (value: `"battery"`) + + * `storage_idle` (value: `"storage_idle"`) + + * `encharge` (value: `"encharge"`) + + * `encharge_issue` (value: `"encharge_issue"`) + + * `enpower` (value: `"enpower"`) + + * `enpower_issue` (value: `"enpower_issue"`) + + * `retired` (value: `"retired"`) + + * `not_monitored` (value: `"not_monitored"`) + + * `unused` (value: `"unused"`) + + * `disabled` (value: `"disabled"`) + + * `debug` (value: `"debug"`) + + * `info` (value: `"info"`) + + * `monitored` (value: `"monitored"`) + + * `muted` (value: `"muted"`) + + * `warning` (value: `"warning"`) + + * `error` (value: `"error"`) + + * `no_data` (value: `"no_data"`) + + * `rma` (value: `"rma"`) + + * `unknown` (value: `"unknown"`) + + * `nsr` (value: `"nsr"`) + + * `any` (value: `"any"`) + + * `data_upload` (value: `"data_upload"`) + + * `on_grid` (value: `"on_grid"`) + + * `off_grid` (value: `"off_grid"`) + + * `grid_unknown` (value: `"grid_unknown"`) + + + diff --git a/kotlin/monitoring/docs/TelemetryGranularityEnum.md b/kotlin/monitoring/docs/TelemetryGranularityEnum.md new file mode 100644 index 00000000..ff392668 --- /dev/null +++ b/kotlin/monitoring/docs/TelemetryGranularityEnum.md @@ -0,0 +1,14 @@ + +# TelemetryGranularityEnum + +## Enum + + + * `_15mins` (value: `"15mins"`) + + * `day` (value: `"day"`) + + * `week` (value: `"week"`) + + + diff --git a/kotlin/monitoring/docs/TooManyRequestsError.md b/kotlin/monitoring/docs/TooManyRequestsError.md new file mode 100644 index 00000000..61f954de --- /dev/null +++ b/kotlin/monitoring/docs/TooManyRequestsError.md @@ -0,0 +1,16 @@ + +# TooManyRequestsError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **kotlin.String** | Error type. | [optional] +**details** | **kotlin.String** | Error details. | [optional] +**code** | **kotlin.Int** | Error code. | [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/monitoring/docs/UpdateSystemBatterySettingsRequest.md b/kotlin/monitoring/docs/UpdateSystemBatterySettingsRequest.md new file mode 100644 index 00000000..896c5bbe --- /dev/null +++ b/kotlin/monitoring/docs/UpdateSystemBatterySettingsRequest.md @@ -0,0 +1,12 @@ + +# UpdateSystemBatterySettingsRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**batteryMode** | **kotlin.String** | To update battery mode of the system (case sensitive). Available values are Savings Mode, Self-consumption, Full Backup. | [optional] +**reserveSoc** | **kotlin.Int** | Reserve soc for the current mode. Cannot be less than vls. | [optional] +**energyIndependence** | **kotlin.String** | Energy independence after peak hours \"enabled\"/\"disabled\". Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period. Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period. | [optional] + + + diff --git a/kotlin/monitoring/docs/UpdateSystemLoadControlSettingsRequest.md b/kotlin/monitoring/docs/UpdateSystemLoadControlSettingsRequest.md new file mode 100644 index 00000000..48ccca4f --- /dev/null +++ b/kotlin/monitoring/docs/UpdateSystemLoadControlSettingsRequest.md @@ -0,0 +1,15 @@ + +# UpdateSystemLoadControlSettingsRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **kotlin.String** | Name of the dry contact. Name cannot be changed. It is only used to identify the dry contact that needs to be updated. | +**loadName** | **kotlin.String** | Load Name of the load. Load Name cannot be changed. It is only used to identify the dry contact that needs to be updated. | [optional] +**mode** | **kotlin.String** | Mode. Available values are \"Scheduled\", \"Basic\", \"Advanced_BatteryPowered\", \"Manual_always_not_powered\", \"Manual_always_powered\", \"Advanced_GeneratorPowered\". | [optional] +**socLow** | **kotlin.Int** | Applicable for advanced mode. Load will be powered off when the battery soc reaches this level. It can be between 10 to 90. | [optional] +**essentialStartTime** | **kotlin.Int** | Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. | [optional] +**essentialEndTime** | **kotlin.Int** | Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. | [optional] + + + diff --git a/kotlin/monitoring/docs/UpdateSystemStormGuardSettingsRequest.md b/kotlin/monitoring/docs/UpdateSystemStormGuardSettingsRequest.md new file mode 100644 index 00000000..9c7831f4 --- /dev/null +++ b/kotlin/monitoring/docs/UpdateSystemStormGuardSettingsRequest.md @@ -0,0 +1,10 @@ + +# UpdateSystemStormGuardSettingsRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stormGuardStatus** | **kotlin.String** | Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the locality. Available values are enabled, disabled. | + + + diff --git a/kotlin/monitoring/gradle/wrapper/gradle-wrapper.jar b/kotlin/monitoring/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..d64cd4917707c1f8861d8cb53dd15194d4248596 GIT binary patch literal 43462 zcma&NWl&^owk(X(xVyW%ySuwf;qI=D6|RlDJ2cR^yEKh!@I- zp9QeisK*rlxC>+~7Dk4IxIRsKBHqdR9b3+fyL=ynHmIDe&|>O*VlvO+%z5;9Z$|DJ zb4dO}-R=MKr^6EKJiOrJdLnCJn>np?~vU-1sSFgPu;pthGwf}bG z(1db%xwr#x)r+`4AGu$j7~u2MpVs3VpLp|mx&;>`0p0vH6kF+D2CY0fVdQOZ@h;A` z{infNyvmFUiu*XG}RNMNwXrbec_*a3N=2zJ|Wh5z* z5rAX$JJR{#zP>KY**>xHTuw?|-Rg|o24V)74HcfVT;WtQHXlE+_4iPE8QE#DUm%x0 zEKr75ur~W%w#-My3Tj`hH6EuEW+8K-^5P62$7Sc5OK+22qj&Pd1;)1#4tKihi=~8C zHiQSst0cpri6%OeaR`PY>HH_;CPaRNty%WTm4{wDK8V6gCZlG@U3$~JQZ;HPvDJcT1V{ z?>H@13MJcCNe#5z+MecYNi@VT5|&UiN1D4ATT+%M+h4c$t;C#UAs3O_q=GxK0}8%8 z8J(_M9bayxN}69ex4dzM_P3oh@ZGREjVvn%%r7=xjkqxJP4kj}5tlf;QosR=%4L5y zWhgejO=vao5oX%mOHbhJ8V+SG&K5dABn6!WiKl{|oPkq(9z8l&Mm%(=qGcFzI=eLu zWc_oCLyf;hVlB@dnwY98?75B20=n$>u3b|NB28H0u-6Rpl((%KWEBOfElVWJx+5yg z#SGqwza7f}$z;n~g%4HDU{;V{gXIhft*q2=4zSezGK~nBgu9-Q*rZ#2f=Q}i2|qOp z!!y4p)4o=LVUNhlkp#JL{tfkhXNbB=Ox>M=n6soptJw-IDI|_$is2w}(XY>a=H52d z3zE$tjPUhWWS+5h=KVH&uqQS=$v3nRs&p$%11b%5qtF}S2#Pc`IiyBIF4%A!;AVoI zXU8-Rpv!DQNcF~(qQnyyMy=-AN~U>#&X1j5BLDP{?K!%h!;hfJI>$mdLSvktEr*89 zdJHvby^$xEX0^l9g$xW-d?J;L0#(`UT~zpL&*cEh$L|HPAu=P8`OQZV!-}l`noSp_ zQ-1$q$R-gDL)?6YaM!=8H=QGW$NT2SeZlb8PKJdc=F-cT@j7Xags+Pr*jPtlHFnf- zh?q<6;)27IdPc^Wdy-mX%2s84C1xZq9Xms+==F4);O`VUASmu3(RlgE#0+#giLh-& zcxm3_e}n4{%|X zJp{G_j+%`j_q5}k{eW&TlP}J2wtZ2^<^E(O)4OQX8FDp6RJq!F{(6eHWSD3=f~(h} zJXCf7=r<16X{pHkm%yzYI_=VDP&9bmI1*)YXZeB}F? z(%QsB5fo*FUZxK$oX~X^69;x~j7ms8xlzpt-T15e9}$4T-pC z6PFg@;B-j|Ywajpe4~bk#S6(fO^|mm1hKOPfA%8-_iGCfICE|=P_~e;Wz6my&)h_~ zkv&_xSAw7AZ%ThYF(4jADW4vg=oEdJGVOs>FqamoL3Np8>?!W#!R-0%2Bg4h?kz5I zKV-rKN2n(vUL%D<4oj@|`eJ>0i#TmYBtYmfla;c!ATW%;xGQ0*TW@PTlGG><@dxUI zg>+3SiGdZ%?5N=8uoLA|$4isK$aJ%i{hECP$bK{J#0W2gQ3YEa zZQ50Stn6hqdfxJ*9#NuSLwKFCUGk@c=(igyVL;;2^wi4o30YXSIb2g_ud$ zgpCr@H0qWtk2hK8Q|&wx)}4+hTYlf;$a4#oUM=V@Cw#!$(nOFFpZ;0lc!qd=c$S}Z zGGI-0jg~S~cgVT=4Vo)b)|4phjStD49*EqC)IPwyeKBLcN;Wu@Aeph;emROAwJ-0< z_#>wVm$)ygH|qyxZaet&(Vf%pVdnvKWJn9`%DAxj3ot;v>S$I}jJ$FLBF*~iZ!ZXE zkvui&p}fI0Y=IDX)mm0@tAd|fEHl~J&K}ZX(Mm3cm1UAuwJ42+AO5@HwYfDH7ipIc zmI;1J;J@+aCNG1M`Btf>YT>~c&3j~Qi@Py5JT6;zjx$cvOQW@3oQ>|}GH?TW-E z1R;q^QFjm5W~7f}c3Ww|awg1BAJ^slEV~Pk`Kd`PS$7;SqJZNj->it4DW2l15}xP6 zoCl$kyEF%yJni0(L!Z&14m!1urXh6Btj_5JYt1{#+H8w?5QI%% zo-$KYWNMJVH?Hh@1n7OSu~QhSswL8x0=$<8QG_zepi_`y_79=nK=_ZP_`Em2UI*tyQoB+r{1QYZCpb?2OrgUw#oRH$?^Tj!Req>XiE#~B|~ z+%HB;=ic+R@px4Ld8mwpY;W^A%8%l8$@B@1m5n`TlKI6bz2mp*^^^1mK$COW$HOfp zUGTz-cN9?BGEp}5A!mDFjaiWa2_J2Iq8qj0mXzk; z66JBKRP{p%wN7XobR0YjhAuW9T1Gw3FDvR5dWJ8ElNYF94eF3ebu+QwKjtvVu4L zI9ip#mQ@4uqVdkl-TUQMb^XBJVLW(-$s;Nq;@5gr4`UfLgF$adIhd?rHOa%D);whv z=;krPp~@I+-Z|r#s3yCH+c1US?dnm+C*)r{m+86sTJusLdNu^sqLrfWed^ndHXH`m zd3#cOe3>w-ga(Dus_^ppG9AC>Iq{y%%CK+Cro_sqLCs{VLuK=dev>OL1dis4(PQ5R zcz)>DjEkfV+MO;~>VUlYF00SgfUo~@(&9$Iy2|G0T9BSP?&T22>K46D zL*~j#yJ?)^*%J3!16f)@Y2Z^kS*BzwfAQ7K96rFRIh>#$*$_Io;z>ux@}G98!fWR@ zGTFxv4r~v)Gsd|pF91*-eaZ3Qw1MH$K^7JhWIdX%o$2kCbvGDXy)a?@8T&1dY4`;L z4Kn+f%SSFWE_rpEpL9bnlmYq`D!6F%di<&Hh=+!VI~j)2mfil03T#jJ_s?}VV0_hp z7T9bWxc>Jm2Z0WMU?`Z$xE74Gu~%s{mW!d4uvKCx@WD+gPUQ zV0vQS(Ig++z=EHN)BR44*EDSWIyT~R4$FcF*VEY*8@l=218Q05D2$|fXKFhRgBIEE zdDFB}1dKkoO^7}{5crKX!p?dZWNz$m>1icsXG2N+((x0OIST9Zo^DW_tytvlwXGpn zs8?pJXjEG;T@qrZi%#h93?FP$!&P4JA(&H61tqQi=opRzNpm zkrG}$^t9&XduK*Qa1?355wd8G2CI6QEh@Ua>AsD;7oRUNLPb76m4HG3K?)wF~IyS3`fXuNM>${?wmB zpVz;?6_(Fiadfd{vUCBM*_kt$+F3J+IojI;9L(gc9n3{sEZyzR9o!_mOwFC#tQ{Q~ zP3-`#uK#tP3Q7~Q;4H|wjZHO8h7e4IuBxl&vz2w~D8)w=Wtg31zpZhz%+kzSzL*dV zwp@{WU4i;hJ7c2f1O;7Mz6qRKeASoIv0_bV=i@NMG*l<#+;INk-^`5w@}Dj~;k=|}qM1vq_P z|GpBGe_IKq|LNy9SJhKOQ$c=5L{Dv|Q_lZl=-ky*BFBJLW9&y_C|!vyM~rQx=!vun z?rZJQB5t}Dctmui5i31C_;_}CEn}_W%>oSXtt>@kE1=JW*4*v4tPp;O6 zmAk{)m!)}34pTWg8{i>($%NQ(Tl;QC@J@FfBoc%Gr&m560^kgSfodAFrIjF}aIw)X zoXZ`@IsMkc8_=w%-7`D6Y4e*CG8k%Ud=GXhsTR50jUnm+R*0A(O3UKFg0`K;qp1bl z7``HN=?39ic_kR|^R^~w-*pa?Vj#7|e9F1iRx{GN2?wK!xR1GW!qa=~pjJb-#u1K8 zeR?Y2i-pt}yJq;SCiVHODIvQJX|ZJaT8nO+(?HXbLefulKKgM^B(UIO1r+S=7;kLJ zcH}1J=Px2jsh3Tec&v8Jcbng8;V-`#*UHt?hB(pmOipKwf3Lz8rG$heEB30Sg*2rx zV<|KN86$soN(I!BwO`1n^^uF2*x&vJ$2d$>+`(romzHP|)K_KkO6Hc>_dwMW-M(#S zK(~SiXT1@fvc#U+?|?PniDRm01)f^#55;nhM|wi?oG>yBsa?~?^xTU|fX-R(sTA+5 zaq}-8Tx7zrOy#3*JLIIVsBmHYLdD}!0NP!+ITW+Thn0)8SS!$@)HXwB3tY!fMxc#1 zMp3H?q3eD?u&Njx4;KQ5G>32+GRp1Ee5qMO0lZjaRRu&{W<&~DoJNGkcYF<5(Ab+J zgO>VhBl{okDPn78<%&e2mR{jwVCz5Og;*Z;;3%VvoGo_;HaGLWYF7q#jDX=Z#Ml`H z858YVV$%J|e<1n`%6Vsvq7GmnAV0wW4$5qQ3uR@1i>tW{xrl|ExywIc?fNgYlA?C5 zh$ezAFb5{rQu6i7BSS5*J-|9DQ{6^BVQ{b*lq`xS@RyrsJN?-t=MTMPY;WYeKBCNg z^2|pN!Q^WPJuuO4!|P@jzt&tY1Y8d%FNK5xK(!@`jO2aEA*4 zkO6b|UVBipci?){-Ke=+1;mGlND8)6+P;8sq}UXw2hn;fc7nM>g}GSMWu&v&fqh

iViYT=fZ(|3Ox^$aWPp4a8h24tD<|8-!aK0lHgL$N7Efw}J zVIB!7=T$U`ao1?upi5V4Et*-lTG0XvExbf!ya{cua==$WJyVG(CmA6Of*8E@DSE%L z`V^$qz&RU$7G5mg;8;=#`@rRG`-uS18$0WPN@!v2d{H2sOqP|!(cQ@ zUHo!d>>yFArLPf1q`uBvY32miqShLT1B@gDL4XoVTK&@owOoD)OIHXrYK-a1d$B{v zF^}8D3Y^g%^cnvScOSJR5QNH+BI%d|;J;wWM3~l>${fb8DNPg)wrf|GBP8p%LNGN# z3EaIiItgwtGgT&iYCFy9-LG}bMI|4LdmmJt@V@% zb6B)1kc=T)(|L@0;wr<>=?r04N;E&ef+7C^`wPWtyQe(*pD1pI_&XHy|0gIGHMekd zF_*M4yi6J&Z4LQj65)S zXwdM{SwUo%3SbPwFsHgqF@V|6afT|R6?&S;lw=8% z3}@9B=#JI3@B*#4s!O))~z zc>2_4Q_#&+5V`GFd?88^;c1i7;Vv_I*qt!_Yx*n=;rj!82rrR2rQ8u5(Ejlo{15P% zs~!{%XJ>FmJ})H^I9bn^Re&38H{xA!0l3^89k(oU;bZWXM@kn$#aoS&Y4l^-WEn-fH39Jb9lA%s*WsKJQl?n9B7_~P z-XM&WL7Z!PcoF6_D>V@$CvUIEy=+Z&0kt{szMk=f1|M+r*a43^$$B^MidrT0J;RI` z(?f!O<8UZkm$_Ny$Hth1J#^4ni+im8M9mr&k|3cIgwvjAgjH z8`N&h25xV#v*d$qBX5jkI|xOhQn!>IYZK7l5#^P4M&twe9&Ey@@GxYMxBZq2e7?`q z$~Szs0!g{2fGcp9PZEt|rdQ6bhAgpcLHPz?f-vB?$dc*!9OL?Q8mn7->bFD2Si60* z!O%y)fCdMSV|lkF9w%x~J*A&srMyYY3{=&$}H zGQ4VG_?$2X(0|vT0{=;W$~icCI{b6W{B!Q8xdGhF|D{25G_5_+%s(46lhvNLkik~R z>nr(&C#5wwOzJZQo9m|U<;&Wk!_#q|V>fsmj1g<6%hB{jGoNUPjgJslld>xmODzGjYc?7JSuA?A_QzjDw5AsRgi@Y|Z0{F{!1=!NES-#*f^s4l0Hu zz468))2IY5dmD9pa*(yT5{EyP^G>@ZWumealS-*WeRcZ}B%gxq{MiJ|RyX-^C1V=0 z@iKdrGi1jTe8Ya^x7yyH$kBNvM4R~`fbPq$BzHum-3Zo8C6=KW@||>zsA8-Y9uV5V z#oq-f5L5}V<&wF4@X@<3^C%ptp6+Ce)~hGl`kwj)bsAjmo_GU^r940Z-|`<)oGnh7 zFF0Tde3>ui?8Yj{sF-Z@)yQd~CGZ*w-6p2U<8}JO-sRsVI5dBji`01W8A&3$?}lxBaC&vn0E$c5tW* zX>5(zzZ=qn&!J~KdsPl;P@bmA-Pr8T*)eh_+Dv5=Ma|XSle6t(k8qcgNyar{*ReQ8 zTXwi=8vr>!3Ywr+BhggHDw8ke==NTQVMCK`$69fhzEFB*4+H9LIvdt-#IbhZvpS}} zO3lz;P?zr0*0$%-Rq_y^k(?I{Mk}h@w}cZpMUp|ucs55bcloL2)($u%mXQw({Wzc~ z;6nu5MkjP)0C(@%6Q_I_vsWrfhl7Zpoxw#WoE~r&GOSCz;_ro6i(^hM>I$8y>`!wW z*U^@?B!MMmb89I}2(hcE4zN2G^kwyWCZp5JG>$Ez7zP~D=J^LMjSM)27_0B_X^C(M z`fFT+%DcKlu?^)FCK>QzSnV%IsXVcUFhFdBP!6~se&xxrIxsvySAWu++IrH;FbcY$ z2DWTvSBRfLwdhr0nMx+URA$j3i7_*6BWv#DXfym?ZRDcX9C?cY9sD3q)uBDR3uWg= z(lUIzB)G$Hr!){>E{s4Dew+tb9kvToZp-1&c?y2wn@Z~(VBhqz`cB;{E4(P3N2*nJ z_>~g@;UF2iG{Kt(<1PyePTKahF8<)pozZ*xH~U-kfoAayCwJViIrnqwqO}7{0pHw$ zs2Kx?s#vQr7XZ264>5RNKSL8|Ty^=PsIx^}QqOOcfpGUU4tRkUc|kc7-!Ae6!+B{o~7nFpm3|G5^=0#Bnm6`V}oSQlrX(u%OWnC zoLPy&Q;1Jui&7ST0~#+}I^&?vcE*t47~Xq#YwvA^6^} z`WkC)$AkNub|t@S!$8CBlwbV~?yp&@9h{D|3z-vJXgzRC5^nYm+PyPcgRzAnEi6Q^gslXYRv4nycsy-SJu?lMps-? zV`U*#WnFsdPLL)Q$AmD|0`UaC4ND07+&UmOu!eHruzV|OUox<+Jl|Mr@6~C`T@P%s zW7sgXLF2SSe9Fl^O(I*{9wsFSYb2l%-;&Pi^dpv!{)C3d0AlNY6!4fgmSgj_wQ*7Am7&$z;Jg&wgR-Ih;lUvWS|KTSg!&s_E9_bXBkZvGiC6bFKDWZxsD$*NZ#_8bl zG1P-#@?OQzED7@jlMJTH@V!6k;W>auvft)}g zhoV{7$q=*;=l{O>Q4a@ ziMjf_u*o^PsO)#BjC%0^h>Xp@;5$p{JSYDt)zbb}s{Kbt!T*I@Pk@X0zds6wsefuU zW$XY%yyRGC94=6mf?x+bbA5CDQ2AgW1T-jVAJbm7K(gp+;v6E0WI#kuACgV$r}6L? zd|Tj?^%^*N&b>Dd{Wr$FS2qI#Ucs1yd4N+RBUQiSZGujH`#I)mG&VKoDh=KKFl4=G z&MagXl6*<)$6P}*Tiebpz5L=oMaPrN+caUXRJ`D?=K9!e0f{@D&cZLKN?iNP@X0aF zE(^pl+;*T5qt?1jRC=5PMgV!XNITRLS_=9{CJExaQj;lt!&pdzpK?8p>%Mb+D z?yO*uSung=-`QQ@yX@Hyd4@CI^r{2oiu`%^bNkz+Nkk!IunjwNC|WcqvX~k=><-I3 zDQdbdb|!v+Iz01$w@aMl!R)koD77Xp;eZwzSl-AT zr@Vu{=xvgfq9akRrrM)}=!=xcs+U1JO}{t(avgz`6RqiiX<|hGG1pmop8k6Q+G_mv zJv|RfDheUp2L3=^C=4aCBMBn0aRCU(DQwX-W(RkRwmLeuJYF<0urcaf(=7)JPg<3P zQs!~G)9CT18o!J4{zX{_e}4eS)U-E)0FAt}wEI(c0%HkxgggW;(1E=>J17_hsH^sP z%lT0LGgbUXHx-K*CI-MCrP66UP0PvGqM$MkeLyqHdbgP|_Cm!7te~b8p+e6sQ_3k| zVcwTh6d83ltdnR>D^)BYQpDKlLk3g0Hdcgz2}%qUs9~~Rie)A-BV1mS&naYai#xcZ z(d{8=-LVpTp}2*y)|gR~;qc7fp26}lPcLZ#=JpYcn3AT9(UIdOyg+d(P5T7D&*P}# zQCYplZO5|7+r19%9e`v^vfSS1sbX1c%=w1;oyruXB%Kl$ACgKQ6=qNWLsc=28xJjg zwvsI5-%SGU|3p>&zXVl^vVtQT3o-#$UT9LI@Npz~6=4!>mc431VRNN8od&Ul^+G_kHC`G=6WVWM z%9eWNyy(FTO|A+@x}Ou3CH)oi;t#7rAxdIXfNFwOj_@Y&TGz6P_sqiB`Q6Lxy|Q{`|fgmRG(k+!#b*M+Z9zFce)f-7;?Km5O=LHV9f9_87; zF7%R2B+$?@sH&&-$@tzaPYkw0;=i|;vWdI|Wl3q_Zu>l;XdIw2FjV=;Mq5t1Q0|f< zs08j54Bp`3RzqE=2enlkZxmX6OF+@|2<)A^RNQpBd6o@OXl+i)zO%D4iGiQNuXd+zIR{_lb96{lc~bxsBveIw6umhShTX+3@ZJ=YHh@ zWY3(d0azg;7oHn>H<>?4@*RQbi>SmM=JrHvIG(~BrvI)#W(EAeO6fS+}mxxcc+X~W6&YVl86W9WFSS}Vz-f9vS?XUDBk)3TcF z8V?$4Q)`uKFq>xT=)Y9mMFVTUk*NIA!0$?RP6Ig0TBmUFrq*Q-Agq~DzxjStQyJ({ zBeZ;o5qUUKg=4Hypm|}>>L=XKsZ!F$yNTDO)jt4H0gdQ5$f|d&bnVCMMXhNh)~mN z@_UV6D7MVlsWz+zM+inZZp&P4fj=tm6fX)SG5H>OsQf_I8c~uGCig$GzuwViK54bcgL;VN|FnyQl>Ed7(@>=8$a_UKIz|V6CeVSd2(P z0Uu>A8A+muM%HLFJQ9UZ5c)BSAv_zH#1f02x?h9C}@pN@6{>UiAp>({Fn(T9Q8B z^`zB;kJ5b`>%dLm+Ol}ty!3;8f1XDSVX0AUe5P#@I+FQ-`$(a;zNgz)4x5hz$Hfbg z!Q(z26wHLXko(1`;(BAOg_wShpX0ixfWq3ponndY+u%1gyX)_h=v1zR#V}#q{au6; z!3K=7fQwnRfg6FXtNQmP>`<;!N137paFS%y?;lb1@BEdbvQHYC{976l`cLqn;b8lp zIDY>~m{gDj(wfnK!lpW6pli)HyLEiUrNc%eXTil|F2s(AY+LW5hkKb>TQ3|Q4S9rr zpDs4uK_co6XPsn_z$LeS{K4jFF`2>U`tbgKdyDne`xmR<@6AA+_hPNKCOR-Zqv;xk zu5!HsBUb^!4uJ7v0RuH-7?l?}b=w5lzzXJ~gZcxRKOovSk@|#V+MuX%Y+=;14i*%{)_gSW9(#4%)AV#3__kac1|qUy!uyP{>?U#5wYNq}y$S9pCc zFc~4mgSC*G~j0u#qqp9 z${>3HV~@->GqEhr_Xwoxq?Hjn#=s2;i~g^&Hn|aDKpA>Oc%HlW(KA1?BXqpxB;Ydx)w;2z^MpjJ(Qi(X!$5RC z*P{~%JGDQqojV>2JbEeCE*OEu!$XJ>bWA9Oa_Hd;y)F%MhBRi*LPcdqR8X`NQ&1L# z5#9L*@qxrx8n}LfeB^J{%-?SU{FCwiWyHp682F+|pa+CQa3ZLzBqN1{)h4d6+vBbV zC#NEbQLC;}me3eeYnOG*nXOJZEU$xLZ1<1Y=7r0(-U0P6-AqwMAM`a(Ed#7vJkn6plb4eI4?2y3yOTGmmDQ!z9`wzbf z_OY#0@5=bnep;MV0X_;;SJJWEf^E6Bd^tVJ9znWx&Ks8t*B>AM@?;D4oWUGc z!H*`6d7Cxo6VuyS4Eye&L1ZRhrRmN6Lr`{NL(wDbif|y&z)JN>Fl5#Wi&mMIr5i;x zBx}3YfF>>8EC(fYnmpu~)CYHuHCyr5*`ECap%t@y=jD>!_%3iiE|LN$mK9>- zHdtpy8fGZtkZF?%TW~29JIAfi2jZT8>OA7=h;8T{{k?c2`nCEx9$r zS+*&vt~2o^^J+}RDG@+9&M^K*z4p{5#IEVbz`1%`m5c2};aGt=V?~vIM}ZdPECDI)47|CWBCfDWUbxBCnmYivQ*0Nu_xb*C>~C9(VjHM zxe<*D<#dQ8TlpMX2c@M<9$w!RP$hpG4cs%AI){jp*Sj|*`m)5(Bw*A0$*i-(CA5#%>a)$+jI2C9r6|(>J8InryENI z$NohnxDUB;wAYDwrb*!N3noBTKPpPN}~09SEL18tkG zxgz(RYU_;DPT{l?Q$+eaZaxnsWCA^ds^0PVRkIM%bOd|G2IEBBiz{&^JtNsODs;5z zICt_Zj8wo^KT$7Bg4H+y!Df#3mbl%%?|EXe!&(Vmac1DJ*y~3+kRKAD=Ovde4^^%~ zw<9av18HLyrf*_>Slp;^i`Uy~`mvBjZ|?Ad63yQa#YK`4+c6;pW4?XIY9G1(Xh9WO8{F-Aju+nS9Vmv=$Ac0ienZ+p9*O%NG zMZKy5?%Z6TAJTE?o5vEr0r>f>hb#2w2U3DL64*au_@P!J!TL`oH2r*{>ffu6|A7tv zL4juf$DZ1MW5ZPsG!5)`k8d8c$J$o;%EIL0va9&GzWvkS%ZsGb#S(?{!UFOZ9<$a| zY|a+5kmD5N&{vRqkgY>aHsBT&`rg|&kezoD)gP0fsNYHsO#TRc_$n6Lf1Z{?+DLziXlHrq4sf(!>O{?Tj;Eh@%)+nRE_2VxbN&&%%caU#JDU%vL3}Cb zsb4AazPI{>8H&d=jUaZDS$-0^AxE@utGs;-Ez_F(qC9T=UZX=>ok2k2 ziTn{K?y~a5reD2A)P${NoI^>JXn>`IeArow(41c-Wm~)wiryEP(OS{YXWi7;%dG9v zI?mwu1MxD{yp_rrk!j^cKM)dc4@p4Ezyo%lRN|XyD}}>v=Xoib0gOcdXrQ^*61HNj z=NP|pd>@yfvr-=m{8$3A8TQGMTE7g=z!%yt`8`Bk-0MMwW~h^++;qyUP!J~ykh1GO z(FZ59xuFR$(WE;F@UUyE@Sp>`aVNjyj=Ty>_Vo}xf`e7`F;j-IgL5`1~-#70$9_=uBMq!2&1l zomRgpD58@)YYfvLtPW}{C5B35R;ZVvB<<#)x%srmc_S=A7F@DW8>QOEGwD6suhwCg z>Pa+YyULhmw%BA*4yjDp|2{!T98~<6Yfd(wo1mQ!KWwq0eg+6)o1>W~f~kL<-S+P@$wx*zeI|1t7z#Sxr5 zt6w+;YblPQNplq4Z#T$GLX#j6yldXAqj>4gAnnWtBICUnA&-dtnlh=t0Ho_vEKwV` z)DlJi#!@nkYV#$!)@>udAU*hF?V`2$Hf=V&6PP_|r#Iv*J$9)pF@X3`k;5})9^o4y z&)~?EjX5yX12O(BsFy-l6}nYeuKkiq`u9145&3Ssg^y{5G3Pse z9w(YVa0)N-fLaBq1`P!_#>SS(8fh_5!f{UrgZ~uEdeMJIz7DzI5!NHHqQtm~#CPij z?=N|J>nPR6_sL7!f4hD_|KH`vf8(Wpnj-(gPWH+ZvID}%?~68SwhPTC3u1_cB`otq z)U?6qo!ZLi5b>*KnYHWW=3F!p%h1;h{L&(Q&{qY6)_qxNfbP6E3yYpW!EO+IW3?@J z);4>g4gnl^8klu7uA>eGF6rIGSynacogr)KUwE_R4E5Xzi*Qir@b-jy55-JPC8c~( zo!W8y9OGZ&`xmc8;=4-U9=h{vCqfCNzYirONmGbRQlR`WWlgnY+1wCXbMz&NT~9*| z6@FrzP!LX&{no2!Ln_3|I==_4`@}V?4a;YZKTdw;vT<+K+z=uWbW(&bXEaWJ^W8Td z-3&1bY^Z*oM<=M}LVt>_j+p=2Iu7pZmbXrhQ_k)ysE9yXKygFNw$5hwDn(M>H+e1&9BM5!|81vd%r%vEm zqxY3?F@fb6O#5UunwgAHR9jp_W2zZ}NGp2%mTW@(hz7$^+a`A?mb8|_G*GNMJ) zjqegXQio=i@AINre&%ofexAr95aop5C+0MZ0m-l=MeO8m3epm7U%vZB8+I+C*iNFM z#T3l`gknX;D$-`2XT^Cg*vrv=RH+P;_dfF++cP?B_msQI4j+lt&rX2)3GaJx%W*Nn zkML%D{z5tpHH=dksQ*gzc|}gzW;lwAbxoR07VNgS*-c3d&8J|;@3t^ zVUz*J*&r7DFRuFVDCJDK8V9NN5hvpgGjwx+5n)qa;YCKe8TKtdnh{I7NU9BCN!0dq zczrBk8pE{{@vJa9ywR@mq*J=v+PG;?fwqlJVhijG!3VmIKs>9T6r7MJpC)m!Tc#>g zMtVsU>wbwFJEfwZ{vB|ZlttNe83)$iz`~#8UJ^r)lJ@HA&G#}W&ZH*;k{=TavpjWE z7hdyLZPf*X%Gm}i`Y{OGeeu^~nB8=`{r#TUrM-`;1cBvEd#d!kPqIgYySYhN-*1;L z^byj%Yi}Gx)Wnkosi337BKs}+5H5dth1JA{Ir-JKN$7zC)*}hqeoD(WfaUDPT>0`- z(6sa0AoIqASwF`>hP}^|)a_j2s^PQn*qVC{Q}htR z5-)duBFXT_V56-+UohKXlq~^6uf!6sA#ttk1o~*QEy_Y-S$gAvq47J9Vtk$5oA$Ct zYhYJ@8{hsC^98${!#Ho?4y5MCa7iGnfz}b9jE~h%EAAv~Qxu)_rAV;^cygV~5r_~?l=B`zObj7S=H=~$W zPtI_m%g$`kL_fVUk9J@>EiBH zOO&jtn~&`hIFMS5S`g8w94R4H40mdNUH4W@@XQk1sr17b{@y|JB*G9z1|CrQjd+GX z6+KyURG3;!*BQrentw{B2R&@2&`2}n(z-2&X7#r!{yg@Soy}cRD~j zj9@UBW+N|4HW4AWapy4wfUI- zZ`gSL6DUlgj*f1hSOGXG0IVH8HxK?o2|3HZ;KW{K+yPAlxtb)NV_2AwJm|E)FRs&& z=c^e7bvUsztY|+f^k7NXs$o1EUq>cR7C0$UKi6IooHWlK_#?IWDkvywnzg&ThWo^? z2O_N{5X39#?eV9l)xI(>@!vSB{DLt*oY!K1R8}_?%+0^C{d9a%N4 zoxHVT1&Lm|uDX%$QrBun5e-F`HJ^T$ zmzv)p@4ZHd_w9!%Hf9UYNvGCw2TTTbrj9pl+T9%-_-}L(tES>Or-}Z4F*{##n3~L~TuxjirGuIY#H7{%$E${?p{Q01 zi6T`n;rbK1yIB9jmQNycD~yZq&mbIsFWHo|ZAChSFPQa<(%d8mGw*V3fh|yFoxOOiWJd(qvVb!Z$b88cg->N=qO*4k~6;R==|9ihg&riu#P~s4Oap9O7f%crSr^rljeIfXDEg>wi)&v*a%7zpz<9w z*r!3q9J|390x`Zk;g$&OeN&ctp)VKRpDSV@kU2Q>jtok($Y-*x8_$2piTxun81@vt z!Vj?COa0fg2RPXMSIo26T=~0d`{oGP*eV+$!0I<(4azk&Vj3SiG=Q!6mX0p$z7I}; z9BJUFgT-K9MQQ-0@Z=^7R<{bn2Fm48endsSs`V7_@%8?Bxkqv>BDoVcj?K#dV#uUP zL1ND~?D-|VGKe3Rw_7-Idpht>H6XRLh*U7epS6byiGvJpr%d}XwfusjH9g;Z98H`x zyde%%5mhGOiL4wljCaWCk-&uE4_OOccb9c!ZaWt4B(wYl!?vyzl%7n~QepN&eFUrw zFIOl9c({``6~QD+43*_tzP{f2x41h(?b43^y6=iwyB)2os5hBE!@YUS5?N_tXd=h( z)WE286Fbd>R4M^P{!G)f;h<3Q>Fipuy+d2q-)!RyTgt;wr$(?9ox3;q+{E*ZQHhOn;lM`cjnu9 zXa48ks-v(~b*;MAI<>YZH(^NV8vjb34beE<_cwKlJoR;k6lJNSP6v}uiyRD?|0w+X@o1ONrH8a$fCxXpf? z?$DL0)7|X}Oc%h^zrMKWc-NS9I0Utu@>*j}b@tJ=ixQSJ={4@854wzW@E>VSL+Y{i z#0b=WpbCZS>kUCO_iQz)LoE>P5LIG-hv9E+oG}DtlIDF>$tJ1aw9^LuhLEHt?BCj& z(O4I8v1s#HUi5A>nIS-JK{v!7dJx)^Yg%XjNmlkWAq2*cv#tHgz`Y(bETc6CuO1VkN^L-L3j_x<4NqYb5rzrLC-7uOv z!5e`GZt%B782C5-fGnn*GhDF$%(qP<74Z}3xx+{$4cYKy2ikxI7B2N+2r07DN;|-T->nU&!=Cm#rZt%O_5c&1Z%nlWq3TKAW0w zQqemZw_ue--2uKQsx+niCUou?HjD`xhEjjQd3%rrBi82crq*~#uA4+>vR<_S{~5ce z-2EIl?~s z1=GVL{NxP1N3%=AOaC}j_Fv=ur&THz zyO!d9kHq|c73kpq`$+t+8Bw7MgeR5~`d7ChYyGCBWSteTB>8WAU(NPYt2Dk`@#+}= zI4SvLlyk#pBgVigEe`?NG*vl7V6m+<}%FwPV=~PvvA)=#ths==DRTDEYh4V5}Cf$z@#;< zyWfLY_5sP$gc3LLl2x+Ii)#b2nhNXJ{R~vk`s5U7Nyu^3yFg&D%Txwj6QezMX`V(x z=C`{76*mNb!qHHs)#GgGZ_7|vkt9izl_&PBrsu@}L`X{95-2jf99K)0=*N)VxBX2q z((vkpP2RneSIiIUEnGb?VqbMb=Zia+rF~+iqslydE34cSLJ&BJW^3knX@M;t*b=EA zNvGzv41Ld_T+WT#XjDB840vovUU^FtN_)G}7v)1lPetgpEK9YS^OWFkPoE{ovj^=@ zO9N$S=G$1ecndT_=5ehth2Lmd1II-PuT~C9`XVePw$y8J#dpZ?Tss<6wtVglm(Ok7 z3?^oi@pPio6l&!z8JY(pJvG=*pI?GIOu}e^EB6QYk$#FJQ%^AIK$I4epJ+9t?KjqA+bkj&PQ*|vLttme+`9G=L% ziadyMw_7-M)hS(3E$QGNCu|o23|%O+VN7;Qggp?PB3K-iSeBa2b}V4_wY`G1Jsfz4 z9|SdB^;|I8E8gWqHKx!vj_@SMY^hLEIbSMCuE?WKq=c2mJK z8LoG-pnY!uhqFv&L?yEuxo{dpMTsmCn)95xanqBrNPTgXP((H$9N${Ow~Is-FBg%h z53;|Y5$MUN)9W2HBe2TD`ct^LHI<(xWrw}$qSoei?}s)&w$;&!14w6B6>Yr6Y8b)S z0r71`WmAvJJ`1h&poLftLUS6Ir zC$bG9!Im_4Zjse)#K=oJM9mHW1{%l8sz$1o?ltdKlLTxWWPB>Vk22czVt|1%^wnN@*!l)}?EgtvhC>vlHm^t+ogpgHI1_$1ox9e;>0!+b(tBrmXRB`PY1vp-R**8N7 zGP|QqI$m(Rdu#=(?!(N}G9QhQ%o!aXE=aN{&wtGP8|_qh+7a_j_sU5|J^)vxq;# zjvzLn%_QPHZZIWu1&mRAj;Sa_97p_lLq_{~j!M9N^1yp3U_SxRqK&JnR%6VI#^E12 z>CdOVI^_9aPK2eZ4h&^{pQs}xsijXgFYRIxJ~N7&BB9jUR1fm!(xl)mvy|3e6-B3j zJn#ajL;bFTYJ2+Q)tDjx=3IklO@Q+FFM}6UJr6km7hj7th9n_&JR7fnqC!hTZoM~T zBeaVFp%)0cbPhejX<8pf5HyRUj2>aXnXBqDJe73~J%P(2C?-RT{c3NjE`)om! zl$uewSgWkE66$Kb34+QZZvRn`fob~Cl9=cRk@Es}KQm=?E~CE%spXaMO6YmrMl%9Q zlA3Q$3|L1QJ4?->UjT&CBd!~ru{Ih^in&JXO=|<6J!&qp zRe*OZ*cj5bHYlz!!~iEKcuE|;U4vN1rk$xq6>bUWD*u(V@8sG^7>kVuo(QL@Ki;yL zWC!FT(q{E8#on>%1iAS0HMZDJg{Z{^!De(vSIq&;1$+b)oRMwA3nc3mdTSG#3uYO_ z>+x;7p4I;uHz?ZB>dA-BKl+t-3IB!jBRgdvAbW!aJ(Q{aT>+iz?91`C-xbe)IBoND z9_Xth{6?(y3rddwY$GD65IT#f3<(0o#`di{sh2gm{dw*#-Vnc3r=4==&PU^hCv$qd zjw;>i&?L*Wq#TxG$mFIUf>eK+170KG;~+o&1;Tom9}}mKo23KwdEM6UonXgc z!6N(@k8q@HPw{O8O!lAyi{rZv|DpgfU{py+j(X_cwpKqcalcqKIr0kM^%Br3SdeD> zHSKV94Yxw;pjzDHo!Q?8^0bb%L|wC;4U^9I#pd5O&eexX+Im{ z?jKnCcsE|H?{uGMqVie_C~w7GX)kYGWAg%-?8|N_1#W-|4F)3YTDC+QSq1s!DnOML3@d`mG%o2YbYd#jww|jD$gotpa)kntakp#K;+yo-_ZF9qrNZw<%#C zuPE@#3RocLgPyiBZ+R_-FJ_$xP!RzWm|aN)S+{$LY9vvN+IW~Kf3TsEIvP+B9Mtm! zpfNNxObWQpLoaO&cJh5>%slZnHl_Q~(-Tfh!DMz(dTWld@LG1VRF`9`DYKhyNv z2pU|UZ$#_yUx_B_|MxUq^glT}O5Xt(Vm4Mr02><%C)@v;vPb@pT$*yzJ4aPc_FZ3z z3}PLoMBIM>q_9U2rl^sGhk1VUJ89=*?7|v`{!Z{6bqFMq(mYiA?%KbsI~JwuqVA9$H5vDE+VocjX+G^%bieqx->s;XWlKcuv(s%y%D5Xbc9+ zc(_2nYS1&^yL*ey664&4`IoOeDIig}y-E~_GS?m;D!xv5-xwz+G`5l6V+}CpeJDi^ z%4ed$qowm88=iYG+(`ld5Uh&>Dgs4uPHSJ^TngXP_V6fPyl~>2bhi20QB%lSd#yYn zO05?KT1z@?^-bqO8Cg`;ft>ilejsw@2%RR7;`$Vs;FmO(Yr3Fp`pHGr@P2hC%QcA|X&N2Dn zYf`MqXdHi%cGR@%y7Rg7?d3?an){s$zA{!H;Ie5exE#c~@NhQUFG8V=SQh%UxUeiV zd7#UcYqD=lk-}sEwlpu&H^T_V0{#G?lZMxL7ih_&{(g)MWBnCZxtXg znr#}>U^6!jA%e}@Gj49LWG@*&t0V>Cxc3?oO7LSG%~)Y5}f7vqUUnQ;STjdDU}P9IF9d9<$;=QaXc zL1^X7>fa^jHBu_}9}J~#-oz3Oq^JmGR#?GO7b9a(=R@fw@}Q{{@`Wy1vIQ#Bw?>@X z-_RGG@wt|%u`XUc%W{J z>iSeiz8C3H7@St3mOr_mU+&bL#Uif;+Xw-aZdNYUpdf>Rvu0i0t6k*}vwU`XNO2he z%miH|1tQ8~ZK!zmL&wa3E;l?!!XzgV#%PMVU!0xrDsNNZUWKlbiOjzH-1Uoxm8E#r`#2Sz;-o&qcqB zC-O_R{QGuynW14@)7&@yw1U}uP(1cov)twxeLus0s|7ayrtT8c#`&2~Fiu2=R;1_4bCaD=*E@cYI>7YSnt)nQc zohw5CsK%m?8Ack)qNx`W0_v$5S}nO|(V|RZKBD+btO?JXe|~^Qqur%@eO~<8-L^9d z=GA3-V14ng9L29~XJ>a5k~xT2152zLhM*@zlp2P5Eu}bywkcqR;ISbas&#T#;HZSf z2m69qTV(V@EkY(1Dk3`}j)JMo%ZVJ*5eB zYOjIisi+igK0#yW*gBGj?@I{~mUOvRFQR^pJbEbzFxTubnrw(Muk%}jI+vXmJ;{Q6 zrSobKD>T%}jV4Ub?L1+MGOD~0Ir%-`iTnWZN^~YPrcP5y3VMAzQ+&en^VzKEb$K!Q z<7Dbg&DNXuow*eD5yMr+#08nF!;%4vGrJI++5HdCFcGLfMW!KS*Oi@=7hFwDG!h2< zPunUEAF+HncQkbfFj&pbzp|MU*~60Z(|Ik%Tn{BXMN!hZOosNIseT?R;A`W?=d?5X zK(FB=9mZusYahp|K-wyb={rOpdn=@;4YI2W0EcbMKyo~-#^?h`BA9~o285%oY zfifCh5Lk$SY@|2A@a!T2V+{^!psQkx4?x0HSV`(w9{l75QxMk!)U52Lbhn{8ol?S) zCKo*7R(z!uk<6*qO=wh!Pul{(qq6g6xW;X68GI_CXp`XwO zxuSgPRAtM8K7}5E#-GM!*ydOOG_{A{)hkCII<|2=ma*71ci_-}VPARm3crFQjLYV! z9zbz82$|l01mv`$WahE2$=fAGWkd^X2kY(J7iz}WGS z@%MyBEO=A?HB9=^?nX`@nh;7;laAjs+fbo!|K^mE!tOB>$2a_O0y-*uaIn8k^6Y zSbuv;5~##*4Y~+y7Z5O*3w4qgI5V^17u*ZeupVGH^nM&$qmAk|anf*>r zWc5CV;-JY-Z@Uq1Irpb^O`L_7AGiqd*YpGUShb==os$uN3yYvb`wm6d=?T*it&pDk zo`vhw)RZX|91^^Wa_ti2zBFyWy4cJu#g)_S6~jT}CC{DJ_kKpT`$oAL%b^!2M;JgT zM3ZNbUB?}kP(*YYvXDIH8^7LUxz5oE%kMhF!rnPqv!GiY0o}NR$OD=ITDo9r%4E>E0Y^R(rS^~XjWyVI6 zMOR5rPXhTp*G*M&X#NTL`Hu*R+u*QNoiOKg4CtNPrjgH>c?Hi4MUG#I917fx**+pJfOo!zFM&*da&G_x)L(`k&TPI*t3e^{crd zX<4I$5nBQ8Ax_lmNRa~E*zS-R0sxkz`|>7q_?*e%7bxqNm3_eRG#1ae3gtV9!fQpY z+!^a38o4ZGy9!J5sylDxZTx$JmG!wg7;>&5H1)>f4dXj;B+@6tMlL=)cLl={jLMxY zbbf1ax3S4>bwB9-$;SN2?+GULu;UA-35;VY*^9Blx)Jwyb$=U!D>HhB&=jSsd^6yw zL)?a|>GxU!W}ocTC(?-%z3!IUhw^uzc`Vz_g>-tv)(XA#JK^)ZnC|l1`@CdX1@|!| z_9gQ)7uOf?cR@KDp97*>6X|;t@Y`k_N@)aH7gY27)COv^P3ya9I{4z~vUjLR9~z1Z z5=G{mVtKH*&$*t0@}-i_v|3B$AHHYale7>E+jP`ClqG%L{u;*ff_h@)al?RuL7tOO z->;I}>%WI{;vbLP3VIQ^iA$4wl6@0sDj|~112Y4OFjMs`13!$JGkp%b&E8QzJw_L5 zOnw9joc0^;O%OpF$Qp)W1HI!$4BaXX84`%@#^dk^hFp^pQ@rx4g(8Xjy#!X%+X5Jd@fs3amGT`}mhq#L97R>OwT5-m|h#yT_-v@(k$q7P*9X~T*3)LTdzP!*B} z+SldbVWrrwQo9wX*%FyK+sRXTa@O?WM^FGWOE?S`R(0P{<6p#f?0NJvnBia?k^fX2 zNQs7K-?EijgHJY}&zsr;qJ<*PCZUd*x|dD=IQPUK_nn)@X4KWtqoJNHkT?ZWL_hF? zS8lp2(q>;RXR|F;1O}EE#}gCrY~#n^O`_I&?&z5~7N;zL0)3Tup`%)oHMK-^r$NT% zbFg|o?b9w(q@)6w5V%si<$!U<#}s#x@0aX-hP>zwS#9*75VXA4K*%gUc>+yzupTDBOKH8WR4V0pM(HrfbQ&eJ79>HdCvE=F z|J>s;;iDLB^3(9}?biKbxf1$lI!*Z%*0&8UUq}wMyPs_hclyQQi4;NUY+x2qy|0J; zhn8;5)4ED1oHwg+VZF|80<4MrL97tGGXc5Sw$wAI#|2*cvQ=jB5+{AjMiDHmhUC*a zlmiZ`LAuAn_}hftXh;`Kq0zblDk8?O-`tnilIh|;3lZp@F_osJUV9`*R29M?7H{Fy z`nfVEIDIWXmU&YW;NjU8)EJpXhxe5t+scf|VXM!^bBlwNh)~7|3?fWwo_~ZFk(22% zTMesYw+LNx3J-_|DM~`v93yXe=jPD{q;li;5PD?Dyk+b? zo21|XpT@)$BM$%F=P9J19Vi&1#{jM3!^Y&fr&_`toi`XB1!n>sbL%U9I5<7!@?t)~ z;&H%z>bAaQ4f$wIzkjH70;<8tpUoxzKrPhn#IQfS%9l5=Iu))^XC<58D!-O z{B+o5R^Z21H0T9JQ5gNJnqh#qH^na|z92=hONIM~@_iuOi|F>jBh-?aA20}Qx~EpDGElELNn~|7WRXRFnw+Wdo`|# zBpU=Cz3z%cUJ0mx_1($X<40XEIYz(`noWeO+x#yb_pwj6)R(__%@_Cf>txOQ74wSJ z0#F3(zWWaR-jMEY$7C*3HJrohc79>MCUu26mfYN)f4M~4gD`}EX4e}A!U}QV8!S47 z6y-U-%+h`1n`*pQuKE%Av0@)+wBZr9mH}@vH@i{v(m-6QK7Ncf17x_D=)32`FOjjo zg|^VPf5c6-!FxN{25dvVh#fog=NNpXz zfB$o+0jbRkHH{!TKhE709f+jI^$3#v1Nmf80w`@7-5$1Iv_`)W^px8P-({xwb;D0y z7LKDAHgX<84?l!I*Dvi2#D@oAE^J|g$3!)x1Ua;_;<@#l1fD}lqU2_tS^6Ht$1Wl} zBESo7o^)9-Tjuz$8YQSGhfs{BQV6zW7dA?0b(Dbt=UnQs&4zHfe_sj{RJ4uS-vQpC zX;Bbsuju4%!o8?&m4UZU@~ZZjeFF6ex2ss5_60_JS_|iNc+R0GIjH1@Z z=rLT9%B|WWgOrR7IiIwr2=T;Ne?30M!@{%Qf8o`!>=s<2CBpCK_TWc(DX51>e^xh8 z&@$^b6CgOd7KXQV&Y4%}_#uN*mbanXq(2=Nj`L7H7*k(6F8s6{FOw@(DzU`4-*77{ zF+dxpv}%mFpYK?>N_2*#Y?oB*qEKB}VoQ@bzm>ptmVS_EC(#}Lxxx730trt0G)#$b zE=wVvtqOct1%*9}U{q<)2?{+0TzZzP0jgf9*)arV)*e!f`|jgT{7_9iS@e)recI#z zbzolURQ+TOzE!ymqvBY7+5NnAbWxvMLsLTwEbFqW=CPyCsmJ}P1^V30|D5E|p3BC5 z)3|qgw@ra7aXb-wsa|l^in~1_fm{7bS9jhVRkYVO#U{qMp z)Wce+|DJ}4<2gp8r0_xfZpMo#{Hl2MfjLcZdRB9(B(A(f;+4s*FxV{1F|4d`*sRNd zp4#@sEY|?^FIJ;tmH{@keZ$P(sLh5IdOk@k^0uB^BWr@pk6mHy$qf&~rI>P*a;h0C{%oA*i!VjWn&D~O#MxN&f@1Po# zKN+ zrGrkSjcr?^R#nGl<#Q722^wbYcgW@{+6CBS<1@%dPA8HC!~a`jTz<`g_l5N1M@9wn9GOAZ>nqNgq!yOCbZ@1z`U_N`Z>}+1HIZxk*5RDc&rd5{3qjRh8QmT$VyS;jK z;AF+r6XnnCp=wQYoG|rT2@8&IvKq*IB_WvS%nt%e{MCFm`&W*#LXc|HrD?nVBo=(8*=Aq?u$sDA_sC_RPDUiQ+wnIJET8vx$&fxkW~kP9qXKt zozR)@xGC!P)CTkjeWvXW5&@2?)qt)jiYWWBU?AUtzAN}{JE1I)dfz~7$;}~BmQF`k zpn11qmObXwRB8&rnEG*#4Xax3XBkKlw(;tb?Np^i+H8m(Wyz9k{~ogba@laiEk;2! zV*QV^6g6(QG%vX5Um#^sT&_e`B1pBW5yVth~xUs#0}nv?~C#l?W+9Lsb_5)!71rirGvY zTIJ$OPOY516Y|_014sNv+Z8cc5t_V=i>lWV=vNu#!58y9Zl&GsMEW#pPYPYGHQ|;vFvd*9eM==$_=vc7xnyz0~ zY}r??$<`wAO?JQk@?RGvkWVJlq2dk9vB(yV^vm{=NVI8dhsX<)O(#nr9YD?I?(VmQ z^r7VfUBn<~p3()8yOBjm$#KWx!5hRW)5Jl7wY@ky9lNM^jaT##8QGVsYeaVywmpv>X|Xj7gWE1Ezai&wVLt3p)k4w~yrskT-!PR!kiyQlaxl(( zXhF%Q9x}1TMt3~u@|#wWm-Vq?ZerK={8@~&@9r5JW}r#45#rWii};t`{5#&3$W)|@ zbAf2yDNe0q}NEUvq_Quq3cTjcw z@H_;$hu&xllCI9CFDLuScEMg|x{S7GdV8<&Mq=ezDnRZAyX-8gv97YTm0bg=d)(>N z+B2FcqvI9>jGtnK%eO%y zoBPkJTk%y`8TLf4)IXPBn`U|9>O~WL2C~C$z~9|0m*YH<-vg2CD^SX#&)B4ngOSG$ zV^wmy_iQk>dfN@Pv(ckfy&#ak@MLC7&Q6Ro#!ezM*VEh`+b3Jt%m(^T&p&WJ2Oqvj zs-4nq0TW6cv~(YI$n0UkfwN}kg3_fp?(ijSV#tR9L0}l2qjc7W?i*q01=St0eZ=4h zyGQbEw`9OEH>NMuIe)hVwYHsGERWOD;JxEiO7cQv%pFCeR+IyhwQ|y@&^24k+|8fD zLiOWFNJ2&vu2&`Jv96_z-Cd5RLgmeY3*4rDOQo?Jm`;I_(+ejsPM03!ly!*Cu}Cco zrQSrEDHNyzT(D5s1rZq!8#?f6@v6dB7a-aWs(Qk>N?UGAo{gytlh$%_IhyL7h?DLXDGx zgxGEBQoCAWo-$LRvM=F5MTle`M})t3vVv;2j0HZY&G z22^iGhV@uaJh(XyyY%} zd4iH_UfdV#T=3n}(Lj^|n;O4|$;xhu*8T3hR1mc_A}fK}jfZ7LX~*n5+`8N2q#rI$ z@<_2VANlYF$vIH$ zl<)+*tIWW78IIINA7Rr7i{<;#^yzxoLNkXL)eSs=%|P>$YQIh+ea_3k z_s7r4%j7%&*NHSl?R4k%1>Z=M9o#zxY!n8sL5>BO-ZP;T3Gut>iLS@U%IBrX6BA3k z)&@q}V8a{X<5B}K5s(c(LQ=%v1ocr`t$EqqY0EqVjr65usa=0bkf|O#ky{j3)WBR(((L^wmyHRzoWuL2~WTC=`yZ zn%VX`L=|Ok0v7?s>IHg?yArBcync5rG#^+u)>a%qjES%dRZoIyA8gQ;StH z1Ao7{<&}6U=5}4v<)1T7t!J_CL%U}CKNs-0xWoTTeqj{5{?Be$L0_tk>M9o8 zo371}S#30rKZFM{`H_(L`EM9DGp+Mifk&IP|C2Zu_)Ghr4Qtpmkm1osCf@%Z$%t+7 zYH$Cr)Ro@3-QDeQJ8m+x6%;?YYT;k6Z0E-?kr>x33`H%*ueBD7Zx~3&HtWn0?2Wt} zTG}*|v?{$ajzt}xPzV%lL1t-URi8*Zn)YljXNGDb>;!905Td|mpa@mHjIH%VIiGx- zd@MqhpYFu4_?y5N4xiHn3vX&|e6r~Xt> zZG`aGq|yTNjv;9E+Txuoa@A(9V7g?1_T5FzRI;!=NP1Kqou1z5?%X~Wwb{trRfd>i z8&y^H)8YnKyA_Fyx>}RNmQIczT?w2J4SNvI{5J&}Wto|8FR(W;Qw#b1G<1%#tmYzQ zQ2mZA-PAdi%RQOhkHy9Ea#TPSw?WxwL@H@cbkZwIq0B!@ns}niALidmn&W?!Vd4Gj zO7FiuV4*6Mr^2xlFSvM;Cp_#r8UaqIzHJQg_z^rEJw&OMm_8NGAY2)rKvki|o1bH~ z$2IbfVeY2L(^*rMRU1lM5Y_sgrDS`Z??nR2lX;zyR=c%UyGb*%TC-Dil?SihkjrQy~TMv6;BMs7P8il`H7DmpVm@rJ;b)hW)BL)GjS154b*xq-NXq2cwE z^;VP7ua2pxvCmxrnqUYQMH%a%nHmwmI33nJM(>4LznvY*k&C0{8f*%?zggpDgkuz&JBx{9mfb@wegEl2v!=}Sq2Gaty0<)UrOT0{MZtZ~j5y&w zXlYa_jY)I_+VA-^#mEox#+G>UgvM!Ac8zI<%JRXM_73Q!#i3O|)lOP*qBeJG#BST0 zqohi)O!|$|2SeJQo(w6w7%*92S})XfnhrH_Z8qe!G5>CglP=nI7JAOW?(Z29;pXJ9 zR9`KzQ=WEhy*)WH>$;7Cdz|>*i>=##0bB)oU0OR>>N<21e4rMCHDemNi2LD>Nc$;& zQRFthpWniC1J6@Zh~iJCoLOxN`oCKD5Q4r%ynwgUKPlIEd#?QViIqovY|czyK8>6B zSP%{2-<;%;1`#0mG^B(8KbtXF;Nf>K#Di72UWE4gQ%(_26Koiad)q$xRL~?pN71ZZ zujaaCx~jXjygw;rI!WB=xrOJO6HJ!!w}7eiivtCg5K|F6$EXa)=xUC za^JXSX98W`7g-tm@uo|BKj39Dl;sg5ta;4qjo^pCh~{-HdLl6qI9Ix6f$+qiZ$}s= zNguKrU;u+T@ko(Vr1>)Q%h$?UKXCY>3se%&;h2osl2D zE4A9bd7_|^njDd)6cI*FupHpE3){4NQ*$k*cOWZ_?CZ>Z4_fl@n(mMnYK62Q1d@+I zr&O))G4hMihgBqRIAJkLdk(p(D~X{-oBUA+If@B}j& zsHbeJ3RzTq96lB7d($h$xTeZ^gP0c{t!Y0c)aQE;$FY2!mACg!GDEMKXFOPI^)nHZ z`aSPJpvV0|bbrzhWWkuPURlDeN%VT8tndV8?d)eN*i4I@u zVKl^6{?}A?P)Fsy?3oi#clf}L18t;TjNI2>eI&(ezDK7RyqFxcv%>?oxUlonv(px) z$vnPzRH`y5A(x!yOIfL0bmgeMQB$H5wenx~!ujQK*nUBW;@Em&6Xv2%s(~H5WcU2R z;%Nw<$tI)a`Ve!>x+qegJnQsN2N7HaKzrFqM>`6R*gvh%O*-%THt zrB$Nk;lE;z{s{r^PPm5qz(&lM{sO*g+W{sK+m3M_z=4=&CC>T`{X}1Vg2PEfSj2x_ zmT*(x;ov%3F?qoEeeM>dUn$a*?SIGyO8m806J1W1o+4HRhc2`9$s6hM#qAm zChQ87b~GEw{ADfs+5}FJ8+|bIlIv(jT$Ap#hSHoXdd9#w<#cA<1Rkq^*EEkknUd4& zoIWIY)sAswy6fSERVm&!SO~#iN$OgOX*{9@_BWFyJTvC%S++ilSfCrO(?u=Dc?CXZ zzCG&0yVR{Z`|ZF0eEApWEo#s9osV>F{uK{QA@BES#&;#KsScf>y zvs?vIbI>VrT<*!;XmQS=bhq%46-aambZ(8KU-wOO2=en~D}MCToB_u;Yz{)1ySrPZ z@=$}EvjTdzTWU7c0ZI6L8=yP+YRD_eMMos}b5vY^S*~VZysrkq<`cK3>>v%uy7jgq z0ilW9KjVDHLv0b<1K_`1IkbTOINs0=m-22c%M~l=^S}%hbli-3?BnNq?b`hx^HX2J zIe6ECljRL0uBWb`%{EA=%!i^4sMcj+U_TaTZRb+~GOk z^ZW!nky0n*Wb*r+Q|9H@ml@Z5gU&W`(z4-j!OzC1wOke`TRAYGZVl$PmQ16{3196( zO*?`--I}Qf(2HIwb2&1FB^!faPA2=sLg(@6P4mN)>Dc3i(B0;@O-y2;lM4akD>@^v z=u>*|!s&9zem70g7zfw9FXl1bpJW(C#5w#uy5!V?Q(U35A~$dR%LDVnq@}kQm13{} zd53q3N(s$Eu{R}k2esbftfjfOITCL;jWa$}(mmm}d(&7JZ6d3%IABCapFFYjdEjdK z&4Edqf$G^MNAtL=uCDRs&Fu@FXRgX{*0<(@c3|PNHa>L%zvxWS={L8%qw`STm+=Rd zA}FLspESSIpE_^41~#5yI2bJ=9`oc;GIL!JuW&7YetZ?0H}$$%8rW@*J37L-~Rsx!)8($nI4 zZhcZ2^=Y+p4YPl%j!nFJA|*M^gc(0o$i3nlphe+~-_m}jVkRN{spFs(o0ajW@f3K{ zDV!#BwL322CET$}Y}^0ixYj2w>&Xh12|R8&yEw|wLDvF!lZ#dOTHM9pK6@Nm-@9Lnng4ZHBgBSrr7KI8YCC9DX5Kg|`HsiwJHg2(7#nS;A{b3tVO?Z% za{m5b3rFV6EpX;=;n#wltDv1LE*|g5pQ+OY&*6qCJZc5oDS6Z6JD#6F)bWxZSF@q% z+1WV;m!lRB!n^PC>RgQCI#D1br_o^#iPk>;K2hB~0^<~)?p}LG%kigm@moD#q3PE+ zA^Qca)(xnqw6x>XFhV6ku9r$E>bWNrVH9fum0?4s?Rn2LG{Vm_+QJHse6xa%nzQ?k zKug4PW~#Gtb;#5+9!QBgyB@q=sk9=$S{4T>wjFICStOM?__fr+Kei1 z3j~xPqW;W@YkiUM;HngG!;>@AITg}vAE`M2Pj9Irl4w1fo4w<|Bu!%rh%a(Ai^Zhi zs92>v5;@Y(Zi#RI*ua*h`d_7;byQSa*v9E{2x$<-_=5Z<7{%)}4XExANcz@rK69T0x3%H<@frW>RA8^swA+^a(FxK| zFl3LD*ImHN=XDUkrRhp6RY5$rQ{bRgSO*(vEHYV)3Mo6Jy3puiLmU&g82p{qr0F?ohmbz)f2r{X2|T2 z$4fdQ=>0BeKbiVM!e-lIIs8wVTuC_m7}y4A_%ikI;Wm5$9j(^Y z(cD%U%k)X>_>9~t8;pGzL6L-fmQO@K; zo&vQzMlgY95;1BSkngY)e{`n0!NfVgf}2mB3t}D9@*N;FQ{HZ3Pb%BK6;5#-O|WI( zb6h@qTLU~AbVW#_6?c!?Dj65Now7*pU{h!1+eCV^KCuPAGs28~3k@ueL5+u|Z-7}t z9|lskE`4B7W8wMs@xJa{#bsCGDFoRSNSnmNYB&U7 zVGKWe%+kFB6kb)e;TyHfqtU6~fRg)f|>=5(N36)0+C z`hv65J<$B}WUc!wFAb^QtY31yNleq4dzmG`1wHTj=c*=hay9iD071Hc?oYoUk|M*_ zU1GihAMBsM@5rUJ(qS?9ZYJ6@{bNqJ`2Mr+5#hKf?doa?F|+^IR!8lq9)wS3tF_9n zW_?hm)G(M+MYb?V9YoX^_mu5h-LP^TL^!Q9Z7|@sO(rg_4+@=PdI)WL(B7`!K^ND- z-uIuVDCVEdH_C@c71YGYT^_Scf_dhB8Z2Xy6vGtBSlYud9vggOqv^L~F{BraSE_t} zIkP+Hp2&nH^-MNEs}^`oMLy11`PQW$T|K(`Bu*(f@)mv1-qY(_YG&J2M2<7k;;RK~ zL{Fqj9yCz8(S{}@c)S!65aF<=&eLI{hAMErCx&>i7OeDN>okvegO87OaG{Jmi<|}D zaT@b|0X{d@OIJ7zvT>r+eTzgLq~|Dpu)Z&db-P4z*`M$UL51lf>FLlq6rfG)%doyp z)3kk_YIM!03eQ8Vu_2fg{+osaEJPtJ-s36R+5_AEG12`NG)IQ#TF9c@$99%0iye+ zUzZ57=m2)$D(5Nx!n)=5Au&O0BBgwxIBaeI(mro$#&UGCr<;C{UjJVAbVi%|+WP(a zL$U@TYCxJ=1{Z~}rnW;7UVb7+ZnzgmrogDxhjLGo>c~MiJAWs&&;AGg@%U?Y^0JhL ze(x6Z74JG6FlOFK(T}SXQfhr}RIFl@QXKnIcXYF)5|V~e-}suHILKT-k|<*~Ij|VF zC;t@=uj=hot~*!C68G8hTA%8SzOfETOXQ|3FSaIEjvBJp(A)7SWUi5!Eu#yWgY+;n zlm<$+UDou*V+246_o#V4kMdto8hF%%Lki#zPh}KYXmMf?hrN0;>Mv%`@{0Qn`Ujp) z=lZe+13>^Q!9zT);H<(#bIeRWz%#*}sgUX9P|9($kexOyKIOc`dLux}c$7It4u|Rl z6SSkY*V~g_B-hMPo_ak>>z@AVQ(_N)VY2kB3IZ0G(iDUYw+2d7W^~(Jq}KY=JnWS( z#rzEa&0uNhJ>QE8iiyz;n2H|SV#Og+wEZv=f2%1ELX!SX-(d3tEj$5$1}70Mp<&eI zCkfbByL7af=qQE@5vDVxx1}FSGt_a1DoE3SDI+G)mBAna)KBG4p8Epxl9QZ4BfdAN zFnF|Y(umr;gRgG6NLQ$?ZWgllEeeq~z^ZS7L?<(~O&$5|y)Al^iMKy}&W+eMm1W z7EMU)u^ke(A1#XCV>CZ71}P}0x)4wtHO8#JRG3MA-6g=`ZM!FcICCZ{IEw8Dm2&LQ z1|r)BUG^0GzI6f946RrBlfB1Vs)~8toZf~7)+G;pv&XiUO(%5bm)pl=p>nV^o*;&T z;}@oZSibzto$arQgfkp|z4Z($P>dTXE{4O=vY0!)kDO* zGF8a4wq#VaFpLfK!iELy@?-SeRrdz%F*}hjKcA*y@mj~VD3!it9lhRhX}5YOaR9$} z3mS%$2Be7{l(+MVx3 z(4?h;P!jnRmX9J9sYN#7i=iyj_5q7n#X(!cdqI2lnr8T$IfOW<_v`eB!d9xY1P=2q&WtOXY=D9QYteP)De?S4}FK6#6Ma z=E*V+#s8>L;8aVroK^6iKo=MH{4yEZ_>N-N z`(|;aOATba1^asjxlILk<4}f~`39dBFlxj>Dw(hMYKPO3EEt1@S`1lxFNM+J@uB7T zZ8WKjz7HF1-5&2=l=fqF-*@>n5J}jIxdDwpT?oKM3s8Nr`x8JnN-kCE?~aM1H!hAE z%%w(3kHfGwMnMmNj(SU(w42OrC-euI>Dsjk&jz3ts}WHqmMpzQ3vZrsXrZ|}+MHA7 z068obeXZTsO*6RS@o3x80E4ok``rV^Y3hr&C1;|ZZ0|*EKO`$lECUYG2gVFtUTw)R z4Um<0ZzlON`zTdvVdL#KFoMFQX*a5wM0Czp%wTtfK4Sjs)P**RW&?lP$(<}q%r68Z zS53Y!d@&~ne9O)A^tNrXHhXBkj~$8j%pT1%%mypa9AW5E&s9)rjF4@O3ytH{0z6riz|@< zB~UPh*wRFg2^7EbQrHf0y?E~dHlkOxof_a?M{LqQ^C!i2dawHTPYUE=X@2(3<=OOxs8qn_(y>pU>u^}3y&df{JarR0@VJn0f+U%UiF=$Wyq zQvnVHESil@d|8&R<%}uidGh7@u^(%?$#|&J$pvFC-n8&A>utA=n3#)yMkz+qnG3wd zP7xCnF|$9Dif@N~L)Vde3hW8W!UY0BgT2v(wzp;tlLmyk2%N|0jfG$%<;A&IVrOI< z!L)o>j>;dFaqA3pL}b-Je(bB@VJ4%!JeX@3x!i{yIeIso^=n?fDX`3bU=eG7sTc%g%ye8$v8P@yKE^XD=NYxTb zbf!Mk=h|otpqjFaA-vs5YOF-*GwWPc7VbaOW&stlANnCN8iftFMMrUdYNJ_Bnn5Vt zxfz@Ah|+4&P;reZxp;MmEI7C|FOv8NKUm8njF7Wb6Gi7DeODLl&G~}G4be&*Hi0Qw z5}77vL0P+7-B%UL@3n1&JPxW^d@vVwp?u#gVcJqY9#@-3X{ok#UfW3<1fb%FT`|)V~ggq z(3AUoUS-;7)^hCjdT0Kf{i}h)mBg4qhtHHBti=~h^n^OTH5U*XMgDLIR@sre`AaB$ zg)IGBET_4??m@cx&c~bA80O7B8CHR7(LX7%HThkeC*@vi{-pL%e)yXp!B2InafbDF zjPXf1mko3h59{lT6EEbxKO1Z5GF71)WwowO6kY|6tjSVSWdQ}NsK2x{>i|MKZK8%Q zfu&_0D;CO-Jg0#YmyfctyJ!mRJp)e#@O0mYdp|8x;G1%OZQ3Q847YWTyy|%^cpA;m zze0(5p{tMu^lDkpe?HynyO?a1$_LJl2L&mpeKu%8YvgRNr=%2z${%WThHG=vrWY@4 zsA`OP#O&)TetZ>s%h!=+CE15lOOls&nvC~$Qz0Ph7tHiP;O$i|eDwpT{cp>+)0-|; zY$|bB+Gbel>5aRN3>c0x)4U=|X+z+{ zn*_p*EQoquRL+=+p;=lm`d71&1NqBz&_ph)MXu(Nv6&XE7(RsS)^MGj5Q?Fwude-(sq zjJ>aOq!7!EN>@(fK7EE#;i_BGvli`5U;r!YA{JRodLBc6-`n8K+Fjgwb%sX;j=qHQ z7&Tr!)!{HXoO<2BQrV9Sw?JRaLXV8HrsNevvnf>Y-6|{T!pYLl7jp$-nEE z#X!4G4L#K0qG_4Z;Cj6=;b|Be$hi4JvMH!-voxqx^@8cXp`B??eFBz2lLD8RRaRGh zn7kUfy!YV~p(R|p7iC1Rdgt$_24i0cd-S8HpG|`@my70g^y`gu%#Tf_L21-k?sRRZHK&at(*ED0P8iw{7?R$9~OF$Ko;Iu5)ur5<->x!m93Eb zFYpIx60s=Wxxw=`$aS-O&dCO_9?b1yKiPCQmSQb>T)963`*U+Ydj5kI(B(B?HNP8r z*bfSBpSu)w(Z3j7HQoRjUG(+d=IaE~tv}y14zHHs|0UcN52fT8V_<@2ep_ee{QgZG zmgp8iv4V{k;~8@I%M3<#B;2R>Ef(Gg_cQM7%}0s*^)SK6!Ym+~P^58*wnwV1BW@eG z4sZLqsUvBbFsr#8u7S1r4teQ;t)Y@jnn_m5jS$CsW1um!p&PqAcc8!zyiXHVta9QC zY~wCwCF0U%xiQPD_INKtTb;A|Zf29(mu9NI;E zc-e>*1%(LSXB`g}kd`#}O;veb<(sk~RWL|f3ljxCnEZDdNSTDV6#Td({6l&y4IjKF z^}lIUq*ZUqgTPumD)RrCN{M^jhY>E~1pn|KOZ5((%F)G|*ZQ|r4zIbrEiV%42hJV8 z3xS)=!X1+=olbdGJ=yZil?oXLct8FM{(6ikLL3E%=q#O6(H$p~gQu6T8N!plf!96| z&Q3=`L~>U0zZh;z(pGR2^S^{#PrPxTRHD1RQOON&f)Siaf`GLj#UOk&(|@0?zm;Sx ztsGt8=29-MZs5CSf1l1jNFtNt5rFNZxJPvkNu~2}7*9468TWm>nN9TP&^!;J{-h)_ z7WsHH9|F%I`Pb!>KAS3jQWKfGivTVkMJLO-HUGM_a4UQ_%RgL6WZvrW+Z4ujZn;y@ zz9$=oO!7qVTaQAA^BhX&ZxS*|5dj803M=k&2%QrXda`-Q#IoZL6E(g+tN!6CA!CP* zCpWtCujIea)ENl0liwVfj)Nc<9mV%+e@=d`haoZ*`B7+PNjEbXBkv=B+Pi^~L#EO$D$ZqTiD8f<5$eyb54-(=3 zh)6i8i|jp(@OnRrY5B8t|LFXFQVQ895n*P16cEKTrT*~yLH6Z4e*bZ5otpRDri&+A zfNbK1D5@O=sm`fN=WzWyse!za5n%^+6dHPGX#8DyIK>?9qyX}2XvBWVqbP%%D)7$= z=#$WulZlZR<{m#gU7lwqK4WS1Ne$#_P{b17qe$~UOXCl>5b|6WVh;5vVnR<%d+Lnp z$uEmML38}U4vaW8>shm6CzB(Wei3s#NAWE3)a2)z@i{4jTn;;aQS)O@l{rUM`J@K& l00vQ5JBs~;vo!vr%%-k{2_Fq1Mn4QF81S)AQ99zk{{c4yR+0b! literal 0 HcmV?d00001 diff --git a/kotlin/monitoring/gradle/wrapper/gradle-wrapper.properties b/kotlin/monitoring/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..e7646dea --- /dev/null +++ b/kotlin/monitoring/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/monitoring/gradlew b/kotlin/monitoring/gradlew new file mode 100644 index 00000000..9d0ce634 --- /dev/null +++ b/kotlin/monitoring/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/monitoring/gradlew.bat b/kotlin/monitoring/gradlew.bat new file mode 100644 index 00000000..9d0ce634 --- /dev/null +++ b/kotlin/monitoring/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/monitoring/settings.gradle b/kotlin/monitoring/settings.gradle new file mode 100644 index 00000000..43192749 --- /dev/null +++ b/kotlin/monitoring/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'kotlin-client' diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApi.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApi.kt new file mode 100644 index 00000000..7bb45b7a --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApi.kt @@ -0,0 +1,322 @@ +/** + * + * 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.monitoring.apis + +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import enlighten.monitoring.models.BatteryDeviceTelemetry +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetSystemMicroDeviceTelemetryResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.TelemetryGranularityEnum +import enlighten.monitoring.models.TooManyRequestsError + +import com.squareup.moshi.Json + +import enlighten.monitoring.infrastructure.ApiClient +import enlighten.monitoring.infrastructure.ApiResponse +import enlighten.monitoring.infrastructure.ClientException +import enlighten.monitoring.infrastructure.ClientError +import enlighten.monitoring.infrastructure.ServerException +import enlighten.monitoring.infrastructure.ServerError +import enlighten.monitoring.infrastructure.MultiValueMap +import enlighten.monitoring.infrastructure.PartConfig +import enlighten.monitoring.infrastructure.RequestConfig +import enlighten.monitoring.infrastructure.RequestMethod +import enlighten.monitoring.infrastructure.ResponseType +import enlighten.monitoring.infrastructure.Success +import enlighten.monitoring.infrastructure.toMultiValue + +class DeviceLevelProductionMonitoringApi(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") + } + } + + /** + * Retrieves telemetry for single ACB + * Retrieves telemetry for single ACB. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the acb. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return BatteryDeviceTelemetry + * @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 getSystemAcbDeviceTelemetry(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : BatteryDeviceTelemetry { + val localVarResponse = getSystemAcbDeviceTelemetryWithHttpInfo(systemId = systemId, serialNo = serialNo, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as BatteryDeviceTelemetry + 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 telemetry for single ACB + * Retrieves telemetry for single ACB. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the acb. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemAcbDeviceTelemetryWithHttpInfo(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemAcbDeviceTelemetryRequestConfig(systemId = systemId, serialNo = serialNo, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemAcbDeviceTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the acb. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemAcbDeviceTelemetryRequestConfig(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/devices/acbs/{serial_no}/telemetry".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())).replace("{"+"serial_no"+"}", encodeURIComponent(serialNo.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieves telemetry for single Encharge + * Retrieves telemetry for single Encharge. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the Encharge. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return BatteryDeviceTelemetry + * @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 getSystemEnchargeDeviceTelemetry(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : BatteryDeviceTelemetry { + val localVarResponse = getSystemEnchargeDeviceTelemetryWithHttpInfo(systemId = systemId, serialNo = serialNo, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as BatteryDeviceTelemetry + 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 telemetry for single Encharge + * Retrieves telemetry for single Encharge. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the Encharge. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemEnchargeDeviceTelemetryWithHttpInfo(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemEnchargeDeviceTelemetryRequestConfig(systemId = systemId, serialNo = serialNo, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemEnchargeDeviceTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the Encharge. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemEnchargeDeviceTelemetryRequestConfig(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/devices/encharges/{serial_no}/telemetry".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())).replace("{"+"serial_no"+"}", encodeURIComponent(serialNo.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieves telemetry for single micro/pcu + * Retrieves telemetry for single micro/pcu. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 3 intervals will appear in response. If granularity is day, maximum 288 intervals will appear in response where each interval is of 5 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the individual solar Microinverter. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return GetSystemMicroDeviceTelemetryResponse + * @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 getSystemMicroDeviceTelemetry(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : GetSystemMicroDeviceTelemetryResponse { + val localVarResponse = getSystemMicroDeviceTelemetryWithHttpInfo(systemId = systemId, serialNo = serialNo, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemMicroDeviceTelemetryResponse + 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 telemetry for single micro/pcu + * Retrieves telemetry for single micro/pcu. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 3 intervals will appear in response. If granularity is day, maximum 288 intervals will appear in response where each interval is of 5 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the individual solar Microinverter. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemMicroDeviceTelemetryWithHttpInfo(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemMicroDeviceTelemetryRequestConfig(systemId = systemId, serialNo = serialNo, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemMicroDeviceTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param serialNo Serial number of the individual solar Microinverter. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemMicroDeviceTelemetryRequestConfig(systemId: kotlin.Int, serialNo: kotlin.String, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/devices/micros/{serial_no}/telemetry".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())).replace("{"+"serial_no"+"}", encodeURIComponent(serialNo.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/monitoring/src/main/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApi.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApi.kt new file mode 100644 index 00000000..97c8cc1a --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApi.kt @@ -0,0 +1,744 @@ +/** + * + * 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.monitoring.apis + +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetSystemBatteryLifetimeResponse +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponse +import enlighten.monitoring.models.GetSystemConsumptionLifetimeResponse +import enlighten.monitoring.models.GetSystemConsumptionMeterTelemetryResponse +import enlighten.monitoring.models.GetSystemEnergyExportLifetimeResponse +import enlighten.monitoring.models.GetSystemEnergyExportTelemetryResponse +import enlighten.monitoring.models.GetSystemEnergyImportLifetimeResponse +import enlighten.monitoring.models.GetSystemEnergyImportTelemetryResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.TelemetryGranularityEnum +import enlighten.monitoring.models.TooManyRequestsError + +import com.squareup.moshi.Json + +import enlighten.monitoring.infrastructure.ApiClient +import enlighten.monitoring.infrastructure.ApiResponse +import enlighten.monitoring.infrastructure.ClientException +import enlighten.monitoring.infrastructure.ClientError +import enlighten.monitoring.infrastructure.ServerException +import enlighten.monitoring.infrastructure.ServerError +import enlighten.monitoring.infrastructure.MultiValueMap +import enlighten.monitoring.infrastructure.PartConfig +import enlighten.monitoring.infrastructure.RequestConfig +import enlighten.monitoring.infrastructure.RequestMethod +import enlighten.monitoring.infrastructure.ResponseType +import enlighten.monitoring.infrastructure.Success +import enlighten.monitoring.infrastructure.toMultiValue + +class SiteLevelConsumptionMonitoringApi(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") + } + } + + /** + * battery_lifetime + * Returns a daily time series of energy charged into the batteries and energy discharged from the batteries for a 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 with no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been charged/discharged for the last days in the series. + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (optional) + * @return GetSystemBatteryLifetimeResponse + * @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 getSystemBatteryLifetime(systemId: kotlin.Int, startDate: java.time.LocalDate? = null, endDate: java.time.LocalDate? = null) : GetSystemBatteryLifetimeResponse { + val localVarResponse = getSystemBatteryLifetimeWithHttpInfo(systemId = systemId, startDate = startDate, endDate = endDate) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemBatteryLifetimeResponse + 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) + } + } + } + + /** + * battery_lifetime + * Returns a daily time series of energy charged into the batteries and energy discharged from the batteries for a 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 with no gaps in the time series. If the response includes trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been charged/discharged for the last days in the series. + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (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 getSystemBatteryLifetimeWithHttpInfo(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : ApiResponse { + val localVariableConfig = getSystemBatteryLifetimeRequestConfig(systemId = systemId, startDate = startDate, endDate = endDate) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemBatteryLifetime + * + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (optional) + * @return RequestConfig + */ + fun getSystemBatteryLifetimeRequestConfig(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + 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}/battery_lifetime".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieves telemetry for all batteries for a system + * Retrieves telemetry for all the batteries of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return GetSystemBatteryTelemetryResponse + * @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 getSystemBatteryTelemetry(systemId: kotlin.Int, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : GetSystemBatteryTelemetryResponse { + val localVarResponse = getSystemBatteryTelemetryWithHttpInfo(systemId = systemId, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemBatteryTelemetryResponse + 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 telemetry for all batteries for a system + * Retrieves telemetry for all the batteries of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemBatteryTelemetryWithHttpInfo(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemBatteryTelemetryRequestConfig(systemId = systemId, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemBatteryTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemBatteryTelemetryRequestConfig(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/telemetry/battery".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * consumption_lifetime + * Returns a daily time series of energy consumption as measured by the consumption meter installed on the specified system. 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 data has been reported for the last three days. + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (optional) + * @return GetSystemConsumptionLifetimeResponse + * @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 getSystemConsumptionLifetime(systemId: kotlin.Int, startDate: java.time.LocalDate? = null, endDate: java.time.LocalDate? = null) : GetSystemConsumptionLifetimeResponse { + val localVarResponse = getSystemConsumptionLifetimeWithHttpInfo(systemId = systemId, startDate = startDate, endDate = endDate) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemConsumptionLifetimeResponse + 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) + } + } + } + + /** + * consumption_lifetime + * Returns a daily time series of energy consumption as measured by the consumption meter installed on the specified system. 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 data has been reported for the last three days. + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (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 getSystemConsumptionLifetimeWithHttpInfo(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : ApiResponse { + val localVariableConfig = getSystemConsumptionLifetimeRequestConfig(systemId = systemId, startDate = startDate, endDate = endDate) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemConsumptionLifetime + * + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (optional) + * @return RequestConfig + */ + fun getSystemConsumptionLifetimeRequestConfig(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + 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 + ) + } + + /** + * Retrieves telemetry for all consumption meters for a system + * Retrieves telemetry for all the consumption meters of a system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param startAt Requested start time for telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then the system first reported date is considered as start_at. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return GetSystemConsumptionMeterTelemetryResponse + * @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 getSystemConsumptionMeterTelemetry(systemId: kotlin.Int, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : GetSystemConsumptionMeterTelemetryResponse { + val localVarResponse = getSystemConsumptionMeterTelemetryWithHttpInfo(systemId = systemId, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemConsumptionMeterTelemetryResponse + 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 telemetry for all consumption meters for a system + * Retrieves telemetry for all the consumption meters of a system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param startAt Requested start time for telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then the system first reported date is considered as start_at. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemConsumptionMeterTelemetryWithHttpInfo(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemConsumptionMeterTelemetryRequestConfig(systemId = systemId, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemConsumptionMeterTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param startAt Requested start time for telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then the system first reported date is considered as start_at. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemConsumptionMeterTelemetryRequestConfig(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/telemetry/consumption_meter".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * export_lifetime + * Returns a daily time series of energy exported to the grid by 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 with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been exported for the last days in the series. + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (optional) + * @return GetSystemEnergyExportLifetimeResponse + * @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 getSystemEnergyExportLifetime(systemId: kotlin.Int, startDate: java.time.LocalDate? = null, endDate: java.time.LocalDate? = null) : GetSystemEnergyExportLifetimeResponse { + val localVarResponse = getSystemEnergyExportLifetimeWithHttpInfo(systemId = systemId, startDate = startDate, endDate = endDate) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemEnergyExportLifetimeResponse + 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) + } + } + } + + /** + * export_lifetime + * Returns a daily time series of energy exported to the grid by 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 with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been exported for the last days in the series. + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (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 getSystemEnergyExportLifetimeWithHttpInfo(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : ApiResponse { + val localVariableConfig = getSystemEnergyExportLifetimeRequestConfig(systemId = systemId, startDate = startDate, endDate = endDate) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemEnergyExportLifetime + * + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (optional) + * @return RequestConfig + */ + fun getSystemEnergyExportLifetimeRequestConfig(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + 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}/energy_export_lifetime".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieves energy exported to grid in regular intervals + * Retrieves energy exported to grid in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return GetSystemEnergyExportTelemetryResponse + * @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 getSystemEnergyExportTelemetry(systemId: kotlin.Int, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : GetSystemEnergyExportTelemetryResponse { + val localVarResponse = getSystemEnergyExportTelemetryWithHttpInfo(systemId = systemId, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemEnergyExportTelemetryResponse + 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 energy exported to grid in regular intervals + * Retrieves energy exported to grid in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemEnergyExportTelemetryWithHttpInfo(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemEnergyExportTelemetryRequestConfig(systemId = systemId, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemEnergyExportTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemEnergyExportTelemetryRequestConfig(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/energy_export_telemetry".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * import_lifetime + * Returns a daily time series of energy imported to the grid by 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 with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been imported for the last days in the series. + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (optional) + * @return GetSystemEnergyImportLifetimeResponse + * @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 getSystemEnergyImportLifetime(systemId: kotlin.Int, startDate: java.time.LocalDate? = null, endDate: java.time.LocalDate? = null) : GetSystemEnergyImportLifetimeResponse { + val localVarResponse = getSystemEnergyImportLifetimeWithHttpInfo(systemId = systemId, startDate = startDate, endDate = endDate) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemEnergyImportLifetimeResponse + 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) + } + } + } + + /** + * import_lifetime + * Returns a daily time series of energy imported to the grid by 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 with no gaps in the time series. If the response contains trailing zeroes, such as [909, 4970, 0, 0, 0], then no energy has been imported for the last days in the series. + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (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 getSystemEnergyImportLifetimeWithHttpInfo(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : ApiResponse { + val localVariableConfig = getSystemEnergyImportLifetimeRequestConfig(systemId = systemId, startDate = startDate, endDate = endDate) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemEnergyImportLifetime + * + * @param systemId Unique numeric ID of the system. + * @param startDate Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (optional) + * @return RequestConfig + */ + fun getSystemEnergyImportLifetimeRequestConfig(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + 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}/energy_import_lifetime".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieves energy imported from grid in regular intervals + * Retrieves energy imported from grid in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return GetSystemEnergyImportTelemetryResponse + * @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 getSystemEnergyImportTelemetry(systemId: kotlin.Int, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : GetSystemEnergyImportTelemetryResponse { + val localVarResponse = getSystemEnergyImportTelemetryWithHttpInfo(systemId = systemId, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemEnergyImportTelemetryResponse + 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 energy imported from grid in regular intervals + * Retrieves energy imported from grid in regular intervals. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 intervals will appear in response. If granularity is day, maximum 96 intervals will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemEnergyImportTelemetryWithHttpInfo(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemEnergyImportTelemetryRequestConfig(systemId = systemId, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemEnergyImportTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemEnergyImportTelemetryRequestConfig(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/energy_import_telemetry".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/monitoring/src/main/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApi.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApi.kt new file mode 100644 index 00000000..7ec7c39f --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApi.kt @@ -0,0 +1,487 @@ +/** + * + * 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.monitoring.apis + +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetSystemEnergyLifetimeResponse +import enlighten.monitoring.models.GetSystemProductionMeterReadingsResponse +import enlighten.monitoring.models.GetSystemProductionMeterTelemetryResponse +import enlighten.monitoring.models.GetSystemProductionMicroTelemetryResponse +import enlighten.monitoring.models.GetSystemRgmStatsResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.SystemEnergyLifetimeProductionEnum +import enlighten.monitoring.models.TelemetryGranularityEnum +import enlighten.monitoring.models.TooManyRequestsError + +import com.squareup.moshi.Json + +import enlighten.monitoring.infrastructure.ApiClient +import enlighten.monitoring.infrastructure.ApiResponse +import enlighten.monitoring.infrastructure.ClientException +import enlighten.monitoring.infrastructure.ClientError +import enlighten.monitoring.infrastructure.ServerException +import enlighten.monitoring.infrastructure.ServerError +import enlighten.monitoring.infrastructure.MultiValueMap +import enlighten.monitoring.infrastructure.PartConfig +import enlighten.monitoring.infrastructure.RequestConfig +import enlighten.monitoring.infrastructure.RequestMethod +import enlighten.monitoring.infrastructure.ResponseType +import enlighten.monitoring.infrastructure.Success +import enlighten.monitoring.infrastructure.toMultiValue + +class SiteLevelProductionMonitoringApi(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") + } + } + + /** + * energy_lifetime + * Returns a daily time series of energy produced by 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 with 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. 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. Later, it switches to using the data as measured by the meter. This is called the \"merged time series\". The attribute 'meter_start_date' indicates the time when 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 Unique numeric ID of the system. + * @param startDate Start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (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 GetSystemEnergyLifetimeResponse + * @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 getSystemEnergyLifetime(systemId: kotlin.Int, startDate: java.time.LocalDate? = null, endDate: java.time.LocalDate? = null, production: SystemEnergyLifetimeProductionEnum? = null) : GetSystemEnergyLifetimeResponse { + val localVarResponse = getSystemEnergyLifetimeWithHttpInfo(systemId = systemId, startDate = startDate, endDate = endDate, production = production) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemEnergyLifetimeResponse + 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) + } + } + } + + /** + * energy_lifetime + * Returns a daily time series of energy produced by 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 with 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. 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. Later, it switches to using the data as measured by the meter. This is called the \"merged time series\". The attribute 'meter_start_date' indicates the time when 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 Unique numeric ID of the system. + * @param startDate Start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (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 getSystemEnergyLifetimeWithHttpInfo(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?, production: SystemEnergyLifetimeProductionEnum?) : ApiResponse { + val localVariableConfig = getSystemEnergyLifetimeRequestConfig(systemId = systemId, startDate = startDate, endDate = endDate, production = production) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemEnergyLifetime + * + * @param systemId Unique numeric ID of the system. + * @param startDate Start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. (optional) + * @param endDate End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. (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 getSystemEnergyLifetimeRequestConfig(systemId: kotlin.Int, startDate: java.time.LocalDate?, endDate: java.time.LocalDate?, production: SystemEnergyLifetimeProductionEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + 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.toString())) + } + } + 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 + ) + } + + /** + * production_meter_readings + * Returns the last known reading of each production meter on the system as of the requested time, 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. 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 Unique numeric ID of the system. + * @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 GetSystemProductionMeterReadingsResponse + * @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 getSystemProductionMeterReadings(systemId: kotlin.Int, endAt: kotlin.Long? = null) : GetSystemProductionMeterReadingsResponse { + val localVarResponse = getSystemProductionMeterReadingsWithHttpInfo(systemId = systemId, endAt = endAt) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemProductionMeterReadingsResponse + 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) + } + } + } + + /** + * production_meter_readings + * Returns the last known reading of each production meter on the system as of the requested time, 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. 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 Unique numeric ID of the system. + * @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 getSystemProductionMeterReadingsWithHttpInfo(systemId: kotlin.Int, endAt: kotlin.Long?) : ApiResponse { + val localVariableConfig = getSystemProductionMeterReadingsRequestConfig(systemId = systemId, endAt = endAt) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemProductionMeterReadings + * + * @param systemId Unique numeric ID of the system. + * @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 getSystemProductionMeterReadingsRequestConfig(systemId: kotlin.Int, endAt: kotlin.Long?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + 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 + ) + } + + /** + * Retrieves telemetry for all production meters for a system + * Retrieves telemetry for all the production meters of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return GetSystemProductionMeterTelemetryResponse + * @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 getSystemProductionMeterTelemetry(systemId: kotlin.Int, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : GetSystemProductionMeterTelemetryResponse { + val localVarResponse = getSystemProductionMeterTelemetryWithHttpInfo(systemId = systemId, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemProductionMeterTelemetryResponse + 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 telemetry for all production meters for a system + * Retrieves telemetry for all the production meters of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 1 interval will appear in response. If granularity is day, maximum 96 intervals, and if granularity is week, maximum 672 intervals, will appear in response where each interval is of 15 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemProductionMeterTelemetryWithHttpInfo(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemProductionMeterTelemetryRequestConfig(systemId = systemId, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemProductionMeterTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemProductionMeterTelemetryRequestConfig(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/telemetry/production_meter".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieves telemetry for all production micros for a system + * Retrieves telemetry for all the production micros of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 3 intervals will appear in response. If granularity is day, maximum 288 intervals will appear in response where each interval is of 5 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return GetSystemProductionMicroTelemetryResponse + * @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 getSystemProductionMicroTelemetry(systemId: kotlin.Int, startAt: kotlin.Long? = null, granularity: TelemetryGranularityEnum? = null) : GetSystemProductionMicroTelemetryResponse { + val localVarResponse = getSystemProductionMicroTelemetryWithHttpInfo(systemId = systemId, startAt = startAt, granularity = granularity) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemProductionMicroTelemetryResponse + 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 telemetry for all production micros for a system + * Retrieves telemetry for all the production micros of a system. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. The end_at is calculated as the minimum of the time of the request and (start time + granularity). The meaning of granularity is as follows: If granularity is 15mins, maximum 3 intervals will appear in response. If granularity is day, maximum 288 intervals will appear in response where each interval is of 5 mins duration. The requested start date must be within 2 years from current date. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (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 getSystemProductionMicroTelemetryWithHttpInfo(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : ApiResponse { + val localVariableConfig = getSystemProductionMicroTelemetryRequestConfig(systemId = systemId, startAt = startAt, granularity = granularity) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemProductionMicroTelemetry + * + * @param systemId Unique numeric ID of the system. + * @param startAt Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. (optional) + * @param granularity Granularity of the telemetry data. Default is 'day'. (optional) + * @return RequestConfig + */ + fun getSystemProductionMicroTelemetryRequestConfig(systemId: kotlin.Int, startAt: kotlin.Long?, granularity: TelemetryGranularityEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (startAt != null) { + put("start_at", listOf(startAt.toString())) + } + if (granularity != null) { + put("granularity", listOf(granularity.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/telemetry/production_micro".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * rgm_stats + * Returns performance statistics as measured by the revenue-grade meters installed on the specified system. If the total duration requested is more than one week, returns one week 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 (in epoch format) is treated as a request for 08:00 (in epoch format). Intervals are listed by their end times in epoch format. The requested date range in one API hit cannot be more than 7 days and the requested start at must be within 2 years from current time. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. + * @param systemId Unique numeric ID of the system. + * @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 at midnight of the first reported interval date. (optional) + * @param endAt End of reporting period in Unix epoch time. If no end is specified, default to the time of the request or (start time + 1 week), whichever is earlier. If the end is later than the last reported interval the response data ends with the last reported interval. (optional) + * @return GetSystemRgmStatsResponse + * @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 getSystemRgmStats(systemId: kotlin.Int, startAt: kotlin.Long? = null, endAt: kotlin.Long? = null) : GetSystemRgmStatsResponse { + val localVarResponse = getSystemRgmStatsWithHttpInfo(systemId = systemId, startAt = startAt, endAt = endAt) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemRgmStatsResponse + 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) + } + } + } + + /** + * rgm_stats + * Returns performance statistics as measured by the revenue-grade meters installed on the specified system. If the total duration requested is more than one week, returns one week 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 (in epoch format) is treated as a request for 08:00 (in epoch format). Intervals are listed by their end times in epoch format. The requested date range in one API hit cannot be more than 7 days and the requested start at must be within 2 years from current time. If the start_at specified is earlier than the system's first reported date, then midnight of the system's first reported date is considered as start_at. + * @param systemId Unique numeric ID of the system. + * @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 at midnight of the first reported interval date. (optional) + * @param endAt End of reporting period in Unix epoch time. If no end is specified, default to the time of the request or (start time + 1 week), whichever is earlier. 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 getSystemRgmStatsWithHttpInfo(systemId: kotlin.Int, startAt: kotlin.Long?, endAt: kotlin.Long?) : ApiResponse { + val localVariableConfig = getSystemRgmStatsRequestConfig(systemId = systemId, startAt = startAt, endAt = endAt) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemRgmStats + * + * @param systemId Unique numeric ID of the system. + * @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 at midnight of the first reported interval date. (optional) + * @param endAt End of reporting period in Unix epoch time. If no end is specified, default to the time of the request or (start time + 1 week), whichever is earlier. If the end is later than the last reported interval the response data ends with the last reported interval. (optional) + * @return RequestConfig + */ + fun getSystemRgmStatsRequestConfig(systemId: kotlin.Int, startAt: kotlin.Long?, endAt: kotlin.Long?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + 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 + ) + } + + + private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String = + HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0] +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/StreamingApi.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/StreamingApi.kt new file mode 100644 index 00000000..c14ef394 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/StreamingApi.kt @@ -0,0 +1,126 @@ +/** + * + * 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.monitoring.apis + +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import enlighten.monitoring.models.StreamSystemLiveDataError +import enlighten.monitoring.models.StreamSystemLiveDataResponse + +import com.squareup.moshi.Json + +import enlighten.monitoring.infrastructure.ApiClient +import enlighten.monitoring.infrastructure.ApiResponse +import enlighten.monitoring.infrastructure.ClientException +import enlighten.monitoring.infrastructure.ClientError +import enlighten.monitoring.infrastructure.ServerException +import enlighten.monitoring.infrastructure.ServerError +import enlighten.monitoring.infrastructure.MultiValueMap +import enlighten.monitoring.infrastructure.PartConfig +import enlighten.monitoring.infrastructure.RequestConfig +import enlighten.monitoring.infrastructure.RequestMethod +import enlighten.monitoring.infrastructure.ResponseType +import enlighten.monitoring.infrastructure.Success +import enlighten.monitoring.infrastructure.toMultiValue + +class StreamingApi(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") + } + } + + /** + * Site Level Live Status + * API users can get real time live status data on demand for a given system. User can retrieve real time power for PV Production, Grid Import/Export, Consumption, Battery Charge/Discharge, and Generator. Users can also retrieve Grid Status, Battery Mode, and Battery State of Charge. User will receive the stream for a duration of 30 seconds by default and can configure the time in seconds by passing 'duration' as a header parameter with a minimum value of 30 and maximum value of 300. + * @param systemId Unique numeric ID of the system. + * @param duration Duration of the stream in seconds. Default=30, Min=30, Max=300, e.g=30. (optional) + * @return StreamSystemLiveDataResponse + * @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 streamSystemLiveData(systemId: kotlin.Int, duration: kotlin.Int? = null) : StreamSystemLiveDataResponse { + val localVarResponse = streamSystemLiveDataWithHttpInfo(systemId = systemId, duration = duration) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as StreamSystemLiveDataResponse + 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) + } + } + } + + /** + * Site Level Live Status + * API users can get real time live status data on demand for a given system. User can retrieve real time power for PV Production, Grid Import/Export, Consumption, Battery Charge/Discharge, and Generator. Users can also retrieve Grid Status, Battery Mode, and Battery State of Charge. User will receive the stream for a duration of 30 seconds by default and can configure the time in seconds by passing 'duration' as a header parameter with a minimum value of 30 and maximum value of 300. + * @param systemId Unique numeric ID of the system. + * @param duration Duration of the stream in seconds. Default=30, Min=30, Max=300, e.g=30. (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 streamSystemLiveDataWithHttpInfo(systemId: kotlin.Int, duration: kotlin.Int?) : ApiResponse { + val localVariableConfig = streamSystemLiveDataRequestConfig(systemId = systemId, duration = duration) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation streamSystemLiveData + * + * @param systemId Unique numeric ID of the system. + * @param duration Duration of the stream in seconds. Default=30, Min=30, Max=300, e.g=30. (optional) + * @return RequestConfig + */ + fun streamSystemLiveDataRequestConfig(systemId: kotlin.Int, duration: kotlin.Int?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + duration?.apply { localVariableHeaders["duration"] = this.toString() } + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/{system_id}/live_data".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/monitoring/src/main/kotlin/enlighten/monitoring/apis/SystemConfigurationsApi.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SystemConfigurationsApi.kt new file mode 100644 index 00000000..d1e0d1de --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SystemConfigurationsApi.kt @@ -0,0 +1,571 @@ +/** + * + * 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.monitoring.apis + +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import enlighten.monitoring.models.BatterySettings +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetSystemGridStatusSettingsResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.LoadControlSettings +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.StormGuardSettings +import enlighten.monitoring.models.TooManyRequestsError +import enlighten.monitoring.models.UpdateSystemBatterySettingsRequest +import enlighten.monitoring.models.UpdateSystemLoadControlSettingsRequest +import enlighten.monitoring.models.UpdateSystemStormGuardSettingsRequest + +import com.squareup.moshi.Json + +import enlighten.monitoring.infrastructure.ApiClient +import enlighten.monitoring.infrastructure.ApiResponse +import enlighten.monitoring.infrastructure.ClientException +import enlighten.monitoring.infrastructure.ClientError +import enlighten.monitoring.infrastructure.ServerException +import enlighten.monitoring.infrastructure.ServerError +import enlighten.monitoring.infrastructure.MultiValueMap +import enlighten.monitoring.infrastructure.PartConfig +import enlighten.monitoring.infrastructure.RequestConfig +import enlighten.monitoring.infrastructure.RequestMethod +import enlighten.monitoring.infrastructure.ResponseType +import enlighten.monitoring.infrastructure.Success +import enlighten.monitoring.infrastructure.toMultiValue + +class SystemConfigurationsApi(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 current battery settings of a system + * Returns the current battery settings of a system. + * @param systemId Unique numeric ID of the system. + * @return BatterySettings + * @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 getSystemBatterySettings(systemId: kotlin.Int) : BatterySettings { + val localVarResponse = getSystemBatterySettingsWithHttpInfo(systemId = systemId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as BatterySettings + 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 current battery settings of a system + * Returns the current battery settings of a system. + * @param systemId Unique numeric ID 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 getSystemBatterySettingsWithHttpInfo(systemId: kotlin.Int) : ApiResponse { + val localVariableConfig = getSystemBatterySettingsRequestConfig(systemId = systemId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemBatterySettings + * + * @param systemId Unique numeric ID of the system. + * @return RequestConfig + */ + fun getSystemBatterySettingsRequestConfig(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 = "/systems/config/{system_id}/battery_settings".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Returns the current grid status of a system. + * Returns the current grid status of a system. Please note that the status returned in the response is not real-time and is updated only after the IQ Gateway sends a new report to the Enphase cloud. + * @param systemId Unique numeric ID of the system. + * @return GetSystemGridStatusSettingsResponse + * @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 getSystemGridStatusSettings(systemId: kotlin.Int) : GetSystemGridStatusSettingsResponse { + val localVarResponse = getSystemGridStatusSettingsWithHttpInfo(systemId = systemId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemGridStatusSettingsResponse + 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 current grid status of a system. + * Returns the current grid status of a system. Please note that the status returned in the response is not real-time and is updated only after the IQ Gateway sends a new report to the Enphase cloud. + * @param systemId Unique numeric ID 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 getSystemGridStatusSettingsWithHttpInfo(systemId: kotlin.Int) : ApiResponse { + val localVariableConfig = getSystemGridStatusSettingsRequestConfig(systemId = systemId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemGridStatusSettings + * + * @param systemId Unique numeric ID of the system. + * @return RequestConfig + */ + fun getSystemGridStatusSettingsRequestConfig(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 = "/systems/config/{system_id}/grid_status".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Returns the current load control settings of a system + * Returns the current load control settings of a system. + * @param systemId Unique numeric ID of the system. + * @return LoadControlSettings + * @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 getSystemLoadControlSettings(systemId: kotlin.Int) : LoadControlSettings { + val localVarResponse = getSystemLoadControlSettingsWithHttpInfo(systemId = systemId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoadControlSettings + 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 current load control settings of a system + * Returns the current load control settings of a system. + * @param systemId Unique numeric ID 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 getSystemLoadControlSettingsWithHttpInfo(systemId: kotlin.Int) : ApiResponse { + val localVariableConfig = getSystemLoadControlSettingsRequestConfig(systemId = systemId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemLoadControlSettings + * + * @param systemId Unique numeric ID of the system. + * @return RequestConfig + */ + fun getSystemLoadControlSettingsRequestConfig(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 = "/systems/config/{system_id}/load_control".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Returns the current storm guard settings of a system + * Returns the current storm guard settings of a system. + * @param systemId Unique numeric ID of the system. + * @return StormGuardSettings + * @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 getSystemStormGuardSettings(systemId: kotlin.Int) : StormGuardSettings { + val localVarResponse = getSystemStormGuardSettingsWithHttpInfo(systemId = systemId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as StormGuardSettings + 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 current storm guard settings of a system + * Returns the current storm guard settings of a system. + * @param systemId Unique numeric ID 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 getSystemStormGuardSettingsWithHttpInfo(systemId: kotlin.Int) : ApiResponse { + val localVariableConfig = getSystemStormGuardSettingsRequestConfig(systemId = systemId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemStormGuardSettings + * + * @param systemId Unique numeric ID of the system. + * @return RequestConfig + */ + fun getSystemStormGuardSettingsRequestConfig(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 = "/systems/config/{system_id}/storm_guard".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Updates the current battery settings of a system + * Updates the current battery settings of a system. + * @param systemId Unique numeric ID of the system. + * @param batterySettings (optional) + * @return BatterySettings + * @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 updateSystemBatterySettings(systemId: kotlin.Int, batterySettings: UpdateSystemBatterySettingsRequest? = null) : BatterySettings { + val localVarResponse = updateSystemBatterySettingsWithHttpInfo(systemId = systemId, batterySettings = batterySettings) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as BatterySettings + 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) + } + } + } + + /** + * Updates the current battery settings of a system + * Updates the current battery settings of a system. + * @param systemId Unique numeric ID of the system. + * @param batterySettings (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 updateSystemBatterySettingsWithHttpInfo(systemId: kotlin.Int, batterySettings: UpdateSystemBatterySettingsRequest?) : ApiResponse { + val localVariableConfig = updateSystemBatterySettingsRequestConfig(systemId = systemId, batterySettings = batterySettings) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateSystemBatterySettings + * + * @param systemId Unique numeric ID of the system. + * @param batterySettings (optional) + * @return RequestConfig + */ + fun updateSystemBatterySettingsRequestConfig(systemId: kotlin.Int, batterySettings: UpdateSystemBatterySettingsRequest?) : RequestConfig { + val localVariableBody = batterySettings + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.PUT, + path = "/systems/config/{system_id}/battery_settings".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Updates the current load control settings of a system + * Updates the current load control settings of a system. + * @param systemId Unique numeric ID of the system. + * @param updateSystemLoadControlSettingsRequest (optional) + * @return LoadControlSettings + * @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 updateSystemLoadControlSettings(systemId: kotlin.Int, updateSystemLoadControlSettingsRequest: UpdateSystemLoadControlSettingsRequest? = null) : LoadControlSettings { + val localVarResponse = updateSystemLoadControlSettingsWithHttpInfo(systemId = systemId, updateSystemLoadControlSettingsRequest = updateSystemLoadControlSettingsRequest) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as LoadControlSettings + 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) + } + } + } + + /** + * Updates the current load control settings of a system + * Updates the current load control settings of a system. + * @param systemId Unique numeric ID of the system. + * @param updateSystemLoadControlSettingsRequest (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 updateSystemLoadControlSettingsWithHttpInfo(systemId: kotlin.Int, updateSystemLoadControlSettingsRequest: UpdateSystemLoadControlSettingsRequest?) : ApiResponse { + val localVariableConfig = updateSystemLoadControlSettingsRequestConfig(systemId = systemId, updateSystemLoadControlSettingsRequest = updateSystemLoadControlSettingsRequest) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateSystemLoadControlSettings + * + * @param systemId Unique numeric ID of the system. + * @param updateSystemLoadControlSettingsRequest (optional) + * @return RequestConfig + */ + fun updateSystemLoadControlSettingsRequestConfig(systemId: kotlin.Int, updateSystemLoadControlSettingsRequest: UpdateSystemLoadControlSettingsRequest?) : RequestConfig { + val localVariableBody = updateSystemLoadControlSettingsRequest + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.PUT, + path = "/systems/config/{system_id}/load_control".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Updates the current storm guard settings of a system + * Updates the current storm guard status of a system. + * @param systemId Unique numeric ID of the system. + * @param stormGuard (optional) + * @return StormGuardSettings + * @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 updateSystemStormGuardSettings(systemId: kotlin.Int, stormGuard: UpdateSystemStormGuardSettingsRequest? = null) : StormGuardSettings { + val localVarResponse = updateSystemStormGuardSettingsWithHttpInfo(systemId = systemId, stormGuard = stormGuard) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as StormGuardSettings + 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) + } + } + } + + /** + * Updates the current storm guard settings of a system + * Updates the current storm guard status of a system. + * @param systemId Unique numeric ID of the system. + * @param stormGuard (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 updateSystemStormGuardSettingsWithHttpInfo(systemId: kotlin.Int, stormGuard: UpdateSystemStormGuardSettingsRequest?) : ApiResponse { + val localVariableConfig = updateSystemStormGuardSettingsRequestConfig(systemId = systemId, stormGuard = stormGuard) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation updateSystemStormGuardSettings + * + * @param systemId Unique numeric ID of the system. + * @param stormGuard (optional) + * @return RequestConfig + */ + fun updateSystemStormGuardSettingsRequestConfig(systemId: kotlin.Int, stormGuard: UpdateSystemStormGuardSettingsRequest?) : RequestConfig { + val localVariableBody = stormGuard + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.PUT, + path = "/systems/config/{system_id}/storm_guard".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/monitoring/src/main/kotlin/enlighten/monitoring/apis/SystemDetailsApi.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SystemDetailsApi.kt new file mode 100644 index 00000000..430c8456 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/apis/SystemDetailsApi.kt @@ -0,0 +1,607 @@ +/** + * + * 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.monitoring.apis + +import java.io.IOException +import okhttp3.OkHttpClient +import okhttp3.HttpUrl + +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInner +import enlighten.monitoring.models.GetSystemDevicesResponse +import enlighten.monitoring.models.GetSystemSummaryResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.GetSystemsResponse +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.RetrieveSystemIdResponse +import enlighten.monitoring.models.SearchSystemsRequest +import enlighten.monitoring.models.SearchSystemsResponse +import enlighten.monitoring.models.SystemDetails +import enlighten.monitoring.models.SystemSortByEnum +import enlighten.monitoring.models.TooManyRequestsError + +import com.squareup.moshi.Json + +import enlighten.monitoring.infrastructure.ApiClient +import enlighten.monitoring.infrastructure.ApiResponse +import enlighten.monitoring.infrastructure.ClientException +import enlighten.monitoring.infrastructure.ClientError +import enlighten.monitoring.infrastructure.ServerException +import enlighten.monitoring.infrastructure.ServerError +import enlighten.monitoring.infrastructure.MultiValueMap +import enlighten.monitoring.infrastructure.PartConfig +import enlighten.monitoring.infrastructure.RequestConfig +import enlighten.monitoring.infrastructure.RequestMethod +import enlighten.monitoring.infrastructure.ResponseType +import enlighten.monitoring.infrastructure.Success +import enlighten.monitoring.infrastructure.toMultiValue + +class SystemDetailsApi(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") + } + } + + /** + * inverters_summary_by_envoy_or_site + * Returns the microinverters summary based on the specified active envoy serial number or system. + * @param siteId Site ID. The response will contain only those microinverters reporting to one of the active envoys of the given site. (optional) + * @param envoySerialNumber Active envoy serial number. Only microinverters reporting to the given active envoy will be present in the response. (optional) + * @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 getInvertersSummaryByEnvoyOrSite(siteId: kotlin.Int? = null, envoySerialNumber: kotlin.String? = null) : kotlin.collections.List { + val localVarResponse = getInvertersSummaryByEnvoyOrSiteWithHttpInfo(siteId = siteId, envoySerialNumber = envoySerialNumber) + + 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) + } + } + } + + /** + * inverters_summary_by_envoy_or_site + * Returns the microinverters summary based on the specified active envoy serial number or system. + * @param siteId Site ID. The response will contain only those microinverters reporting to one of the active envoys of the given site. (optional) + * @param envoySerialNumber Active envoy serial number. Only microinverters reporting to the given active envoy will be present 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 getInvertersSummaryByEnvoyOrSiteWithHttpInfo(siteId: kotlin.Int?, envoySerialNumber: kotlin.String?) : ApiResponse?> { + val localVariableConfig = getInvertersSummaryByEnvoyOrSiteRequestConfig(siteId = siteId, envoySerialNumber = envoySerialNumber) + + return request>( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getInvertersSummaryByEnvoyOrSite + * + * @param siteId Site ID. The response will contain only those microinverters reporting to one of the active envoys of the given site. (optional) + * @param envoySerialNumber Active envoy serial number. Only microinverters reporting to the given active envoy will be present in the response. (optional) + * @return RequestConfig + */ + fun getInvertersSummaryByEnvoyOrSiteRequestConfig(siteId: kotlin.Int?, envoySerialNumber: kotlin.String?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (siteId != null) { + put("site_id", listOf(siteId.toString())) + } + if (envoySerialNumber != null) { + put("envoy_serial_number", listOf(envoySerialNumber.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 + ) + } + + /** + * Retrieves a System by ID + * Retrieves a system by ID. + * @param systemId Unique numeric ID of the system. + * @return SystemDetails + * @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 getSystem(systemId: kotlin.Int) : SystemDetails { + val localVarResponse = getSystemWithHttpInfo(systemId = systemId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as SystemDetails + 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 a System by ID + * Retrieves a system by ID. + * @param systemId Unique numeric ID 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 getSystemWithHttpInfo(systemId: kotlin.Int) : ApiResponse { + val localVariableConfig = getSystemRequestConfig(systemId = systemId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystem + * + * @param systemId Unique numeric ID of the system. + * @return RequestConfig + */ + fun getSystemRequestConfig(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 = "/systems/{system_id}".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieves devices for a given system + * Retrieves devices for a given system. Only devices that are active will be returned in the response. + * @param systemId Unique numeric ID of the system. + * @return GetSystemDevicesResponse + * @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 getSystemDevices(systemId: kotlin.Int) : GetSystemDevicesResponse { + val localVarResponse = getSystemDevicesWithHttpInfo(systemId = systemId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemDevicesResponse + 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 devices for a given system + * Retrieves devices for a given system. Only devices that are active will be returned in the response. + * @param systemId Unique numeric ID 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 getSystemDevicesWithHttpInfo(systemId: kotlin.Int) : ApiResponse { + val localVariableConfig = getSystemDevicesRequestConfig(systemId = systemId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemDevices + * + * @param systemId Unique numeric ID of the system. + * @return RequestConfig + */ + fun getSystemDevicesRequestConfig(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 = "/systems/{system_id}/devices".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieves a system summary + * Returns system summary based on the specified system ID. + * @param systemId Unique numeric ID of the system. + * @return GetSystemSummaryResponse + * @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 getSystemSummary(systemId: kotlin.Int) : GetSystemSummaryResponse { + val localVarResponse = getSystemSummaryWithHttpInfo(systemId = systemId) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemSummaryResponse + 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 a system summary + * Returns system summary based on the specified system ID. + * @param systemId Unique numeric ID 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 getSystemSummaryWithHttpInfo(systemId: kotlin.Int) : ApiResponse { + val localVariableConfig = getSystemSummaryRequestConfig(systemId = systemId) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystemSummary + * + * @param systemId Unique numeric ID of the system. + * @return RequestConfig + */ + fun getSystemSummaryRequestConfig(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 = "/systems/{system_id}/summary".replace("{"+"system_id"+"}", encodeURIComponent(systemId.toString())), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Fetch systems + * Returns a list of systems for which the user can make API requests. By default, systems are returned in batches of 10. The maximum size is 100. + * @param page Page to be returned. Default=1, Min=1. For example, if page is set to 2, 2nd page is returned. (optional) + * @param size Maximum number of records shown per page. Default=10, Min=1, Max=100. For example, if set to 5, 5 records are shown per page. (optional) + * @param sortBy Returns list of systems sorted by <sort_by> field. To get ASC order sorted list, user sort_by = <key>. To get DESC order sorted list, use sort_by = (-)<key>. Current sort keys supported are id, name, and last_report_date. By default the list is sorted by decreasing system ID. (optional) + * @return GetSystemsResponse + * @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 getSystems(page: kotlin.Int? = null, size: kotlin.Int? = null, sortBy: SystemSortByEnum? = null) : GetSystemsResponse { + val localVarResponse = getSystemsWithHttpInfo(page = page, size = size, sortBy = sortBy) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetSystemsResponse + 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 systems + * Returns a list of systems for which the user can make API requests. By default, systems are returned in batches of 10. The maximum size is 100. + * @param page Page to be returned. Default=1, Min=1. For example, if page is set to 2, 2nd page is returned. (optional) + * @param size Maximum number of records shown per page. Default=10, Min=1, Max=100. For example, if set to 5, 5 records are shown per page. (optional) + * @param sortBy Returns list of systems sorted by <sort_by> field. To get ASC order sorted list, user sort_by = <key>. To get DESC order sorted list, use sort_by = (-)<key>. Current sort keys supported are id, name, and last_report_date. By default the list is sorted by decreasing system ID. (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 getSystemsWithHttpInfo(page: kotlin.Int?, size: kotlin.Int?, sortBy: SystemSortByEnum?) : ApiResponse { + val localVariableConfig = getSystemsRequestConfig(page = page, size = size, sortBy = sortBy) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getSystems + * + * @param page Page to be returned. Default=1, Min=1. For example, if page is set to 2, 2nd page is returned. (optional) + * @param size Maximum number of records shown per page. Default=10, Min=1, Max=100. For example, if set to 5, 5 records are shown per page. (optional) + * @param sortBy Returns list of systems sorted by <sort_by> field. To get ASC order sorted list, user sort_by = <key>. To get DESC order sorted list, use sort_by = (-)<key>. Current sort keys supported are id, name, and last_report_date. By default the list is sorted by decreasing system ID. (optional) + * @return RequestConfig + */ + fun getSystemsRequestConfig(page: kotlin.Int?, size: kotlin.Int?, sortBy: SystemSortByEnum?) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (page != null) { + put("page", listOf(page.toString())) + } + if (size != null) { + put("size", listOf(size.toString())) + } + if (sortBy != null) { + put("sort_by", listOf(sortBy.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Retrieve system for a given envoy serial number + * Get system ID by passing envoy serial number. If the serial number of a retired envoy is passed in the request param, a 404 Not Found response will be returned. + * @param serialNum Envoy serial number. + * @return RetrieveSystemIdResponse + * @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 retrieveSystemId(serialNum: kotlin.String) : RetrieveSystemIdResponse { + val localVarResponse = retrieveSystemIdWithHttpInfo(serialNum = serialNum) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as RetrieveSystemIdResponse + 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) + } + } + } + + /** + * Retrieve system for a given envoy serial number + * Get system ID by passing envoy serial number. If the serial number of a retired envoy is passed in the request param, a 404 Not Found response will be returned. + * @param serialNum Envoy 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 retrieveSystemIdWithHttpInfo(serialNum: kotlin.String) : ApiResponse { + val localVariableConfig = retrieveSystemIdRequestConfig(serialNum = serialNum) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation retrieveSystemId + * + * @param serialNum Envoy serial number. + * @return RequestConfig + */ + fun retrieveSystemIdRequestConfig(serialNum: kotlin.String) : RequestConfig { + val localVariableBody = null + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + put("serial_num", listOf(serialNum.toString())) + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/systems/retrieve_system_id", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + body = localVariableBody + ) + } + + /** + * Search and filter systems + * Search and filter systems. Provide only valid values in request parameters. Empty and invalid values will be ignored. Invalid keys will be rejected. + * @param page Page to be returned. Default=1, Min=1, e.g=2. (optional) + * @param size Maximum number of records shown per page. Default=10, Min=1, Max=1000, e.g=5. (optional) + * @param params (optional) + * @return SearchSystemsResponse + * @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 searchSystems(page: kotlin.Int? = null, size: kotlin.Int? = null, params: SearchSystemsRequest? = null) : SearchSystemsResponse { + val localVarResponse = searchSystemsWithHttpInfo(page = page, size = size, params = params) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as SearchSystemsResponse + 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) + } + } + } + + /** + * Search and filter systems + * Search and filter systems. Provide only valid values in request parameters. Empty and invalid values will be ignored. Invalid keys will be rejected. + * @param page Page to be returned. Default=1, Min=1, e.g=2. (optional) + * @param size Maximum number of records shown per page. Default=10, Min=1, Max=1000, e.g=5. (optional) + * @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 searchSystemsWithHttpInfo(page: kotlin.Int?, size: kotlin.Int?, params: SearchSystemsRequest?) : ApiResponse { + val localVariableConfig = searchSystemsRequestConfig(page = page, size = size, params = params) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation searchSystems + * + * @param page Page to be returned. Default=1, Min=1, e.g=2. (optional) + * @param size Maximum number of records shown per page. Default=10, Min=1, Max=1000, e.g=5. (optional) + * @param params (optional) + * @return RequestConfig + */ + fun searchSystemsRequestConfig(page: kotlin.Int?, size: kotlin.Int?, params: SearchSystemsRequest?) : RequestConfig { + val localVariableBody = params + val localVariableQuery: MultiValueMap = mutableMapOf>() + .apply { + if (page != null) { + put("page", listOf(page.toString())) + } + if (size != null) { + put("size", listOf(size.toString())) + } + } + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/systems/search", + 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/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiAbstractions.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiAbstractions.kt new file mode 100644 index 00000000..7fb80594 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiAbstractions.kt @@ -0,0 +1,23 @@ +package enlighten.monitoring.infrastructure + +typealias MultiValueMap = MutableMap> + +fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) { + "csv" -> "," + "tsv" -> "\t" + "pipe" -> "|" + "space" -> " " + else -> "" +} + +val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" } + +fun toMultiValue(items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter) + = toMultiValue(items.asIterable(), collectionFormat, map) + +fun toMultiValue(items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List { + return when(collectionFormat) { + "multi" -> items.map(map) + else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) + } +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiClient.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiClient.kt new file mode 100644 index 00000000..f794ae85 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiClient.kt @@ -0,0 +1,272 @@ +package enlighten.monitoring.infrastructure + +import okhttp3.OkHttpClient +import okhttp3.RequestBody +import okhttp3.RequestBody.Companion.asRequestBody +import okhttp3.RequestBody.Companion.toRequestBody +import okhttp3.FormBody +import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.ResponseBody +import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.Request +import okhttp3.Headers +import okhttp3.Headers.Companion.toHeaders +import okhttp3.MultipartBody +import okhttp3.Call +import okhttp3.Callback +import okhttp3.Response +import java.io.BufferedWriter +import java.io.File +import java.io.FileWriter +import java.io.IOException +import java.net.URLConnection +import java.time.LocalDate +import java.time.LocalDateTime +import java.time.LocalTime +import java.time.OffsetDateTime +import java.time.OffsetTime +import java.util.Locale +import com.squareup.moshi.adapter + + val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody() + +open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClient) { + companion object { + protected const val ContentType = "Content-Type" + protected const val Accept = "Accept" + protected const val Authorization = "Authorization" + protected const val JsonMediaType = "application/json" + protected const val FormDataMediaType = "multipart/form-data" + protected const val FormUrlEncMediaType = "application/x-www-form-urlencoded" + protected const val XmlMediaType = "application/xml" + protected const val OctetMediaType = "application/octet-stream" + + val apiKey: MutableMap = mutableMapOf() + val apiKeyPrefix: MutableMap = mutableMapOf() + var username: String? = null + var password: String? = null + var accessToken: String? = null + const val baseUrlKey = "enlighten.monitoring.baseUrl" + + @JvmStatic + val defaultClient: OkHttpClient by lazy { + builder.build() + } + + @JvmStatic + val builder: OkHttpClient.Builder = OkHttpClient.Builder() + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + protected fun guessContentTypeFromFile(file: File): String { + val contentType = URLConnection.guessContentTypeFromName(file.name) + return contentType ?: "application/octet-stream" + } + + protected inline fun requestBody(content: T, mediaType: String?): RequestBody = + when { + content is File -> content.asRequestBody((mediaType ?: guessContentTypeFromFile(content)).toMediaTypeOrNull()) + mediaType == FormDataMediaType -> + MultipartBody.Builder() + .setType(MultipartBody.FORM) + .apply { + // content's type *must* be Map> + @Suppress("UNCHECKED_CAST") + (content as Map>).forEach { (name, part) -> + if (part.body is File) { + val partHeaders = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"; filename=\"${part.body.name}\"") + val fileMediaType = guessContentTypeFromFile(part.body).toMediaTypeOrNull() + addPart( + partHeaders.toHeaders(), + part.body.asRequestBody(fileMediaType) + ) + } else { + val partHeaders = part.headers.toMutableMap() + + ("Content-Disposition" to "form-data; name=\"$name\"") + addPart( + partHeaders.toHeaders(), + parameterToString(part.body).toRequestBody(null) + ) + } + } + }.build() + mediaType == FormUrlEncMediaType -> { + FormBody.Builder().apply { + // content's type *must* be Map> + @Suppress("UNCHECKED_CAST") + (content as Map>).forEach { (name, part) -> + add(name, parameterToString(part.body)) + } + }.build() + } + mediaType == null || mediaType.startsWith("application/") && mediaType.endsWith("json") -> + if (content == null) { + EMPTY_REQUEST + } else { + Serializer.moshi.adapter(T::class.java).toJson(content) + .toRequestBody((mediaType ?: JsonMediaType).toMediaTypeOrNull()) + } + mediaType == XmlMediaType -> throw UnsupportedOperationException("xml not currently supported.") + mediaType == OctetMediaType && content is ByteArray -> + content.toRequestBody(OctetMediaType.toMediaTypeOrNull()) + // TODO: this should be extended with other serializers + else -> throw UnsupportedOperationException("requestBody currently only supports JSON body, byte body and File body.") + } + + @OptIn(ExperimentalStdlibApi::class) + protected inline fun responseBody(body: ResponseBody?, mediaType: String? = JsonMediaType): T? { + if(body == null) { + return null + } + if (T::class.java == File::class.java) { + // return tempFile + // Attention: if you are developing an android app that supports API Level 25 and bellow, please check flag supportAndroidApiLevel25AndBelow in https://openapi-generator.tech/docs/generators/kotlin#config-options + val tempFile = java.nio.file.Files.createTempFile("tmp.enlighten.monitoring", null).toFile() + tempFile.deleteOnExit() + body.byteStream().use { inputStream -> + tempFile.outputStream().use { tempFileOutputStream -> + inputStream.copyTo(tempFileOutputStream) + } + } + return tempFile as T + } + + return when { + mediaType == null || (mediaType.startsWith("application/") && mediaType.endsWith("json")) -> { + val bodyContent = body.string() + if (bodyContent.isEmpty()) { + return null + } + Serializer.moshi.adapter().fromJson(bodyContent) + } + mediaType == OctetMediaType -> body.bytes() as? T + else -> throw UnsupportedOperationException("responseBody currently only supports JSON body.") + } + } + + protected fun updateAuthParams(requestConfig: RequestConfig) { + if (requestConfig.headers[Authorization].isNullOrEmpty()) { + accessToken?.let { accessToken -> + requestConfig.headers[Authorization] = "Bearer $accessToken " + } + } + if (requestConfig.query["key"].isNullOrEmpty()) { + if (apiKey["key"] != null) { + if (apiKeyPrefix["key"] != null) { + requestConfig.query["key"] = listOf(apiKeyPrefix["key"]!! + " " + apiKey["key"]!!) + } else { + requestConfig.query["key"] = listOf(apiKey["key"]!!) + } + } + } + } + + protected inline fun request(requestConfig: RequestConfig): ApiResponse { + val httpUrl = baseUrl.toHttpUrlOrNull() ?: throw IllegalStateException("baseUrl is invalid.") + + // take authMethod from operation + updateAuthParams(requestConfig) + + val url = httpUrl.newBuilder() + .addEncodedPathSegments(requestConfig.path.trimStart('/')) + .apply { + requestConfig.query.forEach { query -> + query.value.forEach { queryValue -> + addQueryParameter(query.key, queryValue) + } + } + }.build() + + // take content-type/accept from spec or set to default (application/json) if not defined + if (requestConfig.body != null && requestConfig.headers[ContentType].isNullOrEmpty()) { + requestConfig.headers[ContentType] = JsonMediaType + } + if (requestConfig.headers[Accept].isNullOrEmpty()) { + requestConfig.headers[Accept] = JsonMediaType + } + val headers = requestConfig.headers + + if (headers[Accept].isNullOrEmpty()) { + throw kotlin.IllegalStateException("Missing Accept header. This is required.") + } + + val contentType = if (headers[ContentType] != null) { + // TODO: support multiple contentType options here. + (headers[ContentType] as String).substringBefore(";").lowercase(Locale.US) + } else { + null + } + + val request = when (requestConfig.method) { + RequestMethod.DELETE -> Request.Builder().url(url).delete(requestBody(requestConfig.body, contentType)) + RequestMethod.GET -> Request.Builder().url(url) + RequestMethod.HEAD -> Request.Builder().url(url).head() + RequestMethod.PATCH -> Request.Builder().url(url).patch(requestBody(requestConfig.body, contentType)) + RequestMethod.PUT -> Request.Builder().url(url).put(requestBody(requestConfig.body, contentType)) + RequestMethod.POST -> Request.Builder().url(url).post(requestBody(requestConfig.body, contentType)) + RequestMethod.OPTIONS -> Request.Builder().url(url).method("OPTIONS", null) + }.apply { + headers.forEach { header -> addHeader(header.key, header.value) } + }.build() + + val response = client.newCall(request).execute() + + val accept = response.header(ContentType)?.substringBefore(";")?.lowercase(Locale.US) + + // TODO: handle specific mapping types. e.g. Map> + @Suppress("UNNECESSARY_SAFE_CALL") + return when { + response.isRedirect -> Redirection( + response.code, + response.headers.toMultimap() + ) + response.isInformational -> Informational( + response.message, + response.code, + response.headers.toMultimap() + ) + response.isSuccessful -> Success( + responseBody(response.body, accept), + response.code, + response.headers.toMultimap() + ) + response.isClientError -> ClientError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + else -> ServerError( + response.message, + response.body?.string(), + response.code, + response.headers.toMultimap() + ) + } + } + + protected fun parameterToString(value: Any?): String = when (value) { + null -> "" + is Array<*> -> toMultiValue(value, "csv").toString() + is Iterable<*> -> toMultiValue(value, "csv").toString() + is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime -> + parseDateToQueryString(value) + else -> value.toString() + } + + protected inline fun parseDateToQueryString(value : T): String { + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + } +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiResponse.kt new file mode 100644 index 00000000..ec6e714e --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ApiResponse.kt @@ -0,0 +1,43 @@ +package enlighten.monitoring.infrastructure + +enum class ResponseType { + Success, Informational, Redirection, ClientError, ServerError +} + +interface Response + +abstract class ApiResponse(val responseType: ResponseType): Response { + abstract val statusCode: Int + abstract val headers: Map> +} + +class Success( + val data: T, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +): ApiResponse(ResponseType.Success) + +class Informational( + val statusText: String, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Informational) + +class Redirection( + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.Redirection) + +class ClientError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> = mapOf() +) : ApiResponse(ResponseType.ClientError) + +class ServerError( + val message: String? = null, + val body: Any? = null, + override val statusCode: Int = -1, + override val headers: Map> +): ApiResponse(ResponseType.ServerError) diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/BigDecimalAdapter.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/BigDecimalAdapter.kt new file mode 100644 index 00000000..642394d2 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/BigDecimalAdapter.kt @@ -0,0 +1,17 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigDecimal + +class BigDecimalAdapter { + @ToJson + fun toJson(value: BigDecimal): String { + return value.toPlainString() + } + + @FromJson + fun fromJson(value: String): BigDecimal { + return BigDecimal(value) + } +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/BigIntegerAdapter.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/BigIntegerAdapter.kt new file mode 100644 index 00000000..a4312756 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/BigIntegerAdapter.kt @@ -0,0 +1,17 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.math.BigInteger + +class BigIntegerAdapter { + @ToJson + fun toJson(value: BigInteger): String { + return value.toString() + } + + @FromJson + fun fromJson(value: String): BigInteger { + return BigInteger(value) + } +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ByteArrayAdapter.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ByteArrayAdapter.kt new file mode 100644 index 00000000..b4b5d6d5 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ByteArrayAdapter.kt @@ -0,0 +1,12 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson + +class ByteArrayAdapter { + @ToJson + fun toJson(data: ByteArray): String = String(data) + + @FromJson + fun fromJson(data: String): ByteArray = data.toByteArray() +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/Errors.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/Errors.kt new file mode 100644 index 00000000..0a26235b --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/Errors.kt @@ -0,0 +1,18 @@ +@file:Suppress("unused") +package enlighten.monitoring.infrastructure + +import java.lang.RuntimeException + +open class ClientException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 123L + } +} + +open class ServerException(message: kotlin.String? = null, val statusCode: Int = -1, val response: Response? = null) : RuntimeException(message) { + + companion object { + private const val serialVersionUID: Long = 456L + } +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateAdapter.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateAdapter.kt new file mode 100644 index 00000000..cbf250ca --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class LocalDateAdapter { + @ToJson + fun toJson(value: LocalDate): String { + return DateTimeFormatter.ISO_LOCAL_DATE.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDate { + return LocalDate.parse(value, DateTimeFormatter.ISO_LOCAL_DATE) + } + +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateTimeAdapter.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateTimeAdapter.kt new file mode 100644 index 00000000..dec68fef --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/LocalDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +class LocalDateTimeAdapter { + @ToJson + fun toJson(value: LocalDateTime): String { + return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): LocalDateTime { + return LocalDateTime.parse(value, DateTimeFormatter.ISO_LOCAL_DATE_TIME) + } + +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/OffsetDateTimeAdapter.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/OffsetDateTimeAdapter.kt new file mode 100644 index 00000000..6e032ad8 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/OffsetDateTimeAdapter.kt @@ -0,0 +1,19 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.time.OffsetDateTime +import java.time.format.DateTimeFormatter + +class OffsetDateTimeAdapter { + @ToJson + fun toJson(value: OffsetDateTime): String { + return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(value) + } + + @FromJson + fun fromJson(value: String): OffsetDateTime { + return OffsetDateTime.parse(value, DateTimeFormatter.ISO_OFFSET_DATE_TIME) + } + +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/PartConfig.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/PartConfig.kt new file mode 100644 index 00000000..b8ac0e06 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/PartConfig.kt @@ -0,0 +1,11 @@ +package enlighten.monitoring.infrastructure + +/** + * Defines a config object for a given part of a multi-part request. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class PartConfig( + val headers: MutableMap = mutableMapOf(), + val body: T? = null +) diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/RequestConfig.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/RequestConfig.kt new file mode 100644 index 00000000..04e91773 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/RequestConfig.kt @@ -0,0 +1,19 @@ +package enlighten.monitoring.infrastructure + +/** + * Defines a config object for a given request. + * NOTE: This object doesn't include 'body' because it + * allows for caching of the constructed object + * for many request definitions. + * NOTE: Headers is a Map because rfc2616 defines + * multi-valued headers as csv-only. + */ +data class RequestConfig( + val method: RequestMethod, + val path: String, + val headers: MutableMap = mutableMapOf(), + val params: MutableMap = mutableMapOf(), + val query: MutableMap> = mutableMapOf(), + val requiresAuthentication: Boolean, + val body: T? = null +) diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/RequestMethod.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/RequestMethod.kt new file mode 100644 index 00000000..0d35c0ce --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/RequestMethod.kt @@ -0,0 +1,8 @@ +package enlighten.monitoring.infrastructure + +/** + * Provides enumerated HTTP verbs + */ +enum class RequestMethod { + GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ResponseExtensions.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ResponseExtensions.kt new file mode 100644 index 00000000..1ea041d2 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/ResponseExtensions.kt @@ -0,0 +1,24 @@ +package enlighten.monitoring.infrastructure + +import okhttp3.Response + +/** + * Provides an extension to evaluation whether the response is a 1xx code + */ +val Response.isInformational : Boolean get() = this.code in 100..199 + +/** + * Provides an extension to evaluation whether the response is a 3xx code + */ +@Suppress("EXTENSION_SHADOWED_BY_MEMBER") +val Response.isRedirect : Boolean get() = this.code in 300..399 + +/** + * Provides an extension to evaluation whether the response is a 4xx code + */ +val Response.isClientError : Boolean get() = this.code in 400..499 + +/** + * Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code + */ +val Response.isServerError : Boolean get() = this.code in 500..999 diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/Serializer.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/Serializer.kt new file mode 100644 index 00000000..daa6b8a9 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/Serializer.kt @@ -0,0 +1,23 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.Moshi +import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory + +object Serializer { + @JvmStatic + val moshiBuilder: Moshi.Builder = Moshi.Builder() + .add(OffsetDateTimeAdapter()) + .add(LocalDateTimeAdapter()) + .add(LocalDateAdapter()) + .add(UUIDAdapter()) + .add(ByteArrayAdapter()) + .add(URIAdapter()) + .add(KotlinJsonAdapterFactory()) + .add(BigDecimalAdapter()) + .add(BigIntegerAdapter()) + + @JvmStatic + val moshi: Moshi by lazy { + moshiBuilder.build() + } +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/URIAdapter.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/URIAdapter.kt new file mode 100644 index 00000000..5beae508 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/URIAdapter.kt @@ -0,0 +1,13 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.net.URI + +class URIAdapter { + @ToJson + fun toJson(uri: URI) = uri.toString() + + @FromJson + fun fromJson(s: String): URI = URI.create(s) +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/UUIDAdapter.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/UUIDAdapter.kt new file mode 100644 index 00000000..6634424d --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/infrastructure/UUIDAdapter.kt @@ -0,0 +1,13 @@ +package enlighten.monitoring.infrastructure + +import com.squareup.moshi.FromJson +import com.squareup.moshi.ToJson +import java.util.UUID + +class UUIDAdapter { + @ToJson + fun toJson(uuid: UUID) = uuid.toString() + + @FromJson + fun fromJson(s: String): UUID = UUID.fromString(s) +} diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetry.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetry.kt new file mode 100644 index 00000000..e2049e33 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetry.kt @@ -0,0 +1,81 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInner +import enlighten.monitoring.models.TelemetryGranularityEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId System ID. + * @param serialNumber Device serial number. + * @param granularity + * @param totalDevices Shall always be 1 since this is telemetry from individual micros. + * @param startAt Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response. + * @param endAt End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response. + * @param items List key 'intervals'. + * @param intervals + * @param lastReportedTime Last reported timestamp. + * @param lastReportedSoc Last reported soc percentage. + */ + + +data class BatteryDeviceTelemetry ( + + /* System ID. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Device serial number. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String? = null, + + @Json(name = "granularity") + val granularity: TelemetryGranularityEnum? = null, + + /* Shall always be 1 since this is telemetry from individual micros. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response. */ + @Json(name = "start_at") + val startAt: kotlin.Long? = null, + + /* End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* List key 'intervals'. */ + @Json(name = "items") + val items: kotlin.String? = null, + + @Json(name = "intervals") + val intervals: kotlin.collections.List? = null, + + /* Last reported timestamp. */ + @Json(name = "last_reported_time") + val lastReportedTime: kotlin.Int? = null, + + /* Last reported soc percentage. */ + @Json(name = "last_reported_soc") + val lastReportedSoc: kotlin.String? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInner.kt new file mode 100644 index 00000000..8af0f694 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInner.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerCharge +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerDischarge +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerSoc + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param charge + * @param discharge + * @param soc + */ + + +data class BatteryDeviceTelemetryIntervalsInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + @Json(name = "charge") + val charge: BatteryDeviceTelemetryIntervalsInnerCharge? = null, + + @Json(name = "discharge") + val discharge: BatteryDeviceTelemetryIntervalsInnerDischarge? = null, + + @Json(name = "soc") + val soc: BatteryDeviceTelemetryIntervalsInnerSoc? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerCharge.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerCharge.kt new file mode 100644 index 00000000..90b27a4c --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerCharge.kt @@ -0,0 +1,36 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param enwh Energy into the battery during the interval. + */ + + +data class BatteryDeviceTelemetryIntervalsInnerCharge ( + + /* Energy into the battery during the interval. */ + @Json(name = "enwh") + val enwh: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischarge.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischarge.kt new file mode 100644 index 00000000..4b1b12ad --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischarge.kt @@ -0,0 +1,36 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param enwh Energy discharged from the battery during the interval. + */ + + +data class BatteryDeviceTelemetryIntervalsInnerDischarge ( + + /* Energy discharged from the battery during the interval. */ + @Json(name = "enwh") + val enwh: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSoc.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSoc.kt new file mode 100644 index 00000000..93483703 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSoc.kt @@ -0,0 +1,36 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param percent Battery soc percentage. + */ + + +data class BatteryDeviceTelemetryIntervalsInnerSoc ( + + /* Battery soc percentage. */ + @Json(name = "percent") + val percent: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatterySettings.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatterySettings.kt new file mode 100644 index 00000000..962d6d88 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/BatterySettings.kt @@ -0,0 +1,60 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId + * @param batteryMode Current battery mode of the system. Available values are Savings Mode, Full Backup, and Self - Consumption. + * @param reserveSoc Reserve soc for the current mode. + * @param energyIndependence Energy independence after peak hours enabled/disabled. Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period. Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period. + * @param chargeFromGrid Charge battery from grid enabled/disabled. Enabled: Battery may also charge from the grid when in full backup mode or when battery charge is below the reserve capacity in savings or self-consumption mode. + * @param batteryShutdownLevel Level at which battery shutdowns to conserve energy. Battery restarts by using the conserved energy when the utility grid restores power or solar panels start producing energy. + */ + + +data class BatterySettings ( + + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Current battery mode of the system. Available values are Savings Mode, Full Backup, and Self - Consumption. */ + @Json(name = "battery_mode") + val batteryMode: kotlin.String? = null, + + /* Reserve soc for the current mode. */ + @Json(name = "reserve_soc") + val reserveSoc: kotlin.Int? = null, + + /* Energy independence after peak hours enabled/disabled. Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period. Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period. */ + @Json(name = "energy_independence") + val energyIndependence: kotlin.String? = null, + + /* Charge battery from grid enabled/disabled. Enabled: Battery may also charge from the grid when in full backup mode or when battery charge is below the reserve capacity in savings or self-consumption mode. */ + @Json(name = "charge_from_grid") + val chargeFromGrid: kotlin.String? = null, + + /* Level at which battery shutdowns to conserve energy. Battery restarts by using the conserved energy when the utility grid restores power or solar panels start producing energy. */ + @Json(name = "battery_shutdown_level") + val batteryShutdownLevel: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/ClientError.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/ClientError.kt new file mode 100644 index 00000000..c6b872b6 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/ClientError.kt @@ -0,0 +1,46 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param details Error details. + * @param code Error code. + * @param message Error type. + */ + + +data class ClientError ( + + /* Error details. */ + @Json(name = "details") + val details: kotlin.String, + + /* Error code. */ + @Json(name = "code") + val code: kotlin.Int, + + /* Error type. */ + @Json(name = "message") + val message: kotlin.String? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableError.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableError.kt new file mode 100644 index 00000000..4ca500ce --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableError.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param errorCode Error code. + * @param errorMessages Error messages. + */ + + +data class DataTemporarilyUnavailableError ( + + /* Error code. */ + @Json(name = "errorCode") + val errorCode: kotlin.Int? = null, + + /* Error messages. */ + @Json(name = "errorMessages") + val errorMessages: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInner.kt new file mode 100644 index 00000000..37924f76 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInner.kt @@ -0,0 +1,42 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param signalStrength Signal strength. + * @param microInverters Microinverters. + */ + + +data class GetInvertersSummaryByEnvoyOrSiteResponseInner ( + + /* Signal strength. */ + @Json(name = "signal_strength") + val signalStrength: kotlin.Int? = null, + + /* Microinverters. */ + @Json(name = "micro_inverters") + val microInverters: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.kt new file mode 100644 index 00000000..646663b0 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner.kt @@ -0,0 +1,96 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id Numeric ID of the microinverter. + * @param serialNumber Serial number of the microinverter. + * @param model Microinverter model type. + * @param partNumber Microinverter part number. + * @param sku SKU of the microinverter. + * @param status Current status of the micro inverter. + * @param powerProduced + * @param procLoad Processor load. + * @param paramTable Parameter table. + * @param envoySerialNumber Envoy serial number of the system that the micro reports to. + * @param energy + * @param gridProfile Grid profile ID. + * @param lastReportDate Date on which the microinverter last reported. + */ + + +data class GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner ( + + /* Numeric ID of the microinverter. */ + @Json(name = "id") + val id: kotlin.Int? = null, + + /* Serial number of the microinverter. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String? = null, + + /* Microinverter model type. */ + @Json(name = "model") + val model: kotlin.String? = null, + + /* Microinverter part number. */ + @Json(name = "part_number") + val partNumber: kotlin.String? = null, + + /* SKU of the microinverter. */ + @Json(name = "sku") + val sku: kotlin.String? = null, + + /* Current status of the micro inverter. */ + @Json(name = "status") + val status: kotlin.String? = null, + + @Json(name = "power_produced") + val powerProduced: GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced? = null, + + /* Processor load. */ + @Json(name = "proc_load") + val procLoad: kotlin.String? = null, + + /* Parameter table. */ + @Json(name = "param_table") + val paramTable: kotlin.String? = null, + + /* Envoy serial number of the system that the micro reports to. */ + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String? = null, + + @Json(name = "energy") + val energy: GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy? = null, + + /* Grid profile ID. */ + @Json(name = "grid_profile") + val gridProfile: kotlin.String? = null, + + /* Date on which the microinverter last reported. */ + @Json(name = "last_report_date") + val lastReportDate: java.time.OffsetDateTime? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.kt new file mode 100644 index 00000000..1a047e12 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy.kt @@ -0,0 +1,45 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param `value` Lifetime energy produced by the microinverter. + * @param units Energy units. + * @param precision + */ + + +data class GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy ( + + /* Lifetime energy produced by the microinverter. */ + @Json(name = "value") + val `value`: kotlin.Int? = null, + + /* Energy units. */ + @Json(name = "units") + val units: kotlin.String? = null, + + @Json(name = "precision") + val precision: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.kt new file mode 100644 index 00000000..0f7aaf61 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced.kt @@ -0,0 +1,45 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param `value` Current power produced by the microinverter. + * @param units Power units. + * @param precision + */ + + +data class GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced ( + + /* Current power produced by the microinverter. */ + @Json(name = "value") + val `value`: kotlin.Int? = null, + + /* Power units. */ + @Json(name = "units") + val units: kotlin.String? = null, + + @Json(name = "precision") + val precision: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponse.kt new file mode 100644 index 00000000..4f6eb579 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponse.kt @@ -0,0 +1,56 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param startDate When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. + * @param charge An array of charge 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. + * @param discharge An array of discharge 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. + * @param meta + */ + + +data class GetSystemBatteryLifetimeResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. */ + @Json(name = "start_date") + val startDate: java.time.LocalDate? = null, + + /* An array of charge 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. */ + @Json(name = "charge") + val charge: kotlin.collections.List? = null, + + /* An array of discharge 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. */ + @Json(name = "discharge") + val discharge: kotlin.collections.List? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponse.kt new file mode 100644 index 00000000..37a63406 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponse.kt @@ -0,0 +1,71 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInner +import enlighten.monitoring.models.TelemetryGranularityEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param granularity + * @param totalDevices Number of batteries in the site. + * @param startAt Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + * @param endAt End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param items List key 'intervals'. + * @param intervals + * @param lastReportedAggregateSoc Last reported aggregate soc percentage. + */ + + +data class GetSystemBatteryTelemetryResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + @Json(name = "granularity") + val granularity: TelemetryGranularityEnum? = null, + + /* Number of batteries in the site. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. */ + @Json(name = "start_at") + val startAt: kotlin.Long? = null, + + /* End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* List key 'intervals'. */ + @Json(name = "items") + val items: kotlin.String? = null, + + @Json(name = "intervals") + val intervals: kotlin.collections.List? = null, + + /* Last reported aggregate soc percentage. */ + @Json(name = "last_reported_aggregate_soc") + val lastReportedAggregateSoc: kotlin.String? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInner.kt new file mode 100644 index 00000000..939764d2 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInner.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerCharge +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerDischarge +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerSoc + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param charge + * @param discharge + * @param soc + */ + + +data class GetSystemBatteryTelemetryResponseIntervalsInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + @Json(name = "charge") + val charge: GetSystemBatteryTelemetryResponseIntervalsInnerCharge? = null, + + @Json(name = "discharge") + val discharge: GetSystemBatteryTelemetryResponseIntervalsInnerDischarge? = null, + + @Json(name = "soc") + val soc: GetSystemBatteryTelemetryResponseIntervalsInnerSoc? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.kt new file mode 100644 index 00000000..47693426 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerCharge.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param enwh Energy into the battery during the interval. + * @param devicesReporting Number of devices reporting. + */ + + +data class GetSystemBatteryTelemetryResponseIntervalsInnerCharge ( + + /* Energy into the battery during the interval. */ + @Json(name = "enwh") + val enwh: kotlin.Int? = null, + + /* Number of devices reporting. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.kt new file mode 100644 index 00000000..8b70dcca --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischarge.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param enwh Energy discharged from the battery during the interval. + * @param devicesReporting Number of devices reporting. + */ + + +data class GetSystemBatteryTelemetryResponseIntervalsInnerDischarge ( + + /* Energy discharged from the battery during the interval. */ + @Json(name = "enwh") + val enwh: kotlin.Int? = null, + + /* Number of devices reporting. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.kt new file mode 100644 index 00000000..d9865886 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSoc.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param percent Battery soc percentage. + * @param devicesReporting Number of devices reporting. + */ + + +data class GetSystemBatteryTelemetryResponseIntervalsInnerSoc ( + + /* Battery soc percentage. */ + @Json(name = "percent") + val percent: kotlin.Int? = null, + + /* Number of devices reporting. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponse.kt new file mode 100644 index 00000000..a5edd4da --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponse.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param startDate When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. + * @param consumption An array of consumption measurements in Wh, one for each day since consumption metering began, or one for each day of the requested period. + * @param meta + */ + + +data class GetSystemConsumptionLifetimeResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. */ + @Json(name = "start_date") + val startDate: java.time.LocalDate? = null, + + /* An array of consumption measurements in Wh, one for each day since consumption metering began, or one for each day of the requested period. */ + @Json(name = "consumption") + val consumption: kotlin.collections.List? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponse.kt new file mode 100644 index 00000000..34969284 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponse.kt @@ -0,0 +1,71 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemConsumptionMeterTelemetryResponseIntervalsInner +import enlighten.monitoring.models.Meta +import enlighten.monitoring.models.TelemetryGranularityEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param granularity + * @param totalDevices Number of non-retired consumption meters in the site. + * @param startAt Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + * @param endAt End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param items List key 'intervals'. + * @param intervals + * @param meta + */ + + +data class GetSystemConsumptionMeterTelemetryResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + @Json(name = "granularity") + val granularity: TelemetryGranularityEnum? = null, + + /* Number of non-retired consumption meters in the site. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. */ + @Json(name = "start_at") + val startAt: kotlin.Long? = null, + + /* End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* List key 'intervals'. */ + @Json(name = "items") + val items: kotlin.String? = null, + + @Json(name = "intervals") + val intervals: kotlin.collections.List? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.kt new file mode 100644 index 00000000..e5c8802f --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param devicesReporting Number of devices reporting. + * @param enwh Units produced per interval. + */ + + +data class GetSystemConsumptionMeterTelemetryResponseIntervalsInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* Number of devices reporting. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int? = null, + + /* Units produced per interval. */ + @Json(name = "enwh") + val enwh: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponse.kt new file mode 100644 index 00000000..7337e8d1 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponse.kt @@ -0,0 +1,52 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemDevicesResponseDevicesValueInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId System ID. + * @param totalDevices Total active devices associated with the system. + * @param items List key. + * @param devices Hash keys include all the possible device types micros, meters, gateways, mids, q_relays, ACBs, Encharges, Enpowers (if the devices of this type are present). For all the device types, the object will contain the serial_number and model with some additional information pertaining to the device type. + */ + + +data class GetSystemDevicesResponse ( + + /* System ID. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Total active devices associated with the system. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* List key. */ + @Json(name = "items") + val items: kotlin.String? = null, + + /* Hash keys include all the possible device types micros, meters, gateways, mids, q_relays, ACBs, Encharges, Enpowers (if the devices of this type are present). For all the device types, the object will contain the serial_number and model with some additional information pertaining to the device type. */ + @Json(name = "devices") + val devices: kotlin.collections.Map>? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInner.kt new file mode 100644 index 00000000..2baa5bce --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInner.kt @@ -0,0 +1,84 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemDevicesResponseDevicesValueInnerCellularModem + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param id + * @param lastReportAt + * @param name + * @param serialNumber + * @param partNumber + * @param emuSwVersion + * @param sku + * @param model + * @param status + * @param active + * @param state + * @param configType + * @param cellularModem + */ + + +data class GetSystemDevicesResponseDevicesValueInner ( + + @Json(name = "id") + val id: kotlin.Int? = null, + + @Json(name = "last_report_at") + val lastReportAt: kotlin.Long? = null, + + @Json(name = "name") + val name: kotlin.String? = null, + + @Json(name = "serial_number") + val serialNumber: kotlin.String? = null, + + @Json(name = "part_number") + val partNumber: kotlin.String? = null, + + @Json(name = "emu_sw_version") + val emuSwVersion: kotlin.String? = null, + + @Json(name = "sku") + val sku: kotlin.String? = null, + + @Json(name = "model") + val model: kotlin.String? = null, + + @Json(name = "status") + val status: kotlin.String? = null, + + @Json(name = "active") + val active: kotlin.Boolean? = null, + + @Json(name = "state") + val state: kotlin.String? = null, + + @Json(name = "config_type") + val configType: kotlin.String? = null, + + @Json(name = "cellular_modem") + val cellularModem: GetSystemDevicesResponseDevicesValueInnerCellularModem? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModem.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModem.kt new file mode 100644 index 00000000..4435990b --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModem.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param imei + * @param partNum + * @param sku + * @param planStartDate + * @param planEndDate + */ + + +data class GetSystemDevicesResponseDevicesValueInnerCellularModem ( + + @Json(name = "imei") + val imei: kotlin.String? = null, + + @Json(name = "part_num") + val partNum: kotlin.String? = null, + + @Json(name = "sku") + val sku: kotlin.String? = null, + + @Json(name = "plan_start_date") + val planStartDate: kotlin.Long? = null, + + @Json(name = "plan_end_date") + val planEndDate: kotlin.Long? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponse.kt new file mode 100644 index 00000000..bbade860 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponse.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param startDate When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. + * @param export An array of export 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. + * @param meta + */ + + +data class GetSystemEnergyExportLifetimeResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. */ + @Json(name = "start_date") + val startDate: java.time.LocalDate? = null, + + /* An array of export 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. */ + @Json(name = "export") + val export: kotlin.collections.List? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponse.kt new file mode 100644 index 00000000..de4055b2 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponse.kt @@ -0,0 +1,72 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemEnergyExportTelemetryResponseIntervalsInnerInner +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param granularity Granularity of the telemetry data. Default is 'day'. + * @param totalDevices Number of production meters in the site. + * @param startAt Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + * @param endAt End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param items List key 'intervals'. + * @param intervals An array of telemetry objects. + * @param meta + */ + + +data class GetSystemEnergyExportTelemetryResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Granularity of the telemetry data. Default is 'day'. */ + @Json(name = "granularity") + val granularity: kotlin.String? = null, + + /* Number of production meters in the site. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. */ + @Json(name = "start_at") + val startAt: kotlin.Long? = null, + + /* End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* List key 'intervals'. */ + @Json(name = "items") + val items: kotlin.String? = null, + + /* An array of telemetry objects. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List>? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.kt new file mode 100644 index 00000000..a7063d8c --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInner.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param whExported Energy exported (in Watt-Hours) during that period. + */ + + +data class GetSystemEnergyExportTelemetryResponseIntervalsInnerInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* Energy exported (in Watt-Hours) during that period. */ + @Json(name = "wh_exported") + val whExported: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponse.kt new file mode 100644 index 00000000..078bb9af --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponse.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param startDate When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. + * @param `import` An array of import 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. + * @param meta + */ + + +data class GetSystemEnergyImportLifetimeResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. */ + @Json(name = "start_date") + val startDate: java.time.LocalDate? = null, + + /* An array of import 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. */ + @Json(name = "import") + val `import`: kotlin.collections.List? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponse.kt new file mode 100644 index 00000000..318208e1 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponse.kt @@ -0,0 +1,72 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemEnergyImportTelemetryResponseIntervalsInnerInner +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param granularity Granularity of the telemetry data. Default is 'day'. + * @param totalDevices Number of consumption meters in the site. + * @param startAt Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + * @param endAt End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param items List key 'intervals'. + * @param intervals An array of telemetry objects. + * @param meta + */ + + +data class GetSystemEnergyImportTelemetryResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Granularity of the telemetry data. Default is 'day'. */ + @Json(name = "granularity") + val granularity: kotlin.String? = null, + + /* Number of consumption meters in the site. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. */ + @Json(name = "start_at") + val startAt: kotlin.Long? = null, + + /* End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* List key 'intervals'. */ + @Json(name = "items") + val items: kotlin.String? = null, + + /* An array of telemetry objects. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List>? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.kt new file mode 100644 index 00000000..b12ac6be --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInner.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param whImported Energy imported (in Watt-Hours) during that period. + */ + + +data class GetSystemEnergyImportTelemetryResponseIntervalsInnerInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* Energy imported (in Watt-Hours) during that period. */ + @Json(name = "wh_imported") + val whImported: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponse.kt new file mode 100644 index 00000000..2be41756 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponse.kt @@ -0,0 +1,64 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId System ID. + * @param startDate 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. + * @param meterStartDate 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. + * @param production 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. + * @param microProduction + * @param meterProduction + * @param meta + */ + + +data class GetSystemEnergyLifetimeResponse ( + + /* System ID. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* 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. */ + @Json(name = "start_date") + val startDate: java.time.LocalDate? = null, + + /* 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. */ + @Json(name = "meter_start_date") + val meterStartDate: java.time.LocalDate? = null, + + /* 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. */ + @Json(name = "production") + val production: kotlin.collections.List? = null, + + @Json(name = "micro_production") + val microProduction: kotlin.collections.List? = null, + + @Json(name = "meter_production") + val meterProduction: kotlin.collections.List? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponse.kt new file mode 100644 index 00000000..3c23ca5d --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponse.kt @@ -0,0 +1,45 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId + * @param gridState Indicates whether the site is On Grid, Off Grid or grid status of site is Unknown. + * @param lastReportDate Timestamp (in epoch format) at which the system's Envoy last submitted a report. + */ + + +data class GetSystemGridStatusSettingsResponse ( + + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Indicates whether the site is On Grid, Off Grid or grid status of site is Unknown. */ + @Json(name = "grid_state") + val gridState: kotlin.String? = null, + + /* Timestamp (in epoch format) at which the system's Envoy last submitted a report. */ + @Json(name = "last_report_date") + val lastReportDate: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponse.kt new file mode 100644 index 00000000..51ebe2c3 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponse.kt @@ -0,0 +1,71 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemMicroDeviceTelemetryResponseIntervalsInner +import enlighten.monitoring.models.TelemetryGranularityEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param serialNumber Device serial number. + * @param granularity + * @param totalDevices Shall always be 1 since this is telemetry from individual micros. + * @param startAt Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response. + * @param endAt End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response. + * @param items List key 'intervals'. + * @param intervals + */ + + +data class GetSystemMicroDeviceTelemetryResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Device serial number. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String? = null, + + @Json(name = "granularity") + val granularity: TelemetryGranularityEnum? = null, + + /* Shall always be 1 since this is telemetry from individual micros. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response. */ + @Json(name = "start_at") + val startAt: kotlin.Long? = null, + + /* End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* List key 'intervals'. */ + @Json(name = "items") + val items: kotlin.String? = null, + + @Json(name = "intervals") + val intervals: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInner.kt new file mode 100644 index 00000000..a0da4617 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param powr Average power (in Watt) produced by all the microinverters during this interval, measured in Watts. + * @param enwh Energy produced (in Watt-Hours) from all the microinverters combined during that period. + */ + + +data class GetSystemMicroDeviceTelemetryResponseIntervalsInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* Average power (in Watt) produced by all the microinverters during this interval, measured in Watts. */ + @Json(name = "powr") + val powr: kotlin.Int? = null, + + /* Energy produced (in Watt-Hours) from all the microinverters combined during that period. */ + @Json(name = "enwh") + val enwh: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponse.kt new file mode 100644 index 00000000..af9c8715 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponse.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemProductionMeterReadingsResponseMeterReadingsInner +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId System ID. + * @param meterReadings Production meter readings. + * @param meta + */ + + +data class GetSystemProductionMeterReadingsResponse ( + + /* System ID. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Production meter readings. */ + @Json(name = "meter_readings") + val meterReadings: kotlin.collections.List? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInner.kt new file mode 100644 index 00000000..2369e602 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param serialNumber Serial number of the meter. + * @param `value` Meter reading, in Wh. + * @param readAt Time when the reading was taken, always prior or equal to the requested 'end_at'. + */ + + +data class GetSystemProductionMeterReadingsResponseMeterReadingsInner ( + + /* Serial number of the meter. */ + @Json(name = "serial_number") + val serialNumber: kotlin.String? = null, + + /* Meter reading, in Wh. */ + @Json(name = "value") + val `value`: kotlin.Int? = null, + + /* Time when the reading was taken, always prior or equal to the requested 'end_at'. */ + @Json(name = "read_at") + val readAt: kotlin.Long? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponse.kt new file mode 100644 index 00000000..705a0b3f --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponse.kt @@ -0,0 +1,66 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemProductionMeterTelemetryResponseIntervalsInner +import enlighten.monitoring.models.TelemetryGranularityEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param granularity + * @param totalDevices Number of production meters in the site. + * @param startAt Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + * @param endAt End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param items List key 'intervals'. + * @param intervals + */ + + +data class GetSystemProductionMeterTelemetryResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + @Json(name = "granularity") + val granularity: TelemetryGranularityEnum? = null, + + /* Number of production meters in the site. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. */ + @Json(name = "start_at") + val startAt: kotlin.Long? = null, + + /* End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* List key 'intervals'. */ + @Json(name = "items") + val items: kotlin.String? = null, + + @Json(name = "intervals") + val intervals: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInner.kt new file mode 100644 index 00000000..81a8c4bc --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param devicesReporting Number of devices reporting. + * @param whDel Units produced per interval. + */ + + +data class GetSystemProductionMeterTelemetryResponseIntervalsInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* Number of devices reporting. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int? = null, + + /* Units produced per interval. */ + @Json(name = "wh_del") + val whDel: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponse.kt new file mode 100644 index 00000000..c79c09a1 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponse.kt @@ -0,0 +1,72 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemProductionMicroTelemetryResponseIntervalsInner +import enlighten.monitoring.models.Meta +import enlighten.monitoring.models.TelemetryGranularityEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param granularity + * @param totalDevices Number of micro inverters in the site. + * @param startAt Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + * @param endAt End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + * @param items List key 'intervals'. + * @param intervals An array of telemetry objects. + * @param meta + */ + + +data class GetSystemProductionMicroTelemetryResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + @Json(name = "granularity") + val granularity: TelemetryGranularityEnum? = null, + + /* Number of micro inverters in the site. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + /* Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. */ + @Json(name = "start_at") + val startAt: kotlin.Long? = null, + + /* End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* List key 'intervals'. */ + @Json(name = "items") + val items: kotlin.String? = null, + + /* An array of telemetry objects. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List? = null, + + @Json(name = "meta") + val meta: Meta? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInner.kt new file mode 100644 index 00000000..59b0331c --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInner.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param devicesReporting Number of devices reporting. + * @param powr Average power (in Watt) produced by all the microinverters during this interval, measured in Watts. + * @param enwh Energy produced (in Watt-Hours) from all the microinverters combined during that period. + */ + + +data class GetSystemProductionMicroTelemetryResponseIntervalsInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* Number of devices reporting. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int? = null, + + /* Average power (in Watt) produced by all the microinverters during this interval, measured in Watts. */ + @Json(name = "powr") + val powr: kotlin.Int? = null, + + /* Energy produced (in Watt-Hours) from all the microinverters combined during that period. */ + @Json(name = "enwh") + val enwh: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponse.kt new file mode 100644 index 00000000..20cf9ac8 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponse.kt @@ -0,0 +1,58 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemRgmStatsResponseIntervalsInner +import enlighten.monitoring.models.GetSystemRgmStatsResponseMeterIntervalsInner +import enlighten.monitoring.models.Meta + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId System ID. + * @param totalDevices Number of active revenue-grade meters for this system. + * @param meta + * @param intervals A list of intervals between the requested start and end times. + * @param meterIntervals A list of intervals of a meter between the requested start and end times. + */ + + +data class GetSystemRgmStatsResponse ( + + /* System ID. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Number of active revenue-grade meters for this system. */ + @Json(name = "total_devices") + val totalDevices: kotlin.Int? = null, + + @Json(name = "meta") + val meta: Meta? = null, + + /* A list of intervals between the requested start and end times. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List? = null, + + /* A list of intervals of a meter between the requested start and end times. */ + @Json(name = "meter_intervals") + val meterIntervals: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInner.kt new file mode 100644 index 00000000..7e1a98b2 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInner.kt @@ -0,0 +1,46 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param endAt End time of the telemetry interval. + * @param devicesReporting Number of revenue-grade meters that reported data for this interval at the time of the request. + * @param whDel Energy delivered during this interval, in Wh. + */ + + +data class GetSystemRgmStatsResponseIntervalsInner ( + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* Number of revenue-grade meters that reported data for this interval at the time of the request. */ + @Json(name = "devices_reporting") + val devicesReporting: kotlin.Int? = null, + + /* Energy delivered during this interval, in Wh. */ + @Json(name = "wh_del") + val whDel: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInner.kt new file mode 100644 index 00000000..a3484317 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInner.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param meterSerialNumber Meter serial number. + * @param envoySerialNumber Envoy serial number of the system that the micro reports to. + * @param intervals Individual meter level interval. + */ + + +data class GetSystemRgmStatsResponseMeterIntervalsInner ( + + /* Meter serial number. */ + @Json(name = "meter_serial_number") + val meterSerialNumber: kotlin.String? = null, + + /* Envoy serial number of the system that the micro reports to. */ + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.String? = null, + + /* Individual meter level interval. */ + @Json(name = "intervals") + val intervals: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.kt new file mode 100644 index 00000000..fddc39d3 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param channel Reporting channel ID. + * @param endAt End time of the telemetry interval. + * @param whDel Energy delivered during this interval, in Wh (Watt-Hour). + * @param currW Energy delivered during this interval, in W (Watts). + */ + + +data class GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner ( + + /* Reporting channel ID. */ + @Json(name = "channel") + val channel: kotlin.Int? = null, + + /* End time of the telemetry interval. */ + @Json(name = "end_at") + val endAt: kotlin.Long? = null, + + /* Energy delivered during this interval, in Wh (Watt-Hour). */ + @Json(name = "wh_del") + val whDel: kotlin.Float? = null, + + /* Energy delivered during this interval, in W (Watts). */ + @Json(name = "curr_w") + val currW: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemSummaryResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemSummaryResponse.kt new file mode 100644 index 00000000..3aba119c --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemSummaryResponse.kt @@ -0,0 +1,91 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.SystemStatusEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param currentPower Current power production of the system in Watts. + * @param energyLifetime Energy generated by the system during its lifetime in Wh. + * @param energyToday Energy generated by the system today in Wh. + * @param lastIntervalEndAt 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. + * @param lastReportAt Timestamp (in epoch format) at which the system's Envoy last submitted a report. + * @param modules Total number of modules in the system. + * @param operationalAt Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. + * @param sizeW System size in watts. + * @param source Source of energy measurement. + * @param status + * @param summaryDate Summary date. + */ + + +data class GetSystemSummaryResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Current power production of the system in Watts. */ + @Json(name = "current_power") + val currentPower: kotlin.Int? = null, + + /* Energy generated by the system during its lifetime in Wh. */ + @Json(name = "energy_lifetime") + val energyLifetime: kotlin.Int? = null, + + /* Energy generated by the system today in Wh. */ + @Json(name = "energy_today") + val energyToday: kotlin.Int? = null, + + /* 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. */ + @Json(name = "last_interval_end_at") + val lastIntervalEndAt: kotlin.Long? = null, + + /* Timestamp (in epoch format) at which the system's Envoy last submitted a report. */ + @Json(name = "last_report_at") + val lastReportAt: kotlin.Long? = null, + + /* Total number of modules in the system. */ + @Json(name = "modules") + val modules: kotlin.Int? = null, + + /* Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. */ + @Json(name = "operational_at") + val operationalAt: kotlin.Long? = null, + + /* System size in watts. */ + @Json(name = "size_w") + val sizeW: kotlin.Int? = null, + + /* Source of energy measurement. */ + @Json(name = "source") + val source: kotlin.String? = null, + + @Json(name = "status") + val status: SystemStatusEnum? = null, + + /* Summary date. */ + @Json(name = "summary_date") + val summaryDate: java.time.LocalDate? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystems500Response.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystems500Response.kt new file mode 100644 index 00000000..1a553205 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystems500Response.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.DataTemporarilyUnavailableError +import enlighten.monitoring.models.InternalServerError + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + * @param errorCode Error code. + * @param errorMessages Error messages. + */ + + +data class GetSystems500Response ( + + @Json(name = "reason") + val reason: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.collections.List? = null, + + /* Error code. */ + @Json(name = "errorCode") + val errorCode: kotlin.Int? = null, + + /* Error messages. */ + @Json(name = "errorMessages") + val errorMessages: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemsResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemsResponse.kt new file mode 100644 index 00000000..74f746b8 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/GetSystemsResponse.kt @@ -0,0 +1,62 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.SystemDetails + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param propertySize Maximum number of records shown per page. Default=10, Min=1, Max=100. + * @param count Total number of systems actually returned for the current page. + * @param total Total number of systems. + * @param currentPage Number of the current page fetched. + * @param items Named key of the list data. In this endpoint, it is systems. + * @param systems List of systems. + */ + + +data class GetSystemsResponse ( + + /* Maximum number of records shown per page. Default=10, Min=1, Max=100. */ + @Json(name = "size") + val propertySize: kotlin.Int, + + /* Total number of systems actually returned for the current page. */ + @Json(name = "count") + val count: kotlin.Int, + + /* Total number of systems. */ + @Json(name = "total") + val total: kotlin.Int? = null, + + /* Number of the current page fetched. */ + @Json(name = "current_page") + val currentPage: kotlin.Int? = null, + + /* Named key of the list data. In this endpoint, it is systems. */ + @Json(name = "items") + val items: kotlin.String? = null, + + /* List of systems. */ + @Json(name = "systems") + val systems: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/InternalServerError.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/InternalServerError.kt new file mode 100644 index 00000000..7f753c4e --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/InternalServerError.kt @@ -0,0 +1,39 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + */ + + +data class InternalServerError ( + + @Json(name = "reason") + val reason: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/LoadControlSettings.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/LoadControlSettings.kt new file mode 100644 index 00000000..09c777a9 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/LoadControlSettings.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.LoadControlSettingsLoadControlDataInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId + * @param loadControlData Load control data for all the configured loads. + */ + + +data class LoadControlSettings ( + + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Load control data for all the configured loads. */ + @Json(name = "load_control_data") + val loadControlData: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInner.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInner.kt new file mode 100644 index 00000000..deac91fa --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInner.kt @@ -0,0 +1,76 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param name Name of the dry contact. + * @param loadName Name of the load. + * @param ownerCanOverride HOs ability to override the load control settings. + * @param mode Current load control configuration. + * @param socLow Applicable for advanced mode. Load will be powered off when the battery soc reaches this level. + * @param socHigh Applicable for advanced mode. Load powers off when battery reaches soc_low. The load will be powered on when the battery soc reaches soc_high. + * @param status Available values are enabled, disabled. + * @param essentialStartTime Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. + * @param essentialEndTime Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. + */ + + +data class LoadControlSettingsLoadControlDataInner ( + + /* Name of the dry contact. */ + @Json(name = "name") + val name: kotlin.String? = null, + + /* Name of the load. */ + @Json(name = "load_name") + val loadName: kotlin.String? = null, + + /* HOs ability to override the load control settings. */ + @Json(name = "owner_can_override") + val ownerCanOverride: kotlin.String? = null, + + /* Current load control configuration. */ + @Json(name = "mode") + val mode: kotlin.String? = null, + + /* Applicable for advanced mode. Load will be powered off when the battery soc reaches this level. */ + @Json(name = "soc_low") + val socLow: kotlin.Int? = null, + + /* Applicable for advanced mode. Load powers off when battery reaches soc_low. The load will be powered on when the battery soc reaches soc_high. */ + @Json(name = "soc_high") + val socHigh: kotlin.Int? = null, + + /* Available values are enabled, disabled. */ + @Json(name = "status") + val status: kotlin.String? = null, + + /* Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. */ + @Json(name = "essential_start_time") + val essentialStartTime: kotlin.Int? = null, + + /* Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. */ + @Json(name = "essential_end_time") + val essentialEndTime: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/Meta.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/Meta.kt new file mode 100644 index 00000000..79985290 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/Meta.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.SystemStatusEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Information about the system such as its status, when it became operational and last reported to Envoy. + * + * @param status + * @param lastReportAt Timestamp (in epoch format) at which the system's Envoy last submitted a report. + * @param lastEnergyAt Timestamp (in epoch format) at which the system's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned. + * @param operationalAt Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. + */ + + +data class Meta ( + + @Json(name = "status") + val status: SystemStatusEnum? = null, + + /* Timestamp (in epoch format) at which the system's Envoy last submitted a report. */ + @Json(name = "last_report_at") + val lastReportAt: kotlin.Int? = null, + + /* Timestamp (in epoch format) at which the system's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned. */ + @Json(name = "last_energy_at") + val lastEnergyAt: kotlin.Int? = null, + + /* Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. */ + @Json(name = "operational_at") + val operationalAt: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/MethodNotAllowedError.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/MethodNotAllowedError.kt new file mode 100644 index 00000000..0149d8d0 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/MethodNotAllowedError.kt @@ -0,0 +1,39 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param reason + * @param message + */ + + +data class MethodNotAllowedError ( + + @Json(name = "reason") + val reason: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/NotImplementedError.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/NotImplementedError.kt new file mode 100644 index 00000000..f0d078dd --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/NotImplementedError.kt @@ -0,0 +1,46 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param message Error type. + * @param details Error details. + * @param code Error code. + */ + + +data class NotImplementedError ( + + /* Error type. */ + @Json(name = "message") + val message: kotlin.String? = null, + + /* Error details. */ + @Json(name = "details") + val details: kotlin.String? = null, + + /* Error code. */ + @Json(name = "code") + val code: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponse.kt new file mode 100644 index 00000000..bca039da --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponse.kt @@ -0,0 +1,36 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + */ + + +data class RetrieveSystemIdResponse ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequest.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequest.kt new file mode 100644 index 00000000..de1d6779 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.SearchSystemsRequestSystem +import enlighten.monitoring.models.SystemSortByEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param system + * @param sortBy + */ + + +data class SearchSystemsRequest ( + + @Json(name = "system") + val system: SearchSystemsRequestSystem, + + @Json(name = "sort_by") + val sortBy: SystemSortByEnum? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystem.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystem.kt new file mode 100644 index 00000000..0fe73ec1 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystem.kt @@ -0,0 +1,57 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.SystemConnectionTypeEnum +import enlighten.monitoring.models.SystemPublicNameEnum +import enlighten.monitoring.models.SystemStatusEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param ids Filter system by particular Ids. + * @param name Search by name of the system. + * @param publicName + * @param statuses Search by System status. + * @param connectionType + */ + + +data class SearchSystemsRequestSystem ( + + /* Filter system by particular Ids. */ + @Json(name = "ids") + val ids: kotlin.collections.List? = null, + + /* Search by name of the system. */ + @Json(name = "name") + val name: kotlin.String? = null, + + @Json(name = "public_name") + val publicName: SystemPublicNameEnum? = null, + + /* Search by System status. */ + @Json(name = "statuses") + val statuses: kotlin.collections.List? = null, + + @Json(name = "connection_type") + val connectionType: SystemConnectionTypeEnum? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsResponse.kt new file mode 100644 index 00000000..94db046b --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SearchSystemsResponse.kt @@ -0,0 +1,62 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.SystemDetails + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param total Total number of systems available. + * @param currentPage Current page of the systems result. Default is 1. + * @param propertySize Max number of records from API per page is 100. Default is 10. + * @param count Total number of systems actually returned for the current page. + * @param items Named key of the list data. In this endpoint, it is systems. + * @param systems List of filtered systems. + */ + + +data class SearchSystemsResponse ( + + /* Total number of systems available. */ + @Json(name = "total") + val total: kotlin.Int? = null, + + /* Current page of the systems result. Default is 1. */ + @Json(name = "current_page") + val currentPage: kotlin.Int? = null, + + /* Max number of records from API per page is 100. Default is 10. */ + @Json(name = "size") + val propertySize: kotlin.Int? = null, + + /* Total number of systems actually returned for the current page. */ + @Json(name = "count") + val count: kotlin.Int? = null, + + /* Named key of the list data. In this endpoint, it is systems. */ + @Json(name = "items") + val items: kotlin.String? = null, + + /* List of filtered systems. */ + @Json(name = "systems") + val systems: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StormGuardSettings.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StormGuardSettings.kt new file mode 100644 index 00000000..4cb3a139 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StormGuardSettings.kt @@ -0,0 +1,45 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId + * @param stormGuardStatus Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the locality. + * @param stormAlert True if severe weather condition alert is issued in the locality. + */ + + +data class StormGuardSettings ( + + @Json(name = "system_id") + val systemId: kotlin.Int? = null, + + /* Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the locality. */ + @Json(name = "storm_guard_status") + val stormGuardStatus: kotlin.String? = null, + + /* True if severe weather condition alert is issued in the locality. */ + @Json(name = "storm_alert") + val stormAlert: kotlin.Boolean? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataError.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataError.kt new file mode 100644 index 00000000..e6960b81 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataError.kt @@ -0,0 +1,50 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.StreamSystemLiveDataErrorError + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param error + * @param timestampEpoch Timestamp in epoch format. + * @param timestampUtc Timestamp in UTC format. + * @param type + */ + + +data class StreamSystemLiveDataError ( + + @Json(name = "error") + val error: StreamSystemLiveDataErrorError? = null, + + /* Timestamp in epoch format. */ + @Json(name = "timestamp_epoch") + val timestampEpoch: kotlin.Int? = null, + + /* Timestamp in UTC format. */ + @Json(name = "timestamp_utc") + val timestampUtc: kotlin.String? = null, + + @Json(name = "type") + val type: kotlin.String? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorError.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorError.kt new file mode 100644 index 00000000..7b77fab2 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorError.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param code + * @param details + * @param message + * @param status + */ + + +data class StreamSystemLiveDataErrorError ( + + @Json(name = "code") + val code: kotlin.Int? = null, + + @Json(name = "details") + val details: kotlin.collections.List? = null, + + @Json(name = "message") + val message: kotlin.String? = null, + + @Json(name = "status") + val status: kotlin.String? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponse.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponse.kt new file mode 100644 index 00000000..28151557 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponse.kt @@ -0,0 +1,36 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.StreamSystemLiveDataResponseData + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param `data` + */ + + +data class StreamSystemLiveDataResponse ( + + @Json(name = "data") + val `data`: StreamSystemLiveDataResponseData? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseData.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseData.kt new file mode 100644 index 00000000..1f908e43 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseData.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.StreamSystemLiveDataResponseDataData + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param `data` + * @param timestampEpoch Timestamp in epoch format. + * @param timestampUtc Timestamp in UTC format. + * @param type response + */ + + +data class StreamSystemLiveDataResponseData ( + + @Json(name = "data") + val `data`: StreamSystemLiveDataResponseDataData? = null, + + /* Timestamp in epoch format. */ + @Json(name = "timestamp_epoch") + val timestampEpoch: kotlin.Int? = null, + + /* Timestamp in UTC format. */ + @Json(name = "timestamp_utc") + val timestampUtc: kotlin.String? = null, + + /* response */ + @Json(name = "type") + val type: kotlin.String? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataData.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataData.kt new file mode 100644 index 00000000..4b038677 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataData.kt @@ -0,0 +1,80 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param batteryMode Battery mode of the site. Available values are Savings Mode, Full Backup, and Self-consumption. + * @param batteryPower Battery power in watts; Power will be positive in case of discharge and negative in case of charge. + * @param batterySoc Battery soc in percentage. + * @param consumptionPower Consumption power in watts. + * @param envoySerialNumber + * @param generatorPower Generator power in watts. + * @param gridPower Grid power in watts; Power will be negative in case of export and positive in case of import. + * @param gridStatus Grid state of the site. Available values are On Grid, Off Grid, Unknown. + * @param pvPower PV power in watts. + * @param systemId The unique numeric ID of the system. + */ + + +data class StreamSystemLiveDataResponseDataData ( + + /* Battery mode of the site. Available values are Savings Mode, Full Backup, and Self-consumption. */ + @Json(name = "battery_mode") + val batteryMode: kotlin.String? = null, + + /* Battery power in watts; Power will be positive in case of discharge and negative in case of charge. */ + @Json(name = "battery_power") + val batteryPower: kotlin.Int? = null, + + /* Battery soc in percentage. */ + @Json(name = "battery_soc") + val batterySoc: kotlin.Int? = null, + + /* Consumption power in watts. */ + @Json(name = "consumption_power") + val consumptionPower: kotlin.Int? = null, + + @Json(name = "envoy_serial_number") + val envoySerialNumber: kotlin.collections.List? = null, + + /* Generator power in watts. */ + @Json(name = "generator_power") + val generatorPower: kotlin.Int? = null, + + /* Grid power in watts; Power will be negative in case of export and positive in case of import. */ + @Json(name = "grid_power") + val gridPower: kotlin.Int? = null, + + /* Grid state of the site. Available values are On Grid, Off Grid, Unknown. */ + @Json(name = "grid_status") + val gridStatus: kotlin.String? = null, + + /* PV power in watts. */ + @Json(name = "pv_power") + val pvPower: kotlin.Int? = null, + + /* The unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnum.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnum.kt new file mode 100644 index 00000000..2d38f2a8 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnum.kt @@ -0,0 +1,75 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Micro inverter attachment type. + * + * Values: rack_mount,zep,acm,bipv,frame_mount,railless_mount + */ + +@JsonClass(generateAdapter = false) +enum class SystemAttachmentTypeEnum(val value: kotlin.String) { + + @Json(name = "rack_mount") + rack_mount("rack_mount"), + + @Json(name = "zep") + zep("zep"), + + @Json(name = "acm") + acm("acm"), + + @Json(name = "bipv") + bipv("bipv"), + + @Json(name = "frame_mount") + frame_mount("frame_mount"), + + @Json(name = "railless_mount") + railless_mount("railless_mount"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemAttachmentTypeEnum) "$data" else null + + /** + * Returns a valid [SystemAttachmentTypeEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemAttachmentTypeEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnum.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnum.kt new file mode 100644 index 00000000..56a6cfca --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnum.kt @@ -0,0 +1,66 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Connection type of the system. + * + * Values: wifi,cellular,ethernet + */ + +@JsonClass(generateAdapter = false) +enum class SystemConnectionTypeEnum(val value: kotlin.String) { + + @Json(name = "wifi") + wifi("wifi"), + + @Json(name = "cellular") + cellular("cellular"), + + @Json(name = "ethernet") + ethernet("ethernet"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemConnectionTypeEnum) "$data" else null + + /** + * Returns a valid [SystemConnectionTypeEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemConnectionTypeEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemDetails.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemDetails.kt new file mode 100644 index 00000000..942a81d1 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemDetails.kt @@ -0,0 +1,116 @@ +/** + * + * 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.monitoring.models + +import enlighten.monitoring.models.SystemAttachmentTypeEnum +import enlighten.monitoring.models.SystemConnectionTypeEnum +import enlighten.monitoring.models.SystemDetailsAddress +import enlighten.monitoring.models.SystemStatusEnum + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param systemId Unique numeric ID of the system. + * @param name Name of the system. + * @param publicName Name displayed on the public system page. Available values are All, Residential System, Commercial etc. Default='Residential System'. Only for systems that allow public access. + * @param timezone Timezone to which the system belongs. + * @param address + * @param connectionType + * @param energyLifetime Energy generated by the system during its lifetime in Wh. It is returned only if the count is less than or equal to 100. + * @param energyToday Energy generated by the system today in Wh. It is returned only if the count is less than or equal to 100. + * @param systemSize Size of the system. It is returned only if the count is less than or equal to 100. + * @param status + * @param lastReportAt Timestamp (in epoch format) at which the system's Envoy last submitted a report. + * @param lastEnergyAt Timestamp (in epoch format) at which the system's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned. + * @param operationalAt Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. + * @param attachmentType + * @param interconnectDate Date on which the system was approved to connect to the grid. + * @param reference If the calling user belongs to a company and that company has provided its own identifier for a system, that ID is included here. Otherwise, this attribute is not returned. + * @param otherReferences If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned. + */ + + +data class SystemDetails ( + + /* Unique numeric ID of the system. */ + @Json(name = "system_id") + val systemId: kotlin.Int, + + /* Name of the system. */ + @Json(name = "name") + val name: kotlin.String? = null, + + /* Name displayed on the public system page. Available values are All, Residential System, Commercial etc. Default='Residential System'. Only for systems that allow public access. */ + @Json(name = "public_name") + val publicName: kotlin.String? = null, + + /* Timezone to which the system belongs. */ + @Json(name = "timezone") + val timezone: kotlin.String? = null, + + @Json(name = "address") + val address: SystemDetailsAddress? = null, + + @Json(name = "connection_type") + val connectionType: SystemConnectionTypeEnum? = null, + + /* Energy generated by the system during its lifetime in Wh. It is returned only if the count is less than or equal to 100. */ + @Json(name = "energy_lifetime") + val energyLifetime: kotlin.Int? = null, + + /* Energy generated by the system today in Wh. It is returned only if the count is less than or equal to 100. */ + @Json(name = "energy_today") + val energyToday: kotlin.Int? = null, + + /* Size of the system. It is returned only if the count is less than or equal to 100. */ + @Json(name = "system_size") + val systemSize: kotlin.Int? = null, + + @Json(name = "status") + val status: SystemStatusEnum? = null, + + /* Timestamp (in epoch format) at which the system's Envoy last submitted a report. */ + @Json(name = "last_report_at") + val lastReportAt: kotlin.Long? = null, + + /* Timestamp (in epoch format) at which the system's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned. */ + @Json(name = "last_energy_at") + val lastEnergyAt: kotlin.Long? = null, + + /* Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. */ + @Json(name = "operational_at") + val operationalAt: kotlin.Long? = null, + + @Json(name = "attachment_type") + val attachmentType: SystemAttachmentTypeEnum? = null, + + /* Date on which the system was approved to connect to the grid. */ + @Json(name = "interconnect_date") + val interconnectDate: java.time.LocalDate? = null, + + /* If the calling user belongs to a company and that company has provided its own identifier for a system, that ID is included here. Otherwise, this attribute is not returned. */ + @Json(name = "reference") + val reference: kotlin.String? = null, + + /* If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned. */ + @Json(name = "other_references") + val otherReferences: kotlin.collections.List? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemDetailsAddress.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemDetailsAddress.kt new file mode 100644 index 00000000..96e394b3 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemDetailsAddress.kt @@ -0,0 +1,51 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Address object for the system. + * + * @param city City in which the system is located. + * @param state State in which the system is located. + * @param country Country in which the system is located. + * @param postalCode Postal code of the system's location. + */ + + +data class SystemDetailsAddress ( + + /* City in which the system is located. */ + @Json(name = "city") + val city: kotlin.String? = null, + + /* State in which the system is located. */ + @Json(name = "state") + val state: kotlin.String? = null, + + /* Country in which the system is located. */ + @Json(name = "country") + val country: kotlin.String? = null, + + /* Postal code of the system's location. */ + @Json(name = "postal_code") + val postalCode: kotlin.String? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnum.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnum.kt new file mode 100644 index 00000000..b6f55cc8 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnum.kt @@ -0,0 +1,60 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: all + */ + +@JsonClass(generateAdapter = false) +enum class SystemEnergyLifetimeProductionEnum(val value: kotlin.String) { + + @Json(name = "all") + all("all"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemEnergyLifetimeProductionEnum) "$data" else null + + /** + * Returns a valid [SystemEnergyLifetimeProductionEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemEnergyLifetimeProductionEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemPublicNameEnum.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemPublicNameEnum.kt new file mode 100644 index 00000000..7c32dbb6 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemPublicNameEnum.kt @@ -0,0 +1,69 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Name displayed on the public system page. Default=residential. Only for systems that allow public access. + * + * Values: residential,all,commercial,other + */ + +@JsonClass(generateAdapter = false) +enum class SystemPublicNameEnum(val value: kotlin.String) { + + @Json(name = "residential") + residential("residential"), + + @Json(name = "all") + all("all"), + + @Json(name = "commercial") + commercial("commercial"), + + @Json(name = "other") + other("other"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemPublicNameEnum) "$data" else null + + /** + * Returns a valid [SystemPublicNameEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemPublicNameEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemSortByEnum.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemSortByEnum.kt new file mode 100644 index 00000000..f6bb5ccb --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemSortByEnum.kt @@ -0,0 +1,75 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Returns list of systems sorted by field. To get ASC order sorted list, user sort_by = . To get DESC order sorted list, use sort_by = (-). Current sort keys supported are id, name, and last_report_date. By default the list is sorted by decreasing system ID. + * + * Values: id,name,last_report_date,MinusId,MinusName,MinusLast_report_date + */ + +@JsonClass(generateAdapter = false) +enum class SystemSortByEnum(val value: kotlin.String) { + + @Json(name = "id") + id("id"), + + @Json(name = "name") + name("name"), + + @Json(name = "last_report_date") + last_report_date("last_report_date"), + + @Json(name = "-id") + MinusId("-id"), + + @Json(name = "-name") + MinusName("-name"), + + @Json(name = "-last_report_date") + MinusLast_report_date("-last_report_date"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemSortByEnum) "$data" else null + + /** + * Returns a valid [SystemSortByEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemSortByEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemStatusEnum.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemStatusEnum.kt new file mode 100644 index 00000000..fbe897f8 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/SystemStatusEnum.kt @@ -0,0 +1,153 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * Values: deactivated,normal,comm,micro,power,meter,meter_issue,battery,storage_idle,encharge,encharge_issue,enpower,enpower_issue,retired,not_monitored,unused,disabled,debug,info,monitored,muted,warning,error,no_data,rma,unknown,nsr,any,data_upload,on_grid,off_grid,grid_unknown + */ + +@JsonClass(generateAdapter = false) +enum class SystemStatusEnum(val value: kotlin.String) { + + @Json(name = "deactivated") + deactivated("deactivated"), + + @Json(name = "normal") + normal("normal"), + + @Json(name = "comm") + comm("comm"), + + @Json(name = "micro") + micro("micro"), + + @Json(name = "power") + power("power"), + + @Json(name = "meter") + meter("meter"), + + @Json(name = "meter_issue") + meter_issue("meter_issue"), + + @Json(name = "battery") + battery("battery"), + + @Json(name = "storage_idle") + storage_idle("storage_idle"), + + @Json(name = "encharge") + encharge("encharge"), + + @Json(name = "encharge_issue") + encharge_issue("encharge_issue"), + + @Json(name = "enpower") + enpower("enpower"), + + @Json(name = "enpower_issue") + enpower_issue("enpower_issue"), + + @Json(name = "retired") + retired("retired"), + + @Json(name = "not_monitored") + not_monitored("not_monitored"), + + @Json(name = "unused") + unused("unused"), + + @Json(name = "disabled") + disabled("disabled"), + + @Json(name = "debug") + debug("debug"), + + @Json(name = "info") + info("info"), + + @Json(name = "monitored") + monitored("monitored"), + + @Json(name = "muted") + muted("muted"), + + @Json(name = "warning") + warning("warning"), + + @Json(name = "error") + error("error"), + + @Json(name = "no_data") + no_data("no_data"), + + @Json(name = "rma") + rma("rma"), + + @Json(name = "unknown") + unknown("unknown"), + + @Json(name = "nsr") + nsr("nsr"), + + @Json(name = "any") + any("any"), + + @Json(name = "data_upload") + data_upload("data_upload"), + + @Json(name = "on_grid") + on_grid("on_grid"), + + @Json(name = "off_grid") + off_grid("off_grid"), + + @Json(name = "grid_unknown") + grid_unknown("grid_unknown"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is SystemStatusEnum) "$data" else null + + /** + * Returns a valid [SystemStatusEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): SystemStatusEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/TelemetryGranularityEnum.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/TelemetryGranularityEnum.kt new file mode 100644 index 00000000..6f2385ae --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/TelemetryGranularityEnum.kt @@ -0,0 +1,66 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Granularity of the telemetry data. Default is 'day'. + * + * Values: _15mins,day,week + */ + +@JsonClass(generateAdapter = false) +enum class TelemetryGranularityEnum(val value: kotlin.String) { + + @Json(name = "15mins") + _15mins("15mins"), + + @Json(name = "day") + day("day"), + + @Json(name = "week") + week("week"); + + /** + * Override [toString()] to avoid using the enum variable name as the value, and instead use + * the actual value defined in the API spec file. + * + * This solves a problem when the variable name and its value are different, and ensures that + * the client sends the correct enum values to the server always. + */ + override fun toString(): kotlin.String = value + + companion object { + /** + * Converts the provided [data] to a [String] on success, null otherwise. + */ + fun encode(data: kotlin.Any?): kotlin.String? = if (data is TelemetryGranularityEnum) "$data" else null + + /** + * Returns a valid [TelemetryGranularityEnum] for [data], null otherwise. + */ + fun decode(data: kotlin.Any?): TelemetryGranularityEnum? = data?.let { + val normalizedData = "$it".lowercase() + values().firstOrNull { value -> + it == value || normalizedData == "$value".lowercase() + } + } + } +} + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/TooManyRequestsError.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/TooManyRequestsError.kt new file mode 100644 index 00000000..9d2e9285 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/TooManyRequestsError.kt @@ -0,0 +1,66 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param message Error type. + * @param details Error details. + * @param code Error code. + * @param period Quota exceeded for minute/month. + * @param periodStart Starting period timestamp. + * @param periodEnd Ending period timestamp. + * @param limit Limit count for the period. + */ + + +data class TooManyRequestsError ( + + /* Error type. */ + @Json(name = "message") + val message: kotlin.String? = null, + + /* Error details. */ + @Json(name = "details") + val details: kotlin.String? = null, + + /* Error code. */ + @Json(name = "code") + val code: kotlin.Int? = null, + + /* Quota exceeded for minute/month. */ + @Json(name = "period") + val period: kotlin.String? = null, + + /* Starting period timestamp. */ + @Json(name = "period_start") + val periodStart: kotlin.Int? = null, + + /* Ending period timestamp. */ + @Json(name = "period_end") + val periodEnd: kotlin.Int? = null, + + /* Limit count for the period. */ + @Json(name = "limit") + val limit: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequest.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequest.kt new file mode 100644 index 00000000..b3592a5f --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequest.kt @@ -0,0 +1,46 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param batteryMode To update battery mode of the system (case sensitive). Available values are Savings Mode, Self-consumption, Full Backup. + * @param reserveSoc Reserve soc for the current mode. Cannot be less than vls. + * @param energyIndependence Energy independence after peak hours \"enabled\"/\"disabled\". Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period. Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period. + */ + + +data class UpdateSystemBatterySettingsRequest ( + + /* To update battery mode of the system (case sensitive). Available values are Savings Mode, Self-consumption, Full Backup. */ + @Json(name = "battery_mode") + val batteryMode: kotlin.String? = null, + + /* Reserve soc for the current mode. Cannot be less than vls. */ + @Json(name = "reserve_soc") + val reserveSoc: kotlin.Int? = null, + + /* Energy independence after peak hours \"enabled\"/\"disabled\". Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period. Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period. */ + @Json(name = "energy_independence") + val energyIndependence: kotlin.String? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequest.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequest.kt new file mode 100644 index 00000000..eac3b386 --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequest.kt @@ -0,0 +1,61 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param name Name of the dry contact. Name cannot be changed. It is only used to identify the dry contact that needs to be updated. + * @param loadName Load Name of the load. Load Name cannot be changed. It is only used to identify the dry contact that needs to be updated. + * @param mode Mode. Available values are \"Scheduled\", \"Basic\", \"Advanced_BatteryPowered\", \"Manual_always_not_powered\", \"Manual_always_powered\", \"Advanced_GeneratorPowered\". + * @param socLow Applicable for advanced mode. Load will be powered off when the battery soc reaches this level. It can be between 10 to 90. + * @param essentialStartTime Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. + * @param essentialEndTime Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. + */ + + +data class UpdateSystemLoadControlSettingsRequest ( + + /* Name of the dry contact. Name cannot be changed. It is only used to identify the dry contact that needs to be updated. */ + @Json(name = "name") + val name: kotlin.String, + + /* Load Name of the load. Load Name cannot be changed. It is only used to identify the dry contact that needs to be updated. */ + @Json(name = "load_name") + val loadName: kotlin.String? = null, + + /* Mode. Available values are \"Scheduled\", \"Basic\", \"Advanced_BatteryPowered\", \"Manual_always_not_powered\", \"Manual_always_powered\", \"Advanced_GeneratorPowered\". */ + @Json(name = "mode") + val mode: kotlin.String? = null, + + /* Applicable for advanced mode. Load will be powered off when the battery soc reaches this level. It can be between 10 to 90. */ + @Json(name = "soc_low") + val socLow: kotlin.Int? = null, + + /* Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. */ + @Json(name = "essential_start_time") + val essentialStartTime: kotlin.Int? = null, + + /* Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. */ + @Json(name = "essential_end_time") + val essentialEndTime: kotlin.Int? = null + +) + diff --git a/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequest.kt b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequest.kt new file mode 100644 index 00000000..4b9516fc --- /dev/null +++ b/kotlin/monitoring/src/main/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.monitoring.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param stormGuardStatus Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the locality. Available values are enabled, disabled. + */ + + +data class UpdateSystemStormGuardSettingsRequest ( + + /* Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the locality. Available values are enabled, disabled. */ + @Json(name = "storm_guard_status") + val stormGuardStatus: kotlin.String + +) + diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApiTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApiTest.kt new file mode 100644 index 00000000..9759968b --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/DeviceLevelProductionMonitoringApiTest.kt @@ -0,0 +1,70 @@ +/** + * + * 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.monitoring.apis + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.apis.DeviceLevelProductionMonitoringApi +import enlighten.monitoring.models.BatteryDeviceTelemetry +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetSystemMicroDeviceTelemetryResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.TelemetryGranularityEnum +import enlighten.monitoring.models.TooManyRequestsError + +class DeviceLevelProductionMonitoringApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of DeviceLevelProductionMonitoringApi + //val apiInstance = DeviceLevelProductionMonitoringApi() + + // to test getSystemAcbDeviceTelemetry + should("test getSystemAcbDeviceTelemetry") { + // uncomment below to test getSystemAcbDeviceTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val serialNo : kotlin.String = serialNo_example // kotlin.String | Serial number of the acb. + //val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : BatteryDeviceTelemetry = apiInstance.getSystemAcbDeviceTelemetry(systemId, serialNo, startAt, granularity) + //result shouldBe ("TODO") + } + + // to test getSystemEnchargeDeviceTelemetry + should("test getSystemEnchargeDeviceTelemetry") { + // uncomment below to test getSystemEnchargeDeviceTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val serialNo : kotlin.String = serialNo_example // kotlin.String | Serial number of the Encharge. + //val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : BatteryDeviceTelemetry = apiInstance.getSystemEnchargeDeviceTelemetry(systemId, serialNo, startAt, granularity) + //result shouldBe ("TODO") + } + + // to test getSystemMicroDeviceTelemetry + should("test getSystemMicroDeviceTelemetry") { + // uncomment below to test getSystemMicroDeviceTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val serialNo : kotlin.String = serialNo_example // kotlin.String | Serial number of the individual solar Microinverter. + //val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : GetSystemMicroDeviceTelemetryResponse = apiInstance.getSystemMicroDeviceTelemetry(systemId, serialNo, startAt, granularity) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApiTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApiTest.kt new file mode 100644 index 00000000..67f05c67 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SiteLevelConsumptionMonitoringApiTest.kt @@ -0,0 +1,123 @@ +/** + * + * 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.monitoring.apis + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.apis.SiteLevelConsumptionMonitoringApi +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetSystemBatteryLifetimeResponse +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponse +import enlighten.monitoring.models.GetSystemConsumptionLifetimeResponse +import enlighten.monitoring.models.GetSystemConsumptionMeterTelemetryResponse +import enlighten.monitoring.models.GetSystemEnergyExportLifetimeResponse +import enlighten.monitoring.models.GetSystemEnergyExportTelemetryResponse +import enlighten.monitoring.models.GetSystemEnergyImportLifetimeResponse +import enlighten.monitoring.models.GetSystemEnergyImportTelemetryResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.TelemetryGranularityEnum +import enlighten.monitoring.models.TooManyRequestsError + +class SiteLevelConsumptionMonitoringApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of SiteLevelConsumptionMonitoringApi + //val apiInstance = SiteLevelConsumptionMonitoringApi() + + // to test getSystemBatteryLifetime + should("test getSystemBatteryLifetime") { + // uncomment below to test getSystemBatteryLifetime + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. + //val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. + //val result : GetSystemBatteryLifetimeResponse = apiInstance.getSystemBatteryLifetime(systemId, startDate, endDate) + //result shouldBe ("TODO") + } + + // to test getSystemBatteryTelemetry + should("test getSystemBatteryTelemetry") { + // uncomment below to test getSystemBatteryTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : GetSystemBatteryTelemetryResponse = apiInstance.getSystemBatteryTelemetry(systemId, startAt, granularity) + //result shouldBe ("TODO") + } + + // to test getSystemConsumptionLifetime + should("test getSystemConsumptionLifetime") { + // uncomment below to test getSystemConsumptionLifetime + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. + //val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. + //val result : GetSystemConsumptionLifetimeResponse = apiInstance.getSystemConsumptionLifetime(systemId, startDate, endDate) + //result shouldBe ("TODO") + } + + // to test getSystemConsumptionMeterTelemetry + should("test getSystemConsumptionMeterTelemetry") { + // uncomment below to test getSystemConsumptionMeterTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startAt : kotlin.Long = 789 // kotlin.Long | Requested start time for telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. If no start_at is specified, defaults to midnight today, in the timezone of the system. If the start_at specified is earlier than the system's first reported date, then the system first reported date is considered as start_at. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : GetSystemConsumptionMeterTelemetryResponse = apiInstance.getSystemConsumptionMeterTelemetry(systemId, startAt, granularity) + //result shouldBe ("TODO") + } + + // to test getSystemEnergyExportLifetime + should("test getSystemEnergyExportLifetime") { + // uncomment below to test getSystemEnergyExportLifetime + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. + //val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. + //val result : GetSystemEnergyExportLifetimeResponse = apiInstance.getSystemEnergyExportLifetime(systemId, startDate, endDate) + //result shouldBe ("TODO") + } + + // to test getSystemEnergyExportTelemetry + should("test getSystemEnergyExportTelemetry") { + // uncomment below to test getSystemEnergyExportTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : GetSystemEnergyExportTelemetryResponse = apiInstance.getSystemEnergyExportTelemetry(systemId, startAt, granularity) + //result shouldBe ("TODO") + } + + // to test getSystemEnergyImportLifetime + should("test getSystemEnergyImportLifetime") { + // uncomment below to test getSystemEnergyImportLifetime + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Requested start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. + //val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. + //val result : GetSystemEnergyImportLifetimeResponse = apiInstance.getSystemEnergyImportLifetime(systemId, startDate, endDate) + //result shouldBe ("TODO") + } + + // to test getSystemEnergyImportTelemetry + should("test getSystemEnergyImportTelemetry") { + // uncomment below to test getSystemEnergyImportTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : GetSystemEnergyImportTelemetryResponse = apiInstance.getSystemEnergyImportTelemetry(systemId, startAt, granularity) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApiTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApiTest.kt new file mode 100644 index 00000000..697fe3ca --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SiteLevelProductionMonitoringApiTest.kt @@ -0,0 +1,91 @@ +/** + * + * 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.monitoring.apis + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.apis.SiteLevelProductionMonitoringApi +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetSystemEnergyLifetimeResponse +import enlighten.monitoring.models.GetSystemProductionMeterReadingsResponse +import enlighten.monitoring.models.GetSystemProductionMeterTelemetryResponse +import enlighten.monitoring.models.GetSystemProductionMicroTelemetryResponse +import enlighten.monitoring.models.GetSystemRgmStatsResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.SystemEnergyLifetimeProductionEnum +import enlighten.monitoring.models.TelemetryGranularityEnum +import enlighten.monitoring.models.TooManyRequestsError + +class SiteLevelProductionMonitoringApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of SiteLevelProductionMonitoringApi + //val apiInstance = SiteLevelProductionMonitoringApi() + + // to test getSystemEnergyLifetime + should("test getSystemEnergyLifetime") { + // uncomment below to test getSystemEnergyLifetime + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | Start date of the time series data. Defaults to the system's operational date. If the start_date is earlier than the system's operational_date, then the response data begins with the system operational_date as start_date. Pass as string in YYYY-MM-DD format. + //val endDate : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | End date of the time series data. Defaults to yesterday. If the end_date is later than yesterday, then the response data ends with yesterday as end_date. Pass as string in YYYY-MM-DD format. + //val production : SystemEnergyLifetimeProductionEnum = // SystemEnergyLifetimeProductionEnum | 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. + //val result : GetSystemEnergyLifetimeResponse = apiInstance.getSystemEnergyLifetime(systemId, startDate, endDate, production) + //result shouldBe ("TODO") + } + + // to test getSystemProductionMeterReadings + should("test getSystemProductionMeterReadings") { + // uncomment below to test getSystemProductionMeterReadings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val endAt : kotlin.Long = 789 // 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. + //val result : GetSystemProductionMeterReadingsResponse = apiInstance.getSystemProductionMeterReadings(systemId, endAt) + //result shouldBe ("TODO") + } + + // to test getSystemProductionMeterTelemetry + should("test getSystemProductionMeterTelemetry") { + // uncomment below to test getSystemProductionMeterTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : GetSystemProductionMeterTelemetryResponse = apiInstance.getSystemProductionMeterTelemetry(systemId, startAt, granularity) + //result shouldBe ("TODO") + } + + // to test getSystemProductionMicroTelemetry + should("test getSystemProductionMicroTelemetry") { + // uncomment below to test getSystemProductionMicroTelemetry + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startAt : kotlin.Long = 789 // kotlin.Long | Start time for fetching the telemetry data in Epoch time format. Alternatively one can use start_date in place of start_at for passing the start date as string in YYYY-MM-DD format. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + //val granularity : TelemetryGranularityEnum = // TelemetryGranularityEnum | Granularity of the telemetry data. Default is 'day'. + //val result : GetSystemProductionMicroTelemetryResponse = apiInstance.getSystemProductionMicroTelemetry(systemId, startAt, granularity) + //result shouldBe ("TODO") + } + + // to test getSystemRgmStats + should("test getSystemRgmStats") { + // uncomment below to test getSystemRgmStats + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val startAt : kotlin.Long = 789 // 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 at midnight of the first reported interval date. + //val endAt : kotlin.Long = 789 // kotlin.Long | End of reporting period in Unix epoch time. If no end is specified, default to the time of the request or (start time + 1 week), whichever is earlier. If the end is later than the last reported interval the response data ends with the last reported interval. + //val result : GetSystemRgmStatsResponse = apiInstance.getSystemRgmStats(systemId, startAt, endAt) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/StreamingApiTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/StreamingApiTest.kt new file mode 100644 index 00000000..ad55053a --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/StreamingApiTest.kt @@ -0,0 +1,40 @@ +/** + * + * 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.monitoring.apis + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.apis.StreamingApi +import enlighten.monitoring.models.StreamSystemLiveDataError +import enlighten.monitoring.models.StreamSystemLiveDataResponse + +class StreamingApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of StreamingApi + //val apiInstance = StreamingApi() + + // to test streamSystemLiveData + should("test streamSystemLiveData") { + // uncomment below to test streamSystemLiveData + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val duration : kotlin.Int = 56 // kotlin.Int | Duration of the stream in seconds. Default=30, Min=30, Max=300, e.g=30. + //val result : StreamSystemLiveDataResponse = apiInstance.streamSystemLiveData(systemId, duration) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SystemConfigurationsApiTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SystemConfigurationsApiTest.kt new file mode 100644 index 00000000..5a116978 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SystemConfigurationsApiTest.kt @@ -0,0 +1,100 @@ +/** + * + * 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.monitoring.apis + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.apis.SystemConfigurationsApi +import enlighten.monitoring.models.BatterySettings +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetSystemGridStatusSettingsResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.LoadControlSettings +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.StormGuardSettings +import enlighten.monitoring.models.TooManyRequestsError +import enlighten.monitoring.models.UpdateSystemBatterySettingsRequest +import enlighten.monitoring.models.UpdateSystemLoadControlSettingsRequest +import enlighten.monitoring.models.UpdateSystemStormGuardSettingsRequest + +class SystemConfigurationsApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemConfigurationsApi + //val apiInstance = SystemConfigurationsApi() + + // to test getSystemBatterySettings + should("test getSystemBatterySettings") { + // uncomment below to test getSystemBatterySettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val result : BatterySettings = apiInstance.getSystemBatterySettings(systemId) + //result shouldBe ("TODO") + } + + // to test getSystemGridStatusSettings + should("test getSystemGridStatusSettings") { + // uncomment below to test getSystemGridStatusSettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val result : GetSystemGridStatusSettingsResponse = apiInstance.getSystemGridStatusSettings(systemId) + //result shouldBe ("TODO") + } + + // to test getSystemLoadControlSettings + should("test getSystemLoadControlSettings") { + // uncomment below to test getSystemLoadControlSettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val result : LoadControlSettings = apiInstance.getSystemLoadControlSettings(systemId) + //result shouldBe ("TODO") + } + + // to test getSystemStormGuardSettings + should("test getSystemStormGuardSettings") { + // uncomment below to test getSystemStormGuardSettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val result : StormGuardSettings = apiInstance.getSystemStormGuardSettings(systemId) + //result shouldBe ("TODO") + } + + // to test updateSystemBatterySettings + should("test updateSystemBatterySettings") { + // uncomment below to test updateSystemBatterySettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val batterySettings : UpdateSystemBatterySettingsRequest = // UpdateSystemBatterySettingsRequest | + //val result : BatterySettings = apiInstance.updateSystemBatterySettings(systemId, batterySettings) + //result shouldBe ("TODO") + } + + // to test updateSystemLoadControlSettings + should("test updateSystemLoadControlSettings") { + // uncomment below to test updateSystemLoadControlSettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val updateSystemLoadControlSettingsRequest : UpdateSystemLoadControlSettingsRequest = // UpdateSystemLoadControlSettingsRequest | + //val result : LoadControlSettings = apiInstance.updateSystemLoadControlSettings(systemId, updateSystemLoadControlSettingsRequest) + //result shouldBe ("TODO") + } + + // to test updateSystemStormGuardSettings + should("test updateSystemStormGuardSettings") { + // uncomment below to test updateSystemStormGuardSettings + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val stormGuard : UpdateSystemStormGuardSettingsRequest = // UpdateSystemStormGuardSettingsRequest | + //val result : StormGuardSettings = apiInstance.updateSystemStormGuardSettings(systemId, stormGuard) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SystemDetailsApiTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SystemDetailsApiTest.kt new file mode 100644 index 00000000..331a640e --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/apis/SystemDetailsApiTest.kt @@ -0,0 +1,104 @@ +/** + * + * 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.monitoring.apis + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.apis.SystemDetailsApi +import enlighten.monitoring.models.ClientError +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInner +import enlighten.monitoring.models.GetSystemDevicesResponse +import enlighten.monitoring.models.GetSystemSummaryResponse +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.GetSystemsResponse +import enlighten.monitoring.models.MethodNotAllowedError +import enlighten.monitoring.models.NotImplementedError +import enlighten.monitoring.models.RetrieveSystemIdResponse +import enlighten.monitoring.models.SearchSystemsRequest +import enlighten.monitoring.models.SearchSystemsResponse +import enlighten.monitoring.models.SystemDetails +import enlighten.monitoring.models.SystemSortByEnum +import enlighten.monitoring.models.TooManyRequestsError + +class SystemDetailsApiTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemDetailsApi + //val apiInstance = SystemDetailsApi() + + // to test getInvertersSummaryByEnvoyOrSite + should("test getInvertersSummaryByEnvoyOrSite") { + // uncomment below to test getInvertersSummaryByEnvoyOrSite + //val siteId : kotlin.Int = 56 // kotlin.Int | Site ID. The response will contain only those microinverters reporting to one of the active envoys of the given site. + //val envoySerialNumber : kotlin.String = envoySerialNumber_example // kotlin.String | Active envoy serial number. Only microinverters reporting to the given active envoy will be present in the response. + //val result : kotlin.collections.List = apiInstance.getInvertersSummaryByEnvoyOrSite(siteId, envoySerialNumber) + //result shouldBe ("TODO") + } + + // to test getSystem + should("test getSystem") { + // uncomment below to test getSystem + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val result : SystemDetails = apiInstance.getSystem(systemId) + //result shouldBe ("TODO") + } + + // to test getSystemDevices + should("test getSystemDevices") { + // uncomment below to test getSystemDevices + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val result : GetSystemDevicesResponse = apiInstance.getSystemDevices(systemId) + //result shouldBe ("TODO") + } + + // to test getSystemSummary + should("test getSystemSummary") { + // uncomment below to test getSystemSummary + //val systemId : kotlin.Int = 56 // kotlin.Int | Unique numeric ID of the system. + //val result : GetSystemSummaryResponse = apiInstance.getSystemSummary(systemId) + //result shouldBe ("TODO") + } + + // to test getSystems + should("test getSystems") { + // uncomment below to test getSystems + //val page : kotlin.Int = 56 // kotlin.Int | Page to be returned. Default=1, Min=1. For example, if page is set to 2, 2nd page is returned. + //val size : kotlin.Int = 56 // kotlin.Int | Maximum number of records shown per page. Default=10, Min=1, Max=100. For example, if set to 5, 5 records are shown per page. + //val sortBy : SystemSortByEnum = // SystemSortByEnum | Returns list of systems sorted by field. To get ASC order sorted list, user sort_by = . To get DESC order sorted list, use sort_by = (-). Current sort keys supported are id, name, and last_report_date. By default the list is sorted by decreasing system ID. + //val result : GetSystemsResponse = apiInstance.getSystems(page, size, sortBy) + //result shouldBe ("TODO") + } + + // to test retrieveSystemId + should("test retrieveSystemId") { + // uncomment below to test retrieveSystemId + //val serialNum : kotlin.String = serialNum_example // kotlin.String | Envoy serial number. + //val result : RetrieveSystemIdResponse = apiInstance.retrieveSystemId(serialNum) + //result shouldBe ("TODO") + } + + // to test searchSystems + should("test searchSystems") { + // uncomment below to test searchSystems + //val page : kotlin.Int = 56 // kotlin.Int | Page to be returned. Default=1, Min=1, e.g=2. + //val size : kotlin.Int = 56 // kotlin.Int | Maximum number of records shown per page. Default=10, Min=1, Max=1000, e.g=5. + //val params : SearchSystemsRequest = // SearchSystemsRequest | + //val result : SearchSystemsResponse = apiInstance.searchSystems(page, size, params) + //result shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerChargeTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerChargeTest.kt new file mode 100644 index 00000000..0e8abe5f --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerChargeTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerCharge + +class BatteryDeviceTelemetryIntervalsInnerChargeTest : ShouldSpec() { + init { + // uncomment below to create an instance of BatteryDeviceTelemetryIntervalsInnerCharge + //val modelInstance = BatteryDeviceTelemetryIntervalsInnerCharge() + + // to test the property `enwh` - Energy into the battery during the interval. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischargeTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischargeTest.kt new file mode 100644 index 00000000..6aa7575c --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerDischargeTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerDischarge + +class BatteryDeviceTelemetryIntervalsInnerDischargeTest : ShouldSpec() { + init { + // uncomment below to create an instance of BatteryDeviceTelemetryIntervalsInnerDischarge + //val modelInstance = BatteryDeviceTelemetryIntervalsInnerDischarge() + + // to test the property `enwh` - Energy discharged from the battery during the interval. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSocTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSocTest.kt new file mode 100644 index 00000000..792640e9 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerSocTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerSoc + +class BatteryDeviceTelemetryIntervalsInnerSocTest : ShouldSpec() { + init { + // uncomment below to create an instance of BatteryDeviceTelemetryIntervalsInnerSoc + //val modelInstance = BatteryDeviceTelemetryIntervalsInnerSoc() + + // to test the property `percent` - Battery soc percentage. + should("test percent") { + // uncomment below to test the property + //modelInstance.percent shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerTest.kt new file mode 100644 index 00000000..d18bab2b --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryIntervalsInnerTest.kt @@ -0,0 +1,56 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInner +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerCharge +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerDischarge +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInnerSoc + +class BatteryDeviceTelemetryIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of BatteryDeviceTelemetryIntervalsInner + //val modelInstance = BatteryDeviceTelemetryIntervalsInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `charge` + should("test charge") { + // uncomment below to test the property + //modelInstance.charge shouldBe ("TODO") + } + + // to test the property `discharge` + should("test discharge") { + // uncomment below to test the property + //modelInstance.discharge shouldBe ("TODO") + } + + // to test the property `soc` + should("test soc") { + // uncomment below to test the property + //modelInstance.soc shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryTest.kt new file mode 100644 index 00000000..d590646d --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatteryDeviceTelemetryTest.kt @@ -0,0 +1,91 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.BatteryDeviceTelemetry +import enlighten.monitoring.models.BatteryDeviceTelemetryIntervalsInner +import enlighten.monitoring.models.TelemetryGranularityEnum + +class BatteryDeviceTelemetryTest : ShouldSpec() { + init { + // uncomment below to create an instance of BatteryDeviceTelemetry + //val modelInstance = BatteryDeviceTelemetry() + + // to test the property `systemId` - System ID. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `serialNumber` - Device serial number. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `granularity` + should("test granularity") { + // uncomment below to test the property + //modelInstance.granularity shouldBe ("TODO") + } + + // to test the property `totalDevices` - Shall always be 1 since this is telemetry from individual micros. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `startAt` - Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response. + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `items` - List key 'intervals'. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `intervals` + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + // to test the property `lastReportedTime` - Last reported timestamp. + should("test lastReportedTime") { + // uncomment below to test the property + //modelInstance.lastReportedTime shouldBe ("TODO") + } + + // to test the property `lastReportedSoc` - Last reported soc percentage. + should("test lastReportedSoc") { + // uncomment below to test the property + //modelInstance.lastReportedSoc shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatterySettingsTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatterySettingsTest.kt new file mode 100644 index 00000000..791544b0 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/BatterySettingsTest.kt @@ -0,0 +1,65 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.BatterySettings + +class BatterySettingsTest : ShouldSpec() { + init { + // uncomment below to create an instance of BatterySettings + //val modelInstance = BatterySettings() + + // to test the property `systemId` + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `batteryMode` - Current battery mode of the system. Available values are Savings Mode, Full Backup, and Self - Consumption. + should("test batteryMode") { + // uncomment below to test the property + //modelInstance.batteryMode shouldBe ("TODO") + } + + // to test the property `reserveSoc` - Reserve soc for the current mode. + should("test reserveSoc") { + // uncomment below to test the property + //modelInstance.reserveSoc shouldBe ("TODO") + } + + // to test the property `energyIndependence` - Energy independence after peak hours enabled/disabled. Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period. Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period. + should("test energyIndependence") { + // uncomment below to test the property + //modelInstance.energyIndependence shouldBe ("TODO") + } + + // to test the property `chargeFromGrid` - Charge battery from grid enabled/disabled. Enabled: Battery may also charge from the grid when in full backup mode or when battery charge is below the reserve capacity in savings or self-consumption mode. + should("test chargeFromGrid") { + // uncomment below to test the property + //modelInstance.chargeFromGrid shouldBe ("TODO") + } + + // to test the property `batteryShutdownLevel` - Level at which battery shutdowns to conserve energy. Battery restarts by using the conserved energy when the utility grid restores power or solar panels start producing energy. + should("test batteryShutdownLevel") { + // uncomment below to test the property + //modelInstance.batteryShutdownLevel shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/ClientErrorTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/ClientErrorTest.kt new file mode 100644 index 00000000..a31ae4d7 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/ClientErrorTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.ClientError + +class ClientErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of ClientError + //val modelInstance = ClientError() + + // to test the property `details` - Error details. + should("test details") { + // uncomment below to test the property + //modelInstance.details shouldBe ("TODO") + } + + // to test the property `code` - Error code. + should("test code") { + // uncomment below to test the property + //modelInstance.code shouldBe ("TODO") + } + + // to test the property `message` - Error type. + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableErrorTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableErrorTest.kt new file mode 100644 index 00000000..4f0cd652 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/DataTemporarilyUnavailableErrorTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.DataTemporarilyUnavailableError + +class DataTemporarilyUnavailableErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of DataTemporarilyUnavailableError + //val modelInstance = DataTemporarilyUnavailableError() + + // to test the property `errorCode` - Error code. + should("test errorCode") { + // uncomment below to test the property + //modelInstance.errorCode shouldBe ("TODO") + } + + // to test the property `errorMessages` - Error messages. + should("test errorMessages") { + // uncomment below to test the property + //modelInstance.errorMessages shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergyTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergyTest.kt new file mode 100644 index 00000000..d238dc20 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergyTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy + +class GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergyTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy + //val modelInstance = GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy() + + // to test the property ``value`` - Lifetime energy produced by the microinverter. + should("test `value`") { + // uncomment below to test the property + //modelInstance.`value` shouldBe ("TODO") + } + + // to test the property `units` - Energy units. + should("test units") { + // uncomment below to test the property + //modelInstance.units shouldBe ("TODO") + } + + // to test the property `precision` + should("test precision") { + // uncomment below to test the property + //modelInstance.precision shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProducedTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProducedTest.kt new file mode 100644 index 00000000..ec358114 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProducedTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced + +class GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProducedTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced + //val modelInstance = GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced() + + // to test the property ``value`` - Current power produced by the microinverter. + should("test `value`") { + // uncomment below to test the property + //modelInstance.`value` shouldBe ("TODO") + } + + // to test the property `units` - Power units. + should("test units") { + // uncomment below to test the property + //modelInstance.units shouldBe ("TODO") + } + + // to test the property `precision` + should("test precision") { + // uncomment below to test the property + //modelInstance.precision shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerTest.kt new file mode 100644 index 00000000..4cde7644 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerTest.kt @@ -0,0 +1,109 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerEnergy +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerPowerProduced + +class GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner + //val modelInstance = GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner() + + // to test the property `id` - Numeric ID of the microinverter. + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `serialNumber` - Serial number of the microinverter. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `model` - Microinverter model type. + should("test model") { + // uncomment below to test the property + //modelInstance.model shouldBe ("TODO") + } + + // to test the property `partNumber` - Microinverter part number. + should("test partNumber") { + // uncomment below to test the property + //modelInstance.partNumber shouldBe ("TODO") + } + + // to test the property `sku` - SKU of the microinverter. + should("test sku") { + // uncomment below to test the property + //modelInstance.sku shouldBe ("TODO") + } + + // to test the property `status` - Current status of the micro inverter. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `powerProduced` + should("test powerProduced") { + // uncomment below to test the property + //modelInstance.powerProduced shouldBe ("TODO") + } + + // to test the property `procLoad` - Processor load. + should("test procLoad") { + // uncomment below to test the property + //modelInstance.procLoad shouldBe ("TODO") + } + + // to test the property `paramTable` - Parameter table. + should("test paramTable") { + // uncomment below to test the property + //modelInstance.paramTable shouldBe ("TODO") + } + + // to test the property `envoySerialNumber` - Envoy serial number of the system that the micro reports to. + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `energy` + should("test energy") { + // uncomment below to test the property + //modelInstance.energy shouldBe ("TODO") + } + + // to test the property `gridProfile` - Grid profile ID. + should("test gridProfile") { + // uncomment below to test the property + //modelInstance.gridProfile shouldBe ("TODO") + } + + // to test the property `lastReportDate` - Date on which the microinverter last reported. + should("test lastReportDate") { + // uncomment below to test the property + //modelInstance.lastReportDate shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerTest.kt new file mode 100644 index 00000000..6956b628 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetInvertersSummaryByEnvoyOrSiteResponseInnerTest.kt @@ -0,0 +1,42 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInner +import enlighten.monitoring.models.GetInvertersSummaryByEnvoyOrSiteResponseInnerMicroInvertersInner + +class GetInvertersSummaryByEnvoyOrSiteResponseInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetInvertersSummaryByEnvoyOrSiteResponseInner + //val modelInstance = GetInvertersSummaryByEnvoyOrSiteResponseInner() + + // to test the property `signalStrength` - Signal strength. + should("test signalStrength") { + // uncomment below to test the property + //modelInstance.signalStrength shouldBe ("TODO") + } + + // to test the property `microInverters` - Microinverters. + should("test microInverters") { + // uncomment below to test the property + //modelInstance.microInverters shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponseTest.kt new file mode 100644 index 00000000..b81a0df6 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryLifetimeResponseTest.kt @@ -0,0 +1,60 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemBatteryLifetimeResponse +import enlighten.monitoring.models.Meta + +class GetSystemBatteryLifetimeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemBatteryLifetimeResponse + //val modelInstance = GetSystemBatteryLifetimeResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `startDate` - When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. + should("test startDate") { + // uncomment below to test the property + //modelInstance.startDate shouldBe ("TODO") + } + + // to test the property `charge` - An array of charge 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. + should("test charge") { + // uncomment below to test the property + //modelInstance.charge shouldBe ("TODO") + } + + // to test the property `discharge` - An array of discharge 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. + should("test discharge") { + // uncomment below to test the property + //modelInstance.discharge shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerChargeTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerChargeTest.kt new file mode 100644 index 00000000..59ec4e86 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerChargeTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerCharge + +class GetSystemBatteryTelemetryResponseIntervalsInnerChargeTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemBatteryTelemetryResponseIntervalsInnerCharge + //val modelInstance = GetSystemBatteryTelemetryResponseIntervalsInnerCharge() + + // to test the property `enwh` - Energy into the battery during the interval. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of devices reporting. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischargeTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischargeTest.kt new file mode 100644 index 00000000..5aeac136 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerDischargeTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerDischarge + +class GetSystemBatteryTelemetryResponseIntervalsInnerDischargeTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemBatteryTelemetryResponseIntervalsInnerDischarge + //val modelInstance = GetSystemBatteryTelemetryResponseIntervalsInnerDischarge() + + // to test the property `enwh` - Energy discharged from the battery during the interval. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of devices reporting. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSocTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSocTest.kt new file mode 100644 index 00000000..6ecacfa2 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerSocTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerSoc + +class GetSystemBatteryTelemetryResponseIntervalsInnerSocTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemBatteryTelemetryResponseIntervalsInnerSoc + //val modelInstance = GetSystemBatteryTelemetryResponseIntervalsInnerSoc() + + // to test the property `percent` - Battery soc percentage. + should("test percent") { + // uncomment below to test the property + //modelInstance.percent shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of devices reporting. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..ba97e2da --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseIntervalsInnerTest.kt @@ -0,0 +1,56 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInner +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerCharge +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerDischarge +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInnerSoc + +class GetSystemBatteryTelemetryResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemBatteryTelemetryResponseIntervalsInner + //val modelInstance = GetSystemBatteryTelemetryResponseIntervalsInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `charge` + should("test charge") { + // uncomment below to test the property + //modelInstance.charge shouldBe ("TODO") + } + + // to test the property `discharge` + should("test discharge") { + // uncomment below to test the property + //modelInstance.discharge shouldBe ("TODO") + } + + // to test the property `soc` + should("test soc") { + // uncomment below to test the property + //modelInstance.soc shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseTest.kt new file mode 100644 index 00000000..9841a88a --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemBatteryTelemetryResponseTest.kt @@ -0,0 +1,79 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponse +import enlighten.monitoring.models.GetSystemBatteryTelemetryResponseIntervalsInner +import enlighten.monitoring.models.TelemetryGranularityEnum + +class GetSystemBatteryTelemetryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemBatteryTelemetryResponse + //val modelInstance = GetSystemBatteryTelemetryResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `granularity` + should("test granularity") { + // uncomment below to test the property + //modelInstance.granularity shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of batteries in the site. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `startAt` - Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `items` - List key 'intervals'. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `intervals` + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + // to test the property `lastReportedAggregateSoc` - Last reported aggregate soc percentage. + should("test lastReportedAggregateSoc") { + // uncomment below to test the property + //modelInstance.lastReportedAggregateSoc shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponseTest.kt new file mode 100644 index 00000000..6dc5e94b --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionLifetimeResponseTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemConsumptionLifetimeResponse +import enlighten.monitoring.models.Meta + +class GetSystemConsumptionLifetimeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemConsumptionLifetimeResponse + //val modelInstance = GetSystemConsumptionLifetimeResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `startDate` - When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. + should("test startDate") { + // uncomment below to test the property + //modelInstance.startDate shouldBe ("TODO") + } + + // to test the property `consumption` - An array of consumption measurements in Wh, one for each day since consumption metering began, or one for each day of the requested period. + should("test consumption") { + // uncomment below to test the property + //modelInstance.consumption shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..4324194d --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseIntervalsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemConsumptionMeterTelemetryResponseIntervalsInner + +class GetSystemConsumptionMeterTelemetryResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemConsumptionMeterTelemetryResponseIntervalsInner + //val modelInstance = GetSystemConsumptionMeterTelemetryResponseIntervalsInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of devices reporting. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + // to test the property `enwh` - Units produced per interval. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseTest.kt new file mode 100644 index 00000000..50b1d945 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemConsumptionMeterTelemetryResponseTest.kt @@ -0,0 +1,80 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemConsumptionMeterTelemetryResponse +import enlighten.monitoring.models.GetSystemConsumptionMeterTelemetryResponseIntervalsInner +import enlighten.monitoring.models.Meta +import enlighten.monitoring.models.TelemetryGranularityEnum + +class GetSystemConsumptionMeterTelemetryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemConsumptionMeterTelemetryResponse + //val modelInstance = GetSystemConsumptionMeterTelemetryResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `granularity` + should("test granularity") { + // uncomment below to test the property + //modelInstance.granularity shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of non-retired consumption meters in the site. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `startAt` - Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `items` - List key 'intervals'. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `intervals` + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModemTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModemTest.kt new file mode 100644 index 00000000..7ff047e7 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerCellularModemTest.kt @@ -0,0 +1,59 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemDevicesResponseDevicesValueInnerCellularModem + +class GetSystemDevicesResponseDevicesValueInnerCellularModemTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemDevicesResponseDevicesValueInnerCellularModem + //val modelInstance = GetSystemDevicesResponseDevicesValueInnerCellularModem() + + // to test the property `imei` + should("test imei") { + // uncomment below to test the property + //modelInstance.imei shouldBe ("TODO") + } + + // to test the property `partNum` + should("test partNum") { + // uncomment below to test the property + //modelInstance.partNum shouldBe ("TODO") + } + + // to test the property `sku` + should("test sku") { + // uncomment below to test the property + //modelInstance.sku shouldBe ("TODO") + } + + // to test the property `planStartDate` + should("test planStartDate") { + // uncomment below to test the property + //modelInstance.planStartDate shouldBe ("TODO") + } + + // to test the property `planEndDate` + should("test planEndDate") { + // uncomment below to test the property + //modelInstance.planEndDate shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerTest.kt new file mode 100644 index 00000000..884ec683 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseDevicesValueInnerTest.kt @@ -0,0 +1,108 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemDevicesResponseDevicesValueInner +import enlighten.monitoring.models.GetSystemDevicesResponseDevicesValueInnerCellularModem + +class GetSystemDevicesResponseDevicesValueInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemDevicesResponseDevicesValueInner + //val modelInstance = GetSystemDevicesResponseDevicesValueInner() + + // to test the property `id` + should("test id") { + // uncomment below to test the property + //modelInstance.id shouldBe ("TODO") + } + + // to test the property `lastReportAt` + should("test lastReportAt") { + // uncomment below to test the property + //modelInstance.lastReportAt shouldBe ("TODO") + } + + // to test the property `name` + should("test name") { + // uncomment below to test the property + //modelInstance.name shouldBe ("TODO") + } + + // to test the property `serialNumber` + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `partNumber` + should("test partNumber") { + // uncomment below to test the property + //modelInstance.partNumber shouldBe ("TODO") + } + + // to test the property `emuSwVersion` + should("test emuSwVersion") { + // uncomment below to test the property + //modelInstance.emuSwVersion shouldBe ("TODO") + } + + // to test the property `sku` + should("test sku") { + // uncomment below to test the property + //modelInstance.sku shouldBe ("TODO") + } + + // to test the property `model` + should("test model") { + // uncomment below to test the property + //modelInstance.model shouldBe ("TODO") + } + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `active` + should("test active") { + // uncomment below to test the property + //modelInstance.active shouldBe ("TODO") + } + + // to test the property `state` + should("test state") { + // uncomment below to test the property + //modelInstance.state shouldBe ("TODO") + } + + // to test the property `configType` + should("test configType") { + // uncomment below to test the property + //modelInstance.configType shouldBe ("TODO") + } + + // to test the property `cellularModem` + should("test cellularModem") { + // uncomment below to test the property + //modelInstance.cellularModem shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseTest.kt new file mode 100644 index 00000000..57d40141 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemDevicesResponseTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemDevicesResponse +import enlighten.monitoring.models.GetSystemDevicesResponseDevicesValueInner + +class GetSystemDevicesResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemDevicesResponse + //val modelInstance = GetSystemDevicesResponse() + + // to test the property `systemId` - System ID. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `totalDevices` - Total active devices associated with the system. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `items` - List key. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `devices` - Hash keys include all the possible device types micros, meters, gateways, mids, q_relays, ACBs, Encharges, Enpowers (if the devices of this type are present). For all the device types, the object will contain the serial_number and model with some additional information pertaining to the device type. + should("test devices") { + // uncomment below to test the property + //modelInstance.devices shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponseTest.kt new file mode 100644 index 00000000..0ff2cb15 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportLifetimeResponseTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemEnergyExportLifetimeResponse +import enlighten.monitoring.models.Meta + +class GetSystemEnergyExportLifetimeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemEnergyExportLifetimeResponse + //val modelInstance = GetSystemEnergyExportLifetimeResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `startDate` - When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. + should("test startDate") { + // uncomment below to test the property + //modelInstance.startDate shouldBe ("TODO") + } + + // to test the property `export` - An array of export 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. + should("test export") { + // uncomment below to test the property + //modelInstance.export shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInnerTest.kt new file mode 100644 index 00000000..1097a753 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseIntervalsInnerInnerTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemEnergyExportTelemetryResponseIntervalsInnerInner + +class GetSystemEnergyExportTelemetryResponseIntervalsInnerInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemEnergyExportTelemetryResponseIntervalsInnerInner + //val modelInstance = GetSystemEnergyExportTelemetryResponseIntervalsInnerInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `whExported` - Energy exported (in Watt-Hours) during that period. + should("test whExported") { + // uncomment below to test the property + //modelInstance.whExported shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseTest.kt new file mode 100644 index 00000000..f78c8af2 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyExportTelemetryResponseTest.kt @@ -0,0 +1,79 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemEnergyExportTelemetryResponse +import enlighten.monitoring.models.GetSystemEnergyExportTelemetryResponseIntervalsInnerInner +import enlighten.monitoring.models.Meta + +class GetSystemEnergyExportTelemetryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemEnergyExportTelemetryResponse + //val modelInstance = GetSystemEnergyExportTelemetryResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `granularity` - Granularity of the telemetry data. Default is 'day'. + should("test granularity") { + // uncomment below to test the property + //modelInstance.granularity shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of production meters in the site. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `startAt` - Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `items` - List key 'intervals'. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `intervals` - An array of telemetry objects. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponseTest.kt new file mode 100644 index 00000000..5c7f4ed9 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportLifetimeResponseTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemEnergyImportLifetimeResponse +import enlighten.monitoring.models.Meta + +class GetSystemEnergyImportLifetimeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemEnergyImportLifetimeResponse + //val modelInstance = GetSystemEnergyImportLifetimeResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `startDate` - When no start_date parameter is specified on the request, defaults to the operational_date of the system. May be null if system has never produced. When a start_date parameter is included in the request, the same is included in the response. + should("test startDate") { + // uncomment below to test the property + //modelInstance.startDate shouldBe ("TODO") + } + + // to test the property ``import`` - An array of import 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. + should("test `import`") { + // uncomment below to test the property + //modelInstance.`import` shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInnerTest.kt new file mode 100644 index 00000000..722cee13 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseIntervalsInnerInnerTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemEnergyImportTelemetryResponseIntervalsInnerInner + +class GetSystemEnergyImportTelemetryResponseIntervalsInnerInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemEnergyImportTelemetryResponseIntervalsInnerInner + //val modelInstance = GetSystemEnergyImportTelemetryResponseIntervalsInnerInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `whImported` - Energy imported (in Watt-Hours) during that period. + should("test whImported") { + // uncomment below to test the property + //modelInstance.whImported shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseTest.kt new file mode 100644 index 00000000..03b33bf9 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyImportTelemetryResponseTest.kt @@ -0,0 +1,79 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemEnergyImportTelemetryResponse +import enlighten.monitoring.models.GetSystemEnergyImportTelemetryResponseIntervalsInnerInner +import enlighten.monitoring.models.Meta + +class GetSystemEnergyImportTelemetryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemEnergyImportTelemetryResponse + //val modelInstance = GetSystemEnergyImportTelemetryResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `granularity` - Granularity of the telemetry data. Default is 'day'. + should("test granularity") { + // uncomment below to test the property + //modelInstance.granularity shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of consumption meters in the site. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `startAt` - Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `items` - List key 'intervals'. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `intervals` - An array of telemetry objects. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponseTest.kt new file mode 100644 index 00000000..3ed7fea4 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemEnergyLifetimeResponseTest.kt @@ -0,0 +1,72 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemEnergyLifetimeResponse +import enlighten.monitoring.models.Meta + +class GetSystemEnergyLifetimeResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemEnergyLifetimeResponse + //val modelInstance = GetSystemEnergyLifetimeResponse() + + // to test the property `systemId` - System ID. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `startDate` - 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. + should("test startDate") { + // uncomment below to test the property + //modelInstance.startDate shouldBe ("TODO") + } + + // to test the property `meterStartDate` - 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. + should("test meterStartDate") { + // uncomment below to test the property + //modelInstance.meterStartDate shouldBe ("TODO") + } + + // to test the property `production` - 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. + should("test production") { + // uncomment below to test the property + //modelInstance.production shouldBe ("TODO") + } + + // to test the property `microProduction` + should("test microProduction") { + // uncomment below to test the property + //modelInstance.microProduction shouldBe ("TODO") + } + + // to test the property `meterProduction` + should("test meterProduction") { + // uncomment below to test the property + //modelInstance.meterProduction shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponseTest.kt new file mode 100644 index 00000000..9b9c0ba0 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemGridStatusSettingsResponseTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemGridStatusSettingsResponse + +class GetSystemGridStatusSettingsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemGridStatusSettingsResponse + //val modelInstance = GetSystemGridStatusSettingsResponse() + + // to test the property `systemId` + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `gridState` - Indicates whether the site is On Grid, Off Grid or grid status of site is Unknown. + should("test gridState") { + // uncomment below to test the property + //modelInstance.gridState shouldBe ("TODO") + } + + // to test the property `lastReportDate` - Timestamp (in epoch format) at which the system's Envoy last submitted a report. + should("test lastReportDate") { + // uncomment below to test the property + //modelInstance.lastReportDate shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..4079a1a1 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseIntervalsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemMicroDeviceTelemetryResponseIntervalsInner + +class GetSystemMicroDeviceTelemetryResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemMicroDeviceTelemetryResponseIntervalsInner + //val modelInstance = GetSystemMicroDeviceTelemetryResponseIntervalsInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `powr` - Average power (in Watt) produced by all the microinverters during this interval, measured in Watts. + should("test powr") { + // uncomment below to test the property + //modelInstance.powr shouldBe ("TODO") + } + + // to test the property `enwh` - Energy produced (in Watt-Hours) from all the microinverters combined during that period. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseTest.kt new file mode 100644 index 00000000..8d76cc25 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemMicroDeviceTelemetryResponseTest.kt @@ -0,0 +1,79 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemMicroDeviceTelemetryResponse +import enlighten.monitoring.models.GetSystemMicroDeviceTelemetryResponseIntervalsInner +import enlighten.monitoring.models.TelemetryGranularityEnum + +class GetSystemMicroDeviceTelemetryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemMicroDeviceTelemetryResponse + //val modelInstance = GetSystemMicroDeviceTelemetryResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `serialNumber` - Device serial number. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property `granularity` + should("test granularity") { + // uncomment below to test the property + //modelInstance.granularity shouldBe ("TODO") + } + + // to test the property `totalDevices` - Shall always be 1 since this is telemetry from individual micros. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `startAt` - Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter passed in the url then start_date field will appear in response. + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter passed in the url then end_date field will appear in response. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `items` - List key 'intervals'. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `intervals` + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInnerTest.kt new file mode 100644 index 00000000..9a18b1b2 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseMeterReadingsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemProductionMeterReadingsResponseMeterReadingsInner + +class GetSystemProductionMeterReadingsResponseMeterReadingsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemProductionMeterReadingsResponseMeterReadingsInner + //val modelInstance = GetSystemProductionMeterReadingsResponseMeterReadingsInner() + + // to test the property `serialNumber` - Serial number of the meter. + should("test serialNumber") { + // uncomment below to test the property + //modelInstance.serialNumber shouldBe ("TODO") + } + + // to test the property ``value`` - Meter reading, in Wh. + should("test `value`") { + // uncomment below to test the property + //modelInstance.`value` shouldBe ("TODO") + } + + // to test the property `readAt` - Time when the reading was taken, always prior or equal to the requested 'end_at'. + should("test readAt") { + // uncomment below to test the property + //modelInstance.readAt shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseTest.kt new file mode 100644 index 00000000..f46d528e --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterReadingsResponseTest.kt @@ -0,0 +1,49 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemProductionMeterReadingsResponse +import enlighten.monitoring.models.GetSystemProductionMeterReadingsResponseMeterReadingsInner +import enlighten.monitoring.models.Meta + +class GetSystemProductionMeterReadingsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemProductionMeterReadingsResponse + //val modelInstance = GetSystemProductionMeterReadingsResponse() + + // to test the property `systemId` - System ID. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `meterReadings` - Production meter readings. + should("test meterReadings") { + // uncomment below to test the property + //modelInstance.meterReadings shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..f6005f8f --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseIntervalsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemProductionMeterTelemetryResponseIntervalsInner + +class GetSystemProductionMeterTelemetryResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemProductionMeterTelemetryResponseIntervalsInner + //val modelInstance = GetSystemProductionMeterTelemetryResponseIntervalsInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of devices reporting. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + // to test the property `whDel` - Units produced per interval. + should("test whDel") { + // uncomment below to test the property + //modelInstance.whDel shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseTest.kt new file mode 100644 index 00000000..b55513d4 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMeterTelemetryResponseTest.kt @@ -0,0 +1,73 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemProductionMeterTelemetryResponse +import enlighten.monitoring.models.GetSystemProductionMeterTelemetryResponseIntervalsInner +import enlighten.monitoring.models.TelemetryGranularityEnum + +class GetSystemProductionMeterTelemetryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemProductionMeterTelemetryResponse + //val modelInstance = GetSystemProductionMeterTelemetryResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `granularity` + should("test granularity") { + // uncomment below to test the property + //modelInstance.granularity shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of production meters in the site. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `startAt` - Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `items` - List key 'intervals'. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `intervals` + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..b7e15539 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseIntervalsInnerTest.kt @@ -0,0 +1,53 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemProductionMicroTelemetryResponseIntervalsInner + +class GetSystemProductionMicroTelemetryResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemProductionMicroTelemetryResponseIntervalsInner + //val modelInstance = GetSystemProductionMicroTelemetryResponseIntervalsInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of devices reporting. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + // to test the property `powr` - Average power (in Watt) produced by all the microinverters during this interval, measured in Watts. + should("test powr") { + // uncomment below to test the property + //modelInstance.powr shouldBe ("TODO") + } + + // to test the property `enwh` - Energy produced (in Watt-Hours) from all the microinverters combined during that period. + should("test enwh") { + // uncomment below to test the property + //modelInstance.enwh shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseTest.kt new file mode 100644 index 00000000..e2de21e1 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemProductionMicroTelemetryResponseTest.kt @@ -0,0 +1,80 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemProductionMicroTelemetryResponse +import enlighten.monitoring.models.GetSystemProductionMicroTelemetryResponseIntervalsInner +import enlighten.monitoring.models.Meta +import enlighten.monitoring.models.TelemetryGranularityEnum + +class GetSystemProductionMicroTelemetryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemProductionMicroTelemetryResponse + //val modelInstance = GetSystemProductionMicroTelemetryResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `granularity` + should("test granularity") { + // uncomment below to test the property + //modelInstance.granularity shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of micro inverters in the site. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `startAt` - Start time of the data series. Either start_date or start_at will be present. By default start_at will appear in response. If start_date parameter is passed in the url then start_date field will appear in response. + should("test startAt") { + // uncomment below to test the property + //modelInstance.startAt shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the data series. Either end_date or end_at will be present. By default end_at will appear in response. If end_date parameter is passed in the url then end_date field will appear in response. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `items` - List key 'intervals'. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `intervals` - An array of telemetry objects. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInnerTest.kt new file mode 100644 index 00000000..d20bca38 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseIntervalsInnerTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemRgmStatsResponseIntervalsInner + +class GetSystemRgmStatsResponseIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemRgmStatsResponseIntervalsInner + //val modelInstance = GetSystemRgmStatsResponseIntervalsInner() + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `devicesReporting` - Number of revenue-grade meters that reported data for this interval at the time of the request. + should("test devicesReporting") { + // uncomment below to test the property + //modelInstance.devicesReporting shouldBe ("TODO") + } + + // to test the property `whDel` - Energy delivered during this interval, in Wh. + should("test whDel") { + // uncomment below to test the property + //modelInstance.whDel shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt new file mode 100644 index 00000000..b6a8fb0d --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInnerTest.kt @@ -0,0 +1,53 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner + +class GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner + //val modelInstance = GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner() + + // to test the property `channel` - Reporting channel ID. + should("test channel") { + // uncomment below to test the property + //modelInstance.channel shouldBe ("TODO") + } + + // to test the property `endAt` - End time of the telemetry interval. + should("test endAt") { + // uncomment below to test the property + //modelInstance.endAt shouldBe ("TODO") + } + + // to test the property `whDel` - Energy delivered during this interval, in Wh (Watt-Hour). + should("test whDel") { + // uncomment below to test the property + //modelInstance.whDel shouldBe ("TODO") + } + + // to test the property `currW` - Energy delivered during this interval, in W (Watts). + should("test currW") { + // uncomment below to test the property + //modelInstance.currW shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerTest.kt new file mode 100644 index 00000000..3537a85b --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseMeterIntervalsInnerTest.kt @@ -0,0 +1,48 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemRgmStatsResponseMeterIntervalsInner +import enlighten.monitoring.models.GetSystemRgmStatsResponseMeterIntervalsInnerIntervalsInner + +class GetSystemRgmStatsResponseMeterIntervalsInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemRgmStatsResponseMeterIntervalsInner + //val modelInstance = GetSystemRgmStatsResponseMeterIntervalsInner() + + // to test the property `meterSerialNumber` - Meter serial number. + should("test meterSerialNumber") { + // uncomment below to test the property + //modelInstance.meterSerialNumber shouldBe ("TODO") + } + + // to test the property `envoySerialNumber` - Envoy serial number of the system that the micro reports to. + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `intervals` - Individual meter level interval. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseTest.kt new file mode 100644 index 00000000..2fb532b6 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemRgmStatsResponseTest.kt @@ -0,0 +1,62 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemRgmStatsResponse +import enlighten.monitoring.models.GetSystemRgmStatsResponseIntervalsInner +import enlighten.monitoring.models.GetSystemRgmStatsResponseMeterIntervalsInner +import enlighten.monitoring.models.Meta + +class GetSystemRgmStatsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemRgmStatsResponse + //val modelInstance = GetSystemRgmStatsResponse() + + // to test the property `systemId` - System ID. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `totalDevices` - Number of active revenue-grade meters for this system. + should("test totalDevices") { + // uncomment below to test the property + //modelInstance.totalDevices shouldBe ("TODO") + } + + // to test the property `meta` + should("test meta") { + // uncomment below to test the property + //modelInstance.meta shouldBe ("TODO") + } + + // to test the property `intervals` - A list of intervals between the requested start and end times. + should("test intervals") { + // uncomment below to test the property + //modelInstance.intervals shouldBe ("TODO") + } + + // to test the property `meterIntervals` - A list of intervals of a meter between the requested start and end times. + should("test meterIntervals") { + // uncomment below to test the property + //modelInstance.meterIntervals shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemSummaryResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemSummaryResponseTest.kt new file mode 100644 index 00000000..7c69818c --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemSummaryResponseTest.kt @@ -0,0 +1,102 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemSummaryResponse +import enlighten.monitoring.models.SystemStatusEnum + +class GetSystemSummaryResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemSummaryResponse + //val modelInstance = GetSystemSummaryResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `currentPower` - Current power production of the system in Watts. + should("test currentPower") { + // uncomment below to test the property + //modelInstance.currentPower shouldBe ("TODO") + } + + // to test the property `energyLifetime` - Energy generated by the system during its lifetime in Wh. + should("test energyLifetime") { + // uncomment below to test the property + //modelInstance.energyLifetime shouldBe ("TODO") + } + + // to test the property `energyToday` - Energy generated by the system today in Wh. + should("test energyToday") { + // uncomment below to test the property + //modelInstance.energyToday shouldBe ("TODO") + } + + // to test the property `lastIntervalEndAt` - 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. + should("test lastIntervalEndAt") { + // uncomment below to test the property + //modelInstance.lastIntervalEndAt shouldBe ("TODO") + } + + // to test the property `lastReportAt` - Timestamp (in epoch format) at which the system's Envoy last submitted a report. + should("test lastReportAt") { + // uncomment below to test the property + //modelInstance.lastReportAt shouldBe ("TODO") + } + + // to test the property `modules` - Total number of modules in the system. + should("test modules") { + // uncomment below to test the property + //modelInstance.modules shouldBe ("TODO") + } + + // to test the property `operationalAt` - Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. + should("test operationalAt") { + // uncomment below to test the property + //modelInstance.operationalAt shouldBe ("TODO") + } + + // to test the property `sizeW` - System size in watts. + should("test sizeW") { + // uncomment below to test the property + //modelInstance.sizeW shouldBe ("TODO") + } + + // to test the property `source` - Source of energy measurement. + should("test source") { + // uncomment below to test the property + //modelInstance.source shouldBe ("TODO") + } + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `summaryDate` - Summary date. + should("test summaryDate") { + // uncomment below to test the property + //modelInstance.summaryDate shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystems500ResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystems500ResponseTest.kt new file mode 100644 index 00000000..6d1ff0f7 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystems500ResponseTest.kt @@ -0,0 +1,55 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystems500Response +import enlighten.monitoring.models.DataTemporarilyUnavailableError +import enlighten.monitoring.models.InternalServerError + +class GetSystems500ResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystems500Response + //val modelInstance = GetSystems500Response() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + // to test the property `errorCode` - Error code. + should("test errorCode") { + // uncomment below to test the property + //modelInstance.errorCode shouldBe ("TODO") + } + + // to test the property `errorMessages` - Error messages. + should("test errorMessages") { + // uncomment below to test the property + //modelInstance.errorMessages shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemsResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemsResponseTest.kt new file mode 100644 index 00000000..fce52c0d --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/GetSystemsResponseTest.kt @@ -0,0 +1,66 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.GetSystemsResponse +import enlighten.monitoring.models.SystemDetails + +class GetSystemsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of GetSystemsResponse + //val modelInstance = GetSystemsResponse() + + // to test the property `propertySize` - Maximum number of records shown per page. Default=10, Min=1, Max=100. + should("test propertySize") { + // uncomment below to test the property + //modelInstance.propertySize shouldBe ("TODO") + } + + // to test the property `count` - Total number of systems actually returned for the current page. + should("test count") { + // uncomment below to test the property + //modelInstance.count shouldBe ("TODO") + } + + // to test the property `total` - Total number of systems. + should("test total") { + // uncomment below to test the property + //modelInstance.total shouldBe ("TODO") + } + + // to test the property `currentPage` - Number of the current page fetched. + should("test currentPage") { + // uncomment below to test the property + //modelInstance.currentPage shouldBe ("TODO") + } + + // to test the property `items` - Named key of the list data. In this endpoint, it is systems. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `systems` - List of systems. + should("test systems") { + // uncomment below to test the property + //modelInstance.systems shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/InternalServerErrorTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/InternalServerErrorTest.kt new file mode 100644 index 00000000..5d1afb35 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/InternalServerErrorTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.InternalServerError + +class InternalServerErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of InternalServerError + //val modelInstance = InternalServerError() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInnerTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInnerTest.kt new file mode 100644 index 00000000..204551ff --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsLoadControlDataInnerTest.kt @@ -0,0 +1,83 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.LoadControlSettingsLoadControlDataInner + +class LoadControlSettingsLoadControlDataInnerTest : ShouldSpec() { + init { + // uncomment below to create an instance of LoadControlSettingsLoadControlDataInner + //val modelInstance = LoadControlSettingsLoadControlDataInner() + + // to test the property `name` - Name of the dry contact. + should("test name") { + // uncomment below to test the property + //modelInstance.name shouldBe ("TODO") + } + + // to test the property `loadName` - Name of the load. + should("test loadName") { + // uncomment below to test the property + //modelInstance.loadName shouldBe ("TODO") + } + + // to test the property `ownerCanOverride` - HOs ability to override the load control settings. + should("test ownerCanOverride") { + // uncomment below to test the property + //modelInstance.ownerCanOverride shouldBe ("TODO") + } + + // to test the property `mode` - Current load control configuration. + should("test mode") { + // uncomment below to test the property + //modelInstance.mode shouldBe ("TODO") + } + + // to test the property `socLow` - Applicable for advanced mode. Load will be powered off when the battery soc reaches this level. + should("test socLow") { + // uncomment below to test the property + //modelInstance.socLow shouldBe ("TODO") + } + + // to test the property `socHigh` - Applicable for advanced mode. Load powers off when battery reaches soc_low. The load will be powered on when the battery soc reaches soc_high. + should("test socHigh") { + // uncomment below to test the property + //modelInstance.socHigh shouldBe ("TODO") + } + + // to test the property `status` - Available values are enabled, disabled. + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `essentialStartTime` - Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. + should("test essentialStartTime") { + // uncomment below to test the property + //modelInstance.essentialStartTime shouldBe ("TODO") + } + + // to test the property `essentialEndTime` - Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. + should("test essentialEndTime") { + // uncomment below to test the property + //modelInstance.essentialEndTime shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsTest.kt new file mode 100644 index 00000000..04c9fd4d --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/LoadControlSettingsTest.kt @@ -0,0 +1,42 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.LoadControlSettings +import enlighten.monitoring.models.LoadControlSettingsLoadControlDataInner + +class LoadControlSettingsTest : ShouldSpec() { + init { + // uncomment below to create an instance of LoadControlSettings + //val modelInstance = LoadControlSettings() + + // to test the property `systemId` + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `loadControlData` - Load control data for all the configured loads. + should("test loadControlData") { + // uncomment below to test the property + //modelInstance.loadControlData shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/MetaTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/MetaTest.kt new file mode 100644 index 00000000..8e2e3cdd --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/MetaTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.Meta +import enlighten.monitoring.models.SystemStatusEnum + +class MetaTest : ShouldSpec() { + init { + // uncomment below to create an instance of Meta + //val modelInstance = Meta() + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `lastReportAt` - Timestamp (in epoch format) at which the system's Envoy last submitted a report. + should("test lastReportAt") { + // uncomment below to test the property + //modelInstance.lastReportAt shouldBe ("TODO") + } + + // to test the property `lastEnergyAt` - Timestamp (in epoch format) at which the system's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned. + should("test lastEnergyAt") { + // uncomment below to test the property + //modelInstance.lastEnergyAt shouldBe ("TODO") + } + + // to test the property `operationalAt` - Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. + should("test operationalAt") { + // uncomment below to test the property + //modelInstance.operationalAt shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/MethodNotAllowedErrorTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/MethodNotAllowedErrorTest.kt new file mode 100644 index 00000000..e8404100 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/MethodNotAllowedErrorTest.kt @@ -0,0 +1,41 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.MethodNotAllowedError + +class MethodNotAllowedErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of MethodNotAllowedError + //val modelInstance = MethodNotAllowedError() + + // to test the property `reason` + should("test reason") { + // uncomment below to test the property + //modelInstance.reason shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/NotImplementedErrorTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/NotImplementedErrorTest.kt new file mode 100644 index 00000000..d100bb32 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/NotImplementedErrorTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.NotImplementedError + +class NotImplementedErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of NotImplementedError + //val modelInstance = NotImplementedError() + + // to test the property `message` - Error type. + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + // to test the property `details` - Error details. + should("test details") { + // uncomment below to test the property + //modelInstance.details shouldBe ("TODO") + } + + // to test the property `code` - Error code. + should("test code") { + // uncomment below to test the property + //modelInstance.code shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponseTest.kt new file mode 100644 index 00000000..a916d548 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/RetrieveSystemIdResponseTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.RetrieveSystemIdResponse + +class RetrieveSystemIdResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of RetrieveSystemIdResponse + //val modelInstance = RetrieveSystemIdResponse() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystemTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystemTest.kt new file mode 100644 index 00000000..92e4dd20 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestSystemTest.kt @@ -0,0 +1,62 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SearchSystemsRequestSystem +import enlighten.monitoring.models.SystemConnectionTypeEnum +import enlighten.monitoring.models.SystemPublicNameEnum +import enlighten.monitoring.models.SystemStatusEnum + +class SearchSystemsRequestSystemTest : ShouldSpec() { + init { + // uncomment below to create an instance of SearchSystemsRequestSystem + //val modelInstance = SearchSystemsRequestSystem() + + // to test the property `ids` - Filter system by particular Ids. + should("test ids") { + // uncomment below to test the property + //modelInstance.ids shouldBe ("TODO") + } + + // to test the property `name` - Search by name of the system. + should("test name") { + // uncomment below to test the property + //modelInstance.name shouldBe ("TODO") + } + + // to test the property `publicName` + should("test publicName") { + // uncomment below to test the property + //modelInstance.publicName shouldBe ("TODO") + } + + // to test the property `statuses` - Search by System status. + should("test statuses") { + // uncomment below to test the property + //modelInstance.statuses shouldBe ("TODO") + } + + // to test the property `connectionType` + should("test connectionType") { + // uncomment below to test the property + //modelInstance.connectionType shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestTest.kt new file mode 100644 index 00000000..1a31ca24 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsRequestTest.kt @@ -0,0 +1,43 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SearchSystemsRequest +import enlighten.monitoring.models.SearchSystemsRequestSystem +import enlighten.monitoring.models.SystemSortByEnum + +class SearchSystemsRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of SearchSystemsRequest + //val modelInstance = SearchSystemsRequest() + + // to test the property `system` + should("test system") { + // uncomment below to test the property + //modelInstance.system shouldBe ("TODO") + } + + // to test the property `sortBy` + should("test sortBy") { + // uncomment below to test the property + //modelInstance.sortBy shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsResponseTest.kt new file mode 100644 index 00000000..de237b70 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SearchSystemsResponseTest.kt @@ -0,0 +1,66 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SearchSystemsResponse +import enlighten.monitoring.models.SystemDetails + +class SearchSystemsResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of SearchSystemsResponse + //val modelInstance = SearchSystemsResponse() + + // to test the property `total` - Total number of systems available. + should("test total") { + // uncomment below to test the property + //modelInstance.total shouldBe ("TODO") + } + + // to test the property `currentPage` - Current page of the systems result. Default is 1. + should("test currentPage") { + // uncomment below to test the property + //modelInstance.currentPage shouldBe ("TODO") + } + + // to test the property `propertySize` - Max number of records from API per page is 100. Default is 10. + should("test propertySize") { + // uncomment below to test the property + //modelInstance.propertySize shouldBe ("TODO") + } + + // to test the property `count` - Total number of systems actually returned for the current page. + should("test count") { + // uncomment below to test the property + //modelInstance.count shouldBe ("TODO") + } + + // to test the property `items` - Named key of the list data. In this endpoint, it is systems. + should("test items") { + // uncomment below to test the property + //modelInstance.items shouldBe ("TODO") + } + + // to test the property `systems` - List of filtered systems. + should("test systems") { + // uncomment below to test the property + //modelInstance.systems shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StormGuardSettingsTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StormGuardSettingsTest.kt new file mode 100644 index 00000000..9a760485 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StormGuardSettingsTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.StormGuardSettings + +class StormGuardSettingsTest : ShouldSpec() { + init { + // uncomment below to create an instance of StormGuardSettings + //val modelInstance = StormGuardSettings() + + // to test the property `systemId` + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `stormGuardStatus` - Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the locality. + should("test stormGuardStatus") { + // uncomment below to test the property + //modelInstance.stormGuardStatus shouldBe ("TODO") + } + + // to test the property `stormAlert` - True if severe weather condition alert is issued in the locality. + should("test stormAlert") { + // uncomment below to test the property + //modelInstance.stormAlert shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorErrorTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorErrorTest.kt new file mode 100644 index 00000000..ef8f8b81 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorErrorTest.kt @@ -0,0 +1,53 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.StreamSystemLiveDataErrorError + +class StreamSystemLiveDataErrorErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of StreamSystemLiveDataErrorError + //val modelInstance = StreamSystemLiveDataErrorError() + + // to test the property `code` + should("test code") { + // uncomment below to test the property + //modelInstance.code shouldBe ("TODO") + } + + // to test the property `details` + should("test details") { + // uncomment below to test the property + //modelInstance.details shouldBe ("TODO") + } + + // to test the property `message` + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorTest.kt new file mode 100644 index 00000000..28f5e92f --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataErrorTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.StreamSystemLiveDataError +import enlighten.monitoring.models.StreamSystemLiveDataErrorError + +class StreamSystemLiveDataErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of StreamSystemLiveDataError + //val modelInstance = StreamSystemLiveDataError() + + // to test the property `error` + should("test error") { + // uncomment below to test the property + //modelInstance.error shouldBe ("TODO") + } + + // to test the property `timestampEpoch` - Timestamp in epoch format. + should("test timestampEpoch") { + // uncomment below to test the property + //modelInstance.timestampEpoch shouldBe ("TODO") + } + + // to test the property `timestampUtc` - Timestamp in UTC format. + should("test timestampUtc") { + // uncomment below to test the property + //modelInstance.timestampUtc shouldBe ("TODO") + } + + // to test the property `type` + should("test type") { + // uncomment below to test the property + //modelInstance.type shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataDataTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataDataTest.kt new file mode 100644 index 00000000..80b7867e --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataDataTest.kt @@ -0,0 +1,89 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.StreamSystemLiveDataResponseDataData + +class StreamSystemLiveDataResponseDataDataTest : ShouldSpec() { + init { + // uncomment below to create an instance of StreamSystemLiveDataResponseDataData + //val modelInstance = StreamSystemLiveDataResponseDataData() + + // to test the property `batteryMode` - Battery mode of the site. Available values are Savings Mode, Full Backup, and Self-consumption. + should("test batteryMode") { + // uncomment below to test the property + //modelInstance.batteryMode shouldBe ("TODO") + } + + // to test the property `batteryPower` - Battery power in watts; Power will be positive in case of discharge and negative in case of charge. + should("test batteryPower") { + // uncomment below to test the property + //modelInstance.batteryPower shouldBe ("TODO") + } + + // to test the property `batterySoc` - Battery soc in percentage. + should("test batterySoc") { + // uncomment below to test the property + //modelInstance.batterySoc shouldBe ("TODO") + } + + // to test the property `consumptionPower` - Consumption power in watts. + should("test consumptionPower") { + // uncomment below to test the property + //modelInstance.consumptionPower shouldBe ("TODO") + } + + // to test the property `envoySerialNumber` + should("test envoySerialNumber") { + // uncomment below to test the property + //modelInstance.envoySerialNumber shouldBe ("TODO") + } + + // to test the property `generatorPower` - Generator power in watts. + should("test generatorPower") { + // uncomment below to test the property + //modelInstance.generatorPower shouldBe ("TODO") + } + + // to test the property `gridPower` - Grid power in watts; Power will be negative in case of export and positive in case of import. + should("test gridPower") { + // uncomment below to test the property + //modelInstance.gridPower shouldBe ("TODO") + } + + // to test the property `gridStatus` - Grid state of the site. Available values are On Grid, Off Grid, Unknown. + should("test gridStatus") { + // uncomment below to test the property + //modelInstance.gridStatus shouldBe ("TODO") + } + + // to test the property `pvPower` - PV power in watts. + should("test pvPower") { + // uncomment below to test the property + //modelInstance.pvPower shouldBe ("TODO") + } + + // to test the property `systemId` - The unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataTest.kt new file mode 100644 index 00000000..371222b6 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseDataTest.kt @@ -0,0 +1,54 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.StreamSystemLiveDataResponseData +import enlighten.monitoring.models.StreamSystemLiveDataResponseDataData + +class StreamSystemLiveDataResponseDataTest : ShouldSpec() { + init { + // uncomment below to create an instance of StreamSystemLiveDataResponseData + //val modelInstance = StreamSystemLiveDataResponseData() + + // to test the property ``data`` + should("test `data`") { + // uncomment below to test the property + //modelInstance.`data` shouldBe ("TODO") + } + + // to test the property `timestampEpoch` - Timestamp in epoch format. + should("test timestampEpoch") { + // uncomment below to test the property + //modelInstance.timestampEpoch shouldBe ("TODO") + } + + // to test the property `timestampUtc` - Timestamp in UTC format. + should("test timestampUtc") { + // uncomment below to test the property + //modelInstance.timestampUtc shouldBe ("TODO") + } + + // to test the property `type` - response + should("test type") { + // uncomment below to test the property + //modelInstance.type shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseTest.kt new file mode 100644 index 00000000..aa097985 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/StreamSystemLiveDataResponseTest.kt @@ -0,0 +1,36 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.StreamSystemLiveDataResponse +import enlighten.monitoring.models.StreamSystemLiveDataResponseData + +class StreamSystemLiveDataResponseTest : ShouldSpec() { + init { + // uncomment below to create an instance of StreamSystemLiveDataResponse + //val modelInstance = StreamSystemLiveDataResponse() + + // to test the property ``data`` + should("test `data`") { + // uncomment below to test the property + //modelInstance.`data` shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnumTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnumTest.kt new file mode 100644 index 00000000..66eb0e82 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemAttachmentTypeEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SystemAttachmentTypeEnum + +class SystemAttachmentTypeEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemAttachmentTypeEnum + //val modelInstance = SystemAttachmentTypeEnum() + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnumTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnumTest.kt new file mode 100644 index 00000000..ab8cec04 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemConnectionTypeEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SystemConnectionTypeEnum + +class SystemConnectionTypeEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemConnectionTypeEnum + //val modelInstance = SystemConnectionTypeEnum() + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemDetailsAddressTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemDetailsAddressTest.kt new file mode 100644 index 00000000..3272c9c6 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemDetailsAddressTest.kt @@ -0,0 +1,53 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SystemDetailsAddress + +class SystemDetailsAddressTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemDetailsAddress + //val modelInstance = SystemDetailsAddress() + + // to test the property `city` - City in which the system is located. + should("test city") { + // uncomment below to test the property + //modelInstance.city shouldBe ("TODO") + } + + // to test the property `state` - State in which the system is located. + should("test state") { + // uncomment below to test the property + //modelInstance.state shouldBe ("TODO") + } + + // to test the property `country` - Country in which the system is located. + should("test country") { + // uncomment below to test the property + //modelInstance.country shouldBe ("TODO") + } + + // to test the property `postalCode` - Postal code of the system's location. + should("test postalCode") { + // uncomment below to test the property + //modelInstance.postalCode shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemDetailsTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemDetailsTest.kt new file mode 100644 index 00000000..18e5ce06 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemDetailsTest.kt @@ -0,0 +1,135 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SystemDetails +import enlighten.monitoring.models.SystemAttachmentTypeEnum +import enlighten.monitoring.models.SystemConnectionTypeEnum +import enlighten.monitoring.models.SystemDetailsAddress +import enlighten.monitoring.models.SystemStatusEnum + +class SystemDetailsTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemDetails + //val modelInstance = SystemDetails() + + // to test the property `systemId` - Unique numeric ID of the system. + should("test systemId") { + // uncomment below to test the property + //modelInstance.systemId shouldBe ("TODO") + } + + // to test the property `name` - Name of the system. + should("test name") { + // uncomment below to test the property + //modelInstance.name shouldBe ("TODO") + } + + // to test the property `publicName` - Name displayed on the public system page. Available values are All, Residential System, Commercial etc. Default='Residential System'. Only for systems that allow public access. + should("test publicName") { + // uncomment below to test the property + //modelInstance.publicName shouldBe ("TODO") + } + + // to test the property `timezone` - Timezone to which the system belongs. + should("test timezone") { + // uncomment below to test the property + //modelInstance.timezone shouldBe ("TODO") + } + + // to test the property `address` + should("test address") { + // uncomment below to test the property + //modelInstance.address shouldBe ("TODO") + } + + // to test the property `connectionType` + should("test connectionType") { + // uncomment below to test the property + //modelInstance.connectionType shouldBe ("TODO") + } + + // to test the property `energyLifetime` - Energy generated by the system during its lifetime in Wh. It is returned only if the count is less than or equal to 100. + should("test energyLifetime") { + // uncomment below to test the property + //modelInstance.energyLifetime shouldBe ("TODO") + } + + // to test the property `energyToday` - Energy generated by the system today in Wh. It is returned only if the count is less than or equal to 100. + should("test energyToday") { + // uncomment below to test the property + //modelInstance.energyToday shouldBe ("TODO") + } + + // to test the property `systemSize` - Size of the system. It is returned only if the count is less than or equal to 100. + should("test systemSize") { + // uncomment below to test the property + //modelInstance.systemSize shouldBe ("TODO") + } + + // to test the property `status` + should("test status") { + // uncomment below to test the property + //modelInstance.status shouldBe ("TODO") + } + + // to test the property `lastReportAt` - Timestamp (in epoch format) at which the system's Envoy last submitted a report. + should("test lastReportAt") { + // uncomment below to test the property + //modelInstance.lastReportAt shouldBe ("TODO") + } + + // to test the property `lastEnergyAt` - Timestamp (in epoch format) at which the system's produced energy was last reported. Even if the last produced energy is 0, its timestamp will be returned. + should("test lastEnergyAt") { + // uncomment below to test the property + //modelInstance.lastEnergyAt shouldBe ("TODO") + } + + // to test the property `operationalAt` - Timestamp (in epoch format) at which this system became operational. Corresponds to the system's interconnect time, if one is specified. Otherwise, it is the system's first reported interval end time. + should("test operationalAt") { + // uncomment below to test the property + //modelInstance.operationalAt shouldBe ("TODO") + } + + // to test the property `attachmentType` + should("test attachmentType") { + // uncomment below to test the property + //modelInstance.attachmentType shouldBe ("TODO") + } + + // to test the property `interconnectDate` - Date on which the system was approved to connect to the grid. + should("test interconnectDate") { + // uncomment below to test the property + //modelInstance.interconnectDate shouldBe ("TODO") + } + + // to test the property `reference` - If the calling user belongs to a company and that company has provided its own identifier for a system, that ID is included here. Otherwise, this attribute is not returned. + should("test reference") { + // uncomment below to test the property + //modelInstance.reference shouldBe ("TODO") + } + + // to test the property `otherReferences` - If any other companies have provided their own identifiers for a system, those identifiers are included here. Otherwise, this attribute is not returned. + should("test otherReferences") { + // uncomment below to test the property + //modelInstance.otherReferences shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnumTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnumTest.kt new file mode 100644 index 00000000..f298072c --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemEnergyLifetimeProductionEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SystemEnergyLifetimeProductionEnum + +class SystemEnergyLifetimeProductionEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemEnergyLifetimeProductionEnum + //val modelInstance = SystemEnergyLifetimeProductionEnum() + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemPublicNameEnumTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemPublicNameEnumTest.kt new file mode 100644 index 00000000..002457fa --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemPublicNameEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SystemPublicNameEnum + +class SystemPublicNameEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemPublicNameEnum + //val modelInstance = SystemPublicNameEnum() + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemSortByEnumTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemSortByEnumTest.kt new file mode 100644 index 00000000..5e3ece31 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemSortByEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SystemSortByEnum + +class SystemSortByEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemSortByEnum + //val modelInstance = SystemSortByEnum() + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemStatusEnumTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemStatusEnumTest.kt new file mode 100644 index 00000000..82868882 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/SystemStatusEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.SystemStatusEnum + +class SystemStatusEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of SystemStatusEnum + //val modelInstance = SystemStatusEnum() + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/TelemetryGranularityEnumTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/TelemetryGranularityEnumTest.kt new file mode 100644 index 00000000..f7778f6f --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/TelemetryGranularityEnumTest.kt @@ -0,0 +1,29 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.TelemetryGranularityEnum + +class TelemetryGranularityEnumTest : ShouldSpec() { + init { + // uncomment below to create an instance of TelemetryGranularityEnum + //val modelInstance = TelemetryGranularityEnum() + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/TooManyRequestsErrorTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/TooManyRequestsErrorTest.kt new file mode 100644 index 00000000..c8d3475b --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/TooManyRequestsErrorTest.kt @@ -0,0 +1,71 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.TooManyRequestsError + +class TooManyRequestsErrorTest : ShouldSpec() { + init { + // uncomment below to create an instance of TooManyRequestsError + //val modelInstance = TooManyRequestsError() + + // to test the property `message` - Error type. + should("test message") { + // uncomment below to test the property + //modelInstance.message shouldBe ("TODO") + } + + // to test the property `details` - Error details. + should("test details") { + // uncomment below to test the property + //modelInstance.details shouldBe ("TODO") + } + + // to test the property `code` - Error code. + should("test code") { + // uncomment below to test the property + //modelInstance.code shouldBe ("TODO") + } + + // to test the property `period` - Quota exceeded for minute/month. + should("test period") { + // uncomment below to test the property + //modelInstance.period shouldBe ("TODO") + } + + // to test the property `periodStart` - Starting period timestamp. + should("test periodStart") { + // uncomment below to test the property + //modelInstance.periodStart shouldBe ("TODO") + } + + // to test the property `periodEnd` - Ending period timestamp. + should("test periodEnd") { + // uncomment below to test the property + //modelInstance.periodEnd shouldBe ("TODO") + } + + // to test the property `limit` - Limit count for the period. + should("test limit") { + // uncomment below to test the property + //modelInstance.limit shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequestTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequestTest.kt new file mode 100644 index 00000000..8b7634ef --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemBatterySettingsRequestTest.kt @@ -0,0 +1,47 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.UpdateSystemBatterySettingsRequest + +class UpdateSystemBatterySettingsRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateSystemBatterySettingsRequest + //val modelInstance = UpdateSystemBatterySettingsRequest() + + // to test the property `batteryMode` - To update battery mode of the system (case sensitive). Available values are Savings Mode, Self-consumption, Full Backup. + should("test batteryMode") { + // uncomment below to test the property + //modelInstance.batteryMode shouldBe ("TODO") + } + + // to test the property `reserveSoc` - Reserve soc for the current mode. Cannot be less than vls. + should("test reserveSoc") { + // uncomment below to test the property + //modelInstance.reserveSoc shouldBe ("TODO") + } + + // to test the property `energyIndependence` - Energy independence after peak hours \"enabled\"/\"disabled\". Enabled: Battery will discharge to save money during peak hours when electricity rates are high. Once that is done, energy independence is prioritized. This will increase the energy self-sufficiency until the reserve soc is hit. Battery will charge from solar in the morning to get ready for the next period. Disabled: Battery will discharge only during peak hours when electricity rates are high. During other times, battery will be idle or will charge from solar in the morning to get ready for the next period. + should("test energyIndependence") { + // uncomment below to test the property + //modelInstance.energyIndependence shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequestTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequestTest.kt new file mode 100644 index 00000000..d5861329 --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemLoadControlSettingsRequestTest.kt @@ -0,0 +1,65 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.UpdateSystemLoadControlSettingsRequest + +class UpdateSystemLoadControlSettingsRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateSystemLoadControlSettingsRequest + //val modelInstance = UpdateSystemLoadControlSettingsRequest() + + // to test the property `name` - Name of the dry contact. Name cannot be changed. It is only used to identify the dry contact that needs to be updated. + should("test name") { + // uncomment below to test the property + //modelInstance.name shouldBe ("TODO") + } + + // to test the property `loadName` - Load Name of the load. Load Name cannot be changed. It is only used to identify the dry contact that needs to be updated. + should("test loadName") { + // uncomment below to test the property + //modelInstance.loadName shouldBe ("TODO") + } + + // to test the property `mode` - Mode. Available values are \"Scheduled\", \"Basic\", \"Advanced_BatteryPowered\", \"Manual_always_not_powered\", \"Manual_always_powered\", \"Advanced_GeneratorPowered\". + should("test mode") { + // uncomment below to test the property + //modelInstance.mode shouldBe ("TODO") + } + + // to test the property `socLow` - Applicable for advanced mode. Load will be powered off when the battery soc reaches this level. It can be between 10 to 90. + should("test socLow") { + // uncomment below to test the property + //modelInstance.socLow shouldBe ("TODO") + } + + // to test the property `essentialStartTime` - Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. + should("test essentialStartTime") { + // uncomment below to test the property + //modelInstance.essentialStartTime shouldBe ("TODO") + } + + // to test the property `essentialEndTime` - Applicable for scheduled mode. Time in seconds. Load will powered on between essential_start_time and essential_end_time. + should("test essentialEndTime") { + // uncomment below to test the property + //modelInstance.essentialEndTime shouldBe ("TODO") + } + + } +} diff --git a/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequestTest.kt b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequestTest.kt new file mode 100644 index 00000000..41b87d5e --- /dev/null +++ b/kotlin/monitoring/src/test/kotlin/enlighten/monitoring/models/UpdateSystemStormGuardSettingsRequestTest.kt @@ -0,0 +1,35 @@ +/** + * + * 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.monitoring.models + +import io.kotlintest.shouldBe +import io.kotlintest.specs.ShouldSpec + +import enlighten.monitoring.models.UpdateSystemStormGuardSettingsRequest + +class UpdateSystemStormGuardSettingsRequestTest : ShouldSpec() { + init { + // uncomment below to create an instance of UpdateSystemStormGuardSettingsRequest + //val modelInstance = UpdateSystemStormGuardSettingsRequest() + + // to test the property `stormGuardStatus` - Overrides your battery profile to full backup mode when a severe weather condition alert is issued in the locality. Available values are enabled, disabled. + should("test stormGuardStatus") { + // uncomment below to test the property + //modelInstance.stormGuardStatus shouldBe ("TODO") + } + + } +}