6374716179a12c59fd534b289b017f4ba68983bb
[aai/search-data-service.git] / search-data-service / src / main / java / org / onap / aai / sa / searchdbabstraction / elasticsearch / dao / ElasticSearchOperationStatus.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 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 package org.onap.aai.sa.searchdbabstraction.elasticsearch.dao;
22
23 import com.fasterxml.jackson.annotation.JsonAnyGetter;
24 import com.fasterxml.jackson.annotation.JsonAnySetter;
25 import java.util.HashMap;
26 import java.util.Map;
27
28 public class ElasticSearchOperationStatus {
29
30     private String index;
31     private String type;
32     private String id;
33     private String version;
34     private ElasticSearchShardStatus shards;
35     private Integer status;
36     private ElasticSearchError error;
37
38     private Map<String, Object> additionalProperties = new HashMap<>();
39
40     public ElasticSearchError getError() {
41         return error;
42     }
43
44     public void setError(ElasticSearchError error) {
45         this.error = error;
46     }
47
48     public Integer getStatus() {
49         return status;
50     }
51
52     public void setStatus(Integer status) {
53         this.status = status;
54     }
55
56     public ElasticSearchShardStatus getShards() {
57         return shards;
58     }
59
60     public void setShards(ElasticSearchShardStatus shards) {
61         this.shards = shards;
62     }
63
64     public String getIndex() {
65         return index;
66     }
67
68     public void setIndex(String index) {
69         this.index = index;
70     }
71
72     public String getType() {
73         return type;
74     }
75
76     public void setType(String type) {
77         this.type = type;
78     }
79
80     public String getId() {
81         return id;
82     }
83
84     public void setId(String id) {
85         this.id = id;
86     }
87
88     public String getVersion() {
89         return version;
90     }
91
92     public void setVersion(String version) {
93         this.version = version;
94     }
95
96     @JsonAnyGetter
97     public Map<String, Object> getAdditionalProperties() {
98         return additionalProperties;
99     }
100
101     @JsonAnySetter
102     public void setAdditionalProperties(String name, Object value) {
103         additionalProperties.put(name, value);
104     }
105
106     @Override
107     public String toString() {
108         return "ElasticSearchIndexStatus [index=" + index + ", type=" + type + ", id=" + id + ", version=" + version
109                 + ", shards=" + shards + ", status=" + status + "]";
110     }
111
112 }