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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Metrics associated with a trend insight.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.TrendInsightMetrics</code>
 */
class TrendInsightMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * The number of views for this trend. This is only populated for SearchTopics
     * requests.
     *
     * Generated from protobuf field <code>int64 views_count = 1;</code>
     */
    protected $views_count = 0;
    /**
     * The fraction (from 0 to 1 inclusive) of the requested audience that has
     * has searched or viewed this trend. This is only populated for
     * SearchAudience requests.
     *
     * Generated from protobuf field <code>double audience_share = 2;</code>
     */
    protected $audience_share = 0.0;
    /**
     * The percentage of the change in the trend's value over the comparison
     * period, where 1.0 represents 100%. If this is not set, it means that the
     * trend is emerging.
     *
     * Generated from protobuf field <code>double trend_change_percent = 3;</code>
     */
    protected $trend_change_percent = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $views_count
     *           The number of views for this trend. This is only populated for SearchTopics
     *           requests.
     *     @type float $audience_share
     *           The fraction (from 0 to 1 inclusive) of the requested audience that has
     *           has searched or viewed this trend. This is only populated for
     *           SearchAudience requests.
     *     @type float $trend_change_percent
     *           The percentage of the change in the trend's value over the comparison
     *           period, where 1.0 represents 100%. If this is not set, it means that the
     *           trend is emerging.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\ContentCreatorInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The number of views for this trend. This is only populated for SearchTopics
     * requests.
     *
     * Generated from protobuf field <code>int64 views_count = 1;</code>
     * @return int|string
     */
    public function getViewsCount()
    {
        return $this->views_count;
    }

    /**
     * The number of views for this trend. This is only populated for SearchTopics
     * requests.
     *
     * Generated from protobuf field <code>int64 views_count = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setViewsCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->views_count = $var;

        return $this;
    }

    /**
     * The fraction (from 0 to 1 inclusive) of the requested audience that has
     * has searched or viewed this trend. This is only populated for
     * SearchAudience requests.
     *
     * 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 requested audience that has
     * has searched or viewed this trend. This is only populated for
     * SearchAudience requests.
     *
     * 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 percentage of the change in the trend's value over the comparison
     * period, where 1.0 represents 100%. If this is not set, it means that the
     * trend is emerging.
     *
     * Generated from protobuf field <code>double trend_change_percent = 3;</code>
     * @return float
     */
    public function getTrendChangePercent()
    {
        return $this->trend_change_percent;
    }

    /**
     * The percentage of the change in the trend's value over the comparison
     * period, where 1.0 represents 100%. If this is not set, it means that the
     * trend is emerging.
     *
     * Generated from protobuf field <code>double trend_change_percent = 3;</code>
     * @param float $var
     * @return $this
     */
    public function setTrendChangePercent($var)
    {
        GPBUtil::checkDouble($var);
        $this->trend_change_percent = $var;

        return $this;
    }

}

