Skip to content

Commit 40560bf

Browse files
authored
Updated RunbookRetentionPeriod to support RetentionUnit (#937)
Introduces the Unit property as an enum to the RunbookRetentionPeriod model in Octopus.Client to match the server's contract.
1 parent 9a66ee0 commit 40560bf

4 files changed

+34
-6
lines changed

source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETCore.approved.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5085,6 +5085,15 @@ Octopus.Client.Model
50855085
.ctor()
50865086
Int32 QuantityToKeep { get; set; }
50875087
Boolean ShouldKeepForever { get; set; }
5088+
Octopus.Client.Model.RunbookRetentionUnit Unit { get; set; }
5089+
}
5090+
class RunbookRetentionUnit
5091+
IComparable
5092+
Octopus.TinyTypes.CaseInsensitiveStringTinyType
5093+
{
5094+
.ctor(String)
5095+
static Octopus.Client.Model.RunbookRetentionUnit Days { get; }
5096+
static Octopus.Client.Model.RunbookRetentionUnit Items { get; }
50885097
}
50895098
abstract class RunbookRun
50905099
{

source/Octopus.Client.Tests/PublicSurfaceAreaFixture.ThePublicSurfaceAreaShouldNotRegress..NETFramework.approved.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5103,6 +5103,15 @@ Octopus.Client.Model
51035103
.ctor()
51045104
Int32 QuantityToKeep { get; set; }
51055105
Boolean ShouldKeepForever { get; set; }
5106+
Octopus.Client.Model.RunbookRetentionUnit Unit { get; set; }
5107+
}
5108+
class RunbookRetentionUnit
5109+
IComparable
5110+
Octopus.TinyTypes.CaseInsensitiveStringTinyType
5111+
{
5112+
.ctor(String)
5113+
static Octopus.Client.Model.RunbookRetentionUnit Days { get; }
5114+
static Octopus.Client.Model.RunbookRetentionUnit Items { get; }
51065115
}
51075116
abstract class RunbookRun
51085117
{
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
namespace Octopus.Client.Model
1+
namespace Octopus.Client.Model;
2+
3+
public class RunbookRetentionPeriod
24
{
3-
public class RunbookRetentionPeriod
4-
{
5-
public int QuantityToKeep { get; set; }
5+
public int QuantityToKeep { get; set; }
6+
7+
public bool ShouldKeepForever { get; set; }
68

7-
public bool ShouldKeepForever { get; set; }
8-
}
9+
public RunbookRetentionUnit Unit { get; set; } = RunbookRetentionUnit.Items;
910
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using Octopus.TinyTypes;
2+
3+
namespace Octopus.Client.Model;
4+
5+
public class RunbookRetentionUnit(string value) : CaseInsensitiveStringTinyType(value)
6+
{
7+
public static RunbookRetentionUnit Days => new("Days");
8+
public static RunbookRetentionUnit Items => new("Items");
9+
}

0 commit comments

Comments
 (0)