2 * ============LICENSE_START==========================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * ============LICENSE_END=============================================
20 * ====================================================================
22 package org.onap.music.datastore.jsonobjects;
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
28 import io.swagger.annotations.ApiModel;
29 import io.swagger.annotations.ApiModelProperty;
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;
37 private Map<String, String> fields;
38 private Map<String, Object> properties;
39 private String primaryKey;
40 private String sortingKey;
41 private String partitionKey;
42 private String clusteringKey;
43 private String filteringKey;
44 private String clusteringOrder;
45 private Map<String, String> consistencyInfo;
47 @ApiModelProperty(value = "Consistency level", allowableValues = "eventual,critical,atomic")
48 public Map<String, String> getConsistencyInfo() {
49 return consistencyInfo;
52 public void setConsistencyInfo(Map<String, String> consistencyInfo) {
53 this.consistencyInfo = consistencyInfo;
56 @ApiModelProperty(value = "Properties")
57 public Map<String, Object> getProperties() {
61 public void setProperties(Map<String, Object> properties) {
62 this.properties = properties;
65 @ApiModelProperty(value = "Fields")
66 public Map<String, String> getFields() {
70 public void setFields(Map<String, String> fields) {
74 @ApiModelProperty(value = "KeySpace Name")
75 public String getKeyspaceName() {
79 public void setKeyspaceName(String keyspaceName) {
80 this.keyspaceName = keyspaceName;
83 @ApiModelProperty(value = "Table Name")
84 public String getTableName() {
88 public void setTableName(String tableName) {
89 this.tableName = tableName;
92 @ApiModelProperty(value = "Sorting Key")
93 public String getSortingKey() {
97 public void setSortingKey(String sortingKey) {
98 this.sortingKey = sortingKey;
101 @ApiModelProperty(value = "Clustering Order", notes = "")
102 public String getClusteringOrder() {
103 return clusteringOrder;
106 public void setClusteringOrder(String clusteringOrder) {
107 this.clusteringOrder = clusteringOrder;
110 @ApiModelProperty(value = "Primary Key")
111 public String getPrimaryKey() {
115 public void setPrimaryKey(String primaryKey) {
116 this.primaryKey = primaryKey;
119 public String getClusteringKey() {
120 return clusteringKey;
123 public void setClusteringKey(String clusteringKey) {
124 this.clusteringKey = clusteringKey;
127 public String getFilteringKey() {
131 public void setFilteringKey(String filteringKey) {
132 this.filteringKey = filteringKey;
135 public String getPartitionKey() {
139 public void setPartitionKey(String partitionKey) {
140 this.partitionKey = partitionKey;