```android import com.google.gson.annotations.SerializedName data class PostModel( @if(count($route['cleanBodyParameters'])) @foreach($route['bodyParameters'] as $attribute => $parameter) @if($parameter['type'] == "string" && strpos($attribute, '*') == false) @field:SerializedName("{{$attribute}}") val {{ \Illuminate\Support\Str::camel($attribute)}}: {{ "String" }}? = null, @elseif($parameter['type'] == "integer" && strpos($attribute, '*') == false) @field:SerializedName("{{$attribute}}") val {{ \Illuminate\Support\Str::camel($attribute)}}: {{ "Int" }}? = null, @elseif($parameter['type'] == "enum" && strpos($attribute, '*') == false) @field:SerializedName("{{$attribute}}") val {{ \Illuminate\Support\Str::camel($attribute)}}: {{ "String" }}? = null, @endif @endforeach @endif ) const val BASEURL = "{{ $baseUrl }}/" class ApiClient { companion object{ private var retrofit:Retrofit?=null fun getApiClient(): Retrofit { val gson = GsonBuilder() .setLenient() .create() val okHttpClient = OkHttpClient.Builder() .readTimeout(100, TimeUnit.SECONDS) .connectTimeout(100, TimeUnit.SECONDS) .build() if (retrofit == null) { retrofit = Retrofit.Builder() .baseUrl(BASEURL) .client(okHttpClient) .addConverterFactory(GsonConverterFactory.create(gson)) .build() } return retrofit!! } } } interface ApiInterface { @foreach($route['methods'] as $method) {{"@".$method}}("{{ ltrim($route['uri'], '/') }}") fun getResponse(): Call> @endforeach } fun getResponse():LiveData>{ val data = MutableLiveData>() apiInterface?.getResponse()?.enqueue(object : Callback>{ override fun onFailure(call: Call>, t: Throwable) { data.value = null } override fun onResponse( call: Call>, response: Response> ) { val res = response.body() if (response.code() == 200 && res!=null){ data.value = res }else{ data.value = null } } }) return data } ```