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

namespace Google\Cloud\Iot\V1;

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

/**
 * Request for `UpdateDeviceRegistry`.
 *
 * Generated from protobuf message <code>google.cloud.iot.v1.UpdateDeviceRegistryRequest</code>
 */
class UpdateDeviceRegistryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The new values for the device registry. The `id` field must be empty, and
     * the `name` field must indicate the path of the resource. For example,
     * `projects/example-project/locations/us-central1/registries/my-registry`.
     *
     * Generated from protobuf field <code>.google.cloud.iot.v1.DeviceRegistry device_registry = 1;</code>
     */
    private $device_registry = null;
    /**
     * Only updates the `device_registry` fields indicated by this mask.
     * The field mask must not be empty, and it must not contain fields that
     * are immutable or only set by the server.
     * Mutable top-level fields: `event_notification_config`, `http_config`,
     * `mqtt_config`, and `state_notification_config`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Iot\V1\DeviceRegistry $device_registry
     *           The new values for the device registry. The `id` field must be empty, and
     *           the `name` field must indicate the path of the resource. For example,
     *           `projects/example-project/locations/us-central1/registries/my-registry`.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Only updates the `device_registry` fields indicated by this mask.
     *           The field mask must not be empty, and it must not contain fields that
     *           are immutable or only set by the server.
     *           Mutable top-level fields: `event_notification_config`, `http_config`,
     *           `mqtt_config`, and `state_notification_config`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce();
        parent::__construct($data);
    }

    /**
     * The new values for the device registry. The `id` field must be empty, and
     * the `name` field must indicate the path of the resource. For example,
     * `projects/example-project/locations/us-central1/registries/my-registry`.
     *
     * Generated from protobuf field <code>.google.cloud.iot.v1.DeviceRegistry device_registry = 1;</code>
     * @return \Google\Cloud\Iot\V1\DeviceRegistry
     */
    public function getDeviceRegistry()
    {
        return $this->device_registry;
    }

    /**
     * The new values for the device registry. The `id` field must be empty, and
     * the `name` field must indicate the path of the resource. For example,
     * `projects/example-project/locations/us-central1/registries/my-registry`.
     *
     * Generated from protobuf field <code>.google.cloud.iot.v1.DeviceRegistry device_registry = 1;</code>
     * @param \Google\Cloud\Iot\V1\DeviceRegistry $var
     * @return $this
     */
    public function setDeviceRegistry($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceRegistry::class);
        $this->device_registry = $var;

        return $this;
    }

    /**
     * Only updates the `device_registry` fields indicated by this mask.
     * The field mask must not be empty, and it must not contain fields that
     * are immutable or only set by the server.
     * Mutable top-level fields: `event_notification_config`, `http_config`,
     * `mqtt_config`, and `state_notification_config`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @return \Google\Protobuf\FieldMask
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    /**
     * Only updates the `device_registry` fields indicated by this mask.
     * The field mask must not be empty, and it must not contain fields that
     * are immutable or only set by the server.
     * Mutable top-level fields: `event_notification_config`, `http_config`,
     * `mqtt_config`, and `state_notification_config`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

