Update swagger.json and other updates.
[music.git] / src / main / java / org / onap / music / datastore / jsonobjects / JsonNotification.java
1 /*
2  * ============LICENSE_START==========================================
3  * org.onap.music
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
10  * 
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  * 
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.
18  * 
19  * ============LICENSE_END=============================================
20  * ====================================================================
21  */
22 package org.onap.music.datastore.jsonobjects;
23
24 import java.io.Serializable;
25 import java.util.Map;
26
27 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
28 import com.fasterxml.jackson.annotation.JsonInclude;
29 import com.fasterxml.jackson.annotation.JsonInclude.Include;
30
31 import io.swagger.annotations.ApiModel;
32 import io.swagger.annotations.ApiModelProperty;
33
34 @ApiModel(value = "JsonNotification", description = "Json model for callback")
35 @JsonIgnoreProperties(ignoreUnknown = true)
36 @JsonInclude(Include.NON_NULL) 
37 public class JsonNotification implements Serializable {
38         
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     
48     private Map<String, String> response_body;
49     
50         public String getNotify_field() {
51                 return notify_field;
52         }
53         public void setNotify_field(String notify_field) {
54                 this.notify_field = notify_field;
55         }
56         public String getEndpoint() {
57                 return endpoint;
58         }
59         public void setEndpoint(String endpoint) {
60                 this.endpoint = endpoint;
61         }
62         public String getUsername() {
63                 return username;
64         }
65         public void setUsername(String username) {
66                 this.username = username;
67         }
68         public String getPassword() {
69                 return password;
70         }
71         public void setPassword(String password) {
72                 this.password = password;
73         }
74         public Map<String, String> getResponse_body() {
75                 return response_body;
76         }
77         public void setResponse_body(Map<String, String> response_body) {
78                 this.response_body = response_body;
79         }
80         public String getNotify_change() {
81                 return notify_change;
82         }
83         public void setNotify_change(String notify_change) {
84                 this.notify_change = notify_change;
85         }
86         public String getNotify_insert() {
87                 return notify_insert;
88         }
89         public void setNotify_insert(String notify_insert) {
90                 this.notify_insert = notify_insert;
91         }
92         public String getNotify_delete() {
93                 return notify_delete;
94         }
95         public void setNotify_delete(String notify_delete) {
96                 this.notify_delete = notify_delete;
97         }
98         public String getOperation_type() {
99                 return operation_type;
100         }
101         public void setOperation_type(String operation_type) {
102                 this.operation_type = operation_type;
103         }
104
105         @Override
106         public String toString() {
107                 try {
108                 return new com.fasterxml.jackson.databind.ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(this);
109             } catch (com.fasterxml.jackson.core.JsonProcessingException e) {
110                         return notify_field+ " : "+endpoint+ " : "+username+ " : "+password+ " : "+response_body;
111             }
112
113         }
114         
115 }