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

/**
 * Languages that pertain to a YouTube channel based on the channel content.
 * Only languages above a certain proportion threshold are included.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.services.LanguageDistribution</code>
 */
class LanguageDistribution extends \Google\Protobuf\Internal\Message
{
    /**
     * [Language
     * code](https://developers.google.com/google-ads/api/reference/data/codes-formats#languages)
     * of the language for the YouTube channel.
     *
     * Generated from protobuf field <code>string language_code = 1;</code>
     */
    protected $language_code = '';
    /**
     * The proportion (between 0 and 1)  of the channel's videos in the language.
     *
     * Generated from protobuf field <code>double proportion = 2;</code>
     */
    protected $proportion = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $language_code
     *           [Language
     *           code](https://developers.google.com/google-ads/api/reference/data/codes-formats#languages)
     *           of the language for the YouTube channel.
     * @type float $proportion
     *           The proportion (between 0 and 1)  of the channel's videos in the language.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Services\ContentCreatorInsightsService::initOnce();
        parent::__construct($data);
    }

    /**
     * [Language
     * code](https://developers.google.com/google-ads/api/reference/data/codes-formats#languages)
     * of the language for the YouTube channel.
     *
     * Generated from protobuf field <code>string language_code = 1;</code>
     *
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * [Language
     * code](https://developers.google.com/google-ads/api/reference/data/codes-formats#languages)
     * of the language for the YouTube channel.
     *
     * Generated from protobuf field <code>string language_code = 1;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, true);
        $this->language_code = $var;

        return $this;
    }

    /**
     * The proportion (between 0 and 1)  of the channel's videos in the language.
     *
     * Generated from protobuf field <code>double proportion = 2;</code>
     *
     * @return float
     */
    public function getProportion()
    {
        return $this->proportion;
    }

    /**
     * The proportion (between 0 and 1)  of the channel's videos in the language.
     *
     * Generated from protobuf field <code>double proportion = 2;</code>
     *
     * @param  float $var
     * @return $this
     */
    public function setProportion($var)
    {
        GPBUtil::checkDouble($var);
        $this->proportion = $var;

        return $this;
    }

}

