Skip to content

Commit bd6d619

Browse files
committed
feat(CompareComply): add support for Modification in TypeLabel
1 parent 52f0cf9 commit bd6d619

File tree

5 files changed

+58
-74
lines changed

5 files changed

+58
-74
lines changed

Scripts/Services/CompareComply/V1/CompareComplyService.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2018, 2020.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -526,10 +526,6 @@ private void OnAddFeedbackResponse(RESTConnector.Request req, RESTConnector.Resp
526526
/// <param name="callback">The callback function that is invoked when the operation completes.</param>
527527
/// <param name="feedbackType">An optional string that filters the output to include only feedback with the
528528
/// specified feedback type. The only permitted value is `element_classification`. (optional)</param>
529-
/// <param name="before">An optional string in the format `YYYY-MM-DD` that filters the output to include only
530-
/// feedback that was added before the specified date. (optional)</param>
531-
/// <param name="after">An optional string in the format `YYYY-MM-DD` that filters the output to include only
532-
/// feedback that was added after the specified date. (optional)</param>
533529
/// <param name="documentTitle">An optional string that filters the output to include only feedback from the
534530
/// document with the specified `document_title`. (optional)</param>
535531
/// <param name="modelId">An optional string that filters the output to include only feedback with the specified
@@ -565,7 +561,7 @@ private void OnAddFeedbackResponse(RESTConnector.Request req, RESTConnector.Resp
565561
/// <param name="includeTotal">An optional boolean value. If specified as `true`, the `pagination` object in the
566562
/// output includes a value called `total` that gives the total count of feedback created. (optional)</param>
567563
/// <returns><see cref="FeedbackList" />FeedbackList</returns>
568-
public bool ListFeedback(Callback<FeedbackList> callback, string feedbackType = null, DateTime? before = null, DateTime? after = null, string documentTitle = null, string modelId = null, string modelVersion = null, string categoryRemoved = null, string categoryAdded = null, string categoryNotChanged = null, string typeRemoved = null, string typeAdded = null, string typeNotChanged = null, long? pageLimit = null, string cursor = null, string sort = null, bool? includeTotal = null)
564+
public bool ListFeedback(Callback<FeedbackList> callback, string feedbackType = null, string documentTitle = null, string modelId = null, string modelVersion = null, string categoryRemoved = null, string categoryAdded = null, string categoryNotChanged = null, string typeRemoved = null, string typeAdded = null, string typeNotChanged = null, long? pageLimit = null, string cursor = null, string sort = null, bool? includeTotal = null)
569565
{
570566
if (callback == null)
571567
throw new ArgumentNullException("`callback` is required for `ListFeedback`");
@@ -594,14 +590,6 @@ public bool ListFeedback(Callback<FeedbackList> callback, string feedbackType =
594590
{
595591
req.Parameters["feedback_type"] = feedbackType;
596592
}
597-
if (before != null)
598-
{
599-
req.Parameters["before"] = before;
600-
}
601-
if (after != null)
602-
{
603-
req.Parameters["after"] = after;
604-
}
605593
if (!string.IsNullOrEmpty(documentTitle))
606594
{
607595
req.Parameters["document_title"] = documentTitle;

Scripts/Services/CompareComply/V1/Model/Category.cs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -133,13 +133,39 @@ public class LabelValue
133133

134134
}
135135

136+
/// <summary>
137+
/// The type of modification of the feedback entry in the updated labels response.
138+
/// </summary>
139+
public class ModificationValue
140+
{
141+
/// <summary>
142+
/// Constant ADDED for added
143+
/// </summary>
144+
public const string ADDED = "added";
145+
/// <summary>
146+
/// Constant UNCHANGED for unchanged
147+
/// </summary>
148+
public const string UNCHANGED = "unchanged";
149+
/// <summary>
150+
/// Constant REMOVED for removed
151+
/// </summary>
152+
public const string REMOVED = "removed";
153+
154+
}
155+
136156
/// <summary>
137157
/// The category of the associated element.
138158
/// Constants for possible values can be found using Category.LabelValue
139159
/// </summary>
140160
[JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)]
141161
public string Label { get; set; }
142162
/// <summary>
163+
/// The type of modification of the feedback entry in the updated labels response.
164+
/// Constants for possible values can be found using Category.ModificationValue
165+
/// </summary>
166+
[JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)]
167+
public string Modification { get; set; }
168+
/// <summary>
143169
/// Hashed values that you can send to IBM to provide feedback or receive support.
144170
/// </summary>
145171
[JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)]

Scripts/Services/CompareComply/V1/Model/OriginalLabelsOut.cs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,34 +25,6 @@ namespace IBM.Watson.CompareComply.V1.Model
2525
/// </summary>
2626
public class OriginalLabelsOut
2727
{
28-
/// <summary>
29-
/// A string identifying the type of modification the feedback entry in the `updated_labels` array. Possible
30-
/// values are `added`, `not_changed`, and `removed`.
31-
/// </summary>
32-
public class ModificationValue
33-
{
34-
/// <summary>
35-
/// Constant ADDED for added
36-
/// </summary>
37-
public const string ADDED = "added";
38-
/// <summary>
39-
/// Constant NOT_CHANGED for not_changed
40-
/// </summary>
41-
public const string NOT_CHANGED = "not_changed";
42-
/// <summary>
43-
/// Constant REMOVED for removed
44-
/// </summary>
45-
public const string REMOVED = "removed";
46-
47-
}
48-
49-
/// <summary>
50-
/// A string identifying the type of modification the feedback entry in the `updated_labels` array. Possible
51-
/// values are `added`, `not_changed`, and `removed`.
52-
/// Constants for possible values can be found using OriginalLabelsOut.ModificationValue
53-
/// </summary>
54-
[JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)]
55-
public string Modification { get; set; }
5628
/// <summary>
5729
/// Description of the action specified by the element and whom it affects.
5830
/// </summary>

Scripts/Services/CompareComply/V1/Model/TypeLabel.cs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,6 +25,32 @@ namespace IBM.Watson.CompareComply.V1.Model
2525
/// </summary>
2626
public class TypeLabel
2727
{
28+
/// <summary>
29+
/// The type of modification of the feedback entry in the updated labels response.
30+
/// </summary>
31+
public class ModificationValue
32+
{
33+
/// <summary>
34+
/// Constant ADDED for added
35+
/// </summary>
36+
public const string ADDED = "added";
37+
/// <summary>
38+
/// Constant UNCHANGED for unchanged
39+
/// </summary>
40+
public const string UNCHANGED = "unchanged";
41+
/// <summary>
42+
/// Constant REMOVED for removed
43+
/// </summary>
44+
public const string REMOVED = "removed";
45+
46+
}
47+
48+
/// <summary>
49+
/// The type of modification of the feedback entry in the updated labels response.
50+
/// Constants for possible values can be found using TypeLabel.ModificationValue
51+
/// </summary>
52+
[JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)]
53+
public string Modification { get; set; }
2854
/// <summary>
2955
/// A pair of `nature` and `party` objects. The `nature` object identifies the effect of the element on the
3056
/// identified `party`, and the `party` object identifies the affected party.

Scripts/Services/CompareComply/V1/Model/UpdatedLabelsOut.cs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,34 +25,6 @@ namespace IBM.Watson.CompareComply.V1.Model
2525
/// </summary>
2626
public class UpdatedLabelsOut
2727
{
28-
/// <summary>
29-
/// The type of modification the feedback entry in the `updated_labels` array. Possible values are `added`,
30-
/// `not_changed`, and `removed`.
31-
/// </summary>
32-
public class ModificationValue
33-
{
34-
/// <summary>
35-
/// Constant ADDED for added
36-
/// </summary>
37-
public const string ADDED = "added";
38-
/// <summary>
39-
/// Constant NOT_CHANGED for not_changed
40-
/// </summary>
41-
public const string NOT_CHANGED = "not_changed";
42-
/// <summary>
43-
/// Constant REMOVED for removed
44-
/// </summary>
45-
public const string REMOVED = "removed";
46-
47-
}
48-
49-
/// <summary>
50-
/// The type of modification the feedback entry in the `updated_labels` array. Possible values are `added`,
51-
/// `not_changed`, and `removed`.
52-
/// Constants for possible values can be found using UpdatedLabelsOut.ModificationValue
53-
/// </summary>
54-
[JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)]
55-
public string Modification { get; set; }
5628
/// <summary>
5729
/// Description of the action specified by the element and whom it affects.
5830
/// </summary>

0 commit comments

Comments
 (0)