bbd39f05278178de42a02416e5d2175cb14ef5cb
[aai/data-router.git] / src / main / java / org / openecomp / datarouter / search / filters / config / UiFilterDataSourceConfig.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  *
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  */
23 package org.openecomp.datarouter.search.filters.config;
24
25 import com.fasterxml.jackson.annotation.JsonCreator;
26 import com.fasterxml.jackson.annotation.JsonInclude;
27 import com.fasterxml.jackson.annotation.JsonInclude.Include;
28 import com.fasterxml.jackson.annotation.JsonProperty;
29
30 @JsonInclude(Include.NON_NULL)
31 public class UiFilterDataSourceConfig {
32  
33   @JsonProperty("indexName")
34   private String indexName;
35   
36   @JsonProperty("docType")
37   private String docType;
38   
39   @JsonProperty("fieldName")
40   private String fieldName;
41   
42   @JsonProperty("pathToField")
43   private String pathToField;
44  
45   public UiFilterDataSourceConfig(){}
46   
47   @JsonCreator
48   public UiFilterDataSourceConfig(
49       @JsonProperty("indexName") final String indexName, @JsonProperty("docType") final String docType,
50       @JsonProperty("fieldName") final String fieldName, @JsonProperty("pathToField") final String pathToField) {
51     this.indexName = indexName;
52     this.docType = docType;
53     this.fieldName = fieldName;
54     this.pathToField = pathToField;
55   }
56
57   @JsonProperty("indexName")
58   public String getIndexName() {
59     return indexName;
60   }
61
62   public void setIndexName(String indexName) {
63     this.indexName = indexName;
64   }
65
66   @JsonProperty("docType")
67   public String getDocType() {
68     return docType;
69   }
70
71   public void setDocType(String docType) {
72     this.docType = docType;
73   }
74
75   @JsonProperty("fieldName")
76   public String getFieldName() {
77     return fieldName;
78   }
79
80   public void setFieldName(String fieldName) {
81     this.fieldName = fieldName;
82   }
83   
84   @JsonProperty("pathToField")
85   public String getPathToField() {
86     return pathToField;
87   }
88   
89   public void setPathToField(String pathToField) {
90     this.pathToField = pathToField;
91   }
92
93   @Override
94   public String toString() {
95     return "UiFilterDataSourceConfig [indexName=" + indexName + ", docType=" + docType
96         + ", fieldName=" + fieldName + ", pathToField=" + pathToField + "]";
97   }
98 }
99