2 * Copyright (C) 2014 Cisco Systems, Inc.
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
8 * Authors : Thomas Bachman
10 package org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages;
12 import java.util.List;
14 import org.opendaylight.groupbasedpolicy.jsonrpc.RpcMessage;
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;
23 public class EndpointDeclareRequest extends RpcMessage {
25 public static final String DECLARE_MESSAGE = "endpoint_declare";
27 static public class Params {
28 private List<ManagedObject> endpoint;
30 public List<ManagedObject> getEndpoint() {
33 public void setEndpoint(List<ManagedObject> endpoint) {
34 this.endpoint = endpoint;
39 public void setPrr(int prr) {
44 private String method;
45 private List<Params> params;
51 public JsonNode getId() {
56 public void setId(JsonNode id) {
61 public String getMethod() {
66 public void setMethod(String method) {
70 public List<Params> getParams() {
74 public void setParams(List<Params> params) {
79 public String getName() {
84 public void setName(String name) {
88 public EndpointDeclareRequest(String name) {
92 public EndpointDeclareRequest() {
93 this.name = DECLARE_MESSAGE;
94 this.method = DECLARE_MESSAGE;
98 * Minimal check on validity of message
99 * @return true if message has passed validity check
103 public boolean valid() {
106 if (params.get(0) == null)