<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto

namespace Google\Cloud\DataLabeling\V1beta1;

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

/**
 * Request message for CreateInstruction.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.CreateInstructionRequest</code>
 */
class CreateInstructionRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Instruction resource parent, format:
     * projects/{project_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. Instruction of how to perform the labeling task.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.Instruction instruction = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $instruction = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. Instruction resource parent, format:
     *           projects/{project_id}
     *     @type \Google\Cloud\DataLabeling\V1beta1\Instruction $instruction
     *           Required. Instruction of how to perform the labeling task.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\DataLabelingService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Instruction resource parent, format:
     * projects/{project_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. Instruction resource parent, format:
     * projects/{project_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. Instruction of how to perform the labeling task.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.Instruction instruction = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\Instruction|null
     */
    public function getInstruction()
    {
        return $this->instruction;
    }

    public function hasInstruction()
    {
        return isset($this->instruction);
    }

    public function clearInstruction()
    {
        unset($this->instruction);
    }

    /**
     * Required. Instruction of how to perform the labeling task.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.Instruction instruction = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\Instruction $var
     * @return $this
     */
    public function setInstruction($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\Instruction::class);
        $this->instruction = $var;

        return $this;
    }

}

