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

namespace Google\Ads\GoogleAds\V11\Common;

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

/**
 * Product image specific data.
 *
 * Generated from protobuf message <code>google.ads.googleads.v11.common.ProductImage</code>
 */
class ProductImage extends \Google\Protobuf\Internal\Message
{
    /**
     * The MediaFile resource name of the product image. Valid image types are
     * GIF, JPEG and PNG. The minimum size is 300x300 pixels and the aspect ratio
     * must be 1:1 (+-1%).
     *
     * Generated from protobuf field <code>optional string product_image = 4;</code>
     */
    protected $product_image = null;
    /**
     * Description of the product.
     *
     * Generated from protobuf field <code>optional string description = 5;</code>
     */
    protected $description = null;
    /**
     * Display-call-to-action of the product image.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.common.DisplayCallToAction display_call_to_action = 3;</code>
     */
    protected $display_call_to_action = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $product_image
     *           The MediaFile resource name of the product image. Valid image types are
     *           GIF, JPEG and PNG. The minimum size is 300x300 pixels and the aspect ratio
     *           must be 1:1 (+-1%).
     *     @type string $description
     *           Description of the product.
     *     @type \Google\Ads\GoogleAds\V11\Common\DisplayCallToAction $display_call_to_action
     *           Display-call-to-action of the product image.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V11\Common\AdTypeInfos::initOnce();
        parent::__construct($data);
    }

    /**
     * The MediaFile resource name of the product image. Valid image types are
     * GIF, JPEG and PNG. The minimum size is 300x300 pixels and the aspect ratio
     * must be 1:1 (+-1%).
     *
     * Generated from protobuf field <code>optional string product_image = 4;</code>
     * @return string
     */
    public function getProductImage()
    {
        return isset($this->product_image) ? $this->product_image : '';
    }

    public function hasProductImage()
    {
        return isset($this->product_image);
    }

    public function clearProductImage()
    {
        unset($this->product_image);
    }

    /**
     * The MediaFile resource name of the product image. Valid image types are
     * GIF, JPEG and PNG. The minimum size is 300x300 pixels and the aspect ratio
     * must be 1:1 (+-1%).
     *
     * Generated from protobuf field <code>optional string product_image = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setProductImage($var)
    {
        GPBUtil::checkString($var, True);
        $this->product_image = $var;

        return $this;
    }

    /**
     * Description of the product.
     *
     * Generated from protobuf field <code>optional string description = 5;</code>
     * @return string
     */
    public function getDescription()
    {
        return isset($this->description) ? $this->description : '';
    }

    public function hasDescription()
    {
        return isset($this->description);
    }

    public function clearDescription()
    {
        unset($this->description);
    }

    /**
     * Description of the product.
     *
     * Generated from protobuf field <code>optional string description = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Display-call-to-action of the product image.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.common.DisplayCallToAction display_call_to_action = 3;</code>
     * @return \Google\Ads\GoogleAds\V11\Common\DisplayCallToAction|null
     */
    public function getDisplayCallToAction()
    {
        return $this->display_call_to_action;
    }

    public function hasDisplayCallToAction()
    {
        return isset($this->display_call_to_action);
    }

    public function clearDisplayCallToAction()
    {
        unset($this->display_call_to_action);
    }

    /**
     * Display-call-to-action of the product image.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v11.common.DisplayCallToAction display_call_to_action = 3;</code>
     * @param \Google\Ads\GoogleAds\V11\Common\DisplayCallToAction $var
     * @return $this
     */
    public function setDisplayCallToAction($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V11\Common\DisplayCallToAction::class);
        $this->display_call_to_action = $var;

        return $this;
    }

}

