1 package org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev191129;
2 import java.lang.String;
3 import java.lang.UnsupportedOperationException;
4 import java.math.BigDecimal;
6 import javax.annotation.processing.Generated;
8 import org.opendaylight.yangtools.yang.common.Decimal64;
9 import org.opendaylight.yangtools.yang.common.Uint64;
11 import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
14 * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
15 * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
17 * The reason behind putting it under src/main/java is:
18 * 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
22 @Generated("mdsal-binding-generator")
23 @JsonPOJOBuilder(buildMethodName = "build", withPrefix = "set")
24 public class PmDataTypeBuilder {
25 private Uint64 _uint64;
27 private Decimal64 _decimal64;
29 public PmDataTypeBuilder() {}
31 //Aluminium uses constructor
32 public PmDataTypeBuilder(String v) {
36 public PmDataTypeBuilder setUint64(String v) {
37 _uint64 = Uint64.valueOf(v);
41 public PmDataTypeBuilder setInt64(String v) {
42 _int64 = Long.valueOf(v);
46 public PmDataTypeBuilder setDecimal64(String v) {
47 _decimal64 = Decimal64.valueOf(v);
51 public PmDataType build() {
52 if (_uint64 != null) {
53 return new PmDataType(_uint64);
54 } else if (_int64 != null) {
55 return new PmDataType(_int64);
57 return new PmDataType(_decimal64);
61 public static PmDataType getDefaultInstance(String defaultValue) {
62 return new PmDataTypeBuilder().setUint64(defaultValue).build();