<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A biddable keyword part of an ad group.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.BiddableKeyword</code>
 */
class BiddableKeyword extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Keyword. Must have text and match type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.KeywordInfo keyword = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $keyword = null;
    /**
     * A max cpc bid in micros that overrides the ad group level max cpc bid in
     * forecast simulation. This value will override the max cpc value set in the
     * bidding strategy and ad group. Only specify this field for bidding
     * strategies that support max cpc values.
     *
     * Generated from protobuf field <code>optional int64 max_cpc_bid_micros = 2;</code>
     */
    protected $max_cpc_bid_micros = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V23\Common\KeywordInfo $keyword
     *           Required. Keyword. Must have text and match type.
     *     @type int|string $max_cpc_bid_micros
     *           A max cpc bid in micros that overrides the ad group level max cpc bid in
     *           forecast simulation. This value will override the max cpc value set in the
     *           bidding strategy and ad group. Only specify this field for bidding
     *           strategies that support max cpc values.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\KeywordPlanIdeaService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Keyword. Must have text and match type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.KeywordInfo keyword = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Ads\GoogleAds\V23\Common\KeywordInfo|null
     */
    public function getKeyword()
    {
        return $this->keyword;
    }

    public function hasKeyword()
    {
        return isset($this->keyword);
    }

    public function clearKeyword()
    {
        unset($this->keyword);
    }

    /**
     * Required. Keyword. Must have text and match type.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.KeywordInfo keyword = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Ads\GoogleAds\V23\Common\KeywordInfo $var
     * @return $this
     */
    public function setKeyword($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\KeywordInfo::class);
        $this->keyword = $var;

        return $this;
    }

    /**
     * A max cpc bid in micros that overrides the ad group level max cpc bid in
     * forecast simulation. This value will override the max cpc value set in the
     * bidding strategy and ad group. Only specify this field for bidding
     * strategies that support max cpc values.
     *
     * Generated from protobuf field <code>optional int64 max_cpc_bid_micros = 2;</code>
     * @return int|string
     */
    public function getMaxCpcBidMicros()
    {
        return isset($this->max_cpc_bid_micros) ? $this->max_cpc_bid_micros : 0;
    }

    public function hasMaxCpcBidMicros()
    {
        return isset($this->max_cpc_bid_micros);
    }

    public function clearMaxCpcBidMicros()
    {
        unset($this->max_cpc_bid_micros);
    }

    /**
     * A max cpc bid in micros that overrides the ad group level max cpc bid in
     * forecast simulation. This value will override the max cpc value set in the
     * bidding strategy and ad group. Only specify this field for bidding
     * strategies that support max cpc values.
     *
     * Generated from protobuf field <code>optional int64 max_cpc_bid_micros = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxCpcBidMicros($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_cpc_bid_micros = $var;

        return $this;
    }

}

