package com.revenuecat.purchases.common.networking;

import g5.a;
import i5.g;
import j5.b;
import k5.a0;
import k5.e0;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.o;
import w4.InterfaceC3141c;

/* JADX INFO: loaded from: classes3.dex */
public final class WebBillingPhase {
    public static final Companion Companion = new Companion(null);
    private final int cycleCount;
    private final String periodDuration;
    private final WebBillingPrice price;

    public static final class Companion {
        public /* synthetic */ Companion(h hVar) {
            this();
        }

        public final a serializer() {
            return WebBillingPhase$$serializer.INSTANCE;
        }

        private Companion() {
        }
    }

    public WebBillingPhase() {
        this((WebBillingPrice) null, (String) null, 0, 7, (h) null);
    }

    public static /* synthetic */ WebBillingPhase copy$default(WebBillingPhase webBillingPhase, WebBillingPrice webBillingPrice, String str, int i6, int i7, Object obj) {
        if ((i7 & 1) != 0) {
            webBillingPrice = webBillingPhase.price;
        }
        if ((i7 & 2) != 0) {
            str = webBillingPhase.periodDuration;
        }
        if ((i7 & 4) != 0) {
            i6 = webBillingPhase.cycleCount;
        }
        return webBillingPhase.copy(webBillingPrice, str, i6);
    }

    public static /* synthetic */ void getCycleCount$annotations() {
    }

    public static /* synthetic */ void getPeriodDuration$annotations() {
    }

    public static final /* synthetic */ void write$Self$purchases_defaultsBc8Release(WebBillingPhase webBillingPhase, b bVar, g gVar) {
        if (bVar.g(gVar) || webBillingPhase.price != null) {
            bVar.E(gVar, 0, WebBillingPrice$$serializer.INSTANCE, webBillingPhase.price);
        }
        if (bVar.g(gVar) || webBillingPhase.periodDuration != null) {
            bVar.E(gVar, 1, e0.f20048a, webBillingPhase.periodDuration);
        }
        if (!bVar.g(gVar) && webBillingPhase.cycleCount == 1) {
            return;
        }
        bVar.w(2, webBillingPhase.cycleCount, gVar);
    }

    public final WebBillingPrice component1() {
        return this.price;
    }

    public final String component2() {
        return this.periodDuration;
    }

    public final int component3() {
        return this.cycleCount;
    }

    public final WebBillingPhase copy(WebBillingPrice webBillingPrice, String str, int i6) {
        return new WebBillingPhase(webBillingPrice, str, i6);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof WebBillingPhase)) {
            return false;
        }
        WebBillingPhase webBillingPhase = (WebBillingPhase) obj;
        return o.c(this.price, webBillingPhase.price) && o.c(this.periodDuration, webBillingPhase.periodDuration) && this.cycleCount == webBillingPhase.cycleCount;
    }

    public final int getCycleCount() {
        return this.cycleCount;
    }

    public final String getPeriodDuration() {
        return this.periodDuration;
    }

    public final WebBillingPrice getPrice() {
        return this.price;
    }

    public int hashCode() {
        WebBillingPrice webBillingPrice = this.price;
        int iHashCode = (webBillingPrice == null ? 0 : webBillingPrice.hashCode()) * 31;
        String str = this.periodDuration;
        return Integer.hashCode(this.cycleCount) + ((iHashCode + (str != null ? str.hashCode() : 0)) * 31);
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("WebBillingPhase(price=");
        sb.append(this.price);
        sb.append(", periodDuration=");
        sb.append(this.periodDuration);
        sb.append(", cycleCount=");
        return com.google.android.recaptcha.internal.a.m(sb, this.cycleCount, ')');
    }

    @InterfaceC3141c
    public /* synthetic */ WebBillingPhase(int i6, WebBillingPrice webBillingPrice, String str, int i7, a0 a0Var) {
        if ((i6 & 1) == 0) {
            this.price = null;
        } else {
            this.price = webBillingPrice;
        }
        if ((i6 & 2) == 0) {
            this.periodDuration = null;
        } else {
            this.periodDuration = str;
        }
        if ((i6 & 4) == 0) {
            this.cycleCount = 1;
        } else {
            this.cycleCount = i7;
        }
    }

    public WebBillingPhase(WebBillingPrice webBillingPrice, String str, int i6) {
        this.price = webBillingPrice;
        this.periodDuration = str;
        this.cycleCount = i6;
    }

    public /* synthetic */ WebBillingPhase(WebBillingPrice webBillingPrice, String str, int i6, int i7, h hVar) {
        this((i7 & 1) != 0 ? null : webBillingPrice, (i7 & 2) != 0 ? null : str, (i7 & 4) != 0 ? 1 : i6);
    }
}
