Class ResourceProviderUpsertResult
- Namespace
- FoundationaLLM.Common.Models.ResourceProviders
- Assembly
- FoundationaLLM.Common.dll
Represents the result of an upsert operation.
public class ResourceProviderUpsertResult
- Inheritance
-
ResourceProviderUpsertResult
- Derived
- Inherited Members
- Extension Methods
Properties
ObjectId
The id of the object that was created or updated.
[JsonPropertyName("object_id")]
public required string ObjectId { get; set; }
Property Value
Resource
Gets or sets the resource resulting from the upsert operation.
[JsonPropertyName("resource")]
public object? Resource { get; set; }
Property Value
Remarks
Each resource provider will decide whether to return the resource in the upsert result or not.
ResourceExists
A flag denoting whether the upserted resource already exists.
[JsonPropertyName("resource_exists")]
public required bool ResourceExists { get; set; }
Property Value
Methods
ToResourceProviderUpsertResult<T>()
Converts the current instance to a ResourceProviderUpsertResult<T> object.
public ResourceProviderUpsertResult<T> ToResourceProviderUpsertResult<T>() where T : ResourceBase
Returns
- ResourceProviderUpsertResult<T>
A ResourceProviderUpsertResult<T> containing the object ID, resource existence status, and the resource cast to the specified type
T
.
Type Parameters
T
The type of the resource, which must derive from ResourceBase.