//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2019.08.07 at 12:33:12 PM UTC 
//


package com.sun.ts.lib.implementation.sun.javaee.runtime.web;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "constraintFieldValue"
})
@XmlRootElement(name = "constraint-field")
public class ConstraintField implements Serializable
{

    private final static long serialVersionUID = 1L;
    @XmlAttribute(name = "name", required = true)
    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
    protected String name;
    @XmlAttribute(name = "scope")
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    protected String scope;
    @XmlAttribute(name = "cache-on-match")
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    protected String cacheOnMatch;
    @XmlAttribute(name = "cache-on-match-failure")
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    protected String cacheOnMatchFailure;
    @XmlElement(name = "constraint-field-value")
    protected List<ConstraintFieldValue> constraintFieldValue;

    /**
     * Gets the value of the name property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the scope property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getScope() {
        if (scope == null) {
            return "request.parameter";
        } else {
            return scope;
        }
    }

    /**
     * Sets the value of the scope property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setScope(String value) {
        this.scope = value;
    }

    /**
     * Gets the value of the cacheOnMatch property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getCacheOnMatch() {
        if (cacheOnMatch == null) {
            return "true";
        } else {
            return cacheOnMatch;
        }
    }

    /**
     * Sets the value of the cacheOnMatch property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setCacheOnMatch(String value) {
        this.cacheOnMatch = value;
    }

    /**
     * Gets the value of the cacheOnMatchFailure property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getCacheOnMatchFailure() {
        if (cacheOnMatchFailure == null) {
            return "false";
        } else {
            return cacheOnMatchFailure;
        }
    }

    /**
     * Sets the value of the cacheOnMatchFailure property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setCacheOnMatchFailure(String value) {
        this.cacheOnMatchFailure = value;
    }

    /**
     * Gets the value of the constraintFieldValue property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the constraintFieldValue property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getConstraintFieldValue().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link ConstraintFieldValue }
     * 
     * 
     */
    public List<ConstraintFieldValue> getConstraintFieldValue() {
        if (constraintFieldValue == null) {
            constraintFieldValue = new ArrayList<ConstraintFieldValue>();
        }
        return this.constraintFieldValue;
    }

}
