-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[New] Human Task Resource API (#105)
* Human task APIs --------- Co-authored-by: Katari.Manikanta <Katari.manikanta@dynamic-wilreless.com>
- Loading branch information
1 parent
0278918
commit d214c4b
Showing
17 changed files
with
5,476 additions
and
153 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Conductor.Client | ||
{ | ||
/// <summary> | ||
/// Global level constant variables | ||
/// </summary> | ||
public static class Constants | ||
{ | ||
public const string KEY_ID = "<REPLACE_WITH_KEY_ID>"; | ||
public const string KEY_SECRET = "<REPLACE_WITH_KEY_SECRET>"; | ||
public const string OWNER_EMAIL = "<REPLACE_WITH_OWNER_EMAIL>"; | ||
public const int REST_CLIENT_REQUEST_TIME_OUT = 20000; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace Conductor.Client.Models | ||
{ | ||
/// <summary> | ||
/// HumanTaskAssignment | ||
/// </summary> | ||
[DataContract] | ||
public partial class HumanTaskAssignment : IEquatable<HumanTaskAssignment>, IValidatableObject | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="HumanTaskAssignment" /> class. | ||
/// </summary> | ||
/// <param name="assignee">assignee.</param> | ||
/// <param name="slaMinutes">slaMinutes.</param> | ||
public HumanTaskAssignment(HumanTaskUser assignee = default(HumanTaskUser), long? slaMinutes = default(long?)) | ||
{ | ||
this.Assignee = assignee; | ||
this.SlaMinutes = slaMinutes; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets Assignee | ||
/// </summary> | ||
[DataMember(Name = "assignee", EmitDefaultValue = false)] | ||
public HumanTaskUser Assignee { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets SlaMinutes | ||
/// </summary> | ||
[DataMember(Name = "slaMinutes", EmitDefaultValue = false)] | ||
public long? SlaMinutes { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
sb.Append("class HumanTaskAssignment {\n"); | ||
sb.Append(" Assignee: ").Append(Assignee).Append("\n"); | ||
sb.Append(" SlaMinutes: ").Append(SlaMinutes).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="input">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object input) | ||
{ | ||
return this.Equals(input as HumanTaskAssignment); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if HumanTaskAssignment instances are equal | ||
/// </summary> | ||
/// <param name="input">Instance of HumanTaskAssignment to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public bool Equals(HumanTaskAssignment input) | ||
{ | ||
if (input == null) | ||
return false; | ||
|
||
return | ||
( | ||
this.Assignee == input.Assignee || | ||
(this.Assignee != null && | ||
this.Assignee.Equals(input.Assignee)) | ||
) && | ||
( | ||
this.SlaMinutes == input.SlaMinutes || | ||
(this.SlaMinutes != null && | ||
this.SlaMinutes.Equals(input.SlaMinutes)) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (this.Assignee != null) | ||
hashCode = hashCode * 59 + this.Assignee.GetHashCode(); | ||
if (this.SlaMinutes != null) | ||
hashCode = hashCode * 59 + this.SlaMinutes.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// To validate all properties of the instance | ||
/// </summary> | ||
/// <param name="validationContext">Validation context</param> | ||
/// <returns>Validation Result</returns> | ||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) | ||
{ | ||
yield break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Linq; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace Conductor.Client.Models | ||
{ | ||
/// <summary> | ||
/// HumanTaskDefinition | ||
/// </summary> | ||
[DataContract] | ||
public partial class HumanTaskDefinition : IEquatable<HumanTaskDefinition>, IValidatableObject | ||
{ | ||
/// <summary> | ||
/// Defines AssignmentCompletionStrategy | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum AssignmentCompletionStrategyEnum | ||
{ | ||
/// <summary> | ||
/// Enum LEAVEOPEN for value: LEAVE_OPEN | ||
/// </summary> | ||
[EnumMember(Value = "LEAVE_OPEN")] | ||
LEAVEOPEN = 1, | ||
/// <summary> | ||
/// Enum TERMINATE for value: TERMINATE | ||
/// </summary> | ||
[EnumMember(Value = "TERMINATE")] | ||
TERMINATE = 2 | ||
} | ||
/// <summary> | ||
/// Gets or Sets AssignmentCompletionStrategy | ||
/// </summary> | ||
[DataMember(Name = "assignmentCompletionStrategy", EmitDefaultValue = false)] | ||
public AssignmentCompletionStrategyEnum? AssignmentCompletionStrategy { get; set; } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="HumanTaskDefinition" /> class. | ||
/// </summary> | ||
/// <param name="assignmentCompletionStrategy">assignmentCompletionStrategy.</param> | ||
/// <param name="assignments">assignments.</param> | ||
/// <param name="displayName">displayName.</param> | ||
/// <param name="taskTriggers">taskTriggers.</param> | ||
/// <param name="userFormTemplate">userFormTemplate.</param> | ||
public HumanTaskDefinition(AssignmentCompletionStrategyEnum? assignmentCompletionStrategy = default(AssignmentCompletionStrategyEnum?), List<HumanTaskAssignment> assignments = default(List<HumanTaskAssignment>), string displayName = default(string), List<HumanTaskTrigger> taskTriggers = default(List<HumanTaskTrigger>), UserFormTemplate userFormTemplate = default(UserFormTemplate)) | ||
{ | ||
this.AssignmentCompletionStrategy = assignmentCompletionStrategy; | ||
this.Assignments = assignments; | ||
this.DisplayName = displayName; | ||
this.TaskTriggers = taskTriggers; | ||
this.UserFormTemplate = userFormTemplate; | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Gets or Sets Assignments | ||
/// </summary> | ||
[DataMember(Name = "assignments", EmitDefaultValue = false)] | ||
public List<HumanTaskAssignment> Assignments { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets DisplayName | ||
/// </summary> | ||
[DataMember(Name = "displayName", EmitDefaultValue = false)] | ||
public string DisplayName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets TaskTriggers | ||
/// </summary> | ||
[DataMember(Name = "taskTriggers", EmitDefaultValue = false)] | ||
public List<HumanTaskTrigger> TaskTriggers { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets UserFormTemplate | ||
/// </summary> | ||
[DataMember(Name = "userFormTemplate", EmitDefaultValue = false)] | ||
public UserFormTemplate UserFormTemplate { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
var sb = new StringBuilder(); | ||
sb.Append("class HumanTaskDefinition {\n"); | ||
sb.Append(" AssignmentCompletionStrategy: ").Append(AssignmentCompletionStrategy).Append("\n"); | ||
sb.Append(" Assignments: ").Append(Assignments).Append("\n"); | ||
sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); | ||
sb.Append(" TaskTriggers: ").Append(TaskTriggers).Append("\n"); | ||
sb.Append(" UserFormTemplate: ").Append(UserFormTemplate).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonConvert.SerializeObject(this, Formatting.Indented); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="input">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object input) | ||
{ | ||
return this.Equals(input as HumanTaskDefinition); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if HumanTaskDefinition instances are equal | ||
/// </summary> | ||
/// <param name="input">Instance of HumanTaskDefinition to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public bool Equals(HumanTaskDefinition input) | ||
{ | ||
if (input == null) | ||
return false; | ||
|
||
return | ||
( | ||
this.AssignmentCompletionStrategy == input.AssignmentCompletionStrategy || | ||
(this.AssignmentCompletionStrategy != null && | ||
this.AssignmentCompletionStrategy.Equals(input.AssignmentCompletionStrategy)) | ||
) && | ||
( | ||
this.Assignments == input.Assignments || | ||
this.Assignments != null && | ||
input.Assignments != null && | ||
this.Assignments.SequenceEqual(input.Assignments) | ||
) && | ||
( | ||
this.DisplayName == input.DisplayName || | ||
(this.DisplayName != null && | ||
this.DisplayName.Equals(input.DisplayName)) | ||
) && | ||
( | ||
this.TaskTriggers == input.TaskTriggers || | ||
this.TaskTriggers != null && | ||
input.TaskTriggers != null && | ||
this.TaskTriggers.SequenceEqual(input.TaskTriggers) | ||
) && | ||
( | ||
this.UserFormTemplate == input.UserFormTemplate || | ||
(this.UserFormTemplate != null && | ||
this.UserFormTemplate.Equals(input.UserFormTemplate)) | ||
); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (this.AssignmentCompletionStrategy != null) | ||
hashCode = hashCode * 59 + this.AssignmentCompletionStrategy.GetHashCode(); | ||
if (this.Assignments != null) | ||
hashCode = hashCode * 59 + this.Assignments.GetHashCode(); | ||
if (this.DisplayName != null) | ||
hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); | ||
if (this.TaskTriggers != null) | ||
hashCode = hashCode * 59 + this.TaskTriggers.GetHashCode(); | ||
if (this.UserFormTemplate != null) | ||
hashCode = hashCode * 59 + this.UserFormTemplate.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// To validate all properties of the instance | ||
/// </summary> | ||
/// <param name="validationContext">Validation context</param> | ||
/// <returns>Validation Result</returns> | ||
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) | ||
{ | ||
yield break; | ||
} | ||
} | ||
} |
Oops, something went wrong.