mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-19 04:13:18 +01:00
735 lines
35 KiB
Java
735 lines
35 KiB
Java
package okhttp3;
|
|
|
|
import androidx.compose.runtime.BitVector$$ExternalSyntheticOutline0;
|
|
import com.amazon.alexa.assistant.transport.MissingTokenPull;
|
|
import com.amazon.alexa.ra.core.data.fragments.Content;
|
|
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
|
|
import java.io.Closeable;
|
|
import java.io.IOException;
|
|
import java.util.List;
|
|
import kotlin.Deprecated;
|
|
import kotlin.DeprecationLevel;
|
|
import kotlin.Metadata;
|
|
import kotlin.ReplaceWith;
|
|
import kotlin.collections.CollectionsKt;
|
|
import kotlin.jvm.JvmName;
|
|
import kotlin.jvm.JvmOverloads;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;
|
|
import okhttp3.Headers;
|
|
import okhttp3.internal.connection.Exchange;
|
|
import okhttp3.internal.http.HttpHeaders;
|
|
import okio.Buffer;
|
|
import okio.Buffer$$ExternalSyntheticBUOutline0;
|
|
import okio.BufferedSource;
|
|
import okio.Path$$ExternalSyntheticBUOutline0;
|
|
import okio.Source;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000p\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u000b\u0018\u00002\u00020\u0001:\u0001FB{\b\u0000\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\b\u001a\u00020\t\u0012\b\u0010\n\u001a\u0004\u0018\u00010\u000b\u0012\u0006\u0010\f\u001a\u00020\r\u0012\b\u0010\u000e\u001a\u0004\u0018\u00010\u000f\u0012\b\u0010\u0010\u001a\u0004\u0018\u00010\u0000\u0012\b\u0010\u0011\u001a\u0004\u0018\u00010\u0000\u0012\b\u0010\u0012\u001a\u0004\u0018\u00010\u0000\u0012\u0006\u0010\u0013\u001a\u00020\u0014\u0012\u0006\u0010\u0015\u001a\u00020\u0014\u0012\b\u0010\u0016\u001a\u0004\u0018\u00010\u0017¢\u0006\u0002\u0010\u0018J\u000f\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0007¢\u0006\u0002\b+J\r\u0010\u001a\u001a\u00020\u001bH\u0007¢\u0006\u0002\b,J\u000f\u0010\u0011\u001a\u0004\u0018\u00010\u0000H\u0007¢\u0006\u0002\b-J\f\u0010.\u001a\b\u0012\u0004\u0012\u0002000/J\b\u00101\u001a\u000202H\u0016J\r\u0010\b\u001a\u00020\tH\u0007¢\u0006\u0002\b3J\u000f\u0010\n\u001a\u0004\u0018\u00010\u000bH\u0007¢\u0006\u0002\b4J\u001e\u00105\u001a\u0004\u0018\u00010\u00072\u0006\u00106\u001a\u00020\u00072\n\b\u0002\u00107\u001a\u0004\u0018\u00010\u0007H\u0007J\r\u0010\f\u001a\u00020\rH\u0007¢\u0006\u0002\b8J\u0014\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u00070/2\u0006\u00106\u001a\u00020\u0007J\r\u0010\u0006\u001a\u00020\u0007H\u0007¢\u0006\u0002\b9J\u000f\u0010\u0010\u001a\u0004\u0018\u00010\u0000H\u0007¢\u0006\u0002\b:J\u0006\u0010;\u001a\u00020<J\u000e\u0010=\u001a\u00020\u000f2\u0006\u0010>\u001a\u00020\u0014J\u000f\u0010\u0012\u001a\u0004\u0018\u00010\u0000H\u0007¢\u0006\u0002\b?J\r\u0010\u0004\u001a\u00020\u0005H\u0007¢\u0006\u0002\b@J\r\u0010\u0015\u001a\u00020\u0014H\u0007¢\u0006\u0002\bAJ\r\u0010\u0002\u001a\u00020\u0003H\u0007¢\u0006\u0002\bBJ\r\u0010\u0013\u001a\u00020\u0014H\u0007¢\u0006\u0002\bCJ\b\u0010D\u001a\u00020\u0007H\u0016J\u0006\u0010E\u001a\u00020\rR\u0015\u0010\u000e\u001a\u0004\u0018\u00010\u000f8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u0019R\u0011\u0010\u001a\u001a\u00020\u001b8G¢\u0006\u0006\u001a\u0004\b\u001a\u0010\u001cR\u0015\u0010\u0011\u001a\u0004\u0018\u00010\u00008\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u001dR\u0013\u0010\b\u001a\u00020\t8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\u001eR\u0018\u0010\u0016\u001a\u0004\u0018\u00010\u00178\u0001X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u001fR\u0015\u0010\n\u001a\u0004\u0018\u00010\u000b8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010 R\u0013\u0010\f\u001a\u00020\r8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010!R\u0011\u0010\"\u001a\u00020#8F¢\u0006\u0006\u001a\u0004\b\"\u0010$R\u0011\u0010%\u001a\u00020#8F¢\u0006\u0006\u001a\u0004\b%\u0010$R\u0010\u0010&\u001a\u0004\u0018\u00010\u001bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0013\u0010\u0006\u001a\u00020\u00078\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010'R\u0015\u0010\u0010\u001a\u0004\u0018\u00010\u00008\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u001dR\u0015\u0010\u0012\u001a\u0004\u0018\u00010\u00008\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u001dR\u0013\u0010\u0004\u001a\u00020\u00058\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0004\u0010(R\u0013\u0010\u0015\u001a\u00020\u00148\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010)R\u0013\u0010\u0002\u001a\u00020\u00038\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0002\u0010*R\u0013\u0010\u0013\u001a\u00020\u00148\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010)¨\u0006G"}, d2 = {"Lokhttp3/Response;", "Ljava/io/Closeable;", MissingTokenPull.TRIGGER_REQUEST, "Lokhttp3/Request;", "protocol", "Lokhttp3/Protocol;", "message", "", "code", "", "handshake", "Lokhttp3/Handshake;", "headers", "Lokhttp3/Headers;", "body", "Lokhttp3/ResponseBody;", "networkResponse", "cacheResponse", "priorResponse", "sentRequestAtMillis", "", "receivedResponseAtMillis", "exchange", "Lokhttp3/internal/connection/Exchange;", "(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V", "()Lokhttp3/ResponseBody;", "cacheControl", "Lokhttp3/CacheControl;", "()Lokhttp3/CacheControl;", "()Lokhttp3/Response;", "()I", "()Lokhttp3/internal/connection/Exchange;", "()Lokhttp3/Handshake;", "()Lokhttp3/Headers;", "isRedirect", "", "()Z", "isSuccessful", "lazyCacheControl", "()Ljava/lang/String;", "()Lokhttp3/Protocol;", "()J", "()Lokhttp3/Request;", "-deprecated_body", "-deprecated_cacheControl", "-deprecated_cacheResponse", "challenges", "", "Lokhttp3/Challenge;", "close", "", "-deprecated_code", "-deprecated_handshake", Content.HEADER, "name", "defaultValue", "-deprecated_headers", "-deprecated_message", "-deprecated_networkResponse", "newBuilder", "Lokhttp3/Response$Builder;", "peekBody", "byteCount", "-deprecated_priorResponse", "-deprecated_protocol", "-deprecated_receivedResponseAtMillis", "-deprecated_request", "-deprecated_sentRequestAtMillis", "toString", "trailers", "Builder", "okhttp"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nResponse.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Response.kt\nokhttp3/Response\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,455:1\n1#2:456\n*E\n"})
|
|
/* loaded from: classes10.dex */
|
|
public final class Response implements Closeable {
|
|
|
|
@Nullable
|
|
private final ResponseBody body;
|
|
|
|
@Nullable
|
|
private final Response cacheResponse;
|
|
private final int code;
|
|
|
|
@Nullable
|
|
private final Exchange exchange;
|
|
|
|
@Nullable
|
|
private final Handshake handshake;
|
|
|
|
@NotNull
|
|
private final Headers headers;
|
|
|
|
@Nullable
|
|
private CacheControl lazyCacheControl;
|
|
|
|
@NotNull
|
|
private final String message;
|
|
|
|
@Nullable
|
|
private final Response networkResponse;
|
|
|
|
@Nullable
|
|
private final Response priorResponse;
|
|
|
|
@NotNull
|
|
private final Protocol protocol;
|
|
private final long receivedResponseAtMillis;
|
|
|
|
@NotNull
|
|
private final Request request;
|
|
private final long sentRequestAtMillis;
|
|
|
|
public Response(@NotNull Request request, @NotNull Protocol protocol, @NotNull String str, int i, @Nullable Handshake handshake, @NotNull Headers headers, @Nullable ResponseBody responseBody, @Nullable Response response, @Nullable Response response2, @Nullable Response response3, long j, long j2, @Nullable Exchange exchange) {
|
|
request.getClass();
|
|
protocol.getClass();
|
|
str.getClass();
|
|
headers.getClass();
|
|
this.request = request;
|
|
this.protocol = protocol;
|
|
this.message = str;
|
|
this.code = i;
|
|
this.handshake = handshake;
|
|
this.headers = headers;
|
|
this.body = responseBody;
|
|
this.networkResponse = response;
|
|
this.cacheResponse = response2;
|
|
this.priorResponse = response3;
|
|
this.sentRequestAtMillis = j;
|
|
this.receivedResponseAtMillis = j2;
|
|
this.exchange = exchange;
|
|
}
|
|
|
|
public static /* synthetic */ String header$default(Response response, String str, String str2, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
str2 = null;
|
|
}
|
|
return response.header(str, str2);
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "body", imports = {}))
|
|
@JvmName(name = "-deprecated_body")
|
|
@Nullable
|
|
/* renamed from: -deprecated_body, reason: not valid java name and from getter */
|
|
public final ResponseBody getBody() {
|
|
return this.body;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "cacheControl", imports = {}))
|
|
@JvmName(name = "-deprecated_cacheControl")
|
|
@NotNull
|
|
/* renamed from: -deprecated_cacheControl, reason: not valid java name */
|
|
public final CacheControl m27146deprecated_cacheControl() {
|
|
return cacheControl();
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "cacheResponse", imports = {}))
|
|
@JvmName(name = "-deprecated_cacheResponse")
|
|
@Nullable
|
|
/* renamed from: -deprecated_cacheResponse, reason: not valid java name and from getter */
|
|
public final Response getCacheResponse() {
|
|
return this.cacheResponse;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "code", imports = {}))
|
|
@JvmName(name = "-deprecated_code")
|
|
/* renamed from: -deprecated_code, reason: not valid java name and from getter */
|
|
public final int getCode() {
|
|
return this.code;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "handshake", imports = {}))
|
|
@JvmName(name = "-deprecated_handshake")
|
|
@Nullable
|
|
/* renamed from: -deprecated_handshake, reason: not valid java name and from getter */
|
|
public final Handshake getHandshake() {
|
|
return this.handshake;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "headers", imports = {}))
|
|
@JvmName(name = "-deprecated_headers")
|
|
@NotNull
|
|
/* renamed from: -deprecated_headers, reason: not valid java name and from getter */
|
|
public final Headers getHeaders() {
|
|
return this.headers;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "message", imports = {}))
|
|
@JvmName(name = "-deprecated_message")
|
|
@NotNull
|
|
/* renamed from: -deprecated_message, reason: not valid java name and from getter */
|
|
public final String getMessage() {
|
|
return this.message;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "networkResponse", imports = {}))
|
|
@JvmName(name = "-deprecated_networkResponse")
|
|
@Nullable
|
|
/* renamed from: -deprecated_networkResponse, reason: not valid java name and from getter */
|
|
public final Response getNetworkResponse() {
|
|
return this.networkResponse;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "priorResponse", imports = {}))
|
|
@JvmName(name = "-deprecated_priorResponse")
|
|
@Nullable
|
|
/* renamed from: -deprecated_priorResponse, reason: not valid java name and from getter */
|
|
public final Response getPriorResponse() {
|
|
return this.priorResponse;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "protocol", imports = {}))
|
|
@JvmName(name = "-deprecated_protocol")
|
|
@NotNull
|
|
/* renamed from: -deprecated_protocol, reason: not valid java name and from getter */
|
|
public final Protocol getProtocol() {
|
|
return this.protocol;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "receivedResponseAtMillis", imports = {}))
|
|
@JvmName(name = "-deprecated_receivedResponseAtMillis")
|
|
/* renamed from: -deprecated_receivedResponseAtMillis, reason: not valid java name and from getter */
|
|
public final long getReceivedResponseAtMillis() {
|
|
return this.receivedResponseAtMillis;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = MissingTokenPull.TRIGGER_REQUEST, imports = {}))
|
|
@JvmName(name = "-deprecated_request")
|
|
@NotNull
|
|
/* renamed from: -deprecated_request, reason: not valid java name and from getter */
|
|
public final Request getRequest() {
|
|
return this.request;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "sentRequestAtMillis", imports = {}))
|
|
@JvmName(name = "-deprecated_sentRequestAtMillis")
|
|
/* renamed from: -deprecated_sentRequestAtMillis, reason: not valid java name and from getter */
|
|
public final long getSentRequestAtMillis() {
|
|
return this.sentRequestAtMillis;
|
|
}
|
|
|
|
@JvmName(name = "body")
|
|
@Nullable
|
|
public final ResponseBody body() {
|
|
return this.body;
|
|
}
|
|
|
|
@JvmName(name = "cacheControl")
|
|
@NotNull
|
|
public final CacheControl cacheControl() {
|
|
CacheControl cacheControl = this.lazyCacheControl;
|
|
if (cacheControl != null) {
|
|
return cacheControl;
|
|
}
|
|
CacheControl parse = CacheControl.INSTANCE.parse(this.headers);
|
|
this.lazyCacheControl = parse;
|
|
return parse;
|
|
}
|
|
|
|
@JvmName(name = "cacheResponse")
|
|
@Nullable
|
|
public final Response cacheResponse() {
|
|
return this.cacheResponse;
|
|
}
|
|
|
|
@NotNull
|
|
public final List<Challenge> challenges() {
|
|
String str;
|
|
Headers headers = this.headers;
|
|
int i = this.code;
|
|
if (i == 401) {
|
|
str = "WWW-Authenticate";
|
|
} else {
|
|
if (i != 407) {
|
|
return CollectionsKt.emptyList();
|
|
}
|
|
str = "Proxy-Authenticate";
|
|
}
|
|
return HttpHeaders.parseChallenges(headers, str);
|
|
}
|
|
|
|
@Override // java.io.Closeable, java.lang.AutoCloseable
|
|
public void close() {
|
|
ResponseBody responseBody = this.body;
|
|
if (responseBody != null) {
|
|
responseBody.close();
|
|
} else {
|
|
Single$$ExternalSyntheticBUOutline0.m$2("response is not eligible for a body and must not be closed");
|
|
}
|
|
}
|
|
|
|
@JvmName(name = "code")
|
|
public final int code() {
|
|
return this.code;
|
|
}
|
|
|
|
@JvmName(name = "exchange")
|
|
@Nullable
|
|
/* renamed from: exchange, reason: from getter */
|
|
public final Exchange getExchange() {
|
|
return this.exchange;
|
|
}
|
|
|
|
@JvmName(name = "handshake")
|
|
@Nullable
|
|
public final Handshake handshake() {
|
|
return this.handshake;
|
|
}
|
|
|
|
@JvmOverloads
|
|
@Nullable
|
|
public final String header(@NotNull String name, @Nullable String defaultValue) {
|
|
name.getClass();
|
|
String str = this.headers.get(name);
|
|
return str == null ? defaultValue : str;
|
|
}
|
|
|
|
@NotNull
|
|
public final List<String> headers(@NotNull String name) {
|
|
name.getClass();
|
|
return this.headers.values(name);
|
|
}
|
|
|
|
public final boolean isRedirect() {
|
|
int i = this.code;
|
|
if (i == 307 || i == 308) {
|
|
return true;
|
|
}
|
|
switch (i) {
|
|
case 300:
|
|
case 301:
|
|
case 302:
|
|
case 303:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public final boolean isSuccessful() {
|
|
int i = this.code;
|
|
return 200 <= i && i < 300;
|
|
}
|
|
|
|
@JvmName(name = "message")
|
|
@NotNull
|
|
public final String message() {
|
|
return this.message;
|
|
}
|
|
|
|
@JvmName(name = "networkResponse")
|
|
@Nullable
|
|
public final Response networkResponse() {
|
|
return this.networkResponse;
|
|
}
|
|
|
|
@NotNull
|
|
public final Builder newBuilder() {
|
|
return new Builder(this);
|
|
}
|
|
|
|
@NotNull
|
|
public final ResponseBody peekBody(long byteCount) throws IOException {
|
|
ResponseBody responseBody = this.body;
|
|
responseBody.getClass();
|
|
BufferedSource peek = responseBody.getBodySource().peek();
|
|
Buffer buffer = new Buffer();
|
|
peek.request(byteCount);
|
|
buffer.write((Source) peek, Math.min(byteCount, peek.getBuffer().size()));
|
|
return ResponseBody.INSTANCE.create(buffer, this.body.contentType(), buffer.size());
|
|
}
|
|
|
|
@JvmName(name = "priorResponse")
|
|
@Nullable
|
|
public final Response priorResponse() {
|
|
return this.priorResponse;
|
|
}
|
|
|
|
@JvmName(name = "protocol")
|
|
@NotNull
|
|
public final Protocol protocol() {
|
|
return this.protocol;
|
|
}
|
|
|
|
@JvmName(name = "receivedResponseAtMillis")
|
|
public final long receivedResponseAtMillis() {
|
|
return this.receivedResponseAtMillis;
|
|
}
|
|
|
|
@JvmName(name = MissingTokenPull.TRIGGER_REQUEST)
|
|
@NotNull
|
|
public final Request request() {
|
|
return this.request;
|
|
}
|
|
|
|
@JvmName(name = "sentRequestAtMillis")
|
|
public final long sentRequestAtMillis() {
|
|
return this.sentRequestAtMillis;
|
|
}
|
|
|
|
@NotNull
|
|
public String toString() {
|
|
return "Response{protocol=" + this.protocol + ", code=" + this.code + ", message=" + this.message + ", url=" + this.request.url() + AbstractJsonLexerKt.END_OBJ;
|
|
}
|
|
|
|
@NotNull
|
|
public final Headers trailers() throws IOException {
|
|
Exchange exchange = this.exchange;
|
|
if (exchange != null) {
|
|
return exchange.trailers();
|
|
}
|
|
Single$$ExternalSyntheticBUOutline0.m$2("trailers not available");
|
|
return null;
|
|
}
|
|
|
|
@JvmName(name = "headers")
|
|
@NotNull
|
|
public final Headers headers() {
|
|
return this.headers;
|
|
}
|
|
|
|
@JvmOverloads
|
|
@Nullable
|
|
public final String header(@NotNull String str) {
|
|
str.getClass();
|
|
return header$default(this, str, null, 2, null);
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000l\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\t\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0016\u0018\u00002\u00020\u0001B\u0007\b\u0016¢\u0006\u0002\u0010\u0002B\u000f\b\u0010\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\u0018\u0010I\u001a\u00020\u00002\u0006\u0010J\u001a\u00020)2\u0006\u0010K\u001a\u00020)H\u0016J\u0012\u0010\u0006\u001a\u00020\u00002\b\u0010\u0006\u001a\u0004\u0018\u00010\u0007H\u0016J\b\u0010L\u001a\u00020\u0004H\u0016J\u0012\u0010\f\u001a\u00020\u00002\b\u0010\f\u001a\u0004\u0018\u00010\u0004H\u0016J\u0012\u0010M\u001a\u00020N2\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004H\u0002J\u001a\u0010O\u001a\u00020N2\u0006\u0010J\u001a\u00020)2\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004H\u0002J\u0010\u0010\u0010\u001a\u00020\u00002\u0006\u0010\u0010\u001a\u00020\u0011H\u0016J\u0012\u0010\u001c\u001a\u00020\u00002\b\u0010\u001c\u001a\u0004\u0018\u00010\u001dH\u0016J\u0018\u0010P\u001a\u00020\u00002\u0006\u0010J\u001a\u00020)2\u0006\u0010K\u001a\u00020)H\u0016J\u0010\u0010\"\u001a\u00020\u00002\u0006\u0010\"\u001a\u00020QH\u0016J\u0015\u0010R\u001a\u00020N2\u0006\u0010S\u001a\u00020\u0017H\u0000¢\u0006\u0002\bTJ\u0010\u0010(\u001a\u00020\u00002\u0006\u0010(\u001a\u00020)H\u0016J\u0012\u0010.\u001a\u00020\u00002\b\u0010.\u001a\u0004\u0018\u00010\u0004H\u0016J\u0012\u00101\u001a\u00020\u00002\b\u00101\u001a\u0004\u0018\u00010\u0004H\u0016J\u0010\u00104\u001a\u00020\u00002\u0006\u00104\u001a\u000205H\u0016J\u0010\u0010:\u001a\u00020\u00002\u0006\u0010:\u001a\u00020;H\u0016J\u0010\u0010U\u001a\u00020\u00002\u0006\u0010J\u001a\u00020)H\u0016J\u0010\u0010@\u001a\u00020\u00002\u0006\u0010@\u001a\u00020AH\u0016J\u0010\u0010F\u001a\u00020\u00002\u0006\u0010F\u001a\u00020;H\u0016R\u001c\u0010\u0006\u001a\u0004\u0018\u00010\u0007X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\b\u0010\t\"\u0004\b\n\u0010\u000bR\u001c\u0010\f\u001a\u0004\u0018\u00010\u0004X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\r\u0010\u000e\"\u0004\b\u000f\u0010\u0005R\u001a\u0010\u0010\u001a\u00020\u0011X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0012\u0010\u0013\"\u0004\b\u0014\u0010\u0015R\u001c\u0010\u0016\u001a\u0004\u0018\u00010\u0017X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0018\u0010\u0019\"\u0004\b\u001a\u0010\u001bR\u001c\u0010\u001c\u001a\u0004\u0018\u00010\u001dX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001e\u0010\u001f\"\u0004\b \u0010!R\u001a\u0010\"\u001a\u00020#X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b$\u0010%\"\u0004\b&\u0010'R\u001c\u0010(\u001a\u0004\u0018\u00010)X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b*\u0010+\"\u0004\b,\u0010-R\u001c\u0010.\u001a\u0004\u0018\u00010\u0004X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b/\u0010\u000e\"\u0004\b0\u0010\u0005R\u001c\u00101\u001a\u0004\u0018\u00010\u0004X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b2\u0010\u000e\"\u0004\b3\u0010\u0005R\u001c\u00104\u001a\u0004\u0018\u000105X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b6\u00107\"\u0004\b8\u00109R\u001a\u0010:\u001a\u00020;X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b<\u0010=\"\u0004\b>\u0010?R\u001c\u0010@\u001a\u0004\u0018\u00010AX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bB\u0010C\"\u0004\bD\u0010ER\u001a\u0010F\u001a\u00020;X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\bG\u0010=\"\u0004\bH\u0010?¨\u0006V"}, d2 = {"Lokhttp3/Response$Builder;", "", "()V", "response", "Lokhttp3/Response;", "(Lokhttp3/Response;)V", "body", "Lokhttp3/ResponseBody;", "getBody$okhttp", "()Lokhttp3/ResponseBody;", "setBody$okhttp", "(Lokhttp3/ResponseBody;)V", "cacheResponse", "getCacheResponse$okhttp", "()Lokhttp3/Response;", "setCacheResponse$okhttp", "code", "", "getCode$okhttp", "()I", "setCode$okhttp", "(I)V", "exchange", "Lokhttp3/internal/connection/Exchange;", "getExchange$okhttp", "()Lokhttp3/internal/connection/Exchange;", "setExchange$okhttp", "(Lokhttp3/internal/connection/Exchange;)V", "handshake", "Lokhttp3/Handshake;", "getHandshake$okhttp", "()Lokhttp3/Handshake;", "setHandshake$okhttp", "(Lokhttp3/Handshake;)V", "headers", "Lokhttp3/Headers$Builder;", "getHeaders$okhttp", "()Lokhttp3/Headers$Builder;", "setHeaders$okhttp", "(Lokhttp3/Headers$Builder;)V", "message", "", "getMessage$okhttp", "()Ljava/lang/String;", "setMessage$okhttp", "(Ljava/lang/String;)V", "networkResponse", "getNetworkResponse$okhttp", "setNetworkResponse$okhttp", "priorResponse", "getPriorResponse$okhttp", "setPriorResponse$okhttp", "protocol", "Lokhttp3/Protocol;", "getProtocol$okhttp", "()Lokhttp3/Protocol;", "setProtocol$okhttp", "(Lokhttp3/Protocol;)V", "receivedResponseAtMillis", "", "getReceivedResponseAtMillis$okhttp", "()J", "setReceivedResponseAtMillis$okhttp", "(J)V", MissingTokenPull.TRIGGER_REQUEST, "Lokhttp3/Request;", "getRequest$okhttp", "()Lokhttp3/Request;", "setRequest$okhttp", "(Lokhttp3/Request;)V", "sentRequestAtMillis", "getSentRequestAtMillis$okhttp", "setSentRequestAtMillis$okhttp", "addHeader", "name", "value", JsonPOJOBuilder.DEFAULT_BUILD_METHOD, "checkPriorResponse", "", "checkSupportResponse", Content.HEADER, "Lokhttp3/Headers;", "initExchange", "deferredTrailers", "initExchange$okhttp", "removeHeader", "okhttp"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nResponse.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Response.kt\nokhttp3/Response$Builder\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,455:1\n1#2:456\n*E\n"})
|
|
public static class Builder {
|
|
|
|
@Nullable
|
|
private ResponseBody body;
|
|
|
|
@Nullable
|
|
private Response cacheResponse;
|
|
private int code;
|
|
|
|
@Nullable
|
|
private Exchange exchange;
|
|
|
|
@Nullable
|
|
private Handshake handshake;
|
|
|
|
@NotNull
|
|
private Headers.Builder headers;
|
|
|
|
@Nullable
|
|
private String message;
|
|
|
|
@Nullable
|
|
private Response networkResponse;
|
|
|
|
@Nullable
|
|
private Response priorResponse;
|
|
|
|
@Nullable
|
|
private Protocol protocol;
|
|
private long receivedResponseAtMillis;
|
|
|
|
@Nullable
|
|
private Request request;
|
|
private long sentRequestAtMillis;
|
|
|
|
public Builder(@NotNull Response response) {
|
|
response.getClass();
|
|
this.code = -1;
|
|
this.request = response.request();
|
|
this.protocol = response.protocol();
|
|
this.code = response.code();
|
|
this.message = response.message();
|
|
this.handshake = response.handshake();
|
|
this.headers = response.headers().newBuilder();
|
|
this.body = response.body();
|
|
this.networkResponse = response.networkResponse();
|
|
this.cacheResponse = response.cacheResponse();
|
|
this.priorResponse = response.priorResponse();
|
|
this.sentRequestAtMillis = response.sentRequestAtMillis();
|
|
this.receivedResponseAtMillis = response.receivedResponseAtMillis();
|
|
this.exchange = response.getExchange();
|
|
}
|
|
|
|
private final void checkPriorResponse(Response response) {
|
|
if (response == null || response.body() == null) {
|
|
return;
|
|
}
|
|
Single$$ExternalSyntheticBUOutline0.m$3("priorResponse.body != null");
|
|
}
|
|
|
|
private final void checkSupportResponse(String name, Response response) {
|
|
if (response != null) {
|
|
if (response.body() != null) {
|
|
Path$$ExternalSyntheticBUOutline0.m((Object) BitVector$$ExternalSyntheticOutline0.m(name, ".body != null"));
|
|
return;
|
|
}
|
|
if (response.networkResponse() != null) {
|
|
Path$$ExternalSyntheticBUOutline0.m((Object) BitVector$$ExternalSyntheticOutline0.m(name, ".networkResponse != null"));
|
|
} else if (response.cacheResponse() != null) {
|
|
Path$$ExternalSyntheticBUOutline0.m((Object) BitVector$$ExternalSyntheticOutline0.m(name, ".cacheResponse != null"));
|
|
} else {
|
|
if (response.priorResponse() == null) {
|
|
return;
|
|
}
|
|
Path$$ExternalSyntheticBUOutline0.m((Object) BitVector$$ExternalSyntheticOutline0.m(name, ".priorResponse != null"));
|
|
}
|
|
}
|
|
}
|
|
|
|
@NotNull
|
|
public Builder addHeader(@NotNull String name, @NotNull String value) {
|
|
name.getClass();
|
|
value.getClass();
|
|
this.headers.add(name, value);
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder body(@Nullable ResponseBody body) {
|
|
this.body = body;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Response build() {
|
|
int i = this.code;
|
|
if (i < 0) {
|
|
Buffer$$ExternalSyntheticBUOutline0.m(this.code, "code < 0: ");
|
|
return null;
|
|
}
|
|
Request request = this.request;
|
|
if (request == null) {
|
|
Single$$ExternalSyntheticBUOutline0.m$2("request == null");
|
|
return null;
|
|
}
|
|
Protocol protocol = this.protocol;
|
|
if (protocol == null) {
|
|
Single$$ExternalSyntheticBUOutline0.m$2("protocol == null");
|
|
return null;
|
|
}
|
|
String str = this.message;
|
|
if (str != null) {
|
|
return new Response(request, protocol, str, i, this.handshake, this.headers.build(), this.body, this.networkResponse, this.cacheResponse, this.priorResponse, this.sentRequestAtMillis, this.receivedResponseAtMillis, this.exchange);
|
|
}
|
|
Single$$ExternalSyntheticBUOutline0.m$2("message == null");
|
|
return null;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder cacheResponse(@Nullable Response cacheResponse) {
|
|
checkSupportResponse("cacheResponse", cacheResponse);
|
|
this.cacheResponse = cacheResponse;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder code(int code) {
|
|
this.code = code;
|
|
return this;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getBody$okhttp, reason: from getter */
|
|
public final ResponseBody getBody() {
|
|
return this.body;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getCacheResponse$okhttp, reason: from getter */
|
|
public final Response getCacheResponse() {
|
|
return this.cacheResponse;
|
|
}
|
|
|
|
/* renamed from: getCode$okhttp, reason: from getter */
|
|
public final int getCode() {
|
|
return this.code;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getExchange$okhttp, reason: from getter */
|
|
public final Exchange getExchange() {
|
|
return this.exchange;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getHandshake$okhttp, reason: from getter */
|
|
public final Handshake getHandshake() {
|
|
return this.handshake;
|
|
}
|
|
|
|
@NotNull
|
|
/* renamed from: getHeaders$okhttp, reason: from getter */
|
|
public final Headers.Builder getHeaders() {
|
|
return this.headers;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getMessage$okhttp, reason: from getter */
|
|
public final String getMessage() {
|
|
return this.message;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getNetworkResponse$okhttp, reason: from getter */
|
|
public final Response getNetworkResponse() {
|
|
return this.networkResponse;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getPriorResponse$okhttp, reason: from getter */
|
|
public final Response getPriorResponse() {
|
|
return this.priorResponse;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getProtocol$okhttp, reason: from getter */
|
|
public final Protocol getProtocol() {
|
|
return this.protocol;
|
|
}
|
|
|
|
/* renamed from: getReceivedResponseAtMillis$okhttp, reason: from getter */
|
|
public final long getReceivedResponseAtMillis() {
|
|
return this.receivedResponseAtMillis;
|
|
}
|
|
|
|
@Nullable
|
|
/* renamed from: getRequest$okhttp, reason: from getter */
|
|
public final Request getRequest() {
|
|
return this.request;
|
|
}
|
|
|
|
/* renamed from: getSentRequestAtMillis$okhttp, reason: from getter */
|
|
public final long getSentRequestAtMillis() {
|
|
return this.sentRequestAtMillis;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder handshake(@Nullable Handshake handshake) {
|
|
this.handshake = handshake;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder header(@NotNull String name, @NotNull String value) {
|
|
name.getClass();
|
|
value.getClass();
|
|
this.headers.set(name, value);
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder headers(@NotNull Headers headers) {
|
|
headers.getClass();
|
|
this.headers = headers.newBuilder();
|
|
return this;
|
|
}
|
|
|
|
public final void initExchange$okhttp(@NotNull Exchange deferredTrailers) {
|
|
deferredTrailers.getClass();
|
|
this.exchange = deferredTrailers;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder message(@NotNull String message) {
|
|
message.getClass();
|
|
this.message = message;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder networkResponse(@Nullable Response networkResponse) {
|
|
checkSupportResponse("networkResponse", networkResponse);
|
|
this.networkResponse = networkResponse;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder priorResponse(@Nullable Response priorResponse) {
|
|
checkPriorResponse(priorResponse);
|
|
this.priorResponse = priorResponse;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder protocol(@NotNull Protocol protocol) {
|
|
protocol.getClass();
|
|
this.protocol = protocol;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder receivedResponseAtMillis(long receivedResponseAtMillis) {
|
|
this.receivedResponseAtMillis = receivedResponseAtMillis;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder removeHeader(@NotNull String name) {
|
|
name.getClass();
|
|
this.headers.removeAll(name);
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder request(@NotNull Request request) {
|
|
request.getClass();
|
|
this.request = request;
|
|
return this;
|
|
}
|
|
|
|
@NotNull
|
|
public Builder sentRequestAtMillis(long sentRequestAtMillis) {
|
|
this.sentRequestAtMillis = sentRequestAtMillis;
|
|
return this;
|
|
}
|
|
|
|
public final void setBody$okhttp(@Nullable ResponseBody responseBody) {
|
|
this.body = responseBody;
|
|
}
|
|
|
|
public final void setCacheResponse$okhttp(@Nullable Response response) {
|
|
this.cacheResponse = response;
|
|
}
|
|
|
|
public final void setCode$okhttp(int i) {
|
|
this.code = i;
|
|
}
|
|
|
|
public final void setExchange$okhttp(@Nullable Exchange exchange) {
|
|
this.exchange = exchange;
|
|
}
|
|
|
|
public final void setHandshake$okhttp(@Nullable Handshake handshake) {
|
|
this.handshake = handshake;
|
|
}
|
|
|
|
public final void setHeaders$okhttp(@NotNull Headers.Builder builder) {
|
|
builder.getClass();
|
|
this.headers = builder;
|
|
}
|
|
|
|
public final void setMessage$okhttp(@Nullable String str) {
|
|
this.message = str;
|
|
}
|
|
|
|
public final void setNetworkResponse$okhttp(@Nullable Response response) {
|
|
this.networkResponse = response;
|
|
}
|
|
|
|
public final void setPriorResponse$okhttp(@Nullable Response response) {
|
|
this.priorResponse = response;
|
|
}
|
|
|
|
public final void setProtocol$okhttp(@Nullable Protocol protocol) {
|
|
this.protocol = protocol;
|
|
}
|
|
|
|
public final void setReceivedResponseAtMillis$okhttp(long j) {
|
|
this.receivedResponseAtMillis = j;
|
|
}
|
|
|
|
public final void setRequest$okhttp(@Nullable Request request) {
|
|
this.request = request;
|
|
}
|
|
|
|
public final void setSentRequestAtMillis$okhttp(long j) {
|
|
this.sentRequestAtMillis = j;
|
|
}
|
|
|
|
public Builder() {
|
|
this.code = -1;
|
|
this.headers = new Headers.Builder();
|
|
}
|
|
}
|
|
}
|