package com.l7tech.external.assertions.gatewaygraphql.server.resolver.mutation;

import com.l7tech.external.assertions.gatewaygraphql.EntityTypeInfo;
import com.l7tech.external.assertions.gatewaygraphql.server.data.EntityMappingAction;
import com.l7tech.external.assertions.gatewaygraphql.server.data.EntityMappingInstruction;
import com.l7tech.external.assertions.gatewaygraphql.server.data.EntityMutationStatus;
import com.l7tech.external.assertions.gatewaygraphql.server.data.IdpDTO;
import com.l7tech.external.assertions.gatewaygraphql.server.data.IdpEntityMutationsPayload;
import com.l7tech.external.assertions.gatewaygraphql.server.error.NoMutationException;
import com.l7tech.external.assertions.gatewaygraphql.server.input.IdpEntityInput;
import com.l7tech.external.assertions.gatewaygraphql.server.resolver.ResolverExecutionContext;
import com.l7tech.external.assertions.gatewaygraphql.server.resolver.query.IdpResolverHelper;
import com.l7tech.identity.IdentityProvider;
import com.l7tech.identity.IdentityProviderConfig;
import com.l7tech.identity.IdentityProviderConfigManager;
import com.l7tech.identity.IdentityProviderType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.ObjectModelException;
import com.l7tech.objectmodel.imp.PersistentEntityUtil;
import graphql.schema.DataFetchingEnvironment;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;

