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;
33 @ApiModel(value = "JsonNotification", description = "Json model for callback")
34 @JsonIgnoreProperties(ignoreUnknown = true)
35 @JsonInclude(Include.NON_NULL)
36 public class JsonNotification implements Serializable {
38 private String notify_field;
39 private String endpoint;
40 private String username;
41 private String password;
42 private String notify_change;
43 private String notify_insert;
44 private String notify_delete;
45 private String operation_type;
46 private String triggerName;
47 private Map<String, String> response_body;
49 public String getNotify_field() {
52 public void setNotify_field(String notify_field) {
53 this.notify_field = notify_field;
55 public String getEndpoint() {
58 public void setEndpoint(String endpoint) {
59 this.endpoint = endpoint;
61 public String getUsername() {
64 public void setUsername(String username) {
65 this.username = username;
67 public String getPassword() {
70 public void setPassword(String password) {
71 this.password = password;
73 public Map<String, String> getResponse_body() {
76 public void setResponse_body(Map<String, String> response_body) {
77 this.response_body = response_body;
79 public String getNotify_change() {
82 public void setNotify_change(String notify_change) {
83 this.notify_change = notify_change;
85 public String getNotify_insert() {
88 public void setNotify_insert(String notify_insert) {
89 this.notify_insert = notify_insert;
91 public String getNotify_delete() {
94 public void setNotify_delete(String notify_delete) {
95 this.notify_delete = notify_delete;
97 public String getOperation_type() {
98 return operation_type;
100 public void setOperation_type(String operation_type) {
101 this.operation_type = operation_type;
103 public String getTriggerName() {
106 public void setTriggerName(String triggerName) {
107 this.triggerName = triggerName;
110 public String toString() {
112 return new com.fasterxml.jackson.databind.ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(this);
113 } catch (com.fasterxml.jackson.core.JsonProcessingException e) {
114 return notify_field+ " : "+endpoint+ " : "+username+ " : "+password+ " : "+response_body;