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

namespace Google\Ads\GoogleAds\V23\Services\SuggestKeywordThemesResponse;

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

/**
 * A Smart campaign keyword theme suggestion.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.SuggestKeywordThemesResponse.KeywordTheme</code>
 */
class KeywordTheme extends \Google\Protobuf\Internal\Message
{
    protected $keyword_theme;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V23\Resources\KeywordThemeConstant $keyword_theme_constant
     *           A Smart campaign keyword theme constant.
     *     @type string $free_form_keyword_theme
     *           A free-form text keyword theme.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\SmartCampaignSuggestService::initOnce();
        parent::__construct($data);
    }

    /**
     * A Smart campaign keyword theme constant.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.KeywordThemeConstant keyword_theme_constant = 1;</code>
     * @return \Google\Ads\GoogleAds\V23\Resources\KeywordThemeConstant|null
     */
    public function getKeywordThemeConstant()
    {
        return $this->readOneof(1);
    }

    public function hasKeywordThemeConstant()
    {
        return $this->hasOneof(1);
    }

    /**
     * A Smart campaign keyword theme constant.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.KeywordThemeConstant keyword_theme_constant = 1;</code>
     * @param \Google\Ads\GoogleAds\V23\Resources\KeywordThemeConstant $var
     * @return $this
     */
    public function setKeywordThemeConstant($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Resources\KeywordThemeConstant::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * A free-form text keyword theme.
     *
     * Generated from protobuf field <code>string free_form_keyword_theme = 2;</code>
     * @return string
     */
    public function getFreeFormKeywordTheme()
    {
        return $this->readOneof(2);
    }

    public function hasFreeFormKeywordTheme()
    {
        return $this->hasOneof(2);
    }

    /**
     * A free-form text keyword theme.
     *
     * Generated from protobuf field <code>string free_form_keyword_theme = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setFreeFormKeywordTheme($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getKeywordTheme()
    {
        return $this->whichOneof("keyword_theme");
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KeywordTheme::class, \Google\Ads\GoogleAds\V23\Services\SuggestKeywordThemesResponse_KeywordTheme::class);

