<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dataform/v1/dataform.proto

namespace Google\Cloud\Dataform\V1\CompilationResultAction\DataPreparation;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Definition of a SQL Data Preparation
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinition</code>
 */
class SqlDefinition extends \Google\Protobuf\Internal\Message
{
    /**
     * The SQL query representing the data preparation steps. Formatted as a
     * Pipe SQL query statement.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     */
    protected $query = '';
    /**
     * Error table configuration,
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable error_table = 2;</code>
     */
    protected $error_table = null;
    /**
     * Load configuration.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CompilationResultAction.LoadConfig load = 3;</code>
     */
    protected $load = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $query
     *           The SQL query representing the data preparation steps. Formatted as a
     *           Pipe SQL query statement.
     *     @type \Google\Cloud\Dataform\V1\CompilationResultAction\DataPreparation\ErrorTable $error_table
     *           Error table configuration,
     *     @type \Google\Cloud\Dataform\V1\CompilationResultAction\LoadConfig $load
     *           Load configuration.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * The SQL query representing the data preparation steps. Formatted as a
     * Pipe SQL query statement.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     * @return string
     */
    public function getQuery()
    {
        return $this->query;
    }

    /**
     * The SQL query representing the data preparation steps. Formatted as a
     * Pipe SQL query statement.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setQuery($var)
    {
        GPBUtil::checkString($var, True);
        $this->query = $var;

        return $this;
    }

    /**
     * Error table configuration,
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable error_table = 2;</code>
     * @return \Google\Cloud\Dataform\V1\CompilationResultAction\DataPreparation\ErrorTable|null
     */
    public function getErrorTable()
    {
        return $this->error_table;
    }

    public function hasErrorTable()
    {
        return isset($this->error_table);
    }

    public function clearErrorTable()
    {
        unset($this->error_table);
    }

    /**
     * Error table configuration,
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable error_table = 2;</code>
     * @param \Google\Cloud\Dataform\V1\CompilationResultAction\DataPreparation\ErrorTable $var
     * @return $this
     */
    public function setErrorTable($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataform\V1\CompilationResultAction\DataPreparation\ErrorTable::class);
        $this->error_table = $var;

        return $this;
    }

    /**
     * Load configuration.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CompilationResultAction.LoadConfig load = 3;</code>
     * @return \Google\Cloud\Dataform\V1\CompilationResultAction\LoadConfig|null
     */
    public function getLoad()
    {
        return $this->load;
    }

    public function hasLoad()
    {
        return isset($this->load);
    }

    public function clearLoad()
    {
        unset($this->load);
    }

    /**
     * Load configuration.
     *
     * Generated from protobuf field <code>.google.cloud.dataform.v1.CompilationResultAction.LoadConfig load = 3;</code>
     * @param \Google\Cloud\Dataform\V1\CompilationResultAction\LoadConfig $var
     * @return $this
     */
    public function setLoad($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataform\V1\CompilationResultAction\LoadConfig::class);
        $this->load = $var;

        return $this;
    }

}


