Skip to content

Commit

Permalink
Merge pull request #278 from OctopusDeploy/prompted-vars-control-type
Browse files Browse the repository at this point in the history
Prompted Variable Control Types
  • Loading branch information
michaelnoonan authored Jun 6, 2018
2 parents 93a3641 + 0dbe452 commit 4c120a3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3362,6 +3362,7 @@ Octopus.Client.Model
{
.ctor()
String Description { get; set; }
IDictionary<String, String> DisplaySettings { get; set; }
String Label { get; set; }
Boolean Required { get; set; }
Octopus.Client.Model.VariablePromptOptions Clone()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3840,6 +3840,7 @@ Octopus.Client.Model
{
.ctor()
String Description { get; set; }
IDictionary<String, String> DisplaySettings { get; set; }
String Label { get; set; }
Boolean Required { get; set; }
Octopus.Client.Model.VariablePromptOptions Clone()
Expand Down
16 changes: 15 additions & 1 deletion source/Octopus.Client/Model/VariablePromptOptions.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
using System;
using System.Collections.Generic;

namespace Octopus.Client.Model
{
public class VariablePromptOptions
{
public VariablePromptOptions()
{
DisplaySettings = new Dictionary<string, string>();
}

public string Label { get; set; }
public string Description { get; set; }
public bool Required { get; set; }

/// <summary>
/// Display options for the prompted-variable input UI.
/// Use key "Octopus.ControlType" to set the control-type <see cref="Octopus.Client.Model.ControlType"/>
/// Use key "Octopus.SelectOptions" to add select-options when control-type == "Select".
/// </summary>
public IDictionary<string, string> DisplaySettings { get; set; }

public VariablePromptOptions Clone()
{
return new VariablePromptOptions
{
Label = Label,
Description = Description,
Required = Required
Required = Required,
DisplaySettings = DisplaySettings
};
}
}
Expand Down

0 comments on commit 4c120a3

Please sign in to comment.