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

namespace Google\Ads\GoogleAds\V25\Services;

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

/**
 * The distribution of sentiment for a brand. The distribution is calculated as
 * the proportion of views for videos that correspond to the brand with each
 * sentiment. Example: positive sentiment share of 0.49 means that 49% of views
 * about this brand were on content with positive sentiment.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.SentimentInsightDistribution</code>
 */
class SentimentInsightDistribution extends \Google\Protobuf\Internal\Message
{
    /**
     * The sentiment for this distribution.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.enums.SentimentEnum.Sentiment sentiment = 1;</code>
     */
    protected $sentiment = 0;
    /**
     * The proportion (between 0 and 1) of views for videos that correspond to the
     * brand with this sentiment.
     *
     * Generated from protobuf field <code>double sentiment_share = 2;</code>
     */
    protected $sentiment_share = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $sentiment
     *           The sentiment for this distribution.
     *     @type float $sentiment_share
     *           The proportion (between 0 and 1) of views for videos that correspond to the
     *           brand with this sentiment.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\ContentCreatorInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The sentiment for this distribution.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.enums.SentimentEnum.Sentiment sentiment = 1;</code>
     * @return int
     */
    public function getSentiment()
    {
        return $this->sentiment;
    }

    /**
     * The sentiment for this distribution.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.enums.SentimentEnum.Sentiment sentiment = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSentiment($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V25\Enums\SentimentEnum\Sentiment::class);
        $this->sentiment = $var;

        return $this;
    }

    /**
     * The proportion (between 0 and 1) of views for videos that correspond to the
     * brand with this sentiment.
     *
     * Generated from protobuf field <code>double sentiment_share = 2;</code>
     * @return float
     */
    public function getSentimentShare()
    {
        return $this->sentiment_share;
    }

    /**
     * The proportion (between 0 and 1) of views for videos that correspond to the
     * brand with this sentiment.
     *
     * Generated from protobuf field <code>double sentiment_share = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setSentimentShare($var)
    {
        GPBUtil::checkDouble($var);
        $this->sentiment_share = $var;

        return $this;
    }

}

