YANG revision dates mass-update
[bgpcep.git] / bgp / openconfig-spi / src / main / java / org / opendaylight / protocol / bgp / openconfig / spi / BGPTableTypeRegistryConsumer.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 package org.opendaylight.protocol.bgp.openconfig.spi;
9
10 import java.util.Optional;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.AfiSafiType;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
15
16 /**
17  * Provides access to BGP AFI/SAFI registry.
18  */
19 public interface BGPTableTypeRegistryConsumer {
20
21     /**
22      * Looks for BgpTableType based on OpenConfig AFI/SAFI.
23      *
24      * @param afiSafiType afiSafi Type
25      * @return Optional of BgpTableType or empty, if the table type is not supported.
26      */
27     @NonNull Optional<BgpTableType> getTableType(@NonNull Class<? extends AfiSafiType> afiSafiType);
28
29     /**
30      * Looks for BgpTableType based on OpenConfig AFI/SAFI.
31      *
32      * @param afiSafiType afiSafi Type
33      * @return Optional of TableKey or empty, if the table type is not supported.
34      */
35     @NonNull Optional<TablesKey> getTableKey(@NonNull Class<? extends AfiSafiType> afiSafiType);
36
37     /**
38      * Looks for AfiSafiType based on BgpTableType.
39      *
40      * @param bgpTableType Bgp TableType
41      * @return Optional of OpenConfig AFI/SAFI or empty, if the table type is not supported.
42      */
43     @NonNull Optional<Class<? extends AfiSafiType>> getAfiSafiType(@NonNull BgpTableType bgpTableType);
44
45     /**
46      * Looks for AfiSafiType based on TablesKey.
47      *
48      * @param tablesKey Tables Key
49      * @return Optional of OpenConfig AFI/SAFI or empty, if the table type is not supported.
50      */
51     @NonNull Optional<Class<? extends AfiSafiType>> getAfiSafiType(@NonNull TablesKey tablesKey);
52 }