diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMapping.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMapping.jinja deleted file mode 100644 index e1d3d6b0eab413..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMapping.jinja +++ /dev/null @@ -1,196 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP 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 - * - * http://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. - */ -package chip.devicecontroller - -class ClusterIDMapping { - {%- for cluster in clientClusters | sort(attribute='code') %} - class {{cluster.name}}: BaseCluster { - {%- if cluster.attributes %} - enum class Attribute(val id: Long) { - {%- for attribute in cluster.attributes | sort(attribute='code') %} - {{attribute.definition.name | upfirst}}({{attribute.definition.code}}L) - {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} - {%- endfor -%}; - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - {%- endif -%} - - {%- if cluster.events %} - enum class Event(val id: Long) { - {%- for event in cluster.events | sort(attribute='code') %} - {{event.name | upfirst}}({{event.code}}L) - {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} - {%- endfor -%}; - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - {%- endif -%} - - {%- if cluster.commands %} - enum class Command(val id: Long) { - {%- for command in cluster.commands | sort(attribute='code') %} - {{command.name | upfirst}}({{command.code}}L) - {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} - {%- endfor -%}; - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - {%- endif -%} - - {%- for command in cluster.commands | sort(attribute='code') %} - {%- if command.input_param %} - enum class {{command.name | upfirst}}CommandField(val id: Int) { - {%- for field in (cluster.structs | named(command.input_param)).fields %} - {{field.name | upfirst}}({{field.code}}) - {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} - {%- endfor -%}; - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): {{command.name | upfirst}}CommandField { - for (field in {{command.name | upfirst}}CommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - {%- endif -%} - {% endfor %} - - override fun getID(): Long { return ID } - - override fun getAttributeName(id: Long): String { - {%- if cluster.attributes %} - return Attribute.value(id).toString() - {%- else %} - throw IllegalArgumentException() - {%- endif %} - } - - override fun getEventName(id: Long): String { - {%- if cluster.events %} - return Event.value(id).toString() - {%- else %} - throw IllegalArgumentException() - {%- endif %} - } - - override fun getCommandName(id: Long): String { - {%- if cluster.commands %} - return Command.value(id).toString() - {%- else %} - throw IllegalArgumentException() - {%- endif %} - } - - override fun getAttributeID(name: String): Long { - {%- if cluster.attributes %} - return Attribute.valueOf(name).id - {%- else %} - throw NoSuchFieldError() - {%- endif %} - } - - override fun getEventID(name: String): Long { - {%- if cluster.events %} - return Event.valueOf(name).id - {%- else %} - throw NoSuchFieldError() - {%- endif %} - } - - override fun getCommandID(name: String): Long { - {%- if cluster.commands %} - return Command.valueOf(name).id - {%- else %} - throw NoSuchFieldError() - {%- endif %} - } - - companion object { - const val ID = {{cluster.code}}L - } - } - {%- endfor -%} - - companion object { - fun getCluster(clusterId: Long): BaseCluster? { - {%- for cluster in clientClusters | sort(attribute='code') %} - if (clusterId == {{cluster.name}}.ID) { - return {{cluster.name}}() - } - {%- endfor %} - return null - } - } - - interface BaseCluster { - fun getID(): Long - - @Throws(NoSuchFieldError::class) - fun getAttributeName(id: Long): String - - @Throws(NoSuchFieldError::class) - fun getEventName(id: Long): String - - @Throws(NoSuchFieldError::class) - fun getCommandName(id: Long): String - - @Throws(IllegalArgumentException::class) - fun getAttributeID(name: String): Long - - @Throws(IllegalArgumentException::class) - fun getEventID(name: String): Long - - @Throws(IllegalArgumentException::class) - fun getCommandID(name: String): Long - } -} \ No newline at end of file diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMappingClass.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMappingClass.jinja new file mode 100644 index 00000000000000..a25e41e8a5ef41 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/ClusterIDMappingClass.jinja @@ -0,0 +1,196 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object {{cluster.name}}: BaseCluster() { + const val ID = {{cluster.code}}L + {%- if cluster.attributes %} + sealed class Attribute(val id: Long, val name: String) { + {%- for attribute in cluster.attributes | sort(attribute='code') %} + object {{attribute.definition.name | upfirst}} : Attribute({{attribute.definition.code}}L, "{{attribute.definition.name | upfirst}}") + {%- endfor %} + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + {%- endif -%} + + {%- if cluster.events %} + sealed class Event(val id: Long, val name: String) { + {%- for event in cluster.events | sort(attribute='code') %} + object {{event.name | upfirst}} : Event({{event.code}}L, "{{event.name | upfirst}}") + {%- endfor %} + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + {%- endif -%} + + {%- if cluster.commands %} + sealed class Command(val id: Long, val name: String) { + {%- for command in cluster.commands | sort(attribute='code') %} + object {{command.name | upfirst}} : Command({{command.code}}L, "{{command.name | upfirst}}") + {%- endfor %} + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + {%- endif -%} + + {%- for command in cluster.commands | sort(attribute='code') %} + {%- if command.input_param %} + sealed class {{command.name | upfirst}}CommandField(val id: Int, val name: String) { + {%- for field in (cluster.structs | named(command.input_param)).fields %} + object {{field.name | upfirst}} : {{command.name | upfirst}}CommandField({{field.code}}, "{{field.name | upfirst}}") + {%- endfor %} + + companion object { + fun values(): List<{{command.name | upfirst}}CommandField> { + return {{command.name | upfirst}}CommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): {{command.name | upfirst}}CommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): {{command.name | upfirst}}CommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + {%- endif -%} + {% endfor %} + + override fun getID(): Long { return ID } + + {%- if cluster.attributes %} + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + {%- endif %} + + {%- if cluster.events %} + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + {%- endif %} + + {%- if cluster.commands %} + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + {%- endif %} + + {%- if cluster.attributes %} + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + {%- endif %} + + {%- if cluster.events %} + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + {%- endif %} + + {%- if cluster.commands %} + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } + {%- endif %} +} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/Clusters.jinja b/scripts/py_matter_idl/matter_idl/generators/java/Clusters.jinja new file mode 100644 index 00000000000000..ef9c9358a4b03d --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/Clusters.jinja @@ -0,0 +1,28 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Clusters { + fun getCluster(clusterId: Long): BaseCluster? { + {%- for cluster in clientClusters | sort(attribute='code') %} + if (clusterId == {{cluster.name}}.ID) { + return {{cluster.name}} + } + {%- endfor %} + return null + } +} \ No newline at end of file diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ClustersFiles.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ClustersFiles.jinja new file mode 100644 index 00000000000000..8322ccba117c11 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/ClustersFiles.jinja @@ -0,0 +1,8 @@ +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +cluster_sources = [ +{%- for cluster in clientClusters | sort(attribute='code') %} + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/{{cluster.name}}.kt", +{%- endfor %} +] diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index d7211db58fc09e..9302bf2f98f183 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -782,14 +782,38 @@ def internal_render_all(self): ) self.internal_render_one_output( - template_path="ClusterIDMapping.jinja", - output_file_name="java/chip/devicecontroller/ClusterIDMapping.kt", + template_path="Clusters.jinja", + output_file_name="java/chip/devicecontroller/ClusterIDMapping/Clusters.kt", vars={ 'idl': self.idl, 'clientClusters': clientClusters, } ) + self.internal_render_one_output( + template_path="ClustersFiles.jinja", + output_file_name="java/chip/devicecontroller/ClusterIDMapping/files.gni", + vars={ + 'idl': self.idl, + 'clientClusters': clientClusters, + } + ) + + for cluster in self.idl.clusters: + if cluster.side != ClusterSide.CLIENT: + continue + + output_name = "java/chip/devicecontroller/ClusterIDMapping/{cluster_name}.kt" + self.internal_render_one_output( + template_path="ClusterIDMappingClass.jinja", + output_file_name=output_name.format( + cluster_name=cluster.name), + vars={ + 'cluster': cluster, + 'typeLookup': TypeLookupContext(self.idl, cluster), + } + ) + # Every cluster has its own impl, to avoid # very large compilations (running out of RAM) for cluster in self.idl.clusters: diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 36ae054818b985..a67c94e61c8ceb 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -353,13 +353,19 @@ group("unit_tests") { } kotlin_library("chipclusterID") { + import( + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/files.gni") + output_name = "CHIPClusterID.jar" sources = [ - "generated/java/chip/devicecontroller/ClusterIDMapping.kt", + "generated/java/chip/devicecontroller/ClusterIDMapping/Clusters.kt", "src/chip/devicecontroller/ChipIdLookup.kt", + "src/chip/devicecontroller/ClusterIDMapping/BaseCluster.kt", ] + sources += cluster_sources + kotlinc_flags = [ "-Xlint:deprecation" ] } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.kt deleted file mode 100644 index f0a8b2394160c3..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.kt +++ /dev/null @@ -1,11020 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP 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 - * - * http://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. - */ -package chip.devicecontroller - -class ClusterIDMapping { - class Identify : BaseCluster { - enum class Attribute(val id: Long) { - IdentifyTime(0L), - IdentifyType(1L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Identify(0L), - TriggerEffect(64L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class IdentifyCommandField(val id: Int) { - IdentifyTime(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): IdentifyCommandField { - for (field in IdentifyCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TriggerEffectCommandField(val id: Int) { - EffectIdentifier(0), - EffectVariant(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TriggerEffectCommandField { - for (field in TriggerEffectCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 3L - } - } - - class Groups : BaseCluster { - enum class Attribute(val id: Long) { - NameSupport(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - AddGroup(0L), - ViewGroup(1L), - GetGroupMembership(2L), - RemoveGroup(3L), - RemoveAllGroups(4L), - AddGroupIfIdentifying(5L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class AddGroupCommandField(val id: Int) { - GroupID(0), - GroupName(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AddGroupCommandField { - for (field in AddGroupCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ViewGroupCommandField(val id: Int) { - GroupID(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ViewGroupCommandField { - for (field in ViewGroupCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetGroupMembershipCommandField(val id: Int) { - GroupList(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetGroupMembershipCommandField { - for (field in GetGroupMembershipCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class RemoveGroupCommandField(val id: Int) { - GroupID(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RemoveGroupCommandField { - for (field in RemoveGroupCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class AddGroupIfIdentifyingCommandField(val id: Int) { - GroupID(0), - GroupName(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AddGroupIfIdentifyingCommandField { - for (field in AddGroupIfIdentifyingCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 4L - } - } - - class Scenes : BaseCluster { - enum class Attribute(val id: Long) { - SceneCount(0L), - CurrentScene(1L), - CurrentGroup(2L), - SceneValid(3L), - NameSupport(4L), - LastConfiguredBy(5L), - SceneTableSize(6L), - RemainingCapacity(7L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - AddScene(0L), - ViewScene(1L), - RemoveScene(2L), - RemoveAllScenes(3L), - StoreScene(4L), - RecallScene(5L), - GetSceneMembership(6L), - EnhancedAddScene(64L), - EnhancedViewScene(65L), - CopyScene(66L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class AddSceneCommandField(val id: Int) { - GroupID(0), - SceneID(1), - TransitionTime(2), - SceneName(3), - ExtensionFieldSets(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AddSceneCommandField { - for (field in AddSceneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ViewSceneCommandField(val id: Int) { - GroupID(0), - SceneID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ViewSceneCommandField { - for (field in ViewSceneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class RemoveSceneCommandField(val id: Int) { - GroupID(0), - SceneID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RemoveSceneCommandField { - for (field in RemoveSceneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class RemoveAllScenesCommandField(val id: Int) { - GroupID(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RemoveAllScenesCommandField { - for (field in RemoveAllScenesCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StoreSceneCommandField(val id: Int) { - GroupID(0), - SceneID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StoreSceneCommandField { - for (field in StoreSceneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class RecallSceneCommandField(val id: Int) { - GroupID(0), - SceneID(1), - TransitionTime(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RecallSceneCommandField { - for (field in RecallSceneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetSceneMembershipCommandField(val id: Int) { - GroupID(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetSceneMembershipCommandField { - for (field in GetSceneMembershipCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class EnhancedAddSceneCommandField(val id: Int) { - GroupID(0), - SceneID(1), - TransitionTime(2), - SceneName(3), - ExtensionFieldSets(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): EnhancedAddSceneCommandField { - for (field in EnhancedAddSceneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class EnhancedViewSceneCommandField(val id: Int) { - GroupID(0), - SceneID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): EnhancedViewSceneCommandField { - for (field in EnhancedViewSceneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class CopySceneCommandField(val id: Int) { - Mode(0), - GroupIdentifierFrom(1), - SceneIdentifierFrom(2), - GroupIdentifierTo(3), - SceneIdentifierTo(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): CopySceneCommandField { - for (field in CopySceneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 5L - } - } - - class OnOff : BaseCluster { - enum class Attribute(val id: Long) { - OnOff(0L), - GlobalSceneControl(16384L), - OnTime(16385L), - OffWaitTime(16386L), - StartUpOnOff(16387L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Off(0L), - On(1L), - Toggle(2L), - OffWithEffect(64L), - OnWithRecallGlobalScene(65L), - OnWithTimedOff(66L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class OffWithEffectCommandField(val id: Int) { - EffectIdentifier(0), - EffectVariant(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): OffWithEffectCommandField { - for (field in OffWithEffectCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class OnWithTimedOffCommandField(val id: Int) { - OnOffControl(0), - OnTime(1), - OffWaitTime(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): OnWithTimedOffCommandField { - for (field in OnWithTimedOffCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 6L - } - } - - class OnOffSwitchConfiguration : BaseCluster { - enum class Attribute(val id: Long) { - SwitchType(0L), - SwitchActions(16L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 7L - } - } - - class LevelControl : BaseCluster { - enum class Attribute(val id: Long) { - CurrentLevel(0L), - RemainingTime(1L), - MinLevel(2L), - MaxLevel(3L), - CurrentFrequency(4L), - MinFrequency(5L), - MaxFrequency(6L), - Options(15L), - OnOffTransitionTime(16L), - OnLevel(17L), - OnTransitionTime(18L), - OffTransitionTime(19L), - DefaultMoveRate(20L), - StartUpCurrentLevel(16384L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - MoveToLevel(0L), - Move(1L), - Step(2L), - Stop(3L), - MoveToLevelWithOnOff(4L), - MoveWithOnOff(5L), - StepWithOnOff(6L), - StopWithOnOff(7L), - MoveToClosestFrequency(8L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveToLevelCommandField(val id: Int) { - Level(0), - TransitionTime(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveToLevelCommandField { - for (field in MoveToLevelCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveCommandField(val id: Int) { - MoveMode(0), - Rate(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveCommandField { - for (field in MoveCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StepCommandField(val id: Int) { - StepMode(0), - StepSize(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StepCommandField { - for (field in StepCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StopCommandField(val id: Int) { - OptionsMask(0), - OptionsOverride(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StopCommandField { - for (field in StopCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveToLevelWithOnOffCommandField(val id: Int) { - Level(0), - TransitionTime(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveToLevelWithOnOffCommandField { - for (field in MoveToLevelWithOnOffCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveWithOnOffCommandField(val id: Int) { - MoveMode(0), - Rate(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveWithOnOffCommandField { - for (field in MoveWithOnOffCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StepWithOnOffCommandField(val id: Int) { - StepMode(0), - StepSize(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StepWithOnOffCommandField { - for (field in StepWithOnOffCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StopWithOnOffCommandField(val id: Int) { - OptionsMask(0), - OptionsOverride(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StopWithOnOffCommandField { - for (field in StopWithOnOffCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveToClosestFrequencyCommandField(val id: Int) { - Frequency(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveToClosestFrequencyCommandField { - for (field in MoveToClosestFrequencyCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 8L - } - } - - class BinaryInputBasic : BaseCluster { - enum class Attribute(val id: Long) { - ActiveText(4L), - Description(28L), - InactiveText(46L), - OutOfService(81L), - Polarity(84L), - PresentValue(85L), - Reliability(103L), - StatusFlags(111L), - ApplicationType(256L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 15L - } - } - - class PulseWidthModulation : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 28L - } - } - - class Descriptor : BaseCluster { - enum class Attribute(val id: Long) { - DeviceTypeList(0L), - ServerList(1L), - ClientList(2L), - PartsList(3L), - TagList(4L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 29L - } - } - - class Binding : BaseCluster { - enum class Attribute(val id: Long) { - Binding(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 30L - } - } - - class AccessControl : BaseCluster { - enum class Attribute(val id: Long) { - Acl(0L), - Extension(1L), - SubjectsPerAccessControlEntry(2L), - TargetsPerAccessControlEntry(3L), - AccessControlEntriesPerFabric(4L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - AccessControlEntryChanged(0L), - AccessControlExtensionChanged(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 31L - } - } - - class Actions : BaseCluster { - enum class Attribute(val id: Long) { - ActionList(0L), - EndpointLists(1L), - SetupURL(2L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - StateChanged(0L), - ActionFailed(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - InstantAction(0L), - InstantActionWithTransition(1L), - StartAction(2L), - StartActionWithDuration(3L), - StopAction(4L), - PauseAction(5L), - PauseActionWithDuration(6L), - ResumeAction(7L), - EnableAction(8L), - EnableActionWithDuration(9L), - DisableAction(10L), - DisableActionWithDuration(11L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class InstantActionCommandField(val id: Int) { - ActionID(0), - InvokeID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): InstantActionCommandField { - for (field in InstantActionCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class InstantActionWithTransitionCommandField(val id: Int) { - ActionID(0), - InvokeID(1), - TransitionTime(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): InstantActionWithTransitionCommandField { - for (field in InstantActionWithTransitionCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StartActionCommandField(val id: Int) { - ActionID(0), - InvokeID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StartActionCommandField { - for (field in StartActionCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StartActionWithDurationCommandField(val id: Int) { - ActionID(0), - InvokeID(1), - Duration(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StartActionWithDurationCommandField { - for (field in StartActionWithDurationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StopActionCommandField(val id: Int) { - ActionID(0), - InvokeID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StopActionCommandField { - for (field in StopActionCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class PauseActionCommandField(val id: Int) { - ActionID(0), - InvokeID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): PauseActionCommandField { - for (field in PauseActionCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class PauseActionWithDurationCommandField(val id: Int) { - ActionID(0), - InvokeID(1), - Duration(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): PauseActionWithDurationCommandField { - for (field in PauseActionWithDurationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ResumeActionCommandField(val id: Int) { - ActionID(0), - InvokeID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ResumeActionCommandField { - for (field in ResumeActionCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class EnableActionCommandField(val id: Int) { - ActionID(0), - InvokeID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): EnableActionCommandField { - for (field in EnableActionCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class EnableActionWithDurationCommandField(val id: Int) { - ActionID(0), - InvokeID(1), - Duration(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): EnableActionWithDurationCommandField { - for (field in EnableActionWithDurationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class DisableActionCommandField(val id: Int) { - ActionID(0), - InvokeID(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): DisableActionCommandField { - for (field in DisableActionCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class DisableActionWithDurationCommandField(val id: Int) { - ActionID(0), - InvokeID(1), - Duration(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): DisableActionWithDurationCommandField { - for (field in DisableActionWithDurationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 37L - } - } - - class BasicInformation : BaseCluster { - enum class Attribute(val id: Long) { - DataModelRevision(0L), - VendorName(1L), - VendorID(2L), - ProductName(3L), - ProductID(4L), - NodeLabel(5L), - Location(6L), - HardwareVersion(7L), - HardwareVersionString(8L), - SoftwareVersion(9L), - SoftwareVersionString(10L), - ManufacturingDate(11L), - PartNumber(12L), - ProductURL(13L), - ProductLabel(14L), - SerialNumber(15L), - LocalConfigDisabled(16L), - Reachable(17L), - UniqueID(18L), - CapabilityMinima(19L), - ProductAppearance(20L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - StartUp(0L), - ShutDown(1L), - Leave(2L), - ReachableChanged(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - MfgSpecificPing(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 40L - } - } - - class OtaSoftwareUpdateProvider : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - QueryImage(0L), - ApplyUpdateRequest(2L), - NotifyUpdateApplied(4L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class QueryImageCommandField(val id: Int) { - VendorID(0), - ProductID(1), - SoftwareVersion(2), - ProtocolsSupported(3), - HardwareVersion(4), - Location(5), - RequestorCanConsent(6), - MetadataForProvider(7); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): QueryImageCommandField { - for (field in QueryImageCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ApplyUpdateRequestCommandField(val id: Int) { - UpdateToken(0), - NewVersion(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ApplyUpdateRequestCommandField { - for (field in ApplyUpdateRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class NotifyUpdateAppliedCommandField(val id: Int) { - UpdateToken(0), - SoftwareVersion(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): NotifyUpdateAppliedCommandField { - for (field in NotifyUpdateAppliedCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 41L - } - } - - class OtaSoftwareUpdateRequestor : BaseCluster { - enum class Attribute(val id: Long) { - DefaultOTAProviders(0L), - UpdatePossible(1L), - UpdateState(2L), - UpdateStateProgress(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - StateTransition(0L), - VersionApplied(1L), - DownloadError(2L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - AnnounceOTAProvider(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class AnnounceOTAProviderCommandField(val id: Int) { - ProviderNodeID(0), - VendorID(1), - AnnouncementReason(2), - MetadataForNode(3), - Endpoint(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AnnounceOTAProviderCommandField { - for (field in AnnounceOTAProviderCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 42L - } - } - - class LocalizationConfiguration : BaseCluster { - enum class Attribute(val id: Long) { - ActiveLocale(0L), - SupportedLocales(1L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 43L - } - } - - class TimeFormatLocalization : BaseCluster { - enum class Attribute(val id: Long) { - HourFormat(0L), - ActiveCalendarType(1L), - SupportedCalendarTypes(2L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 44L - } - } - - class UnitLocalization : BaseCluster { - enum class Attribute(val id: Long) { - TemperatureUnit(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 45L - } - } - - class PowerSourceConfiguration : BaseCluster { - enum class Attribute(val id: Long) { - Sources(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 46L - } - } - - class PowerSource : BaseCluster { - enum class Attribute(val id: Long) { - Status(0L), - Order(1L), - Description(2L), - WiredAssessedInputVoltage(3L), - WiredAssessedInputFrequency(4L), - WiredCurrentType(5L), - WiredAssessedCurrent(6L), - WiredNominalVoltage(7L), - WiredMaximumCurrent(8L), - WiredPresent(9L), - ActiveWiredFaults(10L), - BatVoltage(11L), - BatPercentRemaining(12L), - BatTimeRemaining(13L), - BatChargeLevel(14L), - BatReplacementNeeded(15L), - BatReplaceability(16L), - BatPresent(17L), - ActiveBatFaults(18L), - BatReplacementDescription(19L), - BatCommonDesignation(20L), - BatANSIDesignation(21L), - BatIECDesignation(22L), - BatApprovedChemistry(23L), - BatCapacity(24L), - BatQuantity(25L), - BatChargeState(26L), - BatTimeToFullCharge(27L), - BatFunctionalWhileCharging(28L), - BatChargingCurrent(29L), - ActiveBatChargeFaults(30L), - EndpointList(31L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - WiredFaultChange(0L), - BatFaultChange(1L), - BatChargeFaultChange(2L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 47L - } - } - - class GeneralCommissioning : BaseCluster { - enum class Attribute(val id: Long) { - Breadcrumb(0L), - BasicCommissioningInfo(1L), - RegulatoryConfig(2L), - LocationCapability(3L), - SupportsConcurrentConnection(4L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ArmFailSafe(0L), - SetRegulatoryConfig(2L), - CommissioningComplete(4L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ArmFailSafeCommandField(val id: Int) { - ExpiryLengthSeconds(0), - Breadcrumb(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ArmFailSafeCommandField { - for (field in ArmFailSafeCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetRegulatoryConfigCommandField(val id: Int) { - NewRegulatoryConfig(0), - CountryCode(1), - Breadcrumb(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetRegulatoryConfigCommandField { - for (field in SetRegulatoryConfigCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 48L - } - } - - class NetworkCommissioning : BaseCluster { - enum class Attribute(val id: Long) { - MaxNetworks(0L), - Networks(1L), - ScanMaxTimeSeconds(2L), - ConnectMaxTimeSeconds(3L), - InterfaceEnabled(4L), - LastNetworkingStatus(5L), - LastNetworkID(6L), - LastConnectErrorValue(7L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ScanNetworks(0L), - AddOrUpdateWiFiNetwork(2L), - AddOrUpdateThreadNetwork(3L), - RemoveNetwork(4L), - ConnectNetwork(6L), - ReorderNetwork(8L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ScanNetworksCommandField(val id: Int) { - Ssid(0), - Breadcrumb(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ScanNetworksCommandField { - for (field in ScanNetworksCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class AddOrUpdateWiFiNetworkCommandField(val id: Int) { - Ssid(0), - Credentials(1), - Breadcrumb(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AddOrUpdateWiFiNetworkCommandField { - for (field in AddOrUpdateWiFiNetworkCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class AddOrUpdateThreadNetworkCommandField(val id: Int) { - OperationalDataset(0), - Breadcrumb(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AddOrUpdateThreadNetworkCommandField { - for (field in AddOrUpdateThreadNetworkCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class RemoveNetworkCommandField(val id: Int) { - NetworkID(0), - Breadcrumb(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RemoveNetworkCommandField { - for (field in RemoveNetworkCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ConnectNetworkCommandField(val id: Int) { - NetworkID(0), - Breadcrumb(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ConnectNetworkCommandField { - for (field in ConnectNetworkCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ReorderNetworkCommandField(val id: Int) { - NetworkID(0), - NetworkIndex(1), - Breadcrumb(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ReorderNetworkCommandField { - for (field in ReorderNetworkCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 49L - } - } - - class DiagnosticLogs : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - RetrieveLogsRequest(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class RetrieveLogsRequestCommandField(val id: Int) { - Intent(0), - RequestedProtocol(1), - TransferFileDesignator(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RetrieveLogsRequestCommandField { - for (field in RetrieveLogsRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 50L - } - } - - class GeneralDiagnostics : BaseCluster { - enum class Attribute(val id: Long) { - NetworkInterfaces(0L), - RebootCount(1L), - UpTime(2L), - TotalOperationalHours(3L), - BootReason(4L), - ActiveHardwareFaults(5L), - ActiveRadioFaults(6L), - ActiveNetworkFaults(7L), - TestEventTriggersEnabled(8L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - HardwareFaultChange(0L), - RadioFaultChange(1L), - NetworkFaultChange(2L), - BootReason(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - TestEventTrigger(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestEventTriggerCommandField(val id: Int) { - EnableKey(0), - EventTrigger(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestEventTriggerCommandField { - for (field in TestEventTriggerCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 51L - } - } - - class SoftwareDiagnostics : BaseCluster { - enum class Attribute(val id: Long) { - ThreadMetrics(0L), - CurrentHeapFree(1L), - CurrentHeapUsed(2L), - CurrentHeapHighWatermark(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - SoftwareFault(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ResetWatermarks(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 52L - } - } - - class ThreadNetworkDiagnostics : BaseCluster { - enum class Attribute(val id: Long) { - Channel(0L), - RoutingRole(1L), - NetworkName(2L), - PanId(3L), - ExtendedPanId(4L), - MeshLocalPrefix(5L), - OverrunCount(6L), - NeighborTable(7L), - RouteTable(8L), - PartitionId(9L), - Weighting(10L), - DataVersion(11L), - StableDataVersion(12L), - LeaderRouterId(13L), - DetachedRoleCount(14L), - ChildRoleCount(15L), - RouterRoleCount(16L), - LeaderRoleCount(17L), - AttachAttemptCount(18L), - PartitionIdChangeCount(19L), - BetterPartitionAttachAttemptCount(20L), - ParentChangeCount(21L), - TxTotalCount(22L), - TxUnicastCount(23L), - TxBroadcastCount(24L), - TxAckRequestedCount(25L), - TxAckedCount(26L), - TxNoAckRequestedCount(27L), - TxDataCount(28L), - TxDataPollCount(29L), - TxBeaconCount(30L), - TxBeaconRequestCount(31L), - TxOtherCount(32L), - TxRetryCount(33L), - TxDirectMaxRetryExpiryCount(34L), - TxIndirectMaxRetryExpiryCount(35L), - TxErrCcaCount(36L), - TxErrAbortCount(37L), - TxErrBusyChannelCount(38L), - RxTotalCount(39L), - RxUnicastCount(40L), - RxBroadcastCount(41L), - RxDataCount(42L), - RxDataPollCount(43L), - RxBeaconCount(44L), - RxBeaconRequestCount(45L), - RxOtherCount(46L), - RxAddressFilteredCount(47L), - RxDestAddrFilteredCount(48L), - RxDuplicatedCount(49L), - RxErrNoFrameCount(50L), - RxErrUnknownNeighborCount(51L), - RxErrInvalidSrcAddrCount(52L), - RxErrSecCount(53L), - RxErrFcsCount(54L), - RxErrOtherCount(55L), - ActiveTimestamp(56L), - PendingTimestamp(57L), - Delay(58L), - SecurityPolicy(59L), - ChannelPage0Mask(60L), - OperationalDatasetComponents(61L), - ActiveNetworkFaultsList(62L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - ConnectionStatus(0L), - NetworkFaultChange(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ResetCounts(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 53L - } - } - - class WiFiNetworkDiagnostics : BaseCluster { - enum class Attribute(val id: Long) { - Bssid(0L), - SecurityType(1L), - WiFiVersion(2L), - ChannelNumber(3L), - Rssi(4L), - BeaconLostCount(5L), - BeaconRxCount(6L), - PacketMulticastRxCount(7L), - PacketMulticastTxCount(8L), - PacketUnicastRxCount(9L), - PacketUnicastTxCount(10L), - CurrentMaxRate(11L), - OverrunCount(12L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - Disconnection(0L), - AssociationFailure(1L), - ConnectionStatus(2L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ResetCounts(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 54L - } - } - - class EthernetNetworkDiagnostics : BaseCluster { - enum class Attribute(val id: Long) { - PHYRate(0L), - FullDuplex(1L), - PacketRxCount(2L), - PacketTxCount(3L), - TxErrCount(4L), - CollisionCount(5L), - OverrunCount(6L), - CarrierDetect(7L), - TimeSinceReset(8L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ResetCounts(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 55L - } - } - - class TimeSynchronization : BaseCluster { - enum class Attribute(val id: Long) { - UTCTime(0L), - Granularity(1L), - TimeSource(2L), - TrustedTimeSource(3L), - DefaultNTP(4L), - TimeZone(5L), - DSTOffset(6L), - LocalTime(7L), - TimeZoneDatabase(8L), - NTPServerAvailable(9L), - TimeZoneListMaxSize(10L), - DSTOffsetListMaxSize(11L), - SupportsDNSResolve(12L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - DSTTableEmpty(0L), - DSTStatus(1L), - TimeZoneStatus(2L), - TimeFailure(3L), - MissingTrustedTimeSource(4L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - SetUTCTime(0L), - SetTrustedTimeSource(1L), - SetTimeZone(2L), - SetDSTOffset(4L), - SetDefaultNTP(5L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetUTCTimeCommandField(val id: Int) { - UTCTime(0), - Granularity(1), - TimeSource(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetUTCTimeCommandField { - for (field in SetUTCTimeCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetTrustedTimeSourceCommandField(val id: Int) { - TrustedTimeSource(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetTrustedTimeSourceCommandField { - for (field in SetTrustedTimeSourceCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetTimeZoneCommandField(val id: Int) { - TimeZone(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetTimeZoneCommandField { - for (field in SetTimeZoneCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetDSTOffsetCommandField(val id: Int) { - DSTOffset(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetDSTOffsetCommandField { - for (field in SetDSTOffsetCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetDefaultNTPCommandField(val id: Int) { - DefaultNTP(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetDefaultNTPCommandField { - for (field in SetDefaultNTPCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 56L - } - } - - class BridgedDeviceBasicInformation : BaseCluster { - enum class Attribute(val id: Long) { - VendorName(1L), - VendorID(2L), - ProductName(3L), - NodeLabel(5L), - HardwareVersion(7L), - HardwareVersionString(8L), - SoftwareVersion(9L), - SoftwareVersionString(10L), - ManufacturingDate(11L), - PartNumber(12L), - ProductURL(13L), - ProductLabel(14L), - SerialNumber(15L), - Reachable(17L), - UniqueID(18L), - ProductAppearance(20L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - StartUp(0L), - ShutDown(1L), - Leave(2L), - ReachableChanged(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 57L - } - } - - class Switch : BaseCluster { - enum class Attribute(val id: Long) { - NumberOfPositions(0L), - CurrentPosition(1L), - MultiPressMax(2L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - SwitchLatched(0L), - InitialPress(1L), - LongPress(2L), - ShortRelease(3L), - LongRelease(4L), - MultiPressOngoing(5L), - MultiPressComplete(6L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 59L - } - } - - class AdministratorCommissioning : BaseCluster { - enum class Attribute(val id: Long) { - WindowStatus(0L), - AdminFabricIndex(1L), - AdminVendorId(2L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - OpenCommissioningWindow(0L), - OpenBasicCommissioningWindow(1L), - RevokeCommissioning(2L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class OpenCommissioningWindowCommandField(val id: Int) { - CommissioningTimeout(0), - PAKEPasscodeVerifier(1), - Discriminator(2), - Iterations(3), - Salt(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): OpenCommissioningWindowCommandField { - for (field in OpenCommissioningWindowCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class OpenBasicCommissioningWindowCommandField(val id: Int) { - CommissioningTimeout(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): OpenBasicCommissioningWindowCommandField { - for (field in OpenBasicCommissioningWindowCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 60L - } - } - - class OperationalCredentials : BaseCluster { - enum class Attribute(val id: Long) { - NOCs(0L), - Fabrics(1L), - SupportedFabrics(2L), - CommissionedFabrics(3L), - TrustedRootCertificates(4L), - CurrentFabricIndex(5L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - AttestationRequest(0L), - CertificateChainRequest(2L), - CSRRequest(4L), - AddNOC(6L), - UpdateNOC(7L), - UpdateFabricLabel(9L), - RemoveFabric(10L), - AddTrustedRootCertificate(11L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class AttestationRequestCommandField(val id: Int) { - AttestationNonce(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AttestationRequestCommandField { - for (field in AttestationRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class CertificateChainRequestCommandField(val id: Int) { - CertificateType(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): CertificateChainRequestCommandField { - for (field in CertificateChainRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class CSRRequestCommandField(val id: Int) { - CSRNonce(0), - IsForUpdateNOC(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): CSRRequestCommandField { - for (field in CSRRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class AddNOCCommandField(val id: Int) { - NOCValue(0), - ICACValue(1), - IPKValue(2), - CaseAdminSubject(3), - AdminVendorId(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AddNOCCommandField { - for (field in AddNOCCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class UpdateNOCCommandField(val id: Int) { - NOCValue(0), - ICACValue(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): UpdateNOCCommandField { - for (field in UpdateNOCCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class UpdateFabricLabelCommandField(val id: Int) { - Label(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): UpdateFabricLabelCommandField { - for (field in UpdateFabricLabelCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class RemoveFabricCommandField(val id: Int) { - FabricIndex(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RemoveFabricCommandField { - for (field in RemoveFabricCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class AddTrustedRootCertificateCommandField(val id: Int) { - RootCACertificate(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): AddTrustedRootCertificateCommandField { - for (field in AddTrustedRootCertificateCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 62L - } - } - - class GroupKeyManagement : BaseCluster { - enum class Attribute(val id: Long) { - GroupKeyMap(0L), - GroupTable(1L), - MaxGroupsPerFabric(2L), - MaxGroupKeysPerFabric(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - KeySetWrite(0L), - KeySetRead(1L), - KeySetRemove(3L), - KeySetReadAllIndices(4L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class KeySetWriteCommandField(val id: Int) { - GroupKeySet(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): KeySetWriteCommandField { - for (field in KeySetWriteCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class KeySetReadCommandField(val id: Int) { - GroupKeySetID(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): KeySetReadCommandField { - for (field in KeySetReadCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class KeySetRemoveCommandField(val id: Int) { - GroupKeySetID(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): KeySetRemoveCommandField { - for (field in KeySetRemoveCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 63L - } - } - - class FixedLabel : BaseCluster { - enum class Attribute(val id: Long) { - LabelList(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 64L - } - } - - class UserLabel : BaseCluster { - enum class Attribute(val id: Long) { - LabelList(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 65L - } - } - - class ProxyConfiguration : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 66L - } - } - - class ProxyDiscovery : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 67L - } - } - - class ProxyValid : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 68L - } - } - - class BooleanState : BaseCluster { - enum class Attribute(val id: Long) { - StateValue(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - StateChange(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 69L - } - } - - class IcdManagement : BaseCluster { - enum class Attribute(val id: Long) { - IdleModeInterval(0L), - ActiveModeInterval(1L), - ActiveModeThreshold(2L), - RegisteredClients(3L), - ICDCounter(4L), - ClientsSupportedPerFabric(5L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - RegisterClient(0L), - UnregisterClient(2L), - StayActiveRequest(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class RegisterClientCommandField(val id: Int) { - CheckInNodeID(0), - MonitoredSubject(1), - Key(2), - VerificationKey(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RegisterClientCommandField { - for (field in RegisterClientCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class UnregisterClientCommandField(val id: Int) { - CheckInNodeID(0), - VerificationKey(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): UnregisterClientCommandField { - for (field in UnregisterClientCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 70L - } - } - - class ModeSelect : BaseCluster { - enum class Attribute(val id: Long) { - Description(0L), - StandardNamespace(1L), - SupportedModes(2L), - CurrentMode(3L), - StartUpMode(4L), - OnMode(5L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ChangeToMode(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ChangeToModeCommandField(val id: Int) { - NewMode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ChangeToModeCommandField { - for (field in ChangeToModeCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 80L - } - } - - class LaundryWasherMode : BaseCluster { - enum class Attribute(val id: Long) { - SupportedModes(0L), - CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ChangeToMode(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ChangeToModeCommandField(val id: Int) { - NewMode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ChangeToModeCommandField { - for (field in ChangeToModeCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 81L - } - } - - class RefrigeratorAndTemperatureControlledCabinetMode : BaseCluster { - enum class Attribute(val id: Long) { - SupportedModes(0L), - CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ChangeToMode(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ChangeToModeCommandField(val id: Int) { - NewMode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ChangeToModeCommandField { - for (field in ChangeToModeCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 82L - } - } - - class LaundryWasherControls : BaseCluster { - enum class Attribute(val id: Long) { - SpinSpeeds(0L), - SpinSpeedCurrent(1L), - NumberOfRinses(2L), - SupportedRinses(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 83L - } - } - - class RvcRunMode : BaseCluster { - enum class Attribute(val id: Long) { - SupportedModes(0L), - CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ChangeToMode(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ChangeToModeCommandField(val id: Int) { - NewMode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ChangeToModeCommandField { - for (field in ChangeToModeCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 84L - } - } - - class RvcCleanMode : BaseCluster { - enum class Attribute(val id: Long) { - SupportedModes(0L), - CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ChangeToMode(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ChangeToModeCommandField(val id: Int) { - NewMode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ChangeToModeCommandField { - for (field in ChangeToModeCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 85L - } - } - - class TemperatureControl : BaseCluster { - enum class Attribute(val id: Long) { - TemperatureSetpoint(0L), - MinTemperature(1L), - MaxTemperature(2L), - Step(3L), - SelectedTemperatureLevel(4L), - SupportedTemperatureLevels(5L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - SetTemperature(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetTemperatureCommandField(val id: Int) { - TargetTemperature(0), - TargetTemperatureLevel(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetTemperatureCommandField { - for (field in SetTemperatureCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 86L - } - } - - class RefrigeratorAlarm : BaseCluster { - enum class Attribute(val id: Long) { - Mask(0L), - State(2L), - Supported(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - Notify(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 87L - } - } - - class DishwasherMode : BaseCluster { - enum class Attribute(val id: Long) { - SupportedModes(0L), - CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ChangeToMode(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ChangeToModeCommandField(val id: Int) { - NewMode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ChangeToModeCommandField { - for (field in ChangeToModeCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 89L - } - } - - class AirQuality : BaseCluster { - enum class Attribute(val id: Long) { - AirQuality(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 91L - } - } - - class SmokeCoAlarm : BaseCluster { - enum class Attribute(val id: Long) { - ExpressedState(0L), - SmokeState(1L), - COState(2L), - BatteryAlert(3L), - DeviceMuted(4L), - TestInProgress(5L), - HardwareFaultAlert(6L), - EndOfServiceAlert(7L), - InterconnectSmokeAlarm(8L), - InterconnectCOAlarm(9L), - ContaminationState(10L), - SmokeSensitivityLevel(11L), - ExpiryDate(12L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - SmokeAlarm(0L), - COAlarm(1L), - LowBattery(2L), - HardwareFault(3L), - EndOfService(4L), - SelfTestComplete(5L), - AlarmMuted(6L), - MuteEnded(7L), - InterconnectSmokeAlarm(8L), - InterconnectCOAlarm(9L), - AllClear(10L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - SelfTestRequest(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 92L - } - } - - class DishwasherAlarm : BaseCluster { - enum class Attribute(val id: Long) { - Mask(0L), - Latch(1L), - State(2L), - Supported(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - Notify(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Reset(0L), - ModifyEnabledAlarms(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ResetCommandField(val id: Int) { - Alarms(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ResetCommandField { - for (field in ResetCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ModifyEnabledAlarmsCommandField(val id: Int) { - Mask(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ModifyEnabledAlarmsCommandField { - for (field in ModifyEnabledAlarmsCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 93L - } - } - - class OperationalState : BaseCluster { - enum class Attribute(val id: Long) { - PhaseList(0L), - CurrentPhase(1L), - CountdownTime(2L), - OperationalStateList(3L), - OperationalState(4L), - OperationalError(5L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - OperationalError(0L), - OperationCompletion(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Pause(0L), - Stop(1L), - Start(2L), - Resume(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 96L - } - } - - class RvcOperationalState : BaseCluster { - enum class Attribute(val id: Long) { - PhaseList(0L), - CurrentPhase(1L), - CountdownTime(2L), - OperationalStateList(3L), - OperationalState(4L), - OperationalError(5L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - OperationalError(0L), - OperationCompletion(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Pause(0L), - Stop(1L), - Start(2L), - Resume(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 97L - } - } - - class HepaFilterMonitoring : BaseCluster { - enum class Attribute(val id: Long) { - Condition(0L), - DegradationDirection(1L), - ChangeIndication(2L), - InPlaceIndicator(3L), - LastChangedTime(4L), - ReplacementProductList(5L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ResetCondition(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 113L - } - } - - class ActivatedCarbonFilterMonitoring : BaseCluster { - enum class Attribute(val id: Long) { - Condition(0L), - DegradationDirection(1L), - ChangeIndication(2L), - InPlaceIndicator(3L), - LastChangedTime(4L), - ReplacementProductList(5L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ResetCondition(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 114L - } - } - - class DoorLock : BaseCluster { - enum class Attribute(val id: Long) { - LockState(0L), - LockType(1L), - ActuatorEnabled(2L), - DoorState(3L), - DoorOpenEvents(4L), - DoorClosedEvents(5L), - OpenPeriod(6L), - NumberOfTotalUsersSupported(17L), - NumberOfPINUsersSupported(18L), - NumberOfRFIDUsersSupported(19L), - NumberOfWeekDaySchedulesSupportedPerUser(20L), - NumberOfYearDaySchedulesSupportedPerUser(21L), - NumberOfHolidaySchedulesSupported(22L), - MaxPINCodeLength(23L), - MinPINCodeLength(24L), - MaxRFIDCodeLength(25L), - MinRFIDCodeLength(26L), - CredentialRulesSupport(27L), - NumberOfCredentialsSupportedPerUser(28L), - Language(33L), - LEDSettings(34L), - AutoRelockTime(35L), - SoundVolume(36L), - OperatingMode(37L), - SupportedOperatingModes(38L), - DefaultConfigurationRegister(39L), - EnableLocalProgramming(40L), - EnableOneTouchLocking(41L), - EnableInsideStatusLED(42L), - EnablePrivacyModeButton(43L), - LocalProgrammingFeatures(44L), - WrongCodeEntryLimit(48L), - UserCodeTemporaryDisableTime(49L), - SendPINOverTheAir(50L), - RequirePINforRemoteOperation(51L), - ExpiringUserTimeout(53L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - DoorLockAlarm(0L), - DoorStateChange(1L), - LockOperation(2L), - LockOperationError(3L), - LockUserChange(4L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - LockDoor(0L), - UnlockDoor(1L), - UnlockWithTimeout(3L), - SetWeekDaySchedule(11L), - GetWeekDaySchedule(12L), - ClearWeekDaySchedule(13L), - SetYearDaySchedule(14L), - GetYearDaySchedule(15L), - ClearYearDaySchedule(16L), - SetHolidaySchedule(17L), - GetHolidaySchedule(18L), - ClearHolidaySchedule(19L), - SetUser(26L), - GetUser(27L), - ClearUser(29L), - SetCredential(34L), - GetCredentialStatus(36L), - ClearCredential(38L), - UnboltDoor(39L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class LockDoorCommandField(val id: Int) { - PINCode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): LockDoorCommandField { - for (field in LockDoorCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class UnlockDoorCommandField(val id: Int) { - PINCode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): UnlockDoorCommandField { - for (field in UnlockDoorCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class UnlockWithTimeoutCommandField(val id: Int) { - Timeout(0), - PINCode(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): UnlockWithTimeoutCommandField { - for (field in UnlockWithTimeoutCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetWeekDayScheduleCommandField(val id: Int) { - WeekDayIndex(0), - UserIndex(1), - DaysMask(2), - StartHour(3), - StartMinute(4), - EndHour(5), - EndMinute(6); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetWeekDayScheduleCommandField { - for (field in SetWeekDayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetWeekDayScheduleCommandField(val id: Int) { - WeekDayIndex(0), - UserIndex(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetWeekDayScheduleCommandField { - for (field in GetWeekDayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ClearWeekDayScheduleCommandField(val id: Int) { - WeekDayIndex(0), - UserIndex(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ClearWeekDayScheduleCommandField { - for (field in ClearWeekDayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetYearDayScheduleCommandField(val id: Int) { - YearDayIndex(0), - UserIndex(1), - LocalStartTime(2), - LocalEndTime(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetYearDayScheduleCommandField { - for (field in SetYearDayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetYearDayScheduleCommandField(val id: Int) { - YearDayIndex(0), - UserIndex(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetYearDayScheduleCommandField { - for (field in GetYearDayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ClearYearDayScheduleCommandField(val id: Int) { - YearDayIndex(0), - UserIndex(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ClearYearDayScheduleCommandField { - for (field in ClearYearDayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetHolidayScheduleCommandField(val id: Int) { - HolidayIndex(0), - LocalStartTime(1), - LocalEndTime(2), - OperatingMode(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetHolidayScheduleCommandField { - for (field in SetHolidayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetHolidayScheduleCommandField(val id: Int) { - HolidayIndex(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetHolidayScheduleCommandField { - for (field in GetHolidayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ClearHolidayScheduleCommandField(val id: Int) { - HolidayIndex(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ClearHolidayScheduleCommandField { - for (field in ClearHolidayScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetUserCommandField(val id: Int) { - OperationType(0), - UserIndex(1), - UserName(2), - UserUniqueID(3), - UserStatus(4), - UserType(5), - CredentialRule(6); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetUserCommandField { - for (field in SetUserCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetUserCommandField(val id: Int) { - UserIndex(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetUserCommandField { - for (field in GetUserCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ClearUserCommandField(val id: Int) { - UserIndex(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ClearUserCommandField { - for (field in ClearUserCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetCredentialCommandField(val id: Int) { - OperationType(0), - Credential(1), - CredentialData(2), - UserIndex(3), - UserStatus(4), - UserType(5); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetCredentialCommandField { - for (field in SetCredentialCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetCredentialStatusCommandField(val id: Int) { - Credential(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetCredentialStatusCommandField { - for (field in GetCredentialStatusCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ClearCredentialCommandField(val id: Int) { - Credential(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ClearCredentialCommandField { - for (field in ClearCredentialCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class UnboltDoorCommandField(val id: Int) { - PINCode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): UnboltDoorCommandField { - for (field in UnboltDoorCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 257L - } - } - - class WindowCovering : BaseCluster { - enum class Attribute(val id: Long) { - Type(0L), - PhysicalClosedLimitLift(1L), - PhysicalClosedLimitTilt(2L), - CurrentPositionLift(3L), - CurrentPositionTilt(4L), - NumberOfActuationsLift(5L), - NumberOfActuationsTilt(6L), - ConfigStatus(7L), - CurrentPositionLiftPercentage(8L), - CurrentPositionTiltPercentage(9L), - OperationalStatus(10L), - TargetPositionLiftPercent100ths(11L), - TargetPositionTiltPercent100ths(12L), - EndProductType(13L), - CurrentPositionLiftPercent100ths(14L), - CurrentPositionTiltPercent100ths(15L), - InstalledOpenLimitLift(16L), - InstalledClosedLimitLift(17L), - InstalledOpenLimitTilt(18L), - InstalledClosedLimitTilt(19L), - Mode(23L), - SafetyStatus(26L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - UpOrOpen(0L), - DownOrClose(1L), - StopMotion(2L), - GoToLiftValue(4L), - GoToLiftPercentage(5L), - GoToTiltValue(7L), - GoToTiltPercentage(8L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class GoToLiftValueCommandField(val id: Int) { - LiftValue(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GoToLiftValueCommandField { - for (field in GoToLiftValueCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GoToLiftPercentageCommandField(val id: Int) { - LiftPercent100thsValue(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GoToLiftPercentageCommandField { - for (field in GoToLiftPercentageCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GoToTiltValueCommandField(val id: Int) { - TiltValue(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GoToTiltValueCommandField { - for (field in GoToTiltValueCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GoToTiltPercentageCommandField(val id: Int) { - TiltPercent100thsValue(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GoToTiltPercentageCommandField { - for (field in GoToTiltPercentageCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 258L - } - } - - class BarrierControl : BaseCluster { - enum class Attribute(val id: Long) { - BarrierMovingState(1L), - BarrierSafetyStatus(2L), - BarrierCapabilities(3L), - BarrierOpenEvents(4L), - BarrierCloseEvents(5L), - BarrierCommandOpenEvents(6L), - BarrierCommandCloseEvents(7L), - BarrierOpenPeriod(8L), - BarrierClosePeriod(9L), - BarrierPosition(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - BarrierControlGoToPercent(0L), - BarrierControlStop(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class BarrierControlGoToPercentCommandField(val id: Int) { - PercentOpen(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): BarrierControlGoToPercentCommandField { - for (field in BarrierControlGoToPercentCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 259L - } - } - - class PumpConfigurationAndControl : BaseCluster { - enum class Attribute(val id: Long) { - MaxPressure(0L), - MaxSpeed(1L), - MaxFlow(2L), - MinConstPressure(3L), - MaxConstPressure(4L), - MinCompPressure(5L), - MaxCompPressure(6L), - MinConstSpeed(7L), - MaxConstSpeed(8L), - MinConstFlow(9L), - MaxConstFlow(10L), - MinConstTemp(11L), - MaxConstTemp(12L), - PumpStatus(16L), - EffectiveOperationMode(17L), - EffectiveControlMode(18L), - Capacity(19L), - Speed(20L), - LifetimeRunningHours(21L), - Power(22L), - LifetimeEnergyConsumed(23L), - OperationMode(32L), - ControlMode(33L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - SupplyVoltageLow(0L), - SupplyVoltageHigh(1L), - PowerMissingPhase(2L), - SystemPressureLow(3L), - SystemPressureHigh(4L), - DryRunning(5L), - MotorTemperatureHigh(6L), - PumpMotorFatalFailure(7L), - ElectronicTemperatureHigh(8L), - PumpBlocked(9L), - SensorFailure(10L), - ElectronicNonFatalFailure(11L), - ElectronicFatalFailure(12L), - GeneralFault(13L), - Leakage(14L), - AirDetection(15L), - TurbineOperation(16L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 512L - } - } - - class Thermostat : BaseCluster { - enum class Attribute(val id: Long) { - LocalTemperature(0L), - OutdoorTemperature(1L), - Occupancy(2L), - AbsMinHeatSetpointLimit(3L), - AbsMaxHeatSetpointLimit(4L), - AbsMinCoolSetpointLimit(5L), - AbsMaxCoolSetpointLimit(6L), - PICoolingDemand(7L), - PIHeatingDemand(8L), - HVACSystemTypeConfiguration(9L), - LocalTemperatureCalibration(16L), - OccupiedCoolingSetpoint(17L), - OccupiedHeatingSetpoint(18L), - UnoccupiedCoolingSetpoint(19L), - UnoccupiedHeatingSetpoint(20L), - MinHeatSetpointLimit(21L), - MaxHeatSetpointLimit(22L), - MinCoolSetpointLimit(23L), - MaxCoolSetpointLimit(24L), - MinSetpointDeadBand(25L), - RemoteSensing(26L), - ControlSequenceOfOperation(27L), - SystemMode(28L), - ThermostatRunningMode(30L), - StartOfWeek(32L), - NumberOfWeeklyTransitions(33L), - NumberOfDailyTransitions(34L), - TemperatureSetpointHold(35L), - TemperatureSetpointHoldDuration(36L), - ThermostatProgrammingOperationMode(37L), - ThermostatRunningState(41L), - SetpointChangeSource(48L), - SetpointChangeAmount(49L), - SetpointChangeSourceTimestamp(50L), - OccupiedSetback(52L), - OccupiedSetbackMin(53L), - OccupiedSetbackMax(54L), - UnoccupiedSetback(55L), - UnoccupiedSetbackMin(56L), - UnoccupiedSetbackMax(57L), - EmergencyHeatDelta(58L), - ACType(64L), - ACCapacity(65L), - ACRefrigerantType(66L), - ACCompressorType(67L), - ACErrorCode(68L), - ACLouverPosition(69L), - ACCoilTemperature(70L), - ACCapacityformat(71L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - SetpointRaiseLower(0L), - SetWeeklySchedule(1L), - GetWeeklySchedule(2L), - ClearWeeklySchedule(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetpointRaiseLowerCommandField(val id: Int) { - Mode(0), - Amount(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetpointRaiseLowerCommandField { - for (field in SetpointRaiseLowerCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SetWeeklyScheduleCommandField(val id: Int) { - NumberOfTransitionsForSequence(0), - DayOfWeekForSequence(1), - ModeForSequence(2), - Transitions(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SetWeeklyScheduleCommandField { - for (field in SetWeeklyScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetWeeklyScheduleCommandField(val id: Int) { - DaysToReturn(0), - ModeToReturn(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetWeeklyScheduleCommandField { - for (field in GetWeeklyScheduleCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 513L - } - } - - class FanControl : BaseCluster { - enum class Attribute(val id: Long) { - FanMode(0L), - FanModeSequence(1L), - PercentSetting(2L), - PercentCurrent(3L), - SpeedMax(4L), - SpeedSetting(5L), - SpeedCurrent(6L), - RockSupport(7L), - RockSetting(8L), - WindSupport(9L), - WindSetting(10L), - AirflowDirection(11L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Step(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class StepCommandField(val id: Int) { - Direction(0), - Wrap(1), - LowestOff(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StepCommandField { - for (field in StepCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 514L - } - } - - class ThermostatUserInterfaceConfiguration : BaseCluster { - enum class Attribute(val id: Long) { - TemperatureDisplayMode(0L), - KeypadLockout(1L), - ScheduleProgrammingVisibility(2L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 516L - } - } - - class ColorControl : BaseCluster { - enum class Attribute(val id: Long) { - CurrentHue(0L), - CurrentSaturation(1L), - RemainingTime(2L), - CurrentX(3L), - CurrentY(4L), - DriftCompensation(5L), - CompensationText(6L), - ColorTemperatureMireds(7L), - ColorMode(8L), - Options(15L), - NumberOfPrimaries(16L), - Primary1X(17L), - Primary1Y(18L), - Primary1Intensity(19L), - Primary2X(21L), - Primary2Y(22L), - Primary2Intensity(23L), - Primary3X(25L), - Primary3Y(26L), - Primary3Intensity(27L), - Primary4X(32L), - Primary4Y(33L), - Primary4Intensity(34L), - Primary5X(36L), - Primary5Y(37L), - Primary5Intensity(38L), - Primary6X(40L), - Primary6Y(41L), - Primary6Intensity(42L), - WhitePointX(48L), - WhitePointY(49L), - ColorPointRX(50L), - ColorPointRY(51L), - ColorPointRIntensity(52L), - ColorPointGX(54L), - ColorPointGY(55L), - ColorPointGIntensity(56L), - ColorPointBX(58L), - ColorPointBY(59L), - ColorPointBIntensity(60L), - EnhancedCurrentHue(16384L), - EnhancedColorMode(16385L), - ColorLoopActive(16386L), - ColorLoopDirection(16387L), - ColorLoopTime(16388L), - ColorLoopStartEnhancedHue(16389L), - ColorLoopStoredEnhancedHue(16390L), - ColorCapabilities(16394L), - ColorTempPhysicalMinMireds(16395L), - ColorTempPhysicalMaxMireds(16396L), - CoupleColorTempToLevelMinMireds(16397L), - StartUpColorTemperatureMireds(16400L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - MoveToHue(0L), - MoveHue(1L), - StepHue(2L), - MoveToSaturation(3L), - MoveSaturation(4L), - StepSaturation(5L), - MoveToHueAndSaturation(6L), - MoveToColor(7L), - MoveColor(8L), - StepColor(9L), - MoveToColorTemperature(10L), - EnhancedMoveToHue(64L), - EnhancedMoveHue(65L), - EnhancedStepHue(66L), - EnhancedMoveToHueAndSaturation(67L), - ColorLoopSet(68L), - StopMoveStep(71L), - MoveColorTemperature(75L), - StepColorTemperature(76L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveToHueCommandField(val id: Int) { - Hue(0), - Direction(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveToHueCommandField { - for (field in MoveToHueCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveHueCommandField(val id: Int) { - MoveMode(0), - Rate(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveHueCommandField { - for (field in MoveHueCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StepHueCommandField(val id: Int) { - StepMode(0), - StepSize(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StepHueCommandField { - for (field in StepHueCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveToSaturationCommandField(val id: Int) { - Saturation(0), - TransitionTime(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveToSaturationCommandField { - for (field in MoveToSaturationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveSaturationCommandField(val id: Int) { - MoveMode(0), - Rate(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveSaturationCommandField { - for (field in MoveSaturationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StepSaturationCommandField(val id: Int) { - StepMode(0), - StepSize(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StepSaturationCommandField { - for (field in StepSaturationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveToHueAndSaturationCommandField(val id: Int) { - Hue(0), - Saturation(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveToHueAndSaturationCommandField { - for (field in MoveToHueAndSaturationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveToColorCommandField(val id: Int) { - ColorX(0), - ColorY(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveToColorCommandField { - for (field in MoveToColorCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveColorCommandField(val id: Int) { - RateX(0), - RateY(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveColorCommandField { - for (field in MoveColorCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StepColorCommandField(val id: Int) { - StepX(0), - StepY(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StepColorCommandField { - for (field in StepColorCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveToColorTemperatureCommandField(val id: Int) { - ColorTemperatureMireds(0), - TransitionTime(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveToColorTemperatureCommandField { - for (field in MoveToColorTemperatureCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class EnhancedMoveToHueCommandField(val id: Int) { - EnhancedHue(0), - Direction(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): EnhancedMoveToHueCommandField { - for (field in EnhancedMoveToHueCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class EnhancedMoveHueCommandField(val id: Int) { - MoveMode(0), - Rate(1), - OptionsMask(2), - OptionsOverride(3); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): EnhancedMoveHueCommandField { - for (field in EnhancedMoveHueCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class EnhancedStepHueCommandField(val id: Int) { - StepMode(0), - StepSize(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): EnhancedStepHueCommandField { - for (field in EnhancedStepHueCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class EnhancedMoveToHueAndSaturationCommandField(val id: Int) { - EnhancedHue(0), - Saturation(1), - TransitionTime(2), - OptionsMask(3), - OptionsOverride(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): EnhancedMoveToHueAndSaturationCommandField { - for (field in EnhancedMoveToHueAndSaturationCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ColorLoopSetCommandField(val id: Int) { - UpdateFlags(0), - Action(1), - Direction(2), - Time(3), - StartHue(4), - OptionsMask(5), - OptionsOverride(6); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ColorLoopSetCommandField { - for (field in ColorLoopSetCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StopMoveStepCommandField(val id: Int) { - OptionsMask(0), - OptionsOverride(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StopMoveStepCommandField { - for (field in StopMoveStepCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class MoveColorTemperatureCommandField(val id: Int) { - MoveMode(0), - Rate(1), - ColorTemperatureMinimumMireds(2), - ColorTemperatureMaximumMireds(3), - OptionsMask(4), - OptionsOverride(5); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): MoveColorTemperatureCommandField { - for (field in MoveColorTemperatureCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StepColorTemperatureCommandField(val id: Int) { - StepMode(0), - StepSize(1), - TransitionTime(2), - ColorTemperatureMinimumMireds(3), - ColorTemperatureMaximumMireds(4), - OptionsMask(5), - OptionsOverride(6); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StepColorTemperatureCommandField { - for (field in StepColorTemperatureCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 768L - } - } - - class BallastConfiguration : BaseCluster { - enum class Attribute(val id: Long) { - PhysicalMinLevel(0L), - PhysicalMaxLevel(1L), - BallastStatus(2L), - MinLevel(16L), - MaxLevel(17L), - IntrinsicBallastFactor(20L), - BallastFactorAdjustment(21L), - LampQuantity(32L), - LampType(48L), - LampManufacturer(49L), - LampRatedHours(50L), - LampBurnHours(51L), - LampAlarmMode(52L), - LampBurnHoursTripPoint(53L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 769L - } - } - - class IlluminanceMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - Tolerance(3L), - LightSensorType(4L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1024L - } - } - - class TemperatureMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - Tolerance(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1026L - } - } - - class PressureMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - Tolerance(3L), - ScaledValue(16L), - MinScaledValue(17L), - MaxScaledValue(18L), - ScaledTolerance(19L), - Scale(20L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1027L - } - } - - class FlowMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - Tolerance(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1028L - } - } - - class RelativeHumidityMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - Tolerance(3L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1029L - } - } - - class OccupancySensing : BaseCluster { - enum class Attribute(val id: Long) { - Occupancy(0L), - OccupancySensorType(1L), - OccupancySensorTypeBitmap(2L), - PIROccupiedToUnoccupiedDelay(16L), - PIRUnoccupiedToOccupiedDelay(17L), - PIRUnoccupiedToOccupiedThreshold(18L), - UltrasonicOccupiedToUnoccupiedDelay(32L), - UltrasonicUnoccupiedToOccupiedDelay(33L), - UltrasonicUnoccupiedToOccupiedThreshold(34L), - PhysicalContactOccupiedToUnoccupiedDelay(48L), - PhysicalContactUnoccupiedToOccupiedDelay(49L), - PhysicalContactUnoccupiedToOccupiedThreshold(50L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1030L - } - } - - class CarbonMonoxideConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1036L - } - } - - class CarbonDioxideConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1037L - } - } - - class NitrogenDioxideConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1043L - } - } - - class OzoneConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1045L - } - } - - class Pm25ConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1066L - } - } - - class FormaldehydeConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1067L - } - } - - class Pm1ConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1068L - } - } - - class Pm10ConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1069L - } - } - - class TotalVolatileOrganicCompoundsConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1070L - } - } - - class RadonConcentrationMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasuredValue(0L), - MinMeasuredValue(1L), - MaxMeasuredValue(2L), - PeakMeasuredValue(3L), - PeakMeasuredValueWindow(4L), - AverageMeasuredValue(5L), - AverageMeasuredValueWindow(6L), - Uncertainty(7L), - MeasurementUnit(8L), - MeasurementMedium(9L), - LevelValue(10L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1071L - } - } - - class WakeOnLan : BaseCluster { - enum class Attribute(val id: Long) { - MACAddress(0L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1283L - } - } - - class Channel : BaseCluster { - enum class Attribute(val id: Long) { - ChannelList(0L), - Lineup(1L), - CurrentChannel(2L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - ChangeChannel(0L), - ChangeChannelByNumber(2L), - SkipChannel(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class ChangeChannelCommandField(val id: Int) { - Match(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ChangeChannelCommandField { - for (field in ChangeChannelCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class ChangeChannelByNumberCommandField(val id: Int) { - MajorNumber(0), - MinorNumber(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): ChangeChannelByNumberCommandField { - for (field in ChangeChannelByNumberCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SkipChannelCommandField(val id: Int) { - Count(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SkipChannelCommandField { - for (field in SkipChannelCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1284L - } - } - - class TargetNavigator : BaseCluster { - enum class Attribute(val id: Long) { - TargetList(0L), - CurrentTarget(1L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - NavigateTarget(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class NavigateTargetCommandField(val id: Int) { - Target(0), - Data(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): NavigateTargetCommandField { - for (field in NavigateTargetCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1285L - } - } - - class MediaPlayback : BaseCluster { - enum class Attribute(val id: Long) { - CurrentState(0L), - StartTime(1L), - Duration(2L), - SampledPosition(3L), - PlaybackSpeed(4L), - SeekRangeEnd(5L), - SeekRangeStart(6L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Play(0L), - Pause(1L), - Stop(2L), - StartOver(3L), - Previous(4L), - Next(5L), - Rewind(6L), - FastForward(7L), - SkipForward(8L), - SkipBackward(9L), - Seek(11L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class SkipForwardCommandField(val id: Int) { - DeltaPositionMilliseconds(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SkipForwardCommandField { - for (field in SkipForwardCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SkipBackwardCommandField(val id: Int) { - DeltaPositionMilliseconds(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SkipBackwardCommandField { - for (field in SkipBackwardCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SeekCommandField(val id: Int) { - Position(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SeekCommandField { - for (field in SeekCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1286L - } - } - - class MediaInput : BaseCluster { - enum class Attribute(val id: Long) { - InputList(0L), - CurrentInput(1L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - SelectInput(0L), - ShowInputStatus(1L), - HideInputStatus(2L), - RenameInput(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class SelectInputCommandField(val id: Int) { - Index(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SelectInputCommandField { - for (field in SelectInputCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class RenameInputCommandField(val id: Int) { - Index(0), - Name(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RenameInputCommandField { - for (field in RenameInputCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1287L - } - } - - class LowPower : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Sleep(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1288L - } - } - - class KeypadInput : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - SendKey(0L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class SendKeyCommandField(val id: Int) { - KeyCode(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SendKeyCommandField { - for (field in SendKeyCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1289L - } - } - - class ContentLauncher : BaseCluster { - enum class Attribute(val id: Long) { - AcceptHeader(0L), - SupportedStreamingProtocols(1L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - LaunchContent(0L), - LaunchURL(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class LaunchContentCommandField(val id: Int) { - Search(0), - AutoPlay(1), - Data(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): LaunchContentCommandField { - for (field in LaunchContentCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class LaunchURLCommandField(val id: Int) { - ContentURL(0), - DisplayString(1), - BrandingInformation(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): LaunchURLCommandField { - for (field in LaunchURLCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1290L - } - } - - class AudioOutput : BaseCluster { - enum class Attribute(val id: Long) { - OutputList(0L), - CurrentOutput(1L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - SelectOutput(0L), - RenameOutput(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class SelectOutputCommandField(val id: Int) { - Index(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SelectOutputCommandField { - for (field in SelectOutputCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class RenameOutputCommandField(val id: Int) { - Index(0), - Name(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): RenameOutputCommandField { - for (field in RenameOutputCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1291L - } - } - - class ApplicationLauncher : BaseCluster { - enum class Attribute(val id: Long) { - CatalogList(0L), - CurrentApp(1L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - LaunchApp(0L), - StopApp(1L), - HideApp(2L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class LaunchAppCommandField(val id: Int) { - Application(0), - Data(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): LaunchAppCommandField { - for (field in LaunchAppCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class StopAppCommandField(val id: Int) { - Application(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): StopAppCommandField { - for (field in StopAppCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class HideAppCommandField(val id: Int) { - Application(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): HideAppCommandField { - for (field in HideAppCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1292L - } - } - - class ApplicationBasic : BaseCluster { - enum class Attribute(val id: Long) { - VendorName(0L), - VendorID(1L), - ApplicationName(2L), - ProductID(3L), - Application(4L), - Status(5L), - ApplicationVersion(6L), - AllowedVendorList(7L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - throw NoSuchFieldError() - } - - companion object { - const val ID = 1293L - } - } - - class AccountLogin : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - GetSetupPIN(0L), - Login(2L), - Logout(3L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetSetupPINCommandField(val id: Int) { - TempAccountIdentifier(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetSetupPINCommandField { - for (field in GetSetupPINCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class LoginCommandField(val id: Int) { - TempAccountIdentifier(0), - SetupPIN(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): LoginCommandField { - for (field in LoginCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 1294L - } - } - - class ElectricalMeasurement : BaseCluster { - enum class Attribute(val id: Long) { - MeasurementType(0L), - DcVoltage(256L), - DcVoltageMin(257L), - DcVoltageMax(258L), - DcCurrent(259L), - DcCurrentMin(260L), - DcCurrentMax(261L), - DcPower(262L), - DcPowerMin(263L), - DcPowerMax(264L), - DcVoltageMultiplier(512L), - DcVoltageDivisor(513L), - DcCurrentMultiplier(514L), - DcCurrentDivisor(515L), - DcPowerMultiplier(516L), - DcPowerDivisor(517L), - AcFrequency(768L), - AcFrequencyMin(769L), - AcFrequencyMax(770L), - NeutralCurrent(771L), - TotalActivePower(772L), - TotalReactivePower(773L), - TotalApparentPower(774L), - Measured1stHarmonicCurrent(775L), - Measured3rdHarmonicCurrent(776L), - Measured5thHarmonicCurrent(777L), - Measured7thHarmonicCurrent(778L), - Measured9thHarmonicCurrent(779L), - Measured11thHarmonicCurrent(780L), - MeasuredPhase1stHarmonicCurrent(781L), - MeasuredPhase3rdHarmonicCurrent(782L), - MeasuredPhase5thHarmonicCurrent(783L), - MeasuredPhase7thHarmonicCurrent(784L), - MeasuredPhase9thHarmonicCurrent(785L), - MeasuredPhase11thHarmonicCurrent(786L), - AcFrequencyMultiplier(1024L), - AcFrequencyDivisor(1025L), - PowerMultiplier(1026L), - PowerDivisor(1027L), - HarmonicCurrentMultiplier(1028L), - PhaseHarmonicCurrentMultiplier(1029L), - InstantaneousVoltage(1280L), - InstantaneousLineCurrent(1281L), - InstantaneousActiveCurrent(1282L), - InstantaneousReactiveCurrent(1283L), - InstantaneousPower(1284L), - RmsVoltage(1285L), - RmsVoltageMin(1286L), - RmsVoltageMax(1287L), - RmsCurrent(1288L), - RmsCurrentMin(1289L), - RmsCurrentMax(1290L), - ActivePower(1291L), - ActivePowerMin(1292L), - ActivePowerMax(1293L), - ReactivePower(1294L), - ApparentPower(1295L), - PowerFactor(1296L), - AverageRmsVoltageMeasurementPeriod(1297L), - AverageRmsUnderVoltageCounter(1299L), - RmsExtremeOverVoltagePeriod(1300L), - RmsExtremeUnderVoltagePeriod(1301L), - RmsVoltageSagPeriod(1302L), - RmsVoltageSwellPeriod(1303L), - AcVoltageMultiplier(1536L), - AcVoltageDivisor(1537L), - AcCurrentMultiplier(1538L), - AcCurrentDivisor(1539L), - AcPowerMultiplier(1540L), - AcPowerDivisor(1541L), - OverloadAlarmsMask(1792L), - VoltageOverload(1793L), - CurrentOverload(1794L), - AcOverloadAlarmsMask(2048L), - AcVoltageOverload(2049L), - AcCurrentOverload(2050L), - AcActivePowerOverload(2051L), - AcReactivePowerOverload(2052L), - AverageRmsOverVoltage(2053L), - AverageRmsUnderVoltage(2054L), - RmsExtremeOverVoltage(2055L), - RmsExtremeUnderVoltage(2056L), - RmsVoltageSag(2057L), - RmsVoltageSwell(2058L), - LineCurrentPhaseB(2305L), - ActiveCurrentPhaseB(2306L), - ReactiveCurrentPhaseB(2307L), - RmsVoltagePhaseB(2309L), - RmsVoltageMinPhaseB(2310L), - RmsVoltageMaxPhaseB(2311L), - RmsCurrentPhaseB(2312L), - RmsCurrentMinPhaseB(2313L), - RmsCurrentMaxPhaseB(2314L), - ActivePowerPhaseB(2315L), - ActivePowerMinPhaseB(2316L), - ActivePowerMaxPhaseB(2317L), - ReactivePowerPhaseB(2318L), - ApparentPowerPhaseB(2319L), - PowerFactorPhaseB(2320L), - AverageRmsVoltageMeasurementPeriodPhaseB(2321L), - AverageRmsOverVoltageCounterPhaseB(2322L), - AverageRmsUnderVoltageCounterPhaseB(2323L), - RmsExtremeOverVoltagePeriodPhaseB(2324L), - RmsExtremeUnderVoltagePeriodPhaseB(2325L), - RmsVoltageSagPeriodPhaseB(2326L), - RmsVoltageSwellPeriodPhaseB(2327L), - LineCurrentPhaseC(2561L), - ActiveCurrentPhaseC(2562L), - ReactiveCurrentPhaseC(2563L), - RmsVoltagePhaseC(2565L), - RmsVoltageMinPhaseC(2566L), - RmsVoltageMaxPhaseC(2567L), - RmsCurrentPhaseC(2568L), - RmsCurrentMinPhaseC(2569L), - RmsCurrentMaxPhaseC(2570L), - ActivePowerPhaseC(2571L), - ActivePowerMinPhaseC(2572L), - ActivePowerMaxPhaseC(2573L), - ReactivePowerPhaseC(2574L), - ApparentPowerPhaseC(2575L), - PowerFactorPhaseC(2576L), - AverageRmsVoltageMeasurementPeriodPhaseC(2577L), - AverageRmsOverVoltageCounterPhaseC(2578L), - AverageRmsUnderVoltageCounterPhaseC(2579L), - RmsExtremeOverVoltagePeriodPhaseC(2580L), - RmsExtremeUnderVoltagePeriodPhaseC(2581L), - RmsVoltageSagPeriodPhaseC(2582L), - RmsVoltageSwellPeriodPhaseC(2583L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - GetProfileInfoCommand(0L), - GetMeasurementProfileCommand(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class GetMeasurementProfileCommandCommandField(val id: Int) { - AttributeId(0), - StartTime(1), - NumberOfIntervals(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): GetMeasurementProfileCommandCommandField { - for (field in GetMeasurementProfileCommandCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 2820L - } - } - - class UnitTesting : BaseCluster { - enum class Attribute(val id: Long) { - Boolean(0L), - Bitmap8(1L), - Bitmap16(2L), - Bitmap32(3L), - Bitmap64(4L), - Int8u(5L), - Int16u(6L), - Int24u(7L), - Int32u(8L), - Int40u(9L), - Int48u(10L), - Int56u(11L), - Int64u(12L), - Int8s(13L), - Int16s(14L), - Int24s(15L), - Int32s(16L), - Int40s(17L), - Int48s(18L), - Int56s(19L), - Int64s(20L), - Enum8(21L), - Enum16(22L), - FloatSingle(23L), - FloatDouble(24L), - OctetString(25L), - ListInt8u(26L), - ListOctetString(27L), - ListStructOctetString(28L), - LongOctetString(29L), - CharString(30L), - LongCharString(31L), - EpochUs(32L), - EpochS(33L), - VendorId(34L), - ListNullablesAndOptionalsStruct(35L), - EnumAttr(36L), - StructAttr(37L), - RangeRestrictedInt8u(38L), - RangeRestrictedInt8s(39L), - RangeRestrictedInt16u(40L), - RangeRestrictedInt16s(41L), - ListLongOctetString(42L), - ListFabricScoped(43L), - TimedWriteBoolean(48L), - GeneralErrorBoolean(49L), - ClusterErrorBoolean(50L), - Unsupported(255L), - NullableBoolean(16384L), - NullableBitmap8(16385L), - NullableBitmap16(16386L), - NullableBitmap32(16387L), - NullableBitmap64(16388L), - NullableInt8u(16389L), - NullableInt16u(16390L), - NullableInt24u(16391L), - NullableInt32u(16392L), - NullableInt40u(16393L), - NullableInt48u(16394L), - NullableInt56u(16395L), - NullableInt64u(16396L), - NullableInt8s(16397L), - NullableInt16s(16398L), - NullableInt24s(16399L), - NullableInt32s(16400L), - NullableInt40s(16401L), - NullableInt48s(16402L), - NullableInt56s(16403L), - NullableInt64s(16404L), - NullableEnum8(16405L), - NullableEnum16(16406L), - NullableFloatSingle(16407L), - NullableFloatDouble(16408L), - NullableOctetString(16409L), - NullableCharString(16414L), - NullableEnumAttr(16420L), - NullableStruct(16421L), - NullableRangeRestrictedInt8u(16422L), - NullableRangeRestrictedInt8s(16423L), - NullableRangeRestrictedInt16u(16424L), - NullableRangeRestrictedInt16s(16425L), - WriteOnlyInt8u(16426L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Event(val id: Long) { - TestEvent(1L), - TestFabricScopedEvent(2L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Event { - for (event in Event.values()) { - if (event.id == id) { - return event - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - Test(0L), - TestNotHandled(1L), - TestSpecific(2L), - TestUnknownCommand(3L), - TestAddArguments(4L), - TestSimpleArgumentRequest(5L), - TestStructArrayArgumentRequest(6L), - TestStructArgumentRequest(7L), - TestNestedStructArgumentRequest(8L), - TestListStructArgumentRequest(9L), - TestListInt8UArgumentRequest(10L), - TestNestedStructListArgumentRequest(11L), - TestListNestedStructListArgumentRequest(12L), - TestListInt8UReverseRequest(13L), - TestEnumsRequest(14L), - TestNullableOptionalRequest(15L), - TestComplexNullableOptionalRequest(16L), - SimpleStructEchoRequest(17L), - TimedInvokeRequest(18L), - TestSimpleOptionalArgumentRequest(19L), - TestEmitTestEventRequest(20L), - TestEmitTestFabricScopedEventRequest(21L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestAddArgumentsCommandField(val id: Int) { - Arg1(0), - Arg2(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestAddArgumentsCommandField { - for (field in TestAddArgumentsCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestSimpleArgumentRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestSimpleArgumentRequestCommandField { - for (field in TestSimpleArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestStructArrayArgumentRequestCommandField(val id: Int) { - Arg1(0), - Arg2(1), - Arg3(2), - Arg4(3), - Arg5(4), - Arg6(5); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestStructArrayArgumentRequestCommandField { - for (field in TestStructArrayArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestStructArgumentRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestStructArgumentRequestCommandField { - for (field in TestStructArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestNestedStructArgumentRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestNestedStructArgumentRequestCommandField { - for (field in TestNestedStructArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestListStructArgumentRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestListStructArgumentRequestCommandField { - for (field in TestListStructArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestListInt8UArgumentRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestListInt8UArgumentRequestCommandField { - for (field in TestListInt8UArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestNestedStructListArgumentRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestNestedStructListArgumentRequestCommandField { - for (field in TestNestedStructListArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestListNestedStructListArgumentRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestListNestedStructListArgumentRequestCommandField { - for (field in TestListNestedStructListArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestListInt8UReverseRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestListInt8UReverseRequestCommandField { - for (field in TestListInt8UReverseRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestEnumsRequestCommandField(val id: Int) { - Arg1(0), - Arg2(1); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestEnumsRequestCommandField { - for (field in TestEnumsRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestNullableOptionalRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestNullableOptionalRequestCommandField { - for (field in TestNullableOptionalRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestComplexNullableOptionalRequestCommandField(val id: Int) { - NullableInt(0), - OptionalInt(1), - NullableOptionalInt(2), - NullableString(3), - OptionalString(4), - NullableOptionalString(5), - NullableStruct(6), - OptionalStruct(7), - NullableOptionalStruct(8), - NullableList(9), - OptionalList(10), - NullableOptionalList(11); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestComplexNullableOptionalRequestCommandField { - for (field in TestComplexNullableOptionalRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class SimpleStructEchoRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): SimpleStructEchoRequestCommandField { - for (field in SimpleStructEchoRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestSimpleOptionalArgumentRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestSimpleOptionalArgumentRequestCommandField { - for (field in TestSimpleOptionalArgumentRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestEmitTestEventRequestCommandField(val id: Int) { - Arg1(0), - Arg2(1), - Arg3(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestEmitTestEventRequestCommandField { - for (field in TestEmitTestEventRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class TestEmitTestFabricScopedEventRequestCommandField(val id: Int) { - Arg1(0); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): TestEmitTestFabricScopedEventRequestCommandField { - for (field in TestEmitTestFabricScopedEventRequestCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - return Event.value(id).toString() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - return Event.valueOf(name).id - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 4294048773L - } - } - - class FaultInjection : BaseCluster { - enum class Attribute(val id: Long) { - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Attribute { - for (attribute in Attribute.values()) { - if (attribute.id == id) { - return attribute - } - } - throw NoSuchFieldError() - } - } - } - - enum class Command(val id: Long) { - FailAtFault(0L), - FailRandomlyAtFault(1L); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Long): Command { - for (command in Command.values()) { - if (command.id == id) { - return command - } - } - throw NoSuchFieldError() - } - } - } - - enum class FailAtFaultCommandField(val id: Int) { - Type(0), - Id(1), - NumCallsToSkip(2), - NumCallsToFail(3), - TakeMutex(4); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): FailAtFaultCommandField { - for (field in FailAtFaultCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - enum class FailRandomlyAtFaultCommandField(val id: Int) { - Type(0), - Id(1), - Percentage(2); - - companion object { - @Throws(NoSuchFieldError::class) - fun value(id: Int): FailRandomlyAtFaultCommandField { - for (field in FailRandomlyAtFaultCommandField.values()) { - if (field.id == id) { - return field - } - } - throw NoSuchFieldError() - } - } - } - - override fun getID(): Long { - return ID - } - - override fun getAttributeName(id: Long): String { - return Attribute.value(id).toString() - } - - override fun getEventName(id: Long): String { - throw IllegalArgumentException() - } - - override fun getCommandName(id: Long): String { - return Command.value(id).toString() - } - - override fun getAttributeID(name: String): Long { - return Attribute.valueOf(name).id - } - - override fun getEventID(name: String): Long { - throw NoSuchFieldError() - } - - override fun getCommandID(name: String): Long { - return Command.valueOf(name).id - } - - companion object { - const val ID = 4294048774L - } - } - - companion object { - fun getCluster(clusterId: Long): BaseCluster? { - if (clusterId == Identify.ID) { - return Identify() - } - if (clusterId == Groups.ID) { - return Groups() - } - if (clusterId == Scenes.ID) { - return Scenes() - } - if (clusterId == OnOff.ID) { - return OnOff() - } - if (clusterId == OnOffSwitchConfiguration.ID) { - return OnOffSwitchConfiguration() - } - if (clusterId == LevelControl.ID) { - return LevelControl() - } - if (clusterId == BinaryInputBasic.ID) { - return BinaryInputBasic() - } - if (clusterId == PulseWidthModulation.ID) { - return PulseWidthModulation() - } - if (clusterId == Descriptor.ID) { - return Descriptor() - } - if (clusterId == Binding.ID) { - return Binding() - } - if (clusterId == AccessControl.ID) { - return AccessControl() - } - if (clusterId == Actions.ID) { - return Actions() - } - if (clusterId == BasicInformation.ID) { - return BasicInformation() - } - if (clusterId == OtaSoftwareUpdateProvider.ID) { - return OtaSoftwareUpdateProvider() - } - if (clusterId == OtaSoftwareUpdateRequestor.ID) { - return OtaSoftwareUpdateRequestor() - } - if (clusterId == LocalizationConfiguration.ID) { - return LocalizationConfiguration() - } - if (clusterId == TimeFormatLocalization.ID) { - return TimeFormatLocalization() - } - if (clusterId == UnitLocalization.ID) { - return UnitLocalization() - } - if (clusterId == PowerSourceConfiguration.ID) { - return PowerSourceConfiguration() - } - if (clusterId == PowerSource.ID) { - return PowerSource() - } - if (clusterId == GeneralCommissioning.ID) { - return GeneralCommissioning() - } - if (clusterId == NetworkCommissioning.ID) { - return NetworkCommissioning() - } - if (clusterId == DiagnosticLogs.ID) { - return DiagnosticLogs() - } - if (clusterId == GeneralDiagnostics.ID) { - return GeneralDiagnostics() - } - if (clusterId == SoftwareDiagnostics.ID) { - return SoftwareDiagnostics() - } - if (clusterId == ThreadNetworkDiagnostics.ID) { - return ThreadNetworkDiagnostics() - } - if (clusterId == WiFiNetworkDiagnostics.ID) { - return WiFiNetworkDiagnostics() - } - if (clusterId == EthernetNetworkDiagnostics.ID) { - return EthernetNetworkDiagnostics() - } - if (clusterId == TimeSynchronization.ID) { - return TimeSynchronization() - } - if (clusterId == BridgedDeviceBasicInformation.ID) { - return BridgedDeviceBasicInformation() - } - if (clusterId == Switch.ID) { - return Switch() - } - if (clusterId == AdministratorCommissioning.ID) { - return AdministratorCommissioning() - } - if (clusterId == OperationalCredentials.ID) { - return OperationalCredentials() - } - if (clusterId == GroupKeyManagement.ID) { - return GroupKeyManagement() - } - if (clusterId == FixedLabel.ID) { - return FixedLabel() - } - if (clusterId == UserLabel.ID) { - return UserLabel() - } - if (clusterId == ProxyConfiguration.ID) { - return ProxyConfiguration() - } - if (clusterId == ProxyDiscovery.ID) { - return ProxyDiscovery() - } - if (clusterId == ProxyValid.ID) { - return ProxyValid() - } - if (clusterId == BooleanState.ID) { - return BooleanState() - } - if (clusterId == IcdManagement.ID) { - return IcdManagement() - } - if (clusterId == ModeSelect.ID) { - return ModeSelect() - } - if (clusterId == LaundryWasherMode.ID) { - return LaundryWasherMode() - } - if (clusterId == RefrigeratorAndTemperatureControlledCabinetMode.ID) { - return RefrigeratorAndTemperatureControlledCabinetMode() - } - if (clusterId == LaundryWasherControls.ID) { - return LaundryWasherControls() - } - if (clusterId == RvcRunMode.ID) { - return RvcRunMode() - } - if (clusterId == RvcCleanMode.ID) { - return RvcCleanMode() - } - if (clusterId == TemperatureControl.ID) { - return TemperatureControl() - } - if (clusterId == RefrigeratorAlarm.ID) { - return RefrigeratorAlarm() - } - if (clusterId == DishwasherMode.ID) { - return DishwasherMode() - } - if (clusterId == AirQuality.ID) { - return AirQuality() - } - if (clusterId == SmokeCoAlarm.ID) { - return SmokeCoAlarm() - } - if (clusterId == DishwasherAlarm.ID) { - return DishwasherAlarm() - } - if (clusterId == OperationalState.ID) { - return OperationalState() - } - if (clusterId == RvcOperationalState.ID) { - return RvcOperationalState() - } - if (clusterId == HepaFilterMonitoring.ID) { - return HepaFilterMonitoring() - } - if (clusterId == ActivatedCarbonFilterMonitoring.ID) { - return ActivatedCarbonFilterMonitoring() - } - if (clusterId == DoorLock.ID) { - return DoorLock() - } - if (clusterId == WindowCovering.ID) { - return WindowCovering() - } - if (clusterId == BarrierControl.ID) { - return BarrierControl() - } - if (clusterId == PumpConfigurationAndControl.ID) { - return PumpConfigurationAndControl() - } - if (clusterId == Thermostat.ID) { - return Thermostat() - } - if (clusterId == FanControl.ID) { - return FanControl() - } - if (clusterId == ThermostatUserInterfaceConfiguration.ID) { - return ThermostatUserInterfaceConfiguration() - } - if (clusterId == ColorControl.ID) { - return ColorControl() - } - if (clusterId == BallastConfiguration.ID) { - return BallastConfiguration() - } - if (clusterId == IlluminanceMeasurement.ID) { - return IlluminanceMeasurement() - } - if (clusterId == TemperatureMeasurement.ID) { - return TemperatureMeasurement() - } - if (clusterId == PressureMeasurement.ID) { - return PressureMeasurement() - } - if (clusterId == FlowMeasurement.ID) { - return FlowMeasurement() - } - if (clusterId == RelativeHumidityMeasurement.ID) { - return RelativeHumidityMeasurement() - } - if (clusterId == OccupancySensing.ID) { - return OccupancySensing() - } - if (clusterId == CarbonMonoxideConcentrationMeasurement.ID) { - return CarbonMonoxideConcentrationMeasurement() - } - if (clusterId == CarbonDioxideConcentrationMeasurement.ID) { - return CarbonDioxideConcentrationMeasurement() - } - if (clusterId == NitrogenDioxideConcentrationMeasurement.ID) { - return NitrogenDioxideConcentrationMeasurement() - } - if (clusterId == OzoneConcentrationMeasurement.ID) { - return OzoneConcentrationMeasurement() - } - if (clusterId == Pm25ConcentrationMeasurement.ID) { - return Pm25ConcentrationMeasurement() - } - if (clusterId == FormaldehydeConcentrationMeasurement.ID) { - return FormaldehydeConcentrationMeasurement() - } - if (clusterId == Pm1ConcentrationMeasurement.ID) { - return Pm1ConcentrationMeasurement() - } - if (clusterId == Pm10ConcentrationMeasurement.ID) { - return Pm10ConcentrationMeasurement() - } - if (clusterId == TotalVolatileOrganicCompoundsConcentrationMeasurement.ID) { - return TotalVolatileOrganicCompoundsConcentrationMeasurement() - } - if (clusterId == RadonConcentrationMeasurement.ID) { - return RadonConcentrationMeasurement() - } - if (clusterId == WakeOnLan.ID) { - return WakeOnLan() - } - if (clusterId == Channel.ID) { - return Channel() - } - if (clusterId == TargetNavigator.ID) { - return TargetNavigator() - } - if (clusterId == MediaPlayback.ID) { - return MediaPlayback() - } - if (clusterId == MediaInput.ID) { - return MediaInput() - } - if (clusterId == LowPower.ID) { - return LowPower() - } - if (clusterId == KeypadInput.ID) { - return KeypadInput() - } - if (clusterId == ContentLauncher.ID) { - return ContentLauncher() - } - if (clusterId == AudioOutput.ID) { - return AudioOutput() - } - if (clusterId == ApplicationLauncher.ID) { - return ApplicationLauncher() - } - if (clusterId == ApplicationBasic.ID) { - return ApplicationBasic() - } - if (clusterId == AccountLogin.ID) { - return AccountLogin() - } - if (clusterId == ElectricalMeasurement.ID) { - return ElectricalMeasurement() - } - if (clusterId == UnitTesting.ID) { - return UnitTesting() - } - if (clusterId == FaultInjection.ID) { - return FaultInjection() - } - return null - } - } - - interface BaseCluster { - fun getID(): Long - - @Throws(NoSuchFieldError::class) fun getAttributeName(id: Long): String - - @Throws(NoSuchFieldError::class) fun getEventName(id: Long): String - - @Throws(NoSuchFieldError::class) fun getCommandName(id: Long): String - - @Throws(IllegalArgumentException::class) fun getAttributeID(name: String): Long - - @Throws(IllegalArgumentException::class) fun getEventID(name: String): Long - - @Throws(IllegalArgumentException::class) fun getCommandID(name: String): Long - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AccessControl.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AccessControl.kt new file mode 100644 index 00000000000000..6437559d2e2eee --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AccessControl.kt @@ -0,0 +1,123 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object AccessControl : BaseCluster() { + const val ID = 31L + + sealed class Attribute(val id: Long, val name: String) { + object Acl : Attribute(0L, "Acl") + + object Extension : Attribute(1L, "Extension") + + object SubjectsPerAccessControlEntry : Attribute(2L, "SubjectsPerAccessControlEntry") + + object TargetsPerAccessControlEntry : Attribute(3L, "TargetsPerAccessControlEntry") + + object AccessControlEntriesPerFabric : Attribute(4L, "AccessControlEntriesPerFabric") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object AccessControlEntryChanged : Event(0L, "AccessControlEntryChanged") + + object AccessControlExtensionChanged : Event(1L, "AccessControlExtensionChanged") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AccountLogin.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AccountLogin.kt new file mode 100644 index 00000000000000..0fdc6d205330b8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AccountLogin.kt @@ -0,0 +1,177 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object AccountLogin : BaseCluster() { + const val ID = 1294L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object GetSetupPIN : Command(0L, "GetSetupPIN") + + object Login : Command(2L, "Login") + + object Logout : Command(3L, "Logout") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetSetupPINCommandField(val id: Int, val name: String) { + object TempAccountIdentifier : GetSetupPINCommandField(0, "TempAccountIdentifier") + + companion object { + fun values(): List { + return GetSetupPINCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetSetupPINCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetSetupPINCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class LoginCommandField(val id: Int, val name: String) { + object TempAccountIdentifier : LoginCommandField(0, "TempAccountIdentifier") + + object SetupPIN : LoginCommandField(1, "SetupPIN") + + companion object { + fun values(): List { + return LoginCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): LoginCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): LoginCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Actions.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Actions.kt new file mode 100644 index 00000000000000..f77b058f80767b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Actions.kt @@ -0,0 +1,583 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Actions : BaseCluster() { + const val ID = 37L + + sealed class Attribute(val id: Long, val name: String) { + object ActionList : Attribute(0L, "ActionList") + + object EndpointLists : Attribute(1L, "EndpointLists") + + object SetupURL : Attribute(2L, "SetupURL") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object StateChanged : Event(0L, "StateChanged") + + object ActionFailed : Event(1L, "ActionFailed") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object InstantAction : Command(0L, "InstantAction") + + object InstantActionWithTransition : Command(1L, "InstantActionWithTransition") + + object StartAction : Command(2L, "StartAction") + + object StartActionWithDuration : Command(3L, "StartActionWithDuration") + + object StopAction : Command(4L, "StopAction") + + object PauseAction : Command(5L, "PauseAction") + + object PauseActionWithDuration : Command(6L, "PauseActionWithDuration") + + object ResumeAction : Command(7L, "ResumeAction") + + object EnableAction : Command(8L, "EnableAction") + + object EnableActionWithDuration : Command(9L, "EnableActionWithDuration") + + object DisableAction : Command(10L, "DisableAction") + + object DisableActionWithDuration : Command(11L, "DisableActionWithDuration") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class InstantActionCommandField(val id: Int, val name: String) { + object ActionID : InstantActionCommandField(0, "ActionID") + + object InvokeID : InstantActionCommandField(1, "InvokeID") + + companion object { + fun values(): List { + return InstantActionCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): InstantActionCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): InstantActionCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class InstantActionWithTransitionCommandField(val id: Int, val name: String) { + object ActionID : InstantActionWithTransitionCommandField(0, "ActionID") + + object InvokeID : InstantActionWithTransitionCommandField(1, "InvokeID") + + object TransitionTime : InstantActionWithTransitionCommandField(2, "TransitionTime") + + companion object { + fun values(): List { + return InstantActionWithTransitionCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): InstantActionWithTransitionCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): InstantActionWithTransitionCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StartActionCommandField(val id: Int, val name: String) { + object ActionID : StartActionCommandField(0, "ActionID") + + object InvokeID : StartActionCommandField(1, "InvokeID") + + companion object { + fun values(): List { + return StartActionCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StartActionCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StartActionCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StartActionWithDurationCommandField(val id: Int, val name: String) { + object ActionID : StartActionWithDurationCommandField(0, "ActionID") + + object InvokeID : StartActionWithDurationCommandField(1, "InvokeID") + + object Duration : StartActionWithDurationCommandField(2, "Duration") + + companion object { + fun values(): List { + return StartActionWithDurationCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StartActionWithDurationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StartActionWithDurationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StopActionCommandField(val id: Int, val name: String) { + object ActionID : StopActionCommandField(0, "ActionID") + + object InvokeID : StopActionCommandField(1, "InvokeID") + + companion object { + fun values(): List { + return StopActionCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StopActionCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StopActionCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class PauseActionCommandField(val id: Int, val name: String) { + object ActionID : PauseActionCommandField(0, "ActionID") + + object InvokeID : PauseActionCommandField(1, "InvokeID") + + companion object { + fun values(): List { + return PauseActionCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): PauseActionCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): PauseActionCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class PauseActionWithDurationCommandField(val id: Int, val name: String) { + object ActionID : PauseActionWithDurationCommandField(0, "ActionID") + + object InvokeID : PauseActionWithDurationCommandField(1, "InvokeID") + + object Duration : PauseActionWithDurationCommandField(2, "Duration") + + companion object { + fun values(): List { + return PauseActionWithDurationCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): PauseActionWithDurationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): PauseActionWithDurationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ResumeActionCommandField(val id: Int, val name: String) { + object ActionID : ResumeActionCommandField(0, "ActionID") + + object InvokeID : ResumeActionCommandField(1, "InvokeID") + + companion object { + fun values(): List { + return ResumeActionCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ResumeActionCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ResumeActionCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class EnableActionCommandField(val id: Int, val name: String) { + object ActionID : EnableActionCommandField(0, "ActionID") + + object InvokeID : EnableActionCommandField(1, "InvokeID") + + companion object { + fun values(): List { + return EnableActionCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): EnableActionCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): EnableActionCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class EnableActionWithDurationCommandField(val id: Int, val name: String) { + object ActionID : EnableActionWithDurationCommandField(0, "ActionID") + + object InvokeID : EnableActionWithDurationCommandField(1, "InvokeID") + + object Duration : EnableActionWithDurationCommandField(2, "Duration") + + companion object { + fun values(): List { + return EnableActionWithDurationCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): EnableActionWithDurationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): EnableActionWithDurationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class DisableActionCommandField(val id: Int, val name: String) { + object ActionID : DisableActionCommandField(0, "ActionID") + + object InvokeID : DisableActionCommandField(1, "InvokeID") + + companion object { + fun values(): List { + return DisableActionCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): DisableActionCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): DisableActionCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class DisableActionWithDurationCommandField(val id: Int, val name: String) { + object ActionID : DisableActionWithDurationCommandField(0, "ActionID") + + object InvokeID : DisableActionWithDurationCommandField(1, "InvokeID") + + object Duration : DisableActionWithDurationCommandField(2, "Duration") + + companion object { + fun values(): List { + return DisableActionWithDurationCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): DisableActionWithDurationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): DisableActionWithDurationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ActivatedCarbonFilterMonitoring.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ActivatedCarbonFilterMonitoring.kt new file mode 100644 index 00000000000000..272680495fa09a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ActivatedCarbonFilterMonitoring.kt @@ -0,0 +1,123 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ActivatedCarbonFilterMonitoring : BaseCluster() { + const val ID = 114L + + sealed class Attribute(val id: Long, val name: String) { + object Condition : Attribute(0L, "Condition") + + object DegradationDirection : Attribute(1L, "DegradationDirection") + + object ChangeIndication : Attribute(2L, "ChangeIndication") + + object InPlaceIndicator : Attribute(3L, "InPlaceIndicator") + + object LastChangedTime : Attribute(4L, "LastChangedTime") + + object ReplacementProductList : Attribute(5L, "ReplacementProductList") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ResetCondition : Command(0L, "ResetCondition") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AdministratorCommissioning.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AdministratorCommissioning.kt new file mode 100644 index 00000000000000..1b9d2faa5cfd96 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AdministratorCommissioning.kt @@ -0,0 +1,194 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object AdministratorCommissioning : BaseCluster() { + const val ID = 60L + + sealed class Attribute(val id: Long, val name: String) { + object WindowStatus : Attribute(0L, "WindowStatus") + + object AdminFabricIndex : Attribute(1L, "AdminFabricIndex") + + object AdminVendorId : Attribute(2L, "AdminVendorId") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object OpenCommissioningWindow : Command(0L, "OpenCommissioningWindow") + + object OpenBasicCommissioningWindow : Command(1L, "OpenBasicCommissioningWindow") + + object RevokeCommissioning : Command(2L, "RevokeCommissioning") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class OpenCommissioningWindowCommandField(val id: Int, val name: String) { + object CommissioningTimeout : OpenCommissioningWindowCommandField(0, "CommissioningTimeout") + + object PAKEPasscodeVerifier : OpenCommissioningWindowCommandField(1, "PAKEPasscodeVerifier") + + object Discriminator : OpenCommissioningWindowCommandField(2, "Discriminator") + + object Iterations : OpenCommissioningWindowCommandField(3, "Iterations") + + object Salt : OpenCommissioningWindowCommandField(4, "Salt") + + companion object { + fun values(): List { + return OpenCommissioningWindowCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): OpenCommissioningWindowCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): OpenCommissioningWindowCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class OpenBasicCommissioningWindowCommandField(val id: Int, val name: String) { + object CommissioningTimeout : + OpenBasicCommissioningWindowCommandField(0, "CommissioningTimeout") + + companion object { + fun values(): List { + return OpenBasicCommissioningWindowCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): OpenBasicCommissioningWindowCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): OpenBasicCommissioningWindowCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AirQuality.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AirQuality.kt new file mode 100644 index 00000000000000..6d37723156f277 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AirQuality.kt @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object AirQuality : BaseCluster() { + const val ID = 91L + + sealed class Attribute(val id: Long, val name: String) { + object AirQuality : Attribute(0L, "AirQuality") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ApplicationBasic.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ApplicationBasic.kt new file mode 100644 index 00000000000000..5f08ffc7fd3cde --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ApplicationBasic.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ApplicationBasic : BaseCluster() { + const val ID = 1293L + + sealed class Attribute(val id: Long, val name: String) { + object VendorName : Attribute(0L, "VendorName") + + object VendorID : Attribute(1L, "VendorID") + + object ApplicationName : Attribute(2L, "ApplicationName") + + object ProductID : Attribute(3L, "ProductID") + + object Application : Attribute(4L, "Application") + + object Status : Attribute(5L, "Status") + + object ApplicationVersion : Attribute(6L, "ApplicationVersion") + + object AllowedVendorList : Attribute(7L, "AllowedVendorList") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ApplicationLauncher.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ApplicationLauncher.kt new file mode 100644 index 00000000000000..dd8ab797d8feb1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ApplicationLauncher.kt @@ -0,0 +1,211 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ApplicationLauncher : BaseCluster() { + const val ID = 1292L + + sealed class Attribute(val id: Long, val name: String) { + object CatalogList : Attribute(0L, "CatalogList") + + object CurrentApp : Attribute(1L, "CurrentApp") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object LaunchApp : Command(0L, "LaunchApp") + + object StopApp : Command(1L, "StopApp") + + object HideApp : Command(2L, "HideApp") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class LaunchAppCommandField(val id: Int, val name: String) { + object Application : LaunchAppCommandField(0, "Application") + + object Data : LaunchAppCommandField(1, "Data") + + companion object { + fun values(): List { + return LaunchAppCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): LaunchAppCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): LaunchAppCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StopAppCommandField(val id: Int, val name: String) { + object Application : StopAppCommandField(0, "Application") + + companion object { + fun values(): List { + return StopAppCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StopAppCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StopAppCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class HideAppCommandField(val id: Int, val name: String) { + object Application : HideAppCommandField(0, "Application") + + companion object { + fun values(): List { + return HideAppCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): HideAppCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): HideAppCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AudioOutput.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AudioOutput.kt new file mode 100644 index 00000000000000..554d7fb7641227 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AudioOutput.kt @@ -0,0 +1,179 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object AudioOutput : BaseCluster() { + const val ID = 1291L + + sealed class Attribute(val id: Long, val name: String) { + object OutputList : Attribute(0L, "OutputList") + + object CurrentOutput : Attribute(1L, "CurrentOutput") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object SelectOutput : Command(0L, "SelectOutput") + + object RenameOutput : Command(1L, "RenameOutput") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SelectOutputCommandField(val id: Int, val name: String) { + object Index : SelectOutputCommandField(0, "Index") + + companion object { + fun values(): List { + return SelectOutputCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SelectOutputCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SelectOutputCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RenameOutputCommandField(val id: Int, val name: String) { + object Index : RenameOutputCommandField(0, "Index") + + object Name : RenameOutputCommandField(1, "Name") + + companion object { + fun values(): List { + return RenameOutputCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RenameOutputCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RenameOutputCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BallastConfiguration.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BallastConfiguration.kt new file mode 100644 index 00000000000000..eb162396b8cfe2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BallastConfiguration.kt @@ -0,0 +1,101 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object BallastConfiguration : BaseCluster() { + const val ID = 769L + + sealed class Attribute(val id: Long, val name: String) { + object PhysicalMinLevel : Attribute(0L, "PhysicalMinLevel") + + object PhysicalMaxLevel : Attribute(1L, "PhysicalMaxLevel") + + object BallastStatus : Attribute(2L, "BallastStatus") + + object MinLevel : Attribute(16L, "MinLevel") + + object MaxLevel : Attribute(17L, "MaxLevel") + + object IntrinsicBallastFactor : Attribute(20L, "IntrinsicBallastFactor") + + object BallastFactorAdjustment : Attribute(21L, "BallastFactorAdjustment") + + object LampQuantity : Attribute(32L, "LampQuantity") + + object LampType : Attribute(48L, "LampType") + + object LampManufacturer : Attribute(49L, "LampManufacturer") + + object LampRatedHours : Attribute(50L, "LampRatedHours") + + object LampBurnHours : Attribute(51L, "LampBurnHours") + + object LampAlarmMode : Attribute(52L, "LampAlarmMode") + + object LampBurnHoursTripPoint : Attribute(53L, "LampBurnHoursTripPoint") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BarrierControl.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BarrierControl.kt new file mode 100644 index 00000000000000..2b1ca6e1a24b34 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BarrierControl.kt @@ -0,0 +1,165 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object BarrierControl : BaseCluster() { + const val ID = 259L + + sealed class Attribute(val id: Long, val name: String) { + object BarrierMovingState : Attribute(1L, "BarrierMovingState") + + object BarrierSafetyStatus : Attribute(2L, "BarrierSafetyStatus") + + object BarrierCapabilities : Attribute(3L, "BarrierCapabilities") + + object BarrierOpenEvents : Attribute(4L, "BarrierOpenEvents") + + object BarrierCloseEvents : Attribute(5L, "BarrierCloseEvents") + + object BarrierCommandOpenEvents : Attribute(6L, "BarrierCommandOpenEvents") + + object BarrierCommandCloseEvents : Attribute(7L, "BarrierCommandCloseEvents") + + object BarrierOpenPeriod : Attribute(8L, "BarrierOpenPeriod") + + object BarrierClosePeriod : Attribute(9L, "BarrierClosePeriod") + + object BarrierPosition : Attribute(10L, "BarrierPosition") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object BarrierControlGoToPercent : Command(0L, "BarrierControlGoToPercent") + + object BarrierControlStop : Command(1L, "BarrierControlStop") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class BarrierControlGoToPercentCommandField(val id: Int, val name: String) { + object PercentOpen : BarrierControlGoToPercentCommandField(0, "PercentOpen") + + companion object { + fun values(): List { + return BarrierControlGoToPercentCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): BarrierControlGoToPercentCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): BarrierControlGoToPercentCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BasicInformation.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BasicInformation.kt new file mode 100644 index 00000000000000..300fbbbf5086de --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BasicInformation.kt @@ -0,0 +1,197 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object BasicInformation : BaseCluster() { + const val ID = 40L + + sealed class Attribute(val id: Long, val name: String) { + object DataModelRevision : Attribute(0L, "DataModelRevision") + + object VendorName : Attribute(1L, "VendorName") + + object VendorID : Attribute(2L, "VendorID") + + object ProductName : Attribute(3L, "ProductName") + + object ProductID : Attribute(4L, "ProductID") + + object NodeLabel : Attribute(5L, "NodeLabel") + + object Location : Attribute(6L, "Location") + + object HardwareVersion : Attribute(7L, "HardwareVersion") + + object HardwareVersionString : Attribute(8L, "HardwareVersionString") + + object SoftwareVersion : Attribute(9L, "SoftwareVersion") + + object SoftwareVersionString : Attribute(10L, "SoftwareVersionString") + + object ManufacturingDate : Attribute(11L, "ManufacturingDate") + + object PartNumber : Attribute(12L, "PartNumber") + + object ProductURL : Attribute(13L, "ProductURL") + + object ProductLabel : Attribute(14L, "ProductLabel") + + object SerialNumber : Attribute(15L, "SerialNumber") + + object LocalConfigDisabled : Attribute(16L, "LocalConfigDisabled") + + object Reachable : Attribute(17L, "Reachable") + + object UniqueID : Attribute(18L, "UniqueID") + + object CapabilityMinima : Attribute(19L, "CapabilityMinima") + + object ProductAppearance : Attribute(20L, "ProductAppearance") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object StartUp : Event(0L, "StartUp") + + object ShutDown : Event(1L, "ShutDown") + + object Leave : Event(2L, "Leave") + + object ReachableChanged : Event(3L, "ReachableChanged") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object MfgSpecificPing : Command(0L, "MfgSpecificPing") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BinaryInputBasic.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BinaryInputBasic.kt new file mode 100644 index 00000000000000..c3b2a88af9d7c7 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BinaryInputBasic.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object BinaryInputBasic : BaseCluster() { + const val ID = 15L + + sealed class Attribute(val id: Long, val name: String) { + object ActiveText : Attribute(4L, "ActiveText") + + object Description : Attribute(28L, "Description") + + object InactiveText : Attribute(46L, "InactiveText") + + object OutOfService : Attribute(81L, "OutOfService") + + object Polarity : Attribute(84L, "Polarity") + + object PresentValue : Attribute(85L, "PresentValue") + + object Reliability : Attribute(103L, "Reliability") + + object StatusFlags : Attribute(111L, "StatusFlags") + + object ApplicationType : Attribute(256L, "ApplicationType") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Binding.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Binding.kt new file mode 100644 index 00000000000000..daea0921a0ea87 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Binding.kt @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Binding : BaseCluster() { + const val ID = 30L + + sealed class Attribute(val id: Long, val name: String) { + object Binding : Attribute(0L, "Binding") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BooleanState.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BooleanState.kt new file mode 100644 index 00000000000000..ea0a2054d21f86 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BooleanState.kt @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object BooleanState : BaseCluster() { + const val ID = 69L + + sealed class Attribute(val id: Long, val name: String) { + object StateValue : Attribute(0L, "StateValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object StateChange : Event(0L, "StateChange") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BridgedDeviceBasicInformation.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BridgedDeviceBasicInformation.kt new file mode 100644 index 00000000000000..fa9cbc0f4d2ef0 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BridgedDeviceBasicInformation.kt @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object BridgedDeviceBasicInformation : BaseCluster() { + const val ID = 57L + + sealed class Attribute(val id: Long, val name: String) { + object VendorName : Attribute(1L, "VendorName") + + object VendorID : Attribute(2L, "VendorID") + + object ProductName : Attribute(3L, "ProductName") + + object NodeLabel : Attribute(5L, "NodeLabel") + + object HardwareVersion : Attribute(7L, "HardwareVersion") + + object HardwareVersionString : Attribute(8L, "HardwareVersionString") + + object SoftwareVersion : Attribute(9L, "SoftwareVersion") + + object SoftwareVersionString : Attribute(10L, "SoftwareVersionString") + + object ManufacturingDate : Attribute(11L, "ManufacturingDate") + + object PartNumber : Attribute(12L, "PartNumber") + + object ProductURL : Attribute(13L, "ProductURL") + + object ProductLabel : Attribute(14L, "ProductLabel") + + object SerialNumber : Attribute(15L, "SerialNumber") + + object Reachable : Attribute(17L, "Reachable") + + object UniqueID : Attribute(18L, "UniqueID") + + object ProductAppearance : Attribute(20L, "ProductAppearance") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object StartUp : Event(0L, "StartUp") + + object ShutDown : Event(1L, "ShutDown") + + object Leave : Event(2L, "Leave") + + object ReachableChanged : Event(3L, "ReachableChanged") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/CarbonDioxideConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/CarbonDioxideConcentrationMeasurement.kt new file mode 100644 index 00000000000000..f3bbeca59dc459 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/CarbonDioxideConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object CarbonDioxideConcentrationMeasurement : BaseCluster() { + const val ID = 1037L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/CarbonMonoxideConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/CarbonMonoxideConcentrationMeasurement.kt new file mode 100644 index 00000000000000..58968d06fe8acc --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/CarbonMonoxideConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object CarbonMonoxideConcentrationMeasurement : BaseCluster() { + const val ID = 1036L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Channel.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Channel.kt new file mode 100644 index 00000000000000..db4808c241ba67 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Channel.kt @@ -0,0 +1,213 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Channel : BaseCluster() { + const val ID = 1284L + + sealed class Attribute(val id: Long, val name: String) { + object ChannelList : Attribute(0L, "ChannelList") + + object Lineup : Attribute(1L, "Lineup") + + object CurrentChannel : Attribute(2L, "CurrentChannel") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ChangeChannel : Command(0L, "ChangeChannel") + + object ChangeChannelByNumber : Command(2L, "ChangeChannelByNumber") + + object SkipChannel : Command(3L, "SkipChannel") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ChangeChannelCommandField(val id: Int, val name: String) { + object Match : ChangeChannelCommandField(0, "Match") + + companion object { + fun values(): List { + return ChangeChannelCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ChangeChannelCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ChangeChannelCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ChangeChannelByNumberCommandField(val id: Int, val name: String) { + object MajorNumber : ChangeChannelByNumberCommandField(0, "MajorNumber") + + object MinorNumber : ChangeChannelByNumberCommandField(1, "MinorNumber") + + companion object { + fun values(): List { + return ChangeChannelByNumberCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ChangeChannelByNumberCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ChangeChannelByNumberCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SkipChannelCommandField(val id: Int, val name: String) { + object Count : SkipChannelCommandField(0, "Count") + + companion object { + fun values(): List { + return SkipChannelCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SkipChannelCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SkipChannelCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Clusters.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Clusters.kt new file mode 100644 index 00000000000000..e5a93e0ffb8459 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Clusters.kt @@ -0,0 +1,314 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Clusters { + fun getCluster(clusterId: Long): BaseCluster? { + if (clusterId == Identify.ID) { + return Identify + } + if (clusterId == Groups.ID) { + return Groups + } + if (clusterId == Scenes.ID) { + return Scenes + } + if (clusterId == OnOff.ID) { + return OnOff + } + if (clusterId == OnOffSwitchConfiguration.ID) { + return OnOffSwitchConfiguration + } + if (clusterId == LevelControl.ID) { + return LevelControl + } + if (clusterId == BinaryInputBasic.ID) { + return BinaryInputBasic + } + if (clusterId == PulseWidthModulation.ID) { + return PulseWidthModulation + } + if (clusterId == Descriptor.ID) { + return Descriptor + } + if (clusterId == Binding.ID) { + return Binding + } + if (clusterId == AccessControl.ID) { + return AccessControl + } + if (clusterId == Actions.ID) { + return Actions + } + if (clusterId == BasicInformation.ID) { + return BasicInformation + } + if (clusterId == OtaSoftwareUpdateProvider.ID) { + return OtaSoftwareUpdateProvider + } + if (clusterId == OtaSoftwareUpdateRequestor.ID) { + return OtaSoftwareUpdateRequestor + } + if (clusterId == LocalizationConfiguration.ID) { + return LocalizationConfiguration + } + if (clusterId == TimeFormatLocalization.ID) { + return TimeFormatLocalization + } + if (clusterId == UnitLocalization.ID) { + return UnitLocalization + } + if (clusterId == PowerSourceConfiguration.ID) { + return PowerSourceConfiguration + } + if (clusterId == PowerSource.ID) { + return PowerSource + } + if (clusterId == GeneralCommissioning.ID) { + return GeneralCommissioning + } + if (clusterId == NetworkCommissioning.ID) { + return NetworkCommissioning + } + if (clusterId == DiagnosticLogs.ID) { + return DiagnosticLogs + } + if (clusterId == GeneralDiagnostics.ID) { + return GeneralDiagnostics + } + if (clusterId == SoftwareDiagnostics.ID) { + return SoftwareDiagnostics + } + if (clusterId == ThreadNetworkDiagnostics.ID) { + return ThreadNetworkDiagnostics + } + if (clusterId == WiFiNetworkDiagnostics.ID) { + return WiFiNetworkDiagnostics + } + if (clusterId == EthernetNetworkDiagnostics.ID) { + return EthernetNetworkDiagnostics + } + if (clusterId == TimeSynchronization.ID) { + return TimeSynchronization + } + if (clusterId == BridgedDeviceBasicInformation.ID) { + return BridgedDeviceBasicInformation + } + if (clusterId == Switch.ID) { + return Switch + } + if (clusterId == AdministratorCommissioning.ID) { + return AdministratorCommissioning + } + if (clusterId == OperationalCredentials.ID) { + return OperationalCredentials + } + if (clusterId == GroupKeyManagement.ID) { + return GroupKeyManagement + } + if (clusterId == FixedLabel.ID) { + return FixedLabel + } + if (clusterId == UserLabel.ID) { + return UserLabel + } + if (clusterId == ProxyConfiguration.ID) { + return ProxyConfiguration + } + if (clusterId == ProxyDiscovery.ID) { + return ProxyDiscovery + } + if (clusterId == ProxyValid.ID) { + return ProxyValid + } + if (clusterId == BooleanState.ID) { + return BooleanState + } + if (clusterId == IcdManagement.ID) { + return IcdManagement + } + if (clusterId == ModeSelect.ID) { + return ModeSelect + } + if (clusterId == LaundryWasherMode.ID) { + return LaundryWasherMode + } + if (clusterId == RefrigeratorAndTemperatureControlledCabinetMode.ID) { + return RefrigeratorAndTemperatureControlledCabinetMode + } + if (clusterId == LaundryWasherControls.ID) { + return LaundryWasherControls + } + if (clusterId == RvcRunMode.ID) { + return RvcRunMode + } + if (clusterId == RvcCleanMode.ID) { + return RvcCleanMode + } + if (clusterId == TemperatureControl.ID) { + return TemperatureControl + } + if (clusterId == RefrigeratorAlarm.ID) { + return RefrigeratorAlarm + } + if (clusterId == DishwasherMode.ID) { + return DishwasherMode + } + if (clusterId == AirQuality.ID) { + return AirQuality + } + if (clusterId == SmokeCoAlarm.ID) { + return SmokeCoAlarm + } + if (clusterId == DishwasherAlarm.ID) { + return DishwasherAlarm + } + if (clusterId == OperationalState.ID) { + return OperationalState + } + if (clusterId == RvcOperationalState.ID) { + return RvcOperationalState + } + if (clusterId == HepaFilterMonitoring.ID) { + return HepaFilterMonitoring + } + if (clusterId == ActivatedCarbonFilterMonitoring.ID) { + return ActivatedCarbonFilterMonitoring + } + if (clusterId == DoorLock.ID) { + return DoorLock + } + if (clusterId == WindowCovering.ID) { + return WindowCovering + } + if (clusterId == BarrierControl.ID) { + return BarrierControl + } + if (clusterId == PumpConfigurationAndControl.ID) { + return PumpConfigurationAndControl + } + if (clusterId == Thermostat.ID) { + return Thermostat + } + if (clusterId == FanControl.ID) { + return FanControl + } + if (clusterId == ThermostatUserInterfaceConfiguration.ID) { + return ThermostatUserInterfaceConfiguration + } + if (clusterId == ColorControl.ID) { + return ColorControl + } + if (clusterId == BallastConfiguration.ID) { + return BallastConfiguration + } + if (clusterId == IlluminanceMeasurement.ID) { + return IlluminanceMeasurement + } + if (clusterId == TemperatureMeasurement.ID) { + return TemperatureMeasurement + } + if (clusterId == PressureMeasurement.ID) { + return PressureMeasurement + } + if (clusterId == FlowMeasurement.ID) { + return FlowMeasurement + } + if (clusterId == RelativeHumidityMeasurement.ID) { + return RelativeHumidityMeasurement + } + if (clusterId == OccupancySensing.ID) { + return OccupancySensing + } + if (clusterId == CarbonMonoxideConcentrationMeasurement.ID) { + return CarbonMonoxideConcentrationMeasurement + } + if (clusterId == CarbonDioxideConcentrationMeasurement.ID) { + return CarbonDioxideConcentrationMeasurement + } + if (clusterId == NitrogenDioxideConcentrationMeasurement.ID) { + return NitrogenDioxideConcentrationMeasurement + } + if (clusterId == OzoneConcentrationMeasurement.ID) { + return OzoneConcentrationMeasurement + } + if (clusterId == Pm25ConcentrationMeasurement.ID) { + return Pm25ConcentrationMeasurement + } + if (clusterId == FormaldehydeConcentrationMeasurement.ID) { + return FormaldehydeConcentrationMeasurement + } + if (clusterId == Pm1ConcentrationMeasurement.ID) { + return Pm1ConcentrationMeasurement + } + if (clusterId == Pm10ConcentrationMeasurement.ID) { + return Pm10ConcentrationMeasurement + } + if (clusterId == TotalVolatileOrganicCompoundsConcentrationMeasurement.ID) { + return TotalVolatileOrganicCompoundsConcentrationMeasurement + } + if (clusterId == RadonConcentrationMeasurement.ID) { + return RadonConcentrationMeasurement + } + if (clusterId == WakeOnLan.ID) { + return WakeOnLan + } + if (clusterId == Channel.ID) { + return Channel + } + if (clusterId == TargetNavigator.ID) { + return TargetNavigator + } + if (clusterId == MediaPlayback.ID) { + return MediaPlayback + } + if (clusterId == MediaInput.ID) { + return MediaInput + } + if (clusterId == LowPower.ID) { + return LowPower + } + if (clusterId == KeypadInput.ID) { + return KeypadInput + } + if (clusterId == ContentLauncher.ID) { + return ContentLauncher + } + if (clusterId == AudioOutput.ID) { + return AudioOutput + } + if (clusterId == ApplicationLauncher.ID) { + return ApplicationLauncher + } + if (clusterId == ApplicationBasic.ID) { + return ApplicationBasic + } + if (clusterId == AccountLogin.ID) { + return AccountLogin + } + if (clusterId == ElectricalMeasurement.ID) { + return ElectricalMeasurement + } + if (clusterId == UnitTesting.ID) { + return UnitTesting + } + if (clusterId == FaultInjection.ID) { + return FaultInjection + } + return null + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ColorControl.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ColorControl.kt new file mode 100644 index 00000000000000..65479a3642c1fd --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ColorControl.kt @@ -0,0 +1,975 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ColorControl : BaseCluster() { + const val ID = 768L + + sealed class Attribute(val id: Long, val name: String) { + object CurrentHue : Attribute(0L, "CurrentHue") + + object CurrentSaturation : Attribute(1L, "CurrentSaturation") + + object RemainingTime : Attribute(2L, "RemainingTime") + + object CurrentX : Attribute(3L, "CurrentX") + + object CurrentY : Attribute(4L, "CurrentY") + + object DriftCompensation : Attribute(5L, "DriftCompensation") + + object CompensationText : Attribute(6L, "CompensationText") + + object ColorTemperatureMireds : Attribute(7L, "ColorTemperatureMireds") + + object ColorMode : Attribute(8L, "ColorMode") + + object Options : Attribute(15L, "Options") + + object NumberOfPrimaries : Attribute(16L, "NumberOfPrimaries") + + object Primary1X : Attribute(17L, "Primary1X") + + object Primary1Y : Attribute(18L, "Primary1Y") + + object Primary1Intensity : Attribute(19L, "Primary1Intensity") + + object Primary2X : Attribute(21L, "Primary2X") + + object Primary2Y : Attribute(22L, "Primary2Y") + + object Primary2Intensity : Attribute(23L, "Primary2Intensity") + + object Primary3X : Attribute(25L, "Primary3X") + + object Primary3Y : Attribute(26L, "Primary3Y") + + object Primary3Intensity : Attribute(27L, "Primary3Intensity") + + object Primary4X : Attribute(32L, "Primary4X") + + object Primary4Y : Attribute(33L, "Primary4Y") + + object Primary4Intensity : Attribute(34L, "Primary4Intensity") + + object Primary5X : Attribute(36L, "Primary5X") + + object Primary5Y : Attribute(37L, "Primary5Y") + + object Primary5Intensity : Attribute(38L, "Primary5Intensity") + + object Primary6X : Attribute(40L, "Primary6X") + + object Primary6Y : Attribute(41L, "Primary6Y") + + object Primary6Intensity : Attribute(42L, "Primary6Intensity") + + object WhitePointX : Attribute(48L, "WhitePointX") + + object WhitePointY : Attribute(49L, "WhitePointY") + + object ColorPointRX : Attribute(50L, "ColorPointRX") + + object ColorPointRY : Attribute(51L, "ColorPointRY") + + object ColorPointRIntensity : Attribute(52L, "ColorPointRIntensity") + + object ColorPointGX : Attribute(54L, "ColorPointGX") + + object ColorPointGY : Attribute(55L, "ColorPointGY") + + object ColorPointGIntensity : Attribute(56L, "ColorPointGIntensity") + + object ColorPointBX : Attribute(58L, "ColorPointBX") + + object ColorPointBY : Attribute(59L, "ColorPointBY") + + object ColorPointBIntensity : Attribute(60L, "ColorPointBIntensity") + + object EnhancedCurrentHue : Attribute(16384L, "EnhancedCurrentHue") + + object EnhancedColorMode : Attribute(16385L, "EnhancedColorMode") + + object ColorLoopActive : Attribute(16386L, "ColorLoopActive") + + object ColorLoopDirection : Attribute(16387L, "ColorLoopDirection") + + object ColorLoopTime : Attribute(16388L, "ColorLoopTime") + + object ColorLoopStartEnhancedHue : Attribute(16389L, "ColorLoopStartEnhancedHue") + + object ColorLoopStoredEnhancedHue : Attribute(16390L, "ColorLoopStoredEnhancedHue") + + object ColorCapabilities : Attribute(16394L, "ColorCapabilities") + + object ColorTempPhysicalMinMireds : Attribute(16395L, "ColorTempPhysicalMinMireds") + + object ColorTempPhysicalMaxMireds : Attribute(16396L, "ColorTempPhysicalMaxMireds") + + object CoupleColorTempToLevelMinMireds : Attribute(16397L, "CoupleColorTempToLevelMinMireds") + + object StartUpColorTemperatureMireds : Attribute(16400L, "StartUpColorTemperatureMireds") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object MoveToHue : Command(0L, "MoveToHue") + + object MoveHue : Command(1L, "MoveHue") + + object StepHue : Command(2L, "StepHue") + + object MoveToSaturation : Command(3L, "MoveToSaturation") + + object MoveSaturation : Command(4L, "MoveSaturation") + + object StepSaturation : Command(5L, "StepSaturation") + + object MoveToHueAndSaturation : Command(6L, "MoveToHueAndSaturation") + + object MoveToColor : Command(7L, "MoveToColor") + + object MoveColor : Command(8L, "MoveColor") + + object StepColor : Command(9L, "StepColor") + + object MoveToColorTemperature : Command(10L, "MoveToColorTemperature") + + object EnhancedMoveToHue : Command(64L, "EnhancedMoveToHue") + + object EnhancedMoveHue : Command(65L, "EnhancedMoveHue") + + object EnhancedStepHue : Command(66L, "EnhancedStepHue") + + object EnhancedMoveToHueAndSaturation : Command(67L, "EnhancedMoveToHueAndSaturation") + + object ColorLoopSet : Command(68L, "ColorLoopSet") + + object StopMoveStep : Command(71L, "StopMoveStep") + + object MoveColorTemperature : Command(75L, "MoveColorTemperature") + + object StepColorTemperature : Command(76L, "StepColorTemperature") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveToHueCommandField(val id: Int, val name: String) { + object Hue : MoveToHueCommandField(0, "Hue") + + object Direction : MoveToHueCommandField(1, "Direction") + + object TransitionTime : MoveToHueCommandField(2, "TransitionTime") + + object OptionsMask : MoveToHueCommandField(3, "OptionsMask") + + object OptionsOverride : MoveToHueCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return MoveToHueCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveToHueCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveToHueCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveHueCommandField(val id: Int, val name: String) { + object MoveMode : MoveHueCommandField(0, "MoveMode") + + object Rate : MoveHueCommandField(1, "Rate") + + object OptionsMask : MoveHueCommandField(2, "OptionsMask") + + object OptionsOverride : MoveHueCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveHueCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveHueCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveHueCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StepHueCommandField(val id: Int, val name: String) { + object StepMode : StepHueCommandField(0, "StepMode") + + object StepSize : StepHueCommandField(1, "StepSize") + + object TransitionTime : StepHueCommandField(2, "TransitionTime") + + object OptionsMask : StepHueCommandField(3, "OptionsMask") + + object OptionsOverride : StepHueCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return StepHueCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StepHueCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StepHueCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveToSaturationCommandField(val id: Int, val name: String) { + object Saturation : MoveToSaturationCommandField(0, "Saturation") + + object TransitionTime : MoveToSaturationCommandField(1, "TransitionTime") + + object OptionsMask : MoveToSaturationCommandField(2, "OptionsMask") + + object OptionsOverride : MoveToSaturationCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveToSaturationCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveToSaturationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveToSaturationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveSaturationCommandField(val id: Int, val name: String) { + object MoveMode : MoveSaturationCommandField(0, "MoveMode") + + object Rate : MoveSaturationCommandField(1, "Rate") + + object OptionsMask : MoveSaturationCommandField(2, "OptionsMask") + + object OptionsOverride : MoveSaturationCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveSaturationCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveSaturationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveSaturationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StepSaturationCommandField(val id: Int, val name: String) { + object StepMode : StepSaturationCommandField(0, "StepMode") + + object StepSize : StepSaturationCommandField(1, "StepSize") + + object TransitionTime : StepSaturationCommandField(2, "TransitionTime") + + object OptionsMask : StepSaturationCommandField(3, "OptionsMask") + + object OptionsOverride : StepSaturationCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return StepSaturationCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StepSaturationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StepSaturationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveToHueAndSaturationCommandField(val id: Int, val name: String) { + object Hue : MoveToHueAndSaturationCommandField(0, "Hue") + + object Saturation : MoveToHueAndSaturationCommandField(1, "Saturation") + + object TransitionTime : MoveToHueAndSaturationCommandField(2, "TransitionTime") + + object OptionsMask : MoveToHueAndSaturationCommandField(3, "OptionsMask") + + object OptionsOverride : MoveToHueAndSaturationCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return MoveToHueAndSaturationCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveToHueAndSaturationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveToHueAndSaturationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveToColorCommandField(val id: Int, val name: String) { + object ColorX : MoveToColorCommandField(0, "ColorX") + + object ColorY : MoveToColorCommandField(1, "ColorY") + + object TransitionTime : MoveToColorCommandField(2, "TransitionTime") + + object OptionsMask : MoveToColorCommandField(3, "OptionsMask") + + object OptionsOverride : MoveToColorCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return MoveToColorCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveToColorCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveToColorCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveColorCommandField(val id: Int, val name: String) { + object RateX : MoveColorCommandField(0, "RateX") + + object RateY : MoveColorCommandField(1, "RateY") + + object OptionsMask : MoveColorCommandField(2, "OptionsMask") + + object OptionsOverride : MoveColorCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveColorCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveColorCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveColorCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StepColorCommandField(val id: Int, val name: String) { + object StepX : StepColorCommandField(0, "StepX") + + object StepY : StepColorCommandField(1, "StepY") + + object TransitionTime : StepColorCommandField(2, "TransitionTime") + + object OptionsMask : StepColorCommandField(3, "OptionsMask") + + object OptionsOverride : StepColorCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return StepColorCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StepColorCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StepColorCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveToColorTemperatureCommandField(val id: Int, val name: String) { + object ColorTemperatureMireds : MoveToColorTemperatureCommandField(0, "ColorTemperatureMireds") + + object TransitionTime : MoveToColorTemperatureCommandField(1, "TransitionTime") + + object OptionsMask : MoveToColorTemperatureCommandField(2, "OptionsMask") + + object OptionsOverride : MoveToColorTemperatureCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveToColorTemperatureCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveToColorTemperatureCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveToColorTemperatureCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class EnhancedMoveToHueCommandField(val id: Int, val name: String) { + object EnhancedHue : EnhancedMoveToHueCommandField(0, "EnhancedHue") + + object Direction : EnhancedMoveToHueCommandField(1, "Direction") + + object TransitionTime : EnhancedMoveToHueCommandField(2, "TransitionTime") + + object OptionsMask : EnhancedMoveToHueCommandField(3, "OptionsMask") + + object OptionsOverride : EnhancedMoveToHueCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return EnhancedMoveToHueCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): EnhancedMoveToHueCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): EnhancedMoveToHueCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class EnhancedMoveHueCommandField(val id: Int, val name: String) { + object MoveMode : EnhancedMoveHueCommandField(0, "MoveMode") + + object Rate : EnhancedMoveHueCommandField(1, "Rate") + + object OptionsMask : EnhancedMoveHueCommandField(2, "OptionsMask") + + object OptionsOverride : EnhancedMoveHueCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return EnhancedMoveHueCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): EnhancedMoveHueCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): EnhancedMoveHueCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class EnhancedStepHueCommandField(val id: Int, val name: String) { + object StepMode : EnhancedStepHueCommandField(0, "StepMode") + + object StepSize : EnhancedStepHueCommandField(1, "StepSize") + + object TransitionTime : EnhancedStepHueCommandField(2, "TransitionTime") + + object OptionsMask : EnhancedStepHueCommandField(3, "OptionsMask") + + object OptionsOverride : EnhancedStepHueCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return EnhancedStepHueCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): EnhancedStepHueCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): EnhancedStepHueCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class EnhancedMoveToHueAndSaturationCommandField(val id: Int, val name: String) { + object EnhancedHue : EnhancedMoveToHueAndSaturationCommandField(0, "EnhancedHue") + + object Saturation : EnhancedMoveToHueAndSaturationCommandField(1, "Saturation") + + object TransitionTime : EnhancedMoveToHueAndSaturationCommandField(2, "TransitionTime") + + object OptionsMask : EnhancedMoveToHueAndSaturationCommandField(3, "OptionsMask") + + object OptionsOverride : EnhancedMoveToHueAndSaturationCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return EnhancedMoveToHueAndSaturationCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): EnhancedMoveToHueAndSaturationCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): EnhancedMoveToHueAndSaturationCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ColorLoopSetCommandField(val id: Int, val name: String) { + object UpdateFlags : ColorLoopSetCommandField(0, "UpdateFlags") + + object Action : ColorLoopSetCommandField(1, "Action") + + object Direction : ColorLoopSetCommandField(2, "Direction") + + object Time : ColorLoopSetCommandField(3, "Time") + + object StartHue : ColorLoopSetCommandField(4, "StartHue") + + object OptionsMask : ColorLoopSetCommandField(5, "OptionsMask") + + object OptionsOverride : ColorLoopSetCommandField(6, "OptionsOverride") + + companion object { + fun values(): List { + return ColorLoopSetCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ColorLoopSetCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ColorLoopSetCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StopMoveStepCommandField(val id: Int, val name: String) { + object OptionsMask : StopMoveStepCommandField(0, "OptionsMask") + + object OptionsOverride : StopMoveStepCommandField(1, "OptionsOverride") + + companion object { + fun values(): List { + return StopMoveStepCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StopMoveStepCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StopMoveStepCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveColorTemperatureCommandField(val id: Int, val name: String) { + object MoveMode : MoveColorTemperatureCommandField(0, "MoveMode") + + object Rate : MoveColorTemperatureCommandField(1, "Rate") + + object ColorTemperatureMinimumMireds : + MoveColorTemperatureCommandField(2, "ColorTemperatureMinimumMireds") + + object ColorTemperatureMaximumMireds : + MoveColorTemperatureCommandField(3, "ColorTemperatureMaximumMireds") + + object OptionsMask : MoveColorTemperatureCommandField(4, "OptionsMask") + + object OptionsOverride : MoveColorTemperatureCommandField(5, "OptionsOverride") + + companion object { + fun values(): List { + return MoveColorTemperatureCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveColorTemperatureCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveColorTemperatureCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StepColorTemperatureCommandField(val id: Int, val name: String) { + object StepMode : StepColorTemperatureCommandField(0, "StepMode") + + object StepSize : StepColorTemperatureCommandField(1, "StepSize") + + object TransitionTime : StepColorTemperatureCommandField(2, "TransitionTime") + + object ColorTemperatureMinimumMireds : + StepColorTemperatureCommandField(3, "ColorTemperatureMinimumMireds") + + object ColorTemperatureMaximumMireds : + StepColorTemperatureCommandField(4, "ColorTemperatureMaximumMireds") + + object OptionsMask : StepColorTemperatureCommandField(5, "OptionsMask") + + object OptionsOverride : StepColorTemperatureCommandField(6, "OptionsOverride") + + companion object { + fun values(): List { + return StepColorTemperatureCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StepColorTemperatureCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StepColorTemperatureCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ContentLauncher.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ContentLauncher.kt new file mode 100644 index 00000000000000..804b947334869e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ContentLauncher.kt @@ -0,0 +1,185 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ContentLauncher : BaseCluster() { + const val ID = 1290L + + sealed class Attribute(val id: Long, val name: String) { + object AcceptHeader : Attribute(0L, "AcceptHeader") + + object SupportedStreamingProtocols : Attribute(1L, "SupportedStreamingProtocols") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object LaunchContent : Command(0L, "LaunchContent") + + object LaunchURL : Command(1L, "LaunchURL") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class LaunchContentCommandField(val id: Int, val name: String) { + object Search : LaunchContentCommandField(0, "Search") + + object AutoPlay : LaunchContentCommandField(1, "AutoPlay") + + object Data : LaunchContentCommandField(2, "Data") + + companion object { + fun values(): List { + return LaunchContentCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): LaunchContentCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): LaunchContentCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class LaunchURLCommandField(val id: Int, val name: String) { + object ContentURL : LaunchURLCommandField(0, "ContentURL") + + object DisplayString : LaunchURLCommandField(1, "DisplayString") + + object BrandingInformation : LaunchURLCommandField(2, "BrandingInformation") + + companion object { + fun values(): List { + return LaunchURLCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): LaunchURLCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): LaunchURLCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Descriptor.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Descriptor.kt new file mode 100644 index 00000000000000..445c84f62aedb3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Descriptor.kt @@ -0,0 +1,83 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Descriptor : BaseCluster() { + const val ID = 29L + + sealed class Attribute(val id: Long, val name: String) { + object DeviceTypeList : Attribute(0L, "DeviceTypeList") + + object ServerList : Attribute(1L, "ServerList") + + object ClientList : Attribute(2L, "ClientList") + + object PartsList : Attribute(3L, "PartsList") + + object TagList : Attribute(4L, "TagList") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DiagnosticLogs.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DiagnosticLogs.kt new file mode 100644 index 00000000000000..dbcef3199f4f7e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DiagnosticLogs.kt @@ -0,0 +1,145 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object DiagnosticLogs : BaseCluster() { + const val ID = 50L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object RetrieveLogsRequest : Command(0L, "RetrieveLogsRequest") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RetrieveLogsRequestCommandField(val id: Int, val name: String) { + object Intent : RetrieveLogsRequestCommandField(0, "Intent") + + object RequestedProtocol : RetrieveLogsRequestCommandField(1, "RequestedProtocol") + + object TransferFileDesignator : RetrieveLogsRequestCommandField(2, "TransferFileDesignator") + + companion object { + fun values(): List { + return RetrieveLogsRequestCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RetrieveLogsRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RetrieveLogsRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DishwasherAlarm.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DishwasherAlarm.kt new file mode 100644 index 00000000000000..a29bfcfe7d4969 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DishwasherAlarm.kt @@ -0,0 +1,219 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object DishwasherAlarm : BaseCluster() { + const val ID = 93L + + sealed class Attribute(val id: Long, val name: String) { + object Mask : Attribute(0L, "Mask") + + object Latch : Attribute(1L, "Latch") + + object State : Attribute(2L, "State") + + object Supported : Attribute(3L, "Supported") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object Notify : Event(0L, "Notify") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Reset : Command(0L, "Reset") + + object ModifyEnabledAlarms : Command(1L, "ModifyEnabledAlarms") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ResetCommandField(val id: Int, val name: String) { + object Alarms : ResetCommandField(0, "Alarms") + + companion object { + fun values(): List { + return ResetCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ResetCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ResetCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ModifyEnabledAlarmsCommandField(val id: Int, val name: String) { + object Mask : ModifyEnabledAlarmsCommandField(0, "Mask") + + companion object { + fun values(): List { + return ModifyEnabledAlarmsCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ModifyEnabledAlarmsCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ModifyEnabledAlarmsCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DishwasherMode.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DishwasherMode.kt new file mode 100644 index 00000000000000..af57b08df18073 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DishwasherMode.kt @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object DishwasherMode : BaseCluster() { + const val ID = 89L + + sealed class Attribute(val id: Long, val name: String) { + object SupportedModes : Attribute(0L, "SupportedModes") + + object CurrentMode : Attribute(1L, "CurrentMode") + + object StartUpMode : Attribute(2L, "StartUpMode") + + object OnMode : Attribute(3L, "OnMode") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ChangeToMode : Command(0L, "ChangeToMode") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ChangeToModeCommandField(val id: Int, val name: String) { + object NewMode : ChangeToModeCommandField(0, "NewMode") + + companion object { + fun values(): List { + return ChangeToModeCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ChangeToModeCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ChangeToModeCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DoorLock.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DoorLock.kt new file mode 100644 index 00000000000000..059159badae01b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DoorLock.kt @@ -0,0 +1,894 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object DoorLock : BaseCluster() { + const val ID = 257L + + sealed class Attribute(val id: Long, val name: String) { + object LockState : Attribute(0L, "LockState") + + object LockType : Attribute(1L, "LockType") + + object ActuatorEnabled : Attribute(2L, "ActuatorEnabled") + + object DoorState : Attribute(3L, "DoorState") + + object DoorOpenEvents : Attribute(4L, "DoorOpenEvents") + + object DoorClosedEvents : Attribute(5L, "DoorClosedEvents") + + object OpenPeriod : Attribute(6L, "OpenPeriod") + + object NumberOfTotalUsersSupported : Attribute(17L, "NumberOfTotalUsersSupported") + + object NumberOfPINUsersSupported : Attribute(18L, "NumberOfPINUsersSupported") + + object NumberOfRFIDUsersSupported : Attribute(19L, "NumberOfRFIDUsersSupported") + + object NumberOfWeekDaySchedulesSupportedPerUser : + Attribute(20L, "NumberOfWeekDaySchedulesSupportedPerUser") + + object NumberOfYearDaySchedulesSupportedPerUser : + Attribute(21L, "NumberOfYearDaySchedulesSupportedPerUser") + + object NumberOfHolidaySchedulesSupported : Attribute(22L, "NumberOfHolidaySchedulesSupported") + + object MaxPINCodeLength : Attribute(23L, "MaxPINCodeLength") + + object MinPINCodeLength : Attribute(24L, "MinPINCodeLength") + + object MaxRFIDCodeLength : Attribute(25L, "MaxRFIDCodeLength") + + object MinRFIDCodeLength : Attribute(26L, "MinRFIDCodeLength") + + object CredentialRulesSupport : Attribute(27L, "CredentialRulesSupport") + + object NumberOfCredentialsSupportedPerUser : + Attribute(28L, "NumberOfCredentialsSupportedPerUser") + + object Language : Attribute(33L, "Language") + + object LEDSettings : Attribute(34L, "LEDSettings") + + object AutoRelockTime : Attribute(35L, "AutoRelockTime") + + object SoundVolume : Attribute(36L, "SoundVolume") + + object OperatingMode : Attribute(37L, "OperatingMode") + + object SupportedOperatingModes : Attribute(38L, "SupportedOperatingModes") + + object DefaultConfigurationRegister : Attribute(39L, "DefaultConfigurationRegister") + + object EnableLocalProgramming : Attribute(40L, "EnableLocalProgramming") + + object EnableOneTouchLocking : Attribute(41L, "EnableOneTouchLocking") + + object EnableInsideStatusLED : Attribute(42L, "EnableInsideStatusLED") + + object EnablePrivacyModeButton : Attribute(43L, "EnablePrivacyModeButton") + + object LocalProgrammingFeatures : Attribute(44L, "LocalProgrammingFeatures") + + object WrongCodeEntryLimit : Attribute(48L, "WrongCodeEntryLimit") + + object UserCodeTemporaryDisableTime : Attribute(49L, "UserCodeTemporaryDisableTime") + + object SendPINOverTheAir : Attribute(50L, "SendPINOverTheAir") + + object RequirePINforRemoteOperation : Attribute(51L, "RequirePINforRemoteOperation") + + object ExpiringUserTimeout : Attribute(53L, "ExpiringUserTimeout") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object DoorLockAlarm : Event(0L, "DoorLockAlarm") + + object DoorStateChange : Event(1L, "DoorStateChange") + + object LockOperation : Event(2L, "LockOperation") + + object LockOperationError : Event(3L, "LockOperationError") + + object LockUserChange : Event(4L, "LockUserChange") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object LockDoor : Command(0L, "LockDoor") + + object UnlockDoor : Command(1L, "UnlockDoor") + + object UnlockWithTimeout : Command(3L, "UnlockWithTimeout") + + object SetWeekDaySchedule : Command(11L, "SetWeekDaySchedule") + + object GetWeekDaySchedule : Command(12L, "GetWeekDaySchedule") + + object ClearWeekDaySchedule : Command(13L, "ClearWeekDaySchedule") + + object SetYearDaySchedule : Command(14L, "SetYearDaySchedule") + + object GetYearDaySchedule : Command(15L, "GetYearDaySchedule") + + object ClearYearDaySchedule : Command(16L, "ClearYearDaySchedule") + + object SetHolidaySchedule : Command(17L, "SetHolidaySchedule") + + object GetHolidaySchedule : Command(18L, "GetHolidaySchedule") + + object ClearHolidaySchedule : Command(19L, "ClearHolidaySchedule") + + object SetUser : Command(26L, "SetUser") + + object GetUser : Command(27L, "GetUser") + + object ClearUser : Command(29L, "ClearUser") + + object SetCredential : Command(34L, "SetCredential") + + object GetCredentialStatus : Command(36L, "GetCredentialStatus") + + object ClearCredential : Command(38L, "ClearCredential") + + object UnboltDoor : Command(39L, "UnboltDoor") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class LockDoorCommandField(val id: Int, val name: String) { + object PINCode : LockDoorCommandField(0, "PINCode") + + companion object { + fun values(): List { + return LockDoorCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): LockDoorCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): LockDoorCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class UnlockDoorCommandField(val id: Int, val name: String) { + object PINCode : UnlockDoorCommandField(0, "PINCode") + + companion object { + fun values(): List { + return UnlockDoorCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): UnlockDoorCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): UnlockDoorCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class UnlockWithTimeoutCommandField(val id: Int, val name: String) { + object Timeout : UnlockWithTimeoutCommandField(0, "Timeout") + + object PINCode : UnlockWithTimeoutCommandField(1, "PINCode") + + companion object { + fun values(): List { + return UnlockWithTimeoutCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): UnlockWithTimeoutCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): UnlockWithTimeoutCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetWeekDayScheduleCommandField(val id: Int, val name: String) { + object WeekDayIndex : SetWeekDayScheduleCommandField(0, "WeekDayIndex") + + object UserIndex : SetWeekDayScheduleCommandField(1, "UserIndex") + + object DaysMask : SetWeekDayScheduleCommandField(2, "DaysMask") + + object StartHour : SetWeekDayScheduleCommandField(3, "StartHour") + + object StartMinute : SetWeekDayScheduleCommandField(4, "StartMinute") + + object EndHour : SetWeekDayScheduleCommandField(5, "EndHour") + + object EndMinute : SetWeekDayScheduleCommandField(6, "EndMinute") + + companion object { + fun values(): List { + return SetWeekDayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetWeekDayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetWeekDayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetWeekDayScheduleCommandField(val id: Int, val name: String) { + object WeekDayIndex : GetWeekDayScheduleCommandField(0, "WeekDayIndex") + + object UserIndex : GetWeekDayScheduleCommandField(1, "UserIndex") + + companion object { + fun values(): List { + return GetWeekDayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetWeekDayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetWeekDayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ClearWeekDayScheduleCommandField(val id: Int, val name: String) { + object WeekDayIndex : ClearWeekDayScheduleCommandField(0, "WeekDayIndex") + + object UserIndex : ClearWeekDayScheduleCommandField(1, "UserIndex") + + companion object { + fun values(): List { + return ClearWeekDayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ClearWeekDayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ClearWeekDayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetYearDayScheduleCommandField(val id: Int, val name: String) { + object YearDayIndex : SetYearDayScheduleCommandField(0, "YearDayIndex") + + object UserIndex : SetYearDayScheduleCommandField(1, "UserIndex") + + object LocalStartTime : SetYearDayScheduleCommandField(2, "LocalStartTime") + + object LocalEndTime : SetYearDayScheduleCommandField(3, "LocalEndTime") + + companion object { + fun values(): List { + return SetYearDayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetYearDayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetYearDayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetYearDayScheduleCommandField(val id: Int, val name: String) { + object YearDayIndex : GetYearDayScheduleCommandField(0, "YearDayIndex") + + object UserIndex : GetYearDayScheduleCommandField(1, "UserIndex") + + companion object { + fun values(): List { + return GetYearDayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetYearDayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetYearDayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ClearYearDayScheduleCommandField(val id: Int, val name: String) { + object YearDayIndex : ClearYearDayScheduleCommandField(0, "YearDayIndex") + + object UserIndex : ClearYearDayScheduleCommandField(1, "UserIndex") + + companion object { + fun values(): List { + return ClearYearDayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ClearYearDayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ClearYearDayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetHolidayScheduleCommandField(val id: Int, val name: String) { + object HolidayIndex : SetHolidayScheduleCommandField(0, "HolidayIndex") + + object LocalStartTime : SetHolidayScheduleCommandField(1, "LocalStartTime") + + object LocalEndTime : SetHolidayScheduleCommandField(2, "LocalEndTime") + + object OperatingMode : SetHolidayScheduleCommandField(3, "OperatingMode") + + companion object { + fun values(): List { + return SetHolidayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetHolidayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetHolidayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetHolidayScheduleCommandField(val id: Int, val name: String) { + object HolidayIndex : GetHolidayScheduleCommandField(0, "HolidayIndex") + + companion object { + fun values(): List { + return GetHolidayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetHolidayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetHolidayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ClearHolidayScheduleCommandField(val id: Int, val name: String) { + object HolidayIndex : ClearHolidayScheduleCommandField(0, "HolidayIndex") + + companion object { + fun values(): List { + return ClearHolidayScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ClearHolidayScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ClearHolidayScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetUserCommandField(val id: Int, val name: String) { + object OperationType : SetUserCommandField(0, "OperationType") + + object UserIndex : SetUserCommandField(1, "UserIndex") + + object UserName : SetUserCommandField(2, "UserName") + + object UserUniqueID : SetUserCommandField(3, "UserUniqueID") + + object UserStatus : SetUserCommandField(4, "UserStatus") + + object UserType : SetUserCommandField(5, "UserType") + + object CredentialRule : SetUserCommandField(6, "CredentialRule") + + companion object { + fun values(): List { + return SetUserCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetUserCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetUserCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetUserCommandField(val id: Int, val name: String) { + object UserIndex : GetUserCommandField(0, "UserIndex") + + companion object { + fun values(): List { + return GetUserCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetUserCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetUserCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ClearUserCommandField(val id: Int, val name: String) { + object UserIndex : ClearUserCommandField(0, "UserIndex") + + companion object { + fun values(): List { + return ClearUserCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ClearUserCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ClearUserCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetCredentialCommandField(val id: Int, val name: String) { + object OperationType : SetCredentialCommandField(0, "OperationType") + + object Credential : SetCredentialCommandField(1, "Credential") + + object CredentialData : SetCredentialCommandField(2, "CredentialData") + + object UserIndex : SetCredentialCommandField(3, "UserIndex") + + object UserStatus : SetCredentialCommandField(4, "UserStatus") + + object UserType : SetCredentialCommandField(5, "UserType") + + companion object { + fun values(): List { + return SetCredentialCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetCredentialCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetCredentialCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetCredentialStatusCommandField(val id: Int, val name: String) { + object Credential : GetCredentialStatusCommandField(0, "Credential") + + companion object { + fun values(): List { + return GetCredentialStatusCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetCredentialStatusCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetCredentialStatusCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ClearCredentialCommandField(val id: Int, val name: String) { + object Credential : ClearCredentialCommandField(0, "Credential") + + companion object { + fun values(): List { + return ClearCredentialCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ClearCredentialCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ClearCredentialCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class UnboltDoorCommandField(val id: Int, val name: String) { + object PINCode : UnboltDoorCommandField(0, "PINCode") + + companion object { + fun values(): List { + return UnboltDoorCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): UnboltDoorCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): UnboltDoorCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ElectricalMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ElectricalMeasurement.kt new file mode 100644 index 00000000000000..6e8147451f58d8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ElectricalMeasurement.kt @@ -0,0 +1,416 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ElectricalMeasurement : BaseCluster() { + const val ID = 2820L + + sealed class Attribute(val id: Long, val name: String) { + object MeasurementType : Attribute(0L, "MeasurementType") + + object DcVoltage : Attribute(256L, "DcVoltage") + + object DcVoltageMin : Attribute(257L, "DcVoltageMin") + + object DcVoltageMax : Attribute(258L, "DcVoltageMax") + + object DcCurrent : Attribute(259L, "DcCurrent") + + object DcCurrentMin : Attribute(260L, "DcCurrentMin") + + object DcCurrentMax : Attribute(261L, "DcCurrentMax") + + object DcPower : Attribute(262L, "DcPower") + + object DcPowerMin : Attribute(263L, "DcPowerMin") + + object DcPowerMax : Attribute(264L, "DcPowerMax") + + object DcVoltageMultiplier : Attribute(512L, "DcVoltageMultiplier") + + object DcVoltageDivisor : Attribute(513L, "DcVoltageDivisor") + + object DcCurrentMultiplier : Attribute(514L, "DcCurrentMultiplier") + + object DcCurrentDivisor : Attribute(515L, "DcCurrentDivisor") + + object DcPowerMultiplier : Attribute(516L, "DcPowerMultiplier") + + object DcPowerDivisor : Attribute(517L, "DcPowerDivisor") + + object AcFrequency : Attribute(768L, "AcFrequency") + + object AcFrequencyMin : Attribute(769L, "AcFrequencyMin") + + object AcFrequencyMax : Attribute(770L, "AcFrequencyMax") + + object NeutralCurrent : Attribute(771L, "NeutralCurrent") + + object TotalActivePower : Attribute(772L, "TotalActivePower") + + object TotalReactivePower : Attribute(773L, "TotalReactivePower") + + object TotalApparentPower : Attribute(774L, "TotalApparentPower") + + object Measured1stHarmonicCurrent : Attribute(775L, "Measured1stHarmonicCurrent") + + object Measured3rdHarmonicCurrent : Attribute(776L, "Measured3rdHarmonicCurrent") + + object Measured5thHarmonicCurrent : Attribute(777L, "Measured5thHarmonicCurrent") + + object Measured7thHarmonicCurrent : Attribute(778L, "Measured7thHarmonicCurrent") + + object Measured9thHarmonicCurrent : Attribute(779L, "Measured9thHarmonicCurrent") + + object Measured11thHarmonicCurrent : Attribute(780L, "Measured11thHarmonicCurrent") + + object MeasuredPhase1stHarmonicCurrent : Attribute(781L, "MeasuredPhase1stHarmonicCurrent") + + object MeasuredPhase3rdHarmonicCurrent : Attribute(782L, "MeasuredPhase3rdHarmonicCurrent") + + object MeasuredPhase5thHarmonicCurrent : Attribute(783L, "MeasuredPhase5thHarmonicCurrent") + + object MeasuredPhase7thHarmonicCurrent : Attribute(784L, "MeasuredPhase7thHarmonicCurrent") + + object MeasuredPhase9thHarmonicCurrent : Attribute(785L, "MeasuredPhase9thHarmonicCurrent") + + object MeasuredPhase11thHarmonicCurrent : Attribute(786L, "MeasuredPhase11thHarmonicCurrent") + + object AcFrequencyMultiplier : Attribute(1024L, "AcFrequencyMultiplier") + + object AcFrequencyDivisor : Attribute(1025L, "AcFrequencyDivisor") + + object PowerMultiplier : Attribute(1026L, "PowerMultiplier") + + object PowerDivisor : Attribute(1027L, "PowerDivisor") + + object HarmonicCurrentMultiplier : Attribute(1028L, "HarmonicCurrentMultiplier") + + object PhaseHarmonicCurrentMultiplier : Attribute(1029L, "PhaseHarmonicCurrentMultiplier") + + object InstantaneousVoltage : Attribute(1280L, "InstantaneousVoltage") + + object InstantaneousLineCurrent : Attribute(1281L, "InstantaneousLineCurrent") + + object InstantaneousActiveCurrent : Attribute(1282L, "InstantaneousActiveCurrent") + + object InstantaneousReactiveCurrent : Attribute(1283L, "InstantaneousReactiveCurrent") + + object InstantaneousPower : Attribute(1284L, "InstantaneousPower") + + object RmsVoltage : Attribute(1285L, "RmsVoltage") + + object RmsVoltageMin : Attribute(1286L, "RmsVoltageMin") + + object RmsVoltageMax : Attribute(1287L, "RmsVoltageMax") + + object RmsCurrent : Attribute(1288L, "RmsCurrent") + + object RmsCurrentMin : Attribute(1289L, "RmsCurrentMin") + + object RmsCurrentMax : Attribute(1290L, "RmsCurrentMax") + + object ActivePower : Attribute(1291L, "ActivePower") + + object ActivePowerMin : Attribute(1292L, "ActivePowerMin") + + object ActivePowerMax : Attribute(1293L, "ActivePowerMax") + + object ReactivePower : Attribute(1294L, "ReactivePower") + + object ApparentPower : Attribute(1295L, "ApparentPower") + + object PowerFactor : Attribute(1296L, "PowerFactor") + + object AverageRmsVoltageMeasurementPeriod : + Attribute(1297L, "AverageRmsVoltageMeasurementPeriod") + + object AverageRmsUnderVoltageCounter : Attribute(1299L, "AverageRmsUnderVoltageCounter") + + object RmsExtremeOverVoltagePeriod : Attribute(1300L, "RmsExtremeOverVoltagePeriod") + + object RmsExtremeUnderVoltagePeriod : Attribute(1301L, "RmsExtremeUnderVoltagePeriod") + + object RmsVoltageSagPeriod : Attribute(1302L, "RmsVoltageSagPeriod") + + object RmsVoltageSwellPeriod : Attribute(1303L, "RmsVoltageSwellPeriod") + + object AcVoltageMultiplier : Attribute(1536L, "AcVoltageMultiplier") + + object AcVoltageDivisor : Attribute(1537L, "AcVoltageDivisor") + + object AcCurrentMultiplier : Attribute(1538L, "AcCurrentMultiplier") + + object AcCurrentDivisor : Attribute(1539L, "AcCurrentDivisor") + + object AcPowerMultiplier : Attribute(1540L, "AcPowerMultiplier") + + object AcPowerDivisor : Attribute(1541L, "AcPowerDivisor") + + object OverloadAlarmsMask : Attribute(1792L, "OverloadAlarmsMask") + + object VoltageOverload : Attribute(1793L, "VoltageOverload") + + object CurrentOverload : Attribute(1794L, "CurrentOverload") + + object AcOverloadAlarmsMask : Attribute(2048L, "AcOverloadAlarmsMask") + + object AcVoltageOverload : Attribute(2049L, "AcVoltageOverload") + + object AcCurrentOverload : Attribute(2050L, "AcCurrentOverload") + + object AcActivePowerOverload : Attribute(2051L, "AcActivePowerOverload") + + object AcReactivePowerOverload : Attribute(2052L, "AcReactivePowerOverload") + + object AverageRmsOverVoltage : Attribute(2053L, "AverageRmsOverVoltage") + + object AverageRmsUnderVoltage : Attribute(2054L, "AverageRmsUnderVoltage") + + object RmsExtremeOverVoltage : Attribute(2055L, "RmsExtremeOverVoltage") + + object RmsExtremeUnderVoltage : Attribute(2056L, "RmsExtremeUnderVoltage") + + object RmsVoltageSag : Attribute(2057L, "RmsVoltageSag") + + object RmsVoltageSwell : Attribute(2058L, "RmsVoltageSwell") + + object LineCurrentPhaseB : Attribute(2305L, "LineCurrentPhaseB") + + object ActiveCurrentPhaseB : Attribute(2306L, "ActiveCurrentPhaseB") + + object ReactiveCurrentPhaseB : Attribute(2307L, "ReactiveCurrentPhaseB") + + object RmsVoltagePhaseB : Attribute(2309L, "RmsVoltagePhaseB") + + object RmsVoltageMinPhaseB : Attribute(2310L, "RmsVoltageMinPhaseB") + + object RmsVoltageMaxPhaseB : Attribute(2311L, "RmsVoltageMaxPhaseB") + + object RmsCurrentPhaseB : Attribute(2312L, "RmsCurrentPhaseB") + + object RmsCurrentMinPhaseB : Attribute(2313L, "RmsCurrentMinPhaseB") + + object RmsCurrentMaxPhaseB : Attribute(2314L, "RmsCurrentMaxPhaseB") + + object ActivePowerPhaseB : Attribute(2315L, "ActivePowerPhaseB") + + object ActivePowerMinPhaseB : Attribute(2316L, "ActivePowerMinPhaseB") + + object ActivePowerMaxPhaseB : Attribute(2317L, "ActivePowerMaxPhaseB") + + object ReactivePowerPhaseB : Attribute(2318L, "ReactivePowerPhaseB") + + object ApparentPowerPhaseB : Attribute(2319L, "ApparentPowerPhaseB") + + object PowerFactorPhaseB : Attribute(2320L, "PowerFactorPhaseB") + + object AverageRmsVoltageMeasurementPeriodPhaseB : + Attribute(2321L, "AverageRmsVoltageMeasurementPeriodPhaseB") + + object AverageRmsOverVoltageCounterPhaseB : + Attribute(2322L, "AverageRmsOverVoltageCounterPhaseB") + + object AverageRmsUnderVoltageCounterPhaseB : + Attribute(2323L, "AverageRmsUnderVoltageCounterPhaseB") + + object RmsExtremeOverVoltagePeriodPhaseB : + Attribute(2324L, "RmsExtremeOverVoltagePeriodPhaseB") + + object RmsExtremeUnderVoltagePeriodPhaseB : + Attribute(2325L, "RmsExtremeUnderVoltagePeriodPhaseB") + + object RmsVoltageSagPeriodPhaseB : Attribute(2326L, "RmsVoltageSagPeriodPhaseB") + + object RmsVoltageSwellPeriodPhaseB : Attribute(2327L, "RmsVoltageSwellPeriodPhaseB") + + object LineCurrentPhaseC : Attribute(2561L, "LineCurrentPhaseC") + + object ActiveCurrentPhaseC : Attribute(2562L, "ActiveCurrentPhaseC") + + object ReactiveCurrentPhaseC : Attribute(2563L, "ReactiveCurrentPhaseC") + + object RmsVoltagePhaseC : Attribute(2565L, "RmsVoltagePhaseC") + + object RmsVoltageMinPhaseC : Attribute(2566L, "RmsVoltageMinPhaseC") + + object RmsVoltageMaxPhaseC : Attribute(2567L, "RmsVoltageMaxPhaseC") + + object RmsCurrentPhaseC : Attribute(2568L, "RmsCurrentPhaseC") + + object RmsCurrentMinPhaseC : Attribute(2569L, "RmsCurrentMinPhaseC") + + object RmsCurrentMaxPhaseC : Attribute(2570L, "RmsCurrentMaxPhaseC") + + object ActivePowerPhaseC : Attribute(2571L, "ActivePowerPhaseC") + + object ActivePowerMinPhaseC : Attribute(2572L, "ActivePowerMinPhaseC") + + object ActivePowerMaxPhaseC : Attribute(2573L, "ActivePowerMaxPhaseC") + + object ReactivePowerPhaseC : Attribute(2574L, "ReactivePowerPhaseC") + + object ApparentPowerPhaseC : Attribute(2575L, "ApparentPowerPhaseC") + + object PowerFactorPhaseC : Attribute(2576L, "PowerFactorPhaseC") + + object AverageRmsVoltageMeasurementPeriodPhaseC : + Attribute(2577L, "AverageRmsVoltageMeasurementPeriodPhaseC") + + object AverageRmsOverVoltageCounterPhaseC : + Attribute(2578L, "AverageRmsOverVoltageCounterPhaseC") + + object AverageRmsUnderVoltageCounterPhaseC : + Attribute(2579L, "AverageRmsUnderVoltageCounterPhaseC") + + object RmsExtremeOverVoltagePeriodPhaseC : + Attribute(2580L, "RmsExtremeOverVoltagePeriodPhaseC") + + object RmsExtremeUnderVoltagePeriodPhaseC : + Attribute(2581L, "RmsExtremeUnderVoltagePeriodPhaseC") + + object RmsVoltageSagPeriodPhaseC : Attribute(2582L, "RmsVoltageSagPeriodPhaseC") + + object RmsVoltageSwellPeriodPhaseC : Attribute(2583L, "RmsVoltageSwellPeriodPhaseC") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object GetProfileInfoCommand : Command(0L, "GetProfileInfoCommand") + + object GetMeasurementProfileCommand : Command(1L, "GetMeasurementProfileCommand") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetMeasurementProfileCommandCommandField(val id: Int, val name: String) { + object AttributeId : GetMeasurementProfileCommandCommandField(0, "AttributeId") + + object StartTime : GetMeasurementProfileCommandCommandField(1, "StartTime") + + object NumberOfIntervals : GetMeasurementProfileCommandCommandField(2, "NumberOfIntervals") + + companion object { + fun values(): List { + return GetMeasurementProfileCommandCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetMeasurementProfileCommandCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetMeasurementProfileCommandCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/EthernetNetworkDiagnostics.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/EthernetNetworkDiagnostics.kt new file mode 100644 index 00000000000000..a51f20b1ca90b1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/EthernetNetworkDiagnostics.kt @@ -0,0 +1,129 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object EthernetNetworkDiagnostics : BaseCluster() { + const val ID = 55L + + sealed class Attribute(val id: Long, val name: String) { + object PHYRate : Attribute(0L, "PHYRate") + + object FullDuplex : Attribute(1L, "FullDuplex") + + object PacketRxCount : Attribute(2L, "PacketRxCount") + + object PacketTxCount : Attribute(3L, "PacketTxCount") + + object TxErrCount : Attribute(4L, "TxErrCount") + + object CollisionCount : Attribute(5L, "CollisionCount") + + object OverrunCount : Attribute(6L, "OverrunCount") + + object CarrierDetect : Attribute(7L, "CarrierDetect") + + object TimeSinceReset : Attribute(8L, "TimeSinceReset") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ResetCounts : Command(0L, "ResetCounts") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FanControl.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FanControl.kt new file mode 100644 index 00000000000000..dbe19d5609a94c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FanControl.kt @@ -0,0 +1,169 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object FanControl : BaseCluster() { + const val ID = 514L + + sealed class Attribute(val id: Long, val name: String) { + object FanMode : Attribute(0L, "FanMode") + + object FanModeSequence : Attribute(1L, "FanModeSequence") + + object PercentSetting : Attribute(2L, "PercentSetting") + + object PercentCurrent : Attribute(3L, "PercentCurrent") + + object SpeedMax : Attribute(4L, "SpeedMax") + + object SpeedSetting : Attribute(5L, "SpeedSetting") + + object SpeedCurrent : Attribute(6L, "SpeedCurrent") + + object RockSupport : Attribute(7L, "RockSupport") + + object RockSetting : Attribute(8L, "RockSetting") + + object WindSupport : Attribute(9L, "WindSupport") + + object WindSetting : Attribute(10L, "WindSetting") + + object AirflowDirection : Attribute(11L, "AirflowDirection") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Step : Command(0L, "Step") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StepCommandField(val id: Int, val name: String) { + object Direction : StepCommandField(0, "Direction") + + object Wrap : StepCommandField(1, "Wrap") + + object LowestOff : StepCommandField(2, "LowestOff") + + companion object { + fun values(): List { + return StepCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StepCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StepCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FaultInjection.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FaultInjection.kt new file mode 100644 index 00000000000000..54269225afefa4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FaultInjection.kt @@ -0,0 +1,185 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object FaultInjection : BaseCluster() { + const val ID = 4294048774L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object FailAtFault : Command(0L, "FailAtFault") + + object FailRandomlyAtFault : Command(1L, "FailRandomlyAtFault") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class FailAtFaultCommandField(val id: Int, val name: String) { + object Type : FailAtFaultCommandField(0, "Type") + + object Id : FailAtFaultCommandField(1, "Id") + + object NumCallsToSkip : FailAtFaultCommandField(2, "NumCallsToSkip") + + object NumCallsToFail : FailAtFaultCommandField(3, "NumCallsToFail") + + object TakeMutex : FailAtFaultCommandField(4, "TakeMutex") + + companion object { + fun values(): List { + return FailAtFaultCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): FailAtFaultCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): FailAtFaultCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class FailRandomlyAtFaultCommandField(val id: Int, val name: String) { + object Type : FailRandomlyAtFaultCommandField(0, "Type") + + object Id : FailRandomlyAtFaultCommandField(1, "Id") + + object Percentage : FailRandomlyAtFaultCommandField(2, "Percentage") + + companion object { + fun values(): List { + return FailRandomlyAtFaultCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): FailRandomlyAtFaultCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): FailRandomlyAtFaultCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FixedLabel.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FixedLabel.kt new file mode 100644 index 00000000000000..1653ff94fb4f04 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FixedLabel.kt @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object FixedLabel : BaseCluster() { + const val ID = 64L + + sealed class Attribute(val id: Long, val name: String) { + object LabelList : Attribute(0L, "LabelList") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FlowMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FlowMeasurement.kt new file mode 100644 index 00000000000000..7875ac2ff76b91 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FlowMeasurement.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object FlowMeasurement : BaseCluster() { + const val ID = 1028L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object Tolerance : Attribute(3L, "Tolerance") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FormaldehydeConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FormaldehydeConcentrationMeasurement.kt new file mode 100644 index 00000000000000..820bf85e5c8c7b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FormaldehydeConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object FormaldehydeConcentrationMeasurement : BaseCluster() { + const val ID = 1067L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GeneralCommissioning.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GeneralCommissioning.kt new file mode 100644 index 00000000000000..fa0dc875a8247d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GeneralCommissioning.kt @@ -0,0 +1,191 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object GeneralCommissioning : BaseCluster() { + const val ID = 48L + + sealed class Attribute(val id: Long, val name: String) { + object Breadcrumb : Attribute(0L, "Breadcrumb") + + object BasicCommissioningInfo : Attribute(1L, "BasicCommissioningInfo") + + object RegulatoryConfig : Attribute(2L, "RegulatoryConfig") + + object LocationCapability : Attribute(3L, "LocationCapability") + + object SupportsConcurrentConnection : Attribute(4L, "SupportsConcurrentConnection") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ArmFailSafe : Command(0L, "ArmFailSafe") + + object SetRegulatoryConfig : Command(2L, "SetRegulatoryConfig") + + object CommissioningComplete : Command(4L, "CommissioningComplete") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ArmFailSafeCommandField(val id: Int, val name: String) { + object ExpiryLengthSeconds : ArmFailSafeCommandField(0, "ExpiryLengthSeconds") + + object Breadcrumb : ArmFailSafeCommandField(1, "Breadcrumb") + + companion object { + fun values(): List { + return ArmFailSafeCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ArmFailSafeCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ArmFailSafeCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetRegulatoryConfigCommandField(val id: Int, val name: String) { + object NewRegulatoryConfig : SetRegulatoryConfigCommandField(0, "NewRegulatoryConfig") + + object CountryCode : SetRegulatoryConfigCommandField(1, "CountryCode") + + object Breadcrumb : SetRegulatoryConfigCommandField(2, "Breadcrumb") + + companion object { + fun values(): List { + return SetRegulatoryConfigCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetRegulatoryConfigCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetRegulatoryConfigCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GeneralDiagnostics.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GeneralDiagnostics.kt new file mode 100644 index 00000000000000..2b64f3afdf498b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GeneralDiagnostics.kt @@ -0,0 +1,205 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object GeneralDiagnostics : BaseCluster() { + const val ID = 51L + + sealed class Attribute(val id: Long, val name: String) { + object NetworkInterfaces : Attribute(0L, "NetworkInterfaces") + + object RebootCount : Attribute(1L, "RebootCount") + + object UpTime : Attribute(2L, "UpTime") + + object TotalOperationalHours : Attribute(3L, "TotalOperationalHours") + + object BootReason : Attribute(4L, "BootReason") + + object ActiveHardwareFaults : Attribute(5L, "ActiveHardwareFaults") + + object ActiveRadioFaults : Attribute(6L, "ActiveRadioFaults") + + object ActiveNetworkFaults : Attribute(7L, "ActiveNetworkFaults") + + object TestEventTriggersEnabled : Attribute(8L, "TestEventTriggersEnabled") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object HardwareFaultChange : Event(0L, "HardwareFaultChange") + + object RadioFaultChange : Event(1L, "RadioFaultChange") + + object NetworkFaultChange : Event(2L, "NetworkFaultChange") + + object BootReason : Event(3L, "BootReason") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object TestEventTrigger : Command(0L, "TestEventTrigger") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestEventTriggerCommandField(val id: Int, val name: String) { + object EnableKey : TestEventTriggerCommandField(0, "EnableKey") + + object EventTrigger : TestEventTriggerCommandField(1, "EventTrigger") + + companion object { + fun values(): List { + return TestEventTriggerCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestEventTriggerCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestEventTriggerCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GroupKeyManagement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GroupKeyManagement.kt new file mode 100644 index 00000000000000..0ae9665e4a8f24 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GroupKeyManagement.kt @@ -0,0 +1,215 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object GroupKeyManagement : BaseCluster() { + const val ID = 63L + + sealed class Attribute(val id: Long, val name: String) { + object GroupKeyMap : Attribute(0L, "GroupKeyMap") + + object GroupTable : Attribute(1L, "GroupTable") + + object MaxGroupsPerFabric : Attribute(2L, "MaxGroupsPerFabric") + + object MaxGroupKeysPerFabric : Attribute(3L, "MaxGroupKeysPerFabric") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object KeySetWrite : Command(0L, "KeySetWrite") + + object KeySetRead : Command(1L, "KeySetRead") + + object KeySetRemove : Command(3L, "KeySetRemove") + + object KeySetReadAllIndices : Command(4L, "KeySetReadAllIndices") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class KeySetWriteCommandField(val id: Int, val name: String) { + object GroupKeySet : KeySetWriteCommandField(0, "GroupKeySet") + + companion object { + fun values(): List { + return KeySetWriteCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): KeySetWriteCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): KeySetWriteCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class KeySetReadCommandField(val id: Int, val name: String) { + object GroupKeySetID : KeySetReadCommandField(0, "GroupKeySetID") + + companion object { + fun values(): List { + return KeySetReadCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): KeySetReadCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): KeySetReadCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class KeySetRemoveCommandField(val id: Int, val name: String) { + object GroupKeySetID : KeySetRemoveCommandField(0, "GroupKeySetID") + + companion object { + fun values(): List { + return KeySetRemoveCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): KeySetRemoveCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): KeySetRemoveCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Groups.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Groups.kt new file mode 100644 index 00000000000000..a674751e789ea5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Groups.kt @@ -0,0 +1,277 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Groups : BaseCluster() { + const val ID = 4L + + sealed class Attribute(val id: Long, val name: String) { + object NameSupport : Attribute(0L, "NameSupport") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object AddGroup : Command(0L, "AddGroup") + + object ViewGroup : Command(1L, "ViewGroup") + + object GetGroupMembership : Command(2L, "GetGroupMembership") + + object RemoveGroup : Command(3L, "RemoveGroup") + + object RemoveAllGroups : Command(4L, "RemoveAllGroups") + + object AddGroupIfIdentifying : Command(5L, "AddGroupIfIdentifying") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AddGroupCommandField(val id: Int, val name: String) { + object GroupID : AddGroupCommandField(0, "GroupID") + + object GroupName : AddGroupCommandField(1, "GroupName") + + companion object { + fun values(): List { + return AddGroupCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AddGroupCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AddGroupCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ViewGroupCommandField(val id: Int, val name: String) { + object GroupID : ViewGroupCommandField(0, "GroupID") + + companion object { + fun values(): List { + return ViewGroupCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ViewGroupCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ViewGroupCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetGroupMembershipCommandField(val id: Int, val name: String) { + object GroupList : GetGroupMembershipCommandField(0, "GroupList") + + companion object { + fun values(): List { + return GetGroupMembershipCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetGroupMembershipCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetGroupMembershipCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RemoveGroupCommandField(val id: Int, val name: String) { + object GroupID : RemoveGroupCommandField(0, "GroupID") + + companion object { + fun values(): List { + return RemoveGroupCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RemoveGroupCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RemoveGroupCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AddGroupIfIdentifyingCommandField(val id: Int, val name: String) { + object GroupID : AddGroupIfIdentifyingCommandField(0, "GroupID") + + object GroupName : AddGroupIfIdentifyingCommandField(1, "GroupName") + + companion object { + fun values(): List { + return AddGroupIfIdentifyingCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AddGroupIfIdentifyingCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AddGroupIfIdentifyingCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/HepaFilterMonitoring.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/HepaFilterMonitoring.kt new file mode 100644 index 00000000000000..3809fd0773b380 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/HepaFilterMonitoring.kt @@ -0,0 +1,123 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object HepaFilterMonitoring : BaseCluster() { + const val ID = 113L + + sealed class Attribute(val id: Long, val name: String) { + object Condition : Attribute(0L, "Condition") + + object DegradationDirection : Attribute(1L, "DegradationDirection") + + object ChangeIndication : Attribute(2L, "ChangeIndication") + + object InPlaceIndicator : Attribute(3L, "InPlaceIndicator") + + object LastChangedTime : Attribute(4L, "LastChangedTime") + + object ReplacementProductList : Attribute(5L, "ReplacementProductList") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ResetCondition : Command(0L, "ResetCondition") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/IcdManagement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/IcdManagement.kt new file mode 100644 index 00000000000000..d3cbd07c9fdce7 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/IcdManagement.kt @@ -0,0 +1,195 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object IcdManagement : BaseCluster() { + const val ID = 70L + + sealed class Attribute(val id: Long, val name: String) { + object IdleModeInterval : Attribute(0L, "IdleModeInterval") + + object ActiveModeInterval : Attribute(1L, "ActiveModeInterval") + + object ActiveModeThreshold : Attribute(2L, "ActiveModeThreshold") + + object RegisteredClients : Attribute(3L, "RegisteredClients") + + object ICDCounter : Attribute(4L, "ICDCounter") + + object ClientsSupportedPerFabric : Attribute(5L, "ClientsSupportedPerFabric") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object RegisterClient : Command(0L, "RegisterClient") + + object UnregisterClient : Command(2L, "UnregisterClient") + + object StayActiveRequest : Command(3L, "StayActiveRequest") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RegisterClientCommandField(val id: Int, val name: String) { + object CheckInNodeID : RegisterClientCommandField(0, "CheckInNodeID") + + object MonitoredSubject : RegisterClientCommandField(1, "MonitoredSubject") + + object Key : RegisterClientCommandField(2, "Key") + + object VerificationKey : RegisterClientCommandField(3, "VerificationKey") + + companion object { + fun values(): List { + return RegisterClientCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RegisterClientCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RegisterClientCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class UnregisterClientCommandField(val id: Int, val name: String) { + object CheckInNodeID : UnregisterClientCommandField(0, "CheckInNodeID") + + object VerificationKey : UnregisterClientCommandField(1, "VerificationKey") + + companion object { + fun values(): List { + return UnregisterClientCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): UnregisterClientCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): UnregisterClientCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Identify.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Identify.kt new file mode 100644 index 00000000000000..52c621c772e287 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Identify.kt @@ -0,0 +1,179 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Identify : BaseCluster() { + const val ID = 3L + + sealed class Attribute(val id: Long, val name: String) { + object IdentifyTime : Attribute(0L, "IdentifyTime") + + object IdentifyType : Attribute(1L, "IdentifyType") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Identify : Command(0L, "Identify") + + object TriggerEffect : Command(64L, "TriggerEffect") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class IdentifyCommandField(val id: Int, val name: String) { + object IdentifyTime : IdentifyCommandField(0, "IdentifyTime") + + companion object { + fun values(): List { + return IdentifyCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): IdentifyCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): IdentifyCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TriggerEffectCommandField(val id: Int, val name: String) { + object EffectIdentifier : TriggerEffectCommandField(0, "EffectIdentifier") + + object EffectVariant : TriggerEffectCommandField(1, "EffectVariant") + + companion object { + fun values(): List { + return TriggerEffectCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TriggerEffectCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TriggerEffectCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/IlluminanceMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/IlluminanceMeasurement.kt new file mode 100644 index 00000000000000..62c3ed8daf3f9b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/IlluminanceMeasurement.kt @@ -0,0 +1,83 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object IlluminanceMeasurement : BaseCluster() { + const val ID = 1024L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object Tolerance : Attribute(3L, "Tolerance") + + object LightSensorType : Attribute(4L, "LightSensorType") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/KeypadInput.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/KeypadInput.kt new file mode 100644 index 00000000000000..a63c0b96a49df1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/KeypadInput.kt @@ -0,0 +1,141 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object KeypadInput : BaseCluster() { + const val ID = 1289L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object SendKey : Command(0L, "SendKey") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SendKeyCommandField(val id: Int, val name: String) { + object KeyCode : SendKeyCommandField(0, "KeyCode") + + companion object { + fun values(): List { + return SendKeyCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SendKeyCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SendKeyCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LaundryWasherControls.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LaundryWasherControls.kt new file mode 100644 index 00000000000000..fc979189c7553d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LaundryWasherControls.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object LaundryWasherControls : BaseCluster() { + const val ID = 83L + + sealed class Attribute(val id: Long, val name: String) { + object SpinSpeeds : Attribute(0L, "SpinSpeeds") + + object SpinSpeedCurrent : Attribute(1L, "SpinSpeedCurrent") + + object NumberOfRinses : Attribute(2L, "NumberOfRinses") + + object SupportedRinses : Attribute(3L, "SupportedRinses") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LaundryWasherMode.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LaundryWasherMode.kt new file mode 100644 index 00000000000000..65a1144874752a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LaundryWasherMode.kt @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object LaundryWasherMode : BaseCluster() { + const val ID = 81L + + sealed class Attribute(val id: Long, val name: String) { + object SupportedModes : Attribute(0L, "SupportedModes") + + object CurrentMode : Attribute(1L, "CurrentMode") + + object StartUpMode : Attribute(2L, "StartUpMode") + + object OnMode : Attribute(3L, "OnMode") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ChangeToMode : Command(0L, "ChangeToMode") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ChangeToModeCommandField(val id: Int, val name: String) { + object NewMode : ChangeToModeCommandField(0, "NewMode") + + companion object { + fun values(): List { + return ChangeToModeCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ChangeToModeCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ChangeToModeCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LevelControl.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LevelControl.kt new file mode 100644 index 00000000000000..67902a0ee78844 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LevelControl.kt @@ -0,0 +1,471 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object LevelControl : BaseCluster() { + const val ID = 8L + + sealed class Attribute(val id: Long, val name: String) { + object CurrentLevel : Attribute(0L, "CurrentLevel") + + object RemainingTime : Attribute(1L, "RemainingTime") + + object MinLevel : Attribute(2L, "MinLevel") + + object MaxLevel : Attribute(3L, "MaxLevel") + + object CurrentFrequency : Attribute(4L, "CurrentFrequency") + + object MinFrequency : Attribute(5L, "MinFrequency") + + object MaxFrequency : Attribute(6L, "MaxFrequency") + + object Options : Attribute(15L, "Options") + + object OnOffTransitionTime : Attribute(16L, "OnOffTransitionTime") + + object OnLevel : Attribute(17L, "OnLevel") + + object OnTransitionTime : Attribute(18L, "OnTransitionTime") + + object OffTransitionTime : Attribute(19L, "OffTransitionTime") + + object DefaultMoveRate : Attribute(20L, "DefaultMoveRate") + + object StartUpCurrentLevel : Attribute(16384L, "StartUpCurrentLevel") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object MoveToLevel : Command(0L, "MoveToLevel") + + object Move : Command(1L, "Move") + + object Step : Command(2L, "Step") + + object Stop : Command(3L, "Stop") + + object MoveToLevelWithOnOff : Command(4L, "MoveToLevelWithOnOff") + + object MoveWithOnOff : Command(5L, "MoveWithOnOff") + + object StepWithOnOff : Command(6L, "StepWithOnOff") + + object StopWithOnOff : Command(7L, "StopWithOnOff") + + object MoveToClosestFrequency : Command(8L, "MoveToClosestFrequency") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveToLevelCommandField(val id: Int, val name: String) { + object Level : MoveToLevelCommandField(0, "Level") + + object TransitionTime : MoveToLevelCommandField(1, "TransitionTime") + + object OptionsMask : MoveToLevelCommandField(2, "OptionsMask") + + object OptionsOverride : MoveToLevelCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveToLevelCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveToLevelCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveToLevelCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveCommandField(val id: Int, val name: String) { + object MoveMode : MoveCommandField(0, "MoveMode") + + object Rate : MoveCommandField(1, "Rate") + + object OptionsMask : MoveCommandField(2, "OptionsMask") + + object OptionsOverride : MoveCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StepCommandField(val id: Int, val name: String) { + object StepMode : StepCommandField(0, "StepMode") + + object StepSize : StepCommandField(1, "StepSize") + + object TransitionTime : StepCommandField(2, "TransitionTime") + + object OptionsMask : StepCommandField(3, "OptionsMask") + + object OptionsOverride : StepCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return StepCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StepCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StepCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StopCommandField(val id: Int, val name: String) { + object OptionsMask : StopCommandField(0, "OptionsMask") + + object OptionsOverride : StopCommandField(1, "OptionsOverride") + + companion object { + fun values(): List { + return StopCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StopCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StopCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveToLevelWithOnOffCommandField(val id: Int, val name: String) { + object Level : MoveToLevelWithOnOffCommandField(0, "Level") + + object TransitionTime : MoveToLevelWithOnOffCommandField(1, "TransitionTime") + + object OptionsMask : MoveToLevelWithOnOffCommandField(2, "OptionsMask") + + object OptionsOverride : MoveToLevelWithOnOffCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveToLevelWithOnOffCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveToLevelWithOnOffCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveToLevelWithOnOffCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveWithOnOffCommandField(val id: Int, val name: String) { + object MoveMode : MoveWithOnOffCommandField(0, "MoveMode") + + object Rate : MoveWithOnOffCommandField(1, "Rate") + + object OptionsMask : MoveWithOnOffCommandField(2, "OptionsMask") + + object OptionsOverride : MoveWithOnOffCommandField(3, "OptionsOverride") + + companion object { + fun values(): List { + return MoveWithOnOffCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveWithOnOffCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveWithOnOffCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StepWithOnOffCommandField(val id: Int, val name: String) { + object StepMode : StepWithOnOffCommandField(0, "StepMode") + + object StepSize : StepWithOnOffCommandField(1, "StepSize") + + object TransitionTime : StepWithOnOffCommandField(2, "TransitionTime") + + object OptionsMask : StepWithOnOffCommandField(3, "OptionsMask") + + object OptionsOverride : StepWithOnOffCommandField(4, "OptionsOverride") + + companion object { + fun values(): List { + return StepWithOnOffCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StepWithOnOffCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StepWithOnOffCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StopWithOnOffCommandField(val id: Int, val name: String) { + object OptionsMask : StopWithOnOffCommandField(0, "OptionsMask") + + object OptionsOverride : StopWithOnOffCommandField(1, "OptionsOverride") + + companion object { + fun values(): List { + return StopWithOnOffCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StopWithOnOffCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StopWithOnOffCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class MoveToClosestFrequencyCommandField(val id: Int, val name: String) { + object Frequency : MoveToClosestFrequencyCommandField(0, "Frequency") + + companion object { + fun values(): List { + return MoveToClosestFrequencyCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): MoveToClosestFrequencyCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): MoveToClosestFrequencyCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LocalizationConfiguration.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LocalizationConfiguration.kt new file mode 100644 index 00000000000000..f9c17d28889096 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LocalizationConfiguration.kt @@ -0,0 +1,77 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object LocalizationConfiguration : BaseCluster() { + const val ID = 43L + + sealed class Attribute(val id: Long, val name: String) { + object ActiveLocale : Attribute(0L, "ActiveLocale") + + object SupportedLocales : Attribute(1L, "SupportedLocales") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LowPower.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LowPower.kt new file mode 100644 index 00000000000000..34a6aa1140394e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LowPower.kt @@ -0,0 +1,111 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object LowPower : BaseCluster() { + const val ID = 1288L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Sleep : Command(0L, "Sleep") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/MediaInput.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/MediaInput.kt new file mode 100644 index 00000000000000..e5a92e0f7018ee --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/MediaInput.kt @@ -0,0 +1,183 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object MediaInput : BaseCluster() { + const val ID = 1287L + + sealed class Attribute(val id: Long, val name: String) { + object InputList : Attribute(0L, "InputList") + + object CurrentInput : Attribute(1L, "CurrentInput") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object SelectInput : Command(0L, "SelectInput") + + object ShowInputStatus : Command(1L, "ShowInputStatus") + + object HideInputStatus : Command(2L, "HideInputStatus") + + object RenameInput : Command(3L, "RenameInput") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SelectInputCommandField(val id: Int, val name: String) { + object Index : SelectInputCommandField(0, "Index") + + companion object { + fun values(): List { + return SelectInputCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SelectInputCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SelectInputCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RenameInputCommandField(val id: Int, val name: String) { + object Index : RenameInputCommandField(0, "Index") + + object Name : RenameInputCommandField(1, "Name") + + companion object { + fun values(): List { + return RenameInputCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RenameInputCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RenameInputCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/MediaPlayback.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/MediaPlayback.kt new file mode 100644 index 00000000000000..2998ff2b2116a9 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/MediaPlayback.kt @@ -0,0 +1,235 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object MediaPlayback : BaseCluster() { + const val ID = 1286L + + sealed class Attribute(val id: Long, val name: String) { + object CurrentState : Attribute(0L, "CurrentState") + + object StartTime : Attribute(1L, "StartTime") + + object Duration : Attribute(2L, "Duration") + + object SampledPosition : Attribute(3L, "SampledPosition") + + object PlaybackSpeed : Attribute(4L, "PlaybackSpeed") + + object SeekRangeEnd : Attribute(5L, "SeekRangeEnd") + + object SeekRangeStart : Attribute(6L, "SeekRangeStart") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Play : Command(0L, "Play") + + object Pause : Command(1L, "Pause") + + object Stop : Command(2L, "Stop") + + object StartOver : Command(3L, "StartOver") + + object Previous : Command(4L, "Previous") + + object Next : Command(5L, "Next") + + object Rewind : Command(6L, "Rewind") + + object FastForward : Command(7L, "FastForward") + + object SkipForward : Command(8L, "SkipForward") + + object SkipBackward : Command(9L, "SkipBackward") + + object Seek : Command(11L, "Seek") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SkipForwardCommandField(val id: Int, val name: String) { + object DeltaPositionMilliseconds : SkipForwardCommandField(0, "DeltaPositionMilliseconds") + + companion object { + fun values(): List { + return SkipForwardCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SkipForwardCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SkipForwardCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SkipBackwardCommandField(val id: Int, val name: String) { + object DeltaPositionMilliseconds : SkipBackwardCommandField(0, "DeltaPositionMilliseconds") + + companion object { + fun values(): List { + return SkipBackwardCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SkipBackwardCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SkipBackwardCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SeekCommandField(val id: Int, val name: String) { + object Position : SeekCommandField(0, "Position") + + companion object { + fun values(): List { + return SeekCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SeekCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SeekCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ModeSelect.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ModeSelect.kt new file mode 100644 index 00000000000000..0ee64e877326ea --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ModeSelect.kt @@ -0,0 +1,153 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ModeSelect : BaseCluster() { + const val ID = 80L + + sealed class Attribute(val id: Long, val name: String) { + object Description : Attribute(0L, "Description") + + object StandardNamespace : Attribute(1L, "StandardNamespace") + + object SupportedModes : Attribute(2L, "SupportedModes") + + object CurrentMode : Attribute(3L, "CurrentMode") + + object StartUpMode : Attribute(4L, "StartUpMode") + + object OnMode : Attribute(5L, "OnMode") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ChangeToMode : Command(0L, "ChangeToMode") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ChangeToModeCommandField(val id: Int, val name: String) { + object NewMode : ChangeToModeCommandField(0, "NewMode") + + companion object { + fun values(): List { + return ChangeToModeCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ChangeToModeCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ChangeToModeCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/NetworkCommissioning.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/NetworkCommissioning.kt new file mode 100644 index 00000000000000..b16a1209b35060 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/NetworkCommissioning.kt @@ -0,0 +1,337 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object NetworkCommissioning : BaseCluster() { + const val ID = 49L + + sealed class Attribute(val id: Long, val name: String) { + object MaxNetworks : Attribute(0L, "MaxNetworks") + + object Networks : Attribute(1L, "Networks") + + object ScanMaxTimeSeconds : Attribute(2L, "ScanMaxTimeSeconds") + + object ConnectMaxTimeSeconds : Attribute(3L, "ConnectMaxTimeSeconds") + + object InterfaceEnabled : Attribute(4L, "InterfaceEnabled") + + object LastNetworkingStatus : Attribute(5L, "LastNetworkingStatus") + + object LastNetworkID : Attribute(6L, "LastNetworkID") + + object LastConnectErrorValue : Attribute(7L, "LastConnectErrorValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ScanNetworks : Command(0L, "ScanNetworks") + + object AddOrUpdateWiFiNetwork : Command(2L, "AddOrUpdateWiFiNetwork") + + object AddOrUpdateThreadNetwork : Command(3L, "AddOrUpdateThreadNetwork") + + object RemoveNetwork : Command(4L, "RemoveNetwork") + + object ConnectNetwork : Command(6L, "ConnectNetwork") + + object ReorderNetwork : Command(8L, "ReorderNetwork") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ScanNetworksCommandField(val id: Int, val name: String) { + object Ssid : ScanNetworksCommandField(0, "Ssid") + + object Breadcrumb : ScanNetworksCommandField(1, "Breadcrumb") + + companion object { + fun values(): List { + return ScanNetworksCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ScanNetworksCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ScanNetworksCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AddOrUpdateWiFiNetworkCommandField(val id: Int, val name: String) { + object Ssid : AddOrUpdateWiFiNetworkCommandField(0, "Ssid") + + object Credentials : AddOrUpdateWiFiNetworkCommandField(1, "Credentials") + + object Breadcrumb : AddOrUpdateWiFiNetworkCommandField(2, "Breadcrumb") + + companion object { + fun values(): List { + return AddOrUpdateWiFiNetworkCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AddOrUpdateWiFiNetworkCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AddOrUpdateWiFiNetworkCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AddOrUpdateThreadNetworkCommandField(val id: Int, val name: String) { + object OperationalDataset : AddOrUpdateThreadNetworkCommandField(0, "OperationalDataset") + + object Breadcrumb : AddOrUpdateThreadNetworkCommandField(1, "Breadcrumb") + + companion object { + fun values(): List { + return AddOrUpdateThreadNetworkCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AddOrUpdateThreadNetworkCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AddOrUpdateThreadNetworkCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RemoveNetworkCommandField(val id: Int, val name: String) { + object NetworkID : RemoveNetworkCommandField(0, "NetworkID") + + object Breadcrumb : RemoveNetworkCommandField(1, "Breadcrumb") + + companion object { + fun values(): List { + return RemoveNetworkCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RemoveNetworkCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RemoveNetworkCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ConnectNetworkCommandField(val id: Int, val name: String) { + object NetworkID : ConnectNetworkCommandField(0, "NetworkID") + + object Breadcrumb : ConnectNetworkCommandField(1, "Breadcrumb") + + companion object { + fun values(): List { + return ConnectNetworkCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ConnectNetworkCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ConnectNetworkCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ReorderNetworkCommandField(val id: Int, val name: String) { + object NetworkID : ReorderNetworkCommandField(0, "NetworkID") + + object NetworkIndex : ReorderNetworkCommandField(1, "NetworkIndex") + + object Breadcrumb : ReorderNetworkCommandField(2, "Breadcrumb") + + companion object { + fun values(): List { + return ReorderNetworkCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ReorderNetworkCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ReorderNetworkCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/NitrogenDioxideConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/NitrogenDioxideConcentrationMeasurement.kt new file mode 100644 index 00000000000000..b245b89ff1f3c9 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/NitrogenDioxideConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object NitrogenDioxideConcentrationMeasurement : BaseCluster() { + const val ID = 1043L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OccupancySensing.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OccupancySensing.kt new file mode 100644 index 00000000000000..db434244625898 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OccupancySensing.kt @@ -0,0 +1,103 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object OccupancySensing : BaseCluster() { + const val ID = 1030L + + sealed class Attribute(val id: Long, val name: String) { + object Occupancy : Attribute(0L, "Occupancy") + + object OccupancySensorType : Attribute(1L, "OccupancySensorType") + + object OccupancySensorTypeBitmap : Attribute(2L, "OccupancySensorTypeBitmap") + + object PIROccupiedToUnoccupiedDelay : Attribute(16L, "PIROccupiedToUnoccupiedDelay") + + object PIRUnoccupiedToOccupiedDelay : Attribute(17L, "PIRUnoccupiedToOccupiedDelay") + + object PIRUnoccupiedToOccupiedThreshold : Attribute(18L, "PIRUnoccupiedToOccupiedThreshold") + + object UltrasonicOccupiedToUnoccupiedDelay : + Attribute(32L, "UltrasonicOccupiedToUnoccupiedDelay") + + object UltrasonicUnoccupiedToOccupiedDelay : + Attribute(33L, "UltrasonicUnoccupiedToOccupiedDelay") + + object UltrasonicUnoccupiedToOccupiedThreshold : + Attribute(34L, "UltrasonicUnoccupiedToOccupiedThreshold") + + object PhysicalContactOccupiedToUnoccupiedDelay : + Attribute(48L, "PhysicalContactOccupiedToUnoccupiedDelay") + + object PhysicalContactUnoccupiedToOccupiedDelay : + Attribute(49L, "PhysicalContactUnoccupiedToOccupiedDelay") + + object PhysicalContactUnoccupiedToOccupiedThreshold : + Attribute(50L, "PhysicalContactUnoccupiedToOccupiedThreshold") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OnOff.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OnOff.kt new file mode 100644 index 00000000000000..5baeb4aaacd063 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OnOff.kt @@ -0,0 +1,197 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object OnOff : BaseCluster() { + const val ID = 6L + + sealed class Attribute(val id: Long, val name: String) { + object OnOff : Attribute(0L, "OnOff") + + object GlobalSceneControl : Attribute(16384L, "GlobalSceneControl") + + object OnTime : Attribute(16385L, "OnTime") + + object OffWaitTime : Attribute(16386L, "OffWaitTime") + + object StartUpOnOff : Attribute(16387L, "StartUpOnOff") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Off : Command(0L, "Off") + + object On : Command(1L, "On") + + object Toggle : Command(2L, "Toggle") + + object OffWithEffect : Command(64L, "OffWithEffect") + + object OnWithRecallGlobalScene : Command(65L, "OnWithRecallGlobalScene") + + object OnWithTimedOff : Command(66L, "OnWithTimedOff") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class OffWithEffectCommandField(val id: Int, val name: String) { + object EffectIdentifier : OffWithEffectCommandField(0, "EffectIdentifier") + + object EffectVariant : OffWithEffectCommandField(1, "EffectVariant") + + companion object { + fun values(): List { + return OffWithEffectCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): OffWithEffectCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): OffWithEffectCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class OnWithTimedOffCommandField(val id: Int, val name: String) { + object OnOffControl : OnWithTimedOffCommandField(0, "OnOffControl") + + object OnTime : OnWithTimedOffCommandField(1, "OnTime") + + object OffWaitTime : OnWithTimedOffCommandField(2, "OffWaitTime") + + companion object { + fun values(): List { + return OnWithTimedOffCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): OnWithTimedOffCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): OnWithTimedOffCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OnOffSwitchConfiguration.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OnOffSwitchConfiguration.kt new file mode 100644 index 00000000000000..f9559ac25b6ae3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OnOffSwitchConfiguration.kt @@ -0,0 +1,77 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object OnOffSwitchConfiguration : BaseCluster() { + const val ID = 7L + + sealed class Attribute(val id: Long, val name: String) { + object SwitchType : Attribute(0L, "SwitchType") + + object SwitchActions : Attribute(16L, "SwitchActions") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OperationalCredentials.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OperationalCredentials.kt new file mode 100644 index 00000000000000..191dcfa2a58187 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OperationalCredentials.kt @@ -0,0 +1,393 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object OperationalCredentials : BaseCluster() { + const val ID = 62L + + sealed class Attribute(val id: Long, val name: String) { + object NOCs : Attribute(0L, "NOCs") + + object Fabrics : Attribute(1L, "Fabrics") + + object SupportedFabrics : Attribute(2L, "SupportedFabrics") + + object CommissionedFabrics : Attribute(3L, "CommissionedFabrics") + + object TrustedRootCertificates : Attribute(4L, "TrustedRootCertificates") + + object CurrentFabricIndex : Attribute(5L, "CurrentFabricIndex") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object AttestationRequest : Command(0L, "AttestationRequest") + + object CertificateChainRequest : Command(2L, "CertificateChainRequest") + + object CSRRequest : Command(4L, "CSRRequest") + + object AddNOC : Command(6L, "AddNOC") + + object UpdateNOC : Command(7L, "UpdateNOC") + + object UpdateFabricLabel : Command(9L, "UpdateFabricLabel") + + object RemoveFabric : Command(10L, "RemoveFabric") + + object AddTrustedRootCertificate : Command(11L, "AddTrustedRootCertificate") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AttestationRequestCommandField(val id: Int, val name: String) { + object AttestationNonce : AttestationRequestCommandField(0, "AttestationNonce") + + companion object { + fun values(): List { + return AttestationRequestCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AttestationRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AttestationRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class CertificateChainRequestCommandField(val id: Int, val name: String) { + object CertificateType : CertificateChainRequestCommandField(0, "CertificateType") + + companion object { + fun values(): List { + return CertificateChainRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): CertificateChainRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): CertificateChainRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class CSRRequestCommandField(val id: Int, val name: String) { + object CSRNonce : CSRRequestCommandField(0, "CSRNonce") + + object IsForUpdateNOC : CSRRequestCommandField(1, "IsForUpdateNOC") + + companion object { + fun values(): List { + return CSRRequestCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): CSRRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): CSRRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AddNOCCommandField(val id: Int, val name: String) { + object NOCValue : AddNOCCommandField(0, "NOCValue") + + object ICACValue : AddNOCCommandField(1, "ICACValue") + + object IPKValue : AddNOCCommandField(2, "IPKValue") + + object CaseAdminSubject : AddNOCCommandField(3, "CaseAdminSubject") + + object AdminVendorId : AddNOCCommandField(4, "AdminVendorId") + + companion object { + fun values(): List { + return AddNOCCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AddNOCCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AddNOCCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class UpdateNOCCommandField(val id: Int, val name: String) { + object NOCValue : UpdateNOCCommandField(0, "NOCValue") + + object ICACValue : UpdateNOCCommandField(1, "ICACValue") + + companion object { + fun values(): List { + return UpdateNOCCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): UpdateNOCCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): UpdateNOCCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class UpdateFabricLabelCommandField(val id: Int, val name: String) { + object Label : UpdateFabricLabelCommandField(0, "Label") + + companion object { + fun values(): List { + return UpdateFabricLabelCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): UpdateFabricLabelCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): UpdateFabricLabelCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RemoveFabricCommandField(val id: Int, val name: String) { + object FabricIndex : RemoveFabricCommandField(0, "FabricIndex") + + companion object { + fun values(): List { + return RemoveFabricCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RemoveFabricCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RemoveFabricCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AddTrustedRootCertificateCommandField(val id: Int, val name: String) { + object RootCACertificate : AddTrustedRootCertificateCommandField(0, "RootCACertificate") + + companion object { + fun values(): List { + return AddTrustedRootCertificateCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AddTrustedRootCertificateCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AddTrustedRootCertificateCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OperationalState.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OperationalState.kt new file mode 100644 index 00000000000000..6a482f982db9a9 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OperationalState.kt @@ -0,0 +1,169 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object OperationalState : BaseCluster() { + const val ID = 96L + + sealed class Attribute(val id: Long, val name: String) { + object PhaseList : Attribute(0L, "PhaseList") + + object CurrentPhase : Attribute(1L, "CurrentPhase") + + object CountdownTime : Attribute(2L, "CountdownTime") + + object OperationalStateList : Attribute(3L, "OperationalStateList") + + object OperationalState : Attribute(4L, "OperationalState") + + object OperationalError : Attribute(5L, "OperationalError") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object OperationalError : Event(0L, "OperationalError") + + object OperationCompletion : Event(1L, "OperationCompletion") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Pause : Command(0L, "Pause") + + object Stop : Command(1L, "Stop") + + object Start : Command(2L, "Start") + + object Resume : Command(3L, "Resume") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OtaSoftwareUpdateProvider.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OtaSoftwareUpdateProvider.kt new file mode 100644 index 00000000000000..333d5e99596e99 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OtaSoftwareUpdateProvider.kt @@ -0,0 +1,223 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object OtaSoftwareUpdateProvider : BaseCluster() { + const val ID = 41L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object QueryImage : Command(0L, "QueryImage") + + object ApplyUpdateRequest : Command(2L, "ApplyUpdateRequest") + + object NotifyUpdateApplied : Command(4L, "NotifyUpdateApplied") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class QueryImageCommandField(val id: Int, val name: String) { + object VendorID : QueryImageCommandField(0, "VendorID") + + object ProductID : QueryImageCommandField(1, "ProductID") + + object SoftwareVersion : QueryImageCommandField(2, "SoftwareVersion") + + object ProtocolsSupported : QueryImageCommandField(3, "ProtocolsSupported") + + object HardwareVersion : QueryImageCommandField(4, "HardwareVersion") + + object Location : QueryImageCommandField(5, "Location") + + object RequestorCanConsent : QueryImageCommandField(6, "RequestorCanConsent") + + object MetadataForProvider : QueryImageCommandField(7, "MetadataForProvider") + + companion object { + fun values(): List { + return QueryImageCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): QueryImageCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): QueryImageCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ApplyUpdateRequestCommandField(val id: Int, val name: String) { + object UpdateToken : ApplyUpdateRequestCommandField(0, "UpdateToken") + + object NewVersion : ApplyUpdateRequestCommandField(1, "NewVersion") + + companion object { + fun values(): List { + return ApplyUpdateRequestCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ApplyUpdateRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ApplyUpdateRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class NotifyUpdateAppliedCommandField(val id: Int, val name: String) { + object UpdateToken : NotifyUpdateAppliedCommandField(0, "UpdateToken") + + object SoftwareVersion : NotifyUpdateAppliedCommandField(1, "SoftwareVersion") + + companion object { + fun values(): List { + return NotifyUpdateAppliedCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): NotifyUpdateAppliedCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): NotifyUpdateAppliedCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OtaSoftwareUpdateRequestor.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OtaSoftwareUpdateRequestor.kt new file mode 100644 index 00000000000000..8b5778616d2c41 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OtaSoftwareUpdateRequestor.kt @@ -0,0 +1,199 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object OtaSoftwareUpdateRequestor : BaseCluster() { + const val ID = 42L + + sealed class Attribute(val id: Long, val name: String) { + object DefaultOTAProviders : Attribute(0L, "DefaultOTAProviders") + + object UpdatePossible : Attribute(1L, "UpdatePossible") + + object UpdateState : Attribute(2L, "UpdateState") + + object UpdateStateProgress : Attribute(3L, "UpdateStateProgress") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object StateTransition : Event(0L, "StateTransition") + + object VersionApplied : Event(1L, "VersionApplied") + + object DownloadError : Event(2L, "DownloadError") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object AnnounceOTAProvider : Command(0L, "AnnounceOTAProvider") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AnnounceOTAProviderCommandField(val id: Int, val name: String) { + object ProviderNodeID : AnnounceOTAProviderCommandField(0, "ProviderNodeID") + + object VendorID : AnnounceOTAProviderCommandField(1, "VendorID") + + object AnnouncementReason : AnnounceOTAProviderCommandField(2, "AnnouncementReason") + + object MetadataForNode : AnnounceOTAProviderCommandField(3, "MetadataForNode") + + object Endpoint : AnnounceOTAProviderCommandField(4, "Endpoint") + + companion object { + fun values(): List { + return AnnounceOTAProviderCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AnnounceOTAProviderCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AnnounceOTAProviderCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OzoneConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OzoneConcentrationMeasurement.kt new file mode 100644 index 00000000000000..3a588467476244 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OzoneConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object OzoneConcentrationMeasurement : BaseCluster() { + const val ID = 1045L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm10ConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm10ConcentrationMeasurement.kt new file mode 100644 index 00000000000000..ba7c37e47c78a8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm10ConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Pm10ConcentrationMeasurement : BaseCluster() { + const val ID = 1069L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm1ConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm1ConcentrationMeasurement.kt new file mode 100644 index 00000000000000..f0fcb06ab36916 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm1ConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Pm1ConcentrationMeasurement : BaseCluster() { + const val ID = 1068L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm25ConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm25ConcentrationMeasurement.kt new file mode 100644 index 00000000000000..a80359aaf6b7b3 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm25ConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Pm25ConcentrationMeasurement : BaseCluster() { + const val ID = 1066L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PowerSource.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PowerSource.kt new file mode 100644 index 00000000000000..7e4945f4d8c271 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PowerSource.kt @@ -0,0 +1,179 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object PowerSource : BaseCluster() { + const val ID = 47L + + sealed class Attribute(val id: Long, val name: String) { + object Status : Attribute(0L, "Status") + + object Order : Attribute(1L, "Order") + + object Description : Attribute(2L, "Description") + + object WiredAssessedInputVoltage : Attribute(3L, "WiredAssessedInputVoltage") + + object WiredAssessedInputFrequency : Attribute(4L, "WiredAssessedInputFrequency") + + object WiredCurrentType : Attribute(5L, "WiredCurrentType") + + object WiredAssessedCurrent : Attribute(6L, "WiredAssessedCurrent") + + object WiredNominalVoltage : Attribute(7L, "WiredNominalVoltage") + + object WiredMaximumCurrent : Attribute(8L, "WiredMaximumCurrent") + + object WiredPresent : Attribute(9L, "WiredPresent") + + object ActiveWiredFaults : Attribute(10L, "ActiveWiredFaults") + + object BatVoltage : Attribute(11L, "BatVoltage") + + object BatPercentRemaining : Attribute(12L, "BatPercentRemaining") + + object BatTimeRemaining : Attribute(13L, "BatTimeRemaining") + + object BatChargeLevel : Attribute(14L, "BatChargeLevel") + + object BatReplacementNeeded : Attribute(15L, "BatReplacementNeeded") + + object BatReplaceability : Attribute(16L, "BatReplaceability") + + object BatPresent : Attribute(17L, "BatPresent") + + object ActiveBatFaults : Attribute(18L, "ActiveBatFaults") + + object BatReplacementDescription : Attribute(19L, "BatReplacementDescription") + + object BatCommonDesignation : Attribute(20L, "BatCommonDesignation") + + object BatANSIDesignation : Attribute(21L, "BatANSIDesignation") + + object BatIECDesignation : Attribute(22L, "BatIECDesignation") + + object BatApprovedChemistry : Attribute(23L, "BatApprovedChemistry") + + object BatCapacity : Attribute(24L, "BatCapacity") + + object BatQuantity : Attribute(25L, "BatQuantity") + + object BatChargeState : Attribute(26L, "BatChargeState") + + object BatTimeToFullCharge : Attribute(27L, "BatTimeToFullCharge") + + object BatFunctionalWhileCharging : Attribute(28L, "BatFunctionalWhileCharging") + + object BatChargingCurrent : Attribute(29L, "BatChargingCurrent") + + object ActiveBatChargeFaults : Attribute(30L, "ActiveBatChargeFaults") + + object EndpointList : Attribute(31L, "EndpointList") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object WiredFaultChange : Event(0L, "WiredFaultChange") + + object BatFaultChange : Event(1L, "BatFaultChange") + + object BatChargeFaultChange : Event(2L, "BatChargeFaultChange") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PowerSourceConfiguration.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PowerSourceConfiguration.kt new file mode 100644 index 00000000000000..fcf65b90639d78 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PowerSourceConfiguration.kt @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object PowerSourceConfiguration : BaseCluster() { + const val ID = 46L + + sealed class Attribute(val id: Long, val name: String) { + object Sources : Attribute(0L, "Sources") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PressureMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PressureMeasurement.kt new file mode 100644 index 00000000000000..7a805c7944564a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PressureMeasurement.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object PressureMeasurement : BaseCluster() { + const val ID = 1027L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object Tolerance : Attribute(3L, "Tolerance") + + object ScaledValue : Attribute(16L, "ScaledValue") + + object MinScaledValue : Attribute(17L, "MinScaledValue") + + object MaxScaledValue : Attribute(18L, "MaxScaledValue") + + object ScaledTolerance : Attribute(19L, "ScaledTolerance") + + object Scale : Attribute(20L, "Scale") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyConfiguration.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyConfiguration.kt new file mode 100644 index 00000000000000..cce61823b11699 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyConfiguration.kt @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ProxyConfiguration : BaseCluster() { + const val ID = 66L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyDiscovery.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyDiscovery.kt new file mode 100644 index 00000000000000..3de7f4ad6999f2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyDiscovery.kt @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ProxyDiscovery : BaseCluster() { + const val ID = 67L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyValid.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyValid.kt new file mode 100644 index 00000000000000..aef11d29e9e7ec --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyValid.kt @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ProxyValid : BaseCluster() { + const val ID = 68L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PulseWidthModulation.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PulseWidthModulation.kt new file mode 100644 index 00000000000000..d9d1e2f275ad20 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PulseWidthModulation.kt @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object PulseWidthModulation : BaseCluster() { + const val ID = 28L + + sealed class Attribute(val id: Long, val name: String) { + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PumpConfigurationAndControl.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PumpConfigurationAndControl.kt new file mode 100644 index 00000000000000..80edc3a5f1144e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PumpConfigurationAndControl.kt @@ -0,0 +1,189 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object PumpConfigurationAndControl : BaseCluster() { + const val ID = 512L + + sealed class Attribute(val id: Long, val name: String) { + object MaxPressure : Attribute(0L, "MaxPressure") + + object MaxSpeed : Attribute(1L, "MaxSpeed") + + object MaxFlow : Attribute(2L, "MaxFlow") + + object MinConstPressure : Attribute(3L, "MinConstPressure") + + object MaxConstPressure : Attribute(4L, "MaxConstPressure") + + object MinCompPressure : Attribute(5L, "MinCompPressure") + + object MaxCompPressure : Attribute(6L, "MaxCompPressure") + + object MinConstSpeed : Attribute(7L, "MinConstSpeed") + + object MaxConstSpeed : Attribute(8L, "MaxConstSpeed") + + object MinConstFlow : Attribute(9L, "MinConstFlow") + + object MaxConstFlow : Attribute(10L, "MaxConstFlow") + + object MinConstTemp : Attribute(11L, "MinConstTemp") + + object MaxConstTemp : Attribute(12L, "MaxConstTemp") + + object PumpStatus : Attribute(16L, "PumpStatus") + + object EffectiveOperationMode : Attribute(17L, "EffectiveOperationMode") + + object EffectiveControlMode : Attribute(18L, "EffectiveControlMode") + + object Capacity : Attribute(19L, "Capacity") + + object Speed : Attribute(20L, "Speed") + + object LifetimeRunningHours : Attribute(21L, "LifetimeRunningHours") + + object Power : Attribute(22L, "Power") + + object LifetimeEnergyConsumed : Attribute(23L, "LifetimeEnergyConsumed") + + object OperationMode : Attribute(32L, "OperationMode") + + object ControlMode : Attribute(33L, "ControlMode") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object SupplyVoltageLow : Event(0L, "SupplyVoltageLow") + + object SupplyVoltageHigh : Event(1L, "SupplyVoltageHigh") + + object PowerMissingPhase : Event(2L, "PowerMissingPhase") + + object SystemPressureLow : Event(3L, "SystemPressureLow") + + object SystemPressureHigh : Event(4L, "SystemPressureHigh") + + object DryRunning : Event(5L, "DryRunning") + + object MotorTemperatureHigh : Event(6L, "MotorTemperatureHigh") + + object PumpMotorFatalFailure : Event(7L, "PumpMotorFatalFailure") + + object ElectronicTemperatureHigh : Event(8L, "ElectronicTemperatureHigh") + + object PumpBlocked : Event(9L, "PumpBlocked") + + object SensorFailure : Event(10L, "SensorFailure") + + object ElectronicNonFatalFailure : Event(11L, "ElectronicNonFatalFailure") + + object ElectronicFatalFailure : Event(12L, "ElectronicFatalFailure") + + object GeneralFault : Event(13L, "GeneralFault") + + object Leakage : Event(14L, "Leakage") + + object AirDetection : Event(15L, "AirDetection") + + object TurbineOperation : Event(16L, "TurbineOperation") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RadonConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RadonConcentrationMeasurement.kt new file mode 100644 index 00000000000000..67e93704ddf9c4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RadonConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object RadonConcentrationMeasurement : BaseCluster() { + const val ID = 1071L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RefrigeratorAlarm.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RefrigeratorAlarm.kt new file mode 100644 index 00000000000000..15ab9ce0d7ca06 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RefrigeratorAlarm.kt @@ -0,0 +1,117 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object RefrigeratorAlarm : BaseCluster() { + const val ID = 87L + + sealed class Attribute(val id: Long, val name: String) { + object Mask : Attribute(0L, "Mask") + + object State : Attribute(2L, "State") + + object Supported : Attribute(3L, "Supported") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object Notify : Event(0L, "Notify") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RefrigeratorAndTemperatureControlledCabinetMode.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RefrigeratorAndTemperatureControlledCabinetMode.kt new file mode 100644 index 00000000000000..36379d305d20b7 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RefrigeratorAndTemperatureControlledCabinetMode.kt @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object RefrigeratorAndTemperatureControlledCabinetMode : BaseCluster() { + const val ID = 82L + + sealed class Attribute(val id: Long, val name: String) { + object SupportedModes : Attribute(0L, "SupportedModes") + + object CurrentMode : Attribute(1L, "CurrentMode") + + object StartUpMode : Attribute(2L, "StartUpMode") + + object OnMode : Attribute(3L, "OnMode") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ChangeToMode : Command(0L, "ChangeToMode") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ChangeToModeCommandField(val id: Int, val name: String) { + object NewMode : ChangeToModeCommandField(0, "NewMode") + + companion object { + fun values(): List { + return ChangeToModeCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ChangeToModeCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ChangeToModeCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RelativeHumidityMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RelativeHumidityMeasurement.kt new file mode 100644 index 00000000000000..336fe461ab5efc --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RelativeHumidityMeasurement.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object RelativeHumidityMeasurement : BaseCluster() { + const val ID = 1029L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object Tolerance : Attribute(3L, "Tolerance") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcCleanMode.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcCleanMode.kt new file mode 100644 index 00000000000000..e15f5b44e664e1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcCleanMode.kt @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object RvcCleanMode : BaseCluster() { + const val ID = 85L + + sealed class Attribute(val id: Long, val name: String) { + object SupportedModes : Attribute(0L, "SupportedModes") + + object CurrentMode : Attribute(1L, "CurrentMode") + + object StartUpMode : Attribute(2L, "StartUpMode") + + object OnMode : Attribute(3L, "OnMode") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ChangeToMode : Command(0L, "ChangeToMode") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ChangeToModeCommandField(val id: Int, val name: String) { + object NewMode : ChangeToModeCommandField(0, "NewMode") + + companion object { + fun values(): List { + return ChangeToModeCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ChangeToModeCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ChangeToModeCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcOperationalState.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcOperationalState.kt new file mode 100644 index 00000000000000..04235bb8e893a4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcOperationalState.kt @@ -0,0 +1,169 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object RvcOperationalState : BaseCluster() { + const val ID = 97L + + sealed class Attribute(val id: Long, val name: String) { + object PhaseList : Attribute(0L, "PhaseList") + + object CurrentPhase : Attribute(1L, "CurrentPhase") + + object CountdownTime : Attribute(2L, "CountdownTime") + + object OperationalStateList : Attribute(3L, "OperationalStateList") + + object OperationalState : Attribute(4L, "OperationalState") + + object OperationalError : Attribute(5L, "OperationalError") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object OperationalError : Event(0L, "OperationalError") + + object OperationCompletion : Event(1L, "OperationCompletion") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Pause : Command(0L, "Pause") + + object Stop : Command(1L, "Stop") + + object Start : Command(2L, "Start") + + object Resume : Command(3L, "Resume") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcRunMode.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcRunMode.kt new file mode 100644 index 00000000000000..1dae84b538532e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcRunMode.kt @@ -0,0 +1,149 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object RvcRunMode : BaseCluster() { + const val ID = 84L + + sealed class Attribute(val id: Long, val name: String) { + object SupportedModes : Attribute(0L, "SupportedModes") + + object CurrentMode : Attribute(1L, "CurrentMode") + + object StartUpMode : Attribute(2L, "StartUpMode") + + object OnMode : Attribute(3L, "OnMode") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ChangeToMode : Command(0L, "ChangeToMode") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ChangeToModeCommandField(val id: Int, val name: String) { + object NewMode : ChangeToModeCommandField(0, "NewMode") + + companion object { + fun values(): List { + return ChangeToModeCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ChangeToModeCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ChangeToModeCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Scenes.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Scenes.kt new file mode 100644 index 00000000000000..0ab64fbd9a145e --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Scenes.kt @@ -0,0 +1,481 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Scenes : BaseCluster() { + const val ID = 5L + + sealed class Attribute(val id: Long, val name: String) { + object SceneCount : Attribute(0L, "SceneCount") + + object CurrentScene : Attribute(1L, "CurrentScene") + + object CurrentGroup : Attribute(2L, "CurrentGroup") + + object SceneValid : Attribute(3L, "SceneValid") + + object NameSupport : Attribute(4L, "NameSupport") + + object LastConfiguredBy : Attribute(5L, "LastConfiguredBy") + + object SceneTableSize : Attribute(6L, "SceneTableSize") + + object RemainingCapacity : Attribute(7L, "RemainingCapacity") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object AddScene : Command(0L, "AddScene") + + object ViewScene : Command(1L, "ViewScene") + + object RemoveScene : Command(2L, "RemoveScene") + + object RemoveAllScenes : Command(3L, "RemoveAllScenes") + + object StoreScene : Command(4L, "StoreScene") + + object RecallScene : Command(5L, "RecallScene") + + object GetSceneMembership : Command(6L, "GetSceneMembership") + + object EnhancedAddScene : Command(64L, "EnhancedAddScene") + + object EnhancedViewScene : Command(65L, "EnhancedViewScene") + + object CopyScene : Command(66L, "CopyScene") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class AddSceneCommandField(val id: Int, val name: String) { + object GroupID : AddSceneCommandField(0, "GroupID") + + object SceneID : AddSceneCommandField(1, "SceneID") + + object TransitionTime : AddSceneCommandField(2, "TransitionTime") + + object SceneName : AddSceneCommandField(3, "SceneName") + + object ExtensionFieldSets : AddSceneCommandField(4, "ExtensionFieldSets") + + companion object { + fun values(): List { + return AddSceneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): AddSceneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): AddSceneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class ViewSceneCommandField(val id: Int, val name: String) { + object GroupID : ViewSceneCommandField(0, "GroupID") + + object SceneID : ViewSceneCommandField(1, "SceneID") + + companion object { + fun values(): List { + return ViewSceneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): ViewSceneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): ViewSceneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RemoveSceneCommandField(val id: Int, val name: String) { + object GroupID : RemoveSceneCommandField(0, "GroupID") + + object SceneID : RemoveSceneCommandField(1, "SceneID") + + companion object { + fun values(): List { + return RemoveSceneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RemoveSceneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RemoveSceneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RemoveAllScenesCommandField(val id: Int, val name: String) { + object GroupID : RemoveAllScenesCommandField(0, "GroupID") + + companion object { + fun values(): List { + return RemoveAllScenesCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RemoveAllScenesCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RemoveAllScenesCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class StoreSceneCommandField(val id: Int, val name: String) { + object GroupID : StoreSceneCommandField(0, "GroupID") + + object SceneID : StoreSceneCommandField(1, "SceneID") + + companion object { + fun values(): List { + return StoreSceneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): StoreSceneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): StoreSceneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class RecallSceneCommandField(val id: Int, val name: String) { + object GroupID : RecallSceneCommandField(0, "GroupID") + + object SceneID : RecallSceneCommandField(1, "SceneID") + + object TransitionTime : RecallSceneCommandField(2, "TransitionTime") + + companion object { + fun values(): List { + return RecallSceneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): RecallSceneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): RecallSceneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetSceneMembershipCommandField(val id: Int, val name: String) { + object GroupID : GetSceneMembershipCommandField(0, "GroupID") + + companion object { + fun values(): List { + return GetSceneMembershipCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetSceneMembershipCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetSceneMembershipCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class EnhancedAddSceneCommandField(val id: Int, val name: String) { + object GroupID : EnhancedAddSceneCommandField(0, "GroupID") + + object SceneID : EnhancedAddSceneCommandField(1, "SceneID") + + object TransitionTime : EnhancedAddSceneCommandField(2, "TransitionTime") + + object SceneName : EnhancedAddSceneCommandField(3, "SceneName") + + object ExtensionFieldSets : EnhancedAddSceneCommandField(4, "ExtensionFieldSets") + + companion object { + fun values(): List { + return EnhancedAddSceneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): EnhancedAddSceneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): EnhancedAddSceneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class EnhancedViewSceneCommandField(val id: Int, val name: String) { + object GroupID : EnhancedViewSceneCommandField(0, "GroupID") + + object SceneID : EnhancedViewSceneCommandField(1, "SceneID") + + companion object { + fun values(): List { + return EnhancedViewSceneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): EnhancedViewSceneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): EnhancedViewSceneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class CopySceneCommandField(val id: Int, val name: String) { + object Mode : CopySceneCommandField(0, "Mode") + + object GroupIdentifierFrom : CopySceneCommandField(1, "GroupIdentifierFrom") + + object SceneIdentifierFrom : CopySceneCommandField(2, "SceneIdentifierFrom") + + object GroupIdentifierTo : CopySceneCommandField(3, "GroupIdentifierTo") + + object SceneIdentifierTo : CopySceneCommandField(4, "SceneIdentifierTo") + + companion object { + fun values(): List { + return CopySceneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): CopySceneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): CopySceneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/SmokeCoAlarm.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/SmokeCoAlarm.kt new file mode 100644 index 00000000000000..c9940d1764342f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/SmokeCoAlarm.kt @@ -0,0 +1,195 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object SmokeCoAlarm : BaseCluster() { + const val ID = 92L + + sealed class Attribute(val id: Long, val name: String) { + object ExpressedState : Attribute(0L, "ExpressedState") + + object SmokeState : Attribute(1L, "SmokeState") + + object COState : Attribute(2L, "COState") + + object BatteryAlert : Attribute(3L, "BatteryAlert") + + object DeviceMuted : Attribute(4L, "DeviceMuted") + + object TestInProgress : Attribute(5L, "TestInProgress") + + object HardwareFaultAlert : Attribute(6L, "HardwareFaultAlert") + + object EndOfServiceAlert : Attribute(7L, "EndOfServiceAlert") + + object InterconnectSmokeAlarm : Attribute(8L, "InterconnectSmokeAlarm") + + object InterconnectCOAlarm : Attribute(9L, "InterconnectCOAlarm") + + object ContaminationState : Attribute(10L, "ContaminationState") + + object SmokeSensitivityLevel : Attribute(11L, "SmokeSensitivityLevel") + + object ExpiryDate : Attribute(12L, "ExpiryDate") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object SmokeAlarm : Event(0L, "SmokeAlarm") + + object COAlarm : Event(1L, "COAlarm") + + object LowBattery : Event(2L, "LowBattery") + + object HardwareFault : Event(3L, "HardwareFault") + + object EndOfService : Event(4L, "EndOfService") + + object SelfTestComplete : Event(5L, "SelfTestComplete") + + object AlarmMuted : Event(6L, "AlarmMuted") + + object MuteEnded : Event(7L, "MuteEnded") + + object InterconnectSmokeAlarm : Event(8L, "InterconnectSmokeAlarm") + + object InterconnectCOAlarm : Event(9L, "InterconnectCOAlarm") + + object AllClear : Event(10L, "AllClear") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object SelfTestRequest : Command(0L, "SelfTestRequest") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/SoftwareDiagnostics.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/SoftwareDiagnostics.kt new file mode 100644 index 00000000000000..4bead22e5aa0a7 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/SoftwareDiagnostics.kt @@ -0,0 +1,157 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object SoftwareDiagnostics : BaseCluster() { + const val ID = 52L + + sealed class Attribute(val id: Long, val name: String) { + object ThreadMetrics : Attribute(0L, "ThreadMetrics") + + object CurrentHeapFree : Attribute(1L, "CurrentHeapFree") + + object CurrentHeapUsed : Attribute(2L, "CurrentHeapUsed") + + object CurrentHeapHighWatermark : Attribute(3L, "CurrentHeapHighWatermark") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object SoftwareFault : Event(0L, "SoftwareFault") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ResetWatermarks : Command(0L, "ResetWatermarks") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Switch.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Switch.kt new file mode 100644 index 00000000000000..bfb2bbc7da84b4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Switch.kt @@ -0,0 +1,129 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Switch : BaseCluster() { + const val ID = 59L + + sealed class Attribute(val id: Long, val name: String) { + object NumberOfPositions : Attribute(0L, "NumberOfPositions") + + object CurrentPosition : Attribute(1L, "CurrentPosition") + + object MultiPressMax : Attribute(2L, "MultiPressMax") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object SwitchLatched : Event(0L, "SwitchLatched") + + object InitialPress : Event(1L, "InitialPress") + + object LongPress : Event(2L, "LongPress") + + object ShortRelease : Event(3L, "ShortRelease") + + object LongRelease : Event(4L, "LongRelease") + + object MultiPressOngoing : Event(5L, "MultiPressOngoing") + + object MultiPressComplete : Event(6L, "MultiPressComplete") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TargetNavigator.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TargetNavigator.kt new file mode 100644 index 00000000000000..1857a382f820fe --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TargetNavigator.kt @@ -0,0 +1,147 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object TargetNavigator : BaseCluster() { + const val ID = 1285L + + sealed class Attribute(val id: Long, val name: String) { + object TargetList : Attribute(0L, "TargetList") + + object CurrentTarget : Attribute(1L, "CurrentTarget") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object NavigateTarget : Command(0L, "NavigateTarget") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class NavigateTargetCommandField(val id: Int, val name: String) { + object Target : NavigateTargetCommandField(0, "Target") + + object Data : NavigateTargetCommandField(1, "Data") + + companion object { + fun values(): List { + return NavigateTargetCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): NavigateTargetCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): NavigateTargetCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TemperatureControl.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TemperatureControl.kt new file mode 100644 index 00000000000000..a0eecf43e1594c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TemperatureControl.kt @@ -0,0 +1,155 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object TemperatureControl : BaseCluster() { + const val ID = 86L + + sealed class Attribute(val id: Long, val name: String) { + object TemperatureSetpoint : Attribute(0L, "TemperatureSetpoint") + + object MinTemperature : Attribute(1L, "MinTemperature") + + object MaxTemperature : Attribute(2L, "MaxTemperature") + + object Step : Attribute(3L, "Step") + + object SelectedTemperatureLevel : Attribute(4L, "SelectedTemperatureLevel") + + object SupportedTemperatureLevels : Attribute(5L, "SupportedTemperatureLevels") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object SetTemperature : Command(0L, "SetTemperature") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetTemperatureCommandField(val id: Int, val name: String) { + object TargetTemperature : SetTemperatureCommandField(0, "TargetTemperature") + + object TargetTemperatureLevel : SetTemperatureCommandField(1, "TargetTemperatureLevel") + + companion object { + fun values(): List { + return SetTemperatureCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetTemperatureCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetTemperatureCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TemperatureMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TemperatureMeasurement.kt new file mode 100644 index 00000000000000..f3a069f89dbc81 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TemperatureMeasurement.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object TemperatureMeasurement : BaseCluster() { + const val ID = 1026L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object Tolerance : Attribute(3L, "Tolerance") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Thermostat.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Thermostat.kt new file mode 100644 index 00000000000000..c76b67e11ca2f2 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Thermostat.kt @@ -0,0 +1,317 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object Thermostat : BaseCluster() { + const val ID = 513L + + sealed class Attribute(val id: Long, val name: String) { + object LocalTemperature : Attribute(0L, "LocalTemperature") + + object OutdoorTemperature : Attribute(1L, "OutdoorTemperature") + + object Occupancy : Attribute(2L, "Occupancy") + + object AbsMinHeatSetpointLimit : Attribute(3L, "AbsMinHeatSetpointLimit") + + object AbsMaxHeatSetpointLimit : Attribute(4L, "AbsMaxHeatSetpointLimit") + + object AbsMinCoolSetpointLimit : Attribute(5L, "AbsMinCoolSetpointLimit") + + object AbsMaxCoolSetpointLimit : Attribute(6L, "AbsMaxCoolSetpointLimit") + + object PICoolingDemand : Attribute(7L, "PICoolingDemand") + + object PIHeatingDemand : Attribute(8L, "PIHeatingDemand") + + object HVACSystemTypeConfiguration : Attribute(9L, "HVACSystemTypeConfiguration") + + object LocalTemperatureCalibration : Attribute(16L, "LocalTemperatureCalibration") + + object OccupiedCoolingSetpoint : Attribute(17L, "OccupiedCoolingSetpoint") + + object OccupiedHeatingSetpoint : Attribute(18L, "OccupiedHeatingSetpoint") + + object UnoccupiedCoolingSetpoint : Attribute(19L, "UnoccupiedCoolingSetpoint") + + object UnoccupiedHeatingSetpoint : Attribute(20L, "UnoccupiedHeatingSetpoint") + + object MinHeatSetpointLimit : Attribute(21L, "MinHeatSetpointLimit") + + object MaxHeatSetpointLimit : Attribute(22L, "MaxHeatSetpointLimit") + + object MinCoolSetpointLimit : Attribute(23L, "MinCoolSetpointLimit") + + object MaxCoolSetpointLimit : Attribute(24L, "MaxCoolSetpointLimit") + + object MinSetpointDeadBand : Attribute(25L, "MinSetpointDeadBand") + + object RemoteSensing : Attribute(26L, "RemoteSensing") + + object ControlSequenceOfOperation : Attribute(27L, "ControlSequenceOfOperation") + + object SystemMode : Attribute(28L, "SystemMode") + + object ThermostatRunningMode : Attribute(30L, "ThermostatRunningMode") + + object StartOfWeek : Attribute(32L, "StartOfWeek") + + object NumberOfWeeklyTransitions : Attribute(33L, "NumberOfWeeklyTransitions") + + object NumberOfDailyTransitions : Attribute(34L, "NumberOfDailyTransitions") + + object TemperatureSetpointHold : Attribute(35L, "TemperatureSetpointHold") + + object TemperatureSetpointHoldDuration : Attribute(36L, "TemperatureSetpointHoldDuration") + + object ThermostatProgrammingOperationMode : + Attribute(37L, "ThermostatProgrammingOperationMode") + + object ThermostatRunningState : Attribute(41L, "ThermostatRunningState") + + object SetpointChangeSource : Attribute(48L, "SetpointChangeSource") + + object SetpointChangeAmount : Attribute(49L, "SetpointChangeAmount") + + object SetpointChangeSourceTimestamp : Attribute(50L, "SetpointChangeSourceTimestamp") + + object OccupiedSetback : Attribute(52L, "OccupiedSetback") + + object OccupiedSetbackMin : Attribute(53L, "OccupiedSetbackMin") + + object OccupiedSetbackMax : Attribute(54L, "OccupiedSetbackMax") + + object UnoccupiedSetback : Attribute(55L, "UnoccupiedSetback") + + object UnoccupiedSetbackMin : Attribute(56L, "UnoccupiedSetbackMin") + + object UnoccupiedSetbackMax : Attribute(57L, "UnoccupiedSetbackMax") + + object EmergencyHeatDelta : Attribute(58L, "EmergencyHeatDelta") + + object ACType : Attribute(64L, "ACType") + + object ACCapacity : Attribute(65L, "ACCapacity") + + object ACRefrigerantType : Attribute(66L, "ACRefrigerantType") + + object ACCompressorType : Attribute(67L, "ACCompressorType") + + object ACErrorCode : Attribute(68L, "ACErrorCode") + + object ACLouverPosition : Attribute(69L, "ACLouverPosition") + + object ACCoilTemperature : Attribute(70L, "ACCoilTemperature") + + object ACCapacityformat : Attribute(71L, "ACCapacityformat") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object SetpointRaiseLower : Command(0L, "SetpointRaiseLower") + + object SetWeeklySchedule : Command(1L, "SetWeeklySchedule") + + object GetWeeklySchedule : Command(2L, "GetWeeklySchedule") + + object ClearWeeklySchedule : Command(3L, "ClearWeeklySchedule") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetpointRaiseLowerCommandField(val id: Int, val name: String) { + object Mode : SetpointRaiseLowerCommandField(0, "Mode") + + object Amount : SetpointRaiseLowerCommandField(1, "Amount") + + companion object { + fun values(): List { + return SetpointRaiseLowerCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetpointRaiseLowerCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetpointRaiseLowerCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetWeeklyScheduleCommandField(val id: Int, val name: String) { + object NumberOfTransitionsForSequence : + SetWeeklyScheduleCommandField(0, "NumberOfTransitionsForSequence") + + object DayOfWeekForSequence : SetWeeklyScheduleCommandField(1, "DayOfWeekForSequence") + + object ModeForSequence : SetWeeklyScheduleCommandField(2, "ModeForSequence") + + object Transitions : SetWeeklyScheduleCommandField(3, "Transitions") + + companion object { + fun values(): List { + return SetWeeklyScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetWeeklyScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetWeeklyScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GetWeeklyScheduleCommandField(val id: Int, val name: String) { + object DaysToReturn : GetWeeklyScheduleCommandField(0, "DaysToReturn") + + object ModeToReturn : GetWeeklyScheduleCommandField(1, "ModeToReturn") + + companion object { + fun values(): List { + return GetWeeklyScheduleCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GetWeeklyScheduleCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GetWeeklyScheduleCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ThermostatUserInterfaceConfiguration.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ThermostatUserInterfaceConfiguration.kt new file mode 100644 index 00000000000000..6e21ffd0f9c053 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ThermostatUserInterfaceConfiguration.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ThermostatUserInterfaceConfiguration : BaseCluster() { + const val ID = 516L + + sealed class Attribute(val id: Long, val name: String) { + object TemperatureDisplayMode : Attribute(0L, "TemperatureDisplayMode") + + object KeypadLockout : Attribute(1L, "KeypadLockout") + + object ScheduleProgrammingVisibility : Attribute(2L, "ScheduleProgrammingVisibility") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ThreadNetworkDiagnostics.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ThreadNetworkDiagnostics.kt new file mode 100644 index 00000000000000..0c3b8c7a6effd5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ThreadNetworkDiagnostics.kt @@ -0,0 +1,277 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object ThreadNetworkDiagnostics : BaseCluster() { + const val ID = 53L + + sealed class Attribute(val id: Long, val name: String) { + object Channel : Attribute(0L, "Channel") + + object RoutingRole : Attribute(1L, "RoutingRole") + + object NetworkName : Attribute(2L, "NetworkName") + + object PanId : Attribute(3L, "PanId") + + object ExtendedPanId : Attribute(4L, "ExtendedPanId") + + object MeshLocalPrefix : Attribute(5L, "MeshLocalPrefix") + + object OverrunCount : Attribute(6L, "OverrunCount") + + object NeighborTable : Attribute(7L, "NeighborTable") + + object RouteTable : Attribute(8L, "RouteTable") + + object PartitionId : Attribute(9L, "PartitionId") + + object Weighting : Attribute(10L, "Weighting") + + object DataVersion : Attribute(11L, "DataVersion") + + object StableDataVersion : Attribute(12L, "StableDataVersion") + + object LeaderRouterId : Attribute(13L, "LeaderRouterId") + + object DetachedRoleCount : Attribute(14L, "DetachedRoleCount") + + object ChildRoleCount : Attribute(15L, "ChildRoleCount") + + object RouterRoleCount : Attribute(16L, "RouterRoleCount") + + object LeaderRoleCount : Attribute(17L, "LeaderRoleCount") + + object AttachAttemptCount : Attribute(18L, "AttachAttemptCount") + + object PartitionIdChangeCount : Attribute(19L, "PartitionIdChangeCount") + + object BetterPartitionAttachAttemptCount : Attribute(20L, "BetterPartitionAttachAttemptCount") + + object ParentChangeCount : Attribute(21L, "ParentChangeCount") + + object TxTotalCount : Attribute(22L, "TxTotalCount") + + object TxUnicastCount : Attribute(23L, "TxUnicastCount") + + object TxBroadcastCount : Attribute(24L, "TxBroadcastCount") + + object TxAckRequestedCount : Attribute(25L, "TxAckRequestedCount") + + object TxAckedCount : Attribute(26L, "TxAckedCount") + + object TxNoAckRequestedCount : Attribute(27L, "TxNoAckRequestedCount") + + object TxDataCount : Attribute(28L, "TxDataCount") + + object TxDataPollCount : Attribute(29L, "TxDataPollCount") + + object TxBeaconCount : Attribute(30L, "TxBeaconCount") + + object TxBeaconRequestCount : Attribute(31L, "TxBeaconRequestCount") + + object TxOtherCount : Attribute(32L, "TxOtherCount") + + object TxRetryCount : Attribute(33L, "TxRetryCount") + + object TxDirectMaxRetryExpiryCount : Attribute(34L, "TxDirectMaxRetryExpiryCount") + + object TxIndirectMaxRetryExpiryCount : Attribute(35L, "TxIndirectMaxRetryExpiryCount") + + object TxErrCcaCount : Attribute(36L, "TxErrCcaCount") + + object TxErrAbortCount : Attribute(37L, "TxErrAbortCount") + + object TxErrBusyChannelCount : Attribute(38L, "TxErrBusyChannelCount") + + object RxTotalCount : Attribute(39L, "RxTotalCount") + + object RxUnicastCount : Attribute(40L, "RxUnicastCount") + + object RxBroadcastCount : Attribute(41L, "RxBroadcastCount") + + object RxDataCount : Attribute(42L, "RxDataCount") + + object RxDataPollCount : Attribute(43L, "RxDataPollCount") + + object RxBeaconCount : Attribute(44L, "RxBeaconCount") + + object RxBeaconRequestCount : Attribute(45L, "RxBeaconRequestCount") + + object RxOtherCount : Attribute(46L, "RxOtherCount") + + object RxAddressFilteredCount : Attribute(47L, "RxAddressFilteredCount") + + object RxDestAddrFilteredCount : Attribute(48L, "RxDestAddrFilteredCount") + + object RxDuplicatedCount : Attribute(49L, "RxDuplicatedCount") + + object RxErrNoFrameCount : Attribute(50L, "RxErrNoFrameCount") + + object RxErrUnknownNeighborCount : Attribute(51L, "RxErrUnknownNeighborCount") + + object RxErrInvalidSrcAddrCount : Attribute(52L, "RxErrInvalidSrcAddrCount") + + object RxErrSecCount : Attribute(53L, "RxErrSecCount") + + object RxErrFcsCount : Attribute(54L, "RxErrFcsCount") + + object RxErrOtherCount : Attribute(55L, "RxErrOtherCount") + + object ActiveTimestamp : Attribute(56L, "ActiveTimestamp") + + object PendingTimestamp : Attribute(57L, "PendingTimestamp") + + object Delay : Attribute(58L, "Delay") + + object SecurityPolicy : Attribute(59L, "SecurityPolicy") + + object ChannelPage0Mask : Attribute(60L, "ChannelPage0Mask") + + object OperationalDatasetComponents : Attribute(61L, "OperationalDatasetComponents") + + object ActiveNetworkFaultsList : Attribute(62L, "ActiveNetworkFaultsList") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object ConnectionStatus : Event(0L, "ConnectionStatus") + + object NetworkFaultChange : Event(1L, "NetworkFaultChange") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ResetCounts : Command(0L, "ResetCounts") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TimeFormatLocalization.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TimeFormatLocalization.kt new file mode 100644 index 00000000000000..b2355c0a0a92da --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TimeFormatLocalization.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object TimeFormatLocalization : BaseCluster() { + const val ID = 44L + + sealed class Attribute(val id: Long, val name: String) { + object HourFormat : Attribute(0L, "HourFormat") + + object ActiveCalendarType : Attribute(1L, "ActiveCalendarType") + + object SupportedCalendarTypes : Attribute(2L, "SupportedCalendarTypes") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TimeSynchronization.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TimeSynchronization.kt new file mode 100644 index 00000000000000..5559f9ea53ce9c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TimeSynchronization.kt @@ -0,0 +1,345 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object TimeSynchronization : BaseCluster() { + const val ID = 56L + + sealed class Attribute(val id: Long, val name: String) { + object UTCTime : Attribute(0L, "UTCTime") + + object Granularity : Attribute(1L, "Granularity") + + object TimeSource : Attribute(2L, "TimeSource") + + object TrustedTimeSource : Attribute(3L, "TrustedTimeSource") + + object DefaultNTP : Attribute(4L, "DefaultNTP") + + object TimeZone : Attribute(5L, "TimeZone") + + object DSTOffset : Attribute(6L, "DSTOffset") + + object LocalTime : Attribute(7L, "LocalTime") + + object TimeZoneDatabase : Attribute(8L, "TimeZoneDatabase") + + object NTPServerAvailable : Attribute(9L, "NTPServerAvailable") + + object TimeZoneListMaxSize : Attribute(10L, "TimeZoneListMaxSize") + + object DSTOffsetListMaxSize : Attribute(11L, "DSTOffsetListMaxSize") + + object SupportsDNSResolve : Attribute(12L, "SupportsDNSResolve") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object DSTTableEmpty : Event(0L, "DSTTableEmpty") + + object DSTStatus : Event(1L, "DSTStatus") + + object TimeZoneStatus : Event(2L, "TimeZoneStatus") + + object TimeFailure : Event(3L, "TimeFailure") + + object MissingTrustedTimeSource : Event(4L, "MissingTrustedTimeSource") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object SetUTCTime : Command(0L, "SetUTCTime") + + object SetTrustedTimeSource : Command(1L, "SetTrustedTimeSource") + + object SetTimeZone : Command(2L, "SetTimeZone") + + object SetDSTOffset : Command(4L, "SetDSTOffset") + + object SetDefaultNTP : Command(5L, "SetDefaultNTP") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetUTCTimeCommandField(val id: Int, val name: String) { + object UTCTime : SetUTCTimeCommandField(0, "UTCTime") + + object Granularity : SetUTCTimeCommandField(1, "Granularity") + + object TimeSource : SetUTCTimeCommandField(2, "TimeSource") + + companion object { + fun values(): List { + return SetUTCTimeCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetUTCTimeCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetUTCTimeCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetTrustedTimeSourceCommandField(val id: Int, val name: String) { + object TrustedTimeSource : SetTrustedTimeSourceCommandField(0, "TrustedTimeSource") + + companion object { + fun values(): List { + return SetTrustedTimeSourceCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetTrustedTimeSourceCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetTrustedTimeSourceCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetTimeZoneCommandField(val id: Int, val name: String) { + object TimeZone : SetTimeZoneCommandField(0, "TimeZone") + + companion object { + fun values(): List { + return SetTimeZoneCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetTimeZoneCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetTimeZoneCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetDSTOffsetCommandField(val id: Int, val name: String) { + object DSTOffset : SetDSTOffsetCommandField(0, "DSTOffset") + + companion object { + fun values(): List { + return SetDSTOffsetCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetDSTOffsetCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetDSTOffsetCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SetDefaultNTPCommandField(val id: Int, val name: String) { + object DefaultNTP : SetDefaultNTPCommandField(0, "DefaultNTP") + + companion object { + fun values(): List { + return SetDefaultNTPCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SetDefaultNTPCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SetDefaultNTPCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TotalVolatileOrganicCompoundsConcentrationMeasurement.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TotalVolatileOrganicCompoundsConcentrationMeasurement.kt new file mode 100644 index 00000000000000..08ff026dc84e99 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TotalVolatileOrganicCompoundsConcentrationMeasurement.kt @@ -0,0 +1,95 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object TotalVolatileOrganicCompoundsConcentrationMeasurement : BaseCluster() { + const val ID = 1070L + + sealed class Attribute(val id: Long, val name: String) { + object MeasuredValue : Attribute(0L, "MeasuredValue") + + object MinMeasuredValue : Attribute(1L, "MinMeasuredValue") + + object MaxMeasuredValue : Attribute(2L, "MaxMeasuredValue") + + object PeakMeasuredValue : Attribute(3L, "PeakMeasuredValue") + + object PeakMeasuredValueWindow : Attribute(4L, "PeakMeasuredValueWindow") + + object AverageMeasuredValue : Attribute(5L, "AverageMeasuredValue") + + object AverageMeasuredValueWindow : Attribute(6L, "AverageMeasuredValueWindow") + + object Uncertainty : Attribute(7L, "Uncertainty") + + object MeasurementUnit : Attribute(8L, "MeasurementUnit") + + object MeasurementMedium : Attribute(9L, "MeasurementMedium") + + object LevelValue : Attribute(10L, "LevelValue") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UnitLocalization.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UnitLocalization.kt new file mode 100644 index 00000000000000..4c37f919b7ff20 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UnitLocalization.kt @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object UnitLocalization : BaseCluster() { + const val ID = 45L + + sealed class Attribute(val id: Long, val name: String) { + object TemperatureUnit : Attribute(0L, "TemperatureUnit") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UnitTesting.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UnitTesting.kt new file mode 100644 index 00000000000000..a22e40661fbea4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UnitTesting.kt @@ -0,0 +1,944 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object UnitTesting : BaseCluster() { + const val ID = 4294048773L + + sealed class Attribute(val id: Long, val name: String) { + object Boolean : Attribute(0L, "Boolean") + + object Bitmap8 : Attribute(1L, "Bitmap8") + + object Bitmap16 : Attribute(2L, "Bitmap16") + + object Bitmap32 : Attribute(3L, "Bitmap32") + + object Bitmap64 : Attribute(4L, "Bitmap64") + + object Int8u : Attribute(5L, "Int8u") + + object Int16u : Attribute(6L, "Int16u") + + object Int24u : Attribute(7L, "Int24u") + + object Int32u : Attribute(8L, "Int32u") + + object Int40u : Attribute(9L, "Int40u") + + object Int48u : Attribute(10L, "Int48u") + + object Int56u : Attribute(11L, "Int56u") + + object Int64u : Attribute(12L, "Int64u") + + object Int8s : Attribute(13L, "Int8s") + + object Int16s : Attribute(14L, "Int16s") + + object Int24s : Attribute(15L, "Int24s") + + object Int32s : Attribute(16L, "Int32s") + + object Int40s : Attribute(17L, "Int40s") + + object Int48s : Attribute(18L, "Int48s") + + object Int56s : Attribute(19L, "Int56s") + + object Int64s : Attribute(20L, "Int64s") + + object Enum8 : Attribute(21L, "Enum8") + + object Enum16 : Attribute(22L, "Enum16") + + object FloatSingle : Attribute(23L, "FloatSingle") + + object FloatDouble : Attribute(24L, "FloatDouble") + + object OctetString : Attribute(25L, "OctetString") + + object ListInt8u : Attribute(26L, "ListInt8u") + + object ListOctetString : Attribute(27L, "ListOctetString") + + object ListStructOctetString : Attribute(28L, "ListStructOctetString") + + object LongOctetString : Attribute(29L, "LongOctetString") + + object CharString : Attribute(30L, "CharString") + + object LongCharString : Attribute(31L, "LongCharString") + + object EpochUs : Attribute(32L, "EpochUs") + + object EpochS : Attribute(33L, "EpochS") + + object VendorId : Attribute(34L, "VendorId") + + object ListNullablesAndOptionalsStruct : Attribute(35L, "ListNullablesAndOptionalsStruct") + + object EnumAttr : Attribute(36L, "EnumAttr") + + object StructAttr : Attribute(37L, "StructAttr") + + object RangeRestrictedInt8u : Attribute(38L, "RangeRestrictedInt8u") + + object RangeRestrictedInt8s : Attribute(39L, "RangeRestrictedInt8s") + + object RangeRestrictedInt16u : Attribute(40L, "RangeRestrictedInt16u") + + object RangeRestrictedInt16s : Attribute(41L, "RangeRestrictedInt16s") + + object ListLongOctetString : Attribute(42L, "ListLongOctetString") + + object ListFabricScoped : Attribute(43L, "ListFabricScoped") + + object TimedWriteBoolean : Attribute(48L, "TimedWriteBoolean") + + object GeneralErrorBoolean : Attribute(49L, "GeneralErrorBoolean") + + object ClusterErrorBoolean : Attribute(50L, "ClusterErrorBoolean") + + object Unsupported : Attribute(255L, "Unsupported") + + object NullableBoolean : Attribute(16384L, "NullableBoolean") + + object NullableBitmap8 : Attribute(16385L, "NullableBitmap8") + + object NullableBitmap16 : Attribute(16386L, "NullableBitmap16") + + object NullableBitmap32 : Attribute(16387L, "NullableBitmap32") + + object NullableBitmap64 : Attribute(16388L, "NullableBitmap64") + + object NullableInt8u : Attribute(16389L, "NullableInt8u") + + object NullableInt16u : Attribute(16390L, "NullableInt16u") + + object NullableInt24u : Attribute(16391L, "NullableInt24u") + + object NullableInt32u : Attribute(16392L, "NullableInt32u") + + object NullableInt40u : Attribute(16393L, "NullableInt40u") + + object NullableInt48u : Attribute(16394L, "NullableInt48u") + + object NullableInt56u : Attribute(16395L, "NullableInt56u") + + object NullableInt64u : Attribute(16396L, "NullableInt64u") + + object NullableInt8s : Attribute(16397L, "NullableInt8s") + + object NullableInt16s : Attribute(16398L, "NullableInt16s") + + object NullableInt24s : Attribute(16399L, "NullableInt24s") + + object NullableInt32s : Attribute(16400L, "NullableInt32s") + + object NullableInt40s : Attribute(16401L, "NullableInt40s") + + object NullableInt48s : Attribute(16402L, "NullableInt48s") + + object NullableInt56s : Attribute(16403L, "NullableInt56s") + + object NullableInt64s : Attribute(16404L, "NullableInt64s") + + object NullableEnum8 : Attribute(16405L, "NullableEnum8") + + object NullableEnum16 : Attribute(16406L, "NullableEnum16") + + object NullableFloatSingle : Attribute(16407L, "NullableFloatSingle") + + object NullableFloatDouble : Attribute(16408L, "NullableFloatDouble") + + object NullableOctetString : Attribute(16409L, "NullableOctetString") + + object NullableCharString : Attribute(16414L, "NullableCharString") + + object NullableEnumAttr : Attribute(16420L, "NullableEnumAttr") + + object NullableStruct : Attribute(16421L, "NullableStruct") + + object NullableRangeRestrictedInt8u : Attribute(16422L, "NullableRangeRestrictedInt8u") + + object NullableRangeRestrictedInt8s : Attribute(16423L, "NullableRangeRestrictedInt8s") + + object NullableRangeRestrictedInt16u : Attribute(16424L, "NullableRangeRestrictedInt16u") + + object NullableRangeRestrictedInt16s : Attribute(16425L, "NullableRangeRestrictedInt16s") + + object WriteOnlyInt8u : Attribute(16426L, "WriteOnlyInt8u") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object TestEvent : Event(1L, "TestEvent") + + object TestFabricScopedEvent : Event(2L, "TestFabricScopedEvent") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object Test : Command(0L, "Test") + + object TestNotHandled : Command(1L, "TestNotHandled") + + object TestSpecific : Command(2L, "TestSpecific") + + object TestUnknownCommand : Command(3L, "TestUnknownCommand") + + object TestAddArguments : Command(4L, "TestAddArguments") + + object TestSimpleArgumentRequest : Command(5L, "TestSimpleArgumentRequest") + + object TestStructArrayArgumentRequest : Command(6L, "TestStructArrayArgumentRequest") + + object TestStructArgumentRequest : Command(7L, "TestStructArgumentRequest") + + object TestNestedStructArgumentRequest : Command(8L, "TestNestedStructArgumentRequest") + + object TestListStructArgumentRequest : Command(9L, "TestListStructArgumentRequest") + + object TestListInt8UArgumentRequest : Command(10L, "TestListInt8UArgumentRequest") + + object TestNestedStructListArgumentRequest : + Command(11L, "TestNestedStructListArgumentRequest") + + object TestListNestedStructListArgumentRequest : + Command(12L, "TestListNestedStructListArgumentRequest") + + object TestListInt8UReverseRequest : Command(13L, "TestListInt8UReverseRequest") + + object TestEnumsRequest : Command(14L, "TestEnumsRequest") + + object TestNullableOptionalRequest : Command(15L, "TestNullableOptionalRequest") + + object TestComplexNullableOptionalRequest : Command(16L, "TestComplexNullableOptionalRequest") + + object SimpleStructEchoRequest : Command(17L, "SimpleStructEchoRequest") + + object TimedInvokeRequest : Command(18L, "TimedInvokeRequest") + + object TestSimpleOptionalArgumentRequest : Command(19L, "TestSimpleOptionalArgumentRequest") + + object TestEmitTestEventRequest : Command(20L, "TestEmitTestEventRequest") + + object TestEmitTestFabricScopedEventRequest : + Command(21L, "TestEmitTestFabricScopedEventRequest") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestAddArgumentsCommandField(val id: Int, val name: String) { + object Arg1 : TestAddArgumentsCommandField(0, "Arg1") + + object Arg2 : TestAddArgumentsCommandField(1, "Arg2") + + companion object { + fun values(): List { + return TestAddArgumentsCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestAddArgumentsCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestAddArgumentsCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestSimpleArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestSimpleArgumentRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestSimpleArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestSimpleArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestSimpleArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestStructArrayArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestStructArrayArgumentRequestCommandField(0, "Arg1") + + object Arg2 : TestStructArrayArgumentRequestCommandField(1, "Arg2") + + object Arg3 : TestStructArrayArgumentRequestCommandField(2, "Arg3") + + object Arg4 : TestStructArrayArgumentRequestCommandField(3, "Arg4") + + object Arg5 : TestStructArrayArgumentRequestCommandField(4, "Arg5") + + object Arg6 : TestStructArrayArgumentRequestCommandField(5, "Arg6") + + companion object { + fun values(): List { + return TestStructArrayArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestStructArrayArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestStructArrayArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestStructArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestStructArgumentRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestStructArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestStructArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestStructArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestNestedStructArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestNestedStructArgumentRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestNestedStructArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestNestedStructArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestNestedStructArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestListStructArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestListStructArgumentRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestListStructArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestListStructArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestListStructArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestListInt8UArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestListInt8UArgumentRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestListInt8UArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestListInt8UArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestListInt8UArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestNestedStructListArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestNestedStructListArgumentRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestNestedStructListArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestNestedStructListArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestNestedStructListArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestListNestedStructListArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestListNestedStructListArgumentRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestListNestedStructListArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestListNestedStructListArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestListNestedStructListArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestListInt8UReverseRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestListInt8UReverseRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestListInt8UReverseRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestListInt8UReverseRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestListInt8UReverseRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestEnumsRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestEnumsRequestCommandField(0, "Arg1") + + object Arg2 : TestEnumsRequestCommandField(1, "Arg2") + + companion object { + fun values(): List { + return TestEnumsRequestCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestEnumsRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestEnumsRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestNullableOptionalRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestNullableOptionalRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestNullableOptionalRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestNullableOptionalRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestNullableOptionalRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestComplexNullableOptionalRequestCommandField(val id: Int, val name: String) { + object NullableInt : TestComplexNullableOptionalRequestCommandField(0, "NullableInt") + + object OptionalInt : TestComplexNullableOptionalRequestCommandField(1, "OptionalInt") + + object NullableOptionalInt : + TestComplexNullableOptionalRequestCommandField(2, "NullableOptionalInt") + + object NullableString : TestComplexNullableOptionalRequestCommandField(3, "NullableString") + + object OptionalString : TestComplexNullableOptionalRequestCommandField(4, "OptionalString") + + object NullableOptionalString : + TestComplexNullableOptionalRequestCommandField(5, "NullableOptionalString") + + object NullableStruct : TestComplexNullableOptionalRequestCommandField(6, "NullableStruct") + + object OptionalStruct : TestComplexNullableOptionalRequestCommandField(7, "OptionalStruct") + + object NullableOptionalStruct : + TestComplexNullableOptionalRequestCommandField(8, "NullableOptionalStruct") + + object NullableList : TestComplexNullableOptionalRequestCommandField(9, "NullableList") + + object OptionalList : TestComplexNullableOptionalRequestCommandField(10, "OptionalList") + + object NullableOptionalList : + TestComplexNullableOptionalRequestCommandField(11, "NullableOptionalList") + + companion object { + fun values(): List { + return TestComplexNullableOptionalRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestComplexNullableOptionalRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestComplexNullableOptionalRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class SimpleStructEchoRequestCommandField(val id: Int, val name: String) { + object Arg1 : SimpleStructEchoRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return SimpleStructEchoRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): SimpleStructEchoRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): SimpleStructEchoRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestSimpleOptionalArgumentRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestSimpleOptionalArgumentRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestSimpleOptionalArgumentRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestSimpleOptionalArgumentRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestSimpleOptionalArgumentRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestEmitTestEventRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestEmitTestEventRequestCommandField(0, "Arg1") + + object Arg2 : TestEmitTestEventRequestCommandField(1, "Arg2") + + object Arg3 : TestEmitTestEventRequestCommandField(2, "Arg3") + + companion object { + fun values(): List { + return TestEmitTestEventRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestEmitTestEventRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestEmitTestEventRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class TestEmitTestFabricScopedEventRequestCommandField(val id: Int, val name: String) { + object Arg1 : TestEmitTestFabricScopedEventRequestCommandField(0, "Arg1") + + companion object { + fun values(): List { + return TestEmitTestFabricScopedEventRequestCommandField::class.sealedSubclasses.map { + it.objectInstance!! + } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): TestEmitTestFabricScopedEventRequestCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): TestEmitTestFabricScopedEventRequestCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UserLabel.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UserLabel.kt new file mode 100644 index 00000000000000..22e0089c458b47 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UserLabel.kt @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object UserLabel : BaseCluster() { + const val ID = 65L + + sealed class Attribute(val id: Long, val name: String) { + object LabelList : Attribute(0L, "LabelList") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WakeOnLan.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WakeOnLan.kt new file mode 100644 index 00000000000000..c28eb8921f4b84 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WakeOnLan.kt @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object WakeOnLan : BaseCluster() { + const val ID = 1283L + + sealed class Attribute(val id: Long, val name: String) { + object MACAddress : Attribute(0L, "MACAddress") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WiFiNetworkDiagnostics.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WiFiNetworkDiagnostics.kt new file mode 100644 index 00000000000000..9cc2ea2687c133 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WiFiNetworkDiagnostics.kt @@ -0,0 +1,179 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object WiFiNetworkDiagnostics : BaseCluster() { + const val ID = 54L + + sealed class Attribute(val id: Long, val name: String) { + object Bssid : Attribute(0L, "Bssid") + + object SecurityType : Attribute(1L, "SecurityType") + + object WiFiVersion : Attribute(2L, "WiFiVersion") + + object ChannelNumber : Attribute(3L, "ChannelNumber") + + object Rssi : Attribute(4L, "Rssi") + + object BeaconLostCount : Attribute(5L, "BeaconLostCount") + + object BeaconRxCount : Attribute(6L, "BeaconRxCount") + + object PacketMulticastRxCount : Attribute(7L, "PacketMulticastRxCount") + + object PacketMulticastTxCount : Attribute(8L, "PacketMulticastTxCount") + + object PacketUnicastRxCount : Attribute(9L, "PacketUnicastRxCount") + + object PacketUnicastTxCount : Attribute(10L, "PacketUnicastTxCount") + + object CurrentMaxRate : Attribute(11L, "CurrentMaxRate") + + object OverrunCount : Attribute(12L, "OverrunCount") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Event(val id: Long, val name: String) { + object Disconnection : Event(0L, "Disconnection") + + object AssociationFailure : Event(1L, "AssociationFailure") + + object ConnectionStatus : Event(2L, "ConnectionStatus") + + companion object { + fun values(): List { + return Event::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Event { + for (event in values()) { + if (event.id == id) { + return event + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Event { + for (event in values()) { + if (event.name == value) { + return event + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object ResetCounts : Command(0L, "ResetCounts") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getEventName(id: Long): String { + return Event.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getEventID(name: String): Long { + return Event.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WindowCovering.kt b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WindowCovering.kt new file mode 100644 index 00000000000000..8d92fc7f08b8c9 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WindowCovering.kt @@ -0,0 +1,287 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ +package chip.devicecontroller.ClusterIDMapping + +object WindowCovering : BaseCluster() { + const val ID = 258L + + sealed class Attribute(val id: Long, val name: String) { + object Type : Attribute(0L, "Type") + + object PhysicalClosedLimitLift : Attribute(1L, "PhysicalClosedLimitLift") + + object PhysicalClosedLimitTilt : Attribute(2L, "PhysicalClosedLimitTilt") + + object CurrentPositionLift : Attribute(3L, "CurrentPositionLift") + + object CurrentPositionTilt : Attribute(4L, "CurrentPositionTilt") + + object NumberOfActuationsLift : Attribute(5L, "NumberOfActuationsLift") + + object NumberOfActuationsTilt : Attribute(6L, "NumberOfActuationsTilt") + + object ConfigStatus : Attribute(7L, "ConfigStatus") + + object CurrentPositionLiftPercentage : Attribute(8L, "CurrentPositionLiftPercentage") + + object CurrentPositionTiltPercentage : Attribute(9L, "CurrentPositionTiltPercentage") + + object OperationalStatus : Attribute(10L, "OperationalStatus") + + object TargetPositionLiftPercent100ths : Attribute(11L, "TargetPositionLiftPercent100ths") + + object TargetPositionTiltPercent100ths : Attribute(12L, "TargetPositionTiltPercent100ths") + + object EndProductType : Attribute(13L, "EndProductType") + + object CurrentPositionLiftPercent100ths : Attribute(14L, "CurrentPositionLiftPercent100ths") + + object CurrentPositionTiltPercent100ths : Attribute(15L, "CurrentPositionTiltPercent100ths") + + object InstalledOpenLimitLift : Attribute(16L, "InstalledOpenLimitLift") + + object InstalledClosedLimitLift : Attribute(17L, "InstalledClosedLimitLift") + + object InstalledOpenLimitTilt : Attribute(18L, "InstalledOpenLimitTilt") + + object InstalledClosedLimitTilt : Attribute(19L, "InstalledClosedLimitTilt") + + object Mode : Attribute(23L, "Mode") + + object SafetyStatus : Attribute(26L, "SafetyStatus") + + object GeneratedCommandList : Attribute(65528L, "GeneratedCommandList") + + object AcceptedCommandList : Attribute(65529L, "AcceptedCommandList") + + object EventList : Attribute(65530L, "EventList") + + object AttributeList : Attribute(65531L, "AttributeList") + + object FeatureMap : Attribute(65532L, "FeatureMap") + + object ClusterRevision : Attribute(65533L, "ClusterRevision") + + companion object { + fun values(): List { + return Attribute::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Attribute { + for (attribute in values()) { + if (attribute.id == id) { + return attribute + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Attribute { + for (attribute in values()) { + if (attribute.name == value) { + return attribute + } + } + throw IllegalArgumentException() + } + } + } + + sealed class Command(val id: Long, val name: String) { + object UpOrOpen : Command(0L, "UpOrOpen") + + object DownOrClose : Command(1L, "DownOrClose") + + object StopMotion : Command(2L, "StopMotion") + + object GoToLiftValue : Command(4L, "GoToLiftValue") + + object GoToLiftPercentage : Command(5L, "GoToLiftPercentage") + + object GoToTiltValue : Command(7L, "GoToTiltValue") + + object GoToTiltPercentage : Command(8L, "GoToTiltPercentage") + + companion object { + fun values(): List { + return Command::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Long): Command { + for (command in values()) { + if (command.id == id) { + return command + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): Command { + for (command in values()) { + if (command.name == value) { + return command + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GoToLiftValueCommandField(val id: Int, val name: String) { + object LiftValue : GoToLiftValueCommandField(0, "LiftValue") + + companion object { + fun values(): List { + return GoToLiftValueCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GoToLiftValueCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GoToLiftValueCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GoToLiftPercentageCommandField(val id: Int, val name: String) { + object LiftPercent100thsValue : GoToLiftPercentageCommandField(0, "LiftPercent100thsValue") + + companion object { + fun values(): List { + return GoToLiftPercentageCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GoToLiftPercentageCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GoToLiftPercentageCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GoToTiltValueCommandField(val id: Int, val name: String) { + object TiltValue : GoToTiltValueCommandField(0, "TiltValue") + + companion object { + fun values(): List { + return GoToTiltValueCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GoToTiltValueCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GoToTiltValueCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + sealed class GoToTiltPercentageCommandField(val id: Int, val name: String) { + object TiltPercent100thsValue : GoToTiltPercentageCommandField(0, "TiltPercent100thsValue") + + companion object { + fun values(): List { + return GoToTiltPercentageCommandField::class.sealedSubclasses.map { it.objectInstance!! } + } + + @Throws(NoSuchFieldError::class) + fun value(id: Int): GoToTiltPercentageCommandField { + for (field in values()) { + if (field.id == id) { + return field + } + } + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + fun valueOf(value: String): GoToTiltPercentageCommandField { + for (field in values()) { + if (field.name == value) { + return field + } + } + throw IllegalArgumentException() + } + } + } + + override fun getID(): Long { + return ID + } + + override fun getAttributeName(id: Long): String { + return Attribute.value(id).toString() + } + + override fun getCommandName(id: Long): String { + return Command.value(id).toString() + } + + override fun getAttributeID(name: String): Long { + return Attribute.valueOf(name).id + } + + override fun getCommandID(name: String): Long { + return Command.valueOf(name).id + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/files.gni b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/files.gni new file mode 100644 index 00000000000000..107e57dcc8bd13 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/files.gni @@ -0,0 +1,102 @@ +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +cluster_sources = [ + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Identify.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Groups.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Scenes.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OnOff.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OnOffSwitchConfiguration.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LevelControl.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BinaryInputBasic.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PulseWidthModulation.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Descriptor.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Binding.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AccessControl.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Actions.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BasicInformation.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OtaSoftwareUpdateProvider.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OtaSoftwareUpdateRequestor.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LocalizationConfiguration.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TimeFormatLocalization.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UnitLocalization.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PowerSourceConfiguration.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PowerSource.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GeneralCommissioning.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/NetworkCommissioning.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DiagnosticLogs.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GeneralDiagnostics.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/SoftwareDiagnostics.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ThreadNetworkDiagnostics.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WiFiNetworkDiagnostics.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/EthernetNetworkDiagnostics.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TimeSynchronization.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BridgedDeviceBasicInformation.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Switch.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AdministratorCommissioning.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OperationalCredentials.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/GroupKeyManagement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FixedLabel.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UserLabel.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyConfiguration.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyDiscovery.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ProxyValid.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BooleanState.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/IcdManagement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ModeSelect.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LaundryWasherMode.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RefrigeratorAndTemperatureControlledCabinetMode.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LaundryWasherControls.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcRunMode.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcCleanMode.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TemperatureControl.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RefrigeratorAlarm.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DishwasherMode.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AirQuality.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/SmokeCoAlarm.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DishwasherAlarm.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OperationalState.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RvcOperationalState.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/HepaFilterMonitoring.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ActivatedCarbonFilterMonitoring.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/DoorLock.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WindowCovering.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BarrierControl.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PumpConfigurationAndControl.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Thermostat.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FanControl.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ThermostatUserInterfaceConfiguration.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ColorControl.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/BallastConfiguration.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/IlluminanceMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TemperatureMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/PressureMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FlowMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RelativeHumidityMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OccupancySensing.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/CarbonMonoxideConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/CarbonDioxideConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/NitrogenDioxideConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/OzoneConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm25ConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FormaldehydeConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm1ConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Pm10ConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TotalVolatileOrganicCompoundsConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/RadonConcentrationMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/WakeOnLan.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/Channel.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/TargetNavigator.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/MediaPlayback.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/MediaInput.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/LowPower.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/KeypadInput.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ContentLauncher.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AudioOutput.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ApplicationLauncher.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ApplicationBasic.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/AccountLogin.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/ElectricalMeasurement.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/UnitTesting.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping/FaultInjection.kt", +] diff --git a/src/controller/java/src/chip/devicecontroller/ChipIdLookup.kt b/src/controller/java/src/chip/devicecontroller/ChipIdLookup.kt index c66d45094c4225..207647cf29a9d4 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipIdLookup.kt +++ b/src/controller/java/src/chip/devicecontroller/ChipIdLookup.kt @@ -16,13 +16,15 @@ */ package chip.devicecontroller +import chip.devicecontroller.ClusterIDMapping.Clusters + object ChipIdLookup { /** * Translates cluster ID to a cluster name in upper camel case. If no matching ID is found, * returns an empty string. */ fun clusterIdToName(clusterId: Long): String { - val cluster = ClusterIDMapping.getCluster(clusterId) ?: return "UNKNOWN_CLUSTER($clusterId)" + val cluster = Clusters.getCluster(clusterId) ?: return "UNKNOWN_CLUSTER($clusterId)" return cluster.javaClass.simpleName } @@ -31,7 +33,7 @@ object ChipIdLookup { * IDs are found, returns an empty string. */ fun attributeIdToName(clusterId: Long, attributeId: Long): String { - val cluster = ClusterIDMapping.getCluster(clusterId) ?: return "UNKNOWN_CLUSTER($clusterId)" + val cluster = Clusters.getCluster(clusterId) ?: return "UNKNOWN_CLUSTER($clusterId)" return try { cluster.getAttributeName(attributeId) } catch (e: NoSuchFieldError) { @@ -44,7 +46,7 @@ object ChipIdLookup { * are found, returns an empty string. */ fun eventIdToName(clusterId: Long, eventId: Long): String { - val cluster = ClusterIDMapping.getCluster(clusterId) ?: return "UNKNOWN_CLUSTER($clusterId)" + val cluster = Clusters.getCluster(clusterId) ?: return "UNKNOWN_CLUSTER($clusterId)" return try { cluster.getEventName(eventId) } catch (e: NoSuchFieldError) { diff --git a/src/controller/java/src/chip/devicecontroller/ClusterIDMapping/BaseCluster.kt b/src/controller/java/src/chip/devicecontroller/ClusterIDMapping/BaseCluster.kt new file mode 100644 index 00000000000000..f73e5a510e2384 --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/ClusterIDMapping/BaseCluster.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP 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 + * + * http://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. + */ + +package chip.devicecontroller.ClusterIDMapping + +abstract class BaseCluster { + abstract fun getID(): Long + + @Throws(NoSuchFieldError::class) + open fun getAttributeName(id: Long): String { + throw NoSuchFieldError() + } + + @Throws(NoSuchFieldError::class) + open fun getEventName(id: Long): String { + throw NoSuchFieldError() + } + + @Throws(NoSuchFieldError::class) + open fun getCommandName(id: Long): String { + throw NoSuchFieldError() + } + + @Throws(IllegalArgumentException::class) + open fun getAttributeID(name: String): Long { + throw IllegalArgumentException() + } + + @Throws(IllegalArgumentException::class) + open fun getEventID(name: String): Long { + throw IllegalArgumentException() + } + + @Throws(IllegalArgumentException::class) + open fun getCommandID(name: String): Long { + throw IllegalArgumentException() + } +} \ No newline at end of file