package com.l7tech.policy.code.config;

import com.fasterxml.jackson.databind.JsonNode;
import java.util.Collections;
import java.util.List;

public class AssertionCodeConfig {
   private String a;
   private List<AssertionCodeConfig.AssertionDisplayNameFormat> b = Collections.emptyList();
   private List<JsonNode> c = Collections.emptyList();
   private List<JsonResourcePatch> d = Collections.emptyList();
   private List<JsonResourcePatch> e = Collections.emptyList();
   private List<JsonNode> f = Collections.emptyList();
   private List<I18NResource> g = Collections.emptyList();
   private List<AssertionCodeConfig.AssertionRefEntity> h = Collections.emptyList();
   private List<AssertionCodeConfig.AssertionRefVariable> i = Collections.emptyList();

   public AssertionCodeConfig() {
   }

   public AssertionCodeConfig(String var1) {
      this.a = var1;
   }

   public String getConfigName() {
      return this.a;
   }

   public List<AssertionCodeConfig.AssertionDisplayNameFormat> getDisplayNameFormats() {
      return this.b;
   }

   public List<JsonNode> getConfigSchemas() {
      return this.c;
   }

   public List<JsonResourcePatch> getConfigSchemaPatches() {
      return this.d;
   }

   public List<JsonResourcePatch> getConfigDataPatches() {
      return this.e;
   }

   public List<JsonNode> getUiSchemas() {
      return this.f;
   }

   public List<I18NResource> getI18nResources() {
      return this.g;
   }

   public List<AssertionCodeConfig.AssertionRefEntity> getRefEntities() {
      return this.h;
   }

   public List<AssertionCodeConfig.AssertionRefVariable> getRefVariables() {
      return this.i;
   }

   public void copyFrom(AssertionCodeConfig var1) {
      if (var1.b != null) {
         this.b = var1.b;
      }

      if (var1.c != null) {
         this.c = var1.c;
      }

      if (var1.d != null) {
         this.d = var1.d;
      }

      if (var1.e != null) {
         this.e = var1.e;
      }

      if (var1.f != null) {
         this.f = var1.f;
      }

      if (var1.g != null) {
         this.g = var1.g;
      }

      if (var1.h != null) {
         this.h = var1.h;
      }

      if (var1.i != null) {
         this.i = var1.i;
      }
   }

   public void setConfigName(String var1) {
      this.a = var1;
   }

   public void setDisplayNameFormats(List<AssertionCodeConfig.AssertionDisplayNameFormat> var1) {
      this.b = var1 != null ? var1 : Collections.emptyList();
   }

   public void setConfigSchemas(List<JsonNode> var1) {
      this.c = var1 != null ? var1 : Collections.emptyList();
   }

   public void setConfigSchemaPatches(List<JsonResourcePatch> var1) {
      this.d = var1 != null ? var1 : Collections.emptyList();
   }

   public void setConfigDataPatches(List<JsonResourcePatch> var1) {
      this.e = var1 != null ? var1 : Collections.emptyList();
   }

   public void setUiSchemas(List<JsonNode> var1) {
      this.f = var1 != null ? var1 : Collections.emptyList();
   }

   public void setI18nResources(List<I18NResource> var1) {
      this.g = var1 != null ? var1 : Collections.emptyList();
   }

   public void setRefEntities(List<AssertionCodeConfig.AssertionRefEntity> var1) {
      this.h = var1 != null ? var1 : Collections.emptyList();
   }

   public void setRefVariables(List<AssertionCodeConfig.AssertionRefVariable> var1) {
      this.i = var1 != null ? var1 : Collections.emptyList();
   }

   public static class AssertionDisplayNameFormat {
      private String a;
      private String b;
      private List<AssertionCodeConfig.AssertionDisplayNameSubFormat> c = Collections.emptyList();

      public String getFormat() {
         return this.a;
      }

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

      public void setFormat(String var1) {
         this.a = var1;
      }

      public void setCondition(String var1) {
         this.b = var1;
      }

      public List<AssertionCodeConfig.AssertionDisplayNameSubFormat> getChildren() {
         return this.c;
      }

      public void setChildren(List<AssertionCodeConfig.AssertionDisplayNameSubFormat> var1) {
         this.c = var1 != null ? var1 : Collections.emptyList();
      }
   }

   public static class AssertionDisplayNameSubFormat {
      private String a;
      private String b;

      public String getFormat() {
         return this.a;
      }

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

      public void setFormat(String var1) {
         this.a = var1;
      }

      public void setCondition(String var1) {
         this.b = var1;
      }
   }

