7ecaf4badb0780a12a749cef0d3f354f07f32a2d
[ovsdb.git] / ovsdb / src / main / java / org / opendaylight / ovsdb / lib / jsonrpc / JsonRpc10Request.java
1 /*
2  * Copyright (C) 2013 EBay Software Foundation
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 : Ashwin Raveendran, Madhu Venugopal
9  */
10 package org.opendaylight.ovsdb.lib.jsonrpc;
11
12 import com.google.common.collect.Lists;
13
14 import java.util.List;
15
16 public class JsonRpc10Request {
17
18     String id;
19     String method;
20     List<Object> params = Lists.newArrayList();
21
22     public JsonRpc10Request(String id) {
23         setId(id);
24     }
25
26     public String getId() {
27         return id;
28     }
29
30     public void setId(String id) {
31         this.id = id;
32     }
33
34     public String getMethod() {
35         return method;
36     }
37
38     public void setMethod(String method) {
39         this.method = method;
40     }
41
42     public List<Object> getParams() {
43         return params;
44     }
45
46     public void setParams(List<Object> params) {
47         this.params = params;
48     }
49
50     public void setParams(Object[] pararms) {
51         this.params = Lists.newArrayList(pararms);
52     }
53
54     @Override
55     public String toString() {
56         return "JsonRpc10Request [id=" + id + ", method=" + method
57                 + ", params=" + params + "]";
58     }
59 }