|
| 1 | +// Copyright 2012 Citrix Systems, Inc. Licensed under the |
| 2 | +// Apache License, Version 2.0 (the "License"); you may not use this |
| 3 | +// file except in compliance with the License. Citrix Systems, Inc. |
| 4 | +// reserves all rights not expressly granted by the License. |
| 5 | +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | +// Unless required by applicable law or agreed to in writing, software |
| 7 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 8 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 9 | +// See the License for the specific language governing permissions and |
| 10 | +// limitations under the License. |
| 11 | +// |
| 12 | +// Automatically generated by addcopyright.py at 04/03/2012 |
| 13 | +package com.cloud.network.vpc; |
| 14 | + |
| 15 | +/** |
| 16 | + * @author Alena Prokharchyk |
| 17 | + */ |
| 18 | +public class StaticRouteProfile implements StaticRoute{ |
| 19 | + private long id; |
| 20 | + private String cidr; |
| 21 | + private long accountId; |
| 22 | + private long domainId; |
| 23 | + private long gatewayId; |
| 24 | + private StaticRoute.State state; |
| 25 | + private long vpcId; |
| 26 | + String vlanTag; |
| 27 | + String gateway; |
| 28 | + String netmask; |
| 29 | + String ipAddress; |
| 30 | + |
| 31 | + |
| 32 | + public StaticRouteProfile(StaticRoute staticRoute, PrivateGateway gateway) { |
| 33 | + this.id = staticRoute.getId(); |
| 34 | + this.cidr = staticRoute.getCidr(); |
| 35 | + this.accountId = staticRoute.getAccountId(); |
| 36 | + this.domainId = staticRoute.getDomainId(); |
| 37 | + this.gatewayId = staticRoute.getVpcGatewayId(); |
| 38 | + this.state = staticRoute.getState(); |
| 39 | + this.vpcId = staticRoute.getVpcId(); |
| 40 | + this.vlanTag = gateway.getVlanTag(); |
| 41 | + this.gateway = gateway.getGateway(); |
| 42 | + this.netmask = gateway.getNetmask(); |
| 43 | + this.ipAddress = gateway.getIp4Address(); |
| 44 | + } |
| 45 | + |
| 46 | + @Override |
| 47 | + public long getAccountId() { |
| 48 | + return accountId; |
| 49 | + } |
| 50 | + |
| 51 | + @Override |
| 52 | + public long getDomainId() { |
| 53 | + return domainId; |
| 54 | + } |
| 55 | + |
| 56 | + @Override |
| 57 | + public long getVpcGatewayId() { |
| 58 | + return gatewayId; |
| 59 | + } |
| 60 | + |
| 61 | + @Override |
| 62 | + public String getCidr() { |
| 63 | + return cidr; |
| 64 | + } |
| 65 | + |
| 66 | + @Override |
| 67 | + public State getState() { |
| 68 | + return state; |
| 69 | + } |
| 70 | + |
| 71 | + @Override |
| 72 | + public Long getVpcId() { |
| 73 | + return vpcId; |
| 74 | + } |
| 75 | + |
| 76 | + @Override |
| 77 | + public long getId() { |
| 78 | + return id; |
| 79 | + } |
| 80 | + |
| 81 | + public String getVlanTag() { |
| 82 | + return vlanTag; |
| 83 | + } |
| 84 | + |
| 85 | + public String getIp4Address() { |
| 86 | + return ipAddress; |
| 87 | + } |
| 88 | + |
| 89 | + public String getGateway() { |
| 90 | + return gateway; |
| 91 | + } |
| 92 | + |
| 93 | + public String getNetmask() { |
| 94 | + return netmask; |
| 95 | + } |
| 96 | + |
| 97 | +} |
0 commit comments