com.bugsnag.android.gradle.AndroidManifestInfoJsonAdapter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bugsnag-android-gradle-plugin Show documentation
Show all versions of bugsnag-android-gradle-plugin Show documentation
Gradle plugin to automatically upload ProGuard mapping files to Bugsnag.
The newest version!
// Code generated by moshi-kotlin-codegen. Do not edit.
@file:Suppress("DEPRECATION", "unused", "ClassName", "REDUNDANT_PROJECTION",
"RedundantExplicitType", "LocalVariableName", "RedundantVisibilityModifier",
"PLATFORM_CLASS_MAPPED_TO_KOTLIN", "IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION")
package com.bugsnag.android.gradle
import com.squareup.moshi.JsonAdapter
import com.squareup.moshi.JsonReader
import com.squareup.moshi.JsonWriter
import com.squareup.moshi.Moshi
import com.squareup.moshi.`internal`.Util
import java.lang.NullPointerException
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.emptySet
import kotlin.text.buildString
public class AndroidManifestInfoJsonAdapter(
moshi: Moshi,
) : JsonAdapter() {
private val options: JsonReader.Options = JsonReader.Options.of("apiKey", "versionCode",
"buildUUID", "versionName", "applicationId", "metaVersionCode", "metaVersionName")
private val stringAdapter: JsonAdapter = moshi.adapter(String::class.java, emptySet(),
"apiKey")
private val nullableStringAdapter: JsonAdapter = moshi.adapter(String::class.java,
emptySet(), "metaVersionCode")
public override fun toString(): String = buildString(41) {
append("GeneratedJsonAdapter(").append("AndroidManifestInfo").append(')') }
public override fun fromJson(reader: JsonReader): AndroidManifestInfo {
var apiKey: String? = null
var versionCode: String? = null
var buildUUID: String? = null
var versionName: String? = null
var applicationId: String? = null
var metaVersionCode: String? = null
var metaVersionName: String? = null
reader.beginObject()
while (reader.hasNext()) {
when (reader.selectName(options)) {
0 -> apiKey = stringAdapter.fromJson(reader) ?: throw Util.unexpectedNull("apiKey",
"apiKey", reader)
1 -> versionCode = stringAdapter.fromJson(reader) ?:
throw Util.unexpectedNull("versionCode", "versionCode", reader)
2 -> buildUUID = stringAdapter.fromJson(reader) ?: throw Util.unexpectedNull("buildUUID",
"buildUUID", reader)
3 -> versionName = stringAdapter.fromJson(reader) ?:
throw Util.unexpectedNull("versionName", "versionName", reader)
4 -> applicationId = stringAdapter.fromJson(reader) ?:
throw Util.unexpectedNull("applicationId", "applicationId", reader)
5 -> metaVersionCode = nullableStringAdapter.fromJson(reader)
6 -> metaVersionName = nullableStringAdapter.fromJson(reader)
-1 -> {
// Unknown name, skip it.
reader.skipName()
reader.skipValue()
}
}
}
reader.endObject()
return AndroidManifestInfo(
apiKey = apiKey ?: throw Util.missingProperty("apiKey", "apiKey", reader),
versionCode = versionCode ?: throw Util.missingProperty("versionCode", "versionCode",
reader),
buildUUID = buildUUID ?: throw Util.missingProperty("buildUUID", "buildUUID", reader),
versionName = versionName ?: throw Util.missingProperty("versionName", "versionName",
reader),
applicationId = applicationId ?: throw Util.missingProperty("applicationId",
"applicationId", reader),
metaVersionCode = metaVersionCode,
metaVersionName = metaVersionName
)
}
public override fun toJson(writer: JsonWriter, value_: AndroidManifestInfo?): Unit {
if (value_ == null) {
throw NullPointerException("value_ was null! Wrap in .nullSafe() to write nullable values.")
}
writer.beginObject()
writer.name("apiKey")
stringAdapter.toJson(writer, value_.apiKey)
writer.name("versionCode")
stringAdapter.toJson(writer, value_.versionCode)
writer.name("buildUUID")
stringAdapter.toJson(writer, value_.buildUUID)
writer.name("versionName")
stringAdapter.toJson(writer, value_.versionName)
writer.name("applicationId")
stringAdapter.toJson(writer, value_.applicationId)
writer.name("metaVersionCode")
nullableStringAdapter.toJson(writer, value_.metaVersionCode)
writer.name("metaVersionName")
nullableStringAdapter.toJson(writer, value_.metaVersionName)
writer.endObject()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy