mirror of
https://github.com/actions/runner.git
synced 2025-12-18 00:07:08 +00:00
GitHub Actions Runner
This commit is contained in:
44
src/Sdk/DTWebApi/WebApi/VariableValue.cs
Normal file
44
src/Sdk/DTWebApi/WebApi/VariableValue.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
[KnownType(typeof(AzureKeyVaultVariableValue))]
|
||||
public class VariableValue
|
||||
{
|
||||
public VariableValue()
|
||||
{
|
||||
}
|
||||
|
||||
public VariableValue(VariableValue value)
|
||||
: this(value.Value, value.IsSecret)
|
||||
{
|
||||
}
|
||||
|
||||
public VariableValue(String value, Boolean isSecret)
|
||||
{
|
||||
Value = value;
|
||||
IsSecret = isSecret;
|
||||
}
|
||||
|
||||
[DataMember(EmitDefaultValue = true)]
|
||||
public String Value
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public Boolean IsSecret
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public static implicit operator VariableValue(String value)
|
||||
{
|
||||
return new VariableValue(value, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user