<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1alpha/resources.proto
namespace Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha;

use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\RepeatedField;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBUtil;
/**
 * A resource message representing a data stream.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1alpha.DataStream</code>
 */
class DataStream extends \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\Message
{
    /**
     * Output only. Resource name of this Data Stream.
     * Format: properties/{property_id}/dataStreams/{stream_id}
     * Example: "properties/1000/dataStreams/2000"
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * Required. Immutable. The type of this DataStream resource.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];</code>
     */
    private $type = 0;
    /**
     * Human-readable display name for the Data Stream.
     * Required for web data streams.
     * The max allowed display name length is 255 UTF-16 code units.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     */
    private $display_name = '';
    /**
     * Output only. Time when this stream was originally created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. Time when stream payload fields were last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    protected $stream_data;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Admin\V1alpha\DataStream\WebStreamData $web_stream_data
     *           Data specific to web streams. Must be populated if type is
     *           WEB_DATA_STREAM.
     *     @type \Google\Analytics\Admin\V1alpha\DataStream\AndroidAppStreamData $android_app_stream_data
     *           Data specific to Android app streams. Must be populated if type is
     *           ANDROID_APP_DATA_STREAM.
     *     @type \Google\Analytics\Admin\V1alpha\DataStream\IosAppStreamData $ios_app_stream_data
     *           Data specific to iOS app streams. Must be populated if type is
     *           IOS_APP_DATA_STREAM.
     *     @type string $name
     *           Output only. Resource name of this Data Stream.
     *           Format: properties/{property_id}/dataStreams/{stream_id}
     *           Example: "properties/1000/dataStreams/2000"
     *     @type int $type
     *           Required. Immutable. The type of this DataStream resource.
     *     @type string $display_name
     *           Human-readable display name for the Data Stream.
     *           Required for web data streams.
     *           The max allowed display name length is 255 UTF-16 code units.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Time when this stream was originally created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Time when stream payload fields were last updated.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce();
        parent::__construct($data);
    }
    /**
     * Data specific to web streams. Must be populated if type is
     * WEB_DATA_STREAM.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.WebStreamData web_stream_data = 6;</code>
     * @return \Google\Analytics\Admin\V1alpha\DataStream\WebStreamData|null
     */
    public function getWebStreamData()
    {
        return $this->readOneof(6);
    }
    public function hasWebStreamData()
    {
        return $this->hasOneof(6);
    }
    /**
     * Data specific to web streams. Must be populated if type is
     * WEB_DATA_STREAM.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.WebStreamData web_stream_data = 6;</code>
     * @param \Google\Analytics\Admin\V1alpha\DataStream\WebStreamData $var
     * @return $this
     */
    public function setWebStreamData($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\DataStream\WebStreamData::class);
        $this->writeOneof(6, $var);
        return $this;
    }
    /**
     * Data specific to Android app streams. Must be populated if type is
     * ANDROID_APP_DATA_STREAM.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData android_app_stream_data = 7;</code>
     * @return \Google\Analytics\Admin\V1alpha\DataStream\AndroidAppStreamData|null
     */
    public function getAndroidAppStreamData()
    {
        return $this->readOneof(7);
    }
    public function hasAndroidAppStreamData()
    {
        return $this->hasOneof(7);
    }
    /**
     * Data specific to Android app streams. Must be populated if type is
     * ANDROID_APP_DATA_STREAM.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData android_app_stream_data = 7;</code>
     * @param \Google\Analytics\Admin\V1alpha\DataStream\AndroidAppStreamData $var
     * @return $this
     */
    public function setAndroidAppStreamData($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\DataStream\AndroidAppStreamData::class);
        $this->writeOneof(7, $var);
        return $this;
    }
    /**
     * Data specific to iOS app streams. Must be populated if type is
     * IOS_APP_DATA_STREAM.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.IosAppStreamData ios_app_stream_data = 8;</code>
     * @return \Google\Analytics\Admin\V1alpha\DataStream\IosAppStreamData|null
     */
    public function getIosAppStreamData()
    {
        return $this->readOneof(8);
    }
    public function hasIosAppStreamData()
    {
        return $this->hasOneof(8);
    }
    /**
     * Data specific to iOS app streams. Must be populated if type is
     * IOS_APP_DATA_STREAM.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.IosAppStreamData ios_app_stream_data = 8;</code>
     * @param \Google\Analytics\Admin\V1alpha\DataStream\IosAppStreamData $var
     * @return $this
     */
    public function setIosAppStreamData($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\DataStream\IosAppStreamData::class);
        $this->writeOneof(8, $var);
        return $this;
    }
    /**
     * Output only. Resource name of this Data Stream.
     * Format: properties/{property_id}/dataStreams/{stream_id}
     * Example: "properties/1000/dataStreams/2000"
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Output only. Resource name of this Data Stream.
     * Format: properties/{property_id}/dataStreams/{stream_id}
     * Example: "properties/1000/dataStreams/2000"
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;
        return $this;
    }
    /**
     * Required. Immutable. The type of this DataStream resource.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }
    /**
     * Required. Immutable. The type of this DataStream resource.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1alpha.DataStream.DataStreamType type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Admin\V1alpha\DataStream\DataStreamType::class);
        $this->type = $var;
        return $this;
    }
    /**
     * Human-readable display name for the Data Stream.
     * Required for web data streams.
     * The max allowed display name length is 255 UTF-16 code units.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }
    /**
     * Human-readable display name for the Data Stream.
     * Required for web data streams.
     * The max allowed display name length is 255 UTF-16 code units.
     *
     * Generated from protobuf field <code>string display_name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;
        return $this;
    }
    /**
     * Output only. Time when this stream was originally created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }
    public function hasCreateTime()
    {
        return isset($this->create_time);
    }
    public function clearCreateTime()
    {
        unset($this->create_time);
    }
    /**
     * Output only. Time when this stream was originally created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Timestamp::class);
        $this->create_time = $var;
        return $this;
    }
    /**
     * Output only. Time when stream payload fields were last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }
    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }
    public function clearUpdateTime()
    {
        unset($this->update_time);
    }
    /**
     * Output only. Time when stream payload fields were last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Timestamp::class);
        $this->update_time = $var;
        return $this;
    }
    /**
     * @return string
     */
    public function getStreamData()
    {
        return $this->whichOneof("stream_data");
    }
}
