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

namespace Google\Ads\GoogleAds\V22\Services;

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

/**
 * A source image to be used in the generation process.
 *
 * Generated from protobuf message <code>google.ads.googleads.v22.services.SourceImage</code>
 */
class SourceImage extends \Google\Protobuf\Internal\Message
{
    protected $image;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $image_data
     *           Optional. Raw bytes of the image to use.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V22\Services\AssetGenerationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Raw bytes of the image to use.
     *
     * Generated from protobuf field <code>bytes image_data = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getImageData()
    {
        return $this->readOneof(1);
    }

    public function hasImageData()
    {
        return $this->hasOneof(1);
    }

    /**
     * Optional. Raw bytes of the image to use.
     *
     * Generated from protobuf field <code>bytes image_data = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setImageData($var)
    {
        GPBUtil::checkString($var, False);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

