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

namespace Google\Cloud\AdvisoryNotifications\V1;

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

/**
 * Request of UpdateSettings endpoint.
 *
 * Generated from protobuf message <code>google.cloud.advisorynotifications.v1.UpdateSettingsRequest</code>
 */
class UpdateSettingsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. New settings.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $settings = null;

    /**
     * @param \Google\Cloud\AdvisoryNotifications\V1\Settings $settings Required. New settings.
     *
     * @return \Google\Cloud\AdvisoryNotifications\V1\UpdateSettingsRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\AdvisoryNotifications\V1\Settings $settings): self
    {
        return (new self())
            ->setSettings($settings);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AdvisoryNotifications\V1\Settings $settings
     *           Required. New settings.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Advisorynotifications\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. New settings.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AdvisoryNotifications\V1\Settings|null
     */
    public function getSettings()
    {
        return $this->settings;
    }

    public function hasSettings()
    {
        return isset($this->settings);
    }

    public function clearSettings()
    {
        unset($this->settings);
    }

    /**
     * Required. New settings.
     *
     * Generated from protobuf field <code>.google.cloud.advisorynotifications.v1.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AdvisoryNotifications\V1\Settings $var
     * @return $this
     */
    public function setSettings($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AdvisoryNotifications\V1\Settings::class);
        $this->settings = $var;

        return $this;
    }

}

