# Cloud IoT v1 API - Class RegistryName (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.RegistryName)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.RegistryName)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.RegistryName)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.RegistryName)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.RegistryName)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.RegistryName)

    public sealed class RegistryName : IResourceName, IEquatable<RegistryName>

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

Resource name for the `Registry` resource.

## Inheritance

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

## Implements

[IResourceName](https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/IResourceName.cs), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName)

## Inherited Members

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

## 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

### RegistryName(string, string, string)

    public RegistryName(string projectId, string locationId, string registryId)

Constructs a new instance of a [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) class from the component parts of pattern
`projects/{project}/locations/{location}/registries/{registry}`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Project` ID. Must not be `null` or empty. |
| `locationId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Location` ID. Must not be `null` or empty. |
| `registryId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Registry` ID. Must not be `null` or empty. |

## Properties

### IsKnownPattern

    public bool IsKnownPattern { get; }

Whether this instance contains a resource name with a known pattern.

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

### LocationId

    public string LocationId { get; }

The `Location` ID. Will not be `null`, unless this instance contains an unparsed resource name.

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

### ProjectId

    public string ProjectId { get; }

The `Project` ID. Will not be `null`, unless this instance contains an unparsed resource name.

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

### RegistryId

    public string RegistryId { get; }

The `Registry` ID. Will not be `null`, unless this instance contains an unparsed resource name.

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

### Type

    public RegistryName.ResourceNameType Type { get; }

The [RegistryName.ResourceNameType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName.ResourceNameType) of the contained resource name.

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

### UnparsedResource

    public UnparsedResourceName UnparsedResource { get; }

The contained [UnparsedResourceName](https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/UnparsedResourceName.cs). Only non-`null` if this instance contains an
unparsed resource name.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/UnparsedResourceName.cs` |   |

## Methods

### Format(string, string, string)

    public static string Format(string projectId, string locationId, string registryId)

Formats the IDs into the string representation of this [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) with pattern
`projects/{project}/locations/{location}/registries/{registry}`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Project` ID. Must not be `null` or empty. |
| `locationId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Location` ID. Must not be `null` or empty. |
| `registryId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Registry` ID. Must not be `null` or empty. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` | The string representation of this [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) with pattern `projects/{project}/locations/{location}/registries/{registry}`. |

### FormatProjectLocationRegistry(string, string, string)

    public static string FormatProjectLocationRegistry(string projectId, string locationId, string registryId)

Formats the IDs into the string representation of this [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) with pattern
`projects/{project}/locations/{location}/registries/{registry}`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Project` ID. Must not be `null` or empty. |
| `locationId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Location` ID. Must not be `null` or empty. |
| `registryId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Registry` ID. Must not be `null` or empty. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` | The string representation of this [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) with pattern `projects/{project}/locations/{location}/registries/{registry}`. |

### FromProjectLocationRegistry(string, string, string)

    public static RegistryName FromProjectLocationRegistry(string projectId, string locationId, string registryId)

Creates a [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) with the pattern
`projects/{project}/locations/{location}/registries/{registry}`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Project` ID. Must not be `null` or empty. |
| `locationId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Location` ID. Must not be `null` or empty. |
| `registryId` | `https://learn.microsoft.com/dotnet/api/system.string` The `Registry` ID. Must not be `null` or empty. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` | A new instance of [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) constructed from the provided ids. |

### FromUnparsed(UnparsedResourceName)

    public static RegistryName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) containing an unparsed resource name.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `unparsedResourceName` | `https://github.com/googleapis/gax-dotnet/blob/6f2d3e64dd92f0f7a4f02a7db56cf6ed409615f2/Google.Api.Gax/UnparsedResourceName.cs` The unparsed resource name. Must not be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` | A new instance of [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) containing the provided `unparsedResourceName` . |

### GetHashCode()

    public override int GetHashCode()

Returns a hash code for this resource name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

**Overrides** [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)

### Parse(string)

    public static RegistryName Parse(string registryName)

Parses the given resource name string into a new [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) instance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `registryName` | `https://learn.microsoft.com/dotnet/api/system.string` The resource name in string form. Must not be `null`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` | The parsed [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) if successful. |

**Remarks** To parse successfully, the resource name must be formatted as one of the following:

- `projects/{project}/locations/{location}/registries/{registry}`

<br />

### Parse(string, bool)

    public static RegistryName Parse(string registryName, bool allowUnparsed)

Parses the given resource name string into a new [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) instance; optionally allowing an
unparseable resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `registryName` | `https://learn.microsoft.com/dotnet/api/system.string` The resource name in string form. Must not be `null`. |
| `allowUnparsed` | `https://learn.microsoft.com/dotnet/api/system.boolean` If `true` will successfully store an unparseable resource name into the [UnparsedResource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName#Google_Cloud_Iot_V1_RegistryName_UnparsedResource) property; otherwise will throw an [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) if an unparseable resource name is specified. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` | The parsed [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) if successful. |

**Remarks** To parse successfully, the resource name must be formatted as one of the following:

- `projects/{project}/locations/{location}/registries/{registry}`

Or may be in any format if `allowUnparsed` is `true`.

<br />

### ToString()

    public override string ToString()

The string representation of the resource name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` | The string representation of the resource name. |

**Overrides** [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

### TryParse(string, out RegistryName)

    public static bool TryParse(string registryName, out RegistryName result)

Tries to parse the given resource name string into a new [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `registryName` | `https://learn.microsoft.com/dotnet/api/system.string` The resource name in string form. Must not be `null`. |
| `result` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` When this method returns, the parsed [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName), or `null` if parsing failed. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` | `true` if the name was parsed successfully; `false` otherwise. |

**Remarks** To parse successfully, the resource name must be formatted as one of the following:

- `projects/{project}/locations/{location}/registries/{registry}`

<br />

### TryParse(string, bool, out RegistryName)

    public static bool TryParse(string registryName, bool allowUnparsed, out RegistryName result)

Tries to parse the given resource name string into a new [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName) instance; optionally
allowing an unparseable resource name.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `registryName` | `https://learn.microsoft.com/dotnet/api/system.string` The resource name in string form. Must not be `null`. |
| `allowUnparsed` | `https://learn.microsoft.com/dotnet/api/system.boolean` If `true` will successfully store an unparseable resource name into the [UnparsedResource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName#Google_Cloud_Iot_V1_RegistryName_UnparsedResource) property; otherwise will throw an [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) if an unparseable resource name is specified. |
| `result` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` When this method returns, the parsed [RegistryName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName), or `null` if parsing failed. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` | `true` if the name was parsed successfully; `false` otherwise. |

**Remarks** To parse successfully, the resource name must be formatted as one of the following:

- `projects/{project}/locations/{location}/registries/{registry}`

Or may be in any format if `allowUnparsed` is `true`.

<br />

## Operators

### operator ==(RegistryName, RegistryName)

    public static bool operator ==(RegistryName a, RegistryName b)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `a` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` |
| `b` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### operator !=(RegistryName, RegistryName)

    public static bool operator !=(RegistryName a, RegistryName b)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `a` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` |
| `b` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.RegistryName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |