/*
 * Lethean Blockchain API
 * OpenAPI for Lethean Blockchain
 *
 * The version of the OpenAPI document: 6.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 org.openapitools.client.model;

import java.util.Objects;
import java.util.Locale;
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 java.io.IOException;
import java.util.Arrays;

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 java.util.Locale;

import invalidPackageName.JSON;

/**
 * BlockProcessingPerformanceModel
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-10-19T15:35:02.750468+01:00[Europe/London]", comments = "Generator version: 7.16.0")
public class BlockProcessingPerformanceModel {
  public static final String SERIALIZED_NAME_BLOCK_PROCESSING_TIME0 = "block_processing_time_0";
  @SerializedName(SERIALIZED_NAME_BLOCK_PROCESSING_TIME0)
  @javax.annotation.Nullable
  private Integer blockProcessingTime0;

  public static final String SERIALIZED_NAME_BLOCK_PROCESSING_TIME1 = "block_processing_time_1";
  @SerializedName(SERIALIZED_NAME_BLOCK_PROCESSING_TIME1)
  @javax.annotation.Nullable
  private Integer blockProcessingTime1;

  public static final String SERIALIZED_NAME_TARGET_CALCULATING_TIME2 = "target_calculating_time_2";
  @SerializedName(SERIALIZED_NAME_TARGET_CALCULATING_TIME2)
  @javax.annotation.Nullable
  private Integer targetCalculatingTime2;

  public static final String SERIALIZED_NAME_LONGHASH_CALCULATING_TIME3 = "longhash_calculating_time_3";
  @SerializedName(SERIALIZED_NAME_LONGHASH_CALCULATING_TIME3)
  @javax.annotation.Nullable
  private Integer longhashCalculatingTime3;

  public static final String SERIALIZED_NAME_ALL_TXS_INSERT_TIME5 = "all_txs_insert_time_5";
  @SerializedName(SERIALIZED_NAME_ALL_TXS_INSERT_TIME5)
  @javax.annotation.Nullable
  private Integer allTxsInsertTime5;

  public static final String SERIALIZED_NAME_ETC_STUFF6 = "etc_stuff_6";
  @SerializedName(SERIALIZED_NAME_ETC_STUFF6)
  @javax.annotation.Nullable
  private Integer etcStuff6;

  public static final String SERIALIZED_NAME_INSERT_TIME4 = "insert_time_4";
  @SerializedName(SERIALIZED_NAME_INSERT_TIME4)
  @javax.annotation.Nullable
  private Integer insertTime4;

  public static final String SERIALIZED_NAME_RAISE_BLOCK_CORE_EVENT = "raise_block_core_event";
  @SerializedName(SERIALIZED_NAME_RAISE_BLOCK_CORE_EVENT)
  @javax.annotation.Nullable
  private Integer raiseBlockCoreEvent;

  public static final String SERIALIZED_NAME_VALIDATE_MINER_TRANSACTION_TIME = "validate_miner_transaction_time";
  @SerializedName(SERIALIZED_NAME_VALIDATE_MINER_TRANSACTION_TIME)
  @javax.annotation.Nullable
  private Integer validateMinerTransactionTime;

  public static final String SERIALIZED_NAME_COLLECT_RANGEPROOFS_DATA_FROM_TX_TIME = "collect_rangeproofs_data_from_tx_time";
  @SerializedName(SERIALIZED_NAME_COLLECT_RANGEPROOFS_DATA_FROM_TX_TIME)
  @javax.annotation.Nullable
  private Integer collectRangeproofsDataFromTxTime;

  public static final String SERIALIZED_NAME_VERIFY_MULTIPLE_ZC_OUTS_RANGE_PROOFS_TIME = "verify_multiple_zc_outs_range_proofs_time";
  @SerializedName(SERIALIZED_NAME_VERIFY_MULTIPLE_ZC_OUTS_RANGE_PROOFS_TIME)
  @javax.annotation.Nullable
  private Integer verifyMultipleZcOutsRangeProofsTime;

  public static final String SERIALIZED_NAME_TARGET_CALCULATING_ENUM_BLOCKS = "target_calculating_enum_blocks";
  @SerializedName(SERIALIZED_NAME_TARGET_CALCULATING_ENUM_BLOCKS)
  @javax.annotation.Nullable
  private Integer targetCalculatingEnumBlocks;

  public static final String SERIALIZED_NAME_TARGET_CALCULATING_CALC = "target_calculating_calc";
  @SerializedName(SERIALIZED_NAME_TARGET_CALCULATING_CALC)
  @javax.annotation.Nullable
  private Integer targetCalculatingCalc;

  public static final String SERIALIZED_NAME_POS_VALIDATE_KI_SEARCH = "pos_validate_ki_search";
  @SerializedName(SERIALIZED_NAME_POS_VALIDATE_KI_SEARCH)
  @javax.annotation.Nullable
  private Integer posValidateKiSearch;

  public static final String SERIALIZED_NAME_POS_VALIDATE_GET_OUT_KEYS_FOR_INPUTS = "pos_validate_get_out_keys_for_inputs";
  @SerializedName(SERIALIZED_NAME_POS_VALIDATE_GET_OUT_KEYS_FOR_INPUTS)
  @javax.annotation.Nullable
  private Integer posValidateGetOutKeysForInputs;

  public static final String SERIALIZED_NAME_POS_VALIDATE_ZVP = "pos_validate_zvp";
  @SerializedName(SERIALIZED_NAME_POS_VALIDATE_ZVP)
  @javax.annotation.Nullable
  private Integer posValidateZvp;

  public BlockProcessingPerformanceModel() {
  }

  public BlockProcessingPerformanceModel blockProcessingTime0(@javax.annotation.Nullable Integer blockProcessingTime0) {
    this.blockProcessingTime0 = blockProcessingTime0;
    return this;
  }

  /**
   * Get blockProcessingTime0
   * @return blockProcessingTime0
   */
  @javax.annotation.Nullable
  public Integer getBlockProcessingTime0() {
    return blockProcessingTime0;
  }

  public void setBlockProcessingTime0(@javax.annotation.Nullable Integer blockProcessingTime0) {
    this.blockProcessingTime0 = blockProcessingTime0;
  }


  public BlockProcessingPerformanceModel blockProcessingTime1(@javax.annotation.Nullable Integer blockProcessingTime1) {
    this.blockProcessingTime1 = blockProcessingTime1;
    return this;
  }

  /**
   * Get blockProcessingTime1
   * @return blockProcessingTime1
   */
  @javax.annotation.Nullable
  public Integer getBlockProcessingTime1() {
    return blockProcessingTime1;
  }

  public void setBlockProcessingTime1(@javax.annotation.Nullable Integer blockProcessingTime1) {
    this.blockProcessingTime1 = blockProcessingTime1;
  }


  public BlockProcessingPerformanceModel targetCalculatingTime2(@javax.annotation.Nullable Integer targetCalculatingTime2) {
    this.targetCalculatingTime2 = targetCalculatingTime2;
    return this;
  }

  /**
   * Get targetCalculatingTime2
   * @return targetCalculatingTime2
   */
  @javax.annotation.Nullable
  public Integer getTargetCalculatingTime2() {
    return targetCalculatingTime2;
  }

  public void setTargetCalculatingTime2(@javax.annotation.Nullable Integer targetCalculatingTime2) {
    this.targetCalculatingTime2 = targetCalculatingTime2;
  }


  public BlockProcessingPerformanceModel longhashCalculatingTime3(@javax.annotation.Nullable Integer longhashCalculatingTime3) {
    this.longhashCalculatingTime3 = longhashCalculatingTime3;
    return this;
  }

  /**
   * Get longhashCalculatingTime3
   * @return longhashCalculatingTime3
   */
  @javax.annotation.Nullable
  public Integer getLonghashCalculatingTime3() {
    return longhashCalculatingTime3;
  }

  public void setLonghashCalculatingTime3(@javax.annotation.Nullable Integer longhashCalculatingTime3) {
    this.longhashCalculatingTime3 = longhashCalculatingTime3;
  }


  public BlockProcessingPerformanceModel allTxsInsertTime5(@javax.annotation.Nullable Integer allTxsInsertTime5) {
    this.allTxsInsertTime5 = allTxsInsertTime5;
    return this;
  }

  /**
   * Get allTxsInsertTime5
   * @return allTxsInsertTime5
   */
  @javax.annotation.Nullable
  public Integer getAllTxsInsertTime5() {
    return allTxsInsertTime5;
  }

  public void setAllTxsInsertTime5(@javax.annotation.Nullable Integer allTxsInsertTime5) {
    this.allTxsInsertTime5 = allTxsInsertTime5;
  }


  public BlockProcessingPerformanceModel etcStuff6(@javax.annotation.Nullable Integer etcStuff6) {
    this.etcStuff6 = etcStuff6;
    return this;
  }

  /**
   * Get etcStuff6
   * @return etcStuff6
   */
  @javax.annotation.Nullable
  public Integer getEtcStuff6() {
    return etcStuff6;
  }

  public void setEtcStuff6(@javax.annotation.Nullable Integer etcStuff6) {
    this.etcStuff6 = etcStuff6;
  }


  public BlockProcessingPerformanceModel insertTime4(@javax.annotation.Nullable Integer insertTime4) {
    this.insertTime4 = insertTime4;
    return this;
  }

  /**
   * Get insertTime4
   * @return insertTime4
   */
  @javax.annotation.Nullable
  public Integer getInsertTime4() {
    return insertTime4;
  }

  public void setInsertTime4(@javax.annotation.Nullable Integer insertTime4) {
    this.insertTime4 = insertTime4;
  }


  public BlockProcessingPerformanceModel raiseBlockCoreEvent(@javax.annotation.Nullable Integer raiseBlockCoreEvent) {
    this.raiseBlockCoreEvent = raiseBlockCoreEvent;
    return this;
  }

  /**
   * Get raiseBlockCoreEvent
   * @return raiseBlockCoreEvent
   */
  @javax.annotation.Nullable
  public Integer getRaiseBlockCoreEvent() {
    return raiseBlockCoreEvent;
  }

  public void setRaiseBlockCoreEvent(@javax.annotation.Nullable Integer raiseBlockCoreEvent) {
    this.raiseBlockCoreEvent = raiseBlockCoreEvent;
  }


  public BlockProcessingPerformanceModel validateMinerTransactionTime(@javax.annotation.Nullable Integer validateMinerTransactionTime) {
    this.validateMinerTransactionTime = validateMinerTransactionTime;
    return this;
  }

  /**
   * Get validateMinerTransactionTime
   * @return validateMinerTransactionTime
   */
  @javax.annotation.Nullable
  public Integer getValidateMinerTransactionTime() {
    return validateMinerTransactionTime;
  }

  public void setValidateMinerTransactionTime(@javax.annotation.Nullable Integer validateMinerTransactionTime) {
    this.validateMinerTransactionTime = validateMinerTransactionTime;
  }


  public BlockProcessingPerformanceModel collectRangeproofsDataFromTxTime(@javax.annotation.Nullable Integer collectRangeproofsDataFromTxTime) {
    this.collectRangeproofsDataFromTxTime = collectRangeproofsDataFromTxTime;
    return this;
  }

  /**
   * Get collectRangeproofsDataFromTxTime
   * @return collectRangeproofsDataFromTxTime
   */
  @javax.annotation.Nullable
  public Integer getCollectRangeproofsDataFromTxTime() {
    return collectRangeproofsDataFromTxTime;
  }

  public void setCollectRangeproofsDataFromTxTime(@javax.annotation.Nullable Integer collectRangeproofsDataFromTxTime) {
    this.collectRangeproofsDataFromTxTime = collectRangeproofsDataFromTxTime;
  }


  public BlockProcessingPerformanceModel verifyMultipleZcOutsRangeProofsTime(@javax.annotation.Nullable Integer verifyMultipleZcOutsRangeProofsTime) {
    this.verifyMultipleZcOutsRangeProofsTime = verifyMultipleZcOutsRangeProofsTime;
    return this;
  }

  /**
   * Get verifyMultipleZcOutsRangeProofsTime
   * @return verifyMultipleZcOutsRangeProofsTime
   */
  @javax.annotation.Nullable
  public Integer getVerifyMultipleZcOutsRangeProofsTime() {
    return verifyMultipleZcOutsRangeProofsTime;
  }

  public void setVerifyMultipleZcOutsRangeProofsTime(@javax.annotation.Nullable Integer verifyMultipleZcOutsRangeProofsTime) {
    this.verifyMultipleZcOutsRangeProofsTime = verifyMultipleZcOutsRangeProofsTime;
  }


  public BlockProcessingPerformanceModel targetCalculatingEnumBlocks(@javax.annotation.Nullable Integer targetCalculatingEnumBlocks) {
    this.targetCalculatingEnumBlocks = targetCalculatingEnumBlocks;
    return this;
  }

  /**
   * Get targetCalculatingEnumBlocks
   * @return targetCalculatingEnumBlocks
   */
  @javax.annotation.Nullable
  public Integer getTargetCalculatingEnumBlocks() {
    return targetCalculatingEnumBlocks;
  }

  public void setTargetCalculatingEnumBlocks(@javax.annotation.Nullable Integer targetCalculatingEnumBlocks) {
    this.targetCalculatingEnumBlocks = targetCalculatingEnumBlocks;
  }


  public BlockProcessingPerformanceModel targetCalculatingCalc(@javax.annotation.Nullable Integer targetCalculatingCalc) {
    this.targetCalculatingCalc = targetCalculatingCalc;
    return this;
  }

  /**
   * Get targetCalculatingCalc
   * @return targetCalculatingCalc
   */
  @javax.annotation.Nullable
  public Integer getTargetCalculatingCalc() {
    return targetCalculatingCalc;
  }

  public void setTargetCalculatingCalc(@javax.annotation.Nullable Integer targetCalculatingCalc) {
    this.targetCalculatingCalc = targetCalculatingCalc;
  }


  public BlockProcessingPerformanceModel posValidateKiSearch(@javax.annotation.Nullable Integer posValidateKiSearch) {
    this.posValidateKiSearch = posValidateKiSearch;
    return this;
  }

  /**
   * Get posValidateKiSearch
   * @return posValidateKiSearch
   */
  @javax.annotation.Nullable
  public Integer getPosValidateKiSearch() {
    return posValidateKiSearch;
  }

  public void setPosValidateKiSearch(@javax.annotation.Nullable Integer posValidateKiSearch) {
    this.posValidateKiSearch = posValidateKiSearch;
  }


  public BlockProcessingPerformanceModel posValidateGetOutKeysForInputs(@javax.annotation.Nullable Integer posValidateGetOutKeysForInputs) {
    this.posValidateGetOutKeysForInputs = posValidateGetOutKeysForInputs;
    return this;
  }

  /**
   * Get posValidateGetOutKeysForInputs
   * @return posValidateGetOutKeysForInputs
   */
  @javax.annotation.Nullable
  public Integer getPosValidateGetOutKeysForInputs() {
    return posValidateGetOutKeysForInputs;
  }

  public void setPosValidateGetOutKeysForInputs(@javax.annotation.Nullable Integer posValidateGetOutKeysForInputs) {
    this.posValidateGetOutKeysForInputs = posValidateGetOutKeysForInputs;
  }


  public BlockProcessingPerformanceModel posValidateZvp(@javax.annotation.Nullable Integer posValidateZvp) {
    this.posValidateZvp = posValidateZvp;
    return this;
  }

  /**
   * Get posValidateZvp
   * @return posValidateZvp
   */
  @javax.annotation.Nullable
  public Integer getPosValidateZvp() {
    return posValidateZvp;
  }

  public void setPosValidateZvp(@javax.annotation.Nullable Integer posValidateZvp) {
    this.posValidateZvp = posValidateZvp;
  }



  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BlockProcessingPerformanceModel blockProcessingPerformanceModel = (BlockProcessingPerformanceModel) o;
    return Objects.equals(this.blockProcessingTime0, blockProcessingPerformanceModel.blockProcessingTime0) &&
        Objects.equals(this.blockProcessingTime1, blockProcessingPerformanceModel.blockProcessingTime1) &&
        Objects.equals(this.targetCalculatingTime2, blockProcessingPerformanceModel.targetCalculatingTime2) &&
        Objects.equals(this.longhashCalculatingTime3, blockProcessingPerformanceModel.longhashCalculatingTime3) &&
        Objects.equals(this.allTxsInsertTime5, blockProcessingPerformanceModel.allTxsInsertTime5) &&
        Objects.equals(this.etcStuff6, blockProcessingPerformanceModel.etcStuff6) &&
        Objects.equals(this.insertTime4, blockProcessingPerformanceModel.insertTime4) &&
        Objects.equals(this.raiseBlockCoreEvent, blockProcessingPerformanceModel.raiseBlockCoreEvent) &&
        Objects.equals(this.validateMinerTransactionTime, blockProcessingPerformanceModel.validateMinerTransactionTime) &&
        Objects.equals(this.collectRangeproofsDataFromTxTime, blockProcessingPerformanceModel.collectRangeproofsDataFromTxTime) &&
        Objects.equals(this.verifyMultipleZcOutsRangeProofsTime, blockProcessingPerformanceModel.verifyMultipleZcOutsRangeProofsTime) &&
        Objects.equals(this.targetCalculatingEnumBlocks, blockProcessingPerformanceModel.targetCalculatingEnumBlocks) &&
        Objects.equals(this.targetCalculatingCalc, blockProcessingPerformanceModel.targetCalculatingCalc) &&
        Objects.equals(this.posValidateKiSearch, blockProcessingPerformanceModel.posValidateKiSearch) &&
        Objects.equals(this.posValidateGetOutKeysForInputs, blockProcessingPerformanceModel.posValidateGetOutKeysForInputs) &&
        Objects.equals(this.posValidateZvp, blockProcessingPerformanceModel.posValidateZvp);
  }

  @Override
  public int hashCode() {
    return Objects.hash(blockProcessingTime0, blockProcessingTime1, targetCalculatingTime2, longhashCalculatingTime3, allTxsInsertTime5, etcStuff6, insertTime4, raiseBlockCoreEvent, validateMinerTransactionTime, collectRangeproofsDataFromTxTime, verifyMultipleZcOutsRangeProofsTime, targetCalculatingEnumBlocks, targetCalculatingCalc, posValidateKiSearch, posValidateGetOutKeysForInputs, posValidateZvp);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BlockProcessingPerformanceModel {\n");
    sb.append("    blockProcessingTime0: ").append(toIndentedString(blockProcessingTime0)).append("\n");
    sb.append("    blockProcessingTime1: ").append(toIndentedString(blockProcessingTime1)).append("\n");
    sb.append("    targetCalculatingTime2: ").append(toIndentedString(targetCalculatingTime2)).append("\n");
    sb.append("    longhashCalculatingTime3: ").append(toIndentedString(longhashCalculatingTime3)).append("\n");
    sb.append("    allTxsInsertTime5: ").append(toIndentedString(allTxsInsertTime5)).append("\n");
    sb.append("    etcStuff6: ").append(toIndentedString(etcStuff6)).append("\n");
    sb.append("    insertTime4: ").append(toIndentedString(insertTime4)).append("\n");
    sb.append("    raiseBlockCoreEvent: ").append(toIndentedString(raiseBlockCoreEvent)).append("\n");
    sb.append("    validateMinerTransactionTime: ").append(toIndentedString(validateMinerTransactionTime)).append("\n");
    sb.append("    collectRangeproofsDataFromTxTime: ").append(toIndentedString(collectRangeproofsDataFromTxTime)).append("\n");
    sb.append("    verifyMultipleZcOutsRangeProofsTime: ").append(toIndentedString(verifyMultipleZcOutsRangeProofsTime)).append("\n");
    sb.append("    targetCalculatingEnumBlocks: ").append(toIndentedString(targetCalculatingEnumBlocks)).append("\n");
    sb.append("    targetCalculatingCalc: ").append(toIndentedString(targetCalculatingCalc)).append("\n");
    sb.append("    posValidateKiSearch: ").append(toIndentedString(posValidateKiSearch)).append("\n");
    sb.append("    posValidateGetOutKeysForInputs: ").append(toIndentedString(posValidateGetOutKeysForInputs)).append("\n");
    sb.append("    posValidateZvp: ").append(toIndentedString(posValidateZvp)).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>(Arrays.asList("block_processing_time_0", "block_processing_time_1", "target_calculating_time_2", "longhash_calculating_time_3", "all_txs_insert_time_5", "etc_stuff_6", "insert_time_4", "raise_block_core_event", "validate_miner_transaction_time", "collect_rangeproofs_data_from_tx_time", "verify_multiple_zc_outs_range_proofs_time", "target_calculating_enum_blocks", "target_calculating_calc", "pos_validate_ki_search", "pos_validate_get_out_keys_for_inputs", "pos_validate_zvp"));

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

  /**
   * 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 BlockProcessingPerformanceModel
   */
  public static void validateJsonElement(JsonElement jsonElement) throws IOException {
      if (jsonElement == null) {
        if (!BlockProcessingPerformanceModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
          throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BlockProcessingPerformanceModel is not found in the empty JSON string", BlockProcessingPerformanceModel.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 (!BlockProcessingPerformanceModel.openapiFields.contains(entry.getKey())) {
          throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` in the JSON string is not defined in the `BlockProcessingPerformanceModel` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
        }
      }
        JsonObject jsonObj = jsonElement.getAsJsonObject();
  }

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

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

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

       }.nullSafe();
    }
  }

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

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

