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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * Describes the format of the data within its storage location.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.StorageFormat</code>
 */
class StorageFormat extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The data format associated with the stored data, which
     * represents content type values. The value is inferred from mime type.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $format = 0;
    /**
     * Optional. The compression type associated with the stored data.
     * If unspecified, the data is uncompressed.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $compression_format = 0;
    /**
     * Required. The mime type descriptor for the data. Must match the pattern
     * {type}/{subtype}. Supported values:
     * - application/x-parquet
     * - application/x-avro
     * - application/x-orc
     * - application/x-tfrecord
     * - application/x-parquet+iceberg
     * - application/x-avro+iceberg
     * - application/x-orc+iceberg
     * - application/json
     * - application/{subtypes}
     * - text/csv
     * - text/<subtypes>
     * - image/{image subtype}
     * - video/{video subtype}
     * - audio/{audio subtype}
     *
     * Generated from protobuf field <code>string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $mime_type = '';
    protected $options;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $format
     *           Output only. The data format associated with the stored data, which
     *           represents content type values. The value is inferred from mime type.
     *     @type int $compression_format
     *           Optional. The compression type associated with the stored data.
     *           If unspecified, the data is uncompressed.
     *     @type string $mime_type
     *           Required. The mime type descriptor for the data. Must match the pattern
     *           {type}/{subtype}. Supported values:
     *           - application/x-parquet
     *           - application/x-avro
     *           - application/x-orc
     *           - application/x-tfrecord
     *           - application/x-parquet+iceberg
     *           - application/x-avro+iceberg
     *           - application/x-orc+iceberg
     *           - application/json
     *           - application/{subtypes}
     *           - text/csv
     *           - text/<subtypes>
     *           - image/{image subtype}
     *           - video/{video subtype}
     *           - audio/{audio subtype}
     *     @type \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions $csv
     *           Optional. Additional information about CSV formatted data.
     *     @type \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions $json
     *           Optional. Additional information about CSV formatted data.
     *     @type \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions $iceberg
     *           Optional. Additional information about iceberg tables.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The data format associated with the stored data, which
     * represents content type values. The value is inferred from mime type.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getFormat()
    {
        return $this->format;
    }

    /**
     * Output only. The data format associated with the stored data, which
     * represents content type values. The value is inferred from mime type.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setFormat($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageFormat\Format::class);
        $this->format = $var;

        return $this;
    }

    /**
     * Optional. The compression type associated with the stored data.
     * If unspecified, the data is uncompressed.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getCompressionFormat()
    {
        return $this->compression_format;
    }

    /**
     * Optional. The compression type associated with the stored data.
     * If unspecified, the data is uncompressed.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setCompressionFormat($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageFormat\CompressionFormat::class);
        $this->compression_format = $var;

        return $this;
    }

    /**
     * Required. The mime type descriptor for the data. Must match the pattern
     * {type}/{subtype}. Supported values:
     * - application/x-parquet
     * - application/x-avro
     * - application/x-orc
     * - application/x-tfrecord
     * - application/x-parquet+iceberg
     * - application/x-avro+iceberg
     * - application/x-orc+iceberg
     * - application/json
     * - application/{subtypes}
     * - text/csv
     * - text/<subtypes>
     * - image/{image subtype}
     * - video/{video subtype}
     * - audio/{audio subtype}
     *
     * Generated from protobuf field <code>string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getMimeType()
    {
        return $this->mime_type;
    }

    /**
     * Required. The mime type descriptor for the data. Must match the pattern
     * {type}/{subtype}. Supported values:
     * - application/x-parquet
     * - application/x-avro
     * - application/x-orc
     * - application/x-tfrecord
     * - application/x-parquet+iceberg
     * - application/x-avro+iceberg
     * - application/x-orc+iceberg
     * - application/json
     * - application/{subtypes}
     * - text/csv
     * - text/<subtypes>
     * - image/{image subtype}
     * - video/{video subtype}
     * - audio/{audio subtype}
     *
     * Generated from protobuf field <code>string mime_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setMimeType($var)
    {
        GPBUtil::checkString($var, True);
        $this->mime_type = $var;

        return $this;
    }

    /**
     * Optional. Additional information about CSV formatted data.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.CsvOptions csv = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions|null
     */
    public function getCsv()
    {
        return $this->readOneof(10);
    }

    public function hasCsv()
    {
        return $this->hasOneof(10);
    }

    /**
     * Optional. Additional information about CSV formatted data.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.CsvOptions csv = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions $var
     * @return $this
     */
    public function setCsv($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Optional. Additional information about CSV formatted data.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.JsonOptions json = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions|null
     */
    public function getJson()
    {
        return $this->readOneof(11);
    }

    public function hasJson()
    {
        return $this->hasOneof(11);
    }

    /**
     * Optional. Additional information about CSV formatted data.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.JsonOptions json = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions $var
     * @return $this
     */
    public function setJson($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * Optional. Additional information about iceberg tables.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions|null
     */
    public function getIceberg()
    {
        return $this->readOneof(12);
    }

    public function hasIceberg()
    {
        return $this->hasOneof(12);
    }

    /**
     * Optional. Additional information about iceberg tables.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions $var
     * @return $this
     */
    public function setIceberg($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions::class);
        $this->writeOneof(12, $var);

        return $this;
    }

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

}

