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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Data and metadata about a piece of generated text.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.GeneratedText</code>
 */
class GeneratedText extends \Google\Protobuf\Internal\Message
{
    /**
     * A string of text that was generated.
     *
     * Generated from protobuf field <code>string text = 1;</code>
     */
    protected $text = '';
    /**
     * The type of asset this text is intended to be used as.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AssetFieldTypeEnum.AssetFieldType asset_field_type = 2;</code>
     */
    protected $asset_field_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $text
     *           A string of text that was generated.
     * @type int $asset_field_type
     *           The type of asset this text is intended to be used as.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\AssetGenerationService::initOnce();
        parent::__construct($data);
    }

    /**
     * A string of text that was generated.
     *
     * Generated from protobuf field <code>string text = 1;</code>
     *
     * @return string
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * A string of text that was generated.
     *
     * Generated from protobuf field <code>string text = 1;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkString($var, true);
        $this->text = $var;

        return $this;
    }

    /**
     * The type of asset this text is intended to be used as.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AssetFieldTypeEnum.AssetFieldType asset_field_type = 2;</code>
     *
     * @return int
     */
    public function getAssetFieldType()
    {
        return $this->asset_field_type;
    }

    /**
     * The type of asset this text is intended to be used as.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.AssetFieldTypeEnum.AssetFieldType asset_field_type = 2;</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setAssetFieldType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\AssetFieldTypeEnum\AssetFieldType::class);
        $this->asset_field_type = $var;

        return $this;
    }

}

