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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Keyword And Url Seed
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.KeywordAndUrlSeed</code>
 */
class KeywordAndUrlSeed extends \Google\Protobuf\Internal\Message
{
    /**
     * The URL to crawl in order to generate keyword ideas.
     *
     * Generated from protobuf field <code>optional string url = 3;</code>
     */
    protected $url = null;
    /**
     * Requires at least one keyword and no more than 20 keywords.
     *
     * Generated from protobuf field <code>repeated string keywords = 4;</code>
     */
    private $keywords;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $url
     *           The URL to crawl in order to generate keyword ideas.
     * @type string[] $keywords
     *           Requires at least one keyword and no more than 20 keywords.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\KeywordPlanIdeaService::initOnce();
        parent::__construct($data);
    }

    /**
     * The URL to crawl in order to generate keyword ideas.
     *
     * Generated from protobuf field <code>optional string url = 3;</code>
     *
     * @return string
     */
    public function getUrl()
    {
        return isset($this->url) ? $this->url : '';
    }

    public function hasUrl()
    {
        return isset($this->url);
    }

    public function clearUrl()
    {
        unset($this->url);
    }

    /**
     * The URL to crawl in order to generate keyword ideas.
     *
     * Generated from protobuf field <code>optional string url = 3;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkString($var, true);
        $this->url = $var;

        return $this;
    }

    /**
     * Requires at least one keyword and no more than 20 keywords.
     *
     * Generated from protobuf field <code>repeated string keywords = 4;</code>
     *
     * @return RepeatedField<string>
     */
    public function getKeywords()
    {
        return $this->keywords;
    }

    /**
     * Requires at least one keyword and no more than 20 keywords.
     *
     * Generated from protobuf field <code>repeated string keywords = 4;</code>
     *
     * @param  string[] $var
     * @return $this
     */
    public function setKeywords($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->keywords = $arr;

        return $this;
    }

}

