All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.gobblin.rest.JobExecutionInfo Maven / Gradle / Ivy

The newest version!

package org.apache.gobblin.rest;

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.schema.SchemaFormatType;
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;


/**
 * Gobblin job execution information
 * 
 */
@Generated(value = "com.linkedin.pegasus.generator.JavaCodeUtil", comments = "Rest.li Data Template. Generated from gobblin-rest-service/gobblin-rest-api/src/main/pegasus/org/apache/gobblin/rest/JobExecutionInfo.pdl.")
public class JobExecutionInfo
    extends RecordTemplate
{

    private final static JobExecutionInfo.Fields _fields = new JobExecutionInfo.Fields();
    private final static RecordDataSchema SCHEMA = ((RecordDataSchema) DataTemplateUtil.parseSchema("namespace org.apache.gobblin.rest/**Gobblin job execution information*/record JobExecutionInfo{/**Job name*/jobName:string/**Job ID*/jobId:string/**Job start time (epoch time)*/startTime:optional long/**Job end time (epoch time)*/endTime:optional long/**Job duration in milliseconds*/duration:optional long/**Job state*/state:optional enum JobStateEnum{PENDING,RUNNING,SUCCESSFUL,COMMITTED,FAILED,CANCELLED}/**Number of launched tasks*/launchedTasks:optional int/**Number of completed tasks*/completedTasks:optional int/**Job launcher type*/launcherType:optional enum LauncherTypeEnum{LOCAL,MAPREDUCE,CLUSTER,YARN}/**Job execution tracking URL*/trackingUrl:optional string/**An array of task execution information records*/taskExecutions:array[/**Gobblin task execution information*/record TaskExecutionInfo{/**Job ID*/jobId:string/**Task ID*/taskId:string/**Task start time (epoch time)*/startTime:optional long/**Task end time (epoch time)*/endTime:optional long/**Task duration in milliseconds*/duration:optional long/**Task state*/state:optional enum TaskStateEnum{PENDING,RUNNING,SUCCESSFUL,COMMITTED,FAILED,CANCELLED}/**Task failure exception message*/failureException:optional string/**Low watermark*/lowWatermark:optional long/**High watermark*/highWatermark:optional long/**Table definition*/table:optional/**Gobblin table definition*/record Table{/**Table namespace*/`namespace`:optional string/**Table name*/name:string/**Table type*/type:optional enum TableTypeEnum{SNAPSHOT_ONLY,SNAPSHOT_APPEND,APPEND_ONLY}}/**Task properties*/taskProperties:optional map[string,string]/**Job metrics*/metrics:array[/**Gobblin metric*/record Metric{/**Metric group*/group:string/**Metric name*/name:string/**Metric type*/type:enum MetricTypeEnum{COUNTER,METER,GAUGE}/**Metric value*/value:string}]}]/**Job properties*/jobProperties:optional map[string,string]/**Job metrics*/metrics:array[Metric]}", SchemaFormatType.PDL));
    private final static RecordDataSchema.Field FIELD_JobName = SCHEMA.getField("jobName");
    private final static RecordDataSchema.Field FIELD_JobId = SCHEMA.getField("jobId");
    private final static RecordDataSchema.Field FIELD_StartTime = SCHEMA.getField("startTime");
    private final static RecordDataSchema.Field FIELD_EndTime = SCHEMA.getField("endTime");
    private final static RecordDataSchema.Field FIELD_Duration = SCHEMA.getField("duration");
    private final static RecordDataSchema.Field FIELD_State = SCHEMA.getField("state");
    private final static RecordDataSchema.Field FIELD_LaunchedTasks = SCHEMA.getField("launchedTasks");
    private final static RecordDataSchema.Field FIELD_CompletedTasks = SCHEMA.getField("completedTasks");
    private final static RecordDataSchema.Field FIELD_LauncherType = SCHEMA.getField("launcherType");
    private final static RecordDataSchema.Field FIELD_TrackingUrl = SCHEMA.getField("trackingUrl");
    private final static RecordDataSchema.Field FIELD_TaskExecutions = SCHEMA.getField("taskExecutions");
    private final static RecordDataSchema.Field FIELD_JobProperties = SCHEMA.getField("jobProperties");
    private final static RecordDataSchema.Field FIELD_Metrics = SCHEMA.getField("metrics");

    public JobExecutionInfo() {
        super(new DataMap(), SCHEMA, 4);
    }

    public JobExecutionInfo(DataMap data) {
        super(data, SCHEMA);
    }

    public static JobExecutionInfo.Fields fields() {
        return _fields;
    }

    /**
     * Existence checker for jobName
     * 
     * @see JobExecutionInfo.Fields#jobName
     */
    public boolean hasJobName() {
        return contains(FIELD_JobName);
    }

    /**
     * Remover for jobName
     * 
     * @see JobExecutionInfo.Fields#jobName
     */
    public void removeJobName() {
        remove(FIELD_JobName);
    }

    /**
     * Getter for jobName
     * 
     * @see JobExecutionInfo.Fields#jobName
     */
    public String getJobName(GetMode mode) {
        return obtainDirect(FIELD_JobName, String.class, mode);
    }

    /**
     * Getter for jobName
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see JobExecutionInfo.Fields#jobName
     */
    @Nonnull
    public String getJobName() {
        return obtainDirect(FIELD_JobName, String.class, GetMode.STRICT);
    }

    /**
     * Setter for jobName
     * 
     * @see JobExecutionInfo.Fields#jobName
     */
    public JobExecutionInfo setJobName(String value, SetMode mode) {
        putDirect(FIELD_JobName, String.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for jobName
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#jobName
     */
    public JobExecutionInfo setJobName(
        @Nonnull
        String value) {
        putDirect(FIELD_JobName, String.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for jobId
     * 
     * @see JobExecutionInfo.Fields#jobId
     */
    public boolean hasJobId() {
        return contains(FIELD_JobId);
    }

    /**
     * Remover for jobId
     * 
     * @see JobExecutionInfo.Fields#jobId
     */
    public void removeJobId() {
        remove(FIELD_JobId);
    }

    /**
     * Getter for jobId
     * 
     * @see JobExecutionInfo.Fields#jobId
     */
    public String getJobId(GetMode mode) {
        return obtainDirect(FIELD_JobId, String.class, mode);
    }

    /**
     * Getter for jobId
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see JobExecutionInfo.Fields#jobId
     */
    @Nonnull
    public String getJobId() {
        return obtainDirect(FIELD_JobId, String.class, GetMode.STRICT);
    }

    /**
     * Setter for jobId
     * 
     * @see JobExecutionInfo.Fields#jobId
     */
    public JobExecutionInfo setJobId(String value, SetMode mode) {
        putDirect(FIELD_JobId, String.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for jobId
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#jobId
     */
    public JobExecutionInfo setJobId(
        @Nonnull
        String value) {
        putDirect(FIELD_JobId, String.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for startTime
     * 
     * @see JobExecutionInfo.Fields#startTime
     */
    public boolean hasStartTime() {
        return contains(FIELD_StartTime);
    }

    /**
     * Remover for startTime
     * 
     * @see JobExecutionInfo.Fields#startTime
     */
    public void removeStartTime() {
        remove(FIELD_StartTime);
    }

    /**
     * Getter for startTime
     * 
     * @see JobExecutionInfo.Fields#startTime
     */
    public Long getStartTime(GetMode mode) {
        return obtainDirect(FIELD_StartTime, Long.class, mode);
    }

    /**
     * Getter for startTime
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#startTime
     */
    @Nullable
    public Long getStartTime() {
        return obtainDirect(FIELD_StartTime, Long.class, GetMode.STRICT);
    }

    /**
     * Setter for startTime
     * 
     * @see JobExecutionInfo.Fields#startTime
     */
    public JobExecutionInfo setStartTime(Long value, SetMode mode) {
        putDirect(FIELD_StartTime, Long.class, Long.class, value, mode);
        return this;
    }

    /**
     * Setter for startTime
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#startTime
     */
    public JobExecutionInfo setStartTime(
        @Nonnull
        Long value) {
        putDirect(FIELD_StartTime, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Setter for startTime
     * 
     * @see JobExecutionInfo.Fields#startTime
     */
    public JobExecutionInfo setStartTime(long value) {
        putDirect(FIELD_StartTime, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for endTime
     * 
     * @see JobExecutionInfo.Fields#endTime
     */
    public boolean hasEndTime() {
        return contains(FIELD_EndTime);
    }

    /**
     * Remover for endTime
     * 
     * @see JobExecutionInfo.Fields#endTime
     */
    public void removeEndTime() {
        remove(FIELD_EndTime);
    }

    /**
     * Getter for endTime
     * 
     * @see JobExecutionInfo.Fields#endTime
     */
    public Long getEndTime(GetMode mode) {
        return obtainDirect(FIELD_EndTime, Long.class, mode);
    }

    /**
     * Getter for endTime
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#endTime
     */
    @Nullable
    public Long getEndTime() {
        return obtainDirect(FIELD_EndTime, Long.class, GetMode.STRICT);
    }

    /**
     * Setter for endTime
     * 
     * @see JobExecutionInfo.Fields#endTime
     */
    public JobExecutionInfo setEndTime(Long value, SetMode mode) {
        putDirect(FIELD_EndTime, Long.class, Long.class, value, mode);
        return this;
    }

    /**
     * Setter for endTime
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#endTime
     */
    public JobExecutionInfo setEndTime(
        @Nonnull
        Long value) {
        putDirect(FIELD_EndTime, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Setter for endTime
     * 
     * @see JobExecutionInfo.Fields#endTime
     */
    public JobExecutionInfo setEndTime(long value) {
        putDirect(FIELD_EndTime, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for duration
     * 
     * @see JobExecutionInfo.Fields#duration
     */
    public boolean hasDuration() {
        return contains(FIELD_Duration);
    }

    /**
     * Remover for duration
     * 
     * @see JobExecutionInfo.Fields#duration
     */
    public void removeDuration() {
        remove(FIELD_Duration);
    }

    /**
     * Getter for duration
     * 
     * @see JobExecutionInfo.Fields#duration
     */
    public Long getDuration(GetMode mode) {
        return obtainDirect(FIELD_Duration, Long.class, mode);
    }

    /**
     * Getter for duration
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#duration
     */
    @Nullable
    public Long getDuration() {
        return obtainDirect(FIELD_Duration, Long.class, GetMode.STRICT);
    }

    /**
     * Setter for duration
     * 
     * @see JobExecutionInfo.Fields#duration
     */
    public JobExecutionInfo setDuration(Long value, SetMode mode) {
        putDirect(FIELD_Duration, Long.class, Long.class, value, mode);
        return this;
    }

    /**
     * Setter for duration
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#duration
     */
    public JobExecutionInfo setDuration(
        @Nonnull
        Long value) {
        putDirect(FIELD_Duration, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Setter for duration
     * 
     * @see JobExecutionInfo.Fields#duration
     */
    public JobExecutionInfo setDuration(long value) {
        putDirect(FIELD_Duration, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for state
     * 
     * @see JobExecutionInfo.Fields#state
     */
    public boolean hasState() {
        return contains(FIELD_State);
    }

    /**
     * Remover for state
     * 
     * @see JobExecutionInfo.Fields#state
     */
    public void removeState() {
        remove(FIELD_State);
    }

    /**
     * Getter for state
     * 
     * @see JobExecutionInfo.Fields#state
     */
    public JobStateEnum getState(GetMode mode) {
        return obtainDirect(FIELD_State, JobStateEnum.class, mode);
    }

    /**
     * Getter for state
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#state
     */
    @Nullable
    public JobStateEnum getState() {
        return obtainDirect(FIELD_State, JobStateEnum.class, GetMode.STRICT);
    }

    /**
     * Setter for state
     * 
     * @see JobExecutionInfo.Fields#state
     */
    public JobExecutionInfo setState(JobStateEnum value, SetMode mode) {
        putDirect(FIELD_State, JobStateEnum.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for state
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#state
     */
    public JobExecutionInfo setState(
        @Nonnull
        JobStateEnum value) {
        putDirect(FIELD_State, JobStateEnum.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for launchedTasks
     * 
     * @see JobExecutionInfo.Fields#launchedTasks
     */
    public boolean hasLaunchedTasks() {
        return contains(FIELD_LaunchedTasks);
    }

    /**
     * Remover for launchedTasks
     * 
     * @see JobExecutionInfo.Fields#launchedTasks
     */
    public void removeLaunchedTasks() {
        remove(FIELD_LaunchedTasks);
    }

    /**
     * Getter for launchedTasks
     * 
     * @see JobExecutionInfo.Fields#launchedTasks
     */
    public Integer getLaunchedTasks(GetMode mode) {
        return obtainDirect(FIELD_LaunchedTasks, Integer.class, mode);
    }

    /**
     * Getter for launchedTasks
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#launchedTasks
     */
    @Nullable
    public Integer getLaunchedTasks() {
        return obtainDirect(FIELD_LaunchedTasks, Integer.class, GetMode.STRICT);
    }

    /**
     * Setter for launchedTasks
     * 
     * @see JobExecutionInfo.Fields#launchedTasks
     */
    public JobExecutionInfo setLaunchedTasks(Integer value, SetMode mode) {
        putDirect(FIELD_LaunchedTasks, Integer.class, Integer.class, value, mode);
        return this;
    }

    /**
     * Setter for launchedTasks
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#launchedTasks
     */
    public JobExecutionInfo setLaunchedTasks(
        @Nonnull
        Integer value) {
        putDirect(FIELD_LaunchedTasks, Integer.class, Integer.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Setter for launchedTasks
     * 
     * @see JobExecutionInfo.Fields#launchedTasks
     */
    public JobExecutionInfo setLaunchedTasks(int value) {
        putDirect(FIELD_LaunchedTasks, Integer.class, Integer.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for completedTasks
     * 
     * @see JobExecutionInfo.Fields#completedTasks
     */
    public boolean hasCompletedTasks() {
        return contains(FIELD_CompletedTasks);
    }

    /**
     * Remover for completedTasks
     * 
     * @see JobExecutionInfo.Fields#completedTasks
     */
    public void removeCompletedTasks() {
        remove(FIELD_CompletedTasks);
    }

    /**
     * Getter for completedTasks
     * 
     * @see JobExecutionInfo.Fields#completedTasks
     */
    public Integer getCompletedTasks(GetMode mode) {
        return obtainDirect(FIELD_CompletedTasks, Integer.class, mode);
    }

    /**
     * Getter for completedTasks
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#completedTasks
     */
    @Nullable
    public Integer getCompletedTasks() {
        return obtainDirect(FIELD_CompletedTasks, Integer.class, GetMode.STRICT);
    }

    /**
     * Setter for completedTasks
     * 
     * @see JobExecutionInfo.Fields#completedTasks
     */
    public JobExecutionInfo setCompletedTasks(Integer value, SetMode mode) {
        putDirect(FIELD_CompletedTasks, Integer.class, Integer.class, value, mode);
        return this;
    }

    /**
     * Setter for completedTasks
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#completedTasks
     */
    public JobExecutionInfo setCompletedTasks(
        @Nonnull
        Integer value) {
        putDirect(FIELD_CompletedTasks, Integer.class, Integer.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Setter for completedTasks
     * 
     * @see JobExecutionInfo.Fields#completedTasks
     */
    public JobExecutionInfo setCompletedTasks(int value) {
        putDirect(FIELD_CompletedTasks, Integer.class, Integer.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for launcherType
     * 
     * @see JobExecutionInfo.Fields#launcherType
     */
    public boolean hasLauncherType() {
        return contains(FIELD_LauncherType);
    }

    /**
     * Remover for launcherType
     * 
     * @see JobExecutionInfo.Fields#launcherType
     */
    public void removeLauncherType() {
        remove(FIELD_LauncherType);
    }

    /**
     * Getter for launcherType
     * 
     * @see JobExecutionInfo.Fields#launcherType
     */
    public LauncherTypeEnum getLauncherType(GetMode mode) {
        return obtainDirect(FIELD_LauncherType, LauncherTypeEnum.class, mode);
    }

    /**
     * Getter for launcherType
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#launcherType
     */
    @Nullable
    public LauncherTypeEnum getLauncherType() {
        return obtainDirect(FIELD_LauncherType, LauncherTypeEnum.class, GetMode.STRICT);
    }

    /**
     * Setter for launcherType
     * 
     * @see JobExecutionInfo.Fields#launcherType
     */
    public JobExecutionInfo setLauncherType(LauncherTypeEnum value, SetMode mode) {
        putDirect(FIELD_LauncherType, LauncherTypeEnum.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for launcherType
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#launcherType
     */
    public JobExecutionInfo setLauncherType(
        @Nonnull
        LauncherTypeEnum value) {
        putDirect(FIELD_LauncherType, LauncherTypeEnum.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for trackingUrl
     * 
     * @see JobExecutionInfo.Fields#trackingUrl
     */
    public boolean hasTrackingUrl() {
        return contains(FIELD_TrackingUrl);
    }

    /**
     * Remover for trackingUrl
     * 
     * @see JobExecutionInfo.Fields#trackingUrl
     */
    public void removeTrackingUrl() {
        remove(FIELD_TrackingUrl);
    }

    /**
     * Getter for trackingUrl
     * 
     * @see JobExecutionInfo.Fields#trackingUrl
     */
    public String getTrackingUrl(GetMode mode) {
        return obtainDirect(FIELD_TrackingUrl, String.class, mode);
    }

    /**
     * Getter for trackingUrl
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#trackingUrl
     */
    @Nullable
    public String getTrackingUrl() {
        return obtainDirect(FIELD_TrackingUrl, String.class, GetMode.STRICT);
    }

    /**
     * Setter for trackingUrl
     * 
     * @see JobExecutionInfo.Fields#trackingUrl
     */
    public JobExecutionInfo setTrackingUrl(String value, SetMode mode) {
        putDirect(FIELD_TrackingUrl, String.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for trackingUrl
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#trackingUrl
     */
    public JobExecutionInfo setTrackingUrl(
        @Nonnull
        String value) {
        putDirect(FIELD_TrackingUrl, String.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for taskExecutions
     * 
     * @see JobExecutionInfo.Fields#taskExecutions
     */
    public boolean hasTaskExecutions() {
        return contains(FIELD_TaskExecutions);
    }

    /**
     * Remover for taskExecutions
     * 
     * @see JobExecutionInfo.Fields#taskExecutions
     */
    public void removeTaskExecutions() {
        remove(FIELD_TaskExecutions);
    }

    /**
     * Getter for taskExecutions
     * 
     * @see JobExecutionInfo.Fields#taskExecutions
     */
    public TaskExecutionInfoArray getTaskExecutions(GetMode mode) {
        return obtainWrapped(FIELD_TaskExecutions, TaskExecutionInfoArray.class, mode);
    }

    /**
     * Getter for taskExecutions
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see JobExecutionInfo.Fields#taskExecutions
     */
    @Nonnull
    public TaskExecutionInfoArray getTaskExecutions() {
        return obtainWrapped(FIELD_TaskExecutions, TaskExecutionInfoArray.class, GetMode.STRICT);
    }

    /**
     * Setter for taskExecutions
     * 
     * @see JobExecutionInfo.Fields#taskExecutions
     */
    public JobExecutionInfo setTaskExecutions(TaskExecutionInfoArray value, SetMode mode) {
        putWrapped(FIELD_TaskExecutions, TaskExecutionInfoArray.class, value, mode);
        return this;
    }

    /**
     * Setter for taskExecutions
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#taskExecutions
     */
    public JobExecutionInfo setTaskExecutions(
        @Nonnull
        TaskExecutionInfoArray value) {
        putWrapped(FIELD_TaskExecutions, TaskExecutionInfoArray.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for jobProperties
     * 
     * @see JobExecutionInfo.Fields#jobProperties
     */
    public boolean hasJobProperties() {
        return contains(FIELD_JobProperties);
    }

    /**
     * Remover for jobProperties
     * 
     * @see JobExecutionInfo.Fields#jobProperties
     */
    public void removeJobProperties() {
        remove(FIELD_JobProperties);
    }

    /**
     * Getter for jobProperties
     * 
     * @see JobExecutionInfo.Fields#jobProperties
     */
    public StringMap getJobProperties(GetMode mode) {
        return obtainWrapped(FIELD_JobProperties, StringMap.class, mode);
    }

    /**
     * Getter for jobProperties
     * 
     * @return
     *     Optional field. Always check for null.
     * @see JobExecutionInfo.Fields#jobProperties
     */
    @Nullable
    public StringMap getJobProperties() {
        return obtainWrapped(FIELD_JobProperties, StringMap.class, GetMode.STRICT);
    }

    /**
     * Setter for jobProperties
     * 
     * @see JobExecutionInfo.Fields#jobProperties
     */
    public JobExecutionInfo setJobProperties(StringMap value, SetMode mode) {
        putWrapped(FIELD_JobProperties, StringMap.class, value, mode);
        return this;
    }

    /**
     * Setter for jobProperties
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#jobProperties
     */
    public JobExecutionInfo setJobProperties(
        @Nonnull
        StringMap value) {
        putWrapped(FIELD_JobProperties, StringMap.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for metrics
     * 
     * @see JobExecutionInfo.Fields#metrics
     */
    public boolean hasMetrics() {
        return contains(FIELD_Metrics);
    }

    /**
     * Remover for metrics
     * 
     * @see JobExecutionInfo.Fields#metrics
     */
    public void removeMetrics() {
        remove(FIELD_Metrics);
    }

    /**
     * Getter for metrics
     * 
     * @see JobExecutionInfo.Fields#metrics
     */
    public MetricArray getMetrics(GetMode mode) {
        return obtainWrapped(FIELD_Metrics, MetricArray.class, mode);
    }

    /**
     * Getter for metrics
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see JobExecutionInfo.Fields#metrics
     */
    @Nonnull
    public MetricArray getMetrics() {
        return obtainWrapped(FIELD_Metrics, MetricArray.class, GetMode.STRICT);
    }

    /**
     * Setter for metrics
     * 
     * @see JobExecutionInfo.Fields#metrics
     */
    public JobExecutionInfo setMetrics(MetricArray value, SetMode mode) {
        putWrapped(FIELD_Metrics, MetricArray.class, value, mode);
        return this;
    }

    /**
     * Setter for metrics
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see JobExecutionInfo.Fields#metrics
     */
    public JobExecutionInfo setMetrics(
        @Nonnull
        MetricArray value) {
        putWrapped(FIELD_Metrics, MetricArray.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    @Override
    public JobExecutionInfo clone()
        throws CloneNotSupportedException
    {
        return ((JobExecutionInfo) super.clone());
    }

    @Override
    public JobExecutionInfo copy()
        throws CloneNotSupportedException
    {
        return ((JobExecutionInfo) super.copy());
    }

    public static class Fields
        extends PathSpec
    {


        public Fields(List path, String name) {
            super(path, name);
        }

        public Fields() {
            super();
        }

        /**
         * Job name
         * 
         */
        public PathSpec jobName() {
            return new PathSpec(getPathComponents(), "jobName");
        }

        /**
         * Job ID
         * 
         */
        public PathSpec jobId() {
            return new PathSpec(getPathComponents(), "jobId");
        }

        /**
         * Job start time (epoch time)
         * 
         */
        public PathSpec startTime() {
            return new PathSpec(getPathComponents(), "startTime");
        }

        /**
         * Job end time (epoch time)
         * 
         */
        public PathSpec endTime() {
            return new PathSpec(getPathComponents(), "endTime");
        }

        /**
         * Job duration in milliseconds
         * 
         */
        public PathSpec duration() {
            return new PathSpec(getPathComponents(), "duration");
        }

        /**
         * Job state
         * 
         */
        public PathSpec state() {
            return new PathSpec(getPathComponents(), "state");
        }

        /**
         * Number of launched tasks
         * 
         */
        public PathSpec launchedTasks() {
            return new PathSpec(getPathComponents(), "launchedTasks");
        }

        /**
         * Number of completed tasks
         * 
         */
        public PathSpec completedTasks() {
            return new PathSpec(getPathComponents(), "completedTasks");
        }

        /**
         * Job launcher type
         * 
         */
        public PathSpec launcherType() {
            return new PathSpec(getPathComponents(), "launcherType");
        }

        /**
         * Job execution tracking URL
         * 
         */
        public PathSpec trackingUrl() {
            return new PathSpec(getPathComponents(), "trackingUrl");
        }

        /**
         * An array of task execution information records
         * 
         */
        public org.apache.gobblin.rest.TaskExecutionInfoArray.Fields taskExecutions() {
            return new org.apache.gobblin.rest.TaskExecutionInfoArray.Fields(getPathComponents(), "taskExecutions");
        }

        /**
         * An array of task execution information records
         * 
         */
        public PathSpec taskExecutions(Integer start, Integer count) {
            PathSpec arrayPathSpec = new PathSpec(getPathComponents(), "taskExecutions");
            if (start!= null) {
                arrayPathSpec.setAttribute("start", start);
            }
            if (count!= null) {
                arrayPathSpec.setAttribute("count", count);
            }
            return arrayPathSpec;
        }

        /**
         * Job properties
         * 
         */
        public PathSpec jobProperties() {
            return new PathSpec(getPathComponents(), "jobProperties");
        }

        /**
         * Job metrics
         * 
         */
        public org.apache.gobblin.rest.MetricArray.Fields metrics() {
            return new org.apache.gobblin.rest.MetricArray.Fields(getPathComponents(), "metrics");
        }

        /**
         * Job metrics
         * 
         */
        public PathSpec metrics(Integer start, Integer count) {
            PathSpec arrayPathSpec = new PathSpec(getPathComponents(), "metrics");
            if (start!= null) {
                arrayPathSpec.setAttribute("start", start);
            }
            if (count!= null) {
                arrayPathSpec.setAttribute("count", count);
            }
            return arrayPathSpec;
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy