-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from efirestone/firestone/get-config-entries-c…
…ommand Add support for the config_entries/get command
- Loading branch information
Showing
5 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/commonMain/kotlin/com/codellyrandom/hassle/values/ConfigEntry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.codellyrandom.hassle.values | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ConfigEntry( | ||
@SerialName("entry_id") | ||
val entryId: ConfigEntryId, | ||
val domain: Domain, | ||
val title: String, | ||
val source: Source, | ||
val state: State, | ||
@SerialName("supports_options") | ||
val supportsOptions: Boolean, | ||
@SerialName("supports_remove_device") | ||
val supportsRemoveDevice: Boolean, | ||
@SerialName("supports_unload") | ||
val supportsUnload: Boolean, | ||
@SerialName("disabled_by") | ||
val disabledBy: String? = null, | ||
val reason: String? = null, | ||
) { | ||
@Serializable | ||
enum class Source { | ||
@SerialName("import") | ||
IMPORT, | ||
|
||
@SerialName("onboarding") | ||
ONBOARDING, | ||
|
||
@SerialName("user") | ||
USER, | ||
} | ||
|
||
@Serializable | ||
enum class State { | ||
@SerialName("loaded") | ||
LOADED, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters