<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/datamanager/v1/insights_service.proto

namespace Google\Ads\DataManager\V1\RetrieveInsightsResponse;

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

/**
 * Insights for marketing data.
 * This feature is only available to data partners.
 *
 * Generated from protobuf message <code>google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight</code>
 */
class MarketingDataInsight extends \Google\Protobuf\Internal\Message
{
    /**
     * The dimension to which the insight belongs.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension dimension = 1;</code>
     */
    protected $dimension = 0;
    /**
     * Insights for values of a given dimension.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute attributes = 2;</code>
     */
    private $attributes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $dimension
     *           The dimension to which the insight belongs.
     *     @type array<\Google\Ads\DataManager\V1\RetrieveInsightsResponse\MarketingDataInsight\MarketingDataInsightsAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes
     *           Insights for values of a given dimension.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Datamanager\V1\InsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The dimension to which the insight belongs.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension dimension = 1;</code>
     * @return int
     */
    public function getDimension()
    {
        return $this->dimension;
    }

    /**
     * The dimension to which the insight belongs.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.AudienceInsightsDimension dimension = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setDimension($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\DataManager\V1\RetrieveInsightsResponse\MarketingDataInsight\AudienceInsightsDimension::class);
        $this->dimension = $var;

        return $this;
    }

    /**
     * Insights for values of a given dimension.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute attributes = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    /**
     * Insights for values of a given dimension.
     *
     * Generated from protobuf field <code>repeated .google.ads.datamanager.v1.RetrieveInsightsResponse.MarketingDataInsight.MarketingDataInsightsAttribute attributes = 2;</code>
     * @param array<\Google\Ads\DataManager\V1\RetrieveInsightsResponse\MarketingDataInsight\MarketingDataInsightsAttribute>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAttributes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\DataManager\V1\RetrieveInsightsResponse\MarketingDataInsight\MarketingDataInsightsAttribute::class);
        $this->attributes = $arr;

        return $this;
    }

}


