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 * ====================================================================
23 package org.onap.music.datastore.jsonobjects;
27 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
29 import io.swagger.annotations.ApiModel;
30 import io.swagger.annotations.ApiModelProperty;
32 @ApiModel(value = "JsonTable", description = "Defines the Json for Creating a new Table.")
33 @JsonIgnoreProperties(ignoreUnknown = true)
34 public class JsonTable {
35 private String keyspaceName;
36 private String tableName;
38 private Map<String, String> fields;
39 private Map<String, Object> properties;
40 private String primaryKey;
41 private String sortingKey;
42 private String partitionKey;
43 private String clusteringKey;
44 private String filteringKey;
45 private String clusteringOrder;
46 private Map<String, String> consistencyInfo;
48 @ApiModelProperty(value = "Consistency level", allowableValues = "eventual,critical,atomic")
49 public Map<String, String> getConsistencyInfo() {
50 return consistencyInfo;
53 public void setConsistencyInfo(Map<String, String> consistencyInfo) {
54 this.consistencyInfo = consistencyInfo;
57 @ApiModelProperty(value = "Properties")
58 public Map<String, Object> getProperties() {
62 public void setProperties(Map<String, Object> properties) {
63 this.properties = properties;
66 @ApiModelProperty(value = "Fields")
67 public Map<String, String> getFields() {
71 public void setFields(Map<String, String> fields) {
75 @ApiModelProperty(value = "KeySpace Name")
76 public String getKeyspaceName() {
80 public void setKeyspaceName(String keyspaceName) {
81 this.keyspaceName = keyspaceName;
84 @ApiModelProperty(value = "Table Name")
85 public String getTableName() {
89 public void setTableName(String tableName) {
90 this.tableName = tableName;
93 @ApiModelProperty(value = "Sorting Key")
94 public String getSortingKey() {
98 public void setSortingKey(String sortingKey) {
99 this.sortingKey = sortingKey;
102 @ApiModelProperty(value = "Clustering Order", notes = "")
103 public String getClusteringOrder() {
104 return clusteringOrder;
107 public void setClusteringOrder(String clusteringOrder) {
108 this.clusteringOrder = clusteringOrder;
111 @ApiModelProperty(value = "Primary Key")
112 public String getPrimaryKey() {
116 public void setPrimaryKey(String primaryKey) {
117 this.primaryKey = primaryKey;
120 public String getClusteringKey() {
121 return clusteringKey;
124 public void setClusteringKey(String clusteringKey) {
125 this.clusteringKey = clusteringKey;
128 public String getFilteringKey() {
132 public void setFilteringKey(String filteringKey) {
133 this.filteringKey = filteringKey;
136 public String getPartitionKey() {
140 public void setPartitionKey(String partitionKey) {
141 this.partitionKey = partitionKey;