| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Collections.Generic; |
| | 10 | | using System.Linq; |
| | 11 | |
|
| | 12 | | namespace Azure.ResourceManager.Compute.Models |
| | 13 | | { |
| | 14 | | /// <summary> Describes the properties of a Run Command. </summary> |
| | 15 | | public partial class RunCommandDocument : RunCommandDocumentBase |
| | 16 | | { |
| | 17 | | /// <summary> Initializes a new instance of RunCommandDocument. </summary> |
| | 18 | | /// <param name="schema"> The VM run command schema. </param> |
| | 19 | | /// <param name="id"> The VM run command id. </param> |
| | 20 | | /// <param name="osType"> The Operating System type. </param> |
| | 21 | | /// <param name="label"> The VM run command label. </param> |
| | 22 | | /// <param name="description"> The VM run command description. </param> |
| | 23 | | /// <param name="script"> The script to be executed. </param> |
| 0 | 24 | | internal RunCommandDocument(string schema, string id, OperatingSystemTypes osType, string label, string descript |
| | 25 | | { |
| 0 | 26 | | if (schema == null) |
| | 27 | | { |
| 0 | 28 | | throw new ArgumentNullException(nameof(schema)); |
| | 29 | | } |
| 0 | 30 | | if (id == null) |
| | 31 | | { |
| 0 | 32 | | throw new ArgumentNullException(nameof(id)); |
| | 33 | | } |
| 0 | 34 | | if (label == null) |
| | 35 | | { |
| 0 | 36 | | throw new ArgumentNullException(nameof(label)); |
| | 37 | | } |
| 0 | 38 | | if (description == null) |
| | 39 | | { |
| 0 | 40 | | throw new ArgumentNullException(nameof(description)); |
| | 41 | | } |
| 0 | 42 | | if (script == null) |
| | 43 | | { |
| 0 | 44 | | throw new ArgumentNullException(nameof(script)); |
| | 45 | | } |
| | 46 | |
|
| 0 | 47 | | Script = script.ToArray(); |
| 0 | 48 | | } |
| | 49 | |
|
| | 50 | | /// <summary> Initializes a new instance of RunCommandDocument. </summary> |
| | 51 | | /// <param name="schema"> The VM run command schema. </param> |
| | 52 | | /// <param name="id"> The VM run command id. </param> |
| | 53 | | /// <param name="osType"> The Operating System type. </param> |
| | 54 | | /// <param name="label"> The VM run command label. </param> |
| | 55 | | /// <param name="description"> The VM run command description. </param> |
| | 56 | | /// <param name="script"> The script to be executed. </param> |
| | 57 | | /// <param name="parameters"> The parameters used by the script. </param> |
| 4 | 58 | | internal RunCommandDocument(string schema, string id, OperatingSystemTypes osType, string label, string descript |
| | 59 | | { |
| 4 | 60 | | if (schema == null) |
| | 61 | | { |
| 0 | 62 | | throw new ArgumentNullException(nameof(schema)); |
| | 63 | | } |
| 4 | 64 | | if (id == null) |
| | 65 | | { |
| 0 | 66 | | throw new ArgumentNullException(nameof(id)); |
| | 67 | | } |
| 4 | 68 | | if (label == null) |
| | 69 | | { |
| 0 | 70 | | throw new ArgumentNullException(nameof(label)); |
| | 71 | | } |
| 4 | 72 | | if (description == null) |
| | 73 | | { |
| 0 | 74 | | throw new ArgumentNullException(nameof(description)); |
| | 75 | | } |
| | 76 | |
|
| 4 | 77 | | Script = script ?? new List<string>(); |
| 4 | 78 | | Parameters = parameters; |
| 4 | 79 | | } |
| | 80 | |
|
| | 81 | | /// <summary> The script to be executed. </summary> |
| 8 | 82 | | public IReadOnlyList<string> Script { get; } |
| | 83 | | /// <summary> The parameters used by the script. </summary> |
| 8 | 84 | | public IReadOnlyList<RunCommandParameterDefinition> Parameters { get; } |
| | 85 | | } |
| | 86 | | } |