Skip to content

Commit

Permalink
refactor(Visual Recognition V4): Update based on the latest API defin…
Browse files Browse the repository at this point in the history
…itions to remove `Base` files
  • Loading branch information
mediumTaj committed Oct 1, 2019
1 parent d9eab9e commit e5c5f4f
Show file tree
Hide file tree
Showing 13 changed files with 1,008 additions and 1,115 deletions.
Expand Up @@ -280,9 +280,9 @@ public void AddTrainingData()

VisualRecognitionService service = new VisualRecognitionService("2019-02-11", authenticator);

List<BaseObject> objects = new List<BaseObject>()
List<TrainingDataObject> objects = new List<TrainingDataObject>()
{
new BaseObject()
new TrainingDataObject()
{
_Object = "2018-Fit",
Location = new Location()
Expand Down
Expand Up @@ -36,7 +36,7 @@ public partial interface IVisualRecognitionService
DetailedResponse<object> DeleteImage(string collectionId, string imageId);
DetailedResponse<System.IO.MemoryStream> GetJpegImage(string collectionId, string imageId, string size = null);
DetailedResponse<Collection> Train(string collectionId);
DetailedResponse<TrainingDataObjects> AddImageTrainingData(string collectionId, string imageId, List<BaseObject> objects = null);
DetailedResponse<TrainingDataObjects> AddImageTrainingData(string collectionId, string imageId, List<TrainingDataObject> objects = null);
DetailedResponse<object> DeleteUserData(string customerId);
}
}
Expand Up @@ -34,7 +34,7 @@ public class AnalyzeResponse
/// Information about what might cause less than optimal output.
/// </summary>
[JsonProperty("warnings", NullValueHandling = NullValueHandling.Ignore)]
public List<BaseError> Warnings { get; set; }
public List<Warning> Warnings { get; set; }
/// <summary>
/// A unique identifier of the request. Included only when an error or warning is returned.
/// </summary>
Expand Down
66 changes: 0 additions & 66 deletions src/IBM.Watson.VisualRecognition.v4/Model/BaseCollection.cs

This file was deleted.

40 changes: 0 additions & 40 deletions src/IBM.Watson.VisualRecognition.v4/Model/BaseObject.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/IBM.Watson.VisualRecognition.v4/Model/Collection.cs
Expand Up @@ -36,7 +36,7 @@ public class Collection
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
public string Name { get; set; }
/// <summary>
/// The descripion of the collection.
/// The description of the collection.
/// </summary>
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
public string Description { get; set; }
Expand Down
Expand Up @@ -29,7 +29,7 @@ public class CollectionsList
/// The collections in this service instance.
/// </summary>
[JsonProperty("collections", NullValueHandling = NullValueHandling.Ignore)]
public List<BaseCollection> Collections { get; set; }
public List<Collection> Collections { get; set; }
}

}
2 changes: 1 addition & 1 deletion src/IBM.Watson.VisualRecognition.v4/Model/Error.cs
Expand Up @@ -69,7 +69,7 @@ public class CodeEnumValue
[JsonProperty("more_info", NullValueHandling = NullValueHandling.Ignore)]
public string MoreInfo { get; set; }
/// <summary>
/// Details about the specfic area of the problem.
/// Details about the specific area of the problem.
/// </summary>
[JsonProperty("target", NullValueHandling = NullValueHandling.Ignore)]
public ErrorTarget Target { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/IBM.Watson.VisualRecognition.v4/Model/ErrorTarget.cs
Expand Up @@ -20,7 +20,7 @@
namespace IBM.Watson.VisualRecognition.v4.Model
{
/// <summary>
/// Details about the specfic area of the problem.
/// Details about the specific area of the problem.
/// </summary>
public class ErrorTarget
{
Expand Down
Expand Up @@ -34,7 +34,7 @@ public class ImageDetailsList
/// Information about what might cause less than optimal output.
/// </summary>
[JsonProperty("warnings", NullValueHandling = NullValueHandling.Ignore)]
public List<BaseError> Warnings { get; set; }
public List<Warning> Warnings { get; set; }
/// <summary>
/// A unique identifier of the request. Included only when an error or warning is returned.
/// </summary>
Expand Down
Expand Up @@ -22,7 +22,7 @@ namespace IBM.Watson.VisualRecognition.v4.Model
/// <summary>
/// Details about a problem.
/// </summary>
public class BaseError
public class Warning
{
/// <summary>
/// Identifier of the problem.
Expand Down Expand Up @@ -54,7 +54,7 @@ public class CodeEnumValue

/// <summary>
/// Identifier of the problem.
/// Constants for possible values can be found using BaseError.CodeEnumValue
/// Constants for possible values can be found using Warning.CodeEnumValue
/// </summary>
[JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)]
public string Code { get; set; }
Expand Down

0 comments on commit e5c5f4f

Please sign in to comment.