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

namespace Google\Cloud\ResourceSettings\V1;

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

/**
 * The request for UpdateSetting.
 *
 * Generated from protobuf message <code>google.cloud.resourcesettings.v1.UpdateSettingRequest</code>
 */
class UpdateSettingRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The setting to update. See [Setting][google.cloud.resourcesettings.v1.Setting] for field requirements.
     *
     * Generated from protobuf field <code>.google.cloud.resourcesettings.v1.Setting setting = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $setting = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ResourceSettings\V1\Setting $setting
     *           Required. The setting to update. See [Setting][google.cloud.resourcesettings.v1.Setting] for field requirements.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Resourcesettings\V1\ResourceSettings::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The setting to update. See [Setting][google.cloud.resourcesettings.v1.Setting] for field requirements.
     *
     * Generated from protobuf field <code>.google.cloud.resourcesettings.v1.Setting setting = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ResourceSettings\V1\Setting|null
     */
    public function getSetting()
    {
        return $this->setting;
    }

    public function hasSetting()
    {
        return isset($this->setting);
    }

    public function clearSetting()
    {
        unset($this->setting);
    }

    /**
     * Required. The setting to update. See [Setting][google.cloud.resourcesettings.v1.Setting] for field requirements.
     *
     * Generated from protobuf field <code>.google.cloud.resourcesettings.v1.Setting setting = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ResourceSettings\V1\Setting $var
     * @return $this
     */
    public function setSetting($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ResourceSettings\V1\Setting::class);
        $this->setting = $var;

        return $this;
    }

}

