Add missing license headers in alto-commons
[alto.git] / alto-commons / src / main / java / org / opendaylight / alto / commons / types / model150404 / ModelProperties.java
1 /*
2  * Copyright (c) 2015 Yale University 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.alto.commons.types.model150404;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.EndpointPropertyType;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.EndpointPropertyValue;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.property.map.data.endpoint.properties.Properties;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.property.map.data.endpoint.properties.PropertiesKey;
15 import org.opendaylight.yangtools.yang.binding.Augmentation;
16 import org.opendaylight.yangtools.yang.binding.DataContainer;
17
18 import com.fasterxml.jackson.annotation.JsonIgnore;
19 import com.fasterxml.jackson.annotation.JsonProperty;
20
21 public class ModelProperties implements Properties {
22
23   @JsonProperty("alto-service:property-type")
24   public String propertyType = null;
25
26   @JsonProperty("alto-service:property")
27   public String propertyValue = null;
28
29   @JsonIgnore
30   @Override
31   public Class<? extends DataContainer> getImplementedInterface() {
32     return Properties.class;
33   }
34
35   @JsonIgnore
36   @Override
37   public <E extends Augmentation<Properties>> E getAugmentation(Class<E> arg0) {
38     return null;
39   }
40
41   @JsonIgnore
42   @Override
43   public EndpointPropertyType getPropertyType() {
44     return new EndpointPropertyType(propertyType.toCharArray());
45   }
46
47   @JsonIgnore
48   @Override
49   public EndpointPropertyValue getProperty() {
50     return new EndpointPropertyValue(propertyValue);
51   }
52
53   @JsonIgnore
54   @Override
55   public PropertiesKey getKey() {
56     return new PropertiesKey(getPropertyType());
57   }
58
59 }