/*
 * Copyright 2018 IBM Corp. All Rights Reserved.
 *
 * 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.ibm.watson.developer_cloud.assistant.v1.model;

import java.lang.reflect.Type;

import com.google.gson.reflect.TypeToken;
import com.ibm.watson.developer_cloud.service.model.DynamicModel;
import com.ibm.watson.developer_cloud.util.GsonSerializationHelper;
import com.ibm.watson.developer_cloud.util.Validator;

/**
 * An input object that includes the input text.
 */
public class InputData extends DynamicModel {
  private Type textType = new TypeToken<String>() {
  }.getType();

  /**
   * Gets the text.
   *
   * @return the text
   */
  public String text() {
    return GsonSerializationHelper.serializeDynamicModelProperty(this.get("text"), textType);
  }

  /**
   * Sets the text.
   *
   * @param text the new text
   */
  public void setText(final String text) {
    this.put("text", text);
  }

  /**
   * Builder.
   */
  public static class Builder {
    private String text;

    private Builder(InputData inputData) {
      text = inputData.text();
    }

    /**
     * Instantiates a new builder.
     */
    public Builder() {
    }

    /**
     * Instantiates a new builder with required properties.
     *
     * @param text the text
     */
    public Builder(String text) {
      this.text = text;
    }

    /**
     * Builds a InputData.
     *
     * @return the inputData
     */
    public InputData build() {
      return new InputData(this);
    }

    /**
     * Set the text.
     *
     * @param text the text
     * @return the InputData builder
     */
    public Builder text(String text) {
      this.text = text;
      return this;
    }
  }

  private InputData(Builder builder) {
    Validator.notNull(builder.text, "text cannot be null");
    setText(builder.text);
  }
}

@@ -665,759 +665,248 @@
 ort 
-java.lang.reflect.Type;%0A%0Aimport com.google.gson.reflect.TypeToken;%0Aimport com.ibm.watson.developer_cloud.service.model.DynamicModel;%0Aimport com.ibm.watson.developer_cloud.util.GsonSerializationHelper;%0Aimport com.ibm.watson.developer_cloud.util.Validator;%0A%0A/**%0A * An input object that includes the input text.%0A */%0Apublic class InputData extends DynamicModel %7B%0A  private Type textType = new TypeToken%3CString%3E() %7B%0A  %7D.getType();%0A%0A  /**%0A   * Gets the text.%0A   *%0A   * @return the text%0A   */%0A  public String text() %7B%0A    return GsonSerializationHelper.serializeDynamicModelProperty(this.get(%22text%22), textType);%0A  %7D%0A%0A  /**%0A   * Sets the text.%0A   *%0A   * @param text the new text%0A   */%0A  public void setText(final String text) %7B%0A    this.put(%22text%22, text);%0A  %7D
+com.ibm.watson.developer_cloud.service.model.GenericModel;%0Aimport com.ibm.watson.developer_cloud.util.Validator;%0A%0A/**%0A * An input object that includes the input text.%0A */%0Apublic class InputData extends GenericModel %7B%0A%0A  private String text;
 %0A%0A  
@@ -1057,18 +1057,16 @@
 ata.text
-()
 ;%0A    %7D%0A
@@ -1783,29 +1783,430 @@
     
-setText(builder.text)
+text = builder.text;%0A  %7D%0A%0A  /**%0A   * New builder.%0A   *%0A   * @return a InputData builder%0A   */%0A  public Builder newBuilder() %7B%0A    return new Builder(this);%0A  %7D%0A%0A  /**%0A   * Gets the text.%0A   *%0A   * The text of the user input. This string cannot contain carriage return, newline, or tab characters, and it must be%0A   * no longer than 2048 characters.%0A   *%0A   * @return the text%0A   */%0A  public String text() %7B%0A    return text
 ;%0A  

Revert "fix(Assistant v1): Make InputData model dynamic"