Add voting app example
[music.git] / src / main / java / org / onap / music / datastore / jsonobjects / JsonTable.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.util.Map;
25
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
27
28 import io.swagger.annotations.ApiModel;
29 import io.swagger.annotations.ApiModelProperty;
30
31 @ApiModel(value = "JsonTable", description = "Defines the Json for Creating a new Table.")
32 @JsonIgnoreProperties(ignoreUnknown = true)
33 public class JsonTable {
34     private String keyspaceName;
35     private String tableName;
36
37     private Map<String, String> fields;
38     private Map<String, Object> properties;
39     private String primaryKey;
40     private String sortingKey;
41     private String clusteringOrder;
42     private Map<String, String> consistencyInfo;
43
44     @ApiModelProperty(value = "Consistency level", allowableValues = "eventual,critical,atomic")
45     public Map<String, String> getConsistencyInfo() {
46         return consistencyInfo;
47     }
48
49     public void setConsistencyInfo(Map<String, String> consistencyInfo) {
50         this.consistencyInfo = consistencyInfo;
51     }
52
53     @ApiModelProperty(value = "Properties")
54     public Map<String, Object> getProperties() {
55         return properties;
56     }
57
58     public void setProperties(Map<String, Object> properties) {
59         this.properties = properties;
60     }
61
62     @ApiModelProperty(value = "Fields")
63     public Map<String, String> getFields() {
64         return fields;
65     }
66
67     public void setFields(Map<String, String> fields) {
68         this.fields = fields;
69     }
70
71     @ApiModelProperty(value = "KeySpace Name")
72     public String getKeyspaceName() {
73         return keyspaceName;
74     }
75
76     public void setKeyspaceName(String keyspaceName) {
77         this.keyspaceName = keyspaceName;
78     }
79
80     @ApiModelProperty(value = "Table Name")
81     public String getTableName() {
82         return tableName;
83     }
84
85     public void setTableName(String tableName) {
86         this.tableName = tableName;
87     }
88
89     @ApiModelProperty(value = "Sorting Key")
90     public String getSortingKey() {
91         return sortingKey;
92     }
93
94     public void setSortingKey(String sortingKey) {
95         this.sortingKey = sortingKey;
96     }
97
98     @ApiModelProperty(value = "Clustering Order", notes = "")
99     public String getClusteringOrder() {
100         return clusteringOrder;
101     }
102
103     public void setClusteringOrder(String clusteringOrder) {
104         this.clusteringOrder = clusteringOrder;
105     }
106
107     @ApiModelProperty(value = "Primary Key")
108     public String getPrimaryKey() {
109         return primaryKey;
110     }
111
112     public void setPrimaryKey(String primaryKey) {
113         this.primaryKey = primaryKey;
114     }
115
116
117 }