package androidx.credentials; import android.os.Bundle; import androidx.annotation.RestrictTo; import androidx.credentials.exceptions.CreateCredentialUnknownException; import androidx.credentials.internal.RequestValidationHelper; import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.Intrinsics; /* loaded from: classes.dex */ public final class CreateRestoreCredentialResponse extends CreateCredentialResponse { public static final String BUNDLE_KEY_CREATE_RESTORE_CREDENTIAL_RESPONSE = "androidx.credentials.BUNDLE_KEY_CREATE_RESTORE_CREDENTIAL_RESPONSE"; public static final Companion Companion = new Companion(null); private final String responseJson; public /* synthetic */ CreateRestoreCredentialResponse(String str, Bundle bundle, DefaultConstructorMarker defaultConstructorMarker) { this(str, bundle); } @RestrictTo({RestrictTo.Scope.LIBRARY_GROUP}) public static final CreateRestoreCredentialResponse createFrom(Bundle bundle) { return Companion.createFrom(bundle); } public final String getResponseJson() { return this.responseJson; } private CreateRestoreCredentialResponse(String str, Bundle bundle) { super(RestoreCredential.TYPE_RESTORE_CREDENTIAL, bundle); this.responseJson = str; if (!RequestValidationHelper.Companion.isValidJSON(str)) { throw new IllegalArgumentException("registrationResponseJson must not be empty, and must be a valid JSON".toString()); } } /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */ public CreateRestoreCredentialResponse(String responseJson) { this(responseJson, Companion.toBundle$credentials_release(responseJson)); Intrinsics.checkNotNullParameter(responseJson, "responseJson"); } public static final class Companion { public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { this(); } private Companion() { } @RestrictTo({RestrictTo.Scope.LIBRARY_GROUP}) public final CreateRestoreCredentialResponse createFrom(Bundle data) { Intrinsics.checkNotNullParameter(data, "data"); String string = data.getString(CreateRestoreCredentialResponse.BUNDLE_KEY_CREATE_RESTORE_CREDENTIAL_RESPONSE); if (string == null) { throw new CreateCredentialUnknownException("The response bundle did not contain the response data. This should not happen."); } return new CreateRestoreCredentialResponse(string, data, null); } public final Bundle toBundle$credentials_release(String responseJson) { Intrinsics.checkNotNullParameter(responseJson, "responseJson"); Bundle bundle = new Bundle(); bundle.putString(CreateRestoreCredentialResponse.BUNDLE_KEY_CREATE_RESTORE_CREDENTIAL_RESPONSE, responseJson); return bundle; } } }