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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * A single operation (create, remove) on an ad group asset set.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.AdGroupAssetSetOperation</code>
 */
class AdGroupAssetSetOperation extends \Google\Protobuf\Internal\Message
{
    protected $operation;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type \Google\Ads\GoogleAds\V23\Resources\AdGroupAssetSet $create
     *           Create operation: No resource name is expected for the new ad group asset
     *           set.
     * @type string $remove
     *           Remove operation: A resource name for the removed ad group asset set is
     *           expected, in this format:
     *           `customers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id}`
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\AdGroupAssetSetService::initOnce();
        parent::__construct($data);
    }

    /**
     * Create operation: No resource name is expected for the new ad group asset
     * set.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.AdGroupAssetSet create = 1;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Resources\AdGroupAssetSet|null
     */
    public function getCreate()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Create operation: No resource name is expected for the new ad group asset
     * set.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.resources.AdGroupAssetSet create = 1;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Resources\AdGroupAssetSet $var
     * @return $this
     */
    public function setCreate($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Resources\AdGroupAssetSet::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Remove operation: A resource name for the removed ad group asset set is
     * expected, in this format:
     * `customers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id}`
     *
     * Generated from protobuf field <code>string remove = 2 [(.google.api.resource_reference) = {</code>
     *
     * @return string
     */
    public function getRemove()
    {
        return $this->readOneof(2);
    }

    public function hasRemove()
    {
        return $this->hasOneof(2);
    }

    /**
     * Remove operation: A resource name for the removed ad group asset set is
     * expected, in this format:
     * `customers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id}`
     *
     * Generated from protobuf field <code>string remove = 2 [(.google.api.resource_reference) = {</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setRemove($var)
    {
        GPBUtil::checkString($var, true);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

