-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
CommandProperties.cs
44 lines (38 loc) · 2.07 KB
/
CommandProperties.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System.Collections.Generic;
using Azure.Core;
namespace Azure.ResourceManager.DataMigration.Models
{
/// <summary>
/// Base class for all types of DMS command properties. If command is not supported by current client, this object is returned.
/// Please note <see cref="CommandProperties"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="MigrateMISyncCompleteCommandProperties"/>, <see cref="MigrateSyncCompleteCommandProperties"/>, <see cref="MongoDBCancelCommand"/>, <see cref="MongoDBFinishCommand"/> and <see cref="MongoDBRestartCommand"/>.
/// </summary>
public abstract partial class CommandProperties
{
/// <summary> Initializes a new instance of CommandProperties. </summary>
protected CommandProperties()
{
Errors = new ChangeTrackingList<ODataError>();
}
/// <summary> Initializes a new instance of CommandProperties. </summary>
/// <param name="commandType"> Command type. </param>
/// <param name="errors"> Array of errors. This is ignored if submitted. </param>
/// <param name="state"> The state of the command. This is ignored if submitted. </param>
internal CommandProperties(CommandType commandType, IReadOnlyList<ODataError> errors, CommandState? state)
{
CommandType = commandType;
Errors = errors;
State = state;
}
/// <summary> Command type. </summary>
internal CommandType CommandType { get; set; }
/// <summary> Array of errors. This is ignored if submitted. </summary>
public IReadOnlyList<ODataError> Errors { get; }
/// <summary> The state of the command. This is ignored if submitted. </summary>
public CommandState? State { get; }
}
}