<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/admin/v1beta/resources.proto

namespace Google\Analytics\Admin\V1beta\ChangeHistoryChange;

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

/**
 * A snapshot of a resource as before or after the result of a change in
 * change history.
 *
 * Generated from protobuf message <code>google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource</code>
 */
class ChangeHistoryResource extends \Google\Protobuf\Internal\Message
{
    protected $resource;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Admin\V1beta\Account $account
     *           A snapshot of an Account resource in change history.
     *     @type \Google\Analytics\Admin\V1beta\Property $property
     *           A snapshot of a Property resource in change history.
     *     @type \Google\Analytics\Admin\V1beta\FirebaseLink $firebase_link
     *           A snapshot of a FirebaseLink resource in change history.
     *     @type \Google\Analytics\Admin\V1beta\GoogleAdsLink $google_ads_link
     *           A snapshot of a GoogleAdsLink resource in change history.
     *     @type \Google\Analytics\Admin\V1beta\ConversionEvent $conversion_event
     *           A snapshot of a ConversionEvent resource in change history.
     *     @type \Google\Analytics\Admin\V1beta\MeasurementProtocolSecret $measurement_protocol_secret
     *           A snapshot of a MeasurementProtocolSecret resource in change history.
     *     @type \Google\Analytics\Admin\V1beta\DataRetentionSettings $data_retention_settings
     *           A snapshot of a data retention settings resource in change history.
     *     @type \Google\Analytics\Admin\V1beta\DataStream $data_stream
     *           A snapshot of a DataStream resource in change history.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Admin\V1Beta\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * A snapshot of an Account resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.Account account = 1;</code>
     * @return \Google\Analytics\Admin\V1beta\Account|null
     */
    public function getAccount()
    {
        return $this->readOneof(1);
    }

    public function hasAccount()
    {
        return $this->hasOneof(1);
    }

    /**
     * A snapshot of an Account resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.Account account = 1;</code>
     * @param \Google\Analytics\Admin\V1beta\Account $var
     * @return $this
     */
    public function setAccount($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\Account::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * A snapshot of a Property resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.Property property = 2;</code>
     * @return \Google\Analytics\Admin\V1beta\Property|null
     */
    public function getProperty()
    {
        return $this->readOneof(2);
    }

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

    /**
     * A snapshot of a Property resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.Property property = 2;</code>
     * @param \Google\Analytics\Admin\V1beta\Property $var
     * @return $this
     */
    public function setProperty($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\Property::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * A snapshot of a FirebaseLink resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.FirebaseLink firebase_link = 6;</code>
     * @return \Google\Analytics\Admin\V1beta\FirebaseLink|null
     */
    public function getFirebaseLink()
    {
        return $this->readOneof(6);
    }

    public function hasFirebaseLink()
    {
        return $this->hasOneof(6);
    }

    /**
     * A snapshot of a FirebaseLink resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.FirebaseLink firebase_link = 6;</code>
     * @param \Google\Analytics\Admin\V1beta\FirebaseLink $var
     * @return $this
     */
    public function setFirebaseLink($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\FirebaseLink::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * A snapshot of a GoogleAdsLink resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7;</code>
     * @return \Google\Analytics\Admin\V1beta\GoogleAdsLink|null
     */
    public function getGoogleAdsLink()
    {
        return $this->readOneof(7);
    }

    public function hasGoogleAdsLink()
    {
        return $this->hasOneof(7);
    }

    /**
     * A snapshot of a GoogleAdsLink resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.GoogleAdsLink google_ads_link = 7;</code>
     * @param \Google\Analytics\Admin\V1beta\GoogleAdsLink $var
     * @return $this
     */
    public function setGoogleAdsLink($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\GoogleAdsLink::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * A snapshot of a ConversionEvent resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.ConversionEvent conversion_event = 11;</code>
     * @return \Google\Analytics\Admin\V1beta\ConversionEvent|null
     */
    public function getConversionEvent()
    {
        return $this->readOneof(11);
    }

    public function hasConversionEvent()
    {
        return $this->hasOneof(11);
    }

    /**
     * A snapshot of a ConversionEvent resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.ConversionEvent conversion_event = 11;</code>
     * @param \Google\Analytics\Admin\V1beta\ConversionEvent $var
     * @return $this
     */
    public function setConversionEvent($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\ConversionEvent::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * A snapshot of a MeasurementProtocolSecret resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12;</code>
     * @return \Google\Analytics\Admin\V1beta\MeasurementProtocolSecret|null
     */
    public function getMeasurementProtocolSecret()
    {
        return $this->readOneof(12);
    }

    public function hasMeasurementProtocolSecret()
    {
        return $this->hasOneof(12);
    }

    /**
     * A snapshot of a MeasurementProtocolSecret resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.MeasurementProtocolSecret measurement_protocol_secret = 12;</code>
     * @param \Google\Analytics\Admin\V1beta\MeasurementProtocolSecret $var
     * @return $this
     */
    public function setMeasurementProtocolSecret($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\MeasurementProtocolSecret::class);
        $this->writeOneof(12, $var);

        return $this;
    }

    /**
     * A snapshot of a data retention settings resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15;</code>
     * @return \Google\Analytics\Admin\V1beta\DataRetentionSettings|null
     */
    public function getDataRetentionSettings()
    {
        return $this->readOneof(15);
    }

    public function hasDataRetentionSettings()
    {
        return $this->hasOneof(15);
    }

    /**
     * A snapshot of a data retention settings resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.DataRetentionSettings data_retention_settings = 15;</code>
     * @param \Google\Analytics\Admin\V1beta\DataRetentionSettings $var
     * @return $this
     */
    public function setDataRetentionSettings($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\DataRetentionSettings::class);
        $this->writeOneof(15, $var);

        return $this;
    }

    /**
     * A snapshot of a DataStream resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.DataStream data_stream = 18;</code>
     * @return \Google\Analytics\Admin\V1beta\DataStream|null
     */
    public function getDataStream()
    {
        return $this->readOneof(18);
    }

    public function hasDataStream()
    {
        return $this->hasOneof(18);
    }

    /**
     * A snapshot of a DataStream resource in change history.
     *
     * Generated from protobuf field <code>.google.analytics.admin.v1beta.DataStream data_stream = 18;</code>
     * @param \Google\Analytics\Admin\V1beta\DataStream $var
     * @return $this
     */
    public function setDataStream($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\DataStream::class);
        $this->writeOneof(18, $var);

        return $this;
    }

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

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ChangeHistoryResource::class, \Google\Analytics\Admin\V1beta\ChangeHistoryChange_ChangeHistoryResource::class);

