30fe1a4c42008443dd2709f88190c9f6aa68bf7c
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / DeviateKind.java
1 /*
2  * Copyright (c) 2016 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.yangtools.yang.model.api;
10
11 import com.google.common.base.Preconditions;
12
13 /**
14  * Enum describing YANG deviation 'deviate' statement. It defines how the
15  * device's implementation of the target node deviates from its original
16  * definition.
17  */
18 public enum DeviateKind {
19
20     NOT_SUPPORTED("not-supported"), ADD("add"), REPLACE("replace"), DELETE("delete");
21
22     private final String keyword;
23
24     DeviateKind(final String keyword) {
25         this.keyword = Preconditions.checkNotNull(keyword);
26     }
27
28     /**
29      * Returns the YANG keyword corresponding to this object.
30      *
31      * @return String that corresponds to the yang keyword.
32      */
33     public String getKeyword() {
34         return keyword;
35     }
36 }