Addition of OpFlex server configuration and message support.
[groupbasedpolicy.git] / groupbasedpolicy / src / main / java / org / opendaylight / groupbasedpolicy / renderer / opflex / EndpointPolicyUpdateResponse.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;
11
12 import org.opendaylight.groupbasedpolicy.jsonrpc.RpcMessage;
13
14 import com.fasterxml.jackson.annotation.JsonIgnore;
15 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
16 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
17
18 @JsonSerialize
19 @JsonDeserialize
20 public class EndpointPolicyUpdateResponse extends RpcMessage {
21
22     public static final String POLICY_UPDATE_MESSAGE_RESPONSE = "endpoint_update_policy_response";
23
24     static public class Result {
25     }
26     static public class Error {
27         private String message;
28
29         public String getMessage() {
30             return message;
31         }
32
33         public void setMessage(String message) {
34             this.message = message;
35         }
36     }
37     private String id;
38     private Result result;
39     private Error error;
40
41     @JsonIgnore
42     private String name;
43     @JsonIgnore
44     private String method;
45
46     @Override
47     public String getId() {
48         return id;
49     }
50
51     @Override
52     public void setId(String id) {
53         this.id = id;
54     }
55
56     public Error getError() {
57         return error;
58     }
59
60     public void setError(Error error) {
61         this.error = error;
62     }
63
64     @Override
65     public String getMethod() {
66         return null;
67     }
68
69     @Override
70     public void setMethod(String method) {
71     }
72
73     public Result getResult() {
74         return this.result;
75     }
76
77     public void setResult(Result result) {
78         this.result = result;
79     }
80
81     public EndpointPolicyUpdateResponse(String name) {
82         this.name = name;
83     }
84
85     public EndpointPolicyUpdateResponse() {
86         this.name = POLICY_UPDATE_MESSAGE_RESPONSE;
87     }
88
89     @Override
90     public String getName() {
91         return this.name;
92     }
93
94     @Override
95     public void setName(String name) {
96         this.name = name;
97     }
98
99 }