/*
 * Michelin North America Order-to-Cash APIs
 * These APIs will help you to do business transactions with Michelin.  <br><br><b>Authentication details:</b><br> <br><u>Option A:</u> OAuth2 Client Credentials (recommended) <br><u>Option B:</u> API Key + Basic Authentication (not recommended) <br><br>To request your access, please contact your representative. <br><br>Our services are based on the EDIWHEEL standards. <br>You can find more information on the <a href=\"https://www.ediwheel.com/\" target=\"_blank\">EDIWHEEL website</a>. 
 *
 * The version of the OpenAPI document: 1.0.1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.michelin.adk.amn.o2c.model;

import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.michelin.adk.amn.o2c.model.EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerBackorderedQuantity;
import com.michelin.adk.amn.o2c.model.EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerCancelledQuantity;
import com.michelin.adk.amn.o2c.model.EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerConfirmedQuantity;
import com.michelin.adk.amn.o2c.model.EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerOpenQuantity;
import com.michelin.adk.amn.o2c.model.EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerScheduledQuantity;
import com.michelin.adk.amn.o2c.model.EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerShippedDetails;
import java.io.IOException;
import java.util.Arrays;
import org.openapitools.jackson.nullable.JsonNullable;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.michelin.adk.amn.JSON;

/**
 * EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0")
public class EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner {
  public static final String SERIALIZED_NAME_DELIVERY_DATE = "deliveryDate";
  @SerializedName(SERIALIZED_NAME_DELIVERY_DATE)
  @javax.annotation.Nonnull
  private String deliveryDate;

  public static final String SERIALIZED_NAME_DELIVERY_TIME = "deliveryTime";
  @SerializedName(SERIALIZED_NAME_DELIVERY_TIME)
  @javax.annotation.Nullable
  private String deliveryTime;

  public static final String SERIALIZED_NAME_CONFIRMED_QUANTITY = "confirmedQuantity";
  @SerializedName(SERIALIZED_NAME_CONFIRMED_QUANTITY)
  @javax.annotation.Nullable
  private EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerConfirmedQuantity confirmedQuantity;

  public static final String SERIALIZED_NAME_BACKORDERED_QUANTITY = "backorderedQuantity";
  @SerializedName(SERIALIZED_NAME_BACKORDERED_QUANTITY)
  @javax.annotation.Nullable
  private EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerBackorderedQuantity backorderedQuantity;

  public static final String SERIALIZED_NAME_CANCELLED_QUANTITY = "cancelledQuantity";
  @SerializedName(SERIALIZED_NAME_CANCELLED_QUANTITY)
  @javax.annotation.Nullable
  private EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerCancelledQuantity cancelledQuantity;

  public static final String SERIALIZED_NAME_SCHEDULED_QUANTITY = "scheduledQuantity";
  @SerializedName(SERIALIZED_NAME_SCHEDULED_QUANTITY)
  @javax.annotation.Nullable
  private EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerScheduledQuantity scheduledQuantity;

  public static final String SERIALIZED_NAME_OPEN_QUANTITY = "openQuantity";
  @SerializedName(SERIALIZED_NAME_OPEN_QUANTITY)
  @javax.annotation.Nullable
  private EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerOpenQuantity openQuantity;

  public static final String SERIALIZED_NAME_SHIPPED_DETAILS = "shippedDetails";
  @SerializedName(SERIALIZED_NAME_SHIPPED_DETAILS)
  @javax.annotation.Nullable
  private EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerShippedDetails shippedDetails;

  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner() {
  }

  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner deliveryDate(@javax.annotation.Nonnull String deliveryDate) {
    this.deliveryDate = deliveryDate;
    return this;
  }

  /**
   * Expected delivery date (where available). Dates of 9999-09-09 or 9999-12-31 would indicate NO Scheduled Delivery Date currently available for open and backordered quantities.
   * @return deliveryDate
   */
  @javax.annotation.Nonnull
  public String getDeliveryDate() {
    return deliveryDate;
  }

  public void setDeliveryDate(@javax.annotation.Nonnull String deliveryDate) {
    this.deliveryDate = deliveryDate;
  }


  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner deliveryTime(@javax.annotation.Nullable String deliveryTime) {
    this.deliveryTime = deliveryTime;
    return this;
  }

  /**
   * Get deliveryTime
   * @return deliveryTime
   */
  @javax.annotation.Nullable
  public String getDeliveryTime() {
    return deliveryTime;
  }

  public void setDeliveryTime(@javax.annotation.Nullable String deliveryTime) {
    this.deliveryTime = deliveryTime;
  }


  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner confirmedQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerConfirmedQuantity confirmedQuantity) {
    this.confirmedQuantity = confirmedQuantity;
    return this;
  }

  /**
   * Get confirmedQuantity
   * @return confirmedQuantity
   */
  @javax.annotation.Nullable
  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerConfirmedQuantity getConfirmedQuantity() {
    return confirmedQuantity;
  }

  public void setConfirmedQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerConfirmedQuantity confirmedQuantity) {
    this.confirmedQuantity = confirmedQuantity;
  }


  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner backorderedQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerBackorderedQuantity backorderedQuantity) {
    this.backorderedQuantity = backorderedQuantity;
    return this;
  }

  /**
   * Get backorderedQuantity
   * @return backorderedQuantity
   */
  @javax.annotation.Nullable
  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerBackorderedQuantity getBackorderedQuantity() {
    return backorderedQuantity;
  }

  public void setBackorderedQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerBackorderedQuantity backorderedQuantity) {
    this.backorderedQuantity = backorderedQuantity;
  }


  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner cancelledQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerCancelledQuantity cancelledQuantity) {
    this.cancelledQuantity = cancelledQuantity;
    return this;
  }

  /**
   * Get cancelledQuantity
   * @return cancelledQuantity
   */
  @javax.annotation.Nullable
  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerCancelledQuantity getCancelledQuantity() {
    return cancelledQuantity;
  }

  public void setCancelledQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerCancelledQuantity cancelledQuantity) {
    this.cancelledQuantity = cancelledQuantity;
  }


  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner scheduledQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerScheduledQuantity scheduledQuantity) {
    this.scheduledQuantity = scheduledQuantity;
    return this;
  }

  /**
   * Get scheduledQuantity
   * @return scheduledQuantity
   */
  @javax.annotation.Nullable
  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerScheduledQuantity getScheduledQuantity() {
    return scheduledQuantity;
  }

  public void setScheduledQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerScheduledQuantity scheduledQuantity) {
    this.scheduledQuantity = scheduledQuantity;
  }


  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner openQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerOpenQuantity openQuantity) {
    this.openQuantity = openQuantity;
    return this;
  }

  /**
   * Get openQuantity
   * @return openQuantity
   */
  @javax.annotation.Nullable
  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerOpenQuantity getOpenQuantity() {
    return openQuantity;
  }

  public void setOpenQuantity(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerOpenQuantity openQuantity) {
    this.openQuantity = openQuantity;
  }


  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner shippedDetails(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerShippedDetails shippedDetails) {
    this.shippedDetails = shippedDetails;
    return this;
  }

  /**
   * Get shippedDetails
   * @return shippedDetails
   */
  @javax.annotation.Nullable
  public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerShippedDetails getShippedDetails() {
    return shippedDetails;
  }

  public void setShippedDetails(@javax.annotation.Nullable EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerShippedDetails shippedDetails) {
    this.shippedDetails = shippedDetails;
  }



  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner = (EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner) o;
    return Objects.equals(this.deliveryDate, edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.deliveryDate) &&
        Objects.equals(this.deliveryTime, edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.deliveryTime) &&
        Objects.equals(this.confirmedQuantity, edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.confirmedQuantity) &&
        Objects.equals(this.backorderedQuantity, edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.backorderedQuantity) &&
        Objects.equals(this.cancelledQuantity, edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.cancelledQuantity) &&
        Objects.equals(this.scheduledQuantity, edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.scheduledQuantity) &&
        Objects.equals(this.openQuantity, edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.openQuantity) &&
        Objects.equals(this.shippedDetails, edIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.shippedDetails);
  }

  private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
    return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
  }

  @Override
  public int hashCode() {
    return Objects.hash(deliveryDate, deliveryTime, confirmedQuantity, backorderedQuantity, cancelledQuantity, scheduledQuantity, openQuantity, shippedDetails);
  }

  private static <T> int hashCodeNullable(JsonNullable<T> a) {
    if (a == null) {
      return 1;
    }
    return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner {\n");
    sb.append("    deliveryDate: ").append(toIndentedString(deliveryDate)).append("\n");
    sb.append("    deliveryTime: ").append(toIndentedString(deliveryTime)).append("\n");
    sb.append("    confirmedQuantity: ").append(toIndentedString(confirmedQuantity)).append("\n");
    sb.append("    backorderedQuantity: ").append(toIndentedString(backorderedQuantity)).append("\n");
    sb.append("    cancelledQuantity: ").append(toIndentedString(cancelledQuantity)).append("\n");
    sb.append("    scheduledQuantity: ").append(toIndentedString(scheduledQuantity)).append("\n");
    sb.append("    openQuantity: ").append(toIndentedString(openQuantity)).append("\n");
    sb.append("    shippedDetails: ").append(toIndentedString(shippedDetails)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }


  public static HashSet<String> openapiFields;
  public static HashSet<String> openapiRequiredFields;

  static {
    // a set of all properties/fields (JSON key names)
    openapiFields = new HashSet<String>();
    openapiFields.add("deliveryDate");
    openapiFields.add("deliveryTime");
    openapiFields.add("confirmedQuantity");
    openapiFields.add("backorderedQuantity");
    openapiFields.add("cancelledQuantity");
    openapiFields.add("scheduledQuantity");
    openapiFields.add("openQuantity");
    openapiFields.add("shippedDetails");

    // a set of required properties/fields (JSON key names)
    openapiRequiredFields = new HashSet<String>();
    openapiRequiredFields.add("deliveryDate");
  }

  /**
   * Validates the JSON Element and throws an exception if issues found
   *
   * @param jsonElement JSON Element
   * @throws IOException if the JSON Element is invalid with respect to EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner
   */
  public static void validateJsonElement(JsonElement jsonElement) throws IOException {
      if (jsonElement == null) {
        if (!EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
          throw new IllegalArgumentException(String.format("The required field(s) %s in EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner is not found in the empty JSON string", EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.openapiRequiredFields.toString()));
        }
      }

      Set<Map.Entry<String, JsonElement>> entries = jsonElement.getAsJsonObject().entrySet();
      // check to see if the JSON string contains additional fields
      for (Map.Entry<String, JsonElement> entry : entries) {
        if (!EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.openapiFields.contains(entry.getKey())) {
          throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
        }
      }

      // check to make sure all required properties/fields are present in the JSON string
      for (String requiredField : EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.openapiRequiredFields) {
        if (jsonElement.getAsJsonObject().get(requiredField) == null) {
          throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
        }
      }
        JsonObject jsonObj = jsonElement.getAsJsonObject();
      if (!jsonObj.get("deliveryDate").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `deliveryDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryDate").toString()));
      }
      if ((jsonObj.get("deliveryTime") != null && !jsonObj.get("deliveryTime").isJsonNull()) && !jsonObj.get("deliveryTime").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `deliveryTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deliveryTime").toString()));
      }
      // validate the optional field `confirmedQuantity`
      if (jsonObj.get("confirmedQuantity") != null && !jsonObj.get("confirmedQuantity").isJsonNull()) {
        EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerConfirmedQuantity.validateJsonElement(jsonObj.get("confirmedQuantity"));
      }
      // validate the optional field `backorderedQuantity`
      if (jsonObj.get("backorderedQuantity") != null && !jsonObj.get("backorderedQuantity").isJsonNull()) {
        EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerBackorderedQuantity.validateJsonElement(jsonObj.get("backorderedQuantity"));
      }
      // validate the optional field `cancelledQuantity`
      if (jsonObj.get("cancelledQuantity") != null && !jsonObj.get("cancelledQuantity").isJsonNull()) {
        EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerCancelledQuantity.validateJsonElement(jsonObj.get("cancelledQuantity"));
      }
      // validate the optional field `scheduledQuantity`
      if (jsonObj.get("scheduledQuantity") != null && !jsonObj.get("scheduledQuantity").isJsonNull()) {
        EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerScheduledQuantity.validateJsonElement(jsonObj.get("scheduledQuantity"));
      }
      // validate the optional field `openQuantity`
      if (jsonObj.get("openQuantity") != null && !jsonObj.get("openQuantity").isJsonNull()) {
        EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerOpenQuantity.validateJsonElement(jsonObj.get("openQuantity"));
      }
      // validate the optional field `shippedDetails`
      if (jsonObj.get("shippedDetails") != null && !jsonObj.get("shippedDetails").isJsonNull()) {
        EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInnerShippedDetails.validateJsonElement(jsonObj.get("shippedDetails"));
      }
  }

  public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
    @SuppressWarnings("unchecked")
    @Override
    public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
       if (!EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.class.isAssignableFrom(type.getRawType())) {
         return null; // this class only serializes 'EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner' and its subtypes
       }
       final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
       final TypeAdapter<EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner> thisAdapter
                        = gson.getDelegateAdapter(this, TypeToken.get(EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.class));

       return (TypeAdapter<T>) new TypeAdapter<EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner>() {
           @Override
           public void write(JsonWriter out, EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner value) throws IOException {
             JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
             elementAdapter.write(out, obj);
           }

           @Override
           public EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner read(JsonReader in) throws IOException {
             JsonElement jsonElement = elementAdapter.read(in);
             validateJsonElement(jsonElement);
             return thisAdapter.fromJsonTree(jsonElement);
           }

       }.nullSafe();
    }
  }

  /**
   * Create an instance of EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner
   * @throws IOException if the JSON string is invalid with respect to EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner
   */
  public static EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner fromJson(String jsonString) throws IOException {
    return JSON.getGson().fromJson(jsonString, EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner.class);
  }

  /**
   * Convert an instance of EDIWheelC11OrderStatusResponseReferencedOrderInnerOrderLineInnerOrderedArticleScheduleDetailsInner to an JSON string
   *
   * @return JSON string
   */
  public String toJson() {
    return JSON.getGson().toJson(this);
  }
}

