<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dataplex/v1/processing.proto

namespace Google\Cloud\Dataplex\V1\Trigger;

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

/**
 * The scan is scheduled to run periodically.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.Trigger.Schedule</code>
 */
class Schedule extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running
     * scans periodically.
     * To explicitly set a timezone to the cron tab, apply a prefix in the
     * cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
     * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
     * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
     * "TZ=America/New_York 1 * * * *".
     * This field is required for Schedule scans.
     *
     * Generated from protobuf field <code>string cron = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $cron = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $cron
     *           Required. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running
     *           scans periodically.
     *           To explicitly set a timezone to the cron tab, apply a prefix in the
     *           cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
     *           The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
     *           database. For example, "CRON_TZ=America/New_York 1 * * * *", or
     *           "TZ=America/New_York 1 * * * *".
     *           This field is required for Schedule scans.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running
     * scans periodically.
     * To explicitly set a timezone to the cron tab, apply a prefix in the
     * cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
     * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
     * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
     * "TZ=America/New_York 1 * * * *".
     * This field is required for Schedule scans.
     *
     * Generated from protobuf field <code>string cron = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCron()
    {
        return $this->cron;
    }

    /**
     * Required. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running
     * scans periodically.
     * To explicitly set a timezone to the cron tab, apply a prefix in the
     * cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}".
     * The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone
     * database. For example, "CRON_TZ=America/New_York 1 * * * *", or
     * "TZ=America/New_York 1 * * * *".
     * This field is required for Schedule scans.
     *
     * Generated from protobuf field <code>string cron = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCron($var)
    {
        GPBUtil::checkString($var, True);
        $this->cron = $var;

        return $this;
    }

}


