/*
* Copyright 2014 Yann D'Isanto.
*
* 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.
*/
package com.smartbear.swagger4j.impl;
import com.smartbear.swagger4j.DataType;
import com.smartbear.swagger4j.Property;
import java.util.List;
/**
* @author Yann D'Isanto
*/
public final class PropertyImpl implements Property {
private String name;
private DataType dataType;
private String description;
private boolean required;
private Object defaultValue;
private List<String> enumValues;
private Number minimum;
private Number maximum;
public PropertyImpl(String name, DataType dataType, String description, boolean required) {
this.name = name;
this.dataType = dataType;
this.description = description;
this.required = required;
}
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public DataType getDataType() {
return dataType;
}
public void setDataType(DataType dataType) {
this.dataType = dataType;
}
@Override
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public boolean isRequired() {
return required;
}
public void setRequired(boolean required) {
this.required = required;
}
@Override
public Object getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(Object defaultValue) {
this.defaultValue = defaultValue;
}
@Override
public List<String> getEnumValues() {
return enumValues;
}
public void setEnumValues(List<String> enumValues) {
this.enumValues = enumValues;
}
@Override
public Number getMinimum() {
return minimum;
}
public void setMinimum(Number minimum) {
this.minimum = minimum;
}
@Override
public Number getMaximum() {
return maximum;
}
public void setMaximum(Number maximum) {
this.maximum = maximum;
}
}