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

namespace Google\Cloud\Video\Transcoder\V1;

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

/**
 * Transcoding job template resource.
 *
 * Generated from protobuf message <code>google.cloud.video.transcoder.v1.JobTemplate</code>
 */
class JobTemplate extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the job template.
     * Format:
     * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The configuration for this template.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.JobConfig config = 2;</code>
     */
    private $config = null;
    /**
     * The labels associated with this job template. You can use these to organize
     * and group your job templates.
     *
     * Generated from protobuf field <code>map<string, string> labels = 3;</code>
     */
    private $labels;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The resource name of the job template.
     *           Format:
     *           `projects/{project_number}/locations/{location}/jobTemplates/{job_template}`
     *     @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config
     *           The configuration for this template.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           The labels associated with this job template. You can use these to organize
     *           and group your job templates.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the job template.
     * Format:
     * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The resource name of the job template.
     * Format:
     * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The configuration for this template.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.JobConfig config = 2;</code>
     * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null
     */
    public function getConfig()
    {
        return $this->config;
    }

    public function hasConfig()
    {
        return isset($this->config);
    }

    public function clearConfig()
    {
        unset($this->config);
    }

    /**
     * The configuration for this template.
     *
     * Generated from protobuf field <code>.google.cloud.video.transcoder.v1.JobConfig config = 2;</code>
     * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var
     * @return $this
     */
    public function setConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class);
        $this->config = $var;

        return $this;
    }

    /**
     * The labels associated with this job template. You can use these to organize
     * and group your job templates.
     *
     * Generated from protobuf field <code>map<string, string> labels = 3;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * The labels associated with this job template. You can use these to organize
     * and group your job templates.
     *
     * Generated from protobuf field <code>map<string, string> labels = 3;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

}

