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

namespace Google\Ads\GoogleAds\V25\Services\GenerateRecommendationsRequest;

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

/**
 * Current AdGroup Information of the campaign.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.services.GenerateRecommendationsRequest.AdGroupInfo</code>
 */
class AdGroupInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. AdGroup Type of the AdGroup.
     * This field is necessary for the following recommendation_types if
     * ad_group_info is set:
     * KEYWORD
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AdGroupTypeEnum.AdGroupType ad_group_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $ad_group_type = null;
    /**
     * Optional. Current keywords.
     * This field is optional for the following recommendation_types if
     * ad_group_info is set:
     * KEYWORD
     * This field is required for the following recommendation_types:
     * CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.KeywordInfo keywords = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $keywords;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $ad_group_type
     *           Optional. AdGroup Type of the AdGroup.
     *           This field is necessary for the following recommendation_types if
     *           ad_group_info is set:
     *           KEYWORD
     *     @type \Google\Ads\GoogleAds\V25\Common\KeywordInfo[] $keywords
     *           Optional. Current keywords.
     *           This field is optional for the following recommendation_types if
     *           ad_group_info is set:
     *           KEYWORD
     *           This field is required for the following recommendation_types:
     *           CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Services\RecommendationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. AdGroup Type of the AdGroup.
     * This field is necessary for the following recommendation_types if
     * ad_group_info is set:
     * KEYWORD
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AdGroupTypeEnum.AdGroupType ad_group_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getAdGroupType()
    {
        return isset($this->ad_group_type) ? $this->ad_group_type : 0;
    }

    public function hasAdGroupType()
    {
        return isset($this->ad_group_type);
    }

    public function clearAdGroupType()
    {
        unset($this->ad_group_type);
    }

    /**
     * Optional. AdGroup Type of the AdGroup.
     * This field is necessary for the following recommendation_types if
     * ad_group_info is set:
     * KEYWORD
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AdGroupTypeEnum.AdGroupType ad_group_type = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setAdGroupType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V25\Enums\AdGroupTypeEnum\AdGroupType::class);
        $this->ad_group_type = $var;

        return $this;
    }

    /**
     * Optional. Current keywords.
     * This field is optional for the following recommendation_types if
     * ad_group_info is set:
     * KEYWORD
     * This field is required for the following recommendation_types:
     * CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.KeywordInfo keywords = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<\Google\Ads\GoogleAds\V25\Common\KeywordInfo>
     */
    public function getKeywords()
    {
        return $this->keywords;
    }

    /**
     * Optional. Current keywords.
     * This field is optional for the following recommendation_types if
     * ad_group_info is set:
     * KEYWORD
     * This field is required for the following recommendation_types:
     * CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.KeywordInfo keywords = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Ads\GoogleAds\V25\Common\KeywordInfo[] $var
     * @return $this
     */
    public function setKeywords($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V25\Common\KeywordInfo::class);
        $this->keywords = $arr;

        return $this;
    }

}

