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

namespace Google\Cloud\ContactCenterInsights\V1;

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

/**
 * Request to export an issue model.
 *
 * Generated from protobuf message <code>google.cloud.contactcenterinsights.v1.ExportIssueModelRequest</code>
 */
class ExportIssueModelRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The issue model to export.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $name = '';
    protected $Destination;

    /**
     * @param string $name Required. The issue model to export. Please see
     *                     {@see ContactCenterInsightsClient::issueModelName()} for help formatting this field.
     *
     * @return \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest
     *
     * @experimental
     */
    public static function build(string $name): self
    {
        return (new self())
            ->setName($name);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest\GcsDestination $gcs_destination
     *           Google Cloud Storage URI to export the issue model to.
     *     @type string $name
     *           Required. The issue model to export.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
        parent::__construct($data);
    }

    /**
     * Google Cloud Storage URI to export the issue model to.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination gcs_destination = 2;</code>
     * @return \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest\GcsDestination|null
     */
    public function getGcsDestination()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Google Cloud Storage URI to export the issue model to.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination gcs_destination = 2;</code>
     * @param \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest\GcsDestination $var
     * @return $this
     */
    public function setGcsDestination($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\ExportIssueModelRequest\GcsDestination::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Required. The issue model to export.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The issue model to export.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

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

}

