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.Extension;
import com.l7tech.gateway.api.impl.PropertiesMapType;
import jakarta.xml.bind.annotation.XmlAnyElement;
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.List;
import java.util.Map;

@XmlRootElement(name = "FirewallRule")
@XmlType(name = "FirewallRuleType", propOrder = {"nameValue", "enabledValue", "ordinalValue", "properties", "extension", "extensions"})
@AccessorSupport.AccessibleResource(name = "firewallRules")
public class FirewallRuleMO extends AccessibleObject {
   private AttributeExtensibleType.AttributeExtensibleString f;
   private AttributeExtensibleType.AttributeExtensibleBoolean g = new AttributeExtensibleType.AttributeExtensibleBoolean(false);
   private Map<String, String> h;
   private AttributeExtensibleType.AttributeExtensibleInteger i;

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

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

   public boolean isEnabled() {
      return AttributeExtensibleType.get(this.g, false);
   }

   public void setEnabled(boolean var1) {
      this.g = AttributeExtensibleType.set(this.g, var1);
   }

   public int getOrdinal() {
      return AttributeExtensibleType.get(this.i);
   }

   public void setOrdinal(int var1) {
      this.i = AttributeExtensibleType.set(this.i, var1);
   }

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

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

   @XmlElement(name = "Ordinal", required = true)
   protected AttributeExtensibleType.AttributeExtensibleInteger getOrdinalValue() {
      return this.i;
   }

   protected void setOrdinalValue(AttributeExtensibleType.AttributeExtensibleInteger var1) {
      this.i = var1;
   }

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

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

   @XmlElement(name = "Enabled", required = true)
   protected AttributeExtensibleType.AttributeExtensibleBoolean getEnabledValue() {
      return this.g;
   }

   protected void setEnabledValue(AttributeExtensibleType.AttributeExtensibleBoolean var1) {
      this.g = var1;
   }

   @XmlElement(name = "Extension")
   @Override
   protected Extension getExtension() {
      return super.getExtension();
   }

   @XmlAnyElement(lax = true)
   @Override
   protected List<Object> getExtensions() {
      return super.getExtensions();
   }

   FirewallRuleMO() {
   }
}
