Skip to content

Commit b47e990

Browse files
committed
feat(VisualRecognitionV4): add support for visual recognition v4
1 parent 7fb1a52 commit b47e990

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2626
-0
lines changed

Scripts/Services/VisualRecognition/V4/Model.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
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+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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+
using System.Collections.Generic;
19+
using Newtonsoft.Json;
20+
21+
namespace IBM.Watson.VisualRecognition.V4.Model
22+
{
23+
/// <summary>
24+
/// Results for all images.
25+
/// </summary>
26+
public class AnalyzeResponse
27+
{
28+
/// <summary>
29+
/// Analyzed images.
30+
/// </summary>
31+
[JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)]
32+
public List<Image> Images { get; set; }
33+
/// <summary>
34+
/// Information about what might cause less than optimal output.
35+
/// </summary>
36+
[JsonProperty("warnings", NullValueHandling = NullValueHandling.Ignore)]
37+
public List<Warning> Warnings { get; set; }
38+
/// <summary>
39+
/// A unique identifier of the request. Included only when an error or warning is returned.
40+
/// </summary>
41+
[JsonProperty("trace", NullValueHandling = NullValueHandling.Ignore)]
42+
public string Trace { get; set; }
43+
}
44+
}

Scripts/Services/VisualRecognition/V4/Model/AnalyzeResponse.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
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+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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+
using Newtonsoft.Json;
19+
20+
namespace IBM.Watson.VisualRecognition.V4.Model
21+
{
22+
/// <summary>
23+
/// Training status information for the collection.
24+
/// </summary>
25+
public class BaseCollectionTrainingStatus
26+
{
27+
/// <summary>
28+
/// Training status for the objects in the collection.
29+
/// </summary>
30+
[JsonProperty("objects", NullValueHandling = NullValueHandling.Ignore)]
31+
public ObjectTrainingStatus Objects { get; set; }
32+
}
33+
}

Scripts/Services/VisualRecognition/V4/Model/BaseCollectionTrainingStatus.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
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+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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+
using Newtonsoft.Json;
19+
20+
namespace IBM.Watson.VisualRecognition.V4.Model
21+
{
22+
/// <summary>
23+
/// Details about a problem.
24+
/// </summary>
25+
public class BaseError
26+
{
27+
/// <summary>
28+
/// Identifier of the problem.
29+
/// </summary>
30+
public class CodeValue
31+
{
32+
/// <summary>
33+
/// Constant INVALID_FIELD for invalid_field
34+
/// </summary>
35+
public const string INVALID_FIELD = "invalid_field";
36+
/// <summary>
37+
/// Constant INVALID_HEADER for invalid_header
38+
/// </summary>
39+
public const string INVALID_HEADER = "invalid_header";
40+
/// <summary>
41+
/// Constant INVALID_METHOD for invalid_method
42+
/// </summary>
43+
public const string INVALID_METHOD = "invalid_method";
44+
/// <summary>
45+
/// Constant MISSING_FIELD for missing_field
46+
/// </summary>
47+
public const string MISSING_FIELD = "missing_field";
48+
/// <summary>
49+
/// Constant SERVER_ERROR for server_error
50+
/// </summary>
51+
public const string SERVER_ERROR = "server_error";
52+
53+
}
54+
55+
/// <summary>
56+
/// Identifier of the problem.
57+
/// Constants for possible values can be found using BaseError.CodeValue
58+
/// </summary>
59+
[JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)]
60+
public string Code { get; set; }
61+
/// <summary>
62+
/// An explanation of the problem with possible solutions.
63+
/// </summary>
64+
[JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)]
65+
public string Message { get; set; }
66+
/// <summary>
67+
/// A URL for more information about the solution.
68+
/// </summary>
69+
[JsonProperty("more_info", NullValueHandling = NullValueHandling.Ignore)]
70+
public string MoreInfo { get; set; }
71+
}
72+
}

Scripts/Services/VisualRecognition/V4/Model/BaseError.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
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+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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+
using Newtonsoft.Json;
19+
using System;
20+
21+
namespace IBM.Watson.VisualRecognition.V4.Model
22+
{
23+
/// <summary>
24+
/// Details about a collection.
25+
/// </summary>
26+
public class Collection
27+
{
28+
/// <summary>
29+
/// The identifier of the collection.
30+
/// </summary>
31+
[JsonProperty("collection_id", NullValueHandling = NullValueHandling.Ignore)]
32+
public virtual string CollectionId { get; private set; }
33+
/// <summary>
34+
/// The name of the collection.
35+
/// </summary>
36+
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
37+
public string Name { get; set; }
38+
/// <summary>
39+
/// The description of the collection.
40+
/// </summary>
41+
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
42+
public string Description { get; set; }
43+
/// <summary>
44+
/// Date and time in Coordinated Universal Time (UTC) that the collection was created.
45+
/// </summary>
46+
[JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)]
47+
public virtual DateTime? Created { get; private set; }
48+
/// <summary>
49+
/// Date and time in Coordinated Universal Time (UTC) that the collection was most recently updated.
50+
/// </summary>
51+
[JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)]
52+
public virtual DateTime? Updated { get; private set; }
53+
/// <summary>
54+
/// Number of images in the collection.
55+
/// </summary>
56+
[JsonProperty("image_count", NullValueHandling = NullValueHandling.Ignore)]
57+
public virtual long? ImageCount { get; private set; }
58+
/// <summary>
59+
/// Training status information for the collection.
60+
/// </summary>
61+
[JsonProperty("training_status", NullValueHandling = NullValueHandling.Ignore)]
62+
public virtual TrainingStatus TrainingStatus { get; private set; }
63+
}
64+
}

Scripts/Services/VisualRecognition/V4/Model/Collection.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
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+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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+
using System.Collections.Generic;
19+
using Newtonsoft.Json;
20+
21+
namespace IBM.Watson.VisualRecognition.V4.Model
22+
{
23+
/// <summary>
24+
/// The objects in a collection that are detected in an image.
25+
/// </summary>
26+
public class CollectionObjects
27+
{
28+
/// <summary>
29+
/// The identifier of the collection.
30+
/// </summary>
31+
[JsonProperty("collection_id", NullValueHandling = NullValueHandling.Ignore)]
32+
public string CollectionId { get; set; }
33+
/// <summary>
34+
/// The identified objects in a collection.
35+
/// </summary>
36+
[JsonProperty("objects", NullValueHandling = NullValueHandling.Ignore)]
37+
public List<ObjectDetail> Objects { get; set; }
38+
}
39+
}

Scripts/Services/VisualRecognition/V4/Model/CollectionObjects.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
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+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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+
using System.Collections.Generic;
19+
using Newtonsoft.Json;
20+
21+
namespace IBM.Watson.VisualRecognition.V4.Model
22+
{
23+
/// <summary>
24+
/// A container for the list of collections.
25+
/// </summary>
26+
public class CollectionsList
27+
{
28+
/// <summary>
29+
/// The collections in this service instance.
30+
/// </summary>
31+
[JsonProperty("collections", NullValueHandling = NullValueHandling.Ignore)]
32+
public List<Collection> Collections { get; set; }
33+
}
34+
}

Scripts/Services/VisualRecognition/V4/Model/CollectionsList.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)