C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Provides the REST request methods available to data endpoints. More...
Static Public Member Functions | |
static BackAllocations | back_allocations_blocking (this IAPIResourceView thisView, string source_id, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue) |
Obsolete.
Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static BackAllocations | back_allocations_blocking (this IAPIResourceView thisView, string source_id, PollingOptions pollingOptions=null) |
Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static T | Change< T, TProperty > (this T obj, Expression< Func< T, TProperty > > propertyExpression, TProperty newValue) |
Changes the specified property on the object (using reflection) and then returns the modified object. | |
static CoMetrics | co_metrics_blocking< T > (this IAPIResourceView thisView, double probability, IReference< T > component, CoMetricsOptions options, PollingOptions pollingOptions=null) |
Obsolete.
Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static List< CoMetrics > | co_metrics_blocking< T > (this IAPIResourceView thisView, IEnumerable< ProbabilityWindow > ranges, IReference< T > component, CoMetricsOptions options=null, PollingOptions pollingOptions=null) |
Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static List< CoMetrics > | co_metrics_blocking< T > (this IAPIResourceView thisView, List< double > probabilities, IReference< T > component, CoMetricsOptions options, PollingOptions pollingOptions=null) |
Obsolete.
Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static CoMetrics | co_metrics_blocking< T > (this IAPIResourceView thisView, ProbabilityWindow range, IReference< T > component, CoMetricsOptions options=null, PollingOptions pollingOptions=null) |
Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static long | Count< T > (this APITypes.IResourceCollection< T > collection, IEnumerable< Parameter > parameters=null, int? timeout=null) |
Get the number of items in this collection. | |
static T | DeepCopy< T > (this T obj) |
Creates a clone of this object by serializing to JSON and then deserializing it to a new object. See
for a faster, shallow copy method. | |
static void | Delete (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Requests for the server to delete the specified object from its resource collection. | |
static object | Delete (this IAPIResource obj, Type deserializeType, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Requests for the server to delete the specified object from its resource collection. | |
static T | Delete< T > (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Requests for the server to delete the specified object from its resource collection. | |
static ExceedanceProbability | exceedance_probability_blocking (this IAPIResourceView thisView, double threshold, ExceedanceProbabilityOptions options=null, PollingOptions pollingOptions=null) |
Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static List< ExceedanceProbability > | exceedance_probability_blocking (this IAPIResourceView thisView, IEnumerable< double > thresholds, ExceedanceProbabilityOptions options=null, PollingOptions pollingOptions=null) |
Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static double | expected_loss (this IAPIResourceView thisView, MetricsOptions options=null, int? timeout=null) |
Returns the Expected Loss, which is equivalent to requesting the mean value of the tail_metrics distribution with a probability of 1.0. | |
static object | Get (this IAPIResource obj, Type deserializeType, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified. | |
static O | Get< O > (this O obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified. | |
static T | Get_AsType< T > (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified. | |
static T | GetItem< T > (this APITypes.IResourceCollection< T > collection, string id, IEnumerable< Parameter > parameters=null, int? timeout=null) |
Performs a GET request for a specific resource in this collection. | |
static ICollectionResponse< T > | GetItems< T > (this APITypes.IResourceCollection< T > collection, IEnumerable< string > ids, IEnumerable< Parameter > parameters=null, int? timeout=null) |
Searches this collection for a list of resource ids and returns a collection response containing all items with an id from the list. See API.Parameters.Ids for more details. | |
static object | GetSubResource (this IAPIResource obj, Type deserializeType, string subResource, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a GET on a sub-resource of the current resource. Requires the id property to be specified. | |
static T | GetSubResource< T > (this IAPIResource obj, string subResource, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a GET on a sub-resource of the current resource. Requires the id property to be specified. | |
static ICollectionResponse< T > | List< T > (this APITypes.IResourceCollection< T > collection, long offset, long limit, IEnumerable< Parameter > parameters=null, int? timeout=null) |
Performs a GET request to list the collection at this endpoint. | |
static T | PollUntilReady< T > (this T resource, PollingOptions pollingOptions=null) |
Poll the IStoredAPIResource_WithStatus.status of a resource until it is TaskStatus.Success. Once a IStoredAPIResource_WithStatus has been created and is being processed, this method will continuously request the IStoredAPIResource_WithStatus.status of the object. Polling behaviour is based on the pollingOptions specified. Returns once the object is ready to be used (status=TaskStatus.Success). | |
static object | Post (this IAPIResource obj, Type deserializeType, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a POST on the current resource, returning the server response deserialized to a new object of the specified type. | |
static O | Post< O > (this O obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a POST on the current resource, with the expectation that the server will respond with the object that was posted. | |
static T | Post< T > (this APITypes.IResourceCollection< T > collection, T item, IEnumerable< Parameter > parameters=null, int? timeout=null) |
Performs a POST request to add a specific resource to this collection. | |
static T | Post< T > (this T obj, string csv_data, int? timeout=null, Parameters upload_parameters=null) |
POST this Resource, along with it's CSV data. | |
static T | Post_AsType< T > (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a POST on the current resource, returning the server response deserialized to a new object of the specified type. | |
static object | PostSubResource (this IAPIResource obj, Type deserializeType, string subResource, IEnumerable< Parameter > requestParameters, object data, int? timeout=null) |
POSTs some data to a sub-resource of the current resource. | |
static T | PostSubResource< T > (this IAPIResource obj, string subResource, IEnumerable< Parameter > requestParameters, object data, int? timeout=null) |
POSTs some data to a sub-resource of the current resource. | |
static object | Put (this IAPIResource obj, Type deserializeType, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a PUT on the current resource, returning the server response deserialized to a new object of the specified type. | |
static O | Put< O > (this O obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a PUT on the current resource, with the expectation that the server will respond with the updated object. | |
static T | Put_AsType< T > (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Perform a PUT on the current resource, returning the server response deserialized to a new object of the specified type. | |
static object | PutSubResource (this IAPIResource obj, Type deserializeType, string subResource, IEnumerable< Parameter > requestParameters, object data, int? timeout=null) |
Performs a PUT of some data on a sub-resource of the current resource. | |
static T | PutSubResource< T > (this IAPIResource obj, string subResource, IEnumerable< Parameter > requestParameters, object data, int? timeout=null) |
Performs a PUT of some data on a sub-resource of the current resource. | |
static O | Save< O > (this O obj, IEnumerable< Parameter > requestParameters=null, int? timeout=null) |
Calls either the POST object if the current resource is new, or PUT if the current resource already has an id. | |
static string | Serialize (this IAPIType obj, bool pretty=false, bool includeServerGeneratedProperties=true, bool includeNullProperties=false) |
Returns the JSON representation of the current object. | |
static T | ShallowCopy< T > (this T obj) |
Makes a shallow copy of this object. | |
static TailMetrics | tail_metrics_blocking (this IAPIResourceView thisView, double probability, MetricsOptions options=null, PollingOptions pollingOptions=null) |
Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static List< TailMetrics > | tail_metrics_blocking (this IAPIResourceView thisView, IEnumerable< double > probabilities, MetricsOptions options=null, PollingOptions pollingOptions=null) |
Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static IReference< T > | ToReference< T > (this T obj, bool stronglyTyped=false) |
Converts this IAPIResource object into a strongly typed reference to that object. | |
static double | tvar (this IAPIResourceView thisView, double probability, MetricsOptions options=null, int? timeout=null) |
Returns the Tail Value at Risk (TVaR), which is equivalent to requesting the mean value of the tail_metrics distribution at a given probability. | |
static double | var (this IAPIResourceView thisView, double probability, MetricsOptions options=null, int? timeout=null) |
Returns the Value at Risk (VaR), which is equivalent to requesting the minimum value of the tail_metrics distribution at a given probability. | |
static List< WindowMetrics > | window_metrics_blocking (this IAPIResourceView thisView, IEnumerable< ProbabilityWindow > ranges, MetricsOptions options=null, PollingOptions pollingOptions=null) |
Returns window metrics - but if window metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
static WindowMetrics | window_metrics_blocking (this IAPIResourceView thisView, ProbabilityWindow range, MetricsOptions options=null, PollingOptions pollingOptions=null) |
Returns window metrics - but if window metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. | |
Provides the REST request methods available to data endpoints.
Extension Methods with an inferred response type.
Adds the contained extension method to all objects implementing the IAPIResource interface.
Adds the contained extension method to all objects implementing the IAPIType interface.
Useful extension methods for IAPIResourceView classes.
Definition at line 7 of file ExtensionMethods.IAPIResource_WithDataEndpoint.cs.
|
inlinestatic |
Obsolete.
Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
thisView | The object on which to make this request. |
source_id | The id of the component loss source to back-allocate the YELT to. |
minPollInterval | Minimum time between status requests. (in seconds) (Default: No min time.) |
maxPollInterval | Maximum time between status requests. (in seconds) (Default: No max time.) |
maxPollTotalTime | Maximum polling time before raising a TimeoutException (in seconds). (Default: No timeout) |
Definition at line 77 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.
|
inlinestatic |
Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
thisView | The resource on which to perform this request. |
source_id | The id of the component loss source to back-allocate the YELT to. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
Obsolete - see IAPIResourceView.back_allocations for details.
Definition at line 185 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Changes the specified property on the object (using reflection) and then returns the modified object.
T | The type of object modified and returned. |
TProperty | The type of the property being modified. |
obj | The object (which implements AnalyzeRe.IAPIType) to modify. |
propertyExpression | An expression identifying the property to modify. |
newValue | The value to assign to the property. |
ArgumentException | An invalid property expression or replacement value was supplied. |
T | : | IAPIType |
Definition at line 117 of file ExtensionMethods.IAPIType.cs.
|
inlinestatic |
Obsolete.
Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
T | The type of the component referenced. |
thisView | The resource on which to perform this request. |
probability | The probability for which to compute co-tail-metrics. |
component | A reference to the component LayerView or PortfolioView to compute co-tail-metrics against. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
T | : | IAPIResourceView |
Definition at line 32 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.
|
inlinestatic |
Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
T | The type of the component referenced. |
thisView | The resource on which to perform this request. |
ranges | The probability ranges for which to compute co-metrics. |
component | A reference to the component LayerView or PortfolioView to compute co-metrics against. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
T | : | IAPIResourceView |
Definition at line 124 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Obsolete.
Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
T | The type of the component referenced. |
thisView | The resource on which to perform this request. |
probabilities | The probability ranges for which to compute co-tail-metrics. |
component | A reference to the component LayerView or PortfolioView to compute co-tail-metrics against. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
T | : | IAPIResourceView |
Definition at line 56 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.
|
inlinestatic |
Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
T | The type of the component referenced. |
thisView | The resource on which to perform this request. |
range | The probability range for which to compute co-metrics. |
component | A reference to the component LayerView or PortfolioView to compute co-metrics against. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
T | : | IAPIResourceView |
Definition at line 101 of file ExtensionMethods.IAPIResourceView.cs.
|
static |
Get the number of items in this collection.
collection | The collection from which to get an item. |
parameters | (Optional) Additional REST parameters to include with the GET request. |
timeout | (Optional) The timeout before the request fails. |
T | : | IAPIType | |
T | : | List | |
T | : | collection | |
T | : | parameters | |
T | : | timeout | |
T | : | meta.total_count |
|
inlinestatic |
Creates a clone of this object by serializing to JSON and then deserializing it to a new object. See
for a faster, shallow copy method.
T | The type of the object. |
obj | The object. |
Note that any properties adorned with the System.Runtime.Serialization.IgnoreDataMemberAttribute will not be serialized, and thus be instantiated in the default manner on the new object. This is by design - as a general rule, any such properties should not be considered part of the unique state of an object.
T | : | IAPIType |
Definition at line 65 of file ExtensionMethods.IAPIType.cs.
|
inlinestatic |
Requests for the server to delete the specified object from its resource collection.
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 147 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Requests for the server to delete the specified object from its resource collection.
deserializeType | The expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 286 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Requests for the server to delete the specified object from its resource collection.
T | The expected type of the request response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 133 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
thisView | The resource on which to perform this request. |
threshold | The threshold at which to calculate the exceedance probability. |
options | A set of options which can be used to change the threshold behaviour or compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
Definition at line 146 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
thisView | The resource on which to perform this request. |
thresholds | The thresholds at which to calculate the exceedance probability. |
options | A set of options which can be used to change the threshold behaviour or compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
Definition at line 166 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Returns the Expected Loss, which is equivalent to requesting the mean value of the tail_metrics distribution with a probability of 1.0.
thisView | The resource on which to perform this request. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 202 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified.
deserializeType | The expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 166 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified.
O | (Automatically Inferred) The type of the current resource, which is also the expected type of the resource request response. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
O | : | IAPIResource |
Definition at line 17 of file ExtensionMethods.Rest.InferredType.cs.
|
inlinestatic |
Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified.
T | The expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 20 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Performs a GET request for a specific resource in this collection.
collection | The collection from which to get an item. |
id | The id of the resource to retrieve. |
parameters | (Optional) Rest parameters to include with the GET request. |
timeout | (Optional) The timeout before the request fails. |
T | : | IAPIType |
Definition at line 17 of file ExtensionMethods.Rest.ICollection[T].cs.
|
inlinestatic |
Searches this collection for a list of resource ids and returns a collection response containing all items with an id from the list. See API.Parameters.Ids for more details.
collection | The collection from which to get an item. |
ids | The ids of the resources to retrieve. |
parameters | (Optional) Rest parameters to include with the collection GET request. |
timeout | (Optional) The timeout before the request fails. |
This function will automatically set the "limit" parameter to match the number of ids requested, but the server may impose a hard limit on the number of ids that can be requested at one time. See API.Parameters.Ids for more details.
T | : | IAPIType |
Definition at line 38 of file ExtensionMethods.Rest.ICollection[T].cs.
|
inlinestatic |
Perform a GET on a sub-resource of the current resource. Requires the id property to be specified.
deserializeType | The expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
subResource | The path to the sub-resource from the current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 185 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Perform a GET on a sub-resource of the current resource. Requires the id property to be specified.
T | The expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
subResource | The path to the sub-resource from the current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 38 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Performs a GET request to list the collection at this endpoint.
collection | The collection from which to get an item. |
offset | The number of results to skip before starting to return results. |
limit | The maximum number of results to return. |
parameters | (Optional) Additional REST parameters to include with the GET request. |
timeout | (Optional) The timeout before the request fails. |
T | : | IAPIType |
Definition at line 58 of file ExtensionMethods.Rest.ICollection[T].cs.
|
inlinestatic |
Poll the IStoredAPIResource_WithStatus.status of a resource until it is TaskStatus.Success. Once a IStoredAPIResource_WithStatus has been created and is being processed, this method will continuously request the IStoredAPIResource_WithStatus.status of the object. Polling behaviour is based on the pollingOptions specified. Returns once the object is ready to be used (status=TaskStatus.Success).
resource | The resource to monitor. After invoking this function, this resource's IStoredAPIResource_WithStatus.status and IStoredAPIResource_WithStatus.status_message properties will be updated to reflect the last polled status of the resource. |
pollingOptions | Controls the polling behaviour. |
APIRequestException | If the final status is not "Success" |
NotWaitingException | If the pollingOptions PollingOptions.MaxPollTotalTime is exceeded. |
Some resources have Attributes.ServerGenerated attributes that only appear once processing is complete. For performance reason, this helper will only poll the "status" and "status_message" properties, and update these on the resource. If you wish to get an updated version of the entire resource, you should re-retrieve (Get) the resource following processing. Some examples where this is necessary include:
T | : | IStoredAPIResource_WithStatus |
Definition at line 56 of file ExtensionMethods.IStoredAPIResource_WithStatus.cs.
|
inlinestatic |
Perform a POST on the current resource, returning the server response deserialized to a new object of the specified type.
deserializeType | The expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 205 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Perform a POST on the current resource, with the expectation that the server will respond with the object that was posted.
O | (Automatically Inferred) The type of the current resource, which is also the expected type of the resource request response. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
O | : | IAPIResource |
Definition at line 30 of file ExtensionMethods.Rest.InferredType.cs.
|
inlinestatic |
Performs a POST request to add a specific resource to this collection.
collection | The collection from which to get an item. |
item | The item to post to this collection. |
parameters | (Optional) Rest parameters to include with the GET request. |
timeout | (Optional) The timeout before the request fails. |
T | : | IAPIType |
Definition at line 85 of file ExtensionMethods.Rest.ICollection[T].cs.
|
inlinestatic |
POST this Resource, along with it's CSV data.
obj | The endpoint on which to make this request. |
csv_data | The csv_data to attach to this resource. |
timeout | Optional - The desired POST request timeout (in milliseconds). |
upload_parameters | (Optional) The upload parameters to use. |
T | : | IAPIResource_WithDataEndpoint |
Definition at line 15 of file ExtensionMethods.IAPIResource_WithDataEndpoint.cs.
|
inlinestatic |
Perform a POST on the current resource, returning the server response deserialized to a new object of the specified type.
T | The expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 56 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
POSTs some data to a sub-resource of the current resource.
deserializeType | The expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request. |
obj | The resource whose subResource we are navigating to. |
subResource | The path to the sub-resource from the current resource. |
requestParameters | Additional parameters to include in the request. |
data | The data to POST to the specified sub-resource. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 225 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
POSTs some data to a sub-resource of the current resource.
T | The expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request. |
obj | The resource whose subResource we are navigating to. |
subResource | The path to the sub-resource from the current resource. |
requestParameters | Additional parameters to include in the request. |
data | The data to POST to the specified sub-resource. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 75 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Perform a PUT on the current resource, returning the server response deserialized to a new object of the specified type.
deserializeType | The expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 246 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Perform a PUT on the current resource, with the expectation that the server will respond with the updated object.
O | (Automatically Inferred) The type of the current resource, which is also the expected type of the resource request response. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
O | : | IAPIResource |
Definition at line 43 of file ExtensionMethods.Rest.InferredType.cs.
|
inlinestatic |
Perform a PUT on the current resource, returning the server response deserialized to a new object of the specified type.
T | The expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 95 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Performs a PUT of some data on a sub-resource of the current resource.
deserializeType | The expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request. |
obj | The resource whose subResource we are navigating to. |
subResource | The path to the sub-resource from the current resource. |
requestParameters | Additional parameters to include in the request. |
data | The data to PUT to the specified sub-resource. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 266 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Performs a PUT of some data on a sub-resource of the current resource.
T | The expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request. |
obj | The resource whose subResource we are navigating to. |
subResource | The path to the sub-resource from the current resource. |
requestParameters | Additional parameters to include in the request. |
data | The data to PUT to the specified sub-resource. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 114 of file ExtensionMethods.Rest.cs.
|
inlinestatic |
Calls either the POST object if the current resource is new, or PUT if the current resource already has an id.
O | (Automatically Inferred) The type of the current resource, which is also the expected type of the resource request response. |
obj | The current resource. |
requestParameters | Optional - Additional parameters to include in the request. |
timeout | Optional - The desired request timeout (in milliseconds). |
O | : | IAPIResource |
Definition at line 56 of file ExtensionMethods.Rest.InferredType.cs.
|
inlinestatic |
Returns the JSON representation of the current object.
obj | The Analyze Re class instance to serialize. |
pretty | Whether to use line breaks and indentation in the JSON representation (e.g. more human readable). |
includeServerGeneratedProperties | Optional (default true) Can be set to false to exclude Attributes.ServerGenerated properties (like IAPIResource.id) from the resulting JSON. Server generated properties may be part of the state of an object, but their values are ignored by the server on POST/PUT because they are managed entirely by the server. |
includeNullProperties | Optional (default false). Can be set to true to include serializable properties whose value is set to null (normally excluded from JSON). In most cases, the server treats a null property the same as an omitted property, but this is not guaranteed. |
Definition at line 88 of file ExtensionMethods.IAPIType.cs.
|
inlinestatic |
Makes a shallow copy of this object.
T | The type of the object. |
obj | The object. |
As with all shallow copies, beware that modifying any class properties or collections on the copy will also affect the original objects. If modifying the copy (e.g. changing its IAPIResource.id), beware of members such as APITypes.SubResourceEndpoints which would still reference the original object instance, and thus the original id. See
for a safer (but slower) alternative.
T | : | IAPIType |
Definition at line 49 of file ExtensionMethods.IAPIType.cs.
|
inlinestatic |
Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
thisView | The resource on which to perform this request. |
probability | The probability at which to compute tail metrics. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
Definition at line 25 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
thisView | The resource on which to perform this request. |
probabilities | The probabilities at which to compute tail metrics. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
Definition at line 43 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Converts this IAPIResource object into a strongly typed reference to that object.
T | The type of the IAPIResource object. |
obj | The IAPIResource object. |
stronglyTyped | (Default True) Whether to ensure that the created reference type is the run-time type of the object (more expensive). If set to false, the reference type will simply be of the type T. |
T | : | IAPIResource |
Definition at line 19 of file ExtensionMethods.Reference.cs.
|
inlinestatic |
Returns the Tail Value at Risk (TVaR), which is equivalent to requesting the mean value of the tail_metrics distribution at a given probability.
Returns only the mean value of the tail_metrics at the specified probability.
thisView | The resource on which to perform this request. |
probability | The probability (1 / return_period) at which to calculate the tail_metrics. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 217 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Returns the Value at Risk (VaR), which is equivalent to requesting the minimum value of the tail_metrics distribution at a given probability.
thisView | The resource on which to perform this request. |
probability | The probability (1 / return_period) at which to calculate the tail_metrics. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
timeout | Optional - The desired request timeout (in milliseconds). |
Definition at line 232 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Returns window metrics - but if window metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
thisView | The resource on which to perform this request. |
ranges | The probability ranges for which to compute window metrics. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
Definition at line 80 of file ExtensionMethods.IAPIResourceView.cs.
|
inlinestatic |
Returns window metrics - but if window metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.
thisView | The resource on which to perform this request. |
range | The probability range for which to compute window metrics. |
options | A set of options which can be used to compute metrics net of various filters, loss perspectives, etc. |
pollingOptions | Determines the behaviour of the API when automatically retrying the request if the result is not yet available. |
Definition at line 62 of file ExtensionMethods.IAPIResourceView.cs.