C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Describes an endpoint off of some types of resources from which an associated "large data file" can be accessed. This is a standard endpoint that exists for all of IAPIResource_WithDataEndpoint resource types which surfaces a standard set of large file upload functionality. This endpoint supports GET and PUT, as well as chunked large data upload using POST and PATCH. More...
Public Member Functions | |
LargeDataSubResource (IAPIResource_WithDataEndpoint owner) | |
Defines an endpoint off of some types of resources from which an associated "large data file" can be accessed. This is a standard endpoint that exists for all of IAPIResource_WithDataEndpoint resource types which surfaces a standard set of large file upload functionality. | |
void | Delete (int? timeout=null, IEnumerable< Parameter > requestParameters=null) |
Perform a DELETE request on the data endpoint, which would cancel a large data upload if it is in progress. | |
T | Get (IEnumerable< Parameter > parameters=null, int? timeout=null) |
Performs a GET request a at this endpoint. | |
IRestResponse | GetStream (Action< Stream > consumeStream, IEnumerable< Parameter > parameters=null, int? timeout=null) |
Perform a GET on the supplied URL and provide an action for consuming the response stream rather than loading the whole response into memory. | |
IRestResponse | Head (IEnumerable< Parameter > parameters=null, int? timeout=null) |
Performs a HEAD request at this endpoint. | |
IRestResponse | Head (int? timeout=null) |
Perform a HEAD request on the data endpoint, which would return information about whether data is present, or an upload is in progress. | |
void | Patch (byte[] data, int count, long bytesOffset, int? timeout=null, IEnumerable< Parameter > requestParameters=null) |
Performs a PATCH of part of this object's data at this endpoint. | |
void | Patch (string data, long bytesOffset, int? timeout=null, IEnumerable< Parameter > requestParameters=null) |
Performs a PATCH of part of this object's data at this endpoint. | |
void | Post (long? totalSizeBytes, int? timeout=null) |
Performs a POST that initiates a chunked large data upload. | |
void | UploadString (string data, LargeDataUpload.Parameters parameters=null) |
Uploads this object's data in its entirety at this endpoint in a single blocking request. | |
Static Public Member Functions | |
static implicit | operator T (SubResource< T > value) |
Allows implicit conversion of an instance of this class to its expected response return type. | |
Protected Attributes | |
string | PUT_ContentType = "application/octet-stream" |
The contentType to set when submitting this resource's body in a PUT request. | |
Properties | |
CommandSubResource | commit [get] |
The endpoint at which a large file upload is finalized with a POST. | |
int? | DefaultTimeout [get, set] |
Can be used to override the API.DefaultRequestTimeout with one that better suits this SubResource. | |
SubResource< LargeDataUpload.StatusResponse > | status [get] |
The endpoint at which the status of the data can be determined. | |
Describes an endpoint off of some types of resources from which an associated "large data file" can be accessed. This is a standard endpoint that exists for all of IAPIResource_WithDataEndpoint resource types which surfaces a standard set of large file upload functionality. This endpoint supports GET and PUT, as well as chunked large data upload using POST and PATCH.
Definition at line 12 of file LargeDataSubResource.cs.
|
inline |
Defines an endpoint off of some types of resources from which an associated "large data file" can be accessed. This is a standard endpoint that exists for all of IAPIResource_WithDataEndpoint resource types which surfaces a standard set of large file upload functionality.
owner | The resource which owns this data endpoint. |
Definition at line 34 of file LargeDataSubResource.cs.
|
inline |
Perform a DELETE request on the data endpoint, which would cancel a large data upload if it is in progress.
timeout | (Optional) The timeout before the request fails. |
requestParameters | (Optional) Request parameters to include. |
Definition at line 116 of file LargeDataSubResource.cs.
|
inlineinherited |
Performs a GET request a at this endpoint.
parameters | (Optional) Rest parameters to include with the GET request. |
timeout | (Optional) The timeout before the request fails. |
Definition at line 51 of file SubResource[T].cs.
|
inlineinherited |
Perform a GET on the supplied URL and provide an action for consuming the response stream rather than loading the whole response into memory.
Warning: The consumeStream action will always be invoked and handed the response body, even if the response status was an error. Your consumeStream action should be able to handle scenarios where the message body is an error message or otherwise contains unexpected content.
consumeStream | The action that will consume the response stream. |
parameters | Any additional parameters to include in the request. |
timeout | Optional - The desired request response timeout (in milliseconds). |
APIRequestException | If the request failed to reach the API. |
Definition at line 72 of file SubResource[T].cs.
|
inlineinherited |
Performs a HEAD request at this endpoint.
parameters | (Optional) Rest parameters to include with the HEAD request. |
timeout | (Optional) The timeout before the request fails. |
Definition at line 40 of file SubResource[T].cs.
|
inline |
Perform a HEAD request on the data endpoint, which would return information about whether data is present, or an upload is in progress.
timeout | (Optional) The timeout before the request fails. |
TODO: This method is redundant/ambiguous WRT the base SubResource<T>.Head method, but due to a difference in arguments and implementation cannot be easily removed. How are errors handled here compared to the base class that uses API.RequestAndParse?
Definition at line 106 of file LargeDataSubResource.cs.
|
inlinestaticinherited |
Allows implicit conversion of an instance of this class to its expected response return type.
Definition at line 28 of file SubResource[T].cs.
|
inline |
Performs a PATCH of part of this object's data at this endpoint.
data | The bytes of data to include in the PATCH request body. |
count | The number of bytes from the data array to use. |
bytesOffset | The offset (in bytes) at which this segment of data starts in the total data being uploaded. |
timeout | (Optional) The timeout before the request fails. |
requestParameters | (Optional) Additional request parameters to include. |
Definition at line 83 of file LargeDataSubResource.cs.
|
inline |
Performs a PATCH of part of this object's data at this endpoint.
data | The partial body of data to include in the PATCH request body. |
bytesOffset | The offset (in bytes) at which this segment of data starts in the total data being uploaded. |
timeout | (Optional) The timeout before the request fails. |
requestParameters | (Optional) Additional request parameters to include. |
Definition at line 67 of file LargeDataSubResource.cs.
|
inline |
Performs a POST that initiates a chunked large data upload.
totalSizeBytes | The size (in bytes) of the entire body of data to that will be uploaded in subsequent PATCH requests (if known in advance). |
timeout | (Optional) The timeout before the request fails. |
Definition at line 53 of file LargeDataSubResource.cs.
|
inline |
Uploads this object's data in its entirety at this endpoint in a single blocking request.
data | The entire body of data to upload to the server. |
parameters | (Optional) The upload parameters to use. |
Definition at line 42 of file LargeDataSubResource.cs.
|
protectedinherited |
The contentType to set when submitting this resource's body in a PUT request.
Definition at line 10 of file DataSubResource.cs.
|
get |
The endpoint at which a large file upload is finalized with a POST.
Definition at line 21 of file LargeDataSubResource.cs.
|
getsetinherited |
Can be used to override the API.DefaultRequestTimeout with one that better suits this SubResource.
Definition at line 16 of file SubResource[T].cs.
|
get |
The endpoint at which the status of the data can be determined.
Definition at line 24 of file LargeDataSubResource.cs.