package com.example.navtestapp

import android.os.Bundle
import androidx.navigation.NavArgs
import java.lang.IllegalArgumentException
import kotlin.String
import kotlin.jvm.JvmStatic

data class MyNewDialogWithAVeryLongNameToTriggerAnErrorArgs(
  val veryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError: String?,
  val secondVeryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError: String?
) : NavArgs {
  fun toBundle(): Bundle {
    val result = Bundle()
    result.putString("very_large_name_for argument_in_my_new_dialog_widget_for_trigger_an_error",
        this.veryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError)
    result.putString("second_very_large_name_for argument_in_my_new_dialog_widget_for_trigger_an_error",
        this.secondVeryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError)
    return result
  }

  companion object {
    @JvmStatic
    fun fromBundle(bundle: Bundle): MyNewDialogWithAVeryLongNameToTriggerAnErrorArgs {
      bundle.setClassLoader(MyNewDialogWithAVeryLongNameToTriggerAnErrorArgs::class.java.classLoader)
      val __veryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError : String?
      if
          (bundle.containsKey("very_large_name_for argument_in_my_new_dialog_widget_for_trigger_an_error")) {
        __veryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError =
            bundle.getString("very_large_name_for argument_in_my_new_dialog_widget_for_trigger_an_error")
      } else {
        throw IllegalArgumentException("Required argument \"very_large_name_for argument_in_my_new_dialog_widget_for_trigger_an_error\" is missing and does not have an android:defaultValue")
      }
      val __secondVeryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError : String?
      if
          (bundle.containsKey("second_very_large_name_for argument_in_my_new_dialog_widget_for_trigger_an_error")) {
        __secondVeryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError =
            bundle.getString("second_very_large_name_for argument_in_my_new_dialog_widget_for_trigger_an_error")
      } else {
        throw IllegalArgumentException("Required argument \"second_very_large_name_for argument_in_my_new_dialog_widget_for_trigger_an_error\" is missing and does not have an android:defaultValue")
      }
      return
          MyNewDialogWithAVeryLongNameToTriggerAnErrorArgs(__veryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError,
          __secondVeryLargeNameForArgumentInMyNewDialogWidgetForTriggerAnError)
    }
  }
}
