<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/shopping/merchant/datasources/v1/datasourcetypes.proto

namespace Google\Shopping\Merchant\DataSources\V1;

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

/**
 * The promotion data source.
 *
 * Generated from protobuf message <code>google.shopping.merchant.datasources.v1.PromotionDataSource</code>
 */
class PromotionDataSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Immutable. The target country used as part of the unique
     * identifier. Represented as a [CLDR territory
     * code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
     * Promotions are only available in selected
     * [countries](https://support.google.com/merchants/answer/4588460).
     *
     * Generated from protobuf field <code>string target_country = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $target_country = '';
    /**
     * Required. Immutable. The two-letter ISO 639-1 language of the items in the
     * data source.
     *
     * Generated from protobuf field <code>string content_language = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $content_language = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $target_country
     *           Required. Immutable. The target country used as part of the unique
     *           identifier. Represented as a [CLDR territory
     *           code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
     *           Promotions are only available in selected
     *           [countries](https://support.google.com/merchants/answer/4588460).
     *     @type string $content_language
     *           Required. Immutable. The two-letter ISO 639-1 language of the items in the
     *           data source.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Datasources\V1\Datasourcetypes::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Immutable. The target country used as part of the unique
     * identifier. Represented as a [CLDR territory
     * code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
     * Promotions are only available in selected
     * [countries](https://support.google.com/merchants/answer/4588460).
     *
     * Generated from protobuf field <code>string target_country = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getTargetCountry()
    {
        return $this->target_country;
    }

    /**
     * Required. Immutable. The target country used as part of the unique
     * identifier. Represented as a [CLDR territory
     * code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
     * Promotions are only available in selected
     * [countries](https://support.google.com/merchants/answer/4588460).
     *
     * Generated from protobuf field <code>string target_country = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setTargetCountry($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_country = $var;

        return $this;
    }

    /**
     * Required. Immutable. The two-letter ISO 639-1 language of the items in the
     * data source.
     *
     * Generated from protobuf field <code>string content_language = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getContentLanguage()
    {
        return $this->content_language;
    }

    /**
     * Required. Immutable. The two-letter ISO 639-1 language of the items in the
     * data source.
     *
     * Generated from protobuf field <code>string content_language = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setContentLanguage($var)
    {
        GPBUtil::checkString($var, True);
        $this->content_language = $var;

        return $this;
    }

}

