970fb5da7b814049a239e074ccb17460e26b4eca
[vtn.git] /
1 /**
2  * Copyright (c) 2014 NEC Corporation
3  * All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this
7  * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.vtn.app.run.config.rest.response.beans;
11
12 import org.opendaylight.vtn.app.run.config.json.annotations.JsonElement;
13 import org.opendaylight.vtn.app.run.config.json.annotations.JsonObject;
14 /**
15  * VTenantPathMapNorthBound - Bean Representaion for VTenantPathMapNorthBound object from the JSON Response.
16  */
17 @JsonObject
18 public class VTenantPathMapNorthBound {
19
20     /**
21      * unique pathmap value for vtenant.
22      */
23     @JsonElement(name = "index")
24     private int index = 0;
25
26     /**
27      * Condition value for pathmap in vtenant.
28      */
29     @JsonElement(name = "condition")
30     private String condition = null;
31
32     /**
33      * Policy for pathmap in vtenant.
34      */
35     @JsonElement(name = "policy")
36     private int policy = 0;
37
38     /**
39      * Maximum idle time .
40      */
41     @JsonElement(name = "idleTimeout")
42     private int idleTimeout = 0;
43
44     /**
45      * Life time the vtenant.
46      */
47     @JsonElement(name = "hardTimeout")
48     private int hardTimeout = 0;
49
50     /**
51      * Default Constructor.
52      */
53     public VTenantPathMapNorthBound() {
54     }
55
56     /**
57      * Parameterized Constructor.
58      * @param index, condition, idleTimeout, hardTimeout
59      */
60     public VTenantPathMapNorthBound(int index, String condition,
61             int idleTimeout, int hardTimeout) {
62         this.index = index;
63         this.condition = condition;
64         this.idleTimeout = idleTimeout;
65         this.hardTimeout = hardTimeout;
66     }
67
68     /**
69      * getPolicy - function to get the policy for this object.
70      *
71      * @return {@link int }
72      */
73     public int getIndex() {
74         return index;
75     }
76
77     /**
78      * setIndex - function to set the index for this object.
79      *
80      * @param index
81      */
82     public void setIndex(int index) {
83         this.index = index;
84     }
85
86     /**
87      * getCondition - function to get the condition for this object.
88      *
89      * @return {@link int }
90      */
91     public String getCondition() {
92         return condition;
93     }
94
95     /**
96      * setCondition - function to set the condition for this object.
97      *
98      * @param condition
99      */
100     public void setCondition(String condition) {
101         this.condition = condition;
102     }
103
104     /**
105      * getPolicy - function to get the policy for this object.
106      *
107      * @return {@link int }
108      */
109     public int getPolicy() {
110         return policy;
111     }
112
113     /**
114      * setPolicy - function to set the policy for this object.
115      *
116      * @param policy
117      */
118     public void setPolicy(int policy) {
119         this.policy = policy;
120     }
121
122     /**
123      * getIdleTimeout - function to get the idleTimeout for this object.
124      *
125      * @return {@link int }
126      */
127     public int getIdleTimeout() {
128         return idleTimeout;
129     }
130
131     /**
132      * setIdleTimeout - function to set the idleTimeout for this object.
133      *
134      * @param idleTimeout
135      */
136     public void setIdleTimeout(int idleTimeout) {
137         this.idleTimeout = idleTimeout;
138     }
139
140     /**
141      * getVtnName - function to get the hardTimeout for this object.
142      *
143      * @return {@link int }
144      */
145     public int getHardTimeout() {
146         return hardTimeout;
147     }
148
149     /**
150      * setHardTimeout - function to set the hardTimeout for this object.
151      *
152      * @param hardTimeout
153      */
154     public void setHardTimeout(int hardTimeout) {
155         this.hardTimeout = hardTimeout;
156     }
157
158
159     /**
160      * String representation of the object.
161      *
162      */
163     @Override
164     public String toString() {
165         return "pathmap [index :" + index + ",condition:" + condition
166                 + ",policy:" + policy + ",idleTimeout:" + idleTimeout
167                 + ",hardTimeout:" + hardTimeout + "]";
168     }
169 }