2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (c) 2017 AT&T Intellectual Property
6 * ===================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 * ============LICENSE_END=============================================
20 * ====================================================================
22 package org.onap.music.datastore.jsonobjects;
24 import java.io.Serializable;
27 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
28 import com.fasterxml.jackson.annotation.JsonInclude;
29 import com.fasterxml.jackson.annotation.JsonInclude.Include;
31 import io.swagger.annotations.ApiModel;
32 import io.swagger.annotations.ApiModelProperty;
34 @ApiModel(value = "JsonNotification", description = "Json model for callback")
35 @JsonIgnoreProperties(ignoreUnknown = true)
36 @JsonInclude(Include.NON_NULL)
37 public class JsonNotification implements Serializable {
39 private String notify_field;
40 private String endpoint;
41 private String username;
42 private String password;
43 private String notify_change;
44 private String notify_insert;
45 private String notify_delete;
46 private String operation_type;
47 private String triggerName;
48 private Map<String, String> response_body;
50 public String getNotify_field() {
53 public void setNotify_field(String notify_field) {
54 this.notify_field = notify_field;
56 public String getEndpoint() {
59 public void setEndpoint(String endpoint) {
60 this.endpoint = endpoint;
62 public String getUsername() {
65 public void setUsername(String username) {
66 this.username = username;
68 public String getPassword() {
71 public void setPassword(String password) {
72 this.password = password;
74 public Map<String, String> getResponse_body() {
77 public void setResponse_body(Map<String, String> response_body) {
78 this.response_body = response_body;
80 public String getNotify_change() {
83 public void setNotify_change(String notify_change) {
84 this.notify_change = notify_change;
86 public String getNotify_insert() {
89 public void setNotify_insert(String notify_insert) {
90 this.notify_insert = notify_insert;
92 public String getNotify_delete() {
95 public void setNotify_delete(String notify_delete) {
96 this.notify_delete = notify_delete;
98 public String getOperation_type() {
99 return operation_type;
101 public void setOperation_type(String operation_type) {
102 this.operation_type = operation_type;
104 public String getTriggerName() {
107 public void setTriggerName(String triggerName) {
108 this.triggerName = triggerName;
111 public String toString() {
113 return new com.fasterxml.jackson.databind.ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(this);
114 } catch (com.fasterxml.jackson.core.JsonProcessingException e) {
115 return notify_field+ " : "+endpoint+ " : "+username+ " : "+password+ " : "+response_body;