Class Snapshot
The representation of an instant snapshot with its status
Inherited Members
Namespace: QarnotSDK.Sdk
Assembly: QarnotSDK.dll
Syntax
[Serializable]
public class Snapshot
Fields
_api
Reference to the api connection.
Declaration
protected Connection _api
Field Value
| Type | Description |
|---|---|
| Connection |
_uri
The task resource uri.
Declaration
protected string _uri
Field Value
| Type | Description |
|---|---|
| string |
Properties
Connection
The inner Connection object.
Declaration
public virtual Connection Connection { get; }
Property Value
| Type | Description |
|---|---|
| Connection |
Id
The snapshot Id. Construct like : snap_{task_uuid}{date}{4_random_chars}
Declaration
public string Id { get; }
Property Value
| Type | Description |
|---|---|
| string |
Examples
snap_52c10b2d-0687-41e1-985e-7279f6dd543a_20251228234559
LastUpdateDate
Last update time.
Null : the snapshot information has never been updated.
Declaration
public DateTime? LastUpdateDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
SizeToUpload
Total count of bytes to upload.
Null : the snapshot information has never been updated.
Declaration
public long? SizeToUpload { get; }
Property Value
| Type | Description |
|---|---|
| long? |
Examples
100
SnapshotConfig
Snapshot configuration Include whitelist and blacklist filter, with outside bucket setup.
Declaration
public SnapshotConfiguration SnapshotConfig { get; }
Property Value
| Type | Description |
|---|---|
| SnapshotConfiguration |
Status
Status of the snapshot.
Declaration
public SnapshotStatus Status { get; }
Property Value
| Type | Description |
|---|---|
| SnapshotStatus |
Examples
InProgress
TaskUuid
The task uuid corresponding to this snapshot.
Declaration
public Guid TaskUuid { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Examples
52c10b2d-0687-41e1-985e-7279f6dd543a
TransferredSize
Current count of bytes already uploaded.
Null : the snapshot information has never been updated.
Declaration
public long? TransferredSize { get; }
Property Value
| Type | Description |
|---|---|
| long? |
Examples
50
TriggerDate
The date when this snapshot has been triggered.
Declaration
public DateTime TriggerDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Methods
IsCompleted()
Whether the snapshot is completed
Declaration
public bool IsCompleted()
Returns
| Type | Description |
|---|---|
| bool |
ToString()
Override of the string representation of the Snapshot
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
WaitCompletionAsync(int, int, CancellationToken)
Wait for snasphot completion.
Declaration
public virtual Task<bool> WaitCompletionAsync(int timeoutSeconds = -1, int updateIntervalSeconds = 10, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | timeoutSeconds | Optional maximum number of second to wait for completion. |
| int | updateIntervalSeconds | Optional time in second between two updates. Defualt is 10s. |
| CancellationToken | ct | Optional token to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task<bool> | true if the snapshot is completed |