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