<?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;

/**
 * Trend data for a specific month.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.TrendInsightDataPoint</code>
 */
class TrendInsightDataPoint extends \Google\Protobuf\Internal\Message
{
    /**
     * The month that the trend data point represents in the string format
     * "YYYY-MM".
     *
     * Generated from protobuf field <code>string month = 1;</code>
     */
    protected $month = '';
    /**
     * Metrics associated with this trend and month. The comparison period for
     * these metrics is 1 month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.TrendInsightMetrics trend_metrics = 2;</code>
     */
    protected $trend_metrics = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $month
     *           The month that the trend data point represents in the string format
     *           "YYYY-MM".
     *     @type \Google\Ads\GoogleAds\V25\Services\TrendInsightMetrics $trend_metrics
     *           Metrics associated with this trend and month. The comparison period for
     *           these metrics is 1 month.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\ContentCreatorInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The month that the trend data point represents in the string format
     * "YYYY-MM".
     *
     * Generated from protobuf field <code>string month = 1;</code>
     * @return string
     */
    public function getMonth()
    {
        return $this->month;
    }

    /**
     * The month that the trend data point represents in the string format
     * "YYYY-MM".
     *
     * Generated from protobuf field <code>string month = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMonth($var)
    {
        GPBUtil::checkString($var, True);
        $this->month = $var;

        return $this;
    }

    /**
     * Metrics associated with this trend and month. The comparison period for
     * these metrics is 1 month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.TrendInsightMetrics trend_metrics = 2;</code>
     * @return \Google\Ads\GoogleAds\V25\Services\TrendInsightMetrics|null
     */
    public function getTrendMetrics()
    {
        return $this->trend_metrics;
    }

    public function hasTrendMetrics()
    {
        return isset($this->trend_metrics);
    }

    public function clearTrendMetrics()
    {
        unset($this->trend_metrics);
    }

    /**
     * Metrics associated with this trend and month. The comparison period for
     * these metrics is 1 month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.services.TrendInsightMetrics trend_metrics = 2;</code>
     * @param \Google\Ads\GoogleAds\V25\Services\TrendInsightMetrics $var
     * @return $this
     */
    public function setTrendMetrics($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Services\TrendInsightMetrics::class);
        $this->trend_metrics = $var;

        return $this;
    }

}

