package com.l7tech.gateway.api;

import com.l7tech.gateway.api.impl.AccessorSupport;
import com.l7tech.gateway.api.impl.AttributeExtensibleType;
import com.l7tech.gateway.api.impl.ElementExtendableAccessibleObject;
import com.l7tech.gateway.api.impl.PropertiesMapType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@XmlRootElement(name = "RevocationCheckingPolicy")
@XmlType(
   name = "RevocationCheckingPolicyType",
   propOrder = {"nameValue", "defaultPolicy", "continueOnServerUnavailable", "defaultSuccess", "revocationCheckItems", "properties", "extension", "extensions"}
)
@AccessorSupport.AccessibleResource(name = "revocationCheckingPolicies")
public class RevocationCheckingPolicyMO extends ElementExtendableAccessibleObject {
   private AttributeExtensibleType.AttributeExtensibleString h;
   private List<RevocationCheckingPolicyItemMO> i = new ArrayList<>();
   private Boolean j;
   private Boolean k;
   private Boolean l;
   private Map<String, Object> m;

   public String getName() {
      return AttributeExtensibleType.get(this.h);
   }

   public void setName(String var1) {
      this.h = AttributeExtensibleType.set(this.h, var1);
   }

   @XmlElement(name = "Properties")
   @XmlJavaTypeAdapter(PropertiesMapType.PropertiesMapTypeAdapter.class)
   public Map<String, Object> getProperties() {
      return this.m;
   }

   public void setProperties(Map<String, Object> var1) {
      this.m = var1;
   }

   @XmlElement(name = "RevocationCheckItems")
   public List<RevocationCheckingPolicyItemMO> getRevocationCheckItems() {
      return this.i;
   }

   public void setRevocationCheckItems(List<RevocationCheckingPolicyItemMO> var1) {
      this.i = var1;
   }

   @XmlElement(name = "DefaultPolicy")
   public Boolean isDefaultPolicy() {
      return this.j == null ? false : this.j;
   }

   public void setDefaultPolicy(Boolean var1) {
      this.j = var1;
   }

   @XmlElement(name = "DefaultSuccess")
   public Boolean isDefaultSuccess() {
      return this.k == null ? false : this.k;
   }

   public void setDefaultSuccess(Boolean var1) {
      this.k = var1;
   }

   @XmlElement(name = "ContinueOnServerUnavailable")
   public Boolean isContinueOnServerUnavailable() {
      return this.l == null ? false : this.l;
   }

   public void setContinueOnServerUnavailable(Boolean var1) {
      this.l = var1;
   }

   @XmlElement(name = "Name", required = true)
   protected AttributeExtensibleType.AttributeExtensibleString getNameValue() {
      return this.h;
   }

   protected void setNameValue(AttributeExtensibleType.AttributeExtensibleString var1) {
      this.h = var1;
   }

   RevocationCheckingPolicyMO() {
   }
}