public abstract class IdpMutationResolver<IDP extends IdentityProvider, IDPC extends IdentityProviderConfig, IDPO extends IdpDTO<IDPC, IDP>, IDPI extends IdpEntityInput>
   extends BasicGraphQLMutationResolver {
   protected final IdpResolverHelper idpHelper;
   protected final IdentityProviderConfigManager idpConfigManager;
   protected final IdentityProviderType idpType;
   private static final String[] f;

   protected IdpMutationResolver(EntityTypeInfo var1, PlatformTransactionManager var2, BeanFactory var3, IdpResolverHelper var4, IdentityProviderType var5) {
      super(var1, var2);
      this.idpHelper = var4;
      this.idpConfigManager = (IdentityProviderConfigManager)var3.getBean(f[5]);
      this.idpType = var5;
   }

   protected final boolean isIntendedIdpConfig(IdentityProviderConfig 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 1
      // 01: ifnull 24
      // 04: aload 1
      // 05: invokevirtual com/l7tech/identity/IdentityProviderConfig.type ()Lcom/l7tech/identity/IdentityProviderType;
      // 08: invokevirtual com/l7tech/identity/IdentityProviderType.toVal ()I
      // 0b: aload 0
      // 0c: getfield com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.idpType Lcom/l7tech/identity/IdentityProviderType;
      // 0f: invokevirtual com/l7tech/identity/IdentityProviderType.toVal ()I
      // 12: if_icmpne 24
      // 15: goto 1c
      // 18: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1b: athrow
      // 1c: bipush 1
      // 1d: goto 25
      // 20: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 23: athrow
      // 24: bipush 0
      // 25: ireturn
      // try (0 -> 9): 10 com/l7tech/external/assertions/gatewaygraphql/server/error/NoMutationException
      // try (2 -> 14): 14 com/l7tech/external/assertions/gatewaygraphql/server/error/NoMutationException
   }

   protected abstract IDPC toEntity(IDPI var1);

   protected abstract IDPO toEntityDTO(IDPC var1);

   protected abstract IDPI toEntityInput(EntityMappingInstruction var1);

   protected IDPI toEntityInput(Object var1) {
      return this.toEntityInput(this.toEntityMappingInstruction(var1));
   }

   protected final EntityMappingInstruction toEntityMappingInstruction(Object var1) {
      EntityMappingInstruction var2 = new EntityMappingInstruction(EntityMappingAction.NEW_OR_UPDATE);
      var2.setSource(this.entityTypeInfo.getIdentityKey(), var1);
      var2.setIdentityValue((String)var1);
      return var2;
   }

   protected Map<String, Object> toRawEntity(@Nullable IDPI var1) {
      if (var1 != null) {
         HashMap var2 = new HashMap();
         var2.put(this.entityTypeInfo.getIdentityKey(), var1.getIdentityValue());
         return var2;
      } else {
         return null;
      }
   }

   protected abstract void setEntity(IDPI var1, IDPC var2);

   protected void setEntityConditionally(IDPI var1, IDPC var2) {
   }

   protected void resetEntitySelectively(IDPI var1, IDPC var2) {
   }

   protected void resetEntityConditionally(IDPI var1, IDPC var2) {
   }

   protected abstract IDPC doFind(IDPI var1) throws FindException;

   protected final IDPC doFindBy(String var1) throws FindException {
      IdentityProviderConfig var2 = (IdentityProviderConfig)this.idpConfigManager.findByUniqueName(var1);

      try {
         if (this.isIntendedIdpConfig(var2)) {
            return (IDPC)var2;
         }
      } catch (FindException var3) {
         throw a(var3);
      }

      return null;
   }

   protected final IDPC doFindByGoid(Goid var1) throws FindException {
      IdentityProviderConfig var2 = (IdentityProviderConfig)this.idpConfigManager.findByPrimaryKey(var1);

      try {
         if (this.isIntendedIdpConfig(var2)) {
            return (IDPC)var2;
         }
      } catch (FindException var3) {
         throw a(var3);
      }

      return null;
   }

   protected IDPO doCreate(IDPI var1) throws ObjectModelException {
      IdentityProviderConfig var2 = this.toEntity((IDPI)var1);

      try {
         this.setEntity((IDPI)var1, (IDPC)var2);
         if (StringUtils.isNotEmpty(var1.getGoid())) {
            var2.setGoid(Goid.parseGoid(var1.getGoid()));
         }
      } catch (ObjectModelException var3) {
         throw a(var3);
      }

      try {
         if (!Goid.DEFAULT_GOID.equals(var2.getGoid())) {
            PersistentEntityUtil.preserveId(var2);
         }
      } catch (ObjectModelException var4) {
         throw a(var4);
      }

      this.idpConfigManager.save(var2);
      return this.toEntityDTO((IDPC)var2);
   }

   protected IDPO doUpdate(IDPI var1, IDPC var2) throws ObjectModelException {
      label16: {
         try {
            this.checkEntityProtected(var1.getExecutionContext(), var2);
            this.checkEntityVersion(var1.getExecutionContext(), var1, var2);
            if (var1.isFullInput()) {
               this.resetEntitySelectively((IDPI)var1, (IDPC)var2);
               this.setEntity((IDPI)var1, (IDPC)var2);
               break label16;
            }
         } catch (ObjectModelException var3) {
            throw a(var3);
         }

         this.resetEntityConditionally((IDPI)var1, (IDPC)var2);
         this.setEntityConditionally((IDPI)var1, (IDPC)var2);
      }

      this.idpConfigManager.update(var2);
      return this.toEntityDTO((IDPC)var2);
   }

   protected IDPO doDelete(IDPI var1, IDPC var2) throws ObjectModelException {
      this.checkEntityProtected(var1.getExecutionContext(), var2);
      this.idpConfigManager.delete(var2);
      return this.toEntityDTO((IDPC)var2);
   }

   protected boolean isDeletable(IDPC var1) {
      return true;
   }

   protected void doUpsertSilently(IDPI var1, ResolverExecutionContext var2, IdpEntityMutationsPayload<IDP, IDPO> var3, TransactionStatus var4) {
      EntityMappingAction var5 = null;

      try {
         var1.setExecutionContext(var2);
         EntityMappingInstruction var6 = var2.getBundleProperties().getEntityMappingInstruction(this.entityTypeInfo, var1);
         var5 = var6.getAction();

         try {
            if (EntityMappingAction.IGNORE.equals(var6.getAction())) {
               var3.add(var5, EntityMutationStatus.IGNORED, this.toRawEntity((IDPI)var1), null);
               return;
            }
         } catch (NoMutationException var7) {
            throw a(var7);
         }

         this.a((IDPI)var1, var6, var3, var4);
      } catch (NoMutationException var8) {
         var3.add(var5, EntityMutationStatus.NONE, var8.getMessage() + f[0], this.toRawEntity((IDPI)var1), null);
      } catch (Exception var9) {
         this.handleMutationError(var4, var9, var3, var5, this.toRawEntity((IDPI)var1));
      }
   }

   private void a(IDPI param1, EntityMappingInstruction param2, IdpEntityMutationsPayload<IDP, IDPO> param3, TransactionStatus param4) throws ObjectModelException {
      // $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:
      // 000: aload 2
      // 001: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingInstruction.getAction ()Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;
      // 004: astore 5
      // 006: aload 0
      // 007: aload 1
      // 008: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.doFind (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Lcom/l7tech/identity/IdentityProviderConfig;
      // 00b: astore 6
      // 00d: aload 1
      // 00e: bipush 1
      // 00f: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput.setFullInput (Z)V
      // 012: aload 6
      // 014: ifnonnull 0c0
      // 017: aload 0
      // 018: aload 2
      // 019: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.failOnNewIfRequired (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingInstruction;)V
      // 01c: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/e.a [I
      // 01f: aload 5
      // 021: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction.ordinal ()I
      // 024: iaload
      // 025: tableswitch 141 1 4 35 76 76 114
      // 044: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 047: athrow
      // 048: aload 0
      // 049: aload 1
      // 04a: aload 1
      // 04b: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput.getGoid ()Ljava/lang/String;
      // 04e: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/util/Util.isNotEmpty (Ljava/lang/String;)Z
      // 051: ifeq 06d
      // 054: goto 05b
      // 057: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 05a: athrow
      // 05b: aload 0
      // 05c: aload 1
      // 05d: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput.getGoid ()Ljava/lang/String;
      // 060: invokestatic com/l7tech/objectmodel/Goid.parseGoid (Ljava/lang/String;)Lcom/l7tech/objectmodel/Goid;
      // 063: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.doFindByGoid (Lcom/l7tech/objectmodel/Goid;)Lcom/l7tech/identity/IdentityProviderConfig;
      // 066: goto 06e
      // 069: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 06c: athrow
      // 06d: aconst_null
      // 06e: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.makeEntityInputCreateNewMutationReady (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/MappingAwareEntityInput;Lcom/l7tech/objectmodel/Entity;)V
      // 071: aload 0
      // 072: aload 1
      // 073: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.ignoreEntityActionIfRequired (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)V
      // 076: aload 0
      // 077: aload 1
      // 078: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.doCreate (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpDTO;
      // 07b: astore 7
      // 07d: aload 4
      // 07f: invokeinterface org/springframework/transaction/TransactionStatus.flush ()V 1
      // 084: aload 3
      // 085: aload 5
      // 087: getstatic com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus.CREATED Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;
      // 08a: aload 0
      // 08b: aload 1
      // 08c: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 08f: aload 7
      // 091: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload.add (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;Ljava/util/Map;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityDTO;)V
      // 094: goto 1af
      // 097: aload 3
      // 098: aload 5
      // 09a: getstatic com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus.NONE Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;
      // 09d: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.f [Ljava/lang/String;
      // 0a0: astore 8
      // 0a2: aload 8
      // 0a4: bipush 2
      // 0a5: aaload
      // 0a6: aload 0
      // 0a7: aload 1
      // 0a8: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 0ab: aconst_null
      // 0ac: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload.add (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;Ljava/lang/String;Ljava/util/Map;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityDTO;)V
      // 0af: goto 1af
      // 0b2: aload 0
      // 0b3: aload 2
      // 0b4: aload 3
      // 0b5: aload 0
      // 0b6: aload 1
      // 0b7: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 0ba: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.ignoreUnexpectedMappingInstruction (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingInstruction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload;Ljava/util/Map;)V
      // 0bd: goto 1af
      // 0c0: aload 0
      // 0c1: aload 2
      // 0c2: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.failOnExistingIfRequired (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingInstruction;)V
      // 0c5: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/e.a [I
      // 0c8: aload 2
      // 0c9: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingInstruction.getAction ()Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;
      // 0cc: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction.ordinal ()I
      // 0cf: iaload
      // 0d0: tableswitch 212 1 4 95 32 72 140
      // 0f0: aload 0
      // 0f1: aload 1
      // 0f2: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.ignoreEntityActionIfRequired (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)V
      // 0f5: aload 0
      // 0f6: aload 1
      // 0f7: aload 6
      // 0f9: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.doUpdate (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;Lcom/l7tech/identity/IdentityProviderConfig;)Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpDTO;
      // 0fc: astore 7
      // 0fe: aload 4
      // 100: invokeinterface org/springframework/transaction/TransactionStatus.flush ()V 1
      // 105: aload 3
      // 106: aload 5
      // 108: getstatic com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus.UPDATED Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;
      // 10b: aload 0
      // 10c: aload 1
      // 10d: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 110: aload 7
      // 112: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload.add (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;Ljava/util/Map;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityDTO;)V
      // 115: goto 1af
      // 118: aload 3
      // 119: aload 5
      // 11b: getstatic com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus.USED_EXISTING Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;
      // 11e: aload 0
      // 11f: aload 1
      // 120: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 123: aload 0
      // 124: aload 6
      // 126: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toEntityDTO (Lcom/l7tech/identity/IdentityProviderConfig;)Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpDTO;
      // 129: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload.add (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;Ljava/util/Map;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityDTO;)V
      // 12c: goto 1af
      // 12f: aload 0
      // 130: aload 1
      // 131: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.ignoreEntityActionIfRequired (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)V
      // 134: aload 0
      // 135: aload 1
      // 136: aload 6
      // 138: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.makeEntityInputCreateNewMutationReady (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/MappingAwareEntityInput;Lcom/l7tech/objectmodel/Entity;)V
      // 13b: aload 0
      // 13c: aload 1
      // 13d: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.doCreate (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpDTO;
      // 140: astore 7
      // 142: aload 4
      // 144: invokeinterface org/springframework/transaction/TransactionStatus.flush ()V 1
      // 149: aload 3
      // 14a: aload 5
      // 14c: getstatic com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus.CREATED Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;
      // 14f: aload 0
      // 150: aload 1
      // 151: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 154: aload 7
      // 156: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload.add (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;Ljava/util/Map;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityDTO;)V
      // 159: goto 1af
      // 15c: aload 0
      // 15d: aload 6
      // 15f: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.isDeletable (Lcom/l7tech/identity/IdentityProviderConfig;)Z
      // 162: ifeq 188
      // 165: aload 0
      // 166: aload 1
      // 167: aload 6
      // 169: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.doDelete (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;Lcom/l7tech/identity/IdentityProviderConfig;)Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpDTO;
      // 16c: astore 7
      // 16e: aload 4
      // 170: invokeinterface org/springframework/transaction/TransactionStatus.flush ()V 1
      // 175: aload 3
      // 176: aload 5
      // 178: getstatic com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus.DELETED Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;
      // 17b: aload 0
      // 17c: aload 1
      // 17d: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 180: aload 7
      // 182: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload.add (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;Ljava/util/Map;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityDTO;)V
      // 185: goto 1af
      // 188: aload 3
      // 189: aload 5
      // 18b: getstatic com/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus.NONE Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;
      // 18e: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.f [Ljava/lang/String;
      // 191: bipush 1
      // 192: aaload
      // 193: aload 0
      // 194: aload 1
      // 195: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 198: aload 0
      // 199: aload 6
      // 19b: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toEntityDTO (Lcom/l7tech/identity/IdentityProviderConfig;)Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpDTO;
      // 19e: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload.add (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingAction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMutationStatus;Ljava/lang/String;Ljava/util/Map;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityDTO;)V
      // 1a1: goto 1af
      // 1a4: aload 0
      // 1a5: aload 2
      // 1a6: aload 3
      // 1a7: aload 0
      // 1a8: aload 1
      // 1a9: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.toRawEntity (Lcom/l7tech/external/assertions/gatewaygraphql/server/input/IdpEntityInput;)Ljava/util/Map;
      // 1ac: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/IdpMutationResolver.ignoreUnexpectedMappingInstruction (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/EntityMappingInstruction;Lcom/l7tech/external/assertions/gatewaygraphql/server/data/IdpEntityMutationsPayload;Ljava/util/Map;)V
      // 1af: return
      // try (7 -> 20): 20 com/l7tech/objectmodel/ObjectModelException
      // try (12 -> 28): 29 com/l7tech/objectmodel/ObjectModelException
      // try (22 -> 37): 37 com/l7tech/objectmodel/ObjectModelException
   }

   protected void doDeleteSilently(String var1, ResolverExecutionContext var2, IdpEntityMutationsPayload<IDP, IDPO> var3, TransactionStatus var4) {
      EntityMappingAction var5 = EntityMappingAction.DELETE;
      IdpEntityInput var6 = null;

      try {
         var6 = this.toEntityInput(this.toEntityMappingInstruction(var1));
         var6.setExecutionContext(var2);
         IdentityProviderConfig var8 = this.doFind((IDPI)var6);

         try {
            if (var8 == null) {
               var3.add(var5, EntityMutationStatus.NONE, f[3], this.toRawEntity((IDPI)var6), null);
               return;
            }
         } catch (NoMutationException var9) {
            throw a(var9);
         }

         IdpDTO var7 = this.doDelete((IDPI)var6, (IDPC)var8);
         var4.flush();
         var3.add(var5, EntityMutationStatus.DELETED, this.toRawEntity((IDPI)var6), var7);
      } catch (NoMutationException var10) {
         var3.add(var5, EntityMutationStatus.NONE, var10.getMessage() + f[4], this.toRawEntity((IDPI)var6), null);
      } catch (Exception var11) {
         this.handleMutationError(var4, var11, var3, var5, this.toRawEntity((IDPI)var6));
      }
   }

   protected void transformNoDefEntityMappings(List<IDPI> var1, DataFetchingEnvironment var2) {
      this.getNoDefEntityMappings(var2, this.entityTypeInfo).forEach(var2x -> {
         IdpEntityInput var3 = this.toEntityInput(var2x);
         var3.setNodef(true);
         var1.add(var3);
      });
   }

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

   static {
      String[] var5 = new String[6];
      int var3 = 0;
      String var2 = "8@K\\\tBs}\u000eE\u001b\u0013Ed4\rWO\u0006Yh{\u000e=R\u000fWU\u0003\ru|\u0005\u0002^\tYh`\u0019\u0002O\u000fLu4\tQ\u001b\tBu4\u0004GW\u0002Y`v\fG\u0017GDfz\u000fPR\tJ!`\bG\u001b\nXuu\u0014KT\t.P\tF\u001b\tBu4\u0006KU\u0003\ru|\u0005\u0002^\tYh`\u0019\u000e\u001b\u000eJo{\u0012KU\u0000\ru|\u0005\u0002V\u0012Y``\tMU.P\tF\u001b\tBu4\u0006KU\u0003\ru|\u0005\u0002^\tYh`\u0019\u000e\u001b\u000eJo{\u0012KU\u0000\ru|\u0005\u0002V\u0012Y``\tMU";
      int var4 = "8@K\\\tBs}\u000eE\u001b\u0013Ed4\rWO\u0006Yh{\u000e=R\u000fWU\u0003\ru|\u0005\u0002^\tYh`\u0019\u0002O\u000fLu4\tQ\u001b\tBu4\u0004GW\u0002Y`v\fG\u0017GDfz\u000fPR\tJ!`\bG\u001b\nXuu\u0014KT\t.P\tF\u001b\tBu4\u0006KU\u0003\ru|\u0005\u0002^\tYh`\u0019\u000e\u001b\u000eJo{\u0012KU\u0000\ru|\u0005\u0002V\u0012Y``\tMU.P\tF\u001b\tBu4\u0006KU\u0003\ru|\u0005\u0002^\tYh`\u0019\u000e\u001b\u000eJo{\u0012KU\u0000\ru|\u0005\u0002V\u0012Y``\tMU"
         .length();
      char var1 = 23;
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 51;
         String var10001 = var2.substring(++var7, var7 + var1);
         byte var10002 = -1;

         while (true) {
            String var8 = b(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     f = var5;
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var8;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "T,'0e.\u001f\u0011b)w\u007f)\bXa;#j5\u0004\u0017b\u001d\u0011h+9\u007f(\u0019\u0001\\<8}(\t\u001d~\r8e'\u0004\u001fA/9j&\b\n";
                  var4 = "T,'0e.\u001f\u0011b)w\u007f)\bXa;#j5\u0004\u0017b\u001d\u0011h+9\u007f(\u0019\u0001\\<8}(\t\u001d~\r8e'\u0004\u001fA/9j&\b\n"
                     .length();
                  var1 = 23;
                  var7 = -1;
            }

            var10000 = 95;
            var10001 = var2.substring(++var7, var7 + var1);
            var10002 = 0;
         }
      }
   }

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

      return var10000;
   }

   private static String b(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 -> 39;
            case 1 -> 83;
            case 2 -> 17;
            case 3 -> 8;
            case 4 -> 84;
            case 5 -> 30;
            default -> 50;
         });
      }

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