C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
Parameters.cs
Go to the documentation of this file.
1using System;
2
4{
6 public class Parameters
7 {
14 // By default, give up after 1 hour.
15 maxPollTotalTime: 1000 * 60 * 60);
16
18 public static Parameters Default => new Parameters();
19
20 #region Configurable Fields
27 public int min_chunk_size { get; set; } = 4 * 1024 * 1024; // 2^22 (4 MiB)
28
33 public int max_chunk_size { get; set; } = 16 * 1024 * 1024; // 2^24 (16 MiB)
34
37 public int max_retries_per_chunk { get; set; } = 3;
38
41 public int chunk_timeout { get; set; } = 1000 * 60;
42
48
53
59 public bool enable_compression { get; set; }
60
61 #region Legacy Binary YELT Conversion Support
64 [Obsolete("The binary YELT format and related options will be deprecated in the near future." +
65 "We encourage you to upload your YELT data as human-readable CSV.")]
75
80 [Obsolete("The binary YELT format and related options will be deprecated in the near future." +
81 "We encourage you to upload your YELT data as human-readable CSV.")]
83 BinaryYELTUploadOptions.AutomaticBinaryConversionAndCompression;
84 #endregion Legacy Binary YELT Conversion Support
85 #endregion Configurable Fields
86
87 #region Constructor
89 public Parameters() { }
90
111 int? min_chunk_size = null,
112 int? max_chunk_size = null,
113 int? max_retries_per_chunk = null,
114 int? chunk_timeout = null,
117 bool? enable_compression = null)
118 {
119 if (min_chunk_size.HasValue)
120 this.min_chunk_size = min_chunk_size.Value;
121 if (max_chunk_size.HasValue)
122 this.max_chunk_size = max_chunk_size.Value;
123 if (chunk_timeout.HasValue)
124 this.chunk_timeout = chunk_timeout.Value;
125 if (max_retries_per_chunk.HasValue)
126 this.max_retries_per_chunk = max_retries_per_chunk.Value;
127 if (commit_polling_options != null)
128 this.commit_polling_options = commit_polling_options;
130 this.handle_existing_upload_strategy = handle_existing_upload_strategy.Value;
131 if (enable_compression.HasValue)
132 this.enable_compression = enable_compression.Value;
133 }
134 #endregion Constructor
135 }
136}
Parameters to be used in a Large Data Upload operation.
Definition Parameters.cs:7
PollingOptions commit_polling_options
Determines how the system polls the status of the data file while waiting for the data to be processe...
Definition Parameters.cs:47
int chunk_timeout
The timeout (in milliseconds) for a single chunk upload to complete. Default: 60,000 ms (1 minute).
Definition Parameters.cs:41
HandleUploadInSessionStrategy handle_existing_upload_strategy
The HandleUploadInSessionStrategy to employ of an existing upload session is already in progress....
Definition Parameters.cs:51
Parameters(int? min_chunk_size=null, int? max_chunk_size=null, int? max_retries_per_chunk=null, int? chunk_timeout=null, PollingOptions commit_polling_options=null, HandleUploadInSessionStrategy? handle_existing_upload_strategy=null, bool? enable_compression=null)
Construct a new set of Large Data Upload Parameters.
static PollingOptions DefaultCommitPollingOptions
The default PollingOptions used when none are specified in a AnalyzeRe.LargeDataUpload....
Definition Parameters.cs:12
BinaryYELTUploadOptions
Options for controlling whether to automatically convert a binary YELTLossSet's data to the binary fo...
Definition Parameters.cs:67
@ None
Gzipped Binary YELT data was provided and the data should not be modified further.
@ AutomaticCompressionOnly
Binary YELT data was provided, but Gzip compression should be done automatically.
@ AutomaticBinaryConversionAndCompression
CSV YELT data was provided and should be converted automatically.
bool enable_compression
Whether to compress (gzip) the data during upload. (Default: False) Set to true if the files you're u...
Definition Parameters.cs:59
static Parameters Default
Get a new set of Default Large Data Upload Parameters.
Definition Parameters.cs:18
Parameters()
Construct a new set of Default Large Data Upload Parameters.
Definition Parameters.cs:89
int max_chunk_size
The maximum size of a single uploaded chunk in bytes. Default: 2^24 bytes (16 Megabytes).
Definition Parameters.cs:33
int min_chunk_size
The minimum size of a single uploaded chunk in bytes. Set this larger if there is enough latency betw...
Definition Parameters.cs:27
BinaryYELTUploadOptions binary_yelt_options
Options for controlling whether to automatically convert a binary YELTLossSet's data to the binary fo...
Definition Parameters.cs:82
int max_retries_per_chunk
The maximum number of retries for a failed chunk upload before an error is thrown....
Definition Parameters.cs:37
Determines the behaviour of the API when automatically retrying a request whose result is not yet rea...
HandleUploadInSessionStrategy
Behaviour to use if an existing upload is already in progress for an endpoint.