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

/**
 * Average rate metrics. Metrics that represent monetary values are returned
 * in USD by default, if unspecified in the request.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.RateMetrics</code>
 */
class RateMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Average cost-per-thousand impressions (CPM).
     *
     * Generated from protobuf field <code>double average_cpm = 1;</code>
     */
    protected $average_cpm = 0.0;
    /**
     * Average cost-per-thousand viewable impressions.
     *
     * Generated from protobuf field <code>double average_active_view_cpm = 2;</code>
     */
    protected $average_active_view_cpm = 0.0;
    /**
     * The average TrueView cost-per-view (CPV) is defined by the total cost of
     * all ad TrueView views divided by the number of TrueView views.
     *
     * Generated from protobuf field <code>double trueview_average_cpv = 3;</code>
     */
    protected $trueview_average_cpv = 0.0;
    /**
     * The average cost-per-click (CPC) is defined by the total cost of all
     * clicks divided by the total number of clicks received.
     *
     * Generated from protobuf field <code>double average_cpc = 4;</code>
     */
    protected $average_cpc = 0.0;
    /**
     * The average cost-per-interaction (CPI) is defined by the total cost of
     * all interactions divided by the total number of interactions.
     *
     * Generated from protobuf field <code>double average_cpi = 5;</code>
     */
    protected $average_cpi = 0.0;
    /**
     * The average cost-per-engagement (CPE) is defined by the total cost of all
     * ad engagements divided by the total number of ad engagements.
     *
     * Generated from protobuf field <code>double average_cpe = 6;</code>
     */
    protected $average_cpe = 0.0;
    /**
     * How often people interact with your ad after it is shown to them. This is
     * the number of interactions divided by the number of times your ad is
     * shown.
     *
     * Generated from protobuf field <code>double interaction_rate = 7;</code>
     */
    protected $interaction_rate = 0.0;
    /**
     * How often people engage with your ad after it's shown to them. This is
     * the number of ad expansions divided by the number of times your ad is
     * shown.
     *
     * Generated from protobuf field <code>double engagement_rate = 8;</code>
     */
    protected $engagement_rate = 0.0;
    /**
     * The percentage of time when your ad appeared on an Active View enabled
     * site (measurable impressions) and was viewable (viewable impressions).
     *
     * Generated from protobuf field <code>double active_view_viewability = 9;</code>
     */
    protected $active_view_viewability = 0.0;
    /**
     * Number of completed TrueView views divided by the number of impressions.
     *
     * Generated from protobuf field <code>double trueview_view_rate = 10;</code>
     */
    protected $trueview_view_rate = 0.0;
    /**
     * The number of clicks your ad receives (Clicks) divided by the number
     * of times your ad is shown (Impressions).
     *
     * Generated from protobuf field <code>double click_through_rate = 11;</code>
     */
    protected $click_through_rate = 0.0;
    /**
     * Percentage of impressions where the viewer watched 25% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p25_rate = 12;</code>
     */
    protected $video_completion_p25_rate = 0.0;
    /**
     * Percentage of impressions where the viewer watched 50% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p50_rate = 13;</code>
     */
    protected $video_completion_p50_rate = 0.0;
    /**
     * Percentage of impressions where the viewer watched 75% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p75_rate = 14;</code>
     */
    protected $video_completion_p75_rate = 0.0;
    /**
     * Percentage of impressions where the viewer watched all of your video.
     *
     * Generated from protobuf field <code>double video_completion_p100_rate = 15;</code>
     */
    protected $video_completion_p100_rate = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $average_cpm
     *           Average cost-per-thousand impressions (CPM).
     *     @type float $average_active_view_cpm
     *           Average cost-per-thousand viewable impressions.
     *     @type float $trueview_average_cpv
     *           The average TrueView cost-per-view (CPV) is defined by the total cost of
     *           all ad TrueView views divided by the number of TrueView views.
     *     @type float $average_cpc
     *           The average cost-per-click (CPC) is defined by the total cost of all
     *           clicks divided by the total number of clicks received.
     *     @type float $average_cpi
     *           The average cost-per-interaction (CPI) is defined by the total cost of
     *           all interactions divided by the total number of interactions.
     *     @type float $average_cpe
     *           The average cost-per-engagement (CPE) is defined by the total cost of all
     *           ad engagements divided by the total number of ad engagements.
     *     @type float $interaction_rate
     *           How often people interact with your ad after it is shown to them. This is
     *           the number of interactions divided by the number of times your ad is
     *           shown.
     *     @type float $engagement_rate
     *           How often people engage with your ad after it's shown to them. This is
     *           the number of ad expansions divided by the number of times your ad is
     *           shown.
     *     @type float $active_view_viewability
     *           The percentage of time when your ad appeared on an Active View enabled
     *           site (measurable impressions) and was viewable (viewable impressions).
     *     @type float $trueview_view_rate
     *           Number of completed TrueView views divided by the number of impressions.
     *     @type float $click_through_rate
     *           The number of clicks your ad receives (Clicks) divided by the number
     *           of times your ad is shown (Impressions).
     *     @type float $video_completion_p25_rate
     *           Percentage of impressions where the viewer watched 25% of your video.
     *     @type float $video_completion_p50_rate
     *           Percentage of impressions where the viewer watched 50% of your video.
     *     @type float $video_completion_p75_rate
     *           Percentage of impressions where the viewer watched 75% of your video.
     *     @type float $video_completion_p100_rate
     *           Percentage of impressions where the viewer watched all of your video.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\BenchmarksService::initOnce();
        parent::__construct($data);
    }

    /**
     * Average cost-per-thousand impressions (CPM).
     *
     * Generated from protobuf field <code>double average_cpm = 1;</code>
     * @return float
     */
    public function getAverageCpm()
    {
        return $this->average_cpm;
    }

    /**
     * Average cost-per-thousand impressions (CPM).
     *
     * Generated from protobuf field <code>double average_cpm = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setAverageCpm($var)
    {
        GPBUtil::checkDouble($var);
        $this->average_cpm = $var;

        return $this;
    }

    /**
     * Average cost-per-thousand viewable impressions.
     *
     * Generated from protobuf field <code>double average_active_view_cpm = 2;</code>
     * @return float
     */
    public function getAverageActiveViewCpm()
    {
        return $this->average_active_view_cpm;
    }

    /**
     * Average cost-per-thousand viewable impressions.
     *
     * Generated from protobuf field <code>double average_active_view_cpm = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setAverageActiveViewCpm($var)
    {
        GPBUtil::checkDouble($var);
        $this->average_active_view_cpm = $var;

        return $this;
    }

    /**
     * The average TrueView cost-per-view (CPV) is defined by the total cost of
     * all ad TrueView views divided by the number of TrueView views.
     *
     * Generated from protobuf field <code>double trueview_average_cpv = 3;</code>
     * @return float
     */
    public function getTrueviewAverageCpv()
    {
        return $this->trueview_average_cpv;
    }

    /**
     * The average TrueView cost-per-view (CPV) is defined by the total cost of
     * all ad TrueView views divided by the number of TrueView views.
     *
     * Generated from protobuf field <code>double trueview_average_cpv = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setTrueviewAverageCpv($var)
    {
        GPBUtil::checkDouble($var);
        $this->trueview_average_cpv = $var;

        return $this;
    }

    /**
     * The average cost-per-click (CPC) is defined by the total cost of all
     * clicks divided by the total number of clicks received.
     *
     * Generated from protobuf field <code>double average_cpc = 4;</code>
     * @return float
     */
    public function getAverageCpc()
    {
        return $this->average_cpc;
    }

    /**
     * The average cost-per-click (CPC) is defined by the total cost of all
     * clicks divided by the total number of clicks received.
     *
     * Generated from protobuf field <code>double average_cpc = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setAverageCpc($var)
    {
        GPBUtil::checkDouble($var);
        $this->average_cpc = $var;

        return $this;
    }

    /**
     * The average cost-per-interaction (CPI) is defined by the total cost of
     * all interactions divided by the total number of interactions.
     *
     * Generated from protobuf field <code>double average_cpi = 5;</code>
     * @return float
     */
    public function getAverageCpi()
    {
        return $this->average_cpi;
    }

    /**
     * The average cost-per-interaction (CPI) is defined by the total cost of
     * all interactions divided by the total number of interactions.
     *
     * Generated from protobuf field <code>double average_cpi = 5;</code>
     * @param float $var
     * @return $this
     */
    public function setAverageCpi($var)
    {
        GPBUtil::checkDouble($var);
        $this->average_cpi = $var;

        return $this;
    }

    /**
     * The average cost-per-engagement (CPE) is defined by the total cost of all
     * ad engagements divided by the total number of ad engagements.
     *
     * Generated from protobuf field <code>double average_cpe = 6;</code>
     * @return float
     */
    public function getAverageCpe()
    {
        return $this->average_cpe;
    }

    /**
     * The average cost-per-engagement (CPE) is defined by the total cost of all
     * ad engagements divided by the total number of ad engagements.
     *
     * Generated from protobuf field <code>double average_cpe = 6;</code>
     * @param float $var
     * @return $this
     */
    public function setAverageCpe($var)
    {
        GPBUtil::checkDouble($var);
        $this->average_cpe = $var;

        return $this;
    }

    /**
     * How often people interact with your ad after it is shown to them. This is
     * the number of interactions divided by the number of times your ad is
     * shown.
     *
     * Generated from protobuf field <code>double interaction_rate = 7;</code>
     * @return float
     */
    public function getInteractionRate()
    {
        return $this->interaction_rate;
    }

    /**
     * How often people interact with your ad after it is shown to them. This is
     * the number of interactions divided by the number of times your ad is
     * shown.
     *
     * Generated from protobuf field <code>double interaction_rate = 7;</code>
     * @param float $var
     * @return $this
     */
    public function setInteractionRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->interaction_rate = $var;

        return $this;
    }

    /**
     * How often people engage with your ad after it's shown to them. This is
     * the number of ad expansions divided by the number of times your ad is
     * shown.
     *
     * Generated from protobuf field <code>double engagement_rate = 8;</code>
     * @return float
     */
    public function getEngagementRate()
    {
        return $this->engagement_rate;
    }

    /**
     * How often people engage with your ad after it's shown to them. This is
     * the number of ad expansions divided by the number of times your ad is
     * shown.
     *
     * Generated from protobuf field <code>double engagement_rate = 8;</code>
     * @param float $var
     * @return $this
     */
    public function setEngagementRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->engagement_rate = $var;

        return $this;
    }

    /**
     * The percentage of time when your ad appeared on an Active View enabled
     * site (measurable impressions) and was viewable (viewable impressions).
     *
     * Generated from protobuf field <code>double active_view_viewability = 9;</code>
     * @return float
     */
    public function getActiveViewViewability()
    {
        return $this->active_view_viewability;
    }

    /**
     * The percentage of time when your ad appeared on an Active View enabled
     * site (measurable impressions) and was viewable (viewable impressions).
     *
     * Generated from protobuf field <code>double active_view_viewability = 9;</code>
     * @param float $var
     * @return $this
     */
    public function setActiveViewViewability($var)
    {
        GPBUtil::checkDouble($var);
        $this->active_view_viewability = $var;

        return $this;
    }

    /**
     * Number of completed TrueView views divided by the number of impressions.
     *
     * Generated from protobuf field <code>double trueview_view_rate = 10;</code>
     * @return float
     */
    public function getTrueviewViewRate()
    {
        return $this->trueview_view_rate;
    }

    /**
     * Number of completed TrueView views divided by the number of impressions.
     *
     * Generated from protobuf field <code>double trueview_view_rate = 10;</code>
     * @param float $var
     * @return $this
     */
    public function setTrueviewViewRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->trueview_view_rate = $var;

        return $this;
    }

    /**
     * The number of clicks your ad receives (Clicks) divided by the number
     * of times your ad is shown (Impressions).
     *
     * Generated from protobuf field <code>double click_through_rate = 11;</code>
     * @return float
     */
    public function getClickThroughRate()
    {
        return $this->click_through_rate;
    }

    /**
     * The number of clicks your ad receives (Clicks) divided by the number
     * of times your ad is shown (Impressions).
     *
     * Generated from protobuf field <code>double click_through_rate = 11;</code>
     * @param float $var
     * @return $this
     */
    public function setClickThroughRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->click_through_rate = $var;

        return $this;
    }

    /**
     * Percentage of impressions where the viewer watched 25% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p25_rate = 12;</code>
     * @return float
     */
    public function getVideoCompletionP25Rate()
    {
        return $this->video_completion_p25_rate;
    }

    /**
     * Percentage of impressions where the viewer watched 25% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p25_rate = 12;</code>
     * @param float $var
     * @return $this
     */
    public function setVideoCompletionP25Rate($var)
    {
        GPBUtil::checkDouble($var);
        $this->video_completion_p25_rate = $var;

        return $this;
    }

    /**
     * Percentage of impressions where the viewer watched 50% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p50_rate = 13;</code>
     * @return float
     */
    public function getVideoCompletionP50Rate()
    {
        return $this->video_completion_p50_rate;
    }

    /**
     * Percentage of impressions where the viewer watched 50% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p50_rate = 13;</code>
     * @param float $var
     * @return $this
     */
    public function setVideoCompletionP50Rate($var)
    {
        GPBUtil::checkDouble($var);
        $this->video_completion_p50_rate = $var;

        return $this;
    }

    /**
     * Percentage of impressions where the viewer watched 75% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p75_rate = 14;</code>
     * @return float
     */
    public function getVideoCompletionP75Rate()
    {
        return $this->video_completion_p75_rate;
    }

    /**
     * Percentage of impressions where the viewer watched 75% of your video.
     *
     * Generated from protobuf field <code>double video_completion_p75_rate = 14;</code>
     * @param float $var
     * @return $this
     */
    public function setVideoCompletionP75Rate($var)
    {
        GPBUtil::checkDouble($var);
        $this->video_completion_p75_rate = $var;

        return $this;
    }

    /**
     * Percentage of impressions where the viewer watched all of your video.
     *
     * Generated from protobuf field <code>double video_completion_p100_rate = 15;</code>
     * @return float
     */
    public function getVideoCompletionP100Rate()
    {
        return $this->video_completion_p100_rate;
    }

    /**
     * Percentage of impressions where the viewer watched all of your video.
     *
     * Generated from protobuf field <code>double video_completion_p100_rate = 15;</code>
     * @param float $var
     * @return $this
     */
    public function setVideoCompletionP100Rate($var)
    {
        GPBUtil::checkDouble($var);
        $this->video_completion_p100_rate = $var;

        return $this;
    }

}

