Class ImportFileOperation
Long-running operation for importing a file to a FileSearchStore.
public record ImportFileOperation : IEquatable<ImportFileOperation>
- Inheritance
-
ImportFileOperation
- Implements
- Inherited Members
Properties
Done
If the value is false, it means the operation is still in progress. If true, the
operation is completed, and either error or response is available.
[JsonPropertyName("done")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Done { get; set; }
Property Value
- bool?
Error
The error result of the operation in case of failure or cancellation.
[JsonPropertyName("error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, object>? Error { get; set; }
Property Value
Metadata
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
[JsonPropertyName("metadata")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, object>? Metadata { get; set; }
Property Value
Name
The server-assigned name, which is only unique within the same service that originally
returns it. If you use the default HTTP mapping, the name should be a resource name ending
with operations/{unique_id}.
[JsonPropertyName("name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Name { get; set; }
Property Value
Response
The result of the ImportFile operation, available when the operation is done.
[JsonPropertyName("response")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ImportFileResponse? Response { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a ImportFileOperation object.
public static ImportFileOperation? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- ImportFileOperation
The deserialized ImportFileOperation object, or null if deserialization fails.