<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2beta1/dlp.proto

namespace Google\Cloud\Dlp\V2beta1;

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

/**
 * Cloud repository for storing output.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2beta1.OutputStorageConfig</code>
 */
class OutputStorageConfig extends \Google\Protobuf\Internal\Message
{
    protected $type;

    public function __construct() {
        \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce();
        parent::__construct();
    }

    /**
     * Store findings in a new table in the dataset.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.BigQueryTable table = 1;</code>
     * @return \Google\Cloud\Dlp\V2beta1\BigQueryTable
     */
    public function getTable()
    {
        return $this->readOneof(1);
    }

    /**
     * Store findings in a new table in the dataset.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.BigQueryTable table = 1;</code>
     * @param \Google\Cloud\Dlp\V2beta1\BigQueryTable $var
     * @return $this
     */
    public function setTable($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\BigQueryTable::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The path to a Google Cloud Storage location to store output.
     * The bucket must already exist and
     * the Google APIs service account for DLP must have write permission to
     * write to the given bucket.
     * Results are split over multiple csv files with each file name matching
     * the pattern "[operation_id]_[count].csv", for example
     * `3094877188788974909_1.csv`. The `operation_id` matches the
     * identifier for the Operation, and the `count` is a counter used for
     * tracking the number of files written.
     * The CSV file(s) contain the following columns regardless of storage type
     * scanned:
     * - id
     * - info_type
     * - likelihood
     * - byte size of finding
     * - quote
     * - timestamp
     * For Cloud Storage the next columns are:
     * - file_path
     * - start_offset
     * For Cloud Datastore the next columns are:
     * - project_id
     * - namespace_id
     * - path
     * - column_name
     * - offset
     * For BigQuery the next columns are:
     * - row_number
     * - project_id
     * - dataset_id
     * - table_id
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.CloudStoragePath storage_path = 2;</code>
     * @return \Google\Cloud\Dlp\V2beta1\CloudStoragePath
     */
    public function getStoragePath()
    {
        return $this->readOneof(2);
    }

    /**
     * The path to a Google Cloud Storage location to store output.
     * The bucket must already exist and
     * the Google APIs service account for DLP must have write permission to
     * write to the given bucket.
     * Results are split over multiple csv files with each file name matching
     * the pattern "[operation_id]_[count].csv", for example
     * `3094877188788974909_1.csv`. The `operation_id` matches the
     * identifier for the Operation, and the `count` is a counter used for
     * tracking the number of files written.
     * The CSV file(s) contain the following columns regardless of storage type
     * scanned:
     * - id
     * - info_type
     * - likelihood
     * - byte size of finding
     * - quote
     * - timestamp
     * For Cloud Storage the next columns are:
     * - file_path
     * - start_offset
     * For Cloud Datastore the next columns are:
     * - project_id
     * - namespace_id
     * - path
     * - column_name
     * - offset
     * For BigQuery the next columns are:
     * - row_number
     * - project_id
     * - dataset_id
     * - table_id
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.CloudStoragePath storage_path = 2;</code>
     * @param \Google\Cloud\Dlp\V2beta1\CloudStoragePath $var
     * @return $this
     */
    public function setStoragePath($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CloudStoragePath::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getType()
    {
        return $this->whichOneof("type");
    }

}

