
gobblin.rest.Table Maven / Gradle / Ivy
The newest version!
package gobblin.rest;
import java.util.List;
import javax.annotation.Generated;
import com.linkedin.data.DataMap;
import com.linkedin.data.schema.PathSpec;
import com.linkedin.data.schema.RecordDataSchema;
import com.linkedin.data.template.DataTemplateUtil;
import com.linkedin.data.template.GetMode;
import com.linkedin.data.template.RecordTemplate;
import com.linkedin.data.template.SetMode;
/**
* Gobblin table definition
*
*/
@Generated(value = "com.linkedin.pegasus.generator.PegasusDataTemplateGenerator", comments = "LinkedIn Data Template. Generated from /Users/stakiar/Documents/idea_linkedin/gobblin-proxy_trunk/gobblin-github/gobblin-rest-service/gobblin-rest-api/src/main/pegasus/gobblin/rest/Table.pdsc.", date = "Thu May 12 11:38:45 PDT 2016")
public class Table
extends RecordTemplate
{
private final static Table.Fields _fields = new Table.Fields();
private final static RecordDataSchema SCHEMA = ((RecordDataSchema) DataTemplateUtil.parseSchema("{\"type\":\"record\",\"name\":\"Table\",\"namespace\":\"gobblin.rest\",\"doc\":\"Gobblin table definition\",\"fields\":[{\"name\":\"namespace\",\"type\":\"string\",\"doc\":\"Table namespace\",\"optional\":true},{\"name\":\"name\",\"type\":\"string\",\"doc\":\"Table name\"},{\"name\":\"type\",\"type\":{\"type\":\"enum\",\"name\":\"TableTypeEnum\",\"symbols\":[\"SNAPSHOT_ONLY\",\"SNAPSHOT_APPEND\",\"APPEND_ONLY\"]},\"doc\":\"Table type\",\"optional\":true}]}"));
private final static RecordDataSchema.Field FIELD_Namespace = SCHEMA.getField("namespace");
private final static RecordDataSchema.Field FIELD_Name = SCHEMA.getField("name");
private final static RecordDataSchema.Field FIELD_Type = SCHEMA.getField("type");
public Table() {
super(new DataMap(), SCHEMA);
}
public Table(DataMap data) {
super(data, SCHEMA);
}
public static Table.Fields fields() {
return _fields;
}
/**
* Existence checker for namespace
*
* @see Fields#namespace
*/
public boolean hasNamespace() {
return contains(FIELD_Namespace);
}
/**
* Remover for namespace
*
* @see Fields#namespace
*/
public void removeNamespace() {
remove(FIELD_Namespace);
}
/**
* Getter for namespace
*
* @see Fields#namespace
*/
public String getNamespace(GetMode mode) {
return obtainDirect(FIELD_Namespace, String.class, mode);
}
/**
* Getter for namespace
*
* @see Fields#namespace
*/
public String getNamespace() {
return getNamespace(GetMode.STRICT);
}
/**
* Setter for namespace
*
* @see Fields#namespace
*/
public Table setNamespace(String value, SetMode mode) {
putDirect(FIELD_Namespace, String.class, String.class, value, mode);
return this;
}
/**
* Setter for namespace
*
* @see Fields#namespace
*/
public Table setNamespace(String value) {
putDirect(FIELD_Namespace, String.class, String.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for name
*
* @see Fields#name
*/
public boolean hasName() {
return contains(FIELD_Name);
}
/**
* Remover for name
*
* @see Fields#name
*/
public void removeName() {
remove(FIELD_Name);
}
/**
* Getter for name
*
* @see Fields#name
*/
public String getName(GetMode mode) {
return obtainDirect(FIELD_Name, String.class, mode);
}
/**
* Getter for name
*
* @see Fields#name
*/
public String getName() {
return getName(GetMode.STRICT);
}
/**
* Setter for name
*
* @see Fields#name
*/
public Table setName(String value, SetMode mode) {
putDirect(FIELD_Name, String.class, String.class, value, mode);
return this;
}
/**
* Setter for name
*
* @see Fields#name
*/
public Table setName(String value) {
putDirect(FIELD_Name, String.class, String.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for type
*
* @see Fields#type
*/
public boolean hasType() {
return contains(FIELD_Type);
}
/**
* Remover for type
*
* @see Fields#type
*/
public void removeType() {
remove(FIELD_Type);
}
/**
* Getter for type
*
* @see Fields#type
*/
public TableTypeEnum getType(GetMode mode) {
return obtainDirect(FIELD_Type, TableTypeEnum.class, mode);
}
/**
* Getter for type
*
* @see Fields#type
*/
public TableTypeEnum getType() {
return getType(GetMode.STRICT);
}
/**
* Setter for type
*
* @see Fields#type
*/
public Table setType(TableTypeEnum value, SetMode mode) {
putDirect(FIELD_Type, TableTypeEnum.class, String.class, value, mode);
return this;
}
/**
* Setter for type
*
* @see Fields#type
*/
public Table setType(TableTypeEnum value) {
putDirect(FIELD_Type, TableTypeEnum.class, String.class, value, SetMode.DISALLOW_NULL);
return this;
}
@Override
public Table clone()
throws CloneNotSupportedException
{
return ((Table) super.clone());
}
@Override
public Table copy()
throws CloneNotSupportedException
{
return ((Table) super.copy());
}
public static class Fields
extends PathSpec
{
public Fields(List path, String name) {
super(path, name);
}
public Fields() {
super();
}
/**
* Table namespace
*
*/
public PathSpec namespace() {
return new PathSpec(getPathComponents(), "namespace");
}
/**
* Table name
*
*/
public PathSpec name() {
return new PathSpec(getPathComponents(), "name");
}
/**
* Table type
*
*/
public PathSpec type() {
return new PathSpec(getPathComponents(), "type");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy