<?php
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v24/resources/campaign.proto

namespace Google\Ads\GoogleAds\V24\Resources\Campaign;

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

/**
 * Freeform instructions that will be used to guide text asset generation
 * using LLM inference.
 *
 * Generated from protobuf message <code>google.ads.googleads.v24.resources.Campaign.MessagingRestriction</code>
 */
class MessagingRestriction extends \Google\Protobuf\Internal\Message
{
    /**
     * Freeform instructions to guide text asset generation using LLM
     * inference. Valid instructions may contain a maximum of 300 characters.
     *
     * Generated from protobuf field <code>string restriction_text = 1;</code>
     */
    protected $restriction_text = '';
    /**
     * Determines how the guideline is applied. Only
     * `RESTRICTION_BASED_EXCLUSION` is currently supported.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.MessagingRestrictionTypeEnum.MessagingRestrictionType restriction_type = 2;</code>
     */
    protected $restriction_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $restriction_text
     *           Freeform instructions to guide text asset generation using LLM
     *           inference. Valid instructions may contain a maximum of 300 characters.
     * @type int $restriction_type
     *           Determines how the guideline is applied. Only
     *           `RESTRICTION_BASED_EXCLUSION` is currently supported.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V24\Resources\Campaign::initOnce();
        parent::__construct($data);
    }

    /**
     * Freeform instructions to guide text asset generation using LLM
     * inference. Valid instructions may contain a maximum of 300 characters.
     *
     * Generated from protobuf field <code>string restriction_text = 1;</code>
     *
     * @return string
     */
    public function getRestrictionText()
    {
        return $this->restriction_text;
    }

    /**
     * Freeform instructions to guide text asset generation using LLM
     * inference. Valid instructions may contain a maximum of 300 characters.
     *
     * Generated from protobuf field <code>string restriction_text = 1;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setRestrictionText($var)
    {
        GPBUtil::checkString($var, true);
        $this->restriction_text = $var;

        return $this;
    }

    /**
     * Determines how the guideline is applied. Only
     * `RESTRICTION_BASED_EXCLUSION` is currently supported.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.MessagingRestrictionTypeEnum.MessagingRestrictionType restriction_type = 2;</code>
     *
     * @return int
     */
    public function getRestrictionType()
    {
        return $this->restriction_type;
    }

    /**
     * Determines how the guideline is applied. Only
     * `RESTRICTION_BASED_EXCLUSION` is currently supported.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v24.enums.MessagingRestrictionTypeEnum.MessagingRestrictionType restriction_type = 2;</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setRestrictionType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V24\Enums\MessagingRestrictionTypeEnum\MessagingRestrictionType::class);
        $this->restriction_type = $var;

        return $this;
    }

}

