API version:
Show / Hide Table of Contents

Interface IDataStore

Combines the concerns of making requests and serializing data into one interface.

Namespace: Okta.Sdk.Internal
Assembly: Okta.Sdk.dll
Syntax
public interface IDataStore

Properties

RequestExecutor

Gets the IRequestExecutor used by this IDataStore.

Declaration
IRequestExecutor RequestExecutor { get; }
Property Value
Type Description
IRequestExecutor

The IRequestExecutor used by this IDataStore.

Serializer

Gets the ISerializer used by this IDataStore.

Declaration
ISerializer Serializer { get; }
Property Value
Type Description
ISerializer

The ISerializer used by this IDataStore.

Methods

DeleteAsync(HttpRequest, RequestContext, CancellationToken)

Deletes a resource.

Declaration
Task<HttpResponse> DeleteAsync(HttpRequest request, RequestContext requestContext, CancellationToken cancellationToken)
Parameters
Type Name Description
HttpRequest request

The HTTP request options.

RequestContext requestContext

Information about the upstream request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<HttpResponse>

The HttpResponse data.

GetArrayAsync<T>(HttpRequest, RequestContext, CancellationToken)

Gets an array of resources and deserializes each item to a Resource type.

Declaration
Task<HttpResponse<IEnumerable<T>>> GetArrayAsync<T>(HttpRequest request, RequestContext requestContext, CancellationToken cancellationToken)
    where T : IResource
Parameters
Type Name Description
HttpRequest request

The HTTP request options.

RequestContext requestContext

Information about the upstream request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<HttpResponse<System.Collections.Generic.IEnumerable<T>>>

An array of deserialized resources and HttpResponse data.

Type Parameters
Name Description
T

The Resource type to deserialize the returned data to.

Exceptions
Type Condition
OktaApiException

An API error occurred.

GetAsync<T>(HttpRequest, RequestContext, CancellationToken)

Gets a resource and deserializes it to a Resource type.

Declaration
Task<HttpResponse<T>> GetAsync<T>(HttpRequest request, RequestContext requestContext, CancellationToken cancellationToken)
    where T : Resource, new()
Parameters
Type Name Description
HttpRequest request

The HTTP request options.

RequestContext requestContext

Information about the upstream request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<HttpResponse<T>>

The deserialized resource and HttpResponse data.

Type Parameters
Name Description
T

The Resource type to deserialize the returned data to.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PostAsync<TResponse>(HttpRequest, RequestContext, CancellationToken)

Posts data to an endpoint and deserializes the response to a Resource type.

Declaration
Task<HttpResponse<TResponse>> PostAsync<TResponse>(HttpRequest request, RequestContext requestContext, CancellationToken cancellationToken)
    where TResponse : Resource, new()
Parameters
Type Name Description
HttpRequest request

The HTTP request options.

RequestContext requestContext

Information about the upstream request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<HttpResponse<TResponse>>

The deserialized response resource and HttpResponse data.

Type Parameters
Name Description
TResponse

The Resource type to deserialize the returned data to.

Exceptions
Type Condition
OktaApiException

An API error occurred.

PutAsync<TResponse>(HttpRequest, RequestContext, CancellationToken)

Puts data to an endpoint and deserializes the response to a Resource type.

Declaration
Task<HttpResponse<TResponse>> PutAsync<TResponse>(HttpRequest request, RequestContext requestContext, CancellationToken cancellationToken)
    where TResponse : Resource, new()
Parameters
Type Name Description
HttpRequest request

The HTTP request options.

RequestContext requestContext

Information about the upstream request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<HttpResponse<TResponse>>

The deserialized response resource and HttpResponse data.

Type Parameters
Name Description
TResponse

The Resource type to deserialize the returned data to.

Exceptions
Type Condition
OktaApiException

An API error occurred.

Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.