package com.chartboost.sdk.impl;

import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.ranges.RangesKt;
/* loaded from: classes2.dex */
public final class ea {

    /* renamed from: a  reason: collision with root package name */
    public final String f1687a;
    public final String b;
    public final String c;
    public final String d;
    public final String e;
    public final String f;
    public final String g;
    public final a h;

    public ea(String location, String adType, String str, String adCreativeId, String adCreativeType, String adMarkup, String templateUrl, a aVar) {
        Intrinsics.checkNotNullParameter(location, "location");
        Intrinsics.checkNotNullParameter(adType, "adType");
        Intrinsics.checkNotNullParameter(adCreativeId, "adCreativeId");
        Intrinsics.checkNotNullParameter(adCreativeType, "adCreativeType");
        Intrinsics.checkNotNullParameter(adMarkup, "adMarkup");
        Intrinsics.checkNotNullParameter(templateUrl, "templateUrl");
        this.f1687a = location;
        this.b = adType;
        this.c = str;
        this.d = adCreativeId;
        this.e = adCreativeType;
        this.f = adMarkup;
        this.g = templateUrl;
        this.h = aVar;
    }

    public final String a() {
        return this.d;
    }

    public final String b() {
        return this.c;
    }

    public final a c() {
        return this.h;
    }

    public final String d() {
        return this.b;
    }

    public final String e() {
        return this.f1687a;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof ea) {
            ea eaVar = (ea) obj;
            return Intrinsics.areEqual(this.f1687a, eaVar.f1687a) && Intrinsics.areEqual(this.b, eaVar.b) && Intrinsics.areEqual(this.c, eaVar.c) && Intrinsics.areEqual(this.d, eaVar.d) && Intrinsics.areEqual(this.e, eaVar.e) && Intrinsics.areEqual(this.f, eaVar.f) && Intrinsics.areEqual(this.g, eaVar.g) && Intrinsics.areEqual(this.h, eaVar.h);
        }
        return false;
    }

    public final String g() {
        return this.g;
    }

    public int hashCode() {
        int hashCode = ((this.f1687a.hashCode() * 31) + this.b.hashCode()) * 31;
        String str = this.c;
        int hashCode2 = (((((((((hashCode + (str == null ? 0 : str.hashCode())) * 31) + this.d.hashCode()) * 31) + this.e.hashCode()) * 31) + this.f.hashCode()) * 31) + this.g.hashCode()) * 31;
        a aVar = this.h;
        return hashCode2 + (aVar != null ? aVar.hashCode() : 0);
    }

    public final String f() {
        String str = this.c;
        if (str != null) {
            String substring = str.substring(0, RangesKt.coerceAtMost(str.length(), 20));
            Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
            return substring;
        }
        return null;
    }

    public String toString() {
        String str = this.f1687a;
        String str2 = this.b;
        String f = f();
        String str3 = this.d;
        String str4 = this.e;
        String str5 = this.f;
        return "TrackAd: location: " + str + " adType: " + str2 + " adImpressionId: " + f + " adCreativeId: " + str3 + " adCreativeType: " + str4 + " adMarkup: " + str5 + " templateUrl: " + this.g;
    }

    public /* synthetic */ ea(String str, String str2, String str3, String str4, String str5, String str6, String str7, a aVar, int i, DefaultConstructorMarker defaultConstructorMarker) {
        this((i & 1) != 0 ? "" : str, (i & 2) != 0 ? "" : str2, (i & 4) != 0 ? "" : str3, (i & 8) != 0 ? "" : str4, (i & 16) != 0 ? "" : str5, (i & 32) != 0 ? "" : str6, (i & 64) == 0 ? str7 : "", (i & 128) != 0 ? null : aVar);
    }

    /* loaded from: classes2.dex */
    public static final class a {

        /* renamed from: a  reason: collision with root package name */
        public final int f1688a;
        public final int b;

        public final int a() {
            return this.f1688a;
        }

        public final int b() {
            return this.b;
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (obj instanceof a) {
                a aVar = (a) obj;
                return this.f1688a == aVar.f1688a && this.b == aVar.b;
            }
            return false;
        }

        public int hashCode() {
            return (Integer.hashCode(this.f1688a) * 31) + Integer.hashCode(this.b);
        }

        public String toString() {
            int i = this.f1688a;
            return "AdSize(height=" + i + ", width=" + this.b + ")";
        }

        public a(int i, int i2) {
            this.f1688a = i;
            this.b = i2;
        }
    }
}
