/*
 * Copyright (c) 2010-2026 Contributors to the openHAB project
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0
 *
 * SPDX-License-Identifier: EPL-2.0
 */
// AUTO-GENERATED, DO NOT EDIT!

package org.openhab.binding.matter.internal.client.dto.cluster.gen;

import java.math.BigInteger;
import java.util.List;

/**
 * {{asUpperCamelCase name}}
 *
 * @author Dan Cunningham - Initial contribution
 */

 public class DataTypes {
 
{{#each structs}}
{{#if (isFirstElement @index)}}
    //Structs
{{/if}}
     public static class {{asUpperCamelCase name}} {
{{#each children}}
        public {{{asUpperCamelCase mappedType}}} {{asLowerCamelCase name}}; // {{type}}
{{/each}}
        public {{asUpperCamelCase name}}({{#each children}}{{{asUpperCamelCase mappedType}}} {{asLowerCamelCase name}}{{#unless (isLastElement @index ../children.length)}}, {{/unless}}{{/each}}) {
{{#each children}}
            this.{{asLowerCamelCase name}} = {{asLowerCamelCase name}};
{{/each}}
        }
     }
{{/each}}


{{#each enums}}
{{#if (isFirstElement @index)}}
    //Enums
{{/if}}
    public enum {{asUpperCamelCase name}} implements BaseCluster.MatterEnum {
{{#if (isEmpty children)}}
        DEFAULT(0, "Default");
{{else}}
{{#each children}}
        {{asEnumField name}}({{id}}, "{{name}}"){{#unless (isLastElement @index ../children.length)}},{{else}};{{/unless}}
{{/each}}
{{/if}}
        public final Integer value;
        public final String label;
        private {{asUpperCamelCase name}}(Integer value, String label){
            this.value = value;
            this.label = label;
        }
        
        @Override
        public Integer getValue() {
            return value;
        }

        @Override
        public String getLabel() {
            return label;
        }
    }

{{/each}}

{{#each maps}}
{{#if (isFirstElement @index)}}
    // Bitmaps
{{/if}}
    public static class {{asUpperCamelCase name}} {
{{#if (isEmpty children)}}
        public List<Boolean> map;
        public {{asUpperCamelCase name}}(List<Boolean> map){
            this.map = map;
{{else}}
{{#each children}}
        public boolean {{asLowerCamelCase name}};
{{/each}}
        public {{asUpperCamelCase name}}({{#each children}}boolean {{asLowerCamelCase name}}{{#unless (isLastElement @index ../children.length)}}, {{/unless}}{{/each}}){
{{#each children}}
            this.{{asLowerCamelCase name}} = {{asLowerCamelCase name}};
{{/each}}
{{/if}}
        }
    }
{{/each}}

 }
 