/*
 * This file is generated by jOOQ.
 */
package com.databasir.dao.tables.records;


import com.databasir.dao.tables.ProjectSyncRule;
import com.databasir.dao.tables.pojos.ProjectSyncRulePojo;

import java.time.LocalDateTime;

import org.jooq.Field;
import org.jooq.JSON;
import org.jooq.Record1;
import org.jooq.Record8;
import org.jooq.Row8;
import org.jooq.impl.UpdatableRecordImpl;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ProjectSyncRuleRecord extends UpdatableRecordImpl<ProjectSyncRuleRecord> implements Record8<Integer, Integer, JSON, JSON, Boolean, String, LocalDateTime, LocalDateTime> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>databasir.project_sync_rule.id</code>.
     */
    public void setId(Integer value) {
        set(0, value);
    }

    /**
     * Getter for <code>databasir.project_sync_rule.id</code>.
     */
    public Integer getId() {
        return (Integer) get(0);
    }

    /**
     * Setter for <code>databasir.project_sync_rule.project_id</code>.
     */
    public void setProjectId(Integer value) {
        set(1, value);
    }

    /**
     * Getter for <code>databasir.project_sync_rule.project_id</code>.
     */
    public Integer getProjectId() {
        return (Integer) get(1);
    }

    /**
     * Setter for
     * <code>databasir.project_sync_rule.ignore_table_name_regex_array</code>.
     */
    public void setIgnoreTableNameRegexArray(JSON value) {
        set(2, value);
    }

    /**
     * Getter for
     * <code>databasir.project_sync_rule.ignore_table_name_regex_array</code>.
     */
    public JSON getIgnoreTableNameRegexArray() {
        return (JSON) get(2);
    }

    /**
     * Setter for
     * <code>databasir.project_sync_rule.ignore_column_name_regex_array</code>.
     */
    public void setIgnoreColumnNameRegexArray(JSON value) {
        set(3, value);
    }

    /**
     * Getter for
     * <code>databasir.project_sync_rule.ignore_column_name_regex_array</code>.
     */
    public JSON getIgnoreColumnNameRegexArray() {
        return (JSON) get(3);
    }

    /**
     * Setter for <code>databasir.project_sync_rule.is_auto_sync</code>.
     */
    public void setIsAutoSync(Boolean value) {
        set(4, value);
    }

    /**
     * Getter for <code>databasir.project_sync_rule.is_auto_sync</code>.
     */
    public Boolean getIsAutoSync() {
        return (Boolean) get(4);
    }

    /**
     * Setter for <code>databasir.project_sync_rule.auto_sync_cron</code>.
     */
    public void setAutoSyncCron(String value) {
        set(5, value);
    }

    /**
     * Getter for <code>databasir.project_sync_rule.auto_sync_cron</code>.
     */
    public String getAutoSyncCron() {
        return (String) get(5);
    }

    /**
     * Setter for <code>databasir.project_sync_rule.update_at</code>.
     */
    public void setUpdateAt(LocalDateTime value) {
        set(6, value);
    }

    /**
     * Getter for <code>databasir.project_sync_rule.update_at</code>.
     */
    public LocalDateTime getUpdateAt() {
        return (LocalDateTime) get(6);
    }

    /**
     * Setter for <code>databasir.project_sync_rule.create_at</code>.
     */
    public void setCreateAt(LocalDateTime value) {
        set(7, value);
    }

    /**
     * Getter for <code>databasir.project_sync_rule.create_at</code>.
     */
    public LocalDateTime getCreateAt() {
        return (LocalDateTime) get(7);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record1<Integer> key() {
        return (Record1) super.key();
    }

    // -------------------------------------------------------------------------
    // Record8 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row8<Integer, Integer, JSON, JSON, Boolean, String, LocalDateTime, LocalDateTime> fieldsRow() {
        return (Row8) super.fieldsRow();
    }

    @Override
    public Row8<Integer, Integer, JSON, JSON, Boolean, String, LocalDateTime, LocalDateTime> valuesRow() {
        return (Row8) super.valuesRow();
    }

    @Override
    public Field<Integer> field1() {
        return ProjectSyncRule.PROJECT_SYNC_RULE.ID;
    }

    @Override
    public Field<Integer> field2() {
        return ProjectSyncRule.PROJECT_SYNC_RULE.PROJECT_ID;
    }

    @Override
    public Field<JSON> field3() {
        return ProjectSyncRule.PROJECT_SYNC_RULE.IGNORE_TABLE_NAME_REGEX_ARRAY;
    }

    @Override
    public Field<JSON> field4() {
        return ProjectSyncRule.PROJECT_SYNC_RULE.IGNORE_COLUMN_NAME_REGEX_ARRAY;
    }

    @Override
    public Field<Boolean> field5() {
        return ProjectSyncRule.PROJECT_SYNC_RULE.IS_AUTO_SYNC;
    }

    @Override
    public Field<String> field6() {
        return ProjectSyncRule.PROJECT_SYNC_RULE.AUTO_SYNC_CRON;
    }

    @Override
    public Field<LocalDateTime> field7() {
        return ProjectSyncRule.PROJECT_SYNC_RULE.UPDATE_AT;
    }

    @Override
    public Field<LocalDateTime> field8() {
        return ProjectSyncRule.PROJECT_SYNC_RULE.CREATE_AT;
    }

    @Override
    public Integer component1() {
        return getId();
    }

    @Override
    public Integer component2() {
        return getProjectId();
    }

    @Override
    public JSON component3() {
        return getIgnoreTableNameRegexArray();
    }

    @Override
    public JSON component4() {
        return getIgnoreColumnNameRegexArray();
    }

    @Override
    public Boolean component5() {
        return getIsAutoSync();
    }

    @Override
    public String component6() {
        return getAutoSyncCron();
    }

    @Override
    public LocalDateTime component7() {
        return getUpdateAt();
    }

    @Override
    public LocalDateTime component8() {
        return getCreateAt();
    }

    @Override
    public Integer value1() {
        return getId();
    }

    @Override
    public Integer value2() {
        return getProjectId();
    }

    @Override
    public JSON value3() {
        return getIgnoreTableNameRegexArray();
    }

    @Override
    public JSON value4() {
        return getIgnoreColumnNameRegexArray();
    }

    @Override
    public Boolean value5() {
        return getIsAutoSync();
    }

    @Override
    public String value6() {
        return getAutoSyncCron();
    }

    @Override
    public LocalDateTime value7() {
        return getUpdateAt();
    }

    @Override
    public LocalDateTime value8() {
        return getCreateAt();
    }

    @Override
    public ProjectSyncRuleRecord value1(Integer value) {
        setId(value);
        return this;
    }

    @Override
    public ProjectSyncRuleRecord value2(Integer value) {
        setProjectId(value);
        return this;
    }

    @Override
    public ProjectSyncRuleRecord value3(JSON value) {
        setIgnoreTableNameRegexArray(value);
        return this;
    }

    @Override
    public ProjectSyncRuleRecord value4(JSON value) {
        setIgnoreColumnNameRegexArray(value);
        return this;
    }

    @Override
    public ProjectSyncRuleRecord value5(Boolean value) {
        setIsAutoSync(value);
        return this;
    }

    @Override
    public ProjectSyncRuleRecord value6(String value) {
        setAutoSyncCron(value);
        return this;
    }

    @Override
    public ProjectSyncRuleRecord value7(LocalDateTime value) {
        setUpdateAt(value);
        return this;
    }

    @Override
    public ProjectSyncRuleRecord value8(LocalDateTime value) {
        setCreateAt(value);
        return this;
    }

    @Override
    public ProjectSyncRuleRecord values(Integer value1, Integer value2, JSON value3, JSON value4, Boolean value5, String value6, LocalDateTime value7, LocalDateTime value8) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        value7(value7);
        value8(value8);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached ProjectSyncRuleRecord
     */
    public ProjectSyncRuleRecord() {
        super(ProjectSyncRule.PROJECT_SYNC_RULE);
    }

    /**
     * Create a detached, initialised ProjectSyncRuleRecord
     */
    public ProjectSyncRuleRecord(Integer id, Integer projectId, JSON ignoreTableNameRegexArray, JSON ignoreColumnNameRegexArray, Boolean isAutoSync, String autoSyncCron, LocalDateTime updateAt, LocalDateTime createAt) {
        super(ProjectSyncRule.PROJECT_SYNC_RULE);

        setId(id);
        setProjectId(projectId);
        setIgnoreTableNameRegexArray(ignoreTableNameRegexArray);
        setIgnoreColumnNameRegexArray(ignoreColumnNameRegexArray);
        setIsAutoSync(isAutoSync);
        setAutoSyncCron(autoSyncCron);
        setUpdateAt(updateAt);
        setCreateAt(createAt);
    }

    /**
     * Create a detached, initialised ProjectSyncRuleRecord
     */
    public ProjectSyncRuleRecord(ProjectSyncRulePojo value) {
        super(ProjectSyncRule.PROJECT_SYNC_RULE);

        if (value != null) {
            setId(value.getId());
            setProjectId(value.getProjectId());
            setIgnoreTableNameRegexArray(value.getIgnoreTableNameRegexArray());
            setIgnoreColumnNameRegexArray(value.getIgnoreColumnNameRegexArray());
            setIsAutoSync(value.getIsAutoSync());
            setAutoSyncCron(value.getAutoSyncCron());
            setUpdateAt(value.getUpdateAt());
            setCreateAt(value.getCreateAt());
        }
    }
}
