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

namespace Google\Ads\GoogleAds\V20\Services;

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

/**
 * The share and index metrics associated with an attribute in an audience
 * composition insights report.
 *
 * Generated from protobuf message <code>google.ads.googleads.v20.services.AudienceCompositionMetrics</code>
 */
class AudienceCompositionMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * The fraction (from 0 to 1 inclusive) of the baseline audience that match
     * the attribute.
     *
     * Generated from protobuf field <code>double baseline_audience_share = 1;</code>
     */
    protected $baseline_audience_share = 0.0;
    /**
     * The fraction (from 0 to 1 inclusive) of the specific audience that match
     * the attribute.
     *
     * Generated from protobuf field <code>double audience_share = 2;</code>
     */
    protected $audience_share = 0.0;
    /**
     * The ratio of audience_share to baseline_audience_share, or zero if this
     * ratio is undefined or is not meaningful.
     *
     * Generated from protobuf field <code>double index = 3;</code>
     */
    protected $index = 0.0;
    /**
     * A relevance score from 0 to 1 inclusive.
     *
     * Generated from protobuf field <code>double score = 4;</code>
     */
    protected $score = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $baseline_audience_share
     *           The fraction (from 0 to 1 inclusive) of the baseline audience that match
     *           the attribute.
     *     @type float $audience_share
     *           The fraction (from 0 to 1 inclusive) of the specific audience that match
     *           the attribute.
     *     @type float $index
     *           The ratio of audience_share to baseline_audience_share, or zero if this
     *           ratio is undefined or is not meaningful.
     *     @type float $score
     *           A relevance score from 0 to 1 inclusive.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V20\Services\AudienceInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The fraction (from 0 to 1 inclusive) of the baseline audience that match
     * the attribute.
     *
     * Generated from protobuf field <code>double baseline_audience_share = 1;</code>
     * @return float
     */
    public function getBaselineAudienceShare()
    {
        return $this->baseline_audience_share;
    }

    /**
     * The fraction (from 0 to 1 inclusive) of the baseline audience that match
     * the attribute.
     *
     * Generated from protobuf field <code>double baseline_audience_share = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setBaselineAudienceShare($var)
    {
        GPBUtil::checkDouble($var);
        $this->baseline_audience_share = $var;

        return $this;
    }

    /**
     * The fraction (from 0 to 1 inclusive) of the specific audience that match
     * the attribute.
     *
     * Generated from protobuf field <code>double audience_share = 2;</code>
     * @return float
     */
    public function getAudienceShare()
    {
        return $this->audience_share;
    }

    /**
     * The fraction (from 0 to 1 inclusive) of the specific audience that match
     * the attribute.
     *
     * Generated from protobuf field <code>double audience_share = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setAudienceShare($var)
    {
        GPBUtil::checkDouble($var);
        $this->audience_share = $var;

        return $this;
    }

    /**
     * The ratio of audience_share to baseline_audience_share, or zero if this
     * ratio is undefined or is not meaningful.
     *
     * Generated from protobuf field <code>double index = 3;</code>
     * @return float
     */
    public function getIndex()
    {
        return $this->index;
    }

    /**
     * The ratio of audience_share to baseline_audience_share, or zero if this
     * ratio is undefined or is not meaningful.
     *
     * Generated from protobuf field <code>double index = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setIndex($var)
    {
        GPBUtil::checkDouble($var);
        $this->index = $var;

        return $this;
    }

    /**
     * A relevance score from 0 to 1 inclusive.
     *
     * Generated from protobuf field <code>double score = 4;</code>
     * @return float
     */
    public function getScore()
    {
        return $this->score;
    }

    /**
     * A relevance score from 0 to 1 inclusive.
     *
     * Generated from protobuf field <code>double score = 4;</code>
     * @param float $var
     * @return $this
     */
    public function setScore($var)
    {
        GPBUtil::checkDouble($var);
        $this->score = $var;

        return $this;
    }

}

