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 SellerListingSearchRequest complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SellerListingSearchRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Keywords" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ListingPage" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
* <element name="OfferStatus" minOccurs="0">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Open"/>
* <enumeration value="Closed"/>
* </restriction>
* </simpleType>
* </element>
* <element name="ResponseGroup" maxOccurs="unbounded" minOccurs="0">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Request"/>
* <enumeration value="SellerListing"/>
* </restriction>
* </simpleType>
* </element>
* <element name="SellerId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Sort" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" 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 = "SellerListingSearchRequest", propOrder = {
"keywords",
"listingPage",
"offerStatus",
"responseGroup",
"sellerId",
"sort",
"title"
})
public class SellerListingSearchRequest {
@XmlElement(name = "Keywords")
protected String keywords;
@XmlElement(name = "ListingPage")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger listingPage;
@XmlElement(name = "OfferStatus")
protected String offerStatus;
@XmlElement(name = "ResponseGroup")
protected List<String> responseGroup;
@XmlElement(name = "SellerId", required = true)
protected String sellerId;
@XmlElement(name = "Sort")
protected String sort;
@XmlElement(name = "Title")
protected String title;
/**
* Gets the value of the keywords property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getKeywords() {
return keywords;
}
/**
* Sets the value of the keywords property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setKeywords(String value) {
this.keywords = value;
}
public boolean isSetKeywords() {
return (this.keywords!= null);
}
/**
* Gets the value of the listingPage property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getListingPage() {
return listingPage;
}
/**
* Sets the value of the listingPage property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setListingPage(BigInteger value) {
this.listingPage = value;
}
public boolean isSetListingPage() {
return (this.listingPage!= null);
}
/**
* Gets the value of the offerStatus property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOfferStatus() {
return offerStatus;
}
/**
* Sets the value of the offerStatus property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOfferStatus(String value) {
this.offerStatus = value;
}
public boolean isSetOfferStatus() {
return (this.offerStatus!= 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 sellerId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSellerId() {
return sellerId;
}
/**
* Sets the value of the sellerId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSellerId(String value) {
this.sellerId = value;
}
public boolean isSetSellerId() {
return (this.sellerId!= 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);
}
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
public boolean isSetTitle() {
return (this.title!= null);
}
/**
* Sets the value of the Keywords property.
*
* @param value
* @return
* this instance
*/
public SellerListingSearchRequest withKeywords(String value) {
setKeywords(value);
return this;
}
/**
* Sets the value of the ListingPage property.
*
* @param value
* @return
* this instance
*/
public SellerListingSearchRequest withListingPage(BigInteger value) {
setListingPage(value);
return this;
}
/**
* Sets the value of the OfferStatus property.
*
* @param value
* @return
* this instance
*/
public SellerListingSearchRequest withOfferStatus(String value) {
setOfferStatus(value);
return this;
}
/**
* Sets the value of the ResponseGroup property.
*
* @param values
* @return
* this instance
*/
public SellerListingSearchRequest withResponseGroup(String... values) {
for (String value: values) {
getResponseGroup().add(value);
}
return this;
}
/**
* Sets the value of the SellerId property.
*
* @param value
* @return
* this instance
*/
public SellerListingSearchRequest withSellerId(String value) {
setSellerId(value);
return this;
}
/**
* Sets the value of the Sort property.
*
* @param value
* @return
* this instance
*/
public SellerListingSearchRequest withSort(String value) {
setSort(value);
return this;
}
/**
* Sets the value of the Title property.
*
* @param value
* @return
* this instance
*/
public SellerListingSearchRequest withTitle(String value) {
setTitle(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 (isSetKeywords()) {
xml.append("<Keywords>");
xml.append(escapeXML(getKeywords()));
xml.append("</Keywords>");
}
if (isSetListingPage()) {
xml.append("<ListingPage>");
xml.append(getListingPage() + "");
xml.append("</ListingPage>");
}
if (isSetOfferStatus()) {
xml.append("<OfferStatus>");
xml.append(getOfferStatus() + "");
xml.append("</OfferStatus>");
}
java.util.List<String> responseGroupList = getResponseGroup();
for (String responseGroup : responseGroupList) {
xml.append("<ResponseGroup>");
xml.append(responseGroup + "");
xml.append("</ResponseGroup>");
}
if (isSetSellerId()) {
xml.append("<SellerId>");
xml.append(escapeXML(getSellerId()));
xml.append("</SellerId>");
}
if (isSetSort()) {
xml.append("<Sort>");
xml.append(escapeXML(getSort()));
xml.append("</Sort>");
}
if (isSetTitle()) {
xml.append("<Title>");
xml.append(escapeXML(getTitle()));
xml.append("</Title>");
}
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();
}
}
|