2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.nmda.rev190107;
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;
17 public final class GetDataInputMaxDepthBuilder {
18 private GetDataInputMaxDepthBuilder() {
19 // Exists only to defeat instantiation.
22 public static MaxDepth getDefaultInstance(final String defaultValue) {
23 final var optEnum = Enumeration.forName(defaultValue);
24 if (optEnum != null) {
25 return new MaxDepth(optEnum);
27 // FIXME: consider being stricter about number formats here
28 return new MaxDepth(Uint16.valueOf(defaultValue));