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

namespace Google\Cloud\Asset\V1\QueryAssetsOutputConfig;

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

/**
 * BigQuery destination.
 *
 * Generated from protobuf message <code>google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination</code>
 */
class BigQueryDestination extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The BigQuery dataset where the query results will be saved. It
     * has the format of "projects/{projectId}/datasets/{datasetId}".
     *
     * Generated from protobuf field <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $dataset = '';
    /**
     * Required. The BigQuery table where the query results will be saved. If
     * this table does not exist, a new table with the given name will be
     * created.
     *
     * Generated from protobuf field <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $table = '';
    /**
     * Specifies the action that occurs if the destination table or partition
     * already exists. The following values are supported:
     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
     * overwrites the entire table or all the partitions data.
     * * WRITE_APPEND: If the table or partition already exists, BigQuery
     * appends the data to the table or the latest partition.
     * * WRITE_EMPTY: If the table already exists and contains data, a
     * 'duplicate' error is returned in the job result.
     * The default value is WRITE_EMPTY.
     *
     * Generated from protobuf field <code>string write_disposition = 3;</code>
     */
    private $write_disposition = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $dataset
     *           Required. The BigQuery dataset where the query results will be saved. It
     *           has the format of "projects/{projectId}/datasets/{datasetId}".
     *     @type string $table
     *           Required. The BigQuery table where the query results will be saved. If
     *           this table does not exist, a new table with the given name will be
     *           created.
     *     @type string $write_disposition
     *           Specifies the action that occurs if the destination table or partition
     *           already exists. The following values are supported:
     *           * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
     *           overwrites the entire table or all the partitions data.
     *           * WRITE_APPEND: If the table or partition already exists, BigQuery
     *           appends the data to the table or the latest partition.
     *           * WRITE_EMPTY: If the table already exists and contains data, a
     *           'duplicate' error is returned in the job result.
     *           The default value is WRITE_EMPTY.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Asset\V1\AssetService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The BigQuery dataset where the query results will be saved. It
     * has the format of "projects/{projectId}/datasets/{datasetId}".
     *
     * Generated from protobuf field <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDataset()
    {
        return $this->dataset;
    }

    /**
     * Required. The BigQuery dataset where the query results will be saved. It
     * has the format of "projects/{projectId}/datasets/{datasetId}".
     *
     * Generated from protobuf field <code>string dataset = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDataset($var)
    {
        GPBUtil::checkString($var, True);
        $this->dataset = $var;

        return $this;
    }

    /**
     * Required. The BigQuery table where the query results will be saved. If
     * this table does not exist, a new table with the given name will be
     * created.
     *
     * Generated from protobuf field <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTable()
    {
        return $this->table;
    }

    /**
     * Required. The BigQuery table where the query results will be saved. If
     * this table does not exist, a new table with the given name will be
     * created.
     *
     * Generated from protobuf field <code>string table = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setTable($var)
    {
        GPBUtil::checkString($var, True);
        $this->table = $var;

        return $this;
    }

    /**
     * Specifies the action that occurs if the destination table or partition
     * already exists. The following values are supported:
     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
     * overwrites the entire table or all the partitions data.
     * * WRITE_APPEND: If the table or partition already exists, BigQuery
     * appends the data to the table or the latest partition.
     * * WRITE_EMPTY: If the table already exists and contains data, a
     * 'duplicate' error is returned in the job result.
     * The default value is WRITE_EMPTY.
     *
     * Generated from protobuf field <code>string write_disposition = 3;</code>
     * @return string
     */
    public function getWriteDisposition()
    {
        return $this->write_disposition;
    }

    /**
     * Specifies the action that occurs if the destination table or partition
     * already exists. The following values are supported:
     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
     * overwrites the entire table or all the partitions data.
     * * WRITE_APPEND: If the table or partition already exists, BigQuery
     * appends the data to the table or the latest partition.
     * * WRITE_EMPTY: If the table already exists and contains data, a
     * 'duplicate' error is returned in the job result.
     * The default value is WRITE_EMPTY.
     *
     * Generated from protobuf field <code>string write_disposition = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setWriteDisposition($var)
    {
        GPBUtil::checkString($var, True);
        $this->write_disposition = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BigQueryDestination::class, \Google\Cloud\Asset\V1\QueryAssetsOutputConfig_BigQueryDestination::class);

