<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/report_messages.proto

namespace Google\Ads\AdManager\V1;

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

/**
 * The options for a scheduled report.
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.ScheduleOptions</code>
 */
class ScheduleOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Information pertaining to schedule itself.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Schedule schedule = 1;</code>
     */
    protected $schedule = null;
    /**
     * Option for when to deliver the scheduled report.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition delivery_condition = 2;</code>
     */
    protected $delivery_condition = 0;
    /**
     * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT
     * is specified.
     *
     * Generated from protobuf field <code>repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $flags;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\AdManager\V1\Schedule $schedule
     *           Information pertaining to schedule itself.
     *     @type int $delivery_condition
     *           Option for when to deliver the scheduled report.
     *     @type array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $flags
     *           Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT
     *           is specified.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce();
        parent::__construct($data);
    }

    /**
     * Information pertaining to schedule itself.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Schedule schedule = 1;</code>
     * @return \Google\Ads\AdManager\V1\Schedule|null
     */
    public function getSchedule()
    {
        return $this->schedule;
    }

    public function hasSchedule()
    {
        return isset($this->schedule);
    }

    public function clearSchedule()
    {
        unset($this->schedule);
    }

    /**
     * Information pertaining to schedule itself.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.Schedule schedule = 1;</code>
     * @param \Google\Ads\AdManager\V1\Schedule $var
     * @return $this
     */
    public function setSchedule($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Schedule::class);
        $this->schedule = $var;

        return $this;
    }

    /**
     * Option for when to deliver the scheduled report.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition delivery_condition = 2;</code>
     * @return int
     */
    public function getDeliveryCondition()
    {
        return $this->delivery_condition;
    }

    /**
     * Option for when to deliver the scheduled report.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition delivery_condition = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setDeliveryCondition($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ScheduleOptions\DeliveryCondition::class);
        $this->delivery_condition = $var;

        return $this;
    }

    /**
     * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT
     * is specified.
     *
     * Generated from protobuf field <code>repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFlags()
    {
        return $this->flags;
    }

    /**
     * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT
     * is specified.
     *
     * Generated from protobuf field <code>repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFlags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Flag::class);
        $this->flags = $arr;

        return $this;
    }

}

