# Cloud IoT v1 API - Class DeviceRegistry (2.2.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.2.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.DeviceRegistry)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.DeviceRegistry)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.DeviceRegistry)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.DeviceRegistry)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.DeviceRegistry)

    public sealed class DeviceRegistry : IMessage<DeviceRegistry>, IEquatable<DeviceRegistry>, IDeepCloneable<DeviceRegistry>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud IoT v1 API class DeviceRegistry.

A container for a group of devices.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> DeviceRegistry

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DeviceRegistry](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Iot.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1)

## Assembly

Google.Cloud.Iot.V1.dll

## Constructors

### DeviceRegistry()

    public DeviceRegistry()

### DeviceRegistry(DeviceRegistry)

    public DeviceRegistry(DeviceRegistry other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry` |

## Properties

### Credentials

    public RepeatedField<RegistryCredential> Credentials { get; }

The credentials used to verify the device credentials. No more than 10
credentials can be bound to a single registry at a time. The verification
process occurs at the time of device creation or update. If this field is
empty, no verification is performed. Otherwise, the credentials of a newly
created device or added credentials of an updated device should be signed
with one of these registry credentials.

Note, however, that existing devices will never be affected by
modifications to this list of credentials: after a device has been
successfully created in a registry, it should be able to connect even if
its registry credentials are revoked, deleted, or modified.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryCredential` |   |

### EventNotificationConfigs

    public RepeatedField<EventNotificationConfig> EventNotificationConfigs { get; }

The configuration for notification of telemetry events received from the
device. All telemetry events that were successfully published by the
device and acknowledged by Cloud IoT Core are guaranteed to be
delivered to Cloud Pub/Sub. If multiple configurations match a message,
only the first matching configuration is used. If you try to publish a
device telemetry event using MQTT without specifying a Cloud Pub/Sub topic
for the device's registry, the connection closes automatically. If you try
to do so using an HTTP connection, an error is returned. Up to 10
configurations may be provided.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.EventNotificationConfig` |   |

### HttpConfig

    public HttpConfig HttpConfig { get; set; }

The DeviceService (HTTP) configuration for this device registry.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.HttpConfig` |   |

### Id

    public string Id { get; set; }

The identifier of this device registry. For example, `myRegistry`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### LogLevel

    public LogLevel LogLevel { get; set; }

**Beta Feature**

The default logging verbosity for activity from devices in this registry.
The verbosity level can be overridden by Device.log_level.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.LogLevel` |   |

### MqttConfig

    public MqttConfig MqttConfig { get; set; }

The MQTT configuration for this device registry.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.MqttConfig` |   |

### Name

    public string Name { get; set; }

The resource path name. For example,
`projects/example-project/locations/us-central1/registries/my-registry`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RegistryName

    public RegistryName RegistryName { get; set; }

[RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.DeviceRegistry#Google_Cloud_Iot_V1_DeviceRegistry_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` |   |

### StateNotificationConfig

    public StateNotificationConfig StateNotificationConfig { get; set; }

The configuration for notification of new states received from the device.
State updates are guaranteed to be stored in the state history, but
notifications to Cloud Pub/Sub are not guaranteed. For example, if
permissions are misconfigured or the specified topic doesn't exist, no
notification will be published but the state will still be stored in Cloud
IoT Core.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.StateNotificationConfig` |   |