# TreatmentResult

Result returned by a treatment provider.

Class 

`IntelligenceX.Treatment`

**Namespace**

`IntelligenceX.Treatment`

**Assembly**

`IntelligenceX`

**Source**

[TreatmentResult.cs:14](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L14)

**Modifiers**

sealed

Result returned by a treatment provider.

## Inheritance

- object
- TreatmentResult

## Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 3

- Method [ITreatmentProvider.RunAsync](/api/intelligencex-treatment-itreatmentprovider/#method-runasync-intelligencex-treatment-treatmentrequest-threading-cancellationtoken)
- Method [OpenAIChatTreatmentProvider.RunAsync](/api/intelligencex-treatment-openaichattreatmentprovider/#method-runasync-intelligencex-treatment-treatmentrequest-threading-cancellationtoken)
- Method [TreatmentEngine.RunAsync](/api/intelligencex-treatment-treatmentengine/#method-runasync-intelligencex-treatment-treatmentrequest-threading-cancellationtoken)

Filter members 

Show inherited

## Constructors

`public TreatmentResult(string id, string? status, string? text, JsonValue? json, IReadOnlyList<TreatmentAsset>? assets, object? raw, IReadOnlyDictionary<string, string>? metadata = null)` [#](#member-7660b60aaaf17a28761b9171)

[TreatmentResult.cs:14](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L14)

Initializes a new treatment result.

Parameters

**id string required**

**status string? required**

**text string? required**

**json IntelligenceX.Json.JsonValue? required**

**assets System.Collections.Generic.IReadOnlyList<IntelligenceX.Treatment.TreatmentAsset>? required**

**raw object? required**

**metadata System.Collections.Generic.IReadOnlyDictionary<string, string>? = null optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Id { get; }` [#](#property-id)

[TreatmentResult.cs:28](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L28)

Treatment result id.

`public string? Status { get; }` [#](#property-status)

[TreatmentResult.cs:32](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L32)

Provider status.

`public string? Text { get; }` [#](#property-text)

[TreatmentResult.cs:36](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L36)

Aggregated text output.

`public JsonValue? Json { get; }` [#](#property-json)

[TreatmentResult.cs:40](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L40)

Parsed JSON output when available.

`public JsonObject? JsonObject { get; }` [#](#property-jsonobject)

[TreatmentResult.cs:44](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L44)

Parsed JSON object output when the provider returned an object.

`public IReadOnlyList<TreatmentAsset> Assets { get; }` [#](#property-assets)

[TreatmentResult.cs:48](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L48)

Assets generated or selected during treatment.

`public object? Raw { get; }` [#](#property-raw)

[TreatmentResult.cs:52](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L52)

Raw provider result.

`public IReadOnlyDictionary<string, string> Metadata { get; }` [#](#property-metadata)

[TreatmentResult.cs:56](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Treatment/TreatmentResult.cs#L56)

Metadata attached by the caller or provider.

<!-- PowerForge markdown artifact sha256:9587300FA9EE8DA45108D8D7F23B918D44D42E5914F56F8F7AD3B66211274BC9 -->
