Feature uses features-parent as parent
[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.renderer.opflex.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
29         List<ManagedObject> endpoint;
30
31         public List<ManagedObject> getEndpoint() {
32             return endpoint;
33         }
34
35         public void setEndpoint(List<ManagedObject> endpoint) {
36             this.endpoint = endpoint;
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     public Result getResult() {
76         return this.result;
77     }
78
79     public void setResult(Result result) {
80         this.result = result;
81     }
82
83     @Override
84     public String getName() {
85         return this.name;
86     }
87
88     @Override
89     public void setName(String name) {
90         this.name = name;
91     }
92
93     public EndpointResolveResponse(String name) {
94         this.name = name;
95     }
96
97     public EndpointResolveResponse() {
98         this.name = EPP_RESOLVE_MESSAGE_RESPONSE;
99     }
100
101     @JsonIgnore
102     @Override
103     public boolean valid() {
104         return true;
105     }
106
107 }