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.renderer.opflex.jsonrpc.RpcMessage;
15 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Uri;
17 import com.fasterxml.jackson.annotation.JsonIgnore;
18 import com.fasterxml.jackson.databind.JsonNode;
19 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
20 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
24 public class EndpointUpdateRequest extends RpcMessage {
26 public static final String EP_UPDATE_MESSAGE = "endpoint_update";
28 static public class Params {
30 private List<ManagedObject> replace;
31 private List<Uri> delete_uri;
33 public List<ManagedObject> getReplace() {
37 public void setReplace(List<ManagedObject> replace) {
38 this.replace = replace;
41 public List<Uri> getDelete_uri() {
45 public void setDelete_uri(List<Uri> delete_uri) {
46 this.delete_uri = delete_uri;
51 private String method;
52 private List<Params> params;
58 public JsonNode getId() {
63 public void setId(JsonNode id) {
68 public String getMethod() {
73 public void setMethod(String method) {
77 public List<Params> getParams() {
81 public void setParams(List<Params> params) {
86 public String getName() {
91 public void setName(String name) {
95 public EndpointUpdateRequest(String name) {
99 public EndpointUpdateRequest() {
100 this.name = EP_UPDATE_MESSAGE;
101 this.method = EP_UPDATE_MESSAGE;
105 * Minimal check on validity of message
107 * @return true if message has passed validity check
111 public boolean valid() {
114 if (params.get(0) == null)