package com.amazonaws.a2s.model;

import java.math.BigInteger;
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.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;


/**
 <p>Java class for CustomerContentLookupRequest complex type.
 
 <p>The following schema fragment specifies the expected content contained within this class.
 
 <pre>
 * &lt;complexType name="CustomerContentLookupRequest">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="CustomerId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="ResponseGroup" maxOccurs="unbounded" minOccurs="0">
 *           &lt;simpleType>
 *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *               &lt;enumeration value="Request"/>
 *               &lt;enumeration value="CustomerInfo"/>
 *               &lt;enumeration value="CustomerReviews"/>
 *               &lt;enumeration value="CustomerLists"/>
 *               &lt;enumeration value="CustomerFull"/>
 *               &lt;enumeration value="TaggedGuides"/>
 *               &lt;enumeration value="TaggedItems"/>
 *               &lt;enumeration value="TaggedListmaniaLists"/>
 *               &lt;enumeration value="TagsSummary"/>
 *               &lt;enumeration value="Tags"/>
 *             &lt;/restriction>
 *           &lt;/simpleType>
 *         &lt;/element>
 *         &lt;element name="ReviewPage" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
 *         &lt;element name="TagPage" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
 *         &lt;element name="TagsPerPage" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
 *         &lt;element name="TagSort" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 </pre>
 * Generated by AWS Code Generator
 <p/>
 * Thu Jan 10 05:27:59 PST 2008
 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CustomerContentLookupRequest", propOrder = {
    "customerId",
    "responseGroup",
    "reviewPage",
    "tagPage",
    "tagsPerPage",
    "tagSort"
})
public class CustomerContentLookupRequest {

    @XmlElement(name = "CustomerId")
    protected String customerId;
    @XmlElement(name = "ResponseGroup")
    protected List<String> responseGroup;
    @XmlElement(name = "ReviewPage")
    @XmlSchemaType(name = "positiveInteger")
    protected BigInteger reviewPage;
    @XmlElement(name = "TagPage")
    @XmlSchemaType(name = "positiveInteger")
    protected BigInteger tagPage;
    @XmlElement(name = "TagsPerPage")
    @XmlSchemaType(name = "positiveInteger")
    protected BigInteger tagsPerPage;
    @XmlElement(name = "TagSort")
    protected String tagSort;

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

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

    public boolean isSetCustomerId() {
        return (this.customerId!= null);
    }

    /**
     * Gets the value of the responseGroup 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 responseGroup property.
     
     <p>
     * For example, to add a new item, do as follows:
     <pre>
     *    getResponseGroup().add(newItem);
     </pre>
     
     
     <p>
     * Objects of the following type(s) are allowed in the list
     {@link String }
     
     
     */
    public List<String> getResponseGroup() {
        if (responseGroup == null) {
            responseGroup = new ArrayList<String>();
        }
        return this.responseGroup;
    }

    public boolean isSetResponseGroup() {
        return ((this.responseGroup!= null)&&(!this.responseGroup.isEmpty()));
    }

    public void unsetResponseGroup() {
        this.responseGroup = null;
    }

    /**
     * Gets the value of the reviewPage property.
     
     @return
     *     possible object is
     *     {@link BigInteger }
     *     
     */
    public BigInteger getReviewPage() {
        return reviewPage;
    }

    /**
     * Sets the value of the reviewPage property.
     
     @param value
     *     allowed object is
     *     {@link BigInteger }
     *     
     */
    public void setReviewPage(BigInteger value) {
        this.reviewPage = value;
    }

    public boolean isSetReviewPage() {
        return (this.reviewPage!= null);
    }

    /**
     * Gets the value of the tagPage property.
     
     @return
     *     possible object is
     *     {@link BigInteger }
     *     
     */
    public BigInteger getTagPage() {
        return tagPage;
    }

    /**
     * Sets the value of the tagPage property.
     
     @param value
     *     allowed object is
     *     {@link BigInteger }
     *     
     */
    public void setTagPage(BigInteger value) {
        this.tagPage = value;
    }

    public boolean isSetTagPage() {
        return (this.tagPage!= null);
    }

    /**
     * Gets the value of the tagsPerPage property.
     
     @return
     *     possible object is
     *     {@link BigInteger }
     *     
     */
    public BigInteger getTagsPerPage() {
        return tagsPerPage;
    }

    /**
     * Sets the value of the tagsPerPage property.
     
     @param value
     *     allowed object is
     *     {@link BigInteger }
     *     
     */
    public void setTagsPerPage(BigInteger value) {
        this.tagsPerPage = value;
    }

    public boolean isSetTagsPerPage() {
        return (this.tagsPerPage!= null);
    }

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

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

    public boolean isSetTagSort() {
        return (this.tagSort!= null);
    }

    /**
     * Sets the value of the CustomerId property.
     
     @param value
     @return
     *     this instance
     */
    public CustomerContentLookupRequest withCustomerId(String value) {
        setCustomerId(value);
        return this;
    }

    /**
     * Sets the value of the ResponseGroup property.
     
     @param values
     @return
     *     this instance
     */
    public CustomerContentLookupRequest withResponseGroup(String... values) {
        for (String value: values) {
            getResponseGroup().add(value);
        }
        return this;
    }

    /**
     * Sets the value of the ReviewPage property.
     
     @param value
     @return
     *     this instance
     */
    public CustomerContentLookupRequest withReviewPage(BigInteger value) {
        setReviewPage(value);
        return this;
    }

    /**
     * Sets the value of the TagPage property.
     
     @param value
     @return
     *     this instance
     */
    public CustomerContentLookupRequest withTagPage(BigInteger value) {
        setTagPage(value);
        return this;
    }

    /**
     * Sets the value of the TagsPerPage property.
     
     @param value
     @return
     *     this instance
     */
    public CustomerContentLookupRequest withTagsPerPage(BigInteger value) {
        setTagsPerPage(value);
        return this;
    }

    /**
     * Sets the value of the TagSort property.
     
     @param value
     @return
     *     this instance
     */
    public CustomerContentLookupRequest withTagSort(String value) {
        setTagSort(value);
        return this;
    }

    /**
     * Sets the value of the responseGroup property.
     
     @param responseGroup
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setResponseGroup(List<String> responseGroup) {
        this.responseGroup = responseGroup;
    }
    

    /**
     
     * XML fragment representation of this object
     
     @return XML fragment for this object. Name for outer
     * tag expected to be set by calling method. This fragment
     * returns inner properties representation only
     */
    protected String toXMLFragment() {
        StringBuffer xml = new StringBuffer();
        if (isSetCustomerId()) {
            xml.append("<CustomerId>");
            xml.append(escapeXML(getCustomerId()));
            xml.append("</CustomerId>");
        }
        java.util.List<String> responseGroupList  =  getResponseGroup();
        for (String responseGroup : responseGroupList) { 
            xml.append("<ResponseGroup>");
            xml.append(responseGroup + "");
            xml.append("</ResponseGroup>");
        }  
        if (isSetReviewPage()) {
            xml.append("<ReviewPage>");
            xml.append(getReviewPage() "");
            xml.append("</ReviewPage>");
        }
        if (isSetTagPage()) {
            xml.append("<TagPage>");
            xml.append(getTagPage() "");
            xml.append("</TagPage>");
        }
        if (isSetTagsPerPage()) {
            xml.append("<TagsPerPage>");
            xml.append(getTagsPerPage() "");
            xml.append("</TagsPerPage>");
        }
        if (isSetTagSort()) {
            xml.append("<TagSort>");
            xml.append(escapeXML(getTagSort()));
            xml.append("</TagSort>");
        }
        return xml.toString();
    }

    /**
     
     * Escape XML special characters
     */
    private String escapeXML(String string) {
        StringBuffer sb = new StringBuffer();
        int length = string.length();
        for (int i = 0; i < length; ++i) {
            char c = string.charAt(i);
            switch (c) {
            case '&':
                sb.append("&amp;");
                break;
            case '<':
                sb.append("&lt;");
                break;
            case '>':
                sb.append("&gt;");
                break;
            case '\'':
                sb.append("&#039;");
                break;
            case '"':
                sb.append("&quot;");
                break;
            default:
                sb.append(c);
            }
        }
        return sb.toString();
    }


}