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

namespace Google\Ads\GoogleAds\V23\Common;

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

/**
 * A business message asset.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.BusinessMessageAsset</code>
 */
class BusinessMessageAsset extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Message provider of the business message asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.BusinessMessageProviderEnum.BusinessMessageProvider message_provider = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $message_provider = 0;
    /**
     * Required. A welcome message to prompt the user to initiate a conversation.
     *
     * Generated from protobuf field <code>string starter_message = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $starter_message = '';
    /**
     * A call to action for the business message asset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.common.BusinessMessageCallToActionInfo call_to_action = 3;</code>
     */
    protected $call_to_action = null;
    protected $message_provider_data;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $message_provider
     *           Required. Message provider of the business message asset.
     *     @type string $starter_message
     *           Required. A welcome message to prompt the user to initiate a conversation.
     *     @type \Google\Ads\GoogleAds\V23\Common\BusinessMessageCallToActionInfo $call_to_action
     *           A call to action for the business message asset.
     *     @type \Google\Ads\GoogleAds\V23\Common\WhatsappBusinessMessageInfo $whatsapp_info
     *           Whatsapp.
     *     @type \Google\Ads\GoogleAds\V23\Common\FacebookMessengerBusinessMessageInfo $facebook_messenger_info
     *           Facebook Messenger.
     *     @type \Google\Ads\GoogleAds\V23\Common\ZaloBusinessMessageInfo $zalo_info
     *           Zalo.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\AssetTypes::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Message provider of the business message asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.BusinessMessageProviderEnum.BusinessMessageProvider message_provider = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getMessageProvider()
    {
        return $this->message_provider;
    }

    /**
     * Required. Message provider of the business message asset.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.BusinessMessageProviderEnum.BusinessMessageProvider message_provider = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setMessageProvider($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\BusinessMessageProviderEnum\BusinessMessageProvider::class);
        $this->message_provider = $var;

        return $this;
    }

    /**
     * Required. A welcome message to prompt the user to initiate a conversation.
     *
     * Generated from protobuf field <code>string starter_message = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getStarterMessage()
    {
        return $this->starter_message;
    }

    /**
     * Required. A welcome message to prompt the user to initiate a conversation.
     *
     * Generated from protobuf field <code>string starter_message = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setStarterMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->starter_message = $var;

        return $this;
    }

    /**
     * A call to action for the business message asset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.common.BusinessMessageCallToActionInfo call_to_action = 3;</code>
     * @return \Google\Ads\GoogleAds\V23\Common\BusinessMessageCallToActionInfo|null
     */
    public function getCallToAction()
    {
        return $this->call_to_action;
    }

    public function hasCallToAction()
    {
        return isset($this->call_to_action);
    }

    public function clearCallToAction()
    {
        unset($this->call_to_action);
    }

    /**
     * A call to action for the business message asset.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.common.BusinessMessageCallToActionInfo call_to_action = 3;</code>
     * @param \Google\Ads\GoogleAds\V23\Common\BusinessMessageCallToActionInfo $var
     * @return $this
     */
    public function setCallToAction($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\BusinessMessageCallToActionInfo::class);
        $this->call_to_action = $var;

        return $this;
    }

    /**
     * Whatsapp.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.WhatsappBusinessMessageInfo whatsapp_info = 5;</code>
     * @return \Google\Ads\GoogleAds\V23\Common\WhatsappBusinessMessageInfo|null
     */
    public function getWhatsappInfo()
    {
        return $this->readOneof(5);
    }

    public function hasWhatsappInfo()
    {
        return $this->hasOneof(5);
    }

    /**
     * Whatsapp.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.WhatsappBusinessMessageInfo whatsapp_info = 5;</code>
     * @param \Google\Ads\GoogleAds\V23\Common\WhatsappBusinessMessageInfo $var
     * @return $this
     */
    public function setWhatsappInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\WhatsappBusinessMessageInfo::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Facebook Messenger.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.FacebookMessengerBusinessMessageInfo facebook_messenger_info = 6;</code>
     * @return \Google\Ads\GoogleAds\V23\Common\FacebookMessengerBusinessMessageInfo|null
     */
    public function getFacebookMessengerInfo()
    {
        return $this->readOneof(6);
    }

    public function hasFacebookMessengerInfo()
    {
        return $this->hasOneof(6);
    }

    /**
     * Facebook Messenger.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.FacebookMessengerBusinessMessageInfo facebook_messenger_info = 6;</code>
     * @param \Google\Ads\GoogleAds\V23\Common\FacebookMessengerBusinessMessageInfo $var
     * @return $this
     */
    public function setFacebookMessengerInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\FacebookMessengerBusinessMessageInfo::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Zalo.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.ZaloBusinessMessageInfo zalo_info = 7;</code>
     * @return \Google\Ads\GoogleAds\V23\Common\ZaloBusinessMessageInfo|null
     */
    public function getZaloInfo()
    {
        return $this->readOneof(7);
    }

    public function hasZaloInfo()
    {
        return $this->hasOneof(7);
    }

    /**
     * Zalo.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.ZaloBusinessMessageInfo zalo_info = 7;</code>
     * @param \Google\Ads\GoogleAds\V23\Common\ZaloBusinessMessageInfo $var
     * @return $this
     */
    public function setZaloInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\ZaloBusinessMessageInfo::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getMessageProviderData()
    {
        return $this->whichOneof("message_provider_data");
    }

}

