f996e42184b563c3abcaef7f7b1ce7a5666a701f
[mdsal.git] / binding / mdsal-binding-generator / src / main / java / org / opendaylight / mdsal / binding / generator / impl / rt / OriginalChoiceRuntimeType.java
1 /*
2  * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.binding.generator.impl.rt;
9
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ImmutableList;
12 import java.util.Collection;
13 import java.util.List;
14 import org.eclipse.jdt.annotation.NonNull;
15 import org.opendaylight.mdsal.binding.model.api.GeneratedType;
16 import org.opendaylight.mdsal.binding.runtime.api.AugmentRuntimeType;
17 import org.opendaylight.mdsal.binding.runtime.api.CaseRuntimeType;
18 import org.opendaylight.mdsal.binding.runtime.api.ChoiceRuntimeType;
19 import org.opendaylight.mdsal.binding.runtime.api.RuntimeType;
20 import org.opendaylight.yangtools.yang.model.api.stmt.ChoiceEffectiveStatement;
21
22 @Beta
23 public final class OriginalChoiceRuntimeType extends AbstractChoiceRuntimeType {
24     private final @NonNull ImmutableList<CaseRuntimeType> augmentedCases;
25
26     public OriginalChoiceRuntimeType(final GeneratedType bindingType, final ChoiceEffectiveStatement statement,
27             final List<RuntimeType> children, final List<AugmentRuntimeType> augments,
28             final List<CaseRuntimeType> augmentedCases) {
29         super(bindingType, statement, children, augments);
30         this.augmentedCases = ImmutableList.copyOf(augmentedCases);
31     }
32
33     @Override
34     public ChoiceRuntimeType originalType() {
35         return null;
36     }
37
38     @Override
39     public Collection<CaseRuntimeType> additionalCaseChildren() {
40         return augmentedCases;
41     }
42 }