<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v25/resources/campaign.proto

namespace Google\Ads\GoogleAds\V25\Resources\Campaign;

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

/**
 * Asset automation setting contains pair of AssetAutomationType and the
 * asset automation opt-in/out status
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.resources.Campaign.AssetAutomationSetting</code>
 */
class AssetAutomationSetting extends \Google\Protobuf\Internal\Message
{
    /**
     * The asset automation type advertiser would like to opt-in/out.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AssetAutomationTypeEnum.AssetAutomationType asset_automation_type = 1;</code>
     */
    protected $asset_automation_type = null;
    /**
     * The opt-in/out status of asset automation type.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AssetAutomationStatusEnum.AssetAutomationStatus asset_automation_status = 2;</code>
     */
    protected $asset_automation_status = null;
    protected $setting;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $asset_automation_type
     *           The asset automation type advertiser would like to opt-in/out.
     *     @type int $asset_automation_status
     *           The opt-in/out status of asset automation type.
     *     @type \Google\Ads\GoogleAds\V25\Resources\Campaign\AssetAutomationSetting\AutomatedVideoCrawlSetting $automated_video_crawl_setting
     *           Settings for automated video crawling.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Resources\Campaign::initOnce();
        parent::__construct($data);
    }

    /**
     * The asset automation type advertiser would like to opt-in/out.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AssetAutomationTypeEnum.AssetAutomationType asset_automation_type = 1;</code>
     * @return int
     */
    public function getAssetAutomationType()
    {
        return isset($this->asset_automation_type) ? $this->asset_automation_type : 0;
    }

    public function hasAssetAutomationType()
    {
        return isset($this->asset_automation_type);
    }

    public function clearAssetAutomationType()
    {
        unset($this->asset_automation_type);
    }

    /**
     * The asset automation type advertiser would like to opt-in/out.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AssetAutomationTypeEnum.AssetAutomationType asset_automation_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setAssetAutomationType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V25\Enums\AssetAutomationTypeEnum\AssetAutomationType::class);
        $this->asset_automation_type = $var;

        return $this;
    }

    /**
     * The opt-in/out status of asset automation type.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AssetAutomationStatusEnum.AssetAutomationStatus asset_automation_status = 2;</code>
     * @return int
     */
    public function getAssetAutomationStatus()
    {
        return isset($this->asset_automation_status) ? $this->asset_automation_status : 0;
    }

    public function hasAssetAutomationStatus()
    {
        return isset($this->asset_automation_status);
    }

    public function clearAssetAutomationStatus()
    {
        unset($this->asset_automation_status);
    }

    /**
     * The opt-in/out status of asset automation type.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v25.enums.AssetAutomationStatusEnum.AssetAutomationStatus asset_automation_status = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setAssetAutomationStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V25\Enums\AssetAutomationStatusEnum\AssetAutomationStatus::class);
        $this->asset_automation_status = $var;

        return $this;
    }

    /**
     * Settings for automated video crawling.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.resources.Campaign.AssetAutomationSetting.AutomatedVideoCrawlSetting automated_video_crawl_setting = 3;</code>
     * @return \Google\Ads\GoogleAds\V25\Resources\Campaign\AssetAutomationSetting\AutomatedVideoCrawlSetting|null
     */
    public function getAutomatedVideoCrawlSetting()
    {
        return $this->readOneof(3);
    }

    public function hasAutomatedVideoCrawlSetting()
    {
        return $this->hasOneof(3);
    }

    /**
     * Settings for automated video crawling.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.resources.Campaign.AssetAutomationSetting.AutomatedVideoCrawlSetting automated_video_crawl_setting = 3;</code>
     * @param \Google\Ads\GoogleAds\V25\Resources\Campaign\AssetAutomationSetting\AutomatedVideoCrawlSetting $var
     * @return $this
     */
    public function setAutomatedVideoCrawlSetting($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Resources\Campaign\AssetAutomationSetting\AutomatedVideoCrawlSetting::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

}

