Skip to content

Commit

Permalink
feat(CompareComply): add support for Modification in TypeLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
mamoonraja committed Dec 8, 2020
1 parent 52f0cf9 commit bd6d619
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 74 deletions.
16 changes: 2 additions & 14 deletions Scripts/Services/CompareComply/V1/CompareComplyService.cs
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -526,10 +526,6 @@ private void OnAddFeedbackResponse(RESTConnector.Request req, RESTConnector.Resp
/// <param name="callback">The callback function that is invoked when the operation completes.</param>
/// <param name="feedbackType">An optional string that filters the output to include only feedback with the
/// specified feedback type. The only permitted value is `element_classification`. (optional)</param>
/// <param name="before">An optional string in the format `YYYY-MM-DD` that filters the output to include only
/// feedback that was added before the specified date. (optional)</param>
/// <param name="after">An optional string in the format `YYYY-MM-DD` that filters the output to include only
/// feedback that was added after the specified date. (optional)</param>
/// <param name="documentTitle">An optional string that filters the output to include only feedback from the
/// document with the specified `document_title`. (optional)</param>
/// <param name="modelId">An optional string that filters the output to include only feedback with the specified
Expand Down Expand Up @@ -565,7 +561,7 @@ private void OnAddFeedbackResponse(RESTConnector.Request req, RESTConnector.Resp
/// <param name="includeTotal">An optional boolean value. If specified as `true`, the `pagination` object in the
/// output includes a value called `total` that gives the total count of feedback created. (optional)</param>
/// <returns><see cref="FeedbackList" />FeedbackList</returns>
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)
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)
{
if (callback == null)
throw new ArgumentNullException("`callback` is required for `ListFeedback`");
Expand Down Expand Up @@ -594,14 +590,6 @@ public bool ListFeedback(Callback<FeedbackList> callback, string feedbackType =
{
req.Parameters["feedback_type"] = feedbackType;
}
if (before != null)
{
req.Parameters["before"] = before;
}
if (after != null)
{
req.Parameters["after"] = after;
}
if (!string.IsNullOrEmpty(documentTitle))
{
req.Parameters["document_title"] = documentTitle;
Expand Down
28 changes: 27 additions & 1 deletion Scripts/Services/CompareComply/V1/Model/Category.cs
@@ -1,5 +1,5 @@
/**
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -133,13 +133,39 @@ public class LabelValue

}

/// <summary>
/// The type of modification of the feedback entry in the updated labels response.
/// </summary>
public class ModificationValue
{
/// <summary>
/// Constant ADDED for added
/// </summary>
public const string ADDED = "added";
/// <summary>
/// Constant UNCHANGED for unchanged
/// </summary>
public const string UNCHANGED = "unchanged";
/// <summary>
/// Constant REMOVED for removed
/// </summary>
public const string REMOVED = "removed";

}

/// <summary>
/// The category of the associated element.
/// Constants for possible values can be found using Category.LabelValue
/// </summary>
[JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)]
public string Label { get; set; }
/// <summary>
/// The type of modification of the feedback entry in the updated labels response.
/// Constants for possible values can be found using Category.ModificationValue
/// </summary>
[JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)]
public string Modification { get; set; }
/// <summary>
/// Hashed values that you can send to IBM to provide feedback or receive support.
/// </summary>
[JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)]
Expand Down
30 changes: 1 addition & 29 deletions Scripts/Services/CompareComply/V1/Model/OriginalLabelsOut.cs
@@ -1,5 +1,5 @@
/**
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,34 +25,6 @@ namespace IBM.Watson.CompareComply.V1.Model
/// </summary>
public class OriginalLabelsOut
{
/// <summary>
/// A string identifying the type of modification the feedback entry in the `updated_labels` array. Possible
/// values are `added`, `not_changed`, and `removed`.
/// </summary>
public class ModificationValue
{
/// <summary>
/// Constant ADDED for added
/// </summary>
public const string ADDED = "added";
/// <summary>
/// Constant NOT_CHANGED for not_changed
/// </summary>
public const string NOT_CHANGED = "not_changed";
/// <summary>
/// Constant REMOVED for removed
/// </summary>
public const string REMOVED = "removed";

}

/// <summary>
/// A string identifying the type of modification the feedback entry in the `updated_labels` array. Possible
/// values are `added`, `not_changed`, and `removed`.
/// Constants for possible values can be found using OriginalLabelsOut.ModificationValue
/// </summary>
[JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)]
public string Modification { get; set; }
/// <summary>
/// Description of the action specified by the element and whom it affects.
/// </summary>
Expand Down
28 changes: 27 additions & 1 deletion Scripts/Services/CompareComply/V1/Model/TypeLabel.cs
@@ -1,5 +1,5 @@
/**
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,6 +25,32 @@ namespace IBM.Watson.CompareComply.V1.Model
/// </summary>
public class TypeLabel
{
/// <summary>
/// The type of modification of the feedback entry in the updated labels response.
/// </summary>
public class ModificationValue
{
/// <summary>
/// Constant ADDED for added
/// </summary>
public const string ADDED = "added";
/// <summary>
/// Constant UNCHANGED for unchanged
/// </summary>
public const string UNCHANGED = "unchanged";
/// <summary>
/// Constant REMOVED for removed
/// </summary>
public const string REMOVED = "removed";

}

/// <summary>
/// The type of modification of the feedback entry in the updated labels response.
/// Constants for possible values can be found using TypeLabel.ModificationValue
/// </summary>
[JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)]
public string Modification { get; set; }
/// <summary>
/// A pair of `nature` and `party` objects. The `nature` object identifies the effect of the element on the
/// identified `party`, and the `party` object identifies the affected party.
Expand Down
30 changes: 1 addition & 29 deletions Scripts/Services/CompareComply/V1/Model/UpdatedLabelsOut.cs
@@ -1,5 +1,5 @@
/**
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,34 +25,6 @@ namespace IBM.Watson.CompareComply.V1.Model
/// </summary>
public class UpdatedLabelsOut
{
/// <summary>
/// The type of modification the feedback entry in the `updated_labels` array. Possible values are `added`,
/// `not_changed`, and `removed`.
/// </summary>
public class ModificationValue
{
/// <summary>
/// Constant ADDED for added
/// </summary>
public const string ADDED = "added";
/// <summary>
/// Constant NOT_CHANGED for not_changed
/// </summary>
public const string NOT_CHANGED = "not_changed";
/// <summary>
/// Constant REMOVED for removed
/// </summary>
public const string REMOVED = "removed";

}

/// <summary>
/// The type of modification the feedback entry in the `updated_labels` array. Possible values are `added`,
/// `not_changed`, and `removed`.
/// Constants for possible values can be found using UpdatedLabelsOut.ModificationValue
/// </summary>
[JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)]
public string Modification { get; set; }
/// <summary>
/// Description of the action specified by the element and whom it affects.
/// </summary>
Expand Down

0 comments on commit bd6d619

Please sign in to comment.