Initial commit for AAI-UI(sparky-backend)
[aai/sparky-be.git] / src / test / java / org / openecomp / sparky / dal / elasticsearch / entity / AutoSuggestElasticSearchResponse.java
1 /* 
2 * ============LICENSE_START=======================================================
3 * SPARKY (inventory UI service)
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.sparky.dal.elasticsearch.entity;
26
27 import java.util.HashMap;
28 import java.util.Map;
29
30 import com.fasterxml.jackson.annotation.JsonProperty;
31
32 public class AutoSuggestElasticSearchResponse {
33   
34   private int took;
35   
36   @JsonProperty("timed_out")
37   private boolean timedOut;
38   
39   @JsonProperty("_shards")
40   private Map<String,String> shards;
41   
42   private AutoSuggestElasticHitsEntity hits;
43
44   public AutoSuggestElasticSearchResponse(){
45     this.shards = new HashMap<String,String>();
46   }
47
48   public int getTook() {
49     return took;
50   }
51
52   public void setTook(int took) {
53     this.took = took;
54   }
55
56   public boolean isTimedOut() {
57     return timedOut;
58   }
59
60   public void setTimedOut(boolean timedOut) {
61     this.timedOut = timedOut;
62   }
63
64   public Map<String, String> getShards() {
65     return shards;
66   }
67
68   public void setShards(Map<String, String> shards) {
69     this.shards = shards;
70   }
71   
72   public void addShard(String name, String value) {
73     shards.put(name, value);
74   }
75
76   public AutoSuggestElasticHitsEntity getHits() {
77     return hits;
78   }
79
80   public void setHits(AutoSuggestElasticHitsEntity hits) {
81     this.hits = hits;
82   }
83   
84   
85 }