File tree Expand file tree Collapse file tree 3 files changed +50
-3
lines changed
src/ServerlessWorkflow.Sdk Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ namespace ServerlessWorkflow.Sdk.Models
2929 public class ScheduleDefinition
3030 {
3131
32+ /// <summary>
33+ /// Gets the <see cref="ScheduleDefinition"/>'s type
34+ /// </summary>
35+ [ Newtonsoft . Json . JsonIgnore ]
36+ [ System . Text . Json . Serialization . JsonIgnore ]
37+ [ YamlIgnore ]
38+ public virtual ScheduleDefinitionType Type => this . Cron == null ? ScheduleDefinitionType . Interval : ScheduleDefinitionType . Cron ;
39+
3240 /// <summary>
3341 /// Gets/sets the time interval (ISO 8601 format) describing when workflow instances can be created.
3442 /// </summary>
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021-Present The Serverless Workflow Specification Authors
3+ * <p>
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ * <p>
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ * <p>
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ *
16+ */
17+
18+ namespace ServerlessWorkflow . Sdk
19+ {
20+ /// <summary>
21+ /// Enumerates all types of schedule definitions
22+ /// </summary>
23+ [ Newtonsoft . Json . JsonConverter ( typeof ( Newtonsoft . Json . Converters . StringEnumConverter ) ) ]
24+ [ System . Text . Json . Serialization . JsonConverter ( typeof ( System . Text . Json . Serialization . StringEnumConverterFactory ) ) ]
25+ public enum ScheduleDefinitionType
26+ {
27+ /// <summary>
28+ /// Indicates the definition of a CRON expression based schedule
29+ /// </summary>
30+ [ EnumMember ( Value = "cron" ) ]
31+ Cron = 1 ,
32+ /// <summary>
33+ /// Indicates the definition of an interval based schedule
34+ /// </summary>
35+ [ EnumMember ( Value = "interval" ) ]
36+ Interval = 2
37+ }
38+
39+ }
Original file line number Diff line number Diff line change 44 <TargetFramework >net6.0</TargetFramework >
55 <Nullable >enable</Nullable >
66 <NeutralLanguage >en</NeutralLanguage >
7- <AssemblyVersion >0.8.3 </AssemblyVersion >
8- <FileVersion >0.8.3 </FileVersion >
9- <Version >0.8.3 </Version >
7+ <AssemblyVersion >0.8.4 </AssemblyVersion >
8+ <FileVersion >0.8.4 </FileVersion >
9+ <Version >0.8.4 </Version >
1010 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
1111 <PackageRequireLicenseAcceptance >true</PackageRequireLicenseAcceptance >
1212 <PackageLicenseFile >LICENSE</PackageLicenseFile >
You can’t perform that action at this time.
0 commit comments