internal static string ToSerializedValue(this ComputeNodeFillType value)
        {
            switch (value)
            {
            case ComputeNodeFillType.Spread:
                return("spread");

            case ComputeNodeFillType.Pack:
                return("pack");
            }
            return(null);
        }
        internal static TaskSchedulingPolicy DeserializeTaskSchedulingPolicy(JsonElement element)
        {
            ComputeNodeFillType nodeFillType = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("nodeFillType"))
                {
                    nodeFillType = property.Value.GetString().ToComputeNodeFillType();
                    continue;
                }
            }
            return(new TaskSchedulingPolicy(nodeFillType));
        }
 public TaskSchedulingPolicy(ComputeNodeFillType nodeFillType)
 {
     NodeFillType = nodeFillType;
 }
 /// <summary>
 /// Initializes a new instance of the TaskSchedulingPolicy class.
 /// </summary>
 /// <param name="nodeFillType">How Tasks are distributed across Compute
 /// Nodes in a Pool.</param>
 public TaskSchedulingPolicy(ComputeNodeFillType nodeFillType)
 {
     NodeFillType = nodeFillType;
     CustomInit();
 }
 public static string ToSerialString(this ComputeNodeFillType value) => value switch
 {