Mass-convert all compontents to use -no-zone addresses
[bgpcep.git] / bgp / openconfig-rp-impl / src / main / java / org / opendaylight / protocol / bgp / openconfig / routing / policy / impl / PolicyRIBBaseParametersImpl.java
1 /*
2  * Copyright (c) 2018 AT&T Intellectual Property. 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.routing.policy.impl;
9
10 import static java.util.Objects.requireNonNull;
11
12 import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.RouteEntryBaseAttributes;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.ClusterIdentifier;
15
16 public final class PolicyRIBBaseParametersImpl implements RouteEntryBaseAttributes {
17     private final Long localAs;
18     private final Ipv4AddressNoZone originatorId;
19     private final ClusterIdentifier clusterId;
20
21     public PolicyRIBBaseParametersImpl(final long localAs, final Ipv4AddressNoZone originatorId,
22             final ClusterIdentifier clusterId) {
23         this.localAs = localAs;
24         this.originatorId = requireNonNull(originatorId);
25         this.clusterId = requireNonNull(clusterId);
26     }
27
28     @Override
29     public long getLocalAs() {
30         return this.localAs;
31     }
32
33     @Override
34     public Ipv4AddressNoZone getOriginatorId() {
35         return this.originatorId;
36     }
37
38     @Override
39     public ClusterIdentifier getClusterId() {
40         return this.clusterId;
41     }
42 }