2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.model.api;
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
14 * Enumeration describing YANG 'status' statement. If no status is specified, the
20 * CURRENT means that the definition is current and valid.
24 * DEPRECATED indicates an obsolete definition, but it permits new/
25 * continued implementation in order to foster interoperability with
26 * older/existing implementations.
28 DEPRECATED("deprecated"),
30 * OBSOLETE means the definition is obsolete and SHOULD NOT be implemented
31 * and/or can be removed from implementations.
35 private final String argumentString;
37 Status(final String argumentString) {
38 this.argumentString = argumentString;
42 public String getArgumentString() {
43 return argumentString;
47 public static Status forArgumentString(final String argumentString) {
48 switch (argumentString) {
56 throw new IllegalArgumentException("Invalid status string '" + argumentString + "'");