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 ListLookupRequest complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ListLookupRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Condition" type="{http://webservices.amazon.com/AWSECommerceService/2007-10-29}Condition" minOccurs="0"/>
* <element name="DeliveryMethod" type="{http://webservices.amazon.com/AWSECommerceService/2007-10-29}DeliveryMethod" minOccurs="0"/>
* <element name="ISPUPostalCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ListId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ListType" minOccurs="0">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="WishList"/>
* <enumeration value="Listmania"/>
* <enumeration value="WeddingRegistry"/>
* </restriction>
* </simpleType>
* </element>
* <element name="MerchantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ProductGroup" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ProductPage" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
* <element name="ResponseGroup" maxOccurs="unbounded" minOccurs="0">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Request"/>
* <enumeration value="ListInfo"/>
* <enumeration value="Accessories"/>
* <enumeration value="BrowseNodes"/>
* <enumeration value="EditorialReview"/>
* <enumeration value="Images"/>
* <enumeration value="ItemAttributes"/>
* <enumeration value="ItemIds"/>
* <enumeration value="Large"/>
* <enumeration value="ListFull"/>
* <enumeration value="ListItems"/>
* <enumeration value="ListmaniaLists"/>
* <enumeration value="Medium"/>
* <enumeration value="Offers"/>
* <enumeration value="OfferSummary"/>
* <enumeration value="Reviews"/>
* <enumeration value="SalesRank"/>
* <enumeration value="Similarities"/>
* <enumeration value="Small"/>
* <enumeration value="Subjects"/>
* <enumeration value="Tracks"/>
* <enumeration value="VariationMinimum"/>
* <enumeration value="Variations"/>
* <enumeration value="VariationSummary"/>
* </restriction>
* </simpleType>
* </element>
* <element name="ReviewSort" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Sort" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
* Generated by AWS Code Generator
* <p/>
* Thu Jan 10 05:27:59 PST 2008
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ListLookupRequest", propOrder = {
"condition",
"deliveryMethod",
"ispuPostalCode",
"listId",
"listType",
"merchantId",
"productGroup",
"productPage",
"responseGroup",
"reviewSort",
"sort"
})
public class ListLookupRequest {
@XmlElement(name = "Condition")
protected Condition condition;
@XmlElement(name = "DeliveryMethod")
protected DeliveryMethod deliveryMethod;
@XmlElement(name = "ISPUPostalCode")
protected String ispuPostalCode;
@XmlElement(name = "ListId")
protected String listId;
@XmlElement(name = "ListType")
protected String listType;
@XmlElement(name = "MerchantId")
protected String merchantId;
@XmlElement(name = "ProductGroup")
protected String productGroup;
@XmlElement(name = "ProductPage")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger productPage;
@XmlElement(name = "ResponseGroup")
protected List<String> responseGroup;
@XmlElement(name = "ReviewSort")
protected String reviewSort;
@XmlElement(name = "Sort")
protected String sort;
/**
* Gets the value of the condition property.
*
* @return
* possible object is
* {@link Condition }
*
*/
public Condition getCondition() {
return condition;
}
/**
* Sets the value of the condition property.
*
* @param value
* allowed object is
* {@link Condition }
*
*/
public void setCondition(Condition value) {
this.condition = value;
}
public boolean isSetCondition() {
return (this.condition!= null);
}
/**
* Gets the value of the deliveryMethod property.
*
* @return
* possible object is
* {@link DeliveryMethod }
*
*/
public DeliveryMethod getDeliveryMethod() {
return deliveryMethod;
}
/**
* Sets the value of the deliveryMethod property.
*
* @param value
* allowed object is
* {@link DeliveryMethod }
*
*/
public void setDeliveryMethod(DeliveryMethod value) {
this.deliveryMethod = value;
}
public boolean isSetDeliveryMethod() {
return (this.deliveryMethod!= null);
}
/**
* Gets the value of the ispuPostalCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getISPUPostalCode() {
return ispuPostalCode;
}
/**
* Sets the value of the ispuPostalCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setISPUPostalCode(String value) {
this.ispuPostalCode = value;
}
public boolean isSetISPUPostalCode() {
return (this.ispuPostalCode!= null);
}
/**
* Gets the value of the listId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getListId() {
return listId;
}
/**
* Sets the value of the listId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setListId(String value) {
this.listId = value;
}
public boolean isSetListId() {
return (this.listId!= null);
}
/**
* Gets the value of the listType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getListType() {
return listType;
}
/**
* Sets the value of the listType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setListType(String value) {
this.listType = value;
}
public boolean isSetListType() {
return (this.listType!= null);
}
/**
* Gets the value of the merchantId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMerchantId() {
return merchantId;
}
/**
* Sets the value of the merchantId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMerchantId(String value) {
this.merchantId = value;
}
public boolean isSetMerchantId() {
return (this.merchantId!= null);
}
/**
* Gets the value of the productGroup property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProductGroup() {
return productGroup;
}
/**
* Sets the value of the productGroup property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProductGroup(String value) {
this.productGroup = value;
}
public boolean isSetProductGroup() {
return (this.productGroup!= null);
}
/**
* Gets the value of the productPage property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getProductPage() {
return productPage;
}
/**
* Sets the value of the productPage property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setProductPage(BigInteger value) {
this.productPage = value;
}
public boolean isSetProductPage() {
return (this.productPage!= 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 reviewSort property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getReviewSort() {
return reviewSort;
}
/**
* Sets the value of the reviewSort property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setReviewSort(String value) {
this.reviewSort = value;
}
public boolean isSetReviewSort() {
return (this.reviewSort!= null);
}
/**
* Gets the value of the sort property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSort() {
return sort;
}
/**
* Sets the value of the sort property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSort(String value) {
this.sort = value;
}
public boolean isSetSort() {
return (this.sort!= null);
}
/**
* Sets the value of the Condition property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withCondition(Condition value) {
setCondition(value);
return this;
}
/**
* Sets the value of the DeliveryMethod property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withDeliveryMethod(DeliveryMethod value) {
setDeliveryMethod(value);
return this;
}
/**
* Sets the value of the ISPUPostalCode property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withISPUPostalCode(String value) {
setISPUPostalCode(value);
return this;
}
/**
* Sets the value of the ListId property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withListId(String value) {
setListId(value);
return this;
}
/**
* Sets the value of the ListType property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withListType(String value) {
setListType(value);
return this;
}
/**
* Sets the value of the MerchantId property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withMerchantId(String value) {
setMerchantId(value);
return this;
}
/**
* Sets the value of the ProductGroup property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withProductGroup(String value) {
setProductGroup(value);
return this;
}
/**
* Sets the value of the ProductPage property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withProductPage(BigInteger value) {
setProductPage(value);
return this;
}
/**
* Sets the value of the ResponseGroup property.
*
* @param values
* @return
* this instance
*/
public ListLookupRequest withResponseGroup(String... values) {
for (String value: values) {
getResponseGroup().add(value);
}
return this;
}
/**
* Sets the value of the ReviewSort property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withReviewSort(String value) {
setReviewSort(value);
return this;
}
/**
* Sets the value of the Sort property.
*
* @param value
* @return
* this instance
*/
public ListLookupRequest withSort(String value) {
setSort(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 (isSetCondition()) {
xml.append("<Condition>");
xml.append(getCondition().value());
xml.append("</Condition>");
}
if (isSetDeliveryMethod()) {
xml.append("<DeliveryMethod>");
xml.append(getDeliveryMethod().value());
xml.append("</DeliveryMethod>");
}
if (isSetISPUPostalCode()) {
xml.append("<ISPUPostalCode>");
xml.append(escapeXML(getISPUPostalCode()));
xml.append("</ISPUPostalCode>");
}
if (isSetListId()) {
xml.append("<ListId>");
xml.append(escapeXML(getListId()));
xml.append("</ListId>");
}
if (isSetListType()) {
xml.append("<ListType>");
xml.append(getListType() + "");
xml.append("</ListType>");
}
if (isSetMerchantId()) {
xml.append("<MerchantId>");
xml.append(escapeXML(getMerchantId()));
xml.append("</MerchantId>");
}
if (isSetProductGroup()) {
xml.append("<ProductGroup>");
xml.append(escapeXML(getProductGroup()));
xml.append("</ProductGroup>");
}
if (isSetProductPage()) {
xml.append("<ProductPage>");
xml.append(getProductPage() + "");
xml.append("</ProductPage>");
}
java.util.List<String> responseGroupList = getResponseGroup();
for (String responseGroup : responseGroupList) {
xml.append("<ResponseGroup>");
xml.append(responseGroup + "");
xml.append("</ResponseGroup>");
}
if (isSetReviewSort()) {
xml.append("<ReviewSort>");
xml.append(escapeXML(getReviewSort()));
xml.append("</ReviewSort>");
}
if (isSetSort()) {
xml.append("<Sort>");
xml.append(escapeXML(getSort()));
xml.append("</Sort>");
}
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();
}
}
|