package okhttp3.internal.http2;

import c.q.d.g;
import c.q.d.j;
import d.i;

/* JADX INFO: compiled from: Header.kt */
/* JADX INFO: loaded from: classes.dex */
public final class Header {
    public final int hpackSize;
    public final i name;
    public final i value;
    public static final Companion Companion = new Companion(null);
    public static final i PSEUDO_PREFIX = i.f1573f.d(":");
    public static final String RESPONSE_STATUS_UTF8 = ":status";
    public static final i RESPONSE_STATUS = i.f1573f.d(RESPONSE_STATUS_UTF8);
    public static final String TARGET_METHOD_UTF8 = ":method";
    public static final i TARGET_METHOD = i.f1573f.d(TARGET_METHOD_UTF8);
    public static final String TARGET_PATH_UTF8 = ":path";
    public static final i TARGET_PATH = i.f1573f.d(TARGET_PATH_UTF8);
    public static final String TARGET_SCHEME_UTF8 = ":scheme";
    public static final i TARGET_SCHEME = i.f1573f.d(TARGET_SCHEME_UTF8);
    public static final String TARGET_AUTHORITY_UTF8 = ":authority";
    public static final i TARGET_AUTHORITY = i.f1573f.d(TARGET_AUTHORITY_UTF8);

    /* JADX INFO: compiled from: Header.kt */
    public static final class Companion {
        private Companion() {
        }

        public /* synthetic */ Companion(g gVar) {
            this();
        }
    }

    public Header(i iVar, i iVar2) {
        j.c(iVar, "name");
        j.c(iVar2, "value");
        this.name = iVar;
        this.value = iVar2;
        this.hpackSize = iVar.s() + 32 + this.value.s();
    }

    public static /* synthetic */ Header copy$default(Header header, i iVar, i iVar2, int i, Object obj) {
        if ((i & 1) != 0) {
            iVar = header.name;
        }
        if ((i & 2) != 0) {
            iVar2 = header.value;
        }
        return header.copy(iVar, iVar2);
    }

    public final i component1() {
        return this.name;
    }

    public final i component2() {
        return this.value;
    }

    public final Header copy(i iVar, i iVar2) {
        j.c(iVar, "name");
        j.c(iVar2, "value");
        return new Header(iVar, iVar2);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof Header)) {
            return false;
        }
        Header header = (Header) obj;
        return j.a(this.name, header.name) && j.a(this.value, header.value);
    }

    public int hashCode() {
        i iVar = this.name;
        int iHashCode = (iVar != null ? iVar.hashCode() : 0) * 31;
        i iVar2 = this.value;
        return iHashCode + (iVar2 != null ? iVar2.hashCode() : 0);
    }

    public String toString() {
        return this.name.v() + ": " + this.value.v();
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public Header(String str, String str2) {
        this(i.f1573f.d(str), i.f1573f.d(str2));
        j.c(str, "name");
        j.c(str2, "value");
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public Header(i iVar, String str) {
        this(iVar, i.f1573f.d(str));
        j.c(iVar, "name");
        j.c(str, "value");
    }
}
