
gobblin.service.FlowConfig Maven / Gradle / Ivy
The newest version!
package gobblin.service;
import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
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;
import com.linkedin.data.template.StringMap;
/**
* Defines a flow configuration that can be compiled into Gobblin jobs
*
*/
@Generated(value = "com.linkedin.pegasus.generator.JavaCodeUtil", comments = "Rest.li Data Template. Generated from /Users/ibuenros/repos/gobblin/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-api/src/main/pegasus/gobblin/service/FlowConfig.pdsc.", date = "Fri Jul 21 13:35:27 PDT 2017")
public class FlowConfig
extends RecordTemplate
{
private final static FlowConfig.Fields _fields = new FlowConfig.Fields();
private final static RecordDataSchema SCHEMA = ((RecordDataSchema) DataTemplateUtil.parseSchema("{\"type\":\"record\",\"name\":\"FlowConfig\",\"namespace\":\"gobblin.service\",\"doc\":\"Defines a flow configuration that can be compiled into Gobblin jobs\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"record\",\"name\":\"FlowId\",\"doc\":\"Identifier for a Gobblin as a Service flow\",\"fields\":[{\"name\":\"flowName\",\"type\":\"string\",\"doc\":\"Name of the flow\",\"validate\":{\"strlen\":{\"min\":1,\"max\":128}}},{\"name\":\"flowGroup\",\"type\":\"string\",\"doc\":\"Group of the flow. This defines the namespace for the flow.\",\"validate\":{\"strlen\":{\"min\":1,\"max\":128}}}]},\"doc\":\"Identifier for the flow\"},{\"name\":\"schedule\",\"type\":{\"type\":\"record\",\"name\":\"Schedule\",\"doc\":\"Attributes for defining a job schedule\",\"fields\":[{\"name\":\"cronSchedule\",\"type\":\"string\",\"doc\":\"Schedule for flow in cron format\",\"validate\":{\"gobblin.service.validator.CronValidator\":{}}},{\"name\":\"runImmediately\",\"type\":\"boolean\",\"doc\":\"Set to true to request that a job with a schedule be run immediately in addition to being scheduled\",\"default\":false}]},\"doc\":\"Optional schedule for when to execution the flow. If a schedule is not specified then the flow is executed immediately.\",\"optional\":true},{\"name\":\"templateUris\",\"type\":\"string\",\"doc\":\"Comma separated list of URIs for templates used in the flow. The template location is defined by the multiproduct that packages the template.\",\"validate\":{\"gobblin.service.validator.TemplateUriValidator\":{}}},{\"name\":\"properties\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"doc\":\"Properties for the flow. These properties are passed to the compiled Gobblin jobs.\"}]}"));
private final static RecordDataSchema.Field FIELD_Id = SCHEMA.getField("id");
private final static RecordDataSchema.Field FIELD_Schedule = SCHEMA.getField("schedule");
private final static RecordDataSchema.Field FIELD_TemplateUris = SCHEMA.getField("templateUris");
private final static RecordDataSchema.Field FIELD_Properties = SCHEMA.getField("properties");
public FlowConfig() {
super(new DataMap(), SCHEMA);
}
public FlowConfig(DataMap data) {
super(data, SCHEMA);
}
public static FlowConfig.Fields fields() {
return _fields;
}
/**
* Existence checker for id
*
* @see FlowConfig.Fields#id
*/
public boolean hasId() {
return contains(FIELD_Id);
}
/**
* Remover for id
*
* @see FlowConfig.Fields#id
*/
public void removeId() {
remove(FIELD_Id);
}
/**
* Getter for id
*
* @see FlowConfig.Fields#id
*/
public FlowId getId(GetMode mode) {
return obtainWrapped(FIELD_Id, FlowId.class, mode);
}
/**
* Getter for id
*
* @return
* Required field. Could be null for partial record.
* @see FlowConfig.Fields#id
*/
@Nonnull
public FlowId getId() {
return obtainWrapped(FIELD_Id, FlowId.class, GetMode.STRICT);
}
/**
* Setter for id
*
* @see FlowConfig.Fields#id
*/
public FlowConfig setId(FlowId value, SetMode mode) {
putWrapped(FIELD_Id, FlowId.class, value, mode);
return this;
}
/**
* Setter for id
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see FlowConfig.Fields#id
*/
public FlowConfig setId(
@Nonnull
FlowId value) {
putWrapped(FIELD_Id, FlowId.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for schedule
*
* @see FlowConfig.Fields#schedule
*/
public boolean hasSchedule() {
return contains(FIELD_Schedule);
}
/**
* Remover for schedule
*
* @see FlowConfig.Fields#schedule
*/
public void removeSchedule() {
remove(FIELD_Schedule);
}
/**
* Getter for schedule
*
* @see FlowConfig.Fields#schedule
*/
public Schedule getSchedule(GetMode mode) {
return obtainWrapped(FIELD_Schedule, Schedule.class, mode);
}
/**
* Getter for schedule
*
* @return
* Optional field. Always check for null.
* @see FlowConfig.Fields#schedule
*/
@Nullable
public Schedule getSchedule() {
return obtainWrapped(FIELD_Schedule, Schedule.class, GetMode.STRICT);
}
/**
* Setter for schedule
*
* @see FlowConfig.Fields#schedule
*/
public FlowConfig setSchedule(Schedule value, SetMode mode) {
putWrapped(FIELD_Schedule, Schedule.class, value, mode);
return this;
}
/**
* Setter for schedule
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see FlowConfig.Fields#schedule
*/
public FlowConfig setSchedule(
@Nonnull
Schedule value) {
putWrapped(FIELD_Schedule, Schedule.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for templateUris
*
* @see FlowConfig.Fields#templateUris
*/
public boolean hasTemplateUris() {
return contains(FIELD_TemplateUris);
}
/**
* Remover for templateUris
*
* @see FlowConfig.Fields#templateUris
*/
public void removeTemplateUris() {
remove(FIELD_TemplateUris);
}
/**
* Getter for templateUris
*
* @see FlowConfig.Fields#templateUris
*/
public String getTemplateUris(GetMode mode) {
return obtainDirect(FIELD_TemplateUris, String.class, mode);
}
/**
* Getter for templateUris
*
* @return
* Required field. Could be null for partial record.
* @see FlowConfig.Fields#templateUris
*/
@Nonnull
public String getTemplateUris() {
return obtainDirect(FIELD_TemplateUris, String.class, GetMode.STRICT);
}
/**
* Setter for templateUris
*
* @see FlowConfig.Fields#templateUris
*/
public FlowConfig setTemplateUris(String value, SetMode mode) {
putDirect(FIELD_TemplateUris, String.class, String.class, value, mode);
return this;
}
/**
* Setter for templateUris
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see FlowConfig.Fields#templateUris
*/
public FlowConfig setTemplateUris(
@Nonnull
String value) {
putDirect(FIELD_TemplateUris, String.class, String.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for properties
*
* @see FlowConfig.Fields#properties
*/
public boolean hasProperties() {
return contains(FIELD_Properties);
}
/**
* Remover for properties
*
* @see FlowConfig.Fields#properties
*/
public void removeProperties() {
remove(FIELD_Properties);
}
/**
* Getter for properties
*
* @see FlowConfig.Fields#properties
*/
public StringMap getProperties(GetMode mode) {
return obtainWrapped(FIELD_Properties, StringMap.class, mode);
}
/**
* Getter for properties
*
* @return
* Required field. Could be null for partial record.
* @see FlowConfig.Fields#properties
*/
@Nonnull
public StringMap getProperties() {
return obtainWrapped(FIELD_Properties, StringMap.class, GetMode.STRICT);
}
/**
* Setter for properties
*
* @see FlowConfig.Fields#properties
*/
public FlowConfig setProperties(StringMap value, SetMode mode) {
putWrapped(FIELD_Properties, StringMap.class, value, mode);
return this;
}
/**
* Setter for properties
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see FlowConfig.Fields#properties
*/
public FlowConfig setProperties(
@Nonnull
StringMap value) {
putWrapped(FIELD_Properties, StringMap.class, value, SetMode.DISALLOW_NULL);
return this;
}
@Override
public FlowConfig clone()
throws CloneNotSupportedException
{
return ((FlowConfig) super.clone());
}
@Override
public FlowConfig copy()
throws CloneNotSupportedException
{
return ((FlowConfig) super.copy());
}
public static class Fields
extends PathSpec
{
public Fields(List path, String name) {
super(path, name);
}
public Fields() {
super();
}
/**
* Identifier for the flow
*
*/
public gobblin.service.FlowId.Fields id() {
return new gobblin.service.FlowId.Fields(getPathComponents(), "id");
}
/**
* Optional schedule for when to execution the flow. If a schedule is not specified then the flow is executed immediately.
*
*/
public gobblin.service.Schedule.Fields schedule() {
return new gobblin.service.Schedule.Fields(getPathComponents(), "schedule");
}
/**
* Comma separated list of URIs for templates used in the flow. The template location is defined by the multiproduct that packages the template.
*
*/
public PathSpec templateUris() {
return new PathSpec(getPathComponents(), "templateUris");
}
/**
* Properties for the flow. These properties are passed to the compiled Gobblin jobs.
*
*/
public PathSpec properties() {
return new PathSpec(getPathComponents(), "properties");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy