package com.l7tech.gateway.api.impl;

import com.l7tech.gateway.api.PolicyDetail;
import com.l7tech.gateway.api.ResourceSet;
import com.l7tech.util.DeserializeSafe;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlElementWrapper;
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 = "PolicyValidationContext")
@XmlType(name = "PolicyValidationContextType", propOrder = {"policyTypeValue", "properties", "resourceSets", "extension", "extensions"})
@DeserializeSafe
public class PolicyValidationContext extends ElementExtendableManagedObject {
   private AttributeExtensiblePolicyType f;
   private Map<String, Object> g;
   private List<ResourceSet> h;

   public PolicyDetail.PolicyType getPolicyType() {
      return AttributeExtensibleType.get(this.f);
   }

   public void setPolicyType(PolicyDetail.PolicyType var1) {
      this.f = AttributeExtensibleType.setNonNull(this.f == null ? new AttributeExtensiblePolicyType() : this.f, var1);
   }

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

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

   @XmlElementWrapper(name = "Resources")
   @XmlElement(name = "ResourceSet", required = true)
   public List<ResourceSet> getResourceSets() {
      return this.h;
   }

   public void setResourceSets(List<ResourceSet> var1) {
      this.h = var1;
   }

   @XmlElement(name = "PolicyType")
   protected AttributeExtensiblePolicyType getPolicyTypeValue() {
      return this.f;
   }

   protected void setPolicyTypeValue(AttributeExtensiblePolicyType var1) {
      this.f = var1;
   }
}
