package com.l7tech.server.wsdm.subscription;

import com.l7tech.objectmodel.Goid;

public final class SubscriptionKey {
   private final Goid a;
   private final int b;
   private final String c;
   private static final String d;

   public SubscriptionKey(Goid var1, int var2, String var3) {
      if (var3 == null) {
         throw new IllegalArgumentException(d);
      }

      this.a = var1;
      this.b = var2;
      this.c = var3;
   }

   public SubscriptionKey(Subscription var1) {
      this(var1.getPublishedServiceGoid(), var1.getTopic(), var1.getReferenceCallback());
   }

   public Goid getServiceGoid() {
      return this.a;
   }

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

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

   @Override
   public boolean equals(Object param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 00: aload 0
      // 01: aload 1
      // 02: if_acmpne 0b
      // 05: bipush 1
      // 06: ireturn
      // 07: invokestatic com/l7tech/server/wsdm/subscription/SubscriptionKey.a (Ljava/lang/IllegalArgumentException;)Ljava/lang/IllegalArgumentException;
      // 0a: athrow
      // 0b: aload 1
      // 0c: ifnull 21
      // 0f: aload 0
      // 10: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 13: aload 1
      // 14: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 17: if_acmpeq 27
      // 1a: goto 21
      // 1d: invokestatic com/l7tech/server/wsdm/subscription/SubscriptionKey.a (Ljava/lang/IllegalArgumentException;)Ljava/lang/IllegalArgumentException;
      // 20: athrow
      // 21: bipush 0
      // 22: ireturn
      // 23: invokestatic com/l7tech/server/wsdm/subscription/SubscriptionKey.a (Ljava/lang/IllegalArgumentException;)Ljava/lang/IllegalArgumentException;
      // 26: athrow
      // 27: aload 1
      // 28: checkcast com/l7tech/server/wsdm/subscription/SubscriptionKey
      // 2b: astore 2
      // 2c: aload 0
      // 2d: getfield com/l7tech/server/wsdm/subscription/SubscriptionKey.a Lcom/l7tech/objectmodel/Goid;
      // 30: aload 2
      // 31: getfield com/l7tech/server/wsdm/subscription/SubscriptionKey.a Lcom/l7tech/objectmodel/Goid;
      // 34: invokestatic com/l7tech/objectmodel/Goid.equals (Lcom/l7tech/objectmodel/Goid;Lcom/l7tech/objectmodel/Goid;)Z
      // 37: ifne 40
      // 3a: bipush 0
      // 3b: ireturn
      // 3c: invokestatic com/l7tech/server/wsdm/subscription/SubscriptionKey.a (Ljava/lang/IllegalArgumentException;)Ljava/lang/IllegalArgumentException;
      // 3f: athrow
      // 40: aload 0
      // 41: getfield com/l7tech/server/wsdm/subscription/SubscriptionKey.b I
      // 44: aload 2
      // 45: getfield com/l7tech/server/wsdm/subscription/SubscriptionKey.b I
      // 48: if_icmpeq 51
      // 4b: bipush 0
      // 4c: ireturn
      // 4d: invokestatic com/l7tech/server/wsdm/subscription/SubscriptionKey.a (Ljava/lang/IllegalArgumentException;)Ljava/lang/IllegalArgumentException;
      // 50: athrow
      // 51: aload 0
      // 52: getfield com/l7tech/server/wsdm/subscription/SubscriptionKey.c Ljava/lang/String;
      // 55: aload 2
      // 56: getfield com/l7tech/server/wsdm/subscription/SubscriptionKey.c Ljava/lang/String;
      // 59: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 5c: ifne 65
      // 5f: bipush 0
      // 60: ireturn
      // 61: invokestatic com/l7tech/server/wsdm/subscription/SubscriptionKey.a (Ljava/lang/IllegalArgumentException;)Ljava/lang/IllegalArgumentException;
      // 64: athrow
      // 65: bipush 1
      // 66: ireturn
      // try (0 -> 5): 5 java/lang/IllegalArgumentException
      // try (7 -> 14): 15 java/lang/IllegalArgumentException
      // try (9 -> 19): 19 java/lang/IllegalArgumentException
      // try (24 -> 32): 32 java/lang/IllegalArgumentException
      // try (34 -> 41): 41 java/lang/IllegalArgumentException
      // try (43 -> 51): 51 java/lang/IllegalArgumentException
   }

   @Override
   public int hashCode() {
      int var10000;
      label16: {
         try {
            if (this.a != null) {
               var10000 = this.a.hashCode();
               break label16;
            }
         } catch (IllegalArgumentException var2) {
            throw a(var2);
         }

         var10000 = 0;
      }

      int var1 = var10000;
      var1 = 31 * var1 + this.b;
      return 31 * var1 + this.c.hashCode();
   }

   private static IllegalArgumentException a(IllegalArgumentException var0) {
      return var0;
   }

   static {
      String var10002 = a(61, a("v\u0016l03^^L\nf5pQEQ\fn|Fb}"));
      byte var10001 = -1;
      d = var10002;
   }

   private static char[] a(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 12);
      }

      return var10000;
   }

   private static String a(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 5;
            case 1 -> 94;
            case 2 -> 61;
            case 3 -> 97;
            case 4 -> 46;
            case 5 -> 13;
            default -> 12;
         });
      }

      return new String(var10001).intern();
   }
}
