1.0.0 (latest) 1.0.0-beta01

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

Reference documentation and code samples for the Vision AI v1 API class ResourceSpecification.

ResourceSpec collects a set of resources that can be used to specify requests and requirements.

Note: Highly experimental as this can be runtime dependent. Can use the "extras" field to experiment first before trying to abstract it.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ResourceSpecification](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VisionAI.V1/latest/Google.Cloud.VisionAI.V1.ResourceSpecification), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ResourceSpecification](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VisionAI.V1/latest/Google.Cloud.VisionAI.V1.ResourceSpecification), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ResourceSpecification](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VisionAI.V1/latest/Google.Cloud.VisionAI.V1.ResourceSpecification), [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.VisionAI.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VisionAI.V1/latest/Google.Cloud.VisionAI.V1)

## Assembly

Google.Cloud.VisionAI.V1.dll

## Constructors

### ResourceSpecification()

    public ResourceSpecification()

### ResourceSpecification(ResourceSpecification)

    public ResourceSpecification(ResourceSpecification other)

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

## Properties

### Cpu

    public string Cpu { get; set; }

CPU specification.

Examples: "100m", "0.5", "1", "2", ... correspond to 0.1, half, 1, or 2 cpus.

Leave empty to let the system decide.

Note that this does *not* determine the cpu vender/make, or its underlying clock speed and specific SIMD features. It is only the amount time it requires in timeslicing.

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

### CpuLimits

    public string CpuLimits { get; set; }

CPU limit.

Examples: "100m", "0.5", "1", "2", ... correspond to 0.1, half, 1, or 2 cpus.

Leave empty to indicate no limit.

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

### Gpus

    public int Gpus { get; set; }

Number of gpus.

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

### LatencyBudgetMs

    public int LatencyBudgetMs { get; set; }

The maximum latency that this operator may use to process an element.

If non positive, then a system default will be used. Operator developers should arrange for the system compute resources to be aligned with this latency budget; e.g. if you want a ML model to produce results within 500ms, then you should make sure you request enough cpu/gpu/memory to achieve that.

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

### Memory

    public string Memory { get; set; }

Memory specification (in bytes).

Examples: "128974848", "129e6", "129M", "123Mi", ... correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.

Leave empty to let the system decide.

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

### MemoryLimits

    public string MemoryLimits { get; set; }

Memory usage limits.

Examples: "128974848", "129e6", "129M", "123Mi", ... correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.

Leave empty to indicate no limit.

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