<?php
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v24/resources/age_range_view.proto

namespace Google\Ads\GoogleAds\V24\Resources;

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

/**
 * An age range view.
 * Represents the view of a customer's performance metrics (like impressions
 * and clicks) aggregated by age range. All statistics are aggregated at the
 * ad group level.
 * Note: While you can segment metrics by age range using `age_range_view` or by
 * gender using `gender_view`, the Google Ads API does not support segmenting
 * metrics by both age range and gender simultaneously in a single query.
 * Analyzing performance across both dimensions combined is not supported in
 * the Google Ads API.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.resources.AgeRangeView</code>
 */
class AgeRangeView extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of the age range view.
     * Age range view resource names have the form:
     * `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $resource_name
     *           Output only. The resource name of the age range view.
     *           Age range view resource names have the form:
     *           `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}`
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Resources\AgeRangeView::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The resource name of the age range view.
     * Age range view resource names have the form:
     * `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     *
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Output only. The resource name of the age range view.
     * Age range view resource names have the form:
     * `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, true);
        $this->resource_name = $var;

        return $this;
    }

}

