generated.Shiporder Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.03.21 at 04:13:34 AM UTC
//
package generated;
import java.math.BigDecimal;
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.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import com.github.jcustenborder.kafka.connect.xml.Connectable;
import org.apache.kafka.connect.data.Decimal;
import org.apache.kafka.connect.data.Schema;
import org.apache.kafka.connect.data.SchemaBuilder;
import org.apache.kafka.connect.data.Struct;
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="orderperson" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="shipto">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="address" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="city" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="country" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* <element name="item" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="note" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="quantity" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
* <element name="price" type="{http://www.w3.org/2001/XMLSchema}decimal"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="orderid" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"orderperson",
"shipto",
"item"
})
@XmlRootElement(name = "shiporder")
public class Shiporder
implements Connectable
{
@XmlElement(required = true)
protected String orderperson;
@XmlElement(required = true)
protected Shiporder.Shipto shipto;
@XmlElement(required = true)
protected List item;
@XmlAttribute(name = "orderid", required = true)
protected String orderid;
public final static Schema CONNECT_SCHEMA;
static {
SchemaBuilder builder = SchemaBuilder.struct();
builder.name("generated.Shiporder");
builder.optional();
SchemaBuilder fieldBuilder;
fieldBuilder = SchemaBuilder.string();
builder.field("orderperson", fieldBuilder.build());
builder.field("shipto", Shiporder.Shipto.CONNECT_SCHEMA);
fieldBuilder = SchemaBuilder.array(Shiporder.Item.CONNECT_SCHEMA);
builder.field("item", fieldBuilder.build());
fieldBuilder = SchemaBuilder.string();
builder.field("orderid", fieldBuilder.build());
CONNECT_SCHEMA = builder.build();
}
/**
* Gets the value of the orderperson property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOrderperson() {
return orderperson;
}
/**
* Sets the value of the orderperson property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOrderperson(String value) {
this.orderperson = value;
}
/**
* Gets the value of the shipto property.
*
* @return
* possible object is
* {@link Shiporder.Shipto }
*
*/
public Shiporder.Shipto getShipto() {
return shipto;
}
/**
* Sets the value of the shipto property.
*
* @param value
* allowed object is
* {@link Shiporder.Shipto }
*
*/
public void setShipto(Shiporder.Shipto value) {
this.shipto = value;
}
/**
* Gets the value of the item property.
*
*
* 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 set method for the item property.
*
*
* For example, to add a new item, do as follows:
*
* getItem().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Shiporder.Item }
*
*
*/
public List getItem() {
if (item == null) {
item = new ArrayList();
}
return this.item;
}
/**
* Gets the value of the orderid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOrderid() {
return orderid;
}
/**
* Sets the value of the orderid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOrderid(String value) {
this.orderid = value;
}
@Override
public Struct toConnectStruct() {
Struct struct = new Struct(CONNECT_SCHEMA);
struct.put("orderperson", this.getOrderperson());
if (null!= this.getShipto()) {
struct.put("shipto", this.getShipto().toConnectStruct());
} else {
struct.put("shipto", null);
}
if (null!= this.getItem()) {
List structs = new ArrayList();
for (Shiporder.Item o: this.getItem()) {
structs.add(o.toConnectStruct());
}
struct.put("item", structs);
}
struct.put("orderid", this.getOrderid());
return struct;
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="note" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="quantity" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
* <element name="price" type="{http://www.w3.org/2001/XMLSchema}decimal"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"title",
"note",
"quantity",
"price"
})
public static class Item
implements Connectable
{
@XmlElement(required = true)
protected String title;
protected String note;
@XmlElement(required = true)
@XmlSchemaType(name = "positiveInteger")
protected BigInteger quantity;
@XmlElement(required = true)
protected BigDecimal price;
public final static Schema CONNECT_SCHEMA;
static {
SchemaBuilder builder = SchemaBuilder.struct();
builder.name("generated.Item");
builder.optional();
SchemaBuilder fieldBuilder;
fieldBuilder = SchemaBuilder.string();
builder.field("title", fieldBuilder.build());
fieldBuilder = SchemaBuilder.string();
fieldBuilder.optional();
builder.field("note", fieldBuilder.build());
fieldBuilder = SchemaBuilder.int64();
builder.field("quantity", fieldBuilder.build());
fieldBuilder = Decimal.builder(12);
builder.field("price", fieldBuilder.build());
CONNECT_SCHEMA = builder.build();
}
/**
* 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;
}
/**
* Gets the value of the note property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNote() {
return note;
}
/**
* Sets the value of the note property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNote(String value) {
this.note = value;
}
/**
* Gets the value of the quantity property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getQuantity() {
return quantity;
}
/**
* Sets the value of the quantity property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setQuantity(BigInteger value) {
this.quantity = value;
}
/**
* Gets the value of the price property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/
public BigDecimal getPrice() {
return price;
}
/**
* Sets the value of the price property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setPrice(BigDecimal value) {
this.price = value;
}
@Override
public Struct toConnectStruct() {
Struct struct = new Struct(CONNECT_SCHEMA);
struct.put("title", this.getTitle());
struct.put("note", this.getNote());
struct.put("quantity", this.getQuantity());
struct.put("price", this.getPrice());
return struct;
}
}
/**
* Java class for anonymous complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="address" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="city" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="country" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"name",
"address",
"city",
"country"
})
public static class Shipto
implements Connectable
{
@XmlElement(required = true)
protected String name;
@XmlElement(required = true)
protected String address;
@XmlElement(required = true)
protected String city;
@XmlElement(required = true)
protected String country;
public final static Schema CONNECT_SCHEMA;
static {
SchemaBuilder builder = SchemaBuilder.struct();
builder.name("generated.Shipto");
builder.optional();
SchemaBuilder fieldBuilder;
fieldBuilder = SchemaBuilder.string();
builder.field("name", fieldBuilder.build());
fieldBuilder = SchemaBuilder.string();
builder.field("address", fieldBuilder.build());
fieldBuilder = SchemaBuilder.string();
builder.field("city", fieldBuilder.build());
fieldBuilder = SchemaBuilder.string();
builder.field("country", fieldBuilder.build());
CONNECT_SCHEMA = builder.build();
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the address property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddress() {
return address;
}
/**
* Sets the value of the address property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAddress(String value) {
this.address = value;
}
/**
* Gets the value of the city property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCity() {
return city;
}
/**
* Sets the value of the city property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCity(String value) {
this.city = value;
}
/**
* Gets the value of the country property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCountry() {
return country;
}
/**
* Sets the value of the country property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCountry(String value) {
this.country = value;
}
@Override
public Struct toConnectStruct() {
Struct struct = new Struct(CONNECT_SCHEMA);
struct.put("name", this.getName());
struct.put("address", this.getAddress());
struct.put("city", this.getCity());
struct.put("country", this.getCountry());
return struct;
}
}
}