Add ietf-subscribed-notifications
[netconf.git] / model / rfc8526 / src / main / java / org / opendaylight / yang / gen / v1 / urn / ietf / params / xml / ns / yang / ietf / netconf / nmda / rev190107 / GetDataInputMaxDepthBuilder.java
1 /*
2  * Copyright (c) 2019 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.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.nmda.rev190107;
9
10 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.nmda.rev190107.GetDataInput.MaxDepth;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.nmda.rev190107.GetDataInput.MaxDepth.Enumeration;
12 import org.opendaylight.yangtools.yang.common.Uint16;
13
14 /**
15  * MaxDepth utilities.
16  */
17 public final class GetDataInputMaxDepthBuilder {
18     private GetDataInputMaxDepthBuilder() {
19         // Exists only to defeat instantiation.
20     }
21
22     public static MaxDepth getDefaultInstance(final String defaultValue) {
23         final var optEnum = Enumeration.forName(defaultValue);
24         if (optEnum != null) {
25             return new MaxDepth(optEnum);
26         }
27         // FIXME: consider being stricter about number formats here
28         return new MaxDepth(Uint16.valueOf(defaultValue));
29     }
30 }