# Int32OrStringV1 Constructors

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [Int32OrStringV1](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md)
- Kind: `Constructors`
- Members: `3`

Represents a value that can be either a 32-bit integer or a string.

## Int32OrStringV1(int?, string?)

- Name: `Constructor(int?, string?)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs#L16)

Represents a value that can be either a 32-bit integer or a string.

```csharp
public record Int32OrStringV1
{
    public Int32OrStringV1(
        int? Number = null,
        string? Text = null)
    {
        // ...
    }
}
```

## Parameters

- `Number` (`int?`) `optional`
- `Text` (`string?`) `optional`

## Remarks

This class provides functionality to handle values that could be either an integer or a string. It supports implicit and explicit conversions, equality comparisons, and YAML serialization/deserialization handling.

## Int32OrStringV1(int)

- Name: `Constructor(int)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Initializes a new instance of the [Int32OrStringV1](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md) class with a 32-bit integer value.

```csharp
public record Int32OrStringV1
{
    public Int32OrStringV1(
        int value)
    {
        // ...
    }
}
```

## Parameters

- `value` (`int`)
  The integer value to initialize.

## Int32OrStringV1(string?)

- Name: `Constructor(string?)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Initializes a new instance of the [Int32OrStringV1](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md) class with a string value.

```csharp
public record Int32OrStringV1
{
    public Int32OrStringV1(
        string? value)
    {
        // ...
    }
}
```

## Parameters

- `value` (`string?`)
  The string value to initialize.
