/
ScheduleOptions.cs
53 lines (47 loc) · 1.69 KB
/
ScheduleOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
using Temporalio.Common;
namespace Temporalio.Client.Schedules
{
/// <summary>
/// Options for creating a schedule.
/// </summary>
public class ScheduleOptions : ICloneable
{
/// <summary>
/// Gets or sets a value indicating whether the schedule will be triggered immediately upon
/// create.
/// </summary>
public bool TriggerImmediately { get; set; }
/// <summary>
/// Gets or sets the time periods to take actions on as if that time passed right now.
/// </summary>
public IReadOnlyCollection<ScheduleBackfill> Backfills { get; set; } =
Array.Empty<ScheduleBackfill>();
/// <summary>
/// Gets or sets the memo for the schedule. Values for the memo cannot be null.
/// </summary>
public IReadOnlyDictionary<string, object>? Memo { get; set; }
/// <summary>
/// Gets or sets the search attributes for the schedule.
/// </summary>
public SearchAttributeCollection? TypedSearchAttributes { get; set; }
/// <summary>
/// Gets or sets RPC options for creating the schedule.
/// </summary>
public RpcOptions? Rpc { get; set; }
/// <summary>
/// Create a shallow copy of these options.
/// </summary>
/// <returns>A shallow copy of these options and any transitive options fields.</returns>
public virtual object Clone()
{
var copy = (WorkflowOptions)MemberwiseClone();
if (Rpc != null)
{
copy.Rpc = (RpcOptions)Rpc.Clone();
}
return copy;
}
}
}