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

namespace Google\Cloud\Video\Transcoder\V1\PreprocessingConfig;

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

/**
 * Deinterlace configuration for input video.
 *
 * Generated from protobuf message <code>google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace</code>
 */
class Deinterlace extends \Google\Protobuf\Internal\Message
{
    protected $deinterlacing_filter;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $yadif
     *           Specifies the Yet Another Deinterlacing Filter Configuration.
     *     @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $bwdif
     *           Specifies the Bob Weaver Deinterlacing Filter Configuration.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Specifies the Yet Another Deinterlacing Filter Configuration.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1;</code>
     * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig|null
     */
    public function getYadif()
    {
        return $this->readOneof(1);
    }

    public function hasYadif()
    {
        return $this->hasOneof(1);
    }

    /**
     * Specifies the Yet Another Deinterlacing Filter Configuration.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1;</code>
     * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $var
     * @return $this
     */
    public function setYadif($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Specifies the Bob Weaver Deinterlacing Filter Configuration.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2;</code>
     * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig|null
     */
    public function getBwdif()
    {
        return $this->readOneof(2);
    }

    public function hasBwdif()
    {
        return $this->hasOneof(2);
    }

    /**
     * Specifies the Bob Weaver Deinterlacing Filter Configuration.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2;</code>
     * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $var
     * @return $this
     */
    public function setBwdif($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}


