<?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;

/**
 * Metrics representing the customer’s Ad performance.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.CustomerMetrics</code>
 */
class CustomerMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Average rate metrics calculated by dividing one metric by another.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.RateMetrics average_rate_metrics = 1;</code>
     */
    protected $average_rate_metrics = null;
    /**
     * Metrics calculated by dividing the metric of the customer by that of the
     * selected benchmarks source. These metrics are only returned when:
     * 1. `all_advertisers` is used as the `benchmarks_source`. Note that the
     * request `category_filter` must be set when using `all_advertisers`.
     * 2. The request `date_range` is a subset of
     * `supported_dates_for_all_metrics` returned by
     * [BenchmarksService.ListBenchmarksAvailableDates][google.ads.googleads.v25.services.BenchmarksService.ListBenchmarksAvailableDates].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.ShareMetrics share_metrics = 2;</code>
     */
    protected $share_metrics = null;
    /**
     * Metrics calculated by aggregating values of a single metric for the
     * customer.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.AggregateMetrics aggregate_metrics = 3;</code>
     */
    protected $aggregate_metrics = null;
    /**
     * Metrics representing the customer’s competitive standing among advertisers
     * scoped by the analysis. Percentile metrics are only returned when:
     * 1. `all_advertisers` is used as the `benchmarks_source`. Note that the
     * request `category_filter` must be set when using `all_advertisers`.
     * 2. `PERCENTILE_DATA` is requested as `supplemental_data`.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.PercentileMetrics percentile_metrics = 4;</code>
     */
    protected $percentile_metrics = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V25\Services\RateMetrics $average_rate_metrics
     *           Average rate metrics calculated by dividing one metric by another.
     *     @type \Google\Ads\GoogleAds\V25\Services\ShareMetrics $share_metrics
     *           Metrics calculated by dividing the metric of the customer by that of the
     *           selected benchmarks source. These metrics are only returned when:
     *           1. `all_advertisers` is used as the `benchmarks_source`. Note that the
     *           request `category_filter` must be set when using `all_advertisers`.
     *           2. The request `date_range` is a subset of
     *           `supported_dates_for_all_metrics` returned by
     *           [BenchmarksService.ListBenchmarksAvailableDates][google.ads.googleads.v25.services.BenchmarksService.ListBenchmarksAvailableDates].
     *     @type \Google\Ads\GoogleAds\V25\Services\AggregateMetrics $aggregate_metrics
     *           Metrics calculated by aggregating values of a single metric for the
     *           customer.
     *     @type \Google\Ads\GoogleAds\V25\Services\PercentileMetrics $percentile_metrics
     *           Metrics representing the customer’s competitive standing among advertisers
     *           scoped by the analysis. Percentile metrics are only returned when:
     *           1. `all_advertisers` is used as the `benchmarks_source`. Note that the
     *           request `category_filter` must be set when using `all_advertisers`.
     *           2. `PERCENTILE_DATA` is requested as `supplemental_data`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\BenchmarksService::initOnce();
        parent::__construct($data);
    }

    /**
     * Average rate metrics calculated by dividing one metric by another.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.RateMetrics average_rate_metrics = 1;</code>
     * @return \Google\Ads\GoogleAds\V25\Services\RateMetrics|null
     */
    public function getAverageRateMetrics()
    {
        return $this->average_rate_metrics;
    }

    public function hasAverageRateMetrics()
    {
        return isset($this->average_rate_metrics);
    }

    public function clearAverageRateMetrics()
    {
        unset($this->average_rate_metrics);
    }

    /**
     * Average rate metrics calculated by dividing one metric by another.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.RateMetrics average_rate_metrics = 1;</code>
     * @param \Google\Ads\GoogleAds\V25\Services\RateMetrics $var
     * @return $this
     */
    public function setAverageRateMetrics($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Services\RateMetrics::class);
        $this->average_rate_metrics = $var;

        return $this;
    }

    /**
     * Metrics calculated by dividing the metric of the customer by that of the
     * selected benchmarks source. These metrics are only returned when:
     * 1. `all_advertisers` is used as the `benchmarks_source`. Note that the
     * request `category_filter` must be set when using `all_advertisers`.
     * 2. The request `date_range` is a subset of
     * `supported_dates_for_all_metrics` returned by
     * [BenchmarksService.ListBenchmarksAvailableDates][google.ads.googleads.v25.services.BenchmarksService.ListBenchmarksAvailableDates].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.ShareMetrics share_metrics = 2;</code>
     * @return \Google\Ads\GoogleAds\V25\Services\ShareMetrics|null
     */
    public function getShareMetrics()
    {
        return $this->share_metrics;
    }

    public function hasShareMetrics()
    {
        return isset($this->share_metrics);
    }

    public function clearShareMetrics()
    {
        unset($this->share_metrics);
    }

    /**
     * Metrics calculated by dividing the metric of the customer by that of the
     * selected benchmarks source. These metrics are only returned when:
     * 1. `all_advertisers` is used as the `benchmarks_source`. Note that the
     * request `category_filter` must be set when using `all_advertisers`.
     * 2. The request `date_range` is a subset of
     * `supported_dates_for_all_metrics` returned by
     * [BenchmarksService.ListBenchmarksAvailableDates][google.ads.googleads.v25.services.BenchmarksService.ListBenchmarksAvailableDates].
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.ShareMetrics share_metrics = 2;</code>
     * @param \Google\Ads\GoogleAds\V25\Services\ShareMetrics $var
     * @return $this
     */
    public function setShareMetrics($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Services\ShareMetrics::class);
        $this->share_metrics = $var;

        return $this;
    }

    /**
     * Metrics calculated by aggregating values of a single metric for the
     * customer.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.AggregateMetrics aggregate_metrics = 3;</code>
     * @return \Google\Ads\GoogleAds\V25\Services\AggregateMetrics|null
     */
    public function getAggregateMetrics()
    {
        return $this->aggregate_metrics;
    }

    public function hasAggregateMetrics()
    {
        return isset($this->aggregate_metrics);
    }

    public function clearAggregateMetrics()
    {
        unset($this->aggregate_metrics);
    }

    /**
     * Metrics calculated by aggregating values of a single metric for the
     * customer.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.AggregateMetrics aggregate_metrics = 3;</code>
     * @param \Google\Ads\GoogleAds\V25\Services\AggregateMetrics $var
     * @return $this
     */
    public function setAggregateMetrics($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Services\AggregateMetrics::class);
        $this->aggregate_metrics = $var;

        return $this;
    }

    /**
     * Metrics representing the customer’s competitive standing among advertisers
     * scoped by the analysis. Percentile metrics are only returned when:
     * 1. `all_advertisers` is used as the `benchmarks_source`. Note that the
     * request `category_filter` must be set when using `all_advertisers`.
     * 2. `PERCENTILE_DATA` is requested as `supplemental_data`.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.PercentileMetrics percentile_metrics = 4;</code>
     * @return \Google\Ads\GoogleAds\V25\Services\PercentileMetrics|null
     */
    public function getPercentileMetrics()
    {
        return $this->percentile_metrics;
    }

    public function hasPercentileMetrics()
    {
        return isset($this->percentile_metrics);
    }

    public function clearPercentileMetrics()
    {
        unset($this->percentile_metrics);
    }

    /**
     * Metrics representing the customer’s competitive standing among advertisers
     * scoped by the analysis. Percentile metrics are only returned when:
     * 1. `all_advertisers` is used as the `benchmarks_source`. Note that the
     * request `category_filter` must be set when using `all_advertisers`.
     * 2. `PERCENTILE_DATA` is requested as `supplemental_data`.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.PercentileMetrics percentile_metrics = 4;</code>
     * @param \Google\Ads\GoogleAds\V25\Services\PercentileMetrics $var
     * @return $this
     */
    public function setPercentileMetrics($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Services\PercentileMetrics::class);
        $this->percentile_metrics = $var;

        return $this;
    }

}

