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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Request for getting the acquisition incentive for a user.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.FetchIncentiveRequest</code>
 */
class FetchIncentiveRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. User's language code.
     * If not provided, the server will default to "en".
     * Possible language codes:
     * https://developers.google.com/google-ads/api/data/codes-formats#languages
     *
     * Generated from protobuf field <code>optional string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $language_code = null;
    /**
     * Optional. User's country code.
     * If not provided, the server will default to "US".
     * Possible country codes:
     * https://developers.google.com/google-ads/api/data/codes-formats#country_codes
     *
     * Generated from protobuf field <code>optional string country_code = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $country_code = null;
    /**
     * Optional. Email of the user that the requested incentive is meant for.
     * Will be used for channel partners who do NOT use OAuth to authenticate on
     * behalf of user.
     *
     * Generated from protobuf field <code>optional string email = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $email = null;
    /**
     * Optional. The type of incentive to get.
     * Defaults to ACQUISITION.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.services.FetchIncentiveRequest.IncentiveType type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $language_code
     *           Optional. User's language code.
     *           If not provided, the server will default to "en".
     *           Possible language codes:
     *           https://developers.google.com/google-ads/api/data/codes-formats#languages
     * @type string $country_code
     *           Optional. User's country code.
     *           If not provided, the server will default to "US".
     *           Possible country codes:
     *           https://developers.google.com/google-ads/api/data/codes-formats#country_codes
     * @type string $email
     *           Optional. Email of the user that the requested incentive is meant for.
     *           Will be used for channel partners who do NOT use OAuth to authenticate on
     *           behalf of user.
     * @type int $type
     *           Optional. The type of incentive to get.
     *           Defaults to ACQUISITION.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\IncentiveService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. User's language code.
     * If not provided, the server will default to "en".
     * Possible language codes:
     * https://developers.google.com/google-ads/api/data/codes-formats#languages
     *
     * Generated from protobuf field <code>optional string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return string
     */
    public function getLanguageCode()
    {
        return isset($this->language_code) ? $this->language_code : '';
    }

    public function hasLanguageCode()
    {
        return isset($this->language_code);
    }

    public function clearLanguageCode()
    {
        unset($this->language_code);
    }

    /**
     * Optional. User's language code.
     * If not provided, the server will default to "en".
     * Possible language codes:
     * https://developers.google.com/google-ads/api/data/codes-formats#languages
     *
     * Generated from protobuf field <code>optional string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, true);
        $this->language_code = $var;

        return $this;
    }

    /**
     * Optional. User's country code.
     * If not provided, the server will default to "US".
     * Possible country codes:
     * https://developers.google.com/google-ads/api/data/codes-formats#country_codes
     *
     * Generated from protobuf field <code>optional string country_code = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return string
     */
    public function getCountryCode()
    {
        return isset($this->country_code) ? $this->country_code : '';
    }

    public function hasCountryCode()
    {
        return isset($this->country_code);
    }

    public function clearCountryCode()
    {
        unset($this->country_code);
    }

    /**
     * Optional. User's country code.
     * If not provided, the server will default to "US".
     * Possible country codes:
     * https://developers.google.com/google-ads/api/data/codes-formats#country_codes
     *
     * Generated from protobuf field <code>optional string country_code = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setCountryCode($var)
    {
        GPBUtil::checkString($var, true);
        $this->country_code = $var;

        return $this;
    }

    /**
     * Optional. Email of the user that the requested incentive is meant for.
     * Will be used for channel partners who do NOT use OAuth to authenticate on
     * behalf of user.
     *
     * Generated from protobuf field <code>optional string email = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return string
     */
    public function getEmail()
    {
        return isset($this->email) ? $this->email : '';
    }

    public function hasEmail()
    {
        return isset($this->email);
    }

    public function clearEmail()
    {
        unset($this->email);
    }

    /**
     * Optional. Email of the user that the requested incentive is meant for.
     * Will be used for channel partners who do NOT use OAuth to authenticate on
     * behalf of user.
     *
     * Generated from protobuf field <code>optional string email = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setEmail($var)
    {
        GPBUtil::checkString($var, true);
        $this->email = $var;

        return $this;
    }

    /**
     * Optional. The type of incentive to get.
     * Defaults to ACQUISITION.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.services.FetchIncentiveRequest.IncentiveType type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return int
     */
    public function getType()
    {
        return isset($this->type) ? $this->type : 0;
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * Optional. The type of incentive to get.
     * Defaults to ACQUISITION.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.services.FetchIncentiveRequest.IncentiveType type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Services\FetchIncentiveRequest\IncentiveType::class);
        $this->type = $var;

        return $this;
    }

}

