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

namespace Google\Ads\GoogleAds\V24\Services;

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

/**
 * Metrics associated with a trend insight.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.TrendInsightMetrics</code>
 */
class TrendInsightMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * The number of views for this trend. This is only populated for the latest
     * month of data for SearchTopics requests.
     *
     * Generated from protobuf field <code>int64 views_count = 1;</code>
     */
    protected $views_count = 0;
    /**
     * Views value normalized to be in the range 0-100. This is only populated for
     * SearchTopics requests.
     *
     * Generated from protobuf field <code>int64 views_indexed_value = 4;</code>
     */
    protected $views_indexed_value = 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 0, it means that the trend is
     * emerging (new) or sustained (existing but unchanged).
     *
     * 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 the latest
     *           month of data for SearchTopics requests.
     * @type int|string $views_indexed_value
     *           Views value normalized to be in the range 0-100. 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 0, it means that the trend is
     *           emerging (new) or sustained (existing but unchanged).
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Services\ContentCreatorInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The number of views for this trend. This is only populated for the latest
     * month of data 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 the latest
     * month of data 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;
    }

    /**
     * Views value normalized to be in the range 0-100. This is only populated for
     * SearchTopics requests.
     *
     * Generated from protobuf field <code>int64 views_indexed_value = 4;</code>
     *
     * @return int|string
     */
    public function getViewsIndexedValue()
    {
        return $this->views_indexed_value;
    }

    /**
     * Views value normalized to be in the range 0-100. This is only populated for
     * SearchTopics requests.
     *
     * Generated from protobuf field <code>int64 views_indexed_value = 4;</code>
     *
     * @param  int|string $var
     * @return $this
     */
    public function setViewsIndexedValue($var)
    {
        GPBUtil::checkInt64($var);
        $this->views_indexed_value = $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 0, it means that the trend is
     * emerging (new) or sustained (existing but unchanged).
     *
     * 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 0, it means that the trend is
     * emerging (new) or sustained (existing but unchanged).
     *
     * 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;
    }

}

