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 SellerLookupRequest complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SellerLookupRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ResponseGroup" maxOccurs="unbounded" minOccurs="0">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Request"/>
* <enumeration value="Seller"/>
* </restriction>
* </simpleType>
* </element>
* <element name="SellerId" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* <element name="FeedbackPage" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" 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 = "SellerLookupRequest", propOrder = {
"responseGroup",
"sellerId",
"feedbackPage"
})
public class SellerLookupRequest {
@XmlElement(name = "ResponseGroup")
protected List<String> responseGroup;
@XmlElement(name = "SellerId")
protected List<String> sellerId;
@XmlElement(name = "FeedbackPage")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger feedbackPage;
/**
* 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.
*
* <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 sellerId property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSellerId().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getSellerId() {
if (sellerId == null) {
sellerId = new ArrayList<String>();
}
return this.sellerId;
}
public boolean isSetSellerId() {
return ((this.sellerId!= null)&&(!this.sellerId.isEmpty()));
}
public void unsetSellerId() {
this.sellerId = null;
}
/**
* Gets the value of the feedbackPage property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getFeedbackPage() {
return feedbackPage;
}
/**
* Sets the value of the feedbackPage property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setFeedbackPage(BigInteger value) {
this.feedbackPage = value;
}
public boolean isSetFeedbackPage() {
return (this.feedbackPage!= null);
}
/**
* Sets the value of the ResponseGroup property.
*
* @param values
* @return
* this instance
*/
public SellerLookupRequest withResponseGroup(String... values) {
for (String value: values) {
getResponseGroup().add(value);
}
return this;
}
/**
* Sets the value of the SellerId property.
*
* @param values
* @return
* this instance
*/
public SellerLookupRequest withSellerId(String... values) {
for (String value: values) {
getSellerId().add(value);
}
return this;
}
/**
* Sets the value of the FeedbackPage property.
*
* @param value
* @return
* this instance
*/
public SellerLookupRequest withFeedbackPage(BigInteger value) {
setFeedbackPage(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;
}
/**
* Sets the value of the sellerId property.
*
* @param sellerId
* allowed object is
* {@link String }
*
*/
public void setSellerId(List<String> sellerId) {
this.sellerId = sellerId;
}
/**
*
* 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> responseGroupList = getResponseGroup();
for (String responseGroup : responseGroupList) {
xml.append("<ResponseGroup>");
xml.append(responseGroup + "");
xml.append("</ResponseGroup>");
}
java.util.List<String> sellerIdList = getSellerId();
for (String sellerId : sellerIdList) {
xml.append("<SellerId>");
xml.append(escapeXML(sellerId));
xml.append("</SellerId>");
}
if (isSetFeedbackPage()) {
xml.append("<FeedbackPage>");
xml.append(getFeedbackPage() + "");
xml.append("</FeedbackPage>");
}
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();
}
}
|