Fix cost field bug and several other bugs.
[alto.git] / alto-model / src / main / java / org / opendaylight / yang / gen / v1 / urn / opendaylight / alto / service / types / rev150404 / MediaTypeBuilder.java
1 package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404;
2
3
4 /**
5  * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
6  * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
7  *
8  * The reason behind putting it under src/main/java is:
9  * 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
10  * loss of user code.
11  *
12  */
13 public class MediaTypeBuilder {
14
15     public static MediaType getDefaultInstance(java.lang.String defaultValue) {
16         if ("application/alto-directory+json".equals(defaultValue)) {
17             return new MediaType(MediaType.Enumeration.AltoDirectory);
18         } else if ("application/alto-networkmap+json".equals(defaultValue)) {
19             return new MediaType(MediaType.Enumeration.AltoNetworkmap);
20         } else if ("application/alto-networkmapfilter+json".equals(defaultValue)) {
21             return new MediaType(MediaType.Enumeration.AltoNetworkmapfilter);
22         } else if ("application/alto-costmap+json".equals(defaultValue)) {
23             return new MediaType(MediaType.Enumeration.AltoCostmap);
24         } else if ("application/alto-costmapfilter+json".equals(defaultValue)) {
25             return new MediaType(MediaType.Enumeration.AltoCostmapfilter);
26         } else if ("application/alto-endpointprop+json".equals(defaultValue)) {
27             return new MediaType(MediaType.Enumeration.AltoEndpointprop);
28         } else if ("application/alto-endpointpropparams+json".equals(defaultValue)) {
29             return new MediaType(MediaType.Enumeration.AltoEndpointpropparams);
30         } else if ("application/alto-endpointcost+json".equals(defaultValue)) {
31             return new MediaType(MediaType.Enumeration.AltoEndpointcost);
32         } else if ("application/alto-endpointcostparams+json".equals(defaultValue)) {
33             return new MediaType(MediaType.Enumeration.AltoEndpointcostparams);
34         } else if ("application/alto-error+json".equals(defaultValue)) {
35             return new MediaType(MediaType.Enumeration.AltoError);
36         }
37
38         throw new java.lang.UnsupportedOperationException("Wrong MediaType: "+defaultValue);
39     }
40
41 }