<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/cx/v3/playbook.proto

namespace Google\Cloud\Dialogflow\Cx\V3;

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

/**
 * The request message for
 * [Playbooks.ImportPlaybook][google.cloud.dialogflow.cx.v3.Playbooks.ImportPlaybook].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.cx.v3.ImportPlaybookRequest</code>
 */
class ImportPlaybookRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The agent to import the playbook into.
     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Optional. Specifies the import strategy used when resolving resource
     * conflicts.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $import_strategy = null;
    protected $playbook;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The agent to import the playbook into.
     *           Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
     *     @type string $playbook_uri
     *           [Dialogflow access
     *           control]
     *           (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
     *     @type string $playbook_content
     *           Uncompressed raw byte content for playbook.
     *     @type \Google\Cloud\Dialogflow\Cx\V3\PlaybookImportStrategy $import_strategy
     *           Optional. Specifies the import strategy used when resolving resource
     *           conflicts.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\Playbook::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The agent to import the playbook into.
     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
     *
     * 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. The agent to import the playbook into.
     * Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
     *
     * 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;
    }

    /**
     * [Dialogflow access
     * control]
     * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
     *
     * Generated from protobuf field <code>string playbook_uri = 2;</code>
     * @return string
     */
    public function getPlaybookUri()
    {
        return $this->readOneof(2);
    }

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

    /**
     * [Dialogflow access
     * control]
     * (https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
     *
     * Generated from protobuf field <code>string playbook_uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setPlaybookUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Uncompressed raw byte content for playbook.
     *
     * Generated from protobuf field <code>bytes playbook_content = 3;</code>
     * @return string
     */
    public function getPlaybookContent()
    {
        return $this->readOneof(3);
    }

    public function hasPlaybookContent()
    {
        return $this->hasOneof(3);
    }

    /**
     * Uncompressed raw byte content for playbook.
     *
     * Generated from protobuf field <code>bytes playbook_content = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setPlaybookContent($var)
    {
        GPBUtil::checkString($var, False);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Optional. Specifies the import strategy used when resolving resource
     * conflicts.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\Cx\V3\PlaybookImportStrategy|null
     */
    public function getImportStrategy()
    {
        return $this->import_strategy;
    }

    public function hasImportStrategy()
    {
        return isset($this->import_strategy);
    }

    public function clearImportStrategy()
    {
        unset($this->import_strategy);
    }

    /**
     * Optional. Specifies the import strategy used when resolving resource
     * conflicts.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.cx.v3.PlaybookImportStrategy import_strategy = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\Cx\V3\PlaybookImportStrategy $var
     * @return $this
     */
    public function setImportStrategy($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\Cx\V3\PlaybookImportStrategy::class);
        $this->import_strategy = $var;

        return $this;
    }

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

}

