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

namespace Google\Cloud\Container\V1;

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

/**
 * MaintenanceWindow defines the maintenance window to be used for the cluster.
 *
 * Generated from protobuf message <code>google.container.v1.MaintenanceWindow</code>
 */
class MaintenanceWindow extends \Google\Protobuf\Internal\Message
{
    protected $policy;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Container\V1\DailyMaintenanceWindow $daily_maintenance_window
     *           DailyMaintenanceWindow specifies a daily maintenance operation window.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * DailyMaintenanceWindow specifies a daily maintenance operation window.
     *
     * Generated from protobuf field <code>.google.container.v1.DailyMaintenanceWindow daily_maintenance_window = 2;</code>
     * @return \Google\Cloud\Container\V1\DailyMaintenanceWindow
     */
    public function getDailyMaintenanceWindow()
    {
        return $this->readOneof(2);
    }

    /**
     * DailyMaintenanceWindow specifies a daily maintenance operation window.
     *
     * Generated from protobuf field <code>.google.container.v1.DailyMaintenanceWindow daily_maintenance_window = 2;</code>
     * @param \Google\Cloud\Container\V1\DailyMaintenanceWindow $var
     * @return $this
     */
    public function setDailyMaintenanceWindow($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\DailyMaintenanceWindow::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

