<?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 calculated by dividing the metric of the customer by that of the
 * selected benchmarks source.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.ShareMetrics</code>
 */
class ShareMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Relative impressions. Share of voice is defined by the customer’s total
     * number of impressions divided by the aggregated number of impressions of
     * all advertisers in the selected benchmarks source including your own. Share
     * of voice is represented on a scale of 0 to 1 precise to 4 decimal places.
     * For example, 0.0123 which corresponds to 1.23%.
     *
     * Generated from protobuf field <code>double share_of_voice = 1;</code>
     */
    protected $share_of_voice = 0.0;
    /**
     * Relative spend. Share of spend is defined by the customer’s total cost
     * divided by the total aggregated cost of all advertisers in the selected
     * benchmarks source including your own. Share of spend is represented on a
     * scale of 0 to 1 precise to 4 decimal places. For example, 0.0123 which
     * corresponds to 1.23%.
     *
     * Generated from protobuf field <code>double share_of_spend = 2;</code>
     */
    protected $share_of_spend = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $share_of_voice
     *           Relative impressions. Share of voice is defined by the customer’s total
     *           number of impressions divided by the aggregated number of impressions of
     *           all advertisers in the selected benchmarks source including your own. Share
     *           of voice is represented on a scale of 0 to 1 precise to 4 decimal places.
     *           For example, 0.0123 which corresponds to 1.23%.
     *     @type float $share_of_spend
     *           Relative spend. Share of spend is defined by the customer’s total cost
     *           divided by the total aggregated cost of all advertisers in the selected
     *           benchmarks source including your own. Share of spend is represented on a
     *           scale of 0 to 1 precise to 4 decimal places. For example, 0.0123 which
     *           corresponds to 1.23%.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\BenchmarksService::initOnce();
        parent::__construct($data);
    }

    /**
     * Relative impressions. Share of voice is defined by the customer’s total
     * number of impressions divided by the aggregated number of impressions of
     * all advertisers in the selected benchmarks source including your own. Share
     * of voice is represented on a scale of 0 to 1 precise to 4 decimal places.
     * For example, 0.0123 which corresponds to 1.23%.
     *
     * Generated from protobuf field <code>double share_of_voice = 1;</code>
     * @return float
     */
    public function getShareOfVoice()
    {
        return $this->share_of_voice;
    }

    /**
     * Relative impressions. Share of voice is defined by the customer’s total
     * number of impressions divided by the aggregated number of impressions of
     * all advertisers in the selected benchmarks source including your own. Share
     * of voice is represented on a scale of 0 to 1 precise to 4 decimal places.
     * For example, 0.0123 which corresponds to 1.23%.
     *
     * Generated from protobuf field <code>double share_of_voice = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setShareOfVoice($var)
    {
        GPBUtil::checkDouble($var);
        $this->share_of_voice = $var;

        return $this;
    }

    /**
     * Relative spend. Share of spend is defined by the customer’s total cost
     * divided by the total aggregated cost of all advertisers in the selected
     * benchmarks source including your own. Share of spend is represented on a
     * scale of 0 to 1 precise to 4 decimal places. For example, 0.0123 which
     * corresponds to 1.23%.
     *
     * Generated from protobuf field <code>double share_of_spend = 2;</code>
     * @return float
     */
    public function getShareOfSpend()
    {
        return $this->share_of_spend;
    }

    /**
     * Relative spend. Share of spend is defined by the customer’s total cost
     * divided by the total aggregated cost of all advertisers in the selected
     * benchmarks source including your own. Share of spend is represented on a
     * scale of 0 to 1 precise to 4 decimal places. For example, 0.0123 which
     * corresponds to 1.23%.
     *
     * Generated from protobuf field <code>double share_of_spend = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setShareOfSpend($var)
    {
        GPBUtil::checkDouble($var);
        $this->share_of_spend = $var;

        return $this;
    }

}

