Separating renderers into features.
[groupbasedpolicy.git] / renderers / opflex / src / main / java / org / opendaylight / groupbasedpolicy / renderer / opflex / lib / messages / EndpointResolveResponse.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.List;
13
14 import org.opendaylight.groupbasedpolicy.jsonrpc.RpcMessage;
15
16 import com.fasterxml.jackson.annotation.JsonIgnore;
17 import com.fasterxml.jackson.databind.JsonNode;
18 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
19 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
20
21 @JsonSerialize
22 @JsonDeserialize
23 public class EndpointResolveResponse extends RpcMessage {
24
25     public static final String EPP_RESOLVE_MESSAGE_RESPONSE = "endpoint_resolve_response";
26
27     static public class Result {
28         List<ManagedObject> endpoint;
29
30         public List<ManagedObject> getEndpoint() {
31             return endpoint;
32         }
33
34         public void setEndpoint(List<ManagedObject> endpoint) {
35             this.endpoint = endpoint;
36         }
37     }
38
39
40     private JsonNode id;
41     private Result result;
42     private OpflexError error;
43
44     @JsonIgnore
45     private String name;
46     @JsonIgnore
47     private String method;
48
49     @Override
50     public JsonNode getId() {
51         return this.id;
52     }
53
54     @Override
55     public void setId(JsonNode id) {
56         this.id = id;
57     }
58
59     public OpflexError getError() {
60         return error;
61     }
62
63     public void setError(OpflexError error) {
64         this.error = error;
65     }
66
67     @Override
68     public String getMethod() {
69         return null;
70     }
71
72     @Override
73     public void setMethod(String method) {
74     }
75
76     public Result getResult() {
77         return this.result;
78     }
79
80     public void setResult(Result result) {
81         this.result = result;
82     }
83
84     @Override
85     public String getName() {
86         return this.name;
87     }
88
89     @Override
90     public void setName(String name) {
91         this.name = name;
92     }
93
94     public EndpointResolveResponse(String name) {
95         this.name = name;
96     }
97
98     public EndpointResolveResponse() {
99         this.name = EPP_RESOLVE_MESSAGE_RESPONSE;
100     }
101     @JsonIgnore
102     @Override
103     public boolean valid() {
104         return true;
105     }
106
107 }