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

gobblin.service.JobStatistics Maven / Gradle / Ivy

The newest version!

package gobblin.service;

import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nonnull;
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;


/**
 * Statistics from a job execution
 * 
 */
@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/JobStatistics.pdsc.", date = "Fri Jul 21 13:35:27 PDT 2017")
public class JobStatistics
    extends RecordTemplate
{

    private final static JobStatistics.Fields _fields = new JobStatistics.Fields();
    private final static RecordDataSchema SCHEMA = ((RecordDataSchema) DataTemplateUtil.parseSchema("{\"type\":\"record\",\"name\":\"JobStatistics\",\"namespace\":\"gobblin.service\",\"doc\":\"Statistics from a job execution\",\"fields\":[{\"name\":\"executionStartTime\",\"type\":\"long\",\"doc\":\"Epoch time of when the execution began\"},{\"name\":\"executionEndTime\",\"type\":\"long\",\"doc\":\"Epoch time of when the execution ended\"},{\"name\":\"processedCount\",\"type\":\"long\",\"doc\":\"number of records processed in the last job execution\"}]}"));
    private final static RecordDataSchema.Field FIELD_ExecutionStartTime = SCHEMA.getField("executionStartTime");
    private final static RecordDataSchema.Field FIELD_ExecutionEndTime = SCHEMA.getField("executionEndTime");
    private final static RecordDataSchema.Field FIELD_ProcessedCount = SCHEMA.getField("processedCount");

    public JobStatistics() {
        super(new DataMap(), SCHEMA);
    }

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

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

    /**
     * Existence checker for executionStartTime
     * 
     * @see JobStatistics.Fields#executionStartTime
     */
    public boolean hasExecutionStartTime() {
        return contains(FIELD_ExecutionStartTime);
    }

    /**
     * Remover for executionStartTime
     * 
     * @see JobStatistics.Fields#executionStartTime
     */
    public void removeExecutionStartTime() {
        remove(FIELD_ExecutionStartTime);
    }

    /**
     * Getter for executionStartTime
     * 
     * @see JobStatistics.Fields#executionStartTime
     */
    public Long getExecutionStartTime(GetMode mode) {
        return obtainDirect(FIELD_ExecutionStartTime, Long.class, mode);
    }

    /**
     * Getter for executionStartTime
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see JobStatistics.Fields#executionStartTime
     */
    @Nonnull
    public Long getExecutionStartTime() {
        return obtainDirect(FIELD_ExecutionStartTime, Long.class, GetMode.STRICT);
    }

    /**
     * Setter for executionStartTime
     * 
     * @see JobStatistics.Fields#executionStartTime
     */
    public JobStatistics setExecutionStartTime(Long value, SetMode mode) {
        putDirect(FIELD_ExecutionStartTime, Long.class, Long.class, value, mode);
        return this;
    }

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

    /**
     * Setter for executionStartTime
     * 
     * @see JobStatistics.Fields#executionStartTime
     */
    public JobStatistics setExecutionStartTime(long value) {
        putDirect(FIELD_ExecutionStartTime, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for executionEndTime
     * 
     * @see JobStatistics.Fields#executionEndTime
     */
    public boolean hasExecutionEndTime() {
        return contains(FIELD_ExecutionEndTime);
    }

    /**
     * Remover for executionEndTime
     * 
     * @see JobStatistics.Fields#executionEndTime
     */
    public void removeExecutionEndTime() {
        remove(FIELD_ExecutionEndTime);
    }

    /**
     * Getter for executionEndTime
     * 
     * @see JobStatistics.Fields#executionEndTime
     */
    public Long getExecutionEndTime(GetMode mode) {
        return obtainDirect(FIELD_ExecutionEndTime, Long.class, mode);
    }

    /**
     * Getter for executionEndTime
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see JobStatistics.Fields#executionEndTime
     */
    @Nonnull
    public Long getExecutionEndTime() {
        return obtainDirect(FIELD_ExecutionEndTime, Long.class, GetMode.STRICT);
    }

    /**
     * Setter for executionEndTime
     * 
     * @see JobStatistics.Fields#executionEndTime
     */
    public JobStatistics setExecutionEndTime(Long value, SetMode mode) {
        putDirect(FIELD_ExecutionEndTime, Long.class, Long.class, value, mode);
        return this;
    }

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

    /**
     * Setter for executionEndTime
     * 
     * @see JobStatistics.Fields#executionEndTime
     */
    public JobStatistics setExecutionEndTime(long value) {
        putDirect(FIELD_ExecutionEndTime, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for processedCount
     * 
     * @see JobStatistics.Fields#processedCount
     */
    public boolean hasProcessedCount() {
        return contains(FIELD_ProcessedCount);
    }

    /**
     * Remover for processedCount
     * 
     * @see JobStatistics.Fields#processedCount
     */
    public void removeProcessedCount() {
        remove(FIELD_ProcessedCount);
    }

    /**
     * Getter for processedCount
     * 
     * @see JobStatistics.Fields#processedCount
     */
    public Long getProcessedCount(GetMode mode) {
        return obtainDirect(FIELD_ProcessedCount, Long.class, mode);
    }

    /**
     * Getter for processedCount
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see JobStatistics.Fields#processedCount
     */
    @Nonnull
    public Long getProcessedCount() {
        return obtainDirect(FIELD_ProcessedCount, Long.class, GetMode.STRICT);
    }

    /**
     * Setter for processedCount
     * 
     * @see JobStatistics.Fields#processedCount
     */
    public JobStatistics setProcessedCount(Long value, SetMode mode) {
        putDirect(FIELD_ProcessedCount, Long.class, Long.class, value, mode);
        return this;
    }

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

    /**
     * Setter for processedCount
     * 
     * @see JobStatistics.Fields#processedCount
     */
    public JobStatistics setProcessedCount(long value) {
        putDirect(FIELD_ProcessedCount, Long.class, Long.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

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

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

    public static class Fields
        extends PathSpec
    {


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

        public Fields() {
            super();
        }

        /**
         * Epoch time of when the execution began
         * 
         */
        public PathSpec executionStartTime() {
            return new PathSpec(getPathComponents(), "executionStartTime");
        }

        /**
         * Epoch time of when the execution ended
         * 
         */
        public PathSpec executionEndTime() {
            return new PathSpec(getPathComponents(), "executionEndTime");
        }

        /**
         * number of records processed in the last job execution
         * 
         */
        public PathSpec processedCount() {
            return new PathSpec(getPathComponents(), "processedCount");
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy