/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  io.opentelemetry.api.baggage.BaggageEntryMetadata
 */
package com.l7tech.server.otel;

import io.opentelemetry.api.baggage.BaggageEntryMetadata;

public class OtelBaggageChange {
    private final BaggageChangeType a;
    private final String b;
    private final String c;
    private final String d;

    public OtelBaggageChange(BaggageChangeType baggageChangeType, String string) {
        this(baggageChangeType, string, null, null);
    }

    public OtelBaggageChange(BaggageChangeType baggageChangeType, String string, String string2) {
        this(baggageChangeType, string, string2, BaggageEntryMetadata.empty().getValue());
    }

    public OtelBaggageChange(BaggageChangeType baggageChangeType, String string, String string2, String string3) {
        this.a = baggageChangeType;
        this.b = string;
        this.c = string2;
        this.d = string3;
    }

    public BaggageChangeType getChangeType() {
        return this.a;
    }

    public String getBaggageKey() {
        return this.b;
    }

    public String getBaggageValue() {
        return this.c;
    }

    public String getBaggageMetadataValue() {
        return this.d;
    }

    public static final class BaggageChangeType
    extends Enum<BaggageChangeType> {
        public static final /* enum */ BaggageChangeType UPDATE;
        public static final /* enum */ BaggageChangeType DELETE;
        private static final /* synthetic */ BaggageChangeType[] $VALUES;

        public static BaggageChangeType[] values() {
            return (BaggageChangeType[])$VALUES.clone();
        }

        public static BaggageChangeType valueOf(String string) {
            return Enum.valueOf(BaggageChangeType.class, string);
        }

        private static /* synthetic */ BaggageChangeType[] $values() {
            return new BaggageChangeType[]{UPDATE, DELETE};
        }

        /*
         * Enabled aggressive block sorting
         */
        static {
            String[] stringArray = new String[2];
            int n2 = 0;
            String string = "\u0013\\ \u0016Qr\u0006\u0002I(\u0012Qr";
            int n3 = "\u0013\\ \u0016Qr\u0006\u0002I(\u0012Qr".length();
            int n4 = 6;
            int n5 = -1;
            while (true) {
                int n6 = ++n5;
                stringArray[n2++] = BaggageChangeType.a(47, BaggageChangeType.a(string.substring(n6, n6 + n4)));
                if ((n5 += n4) >= n3) {
                    UPDATE = new BaggageChangeType();
                    DELETE = new BaggageChangeType();
                    $VALUES = BaggageChangeType.$values();
                    return;
                }
                n4 = string.charAt(n5);
            }
        }

        private static char[] a(String string) {
            char[] cArray = string.toCharArray();
            if (cArray.length < 2) {
                cArray = cArray;
                cArray[0] = (char)(cArray[0] ^ 0x54);
            }
            return cArray;
        }

        /*
         * Handled impossible loop by duplicating code
         * Enabled aggressive block sorting
         */
        private static String a(int n2, char[] cArray) {
            char[] cArray2;
            block11: {
                int n3;
                int n4;
                int n5;
                block10: {
                    n5 = n2;
                    cArray2 = cArray;
                    n4 = cArray.length;
                    n3 = 0;
                    if (!true) break block10;
                    n4 = n4;
                    if (n4 <= n3) break block11;
                }
                do {
                    n5 = n5;
                    cArray2 = cArray2;
                    int n6 = n3;
                    cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                        case 0 -> 105;
                        case 1 -> 35;
                        case 2 -> 75;
                        case 3 -> 120;
                        case 4 -> 42;
                        case 5 -> 24;
                        default -> 84;
                    })));
                    ++n3;
                    n4 = n4;
                } while (n4 > n3);
            }
            return new String(cArray2).intern();
        }
    }
}

