Added range type to subject-feature-definition/parameter
[groupbasedpolicy.git] / renderers / opflex / src / main / java / org / opendaylight / groupbasedpolicy / renderer / opflex / lib / messages / IdentityResponse.java
1 /*
2  * Copyright (C) 2014 Cisco Systems, Inc.
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  * Authors : Thomas Bachman
9  */
10 package org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages;
11
12 import java.util.ArrayList;
13 import java.util.List;
14
15 import org.opendaylight.groupbasedpolicy.jsonrpc.RpcMessage;
16
17 import com.fasterxml.jackson.annotation.JsonIgnore;
18 import com.fasterxml.jackson.databind.JsonNode;
19 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
20 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
21
22 @JsonSerialize
23 @JsonDeserialize
24 public class IdentityResponse extends RpcMessage {
25
26     public static final String IDENTITY_MESSAGE_RESPONSE = "send_identity_response";
27
28     static public class Peer {
29         private List<String> role;
30         private String connectivity_info;
31
32         public List<String> getRole() {
33             return role;
34         }
35
36         public void setRole(List<String> role) {
37             this.role = role;
38         }
39
40         public String getConnectivity_info() {
41             return connectivity_info;
42         }
43
44         public void setConnectivity_info(String connectivity_info) {
45             this.connectivity_info = connectivity_info;
46         }
47
48         public Peer() {
49         }
50     }
51
52     static public class Result {
53         private String name;
54         private String domain;
55         private List<String> my_role;
56         private List<Peer> peers;
57
58         public String getName() {
59             return this.name;
60         }
61
62         public void setName(String name) {
63             this.name = name;
64         }
65
66         public Result() {
67             my_role = new ArrayList<String>();
68         }
69
70         public String getDomain() {
71             return domain;
72         }
73
74         public void setDomain(String domain) {
75             this.domain = domain;
76         }
77
78         public List<String> getMy_role() {
79             return my_role;
80         }
81
82         public void setMy_role(List<String> my_role) {
83             this.my_role = my_role;
84         }
85
86         public List<Peer> getPeers() {
87             return peers;
88         }
89
90         public void setPeers(List<Peer> peers) {
91             this.peers = peers;
92         }
93
94     }
95     private JsonNode id;
96     private Result result;
97     private OpflexError error;
98
99     @JsonIgnore
100     private String name;
101     @JsonIgnore
102     private String method;
103
104     @Override
105     public JsonNode getId() {
106         return id;
107     }
108
109     @Override
110     public void setId(JsonNode id) {
111         this.id = id;
112     }
113
114     public OpflexError getError() {
115         return error;
116     }
117
118     public void setError(OpflexError error) {
119         this.error = error;
120     }
121
122     @Override
123     public String getMethod() {
124         return null;
125     }
126
127     @Override
128     public void setMethod(String method) {
129     }
130
131     public Result getResult() {
132         return this.result;
133     }
134
135     public void setResult(Result result) {
136         this.result = result;
137     }
138
139     public IdentityResponse(String name) {
140         this.name = name;
141     }
142
143     public IdentityResponse() {
144         this.name = IDENTITY_MESSAGE_RESPONSE;
145     }
146
147     @Override
148     public String getName() {
149         return this.name;
150     }
151
152     @Override
153     public void setName(String name) {
154         this.name = name;
155     }
156
157     @JsonIgnore
158     @Override
159     public boolean valid() {
160         return true;
161     }
162
163 }