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 clusteringOrder;
42 private Map<String, String> consistencyInfo;
44 @ApiModelProperty(value = "Consistency level", allowableValues = "eventual,critical,atomic")
45 public Map<String, String> getConsistencyInfo() {
46 return consistencyInfo;
49 public void setConsistencyInfo(Map<String, String> consistencyInfo) {
50 this.consistencyInfo = consistencyInfo;
53 @ApiModelProperty(value = "Properties")
54 public Map<String, Object> getProperties() {
58 public void setProperties(Map<String, Object> properties) {
59 this.properties = properties;
62 @ApiModelProperty(value = "Fields")
63 public Map<String, String> getFields() {
67 public void setFields(Map<String, String> fields) {
71 @ApiModelProperty(value = "KeySpace Name")
72 public String getKeyspaceName() {
76 public void setKeyspaceName(String keyspaceName) {
77 this.keyspaceName = keyspaceName;
80 @ApiModelProperty(value = "Table Name")
81 public String getTableName() {
85 public void setTableName(String tableName) {
86 this.tableName = tableName;
89 @ApiModelProperty(value = "Sorting Key")
90 public String getSortingKey() {
94 public void setSortingKey(String sortingKey) {
95 this.sortingKey = sortingKey;
98 @ApiModelProperty(value = "Clustering Order", notes = "")
99 public String getClusteringOrder() {
100 return clusteringOrder;
103 public void setClusteringOrder(String clusteringOrder) {
104 this.clusteringOrder = clusteringOrder;
107 @ApiModelProperty(value = "Primary Key")
108 public String getPrimaryKey() {
112 public void setPrimaryKey(String primaryKey) {
113 this.primaryKey = primaryKey;