package com.discord.api.guildjoinrequest; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import d0.z.d.m; import java.util.Locale; import java.util.Objects; /* compiled from: ApplicationStatus.kt */ public final class ApplicationStatusTypeAdapter extends TypeAdapter { /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX WARNING: Code restructure failed: missing block: B:11:0x0030, code lost: if (r2.equals("PENDING") != false) goto L_0x003b; */ /* JADX WARNING: Code restructure failed: missing block: B:13:0x0039, code lost: if (r2.equals("SUBMITTED") != false) goto L_0x003b; */ /* JADX WARNING: Code restructure failed: missing block: B:22:?, code lost: return com.discord.api.guildjoinrequest.ApplicationStatus.PENDING; */ @Override // com.google.gson.TypeAdapter public ApplicationStatus read(JsonReader jsonReader) { m.checkNotNullParameter(jsonReader, "in"); String J = jsonReader.J(); if (J != null) { switch (J.hashCode()) { case -1179202463: if (J.equals("STARTED")) { return ApplicationStatus.STARTED; } break; case -1159694117: break; case 35394935: break; case 174130302: if (J.equals("REJECTED")) { return ApplicationStatus.REJECTED; } break; case 1967871671: if (J.equals("APPROVED")) { return ApplicationStatus.APPROVED; } break; } } return ApplicationStatus.UNKNOWN; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.google.gson.stream.JsonWriter, java.lang.Object] */ @Override // com.google.gson.TypeAdapter public void write(JsonWriter jsonWriter, ApplicationStatus applicationStatus) { ApplicationStatus applicationStatus2 = applicationStatus; m.checkNotNullParameter(jsonWriter, "out"); if (applicationStatus2 != null) { String name = applicationStatus2.name(); Locale locale = Locale.ROOT; m.checkNotNullExpressionValue(locale, "Locale.ROOT"); Objects.requireNonNull(name, "null cannot be cast to non-null type java.lang.String"); String upperCase = name.toUpperCase(locale); m.checkNotNullExpressionValue(upperCase, "(this as java.lang.String).toUpperCase(locale)"); jsonWriter.H(upperCase); return; } jsonWriter.s(); } }