| | 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 | |
|
| | 10 | | namespace Azure.ResourceManager.Compute.Models |
| | 11 | | { |
| | 12 | | /// <summary> Describes Compute Resource Usage. </summary> |
| | 13 | | public partial class Usage |
| | 14 | | { |
| | 15 | | /// <summary> Initializes a new instance of Usage. </summary> |
| | 16 | | /// <param name="currentValue"> The current usage of the resource. </param> |
| | 17 | | /// <param name="limit"> The maximum permitted usage of the resource. </param> |
| | 18 | | /// <param name="name"> The name of the type of usage. </param> |
| 0 | 19 | | internal Usage(int currentValue, long limit, UsageName name) |
| | 20 | | { |
| 0 | 21 | | if (name == null) |
| | 22 | | { |
| 0 | 23 | | throw new ArgumentNullException(nameof(name)); |
| | 24 | | } |
| | 25 | |
|
| 0 | 26 | | Unit = "Count"; |
| 0 | 27 | | CurrentValue = currentValue; |
| 0 | 28 | | Limit = limit; |
| 0 | 29 | | Name = name; |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> Initializes a new instance of Usage. </summary> |
| | 33 | | /// <param name="unit"> An enum describing the unit of usage measurement. </param> |
| | 34 | | /// <param name="currentValue"> The current usage of the resource. </param> |
| | 35 | | /// <param name="limit"> The maximum permitted usage of the resource. </param> |
| | 36 | | /// <param name="name"> The name of the type of usage. </param> |
| 288 | 37 | | internal Usage(string unit, int currentValue, long limit, UsageName name) |
| | 38 | | { |
| 288 | 39 | | Unit = unit; |
| 288 | 40 | | CurrentValue = currentValue; |
| 288 | 41 | | Limit = limit; |
| 288 | 42 | | Name = name; |
| 288 | 43 | | } |
| | 44 | |
|
| | 45 | | /// <summary> An enum describing the unit of usage measurement. </summary> |
| 0 | 46 | | public string Unit { get; } |
| | 47 | | /// <summary> The current usage of the resource. </summary> |
| 0 | 48 | | public int CurrentValue { get; } |
| | 49 | | /// <summary> The maximum permitted usage of the resource. </summary> |
| 0 | 50 | | public long Limit { get; } |
| | 51 | | /// <summary> The name of the type of usage. </summary> |
| 576 | 52 | | public UsageName Name { get; } |
| | 53 | | } |
| | 54 | | } |