Table of Contents

Class GeminiCorporaPatchRequest<TPatchData>

Updates a Corpora API resource. Response type can be GeminiCorpus, GeminiCorpusDocument or GeminiCorpusChunk.

public class GeminiCorporaPatchRequest<TPatchData> : IGeminiPatchRequest, IGeminiRequest

Type Parameters

TPatchData

The type of patch data. Use GeminiCorpusPatchData for patching Corpora, GeminiCorpusDocumentPatchData for Documents and GeminiCorpusChunkPatchData for Chunks.

Inheritance
object
GeminiCorporaPatchRequest<TPatchData>
Implements
Extension Methods

Remarks

Only available in the beta API.

Constructors

GeminiCorporaPatchRequest(TPatchData, IGeminiCorpusResourceId, bool)

public GeminiCorporaPatchRequest(TPatchData patch, IGeminiCorpusResourceId resourceId, bool useBetaApi = true)

Parameters

patch TPatchData

The patch data.

resourceId IGeminiCorpusResourceId

The resource ID of the Corpora API resource to patch.

useBetaApi bool

Should the request use the Beta API?

Remarks

Only available in the beta API.

Fields

ApiVersion

The API version to use.

public string ApiVersion

Field Value

string

Patch

The patch data.

public TPatchData Patch

Field Value

TPatchData

ResourceId

The ID of the Corpora API resource to patch.

public IGeminiCorpusResourceId ResourceId

Field Value

IGeminiCorpusResourceId

Properties

AuthMethod

The preferred authentication method.

public GeminiAuthMethod AuthMethod { get; set; }

Property Value

GeminiAuthMethod

ContentType

The MIME type of the request content.

public string ContentType { get; }

Property Value

string

OAuthAccessToken

The OAuth access token to authenticate the request, if using OAuthAccessToken as AuthMethod.

public string OAuthAccessToken { get; set; }

Property Value

string

Methods

GetEndpointUri(GeminiRequestMetadata)

Gets the URI to the API endpoint.

public string GetEndpointUri(GeminiRequestMetadata metadata)

Parameters

metadata GeminiRequestMetadata

The metadata of the request to be carried out on the URI.

Returns

string

The URI.

GetUtf8EncodedData()

Converts the request object to a UTF-8 encoded string.

public string GetUtf8EncodedData()

Returns

string

The string data.