   public static class AssertionRefEntity {
      private String a;
      private String b;
      private AssertionCodeConfig.AssertionRefEntityType c;
      private String d;

      public String getFieldPath() {
         return this.a;
      }

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

      public AssertionCodeConfig.AssertionRefEntityType getRefType() {
         return this.c;
      }

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

      public void setFieldPath(String var1) {
         this.a = var1;
      }

      public void setSecondaryFieldPath(String var1) {
         this.b = var1;
      }

      public void setRefType(AssertionCodeConfig.AssertionRefEntityType var1) {
         this.c = var1;
      }

      public void setEntityType(String var1) {
         this.d = var1;
      }
   }

   public enum AssertionRefEntityType {
      GOID,
      GUID,
      NAME;

      // $VF: Failed to inline enum fields
      // 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!)
      static {
         String[] var0 = new String[3];
         int var4 = 0;
         String var3 = "yN>&\u0004pZ:'\u0004p@:'";
         int var5 = "yN>&\u0004pZ:'\u0004p@:'".length();
         char var2 = 4;
         int var1 = -1;

         while (true) {
            String var10002 = a(41, a(var3.substring(++var1, var1 + var2)));
            byte var10001 = -1;
            var0[var4++] = var10002;
            if ((var1 += var2) >= var5) {
               GOID = new AssertionCodeConfig.AssertionRefEntityType();
               GUID = new AssertionCodeConfig.AssertionRefEntityType();
               NAME = new AssertionCodeConfig.AssertionRefEntityType();
               return;
            }

            var2 = var3.charAt(var1);
         }
      }

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

         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 -> 30;
               case 1 -> 38;
               case 2 -> 90;
               case 3 -> 74;
               case 4 -> 95;
               case 5 -> 86;
               default -> 121;
            });
         }

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

   public static class AssertionRefVariable {
      private String a;
      private String b;
      private AssertionCodeConfig.AssertionRefVariableType c;
      private String d;
      private boolean e;
      private boolean f;
      private boolean g;
      private int h;
      private String i;
      private String j;
      private String k;

      public String getFieldPath() {
         return this.a;
      }

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

      public AssertionCodeConfig.AssertionRefVariableType getRefType() {
         return this.c;
      }

      public void setFieldPath(String var1) {
         this.a = var1;
      }

      public void setSecondaryFieldPath(String var1) {
         this.b = var1;
      }

      public void setRefType(AssertionCodeConfig.AssertionRefVariableType var1) {
         this.c = var1;
      }

      public String getPrefix() {
         return this.i;
      }

      public String getSuffix() {
         return this.j;
      }

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

      public boolean isPrefixed() {
         return this.e;
      }

      public boolean isSettable() {
         return this.f;
      }

      public boolean isMultivalued() {
         return this.g;
      }

      public int getDecorationFlags() {
         return this.h;
      }

      public String getCondition() {
         return this.k;
      }

      public void setPrefix(String var1) {
         this.i = var1;
      }

      public void setSuffix(String var1) {
         this.j = var1;
      }

      public void setDataType(String var1) {
         this.d = var1;
      }

      public void setPrefixed(boolean var1) {
         this.e = var1;
      }

      public void setSettable(boolean var1) {
         this.f = var1;
      }

      public void setMultivalued(boolean var1) {
         this.g = var1;
      }

      public void setDecorationFlags(int var1) {
         this.h = var1;
      }

      public void setCondition(String var1) {
         this.k = var1;
      }
   }

   public enum AssertionRefVariableType {
      IN,
      OUT,
      BOTH;

      // $VF: Failed to inline enum fields
      // 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!)
      static {
         String[] var0 = new String[3];
         int var4 = 0;
         String var3 = "W4{D\u0002\\5\u0003Z.{";
         int var5 = "W4{D\u0002\\5\u0003Z.{".length();
         char var2 = 4;
         int var1 = -1;

         while (true) {
            String var10002 = a(11, a(var3.substring(++var1, var1 + var2)));
            byte var10001 = -1;
            var0[var4++] = var10002;
            if ((var1 += var2) >= var5) {
               IN = new AssertionCodeConfig.AssertionRefVariableType();
               OUT = new AssertionCodeConfig.AssertionRefVariableType();
               BOTH = new AssertionCodeConfig.AssertionRefVariableType();
               return;
            }

            var2 = var3.charAt(var1);
         }
      }

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

         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 -> 30;
               case 1 -> 112;
               case 2 -> 36;
               case 3 -> 7;
               case 4 -> 26;
               case 5 -> 57;
               default -> 62;
            });
         }

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