<commit_before>/*
 *
 *  Copyright 2015-2018 the original author or authors.
 *
 *  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 springfox.documentation.service;

import com.fasterxml.classmate.ResolvedType;
import com.google.common.base.Optional;
import springfox.documentation.schema.ModelReference;

import java.util.List;

public class Parameter {
  private final String name;
  private final String description;
  private final String defaultValue;
  private final Boolean required;
  private final Boolean allowMultiple;
  private final ModelReference modelRef;
  private final Optional<ResolvedType> type;
  private final AllowableValues allowableValues;
  private final String paramType;
  private final String paramAccess;
  private final Boolean hidden;
  private final String pattern;
  private final String collectionFormat;
  private final List<VendorExtension> vendorExtensions;
  private final Boolean allowEmptyValue;

  public Parameter(
      String name,
      String description,
      String defaultValue,
      boolean required,
      boolean allowMultiple,
      Boolean allowEmptyValue,
      ModelReference modelRef,
      Optional<ResolvedType> type,
      AllowableValues allowableValues,
      String paramType,
      String paramAccess,
      boolean hidden,
      String pattern,
      String collectionFormat,
      List<VendorExtension> vendorExtensions) {

    this.description = description;
    this.defaultValue = defaultValue;
    this.required = required;
    this.allowMultiple = allowMultiple;
    this.allowEmptyValue = allowEmptyValue;
    this.modelRef = modelRef;
    this.type = type;
    this.allowableValues = allowableValues;
    this.paramType = paramType;
    this.paramAccess = paramAccess;
    this.name = name;
    this.hidden = hidden;
    this.pattern = pattern;
    this.collectionFormat = collectionFormat;
    this.vendorExtensions = vendorExtensions;
  }

  public Optional<ResolvedType> getType() {
    return type;
  }

  public String getName() {
    return name;
  }

  public String getDescription() {
    return description;
  }

  public String getDefaultValue() {
    return defaultValue;
  }

  public Boolean isRequired() {
    return required;
  }

  public Boolean isAllowMultiple() {
    return allowMultiple;
  }

  public AllowableValues getAllowableValues() {
    return allowableValues;
  }

  public String getParamType() {
    return paramType;
  }

  public String getParamAccess() {
    return paramAccess;
  }

  public ModelReference getModelRef() {
    return modelRef;
  }
  
  public Boolean isHidden() {
    return hidden;
  }

  public String getPattern() {
    return pattern;
  }

  public List<VendorExtension> getVendorExtentions() {
    return vendorExtensions;
  }

  public String getCollectionFormat() {
    return collectionFormat;
  }

  public Boolean isAllowEmptyValue() {
    return allowEmptyValue;
  }
}<commit_msg>Added toString for easier test debugging<commit_after>/*
 *
 *  Copyright 2015-2018 the original author or authors.
 *
 *  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 springfox.documentation.service;

import com.fasterxml.classmate.ResolvedType;
import com.google.common.base.Optional;
import springfox.documentation.schema.ModelReference;

import java.util.List;

public class Parameter {
  private final String name;
  private final String description;
  private final String defaultValue;
  private final Boolean required;
  private final Boolean allowMultiple;
  private final ModelReference modelRef;
  private final Optional<ResolvedType> type;
  private final AllowableValues allowableValues;
  private final String paramType;
  private final String paramAccess;
  private final Boolean hidden;
  private final String pattern;
  private final String collectionFormat;
  private final List<VendorExtension> vendorExtensions;
  private final Boolean allowEmptyValue;

  public Parameter(
      String name,
      String description,
      String defaultValue,
      boolean required,
      boolean allowMultiple,
      Boolean allowEmptyValue,
      ModelReference modelRef,
      Optional<ResolvedType> type,
      AllowableValues allowableValues,
      String paramType,
      String paramAccess,
      boolean hidden,
      String pattern,
      String collectionFormat,
      List<VendorExtension> vendorExtensions) {

    this.description = description;
    this.defaultValue = defaultValue;
    this.required = required;
    this.allowMultiple = allowMultiple;
    this.allowEmptyValue = allowEmptyValue;
    this.modelRef = modelRef;
    this.type = type;
    this.allowableValues = allowableValues;
    this.paramType = paramType;
    this.paramAccess = paramAccess;
    this.name = name;
    this.hidden = hidden;
    this.pattern = pattern;
    this.collectionFormat = collectionFormat;
    this.vendorExtensions = vendorExtensions;
  }

  public Optional<ResolvedType> getType() {
    return type;
  }

  public String getName() {
    return name;
  }

  public String getDescription() {
    return description;
  }

  public String getDefaultValue() {
    return defaultValue;
  }

  public Boolean isRequired() {
    return required;
  }

  public Boolean isAllowMultiple() {
    return allowMultiple;
  }

  public AllowableValues getAllowableValues() {
    return allowableValues;
  }

  public String getParamType() {
    return paramType;
  }

  public String getParamAccess() {
    return paramAccess;
  }

  public ModelReference getModelRef() {
    return modelRef;
  }
  
  public Boolean isHidden() {
    return hidden;
  }

  public String getPattern() {
    return pattern;
  }

  public List<VendorExtension> getVendorExtentions() {
    return vendorExtensions;
  }

  public String getCollectionFormat() {
    return collectionFormat;
  }

  public Boolean isAllowEmptyValue() {
    return allowEmptyValue;
  }

  @Override
  public String toString() {
    final StringBuffer sb = new StringBuffer("Parameter{");
    sb.append("name='").append(name).append('\'');
    sb.append(", description='").append(description).append('\'');
    sb.append('}');
    return sb.toString();
  }
}
{'fraction_non_alphanumeric': 0.07356002775850104, 'fraction_numerical': 0.0033310201249132547, 'mean_word_length': 3.5178683385579936, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3230684', 'n_tokens_mistral': 1927, 'n_tokens_neox': 1876, 'n_words': 612}