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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.ExportAgentResponse</code>
 */
class ExportAgentResponse extends \Google\Protobuf\Internal\Message
{
    protected $agent;

    public function __construct() {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Agent::initOnce();
        parent::__construct();
    }

    /**
     * The URI to a file containing the exported agent. This field is populated
     * only if `agent_uri` is specified in `ExportAgentRequest`.
     *
     * Generated from protobuf field <code>string agent_uri = 1;</code>
     * @return string
     */
    public function getAgentUri()
    {
        return $this->readOneof(1);
    }

    /**
     * The URI to a file containing the exported agent. This field is populated
     * only if `agent_uri` is specified in `ExportAgentRequest`.
     *
     * Generated from protobuf field <code>string agent_uri = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setAgentUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The exported agent.
     * Example for how to export an agent to a zip file via a command line:
     * curl \
     *   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:export'\
     *   -X POST \
     *   -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
     *   -H 'Accept: application/json' \
     *   -H 'Content-Type: application/json' \
     *   --compressed \
     *   --data-binary '{}' \
     * | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*&#47;\1/' \
     * | base64 --decode > <agent zip file>
     *
     * Generated from protobuf field <code>bytes agent_content = 2;</code>
     * @return string
     */
    public function getAgentContent()
    {
        return $this->readOneof(2);
    }

    /**
     * The exported agent.
     * Example for how to export an agent to a zip file via a command line:
     * curl \
     *   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:export'\
     *   -X POST \
     *   -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
     *   -H 'Accept: application/json' \
     *   -H 'Content-Type: application/json' \
     *   --compressed \
     *   --data-binary '{}' \
     * | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*&#47;\1/' \
     * | base64 --decode > <agent zip file>
     *
     * Generated from protobuf field <code>bytes agent_content = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setAgentContent($var)
    {
        GPBUtil::checkString($var, False);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

