/** * */ package com.thinkbiganalytics.metadata.rest.model.extension; /*- * #%L * thinkbig-metadata-rest-model * %% * Copyright (C) 2017 ThinkBig Analytics * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; /** * */ @JsonInclude(Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class FieldDescriptor { private Type type; private String name; private String displayName; private String description; private boolean collection = false; private boolean required = false; private String defaultValue; public FieldDescriptor() { } public FieldDescriptor(String name, Type type) { super(); this.type = type; this.name = name; } public Type getType() { return type; } public void setType(Type type) { this.type = type; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDisplayName() { return displayName; } public void setDisplayName(String displayName) { this.displayName = displayName; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public boolean isCollection() { return collection; } public void setCollection(boolean collection) { this.collection = collection; } public boolean isRequired() { return required; } public void setRequired(boolean required) { this.required = required; } public String getDefaultValue() { return defaultValue; } public void setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; } public enum Type { STRING, BOOLEAN, INTEGER, LONG, DOUBLE, DATE, ENTITY } }