Bump versions to 0.18.0-SNAPSHOT
[bgpcep.git] / bgp / openconfig-api / src / main / java / org / opendaylight / yang / gen / v1 / http / openconfig / net / yang / bgp / rev151009 / BgpNeighborTransportConfigLocalAddressBuilder.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. 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
9 package org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009;
10
11 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.BgpNeighborTransportConfig.LocalAddress;
12 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder;
14
15 /**
16  * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
17  * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
18  *
19  * The reason behind putting it under src/main/java is:
20  * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
21  * loss of user code.
22  *
23  */
24 public class BgpNeighborTransportConfigLocalAddressBuilder {
25
26     public static LocalAddress getDefaultInstance(final java.lang.String defaultValue) {
27         try {
28             final IpAddress ipAddress = IpAddressBuilder.getDefaultInstance(defaultValue);
29             return new LocalAddress(ipAddress);
30         } catch (final IllegalArgumentException e) {
31             return new LocalAddress(defaultValue);
32         }
33     }
34
35 }