<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v25/services/benchmarks_service.proto

namespace Google\Ads\GoogleAds\V25\Services;

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

/**
 * The set of dimensions to group metrics by.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.BreakdownDefinition</code>
 */
class BreakdownDefinition extends \Google\Protobuf\Internal\Message
{
    /**
     * The granularity for segmenting metrics by date. When this field is set,
     * a valid date_range in the GenerateBenchmarksMetricsRequest is required
     * and must precisely align with the boundaries of the selected granularity.
     * For example, a monthly breakdown must start on the first day of a month and
     * end on the last day of a month. A quarterly breakdown must start on the
     * first day of a quarter and end on the last day of a quarter. A weekly
     * breakdown must start on a Sunday and end on a Saturday. This is different
     * from the ISO 8601 standard, where weeks start on Monday.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.enums.BenchmarksTimeGranularityEnum.BenchmarksTimeGranularity date_breakdown = 1;</code>
     */
    protected $date_breakdown = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $date_breakdown
     *           The granularity for segmenting metrics by date. When this field is set,
     *           a valid date_range in the GenerateBenchmarksMetricsRequest is required
     *           and must precisely align with the boundaries of the selected granularity.
     *           For example, a monthly breakdown must start on the first day of a month and
     *           end on the last day of a month. A quarterly breakdown must start on the
     *           first day of a quarter and end on the last day of a quarter. A weekly
     *           breakdown must start on a Sunday and end on a Saturday. This is different
     *           from the ISO 8601 standard, where weeks start on Monday.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\BenchmarksService::initOnce();
        parent::__construct($data);
    }

    /**
     * The granularity for segmenting metrics by date. When this field is set,
     * a valid date_range in the GenerateBenchmarksMetricsRequest is required
     * and must precisely align with the boundaries of the selected granularity.
     * For example, a monthly breakdown must start on the first day of a month and
     * end on the last day of a month. A quarterly breakdown must start on the
     * first day of a quarter and end on the last day of a quarter. A weekly
     * breakdown must start on a Sunday and end on a Saturday. This is different
     * from the ISO 8601 standard, where weeks start on Monday.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.enums.BenchmarksTimeGranularityEnum.BenchmarksTimeGranularity date_breakdown = 1;</code>
     * @return int
     */
    public function getDateBreakdown()
    {
        return $this->date_breakdown;
    }

    /**
     * The granularity for segmenting metrics by date. When this field is set,
     * a valid date_range in the GenerateBenchmarksMetricsRequest is required
     * and must precisely align with the boundaries of the selected granularity.
     * For example, a monthly breakdown must start on the first day of a month and
     * end on the last day of a month. A quarterly breakdown must start on the
     * first day of a quarter and end on the last day of a quarter. A weekly
     * breakdown must start on a Sunday and end on a Saturday. This is different
     * from the ISO 8601 standard, where weeks start on Monday.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.enums.BenchmarksTimeGranularityEnum.BenchmarksTimeGranularity date_breakdown = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setDateBreakdown($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V25\Enums\BenchmarksTimeGranularityEnum\BenchmarksTimeGranularity::class);
        $this->date_breakdown = $var;

        return $this;
    }

}

