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 TagLookupRequest complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="TagLookupRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="TagName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* <element name="CustomerId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TagPage" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
* <element name="Count" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
* <element name="TagSort" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ResponseGroup" maxOccurs="unbounded" minOccurs="0">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Request"/>
* <enumeration value="Small"/>
* <enumeration value="Accessories"/>
* <enumeration value="AlternateVersions"/>
* <enumeration value="BrowseNodes"/>
* <enumeration value="Collections"/>
* <enumeration value="EditorialReview"/>
* <enumeration value="Images"/>
* <enumeration value="ItemAttributes"/>
* <enumeration value="ItemIds"/>
* <enumeration value="Large"/>
* <enumeration value="ListmaniaLists"/>
* <enumeration value="Medium"/>
* <enumeration value="MerchantItemAttributes"/>
* <enumeration value="OfferFull"/>
* <enumeration value="OfferListings"/>
* <enumeration value="Offers"/>
* <enumeration value="OfferSummary"/>
* <enumeration value="PromotionDetails"/>
* <enumeration value="PromotionSummary"/>
* <enumeration value="Reviews"/>
* <enumeration value="SalesRank"/>
* <enumeration value="ShippingCharges"/>
* <enumeration value="Similarities"/>
* <enumeration value="Subjects"/>
* <enumeration value="TaggedGuides"/>
* <enumeration value="TaggedItems"/>
* <enumeration value="TaggedListmaniaLists"/>
* <enumeration value="TagsSummary"/>
* <enumeration value="Tags"/>
* <enumeration value="Tracks"/>
* </restriction>
* </simpleType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
* Generated by AWS Code Generator
* <p/>
* Thu Jan 10 05:27:59 PST 2008
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TagLookupRequest", propOrder = {
"tagName",
"customerId",
"tagPage",
"count",
"tagSort",
"responseGroup"
})
public class TagLookupRequest {
@XmlElement(name = "TagName")
protected List<String> tagName;
@XmlElement(name = "CustomerId")
protected String customerId;
@XmlElement(name = "TagPage")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger tagPage;
@XmlElement(name = "Count")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger count;
@XmlElement(name = "TagSort")
protected String tagSort;
@XmlElement(name = "ResponseGroup")
protected List<String> responseGroup;
/**
* Gets the value of the tagName 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 tagName property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getTagName().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getTagName() {
if (tagName == null) {
tagName = new ArrayList<String>();
}
return this.tagName;
}
public boolean isSetTagName() {
return ((this.tagName!= null)&&(!this.tagName.isEmpty()));
}
public void unsetTagName() {
this.tagName = null;
}
/**
* 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 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 count property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getCount() {
return count;
}
/**
* Sets the value of the count property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setCount(BigInteger value) {
this.count = value;
}
public boolean isSetCount() {
return (this.count!= 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);
}
/**
* 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;
}
/**
* Sets the value of the TagName property.
*
* @param values
* @return
* this instance
*/
public TagLookupRequest withTagName(String... values) {
for (String value: values) {
getTagName().add(value);
}
return this;
}
/**
* Sets the value of the CustomerId property.
*
* @param value
* @return
* this instance
*/
public TagLookupRequest withCustomerId(String value) {
setCustomerId(value);
return this;
}
/**
* Sets the value of the TagPage property.
*
* @param value
* @return
* this instance
*/
public TagLookupRequest withTagPage(BigInteger value) {
setTagPage(value);
return this;
}
/**
* Sets the value of the Count property.
*
* @param value
* @return
* this instance
*/
public TagLookupRequest withCount(BigInteger value) {
setCount(value);
return this;
}
/**
* Sets the value of the TagSort property.
*
* @param value
* @return
* this instance
*/
public TagLookupRequest withTagSort(String value) {
setTagSort(value);
return this;
}
/**
* Sets the value of the ResponseGroup property.
*
* @param values
* @return
* this instance
*/
public TagLookupRequest withResponseGroup(String... values) {
for (String value: values) {
getResponseGroup().add(value);
}
return this;
}
/**
* Sets the value of the tagName property.
*
* @param tagName
* allowed object is
* {@link String }
*
*/
public void setTagName(List<String> tagName) {
this.tagName = tagName;
}
/**
* 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();
java.util.List<String> tagNameList = getTagName();
for (String tagName : tagNameList) {
xml.append("<TagName>");
xml.append(escapeXML(tagName));
xml.append("</TagName>");
}
if (isSetCustomerId()) {
xml.append("<CustomerId>");
xml.append(escapeXML(getCustomerId()));
xml.append("</CustomerId>");
}
if (isSetTagPage()) {
xml.append("<TagPage>");
xml.append(getTagPage() + "");
xml.append("</TagPage>");
}
if (isSetCount()) {
xml.append("<Count>");
xml.append(getCount() + "");
xml.append("</Count>");
}
if (isSetTagSort()) {
xml.append("<TagSort>");
xml.append(escapeXML(getTagSort()));
xml.append("</TagSort>");
}
java.util.List<String> responseGroupList = getResponseGroup();
for (String responseGroup : responseGroupList) {
xml.append("<ResponseGroup>");
xml.append(responseGroup + "");
xml.append("</ResponseGroup>");
}
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("&");
break;
case '<':
sb.append("<");
break;
case '>':
sb.append(">");
break;
case '\'':
sb.append("'");
break;
case '"':
sb.append(""");
break;
default:
sb.append(c);
}
}
return sb.toString();
}
}
|