diff --git a/.gitignore b/.gitignore index aa49d07a6..8caf91724 100644 --- a/.gitignore +++ b/.gitignore @@ -83,5 +83,4 @@ package-lock.json package-lock.json.meta .pre-commit-config.yaml -.secrets.baseline /.idea diff --git a/.secrets.baseline b/.secrets.baseline new file mode 100644 index 000000000..4da4879f1 --- /dev/null +++ b/.secrets.baseline @@ -0,0 +1,270 @@ +{ + "exclude": { + "files": "package-lock.json|^.secrets.baseline$", + "lines": null + }, + "generated_at": "2022-03-21T14:17:34Z", + "plugins_used": [ + { + "name": "AWSKeyDetector" + }, + { + "name": "ArtifactoryDetector" + }, + { + "name": "AzureStorageKeyDetector" + }, + { + "base64_limit": 4.5, + "name": "Base64HighEntropyString" + }, + { + "name": "BasicAuthDetector" + }, + { + "name": "BoxDetector" + }, + { + "name": "CloudantDetector" + }, + { + "ghe_instance": "github.ibm.com", + "name": "GheDetector" + }, + { + "name": "GitHubTokenDetector" + }, + { + "hex_limit": 3, + "name": "HexHighEntropyString" + }, + { + "name": "IbmCloudIamDetector" + }, + { + "name": "IbmCosHmacDetector" + }, + { + "name": "JwtTokenDetector" + }, + { + "keyword_exclude": null, + "name": "KeywordDetector" + }, + { + "name": "MailchimpDetector" + }, + { + "name": "NpmDetector" + }, + { + "name": "PrivateKeyDetector" + }, + { + "name": "SlackDetector" + }, + { + "name": "SoftlayerDetector" + }, + { + "name": "SquareOAuthDetector" + }, + { + "name": "StripeDetector" + }, + { + "name": "TwilioKeyDetector" + } + ], + "results": { + "Examples/ExampleAssistantV2.cs": [ + { + "hashed_secret": "2568b3e3f9f17f73efb1a230845e5055fe3ab5d6", + "is_secret": false, + "is_verified": false, + "line_number": 73, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleDiscoveryV1.cs": [ + { + "hashed_secret": "2568b3e3f9f17f73efb1a230845e5055fe3ab5d6", + "is_secret": false, + "is_verified": false, + "line_number": 43, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleLanguageTranslatorV3.cs": [ + { + "hashed_secret": "2568b3e3f9f17f73efb1a230845e5055fe3ab5d6", + "is_secret": false, + "is_verified": false, + "line_number": 43, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleNaturalLanguageClassifierV1.cs": [ + { + "hashed_secret": "2568b3e3f9f17f73efb1a230845e5055fe3ab5d6", + "is_secret": false, + "is_verified": false, + "line_number": 58, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleNaturalLanguageUnderstandingV1.cs": [ + { + "hashed_secret": "2568b3e3f9f17f73efb1a230845e5055fe3ab5d6", + "is_secret": false, + "is_verified": false, + "line_number": 61, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleNaturalLanguageUnderstandingV1.unity": [ + { + "hashed_secret": "0a7de5e7fb4d25074cb5c09250c742b1135fad80", + "is_secret": false, + "is_verified": false, + "line_number": 152, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleStreaming.cs": [ + { + "hashed_secret": "ae4b2c7d462619b036460c8673c089a79507c599", + "is_secret": false, + "is_verified": false, + "line_number": 75, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleTextToSpeechV1.cs": [ + { + "hashed_secret": "2568b3e3f9f17f73efb1a230845e5055fe3ab5d6", + "is_secret": false, + "is_verified": false, + "line_number": 75, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleToneAnalyzerV3.cs": [ + { + "hashed_secret": "2568b3e3f9f17f73efb1a230845e5055fe3ab5d6", + "is_secret": false, + "is_verified": false, + "line_number": 67, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Examples/ExampleToneAnalyzerV3.unity": [ + { + "hashed_secret": "b4914600112ba18af7798b6c1a1363728ae1d96f", + "is_secret": false, + "is_verified": false, + "line_number": 152, + "type": "Secret Keyword", + "verified_result": null + } + ], + "README.md": [ + { + "hashed_secret": "33515d8639fda6b97c36f87706759ed3af26e97f", + "is_secret": false, + "is_verified": false, + "line_number": 125, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Scripts/Services/Discovery/V1/Model/CredentialDetails.cs": [ + { + "hashed_secret": "e8fc807ce6fbcda13f91c5b64850173873de0cdc", + "is_secret": false, + "is_verified": false, + "line_number": 53, + "type": "Secret Keyword", + "verified_result": null + }, + { + "hashed_secret": "fdee05598fdd57ff8e9ae29e92c25a04f2c52fa6", + "is_secret": false, + "is_verified": false, + "line_number": 57, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Scripts/Services/SpeechToText/V1/SpeechToTextService.cs": [ + { + "hashed_secret": "f36082ba942225c26353b911fd9beb809e5322be", + "is_secret": false, + "is_verified": false, + "line_number": 761, + "type": "Secret Keyword", + "verified_result": null + }, + { + "hashed_secret": "cdc5cfb3a1df5a330bccfcb8eb92fad973f170bc", + "is_secret": false, + "is_verified": false, + "line_number": 793, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Tests/AssistantV1IntegrationTests.cs": [ + { + "hashed_secret": "c2a6b03f190dfb2b4aa91f8af8d477a9bc3401dc", + "is_secret": false, + "is_verified": false, + "line_number": 1146, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Tests/DiscoveryV1IntegrationTests.cs": [ + { + "hashed_secret": "6d284a097a5bc4b582c29a699a6b6bd753550daf", + "is_secret": false, + "is_verified": false, + "line_number": 1389, + "type": "Secret Keyword", + "verified_result": null + }, + { + "hashed_secret": "c02a08d1310cc7f693d4b7828af2fcbfec8bf7f7", + "is_secret": false, + "is_verified": false, + "line_number": 1474, + "type": "Secret Keyword", + "verified_result": null + } + ], + "Tests/SpeechToTextV1IntegrationTests.cs": [ + { + "hashed_secret": "335aa6a62c6c0c1c628aef13a97e1e63ba3a1612", + "is_secret": false, + "is_verified": false, + "line_number": 258, + "type": "Secret Keyword", + "verified_result": null + } + ] + }, + "version": "0.13.1+ibm.47.dss", + "word_list": { + "file": null, + "hash": null + } +} diff --git a/Scripts/Services/Assistant/V1/AssistantService.cs b/Scripts/Services/Assistant/V1/AssistantService.cs index aff933c09..9202374a6 100644 --- a/Scripts/Services/Assistant/V1/AssistantService.cs +++ b/Scripts/Services/Assistant/V1/AssistantService.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ */ /** -* IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025 +* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428 */ using System.Collections.Generic; @@ -43,7 +43,7 @@ public partial class AssistantService : BaseService /// /// Gets and sets the version of the service. /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is - /// `2021-06-14`. + /// `2021-11-27`. /// public string Version { @@ -68,14 +68,14 @@ public bool DisableSslVerification /// AssistantService constructor. /// /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2021-06-14`. + /// The current version is `2021-11-27`. public AssistantService(string version) : this(version, defaultServiceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(defaultServiceName)) {} /// /// AssistantService constructor. /// /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2021-06-14`. + /// The current version is `2021-11-27`. /// The service authenticator. public AssistantService(string version, Authenticator authenticator) : this(version, defaultServiceName, authenticator) {} @@ -83,7 +83,7 @@ public AssistantService(string version, Authenticator authenticator) : this(vers /// AssistantService constructor. /// /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2021-06-14`. + /// The current version is `2021-11-27`. /// The service name to be used when configuring the client instance public AssistantService(string version, string serviceName) : this(version, serviceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(serviceName)) {} @@ -91,7 +91,7 @@ public AssistantService(string version, string serviceName) : this(version, serv /// AssistantService constructor. /// /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2021-06-14`. + /// The current version is `2021-11-27`. /// The service name to be used when configuring the client instance /// The service authenticator. public AssistantService(string version, string serviceName, Authenticator authenticator) : base(authenticator, serviceName) diff --git a/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGeneric.cs b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGeneric.cs index 8374d5404..1554fefae 100644 --- a/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGeneric.cs +++ b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGeneric.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,16 +32,22 @@ namespace IBM.Watson.Assistant.V1.Model /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined + /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo + /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio + /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe /// [JsonConverter(typeof(JsonSubtypes), "response_type")] + [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio), "audio")] [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer), "channel_transfer")] [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent), "connect_to_agent")] + [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe), "iframe")] [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeImage), "image")] [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeOption), "option")] [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypePause), "pause")] [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill), "search_skill")] [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeText), "text")] [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined), "user_defined")] + [JsonSubtypes.KnownSubType(typeof(DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo), "video")] public class DialogNodeOutputGeneric { /// This ctor is protected to prevent instantiation of this base class. @@ -54,6 +60,9 @@ public class DialogNodeOutputGeneric /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeSearchSkill /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeUserDefined + /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo + /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio + /// - DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe protected DialogNodeOutputGeneric() { } @@ -233,5 +242,15 @@ public class QueryTypeValue /// [JsonProperty("user_defined", NullValueHandling = NullValueHandling.Ignore)] public Dictionary UserDefined { get; protected set; } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public object ChannelOptions { get; protected set; } + /// + /// The URL of an image that shows a preview of the embedded content. + /// + [JsonProperty("image_url", NullValueHandling = NullValueHandling.Ignore)] + public string ImageUrl { get; protected set; } } } diff --git a/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.cs b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.cs new file mode 100644 index 000000000..22c3f5507 --- /dev/null +++ b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.cs @@ -0,0 +1,95 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V1.Model +{ + /// + /// DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio. + /// + public class DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio : DialogNodeOutputGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the audio clip. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// An optional title to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// An optional description to show with the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public new object ChannelOptions + { + get { return base.ChannelOptions; } + set { base.ChannelOptions = value; } + } + /// + /// Descriptive text that can be used for screen readers or other situations where the audio player cannot be + /// seen. + /// + [JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)] + public new string AltText + { + get { return base.AltText; } + set { base.AltText = value; } + } + } +} diff --git a/Scripts/Services/CompareComply/V1/CompareComplyService.cs.meta b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.cs.meta similarity index 83% rename from Scripts/Services/CompareComply/V1/CompareComplyService.cs.meta rename to Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.cs.meta index b0d9a35d2..c83d5875f 100644 --- a/Scripts/Services/CompareComply/V1/CompareComplyService.cs.meta +++ b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeAudio.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9e86944e1c2e2ad4aafe3fb02f48b6d5 +guid: d117bc46c50584061ba6e27f66d2b5b5 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.cs b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.cs new file mode 100644 index 000000000..87a995ee0 --- /dev/null +++ b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.cs @@ -0,0 +1,85 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V1.Model +{ + /// + /// DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe. + /// + public class DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe : DialogNodeOutputGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the embeddable content. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// An optional title to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// An optional description to show with the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// The URL of an image that shows a preview of the embedded content. + /// + [JsonProperty("image_url", NullValueHandling = NullValueHandling.Ignore)] + public new string ImageUrl + { + get { return base.ImageUrl; } + set { base.ImageUrl = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + } +} diff --git a/Scripts/Services/Assistant/V2/Model/DialogNodesVisited.cs.meta b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.cs.meta similarity index 83% rename from Scripts/Services/Assistant/V2/Model/DialogNodesVisited.cs.meta rename to Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.cs.meta index d60b0af7d..b66af521b 100644 --- a/Scripts/Services/Assistant/V2/Model/DialogNodesVisited.cs.meta +++ b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeIframe.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 983fb219eb5d624419f61f02fc18c8ef +guid: 640a10c3e65fc4485a6d918ad141b936 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.cs b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.cs new file mode 100644 index 000000000..d4e05e414 --- /dev/null +++ b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.cs @@ -0,0 +1,94 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V1.Model +{ + /// + /// DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo. + /// + public class DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo : DialogNodeOutputGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the video. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// An optional title to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// An optional description to show with the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public new object ChannelOptions + { + get { return base.ChannelOptions; } + set { base.ChannelOptions = value; } + } + /// + /// Descriptive text that can be used for screen readers or other situations where the video cannot be seen. + /// + [JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)] + public new string AltText + { + get { return base.AltText; } + set { base.AltText = value; } + } + } +} diff --git a/Scripts/Services/CompareComply/V1/Model/Address.cs.meta b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.cs.meta similarity index 83% rename from Scripts/Services/CompareComply/V1/Model/Address.cs.meta rename to Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.cs.meta index 055ff3bea..41f1443fd 100644 --- a/Scripts/Services/CompareComply/V1/Model/Address.cs.meta +++ b/Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeVideo.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4f17b61b89131e842aafe6c421737f80 +guid: 3bb2c412039ec4838a6598a996670c58 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Scripts/Services/Assistant/V1/Model/OutputData.cs b/Scripts/Services/Assistant/V1/Model/OutputData.cs index e700e5824..63d492088 100644 --- a/Scripts/Services/Assistant/V1/Model/OutputData.cs +++ b/Scripts/Services/Assistant/V1/Model/OutputData.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2020. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,11 +46,6 @@ public class OutputData : DynamicModel [JsonProperty("log_messages", NullValueHandling = NullValueHandling.Ignore)] public List LogMessages { get; set; } /// - /// An array of responses to the user. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public List Text { get; set; } - /// /// Output intended for any channel. It is the responsibility of the client application to implement the /// supported response types. /// diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeEntity.cs b/Scripts/Services/Assistant/V1/Model/RuntimeEntity.cs index 31e6d138a..6568d0ce3 100644 --- a/Scripts/Services/Assistant/V1/Model/RuntimeEntity.cs +++ b/Scripts/Services/Assistant/V1/Model/RuntimeEntity.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2021. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,14 +47,6 @@ public class RuntimeEntity [JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)] public float? Confidence { get; set; } /// - /// **Deprecated.** Any metadata for the entity. - /// - /// Beginning with the `2021-06-14` API version, the `metadata` property is no longer returned. For information - /// about system entities recognized in the user input, see the `interpretation` property. - /// - [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] - public Dictionary Metadata { get; set; } - /// /// The recognized capture groups for the entity, as defined by the entity pattern. /// [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGeneric.cs b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGeneric.cs index 4638fcb8c..12b989570 100644 --- a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGeneric.cs +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGeneric.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,16 +32,22 @@ namespace IBM.Watson.Assistant.V1.Model /// - RuntimeResponseGenericRuntimeResponseTypeSuggestion /// - RuntimeResponseGenericRuntimeResponseTypeChannelTransfer /// - RuntimeResponseGenericRuntimeResponseTypeUserDefined + /// - RuntimeResponseGenericRuntimeResponseTypeVideo + /// - RuntimeResponseGenericRuntimeResponseTypeAudio + /// - RuntimeResponseGenericRuntimeResponseTypeIframe /// [JsonConverter(typeof(JsonSubtypes), "response_type")] + [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeAudio), "audio")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeChannelTransfer), "channel_transfer")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeConnectToAgent), "connect_to_agent")] + [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeIframe), "iframe")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeImage), "image")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeOption), "option")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeSuggestion), "suggestion")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypePause), "pause")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeText), "text")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeUserDefined), "user_defined")] + [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeVideo), "video")] public class RuntimeResponseGeneric { /// This ctor is protected to prevent instantiation of this base class. @@ -54,6 +60,9 @@ public class RuntimeResponseGeneric /// - RuntimeResponseGenericRuntimeResponseTypeSuggestion /// - RuntimeResponseGenericRuntimeResponseTypeChannelTransfer /// - RuntimeResponseGenericRuntimeResponseTypeUserDefined + /// - RuntimeResponseGenericRuntimeResponseTypeVideo + /// - RuntimeResponseGenericRuntimeResponseTypeAudio + /// - RuntimeResponseGenericRuntimeResponseTypeIframe protected RuntimeResponseGeneric() { } @@ -118,7 +127,7 @@ public class PreferenceValue [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] public string Title { get; protected set; } /// - /// The description to show with the the response. + /// The description to show with the response. /// [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] public string Description { get; protected set; } @@ -176,5 +185,15 @@ public class PreferenceValue /// [JsonProperty("user_defined", NullValueHandling = NullValueHandling.Ignore)] public Dictionary UserDefined { get; protected set; } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public object ChannelOptions { get; protected set; } + /// + /// The URL of an image that shows a preview of the embedded content. + /// + [JsonProperty("image_url", NullValueHandling = NullValueHandling.Ignore)] + public string ImageUrl { get; protected set; } } } diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs new file mode 100644 index 000000000..fdef8b6f7 --- /dev/null +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs @@ -0,0 +1,95 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V1.Model +{ + /// + /// RuntimeResponseGenericRuntimeResponseTypeAudio. + /// + public class RuntimeResponseGenericRuntimeResponseTypeAudio : RuntimeResponseGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the audio clip. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// The title or introductory text to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// The description to show with the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public new object ChannelOptions + { + get { return base.ChannelOptions; } + set { base.ChannelOptions = value; } + } + /// + /// Descriptive text that can be used for screen readers or other situations where the audio player cannot be + /// seen. + /// + [JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)] + public new string AltText + { + get { return base.AltText; } + set { base.AltText = value; } + } + } +} diff --git a/Scripts/Services/CompareComply/V1/Model/AlignedElement.cs.meta b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs.meta similarity index 83% rename from Scripts/Services/CompareComply/V1/Model/AlignedElement.cs.meta rename to Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs.meta index 0f02667f4..50fd76bd1 100644 --- a/Scripts/Services/CompareComply/V1/Model/AlignedElement.cs.meta +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9b1023de533ecf54e89d83c2158f36fe +guid: ed5da2796a19a4544aedecde422b63f3 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs new file mode 100644 index 000000000..3429a0d4f --- /dev/null +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs @@ -0,0 +1,85 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V1.Model +{ + /// + /// RuntimeResponseGenericRuntimeResponseTypeIframe. + /// + public class RuntimeResponseGenericRuntimeResponseTypeIframe : RuntimeResponseGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the embeddable content. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// The title or introductory text to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// The description to show with the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// The URL of an image that shows a preview of the embedded content. + /// + [JsonProperty("image_url", NullValueHandling = NullValueHandling.Ignore)] + public new string ImageUrl + { + get { return base.ImageUrl; } + set { base.ImageUrl = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + } +} diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs.meta b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs.meta new file mode 100644 index 000000000..29026f951 --- /dev/null +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a8236fc5e9f5149acafa9507ba994718 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeImage.cs b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeImage.cs index d210b77cf..eb6618949 100644 --- a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeImage.cs +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeImage.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2020, 2021. +* (C) Copyright IBM Corp. 2020, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ public class RuntimeResponseGenericRuntimeResponseTypeImage : RuntimeResponseGen set { base.Title = value; } } /// - /// The description to show with the the response. + /// The description to show with the response. /// [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] public new string Description diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeOption.cs b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeOption.cs index 85ca2ce1a..53e73008a 100644 --- a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeOption.cs +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeOption.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2020, 2021. +* (C) Copyright IBM Corp. 2020, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,7 +61,7 @@ public class PreferenceValue set { base.Title = value; } } /// - /// The description to show with the the response. + /// The description to show with the response. /// [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] public new string Description diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs new file mode 100644 index 000000000..bb6d2705d --- /dev/null +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs @@ -0,0 +1,94 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V1.Model +{ + /// + /// RuntimeResponseGenericRuntimeResponseTypeVideo. + /// + public class RuntimeResponseGenericRuntimeResponseTypeVideo : RuntimeResponseGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the video. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// The title or introductory text to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// The description to show with the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public new object ChannelOptions + { + get { return base.ChannelOptions; } + set { base.ChannelOptions = value; } + } + /// + /// Descriptive text that can be used for screen readers or other situations where the video cannot be seen. + /// + [JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)] + public new string AltText + { + get { return base.AltText; } + set { base.AltText = value; } + } + } +} diff --git a/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs.meta b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs.meta new file mode 100644 index 000000000..153ac07fd --- /dev/null +++ b/Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 06960a1240ffc4fb59f2e910fcb2bdb1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Assistant/V1/Model/WorkspaceSystemSettings.cs b/Scripts/Services/Assistant/V1/Model/WorkspaceSystemSettings.cs index 344002c35..d6ca386ab 100644 --- a/Scripts/Services/Assistant/V1/Model/WorkspaceSystemSettings.cs +++ b/Scripts/Services/Assistant/V1/Model/WorkspaceSystemSettings.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2020. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ */ using System.Collections.Generic; +using IBM.Cloud.SDK.Model; using Newtonsoft.Json; namespace IBM.Watson.Assistant.V1.Model @@ -23,7 +24,7 @@ namespace IBM.Watson.Assistant.V1.Model /// /// Global settings for the workspace. /// - public class WorkspaceSystemSettings + public class WorkspaceSystemSettings : DynamicModel { /// /// Workspace settings related to the Watson Assistant user interface. diff --git a/Scripts/Services/Assistant/V2/AssistantService.cs b/Scripts/Services/Assistant/V2/AssistantService.cs index 81f89bc5f..9975772fa 100644 --- a/Scripts/Services/Assistant/V2/AssistantService.cs +++ b/Scripts/Services/Assistant/V2/AssistantService.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ */ /** -* IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025 +* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428 */ using System.Collections.Generic; @@ -43,7 +43,7 @@ public partial class AssistantService : BaseService /// /// Gets and sets the version of the service. /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is - /// `2021-06-14`. + /// `2021-11-27`. /// public string Version { @@ -68,14 +68,14 @@ public bool DisableSslVerification /// AssistantService constructor. /// /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2021-06-14`. + /// The current version is `2021-11-27`. public AssistantService(string version) : this(version, defaultServiceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(defaultServiceName)) {} /// /// AssistantService constructor. /// /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2021-06-14`. + /// The current version is `2021-11-27`. /// The service authenticator. public AssistantService(string version, Authenticator authenticator) : this(version, defaultServiceName, authenticator) {} @@ -83,7 +83,7 @@ public AssistantService(string version, Authenticator authenticator) : this(vers /// AssistantService constructor. /// /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2021-06-14`. + /// The current version is `2021-11-27`. /// The service name to be used when configuring the client instance public AssistantService(string version, string serviceName) : this(version, serviceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(serviceName)) {} @@ -91,7 +91,7 @@ public AssistantService(string version, string serviceName) : this(version, serv /// AssistantService constructor. /// /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2021-06-14`. + /// The current version is `2021-11-27`. /// The service name to be used when configuring the client instance /// The service authenticator. public AssistantService(string version, string serviceName, Authenticator authenticator) : base(authenticator, serviceName) diff --git a/Scripts/Services/Assistant/V2/Model/DialogNodesVisited.cs b/Scripts/Services/Assistant/V2/Model/DialogNodeVisited.cs similarity index 86% rename from Scripts/Services/Assistant/V2/Model/DialogNodesVisited.cs rename to Scripts/Services/Assistant/V2/Model/DialogNodeVisited.cs index e65960e35..f3d76787e 100644 --- a/Scripts/Services/Assistant/V2/Model/DialogNodesVisited.cs +++ b/Scripts/Services/Assistant/V2/Model/DialogNodeVisited.cs @@ -1,5 +1,5 @@ /** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. +* (C) Copyright IBM Corp. 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,10 @@ namespace IBM.Watson.Assistant.V2.Model { /// - /// DialogNodesVisited. + /// An objects containing detailed diagnostic information about a dialog node that was triggered during processing + /// of the input message. /// - public class DialogNodesVisited + public class DialogNodeVisited { /// /// A dialog node that was triggered during processing of the input message. diff --git a/Scripts/Services/Assistant/V2/Model/DialogNodeVisited.cs.meta b/Scripts/Services/Assistant/V2/Model/DialogNodeVisited.cs.meta new file mode 100644 index 000000000..225c0ab42 --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/DialogNodeVisited.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c3bc6c18489fe4a7084fc24b9a8110d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Assistant/V2/Model/MessageContext.cs b/Scripts/Services/Assistant/V2/Model/MessageContext.cs index a5210edf5..d9f541f3e 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageContext.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageContext.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2020. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ namespace IBM.Watson.Assistant.V2.Model public class MessageContext { /// - /// Session context data that is shared by all skills used by the Assistant. + /// Session context data that is shared by all skills used by the assistant. /// [JsonProperty("global", NullValueHandling = NullValueHandling.Ignore)] public MessageContextGlobal Global { get; set; } @@ -38,5 +38,11 @@ public class MessageContext /// [JsonProperty("skills", NullValueHandling = NullValueHandling.Ignore)] public Dictionary Skills { get; set; } + /// + /// An object containing context data that is specific to particular integrations. For more information, see the + /// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations). + /// + [JsonProperty("integrations", NullValueHandling = NullValueHandling.Ignore)] + public object Integrations { get; set; } } } diff --git a/Scripts/Services/Assistant/V2/Model/MessageContextGlobal.cs b/Scripts/Services/Assistant/V2/Model/MessageContextGlobal.cs index e97ee499b..4c23eec5a 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageContextGlobal.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageContextGlobal.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2020. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ namespace IBM.Watson.Assistant.V2.Model { /// - /// Session context data that is shared by all skills used by the Assistant. + /// Session context data that is shared by all skills used by the assistant. /// public class MessageContextGlobal { diff --git a/Scripts/Services/Assistant/V2/Model/MessageContextGlobalStateless.cs b/Scripts/Services/Assistant/V2/Model/MessageContextGlobalStateless.cs index 2f2303494..78c2b987f 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageContextGlobalStateless.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageContextGlobalStateless.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2020. +* (C) Copyright IBM Corp. 2020, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ namespace IBM.Watson.Assistant.V2.Model { /// - /// Session context data that is shared by all skills used by the Assistant. + /// Session context data that is shared by all skills used by the assistant. /// public class MessageContextGlobalStateless { diff --git a/Scripts/Services/Assistant/V2/Model/MessageContextGlobalSystem.cs b/Scripts/Services/Assistant/V2/Model/MessageContextGlobalSystem.cs index a49947862..695f46d9c 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageContextGlobalSystem.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageContextGlobalSystem.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2021. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -162,5 +162,10 @@ public class LocaleValue /// [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] public string State { get; set; } + /// + /// For internal use only. + /// + [JsonProperty("skip_user_input", NullValueHandling = NullValueHandling.Ignore)] + public bool? SkipUserInput { get; set; } } } diff --git a/Scripts/Services/Assistant/V2/Model/MessageContextSkill.cs b/Scripts/Services/Assistant/V2/Model/MessageContextSkill.cs index 4d28f5c9c..8b0b4bd57 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageContextSkill.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageContextSkill.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2020. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ namespace IBM.Watson.Assistant.V2.Model { /// - /// Contains information specific to a particular skill used by the Assistant. The property name must be the same as + /// Contains information specific to a particular skill used by the assistant. The property name must be the same as /// the name of the skill (for example, `main skill`). /// public class MessageContextSkill diff --git a/Scripts/Services/Assistant/V2/Model/MessageContextStateless.cs b/Scripts/Services/Assistant/V2/Model/MessageContextStateless.cs index ad155d1d7..bf8f68942 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageContextStateless.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageContextStateless.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2020. +* (C) Copyright IBM Corp. 2020, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ namespace IBM.Watson.Assistant.V2.Model public class MessageContextStateless { /// - /// Session context data that is shared by all skills used by the Assistant. + /// Session context data that is shared by all skills used by the assistant. /// [JsonProperty("global", NullValueHandling = NullValueHandling.Ignore)] public MessageContextGlobalStateless Global { get; set; } @@ -38,5 +38,11 @@ public class MessageContextStateless /// [JsonProperty("skills", NullValueHandling = NullValueHandling.Ignore)] public Dictionary Skills { get; set; } + /// + /// An object containing context data that is specific to particular integrations. For more information, see the + /// [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations). + /// + [JsonProperty("integrations", NullValueHandling = NullValueHandling.Ignore)] + public object Integrations { get; set; } } } diff --git a/Scripts/Services/Assistant/V2/Model/MessageInput.cs b/Scripts/Services/Assistant/V2/Model/MessageInput.cs index 9c2e74b7a..03f6bf99e 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageInput.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageInput.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2021. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,6 +80,14 @@ public class MessageTypeValue [JsonProperty("suggestion_id", NullValueHandling = NullValueHandling.Ignore)] public string SuggestionId { get; set; } /// + /// An array of multimedia attachments to be sent with the message. + /// + /// **Note:** Attachments are not processed by the assistant itself, but can be sent to external services by + /// webhooks. + /// + [JsonProperty("attachments", NullValueHandling = NullValueHandling.Ignore)] + public List Attachments { get; set; } + /// /// Optional properties that control how the assistant responds. /// [JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)] diff --git a/Scripts/Services/VisualRecognition/V3/Model/WarningInfo.cs b/Scripts/Services/Assistant/V2/Model/MessageInputAttachment.cs similarity index 58% rename from Scripts/Services/VisualRecognition/V3/Model/WarningInfo.cs rename to Scripts/Services/Assistant/V2/Model/MessageInputAttachment.cs index 9fb197796..73b5a4008 100644 --- a/Scripts/Services/VisualRecognition/V3/Model/WarningInfo.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageInputAttachment.cs @@ -1,5 +1,5 @@ /** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. +* (C) Copyright IBM Corp. 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,22 +17,22 @@ using Newtonsoft.Json; -namespace IBM.Watson.VisualRecognition.V3.Model +namespace IBM.Watson.Assistant.V2.Model { /// - /// Information about something that went wrong. + /// A reference to a media file to be sent as an attachment with the message. /// - public class WarningInfo + public class MessageInputAttachment { /// - /// Codified warning string, such as `limit_reached`. + /// The URL of the media file. /// - [JsonProperty("warning_id", NullValueHandling = NullValueHandling.Ignore)] - public string WarningId { get; set; } + [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] + public string Url { get; set; } /// - /// Information about the error. + /// The media content type (such as a MIME type) of the attachment. /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } + [JsonProperty("media_type", NullValueHandling = NullValueHandling.Ignore)] + public string MediaType { get; set; } } } diff --git a/Scripts/Services/Assistant/V2/Model/MessageInputAttachment.cs.meta b/Scripts/Services/Assistant/V2/Model/MessageInputAttachment.cs.meta new file mode 100644 index 000000000..fe80b4337 --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/MessageInputAttachment.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 80a2572c1baf74c92a6bf32da452e8bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Assistant/V2/Model/MessageInputStateless.cs b/Scripts/Services/Assistant/V2/Model/MessageInputStateless.cs index 7b88a5a96..5dc1efcf8 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageInputStateless.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageInputStateless.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2021. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,6 +80,14 @@ public class MessageTypeValue [JsonProperty("suggestion_id", NullValueHandling = NullValueHandling.Ignore)] public string SuggestionId { get; set; } /// + /// An array of multimedia attachments to be sent with the message. + /// + /// **Note:** Attachments are not processed by the assistant itself, but can be sent to external services by + /// webhooks. + /// + [JsonProperty("attachments", NullValueHandling = NullValueHandling.Ignore)] + public List Attachments { get; set; } + /// /// Optional properties that control how the assistant responds. /// [JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)] diff --git a/Scripts/Services/Assistant/V2/Model/MessageOutputDebug.cs b/Scripts/Services/Assistant/V2/Model/MessageOutputDebug.cs index f6def7ac5..7dd7bcbb3 100644 --- a/Scripts/Services/Assistant/V2/Model/MessageOutputDebug.cs +++ b/Scripts/Services/Assistant/V2/Model/MessageOutputDebug.cs @@ -1,5 +1,5 @@ /** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ namespace IBM.Watson.Assistant.V2.Model public class MessageOutputDebug { /// - /// When `branch_exited` is set to `true` by the Assistant, the `branch_exited_reason` specifies whether the + /// When `branch_exited` is set to `true` by the assistant, the `branch_exited_reason` specifies whether the /// dialog completed by itself or got interrupted. /// public class BranchExitedReasonValue @@ -43,18 +43,18 @@ public class BranchExitedReasonValue } /// - /// When `branch_exited` is set to `true` by the Assistant, the `branch_exited_reason` specifies whether the + /// When `branch_exited` is set to `true` by the assistant, the `branch_exited_reason` specifies whether the /// dialog completed by itself or got interrupted. /// Constants for possible values can be found using MessageOutputDebug.BranchExitedReasonValue /// [JsonProperty("branch_exited_reason", NullValueHandling = NullValueHandling.Ignore)] public string BranchExitedReason { get; set; } /// - /// An array of objects containing detailed diagnostic information about the nodes that were triggered during + /// An array of objects containing detailed diagnostic information about dialog nodes that were triggered during /// processing of the input message. /// [JsonProperty("nodes_visited", NullValueHandling = NullValueHandling.Ignore)] - public List NodesVisited { get; set; } + public List NodesVisited { get; set; } /// /// An array of up to 50 messages logged with the request. /// diff --git a/Scripts/Services/Assistant/V2/Model/RuntimeEntity.cs b/Scripts/Services/Assistant/V2/Model/RuntimeEntity.cs index 36d2c8e78..4c9fadc38 100644 --- a/Scripts/Services/Assistant/V2/Model/RuntimeEntity.cs +++ b/Scripts/Services/Assistant/V2/Model/RuntimeEntity.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2021. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,14 +47,6 @@ public class RuntimeEntity [JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)] public float? Confidence { get; set; } /// - /// **Deprecated.** Any metadata for the entity. - /// - /// Beginning with the `2021-06-14` API version, the `metadata` property is no longer returned. For information - /// about system entities recognized in the user input, see the `interpretation` property. - /// - [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] - public Dictionary Metadata { get; set; } - /// /// The recognized capture groups for the entity, as defined by the entity pattern. /// [JsonProperty("groups", NullValueHandling = NullValueHandling.Ignore)] diff --git a/Scripts/Services/Assistant/V2/Model/RuntimeResponseGeneric.cs b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGeneric.cs index 64e8ccd26..353a8ac08 100644 --- a/Scripts/Services/Assistant/V2/Model/RuntimeResponseGeneric.cs +++ b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGeneric.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,10 +33,15 @@ namespace IBM.Watson.Assistant.V2.Model /// - RuntimeResponseGenericRuntimeResponseTypeChannelTransfer /// - RuntimeResponseGenericRuntimeResponseTypeSearch /// - RuntimeResponseGenericRuntimeResponseTypeUserDefined + /// - RuntimeResponseGenericRuntimeResponseTypeVideo + /// - RuntimeResponseGenericRuntimeResponseTypeAudio + /// - RuntimeResponseGenericRuntimeResponseTypeIframe /// [JsonConverter(typeof(JsonSubtypes), "response_type")] + [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeAudio), "audio")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeChannelTransfer), "channel_transfer")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeConnectToAgent), "connect_to_agent")] + [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeIframe), "iframe")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeImage), "image")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeOption), "option")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeSuggestion), "suggestion")] @@ -44,6 +49,7 @@ namespace IBM.Watson.Assistant.V2.Model [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeSearch), "search")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeText), "text")] [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeUserDefined), "user_defined")] + [JsonSubtypes.KnownSubType(typeof(RuntimeResponseGenericRuntimeResponseTypeVideo), "video")] public class RuntimeResponseGeneric { /// This ctor is protected to prevent instantiation of this base class. @@ -57,6 +63,9 @@ public class RuntimeResponseGeneric /// - RuntimeResponseGenericRuntimeResponseTypeChannelTransfer /// - RuntimeResponseGenericRuntimeResponseTypeSearch /// - RuntimeResponseGenericRuntimeResponseTypeUserDefined + /// - RuntimeResponseGenericRuntimeResponseTypeVideo + /// - RuntimeResponseGenericRuntimeResponseTypeAudio + /// - RuntimeResponseGenericRuntimeResponseTypeIframe protected RuntimeResponseGeneric() { } @@ -189,5 +198,15 @@ public class PreferenceValue /// [JsonProperty("user_defined", NullValueHandling = NullValueHandling.Ignore)] public Dictionary UserDefined { get; protected set; } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public object ChannelOptions { get; protected set; } + /// + /// The URL of an image that shows a preview of the embedded content. + /// + [JsonProperty("image_url", NullValueHandling = NullValueHandling.Ignore)] + public string ImageUrl { get; protected set; } } } diff --git a/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs new file mode 100644 index 000000000..7033fb1a8 --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs @@ -0,0 +1,95 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V2.Model +{ + /// + /// RuntimeResponseGenericRuntimeResponseTypeAudio. + /// + public class RuntimeResponseGenericRuntimeResponseTypeAudio : RuntimeResponseGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the audio clip. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// The title or introductory text to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// The description to show with the the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public new object ChannelOptions + { + get { return base.ChannelOptions; } + set { base.ChannelOptions = value; } + } + /// + /// Descriptive text that can be used for screen readers or other situations where the audio player cannot be + /// seen. + /// + [JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)] + public new string AltText + { + get { return base.AltText; } + set { base.AltText = value; } + } + } +} diff --git a/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs.meta b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs.meta new file mode 100644 index 000000000..8074dbf00 --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeAudio.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eaefd495a5ca947e5a7a8ffcc30c5748 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs new file mode 100644 index 000000000..f82e5681d --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs @@ -0,0 +1,85 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V2.Model +{ + /// + /// RuntimeResponseGenericRuntimeResponseTypeIframe. + /// + public class RuntimeResponseGenericRuntimeResponseTypeIframe : RuntimeResponseGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the embeddable content. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// The title or introductory text to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// The description to show with the the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// The URL of an image that shows a preview of the embedded content. + /// + [JsonProperty("image_url", NullValueHandling = NullValueHandling.Ignore)] + public new string ImageUrl + { + get { return base.ImageUrl; } + set { base.ImageUrl = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + } +} diff --git a/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs.meta b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs.meta new file mode 100644 index 000000000..858f56d55 --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeIframe.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e950c1acdde3441e5bac19b3903de1b3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs new file mode 100644 index 000000000..c6a43b285 --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs @@ -0,0 +1,94 @@ +/** +* (C) Copyright IBM Corp. 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Assistant.V2.Model +{ + /// + /// RuntimeResponseGenericRuntimeResponseTypeVideo. + /// + public class RuntimeResponseGenericRuntimeResponseTypeVideo : RuntimeResponseGeneric + { + /// + /// The type of response returned by the dialog node. The specified response type must be supported by the + /// client application or channel. + /// + [JsonProperty("response_type", NullValueHandling = NullValueHandling.Ignore)] + public new string ResponseType + { + get { return base.ResponseType; } + set { base.ResponseType = value; } + } + /// + /// The `https:` URL of the video. + /// + [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] + public new string Source + { + get { return base.Source; } + set { base.Source = value; } + } + /// + /// The title or introductory text to show before the response. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public new string Title + { + get { return base.Title; } + set { base.Title = value; } + } + /// + /// The description to show with the the response. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public new string Description + { + get { return base.Description; } + set { base.Description = value; } + } + /// + /// An array of objects specifying channels for which the response is intended. If **channels** is present, the + /// response is intended for a built-in integration and should not be handled by an API client. + /// + [JsonProperty("channels", NullValueHandling = NullValueHandling.Ignore)] + public new List Channels + { + get { return base.Channels; } + set { base.Channels = value; } + } + /// + /// For internal use only. + /// + [JsonProperty("channel_options", NullValueHandling = NullValueHandling.Ignore)] + public new object ChannelOptions + { + get { return base.ChannelOptions; } + set { base.ChannelOptions = value; } + } + /// + /// Descriptive text that can be used for screen readers or other situations where the video cannot be seen. + /// + [JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)] + public new string AltText + { + get { return base.AltText; } + set { base.AltText = value; } + } + } +} diff --git a/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs.meta b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs.meta new file mode 100644 index 000000000..e2b28a6be --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/RuntimeResponseGenericRuntimeResponseTypeVideo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 35dcc9473cfdd46ed89a35a55438ce2b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Assistant/V2/Model/SearchResultAnswer.cs.meta b/Scripts/Services/Assistant/V2/Model/SearchResultAnswer.cs.meta new file mode 100644 index 000000000..25e94c55e --- /dev/null +++ b/Scripts/Services/Assistant/V2/Model/SearchResultAnswer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bc0ac2a9373b64d498a344b8fe3c4e4b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/CompareComply.meta b/Scripts/Services/CompareComply.meta deleted file mode 100644 index 5473f591b..000000000 --- a/Scripts/Services/CompareComply.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a6e07a6ab077d1843a2c1fa31922a742 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1.meta b/Scripts/Services/CompareComply/V1.meta deleted file mode 100644 index b075aadb8..000000000 --- a/Scripts/Services/CompareComply/V1.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d93d8af56cce6d84eae54172a3117a8a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/CompareComplyService.cs b/Scripts/Services/CompareComply/V1/CompareComplyService.cs deleted file mode 100644 index ee968f3d2..000000000 --- a/Scripts/Services/CompareComply/V1/CompareComplyService.cs +++ /dev/null @@ -1,1284 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2021. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -/** -* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-a45d89ef-20201209-153452 -*/ - -using System.Collections.Generic; -using System.Text; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Connection; -using IBM.Cloud.SDK.Utilities; -using IBM.Watson.CompareComply.V1.Model; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using UnityEngine.Networking; - -namespace IBM.Watson.CompareComply.V1 -{ - [System.Obsolete("On 30 November 2021, Compare and Comply will no longer be available." + - "\nFor more information, see Compare and Comply Deprecation " + - "(https://github.com/watson-developer-cloud/unity-sdk/tree/master#compare-and-comply-deprecation).")] - - public partial class CompareComplyService : BaseService - { - private const string defaultServiceName = "compare_comply"; - private const string defaultServiceUrl = "https://api.us-south.compare-comply.watson.cloud.ibm.com"; - - #region Version - private string version; - /// - /// Gets and sets the version of the service. - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current - /// version is `2018-10-15`. - /// - public string Version - { - get { return version; } - set { version = value; } - } - #endregion - - #region DisableSslVerification - private bool disableSslVerification = false; - /// - /// Gets and sets the option to disable ssl verification - /// - public bool DisableSslVerification - { - get { return disableSslVerification; } - set { disableSslVerification = value; } - } - #endregion - - /// - /// CompareComplyService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2018-10-15`. - public CompareComplyService(string version) : this(version, defaultServiceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(defaultServiceName)) {} - - /// - /// CompareComplyService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2018-10-15`. - /// The service authenticator. - public CompareComplyService(string version, Authenticator authenticator) : this(version, defaultServiceName, authenticator) {} - - /// - /// CompareComplyService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2018-10-15`. - /// The service name to be used when configuring the client instance - public CompareComplyService(string version, string serviceName) : this(version, serviceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(serviceName)) {} - - /// - /// CompareComplyService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2018-10-15`. - /// The service name to be used when configuring the client instance - /// The service authenticator. - public CompareComplyService(string version, string serviceName, Authenticator authenticator) : base(authenticator, serviceName) - { - Authenticator = authenticator; - - if (string.IsNullOrEmpty(version)) - { - throw new ArgumentNullException("`version` is required"); - } - else - { - Version = version; - } - - if (string.IsNullOrEmpty(GetServiceUrl())) - { - SetServiceUrl(defaultServiceUrl); - } - } - - /// - /// Convert document to HTML. - /// - /// Converts a document to HTML. - /// - /// The callback function that is invoked when the operation completes. - /// The document to convert. - /// The content type of file. (optional) - /// The analysis model to be used by the service. For the **Element classification** and - /// **Compare two documents** methods, the default is `contracts`. For the **Extract tables** method, the - /// default is `tables`. These defaults apply to the standalone methods as well as to the methods' use in - /// batch-processing requests. (optional) - /// HTMLReturn - public bool ConvertToHtml(Callback callback, System.IO.MemoryStream file, string fileContentType = null, string model = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ConvertToHtml`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (file == null) - throw new ArgumentNullException("`file` is required for `ConvertToHtml`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "ConvertToHtml")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (file != null) - { - req.Forms["file"] = new RESTConnector.Form(file, "filename", fileContentType); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(model)) - { - req.Parameters["model"] = model; - } - - req.OnResponse = OnConvertToHtmlResponse; - - Connector.URL = GetServiceUrl() + "/v1/html_conversion"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnConvertToHtmlResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnConvertToHtmlResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Classify the elements of a document. - /// - /// Analyzes the structural and semantic elements of a document. - /// - /// The callback function that is invoked when the operation completes. - /// The document to classify. - /// The content type of file. (optional) - /// The analysis model to be used by the service. For the **Element classification** and - /// **Compare two documents** methods, the default is `contracts`. For the **Extract tables** method, the - /// default is `tables`. These defaults apply to the standalone methods as well as to the methods' use in - /// batch-processing requests. (optional) - /// ClassifyReturn - public bool ClassifyElements(Callback callback, System.IO.MemoryStream file, string fileContentType = null, string model = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ClassifyElements`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (file == null) - throw new ArgumentNullException("`file` is required for `ClassifyElements`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "ClassifyElements")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (file != null) - { - req.Forms["file"] = new RESTConnector.Form(file, "filename", fileContentType); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(model)) - { - req.Parameters["model"] = model; - } - - req.OnResponse = OnClassifyElementsResponse; - - Connector.URL = GetServiceUrl() + "/v1/element_classification"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnClassifyElementsResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnClassifyElementsResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Extract a document's tables. - /// - /// Analyzes the tables in a document. - /// - /// The callback function that is invoked when the operation completes. - /// The document on which to run table extraction. - /// The content type of file. (optional) - /// The analysis model to be used by the service. For the **Element classification** and - /// **Compare two documents** methods, the default is `contracts`. For the **Extract tables** method, the - /// default is `tables`. These defaults apply to the standalone methods as well as to the methods' use in - /// batch-processing requests. (optional) - /// TableReturn - public bool ExtractTables(Callback callback, System.IO.MemoryStream file, string fileContentType = null, string model = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ExtractTables`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (file == null) - throw new ArgumentNullException("`file` is required for `ExtractTables`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "ExtractTables")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (file != null) - { - req.Forms["file"] = new RESTConnector.Form(file, "filename", fileContentType); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(model)) - { - req.Parameters["model"] = model; - } - - req.OnResponse = OnExtractTablesResponse; - - Connector.URL = GetServiceUrl() + "/v1/tables"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnExtractTablesResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnExtractTablesResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Compare two documents. - /// - /// Compares two input documents. Documents must be in the same format. - /// - /// The callback function that is invoked when the operation completes. - /// The first document to compare. - /// The second document to compare. - /// The content type of file1. (optional) - /// The content type of file2. (optional) - /// A text label for the first document. (optional, default to file_1) - /// A text label for the second document. (optional, default to file_2) - /// The analysis model to be used by the service. For the **Element classification** and - /// **Compare two documents** methods, the default is `contracts`. For the **Extract tables** method, the - /// default is `tables`. These defaults apply to the standalone methods as well as to the methods' use in - /// batch-processing requests. (optional) - /// CompareReturn - public bool CompareDocuments(Callback callback, System.IO.MemoryStream file1, System.IO.MemoryStream file2, string file1ContentType = null, string file2ContentType = null, string file1Label = null, string file2Label = null, string model = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `CompareDocuments`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (file1 == null) - throw new ArgumentNullException("`file1` is required for `CompareDocuments`"); - if (file2 == null) - throw new ArgumentNullException("`file2` is required for `CompareDocuments`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "CompareDocuments")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (file1 != null) - { - req.Forms["file_1"] = new RESTConnector.Form(file1, "filename", file1ContentType); - } - if (file2 != null) - { - req.Forms["file_2"] = new RESTConnector.Form(file2, "filename", file2ContentType); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(file1Label)) - { - req.Parameters["file_1_label"] = file1Label; - } - if (!string.IsNullOrEmpty(file2Label)) - { - req.Parameters["file_2_label"] = file2Label; - } - if (!string.IsNullOrEmpty(model)) - { - req.Parameters["model"] = model; - } - - req.OnResponse = OnCompareDocumentsResponse; - - Connector.URL = GetServiceUrl() + "/v1/comparison"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnCompareDocumentsResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnCompareDocumentsResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Add feedback. - /// - /// Adds feedback in the form of _labels_ from a subject-matter expert (SME) to a governing document. - /// **Important:** Feedback is not immediately incorporated into the training model, nor is it guaranteed to be - /// incorporated at a later date. Instead, submitted feedback is used to suggest future updates to the training - /// model. - /// - /// The callback function that is invoked when the operation completes. - /// Feedback data for submission. - /// An optional string identifying the user. (optional) - /// An optional comment on or description of the feedback. (optional) - /// FeedbackReturn - public bool AddFeedback(Callback callback, FeedbackDataInput feedbackData, string userId = null, string comment = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `AddFeedback`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (feedbackData == null) - throw new ArgumentNullException("`feedbackData` is required for `AddFeedback`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "AddFeedback")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - - JObject bodyObject = new JObject(); - if (feedbackData != null) - bodyObject["feedback_data"] = JToken.FromObject(feedbackData); - if (!string.IsNullOrEmpty(userId)) - bodyObject["user_id"] = userId; - if (!string.IsNullOrEmpty(comment)) - bodyObject["comment"] = comment; - req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject)); - - req.OnResponse = OnAddFeedbackResponse; - - Connector.URL = GetServiceUrl() + "/v1/feedback"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnAddFeedbackResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnAddFeedbackResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// List the feedback in a document. - /// - /// Lists the feedback in a document. - /// - /// The callback function that is invoked when the operation completes. - /// An optional string that filters the output to include only feedback with the - /// specified feedback type. The only permitted value is `element_classification`. (optional) - /// An optional string that filters the output to include only feedback from the - /// document with the specified `document_title`. (optional) - /// An optional string that filters the output to include only feedback with the specified - /// `model_id`. The only permitted value is `contracts`. (optional) - /// An optional string that filters the output to include only feedback with the - /// specified `model_version`. (optional) - /// An optional string in the form of a comma-separated list of categories. If it - /// is specified, the service filters the output to include only feedback that has at least one category from - /// the list removed. (optional) - /// An optional string in the form of a comma-separated list of categories. If this - /// is specified, the service filters the output to include only feedback that has at least one category from - /// the list added. (optional) - /// An optional string in the form of a comma-separated list of categories. If - /// this is specified, the service filters the output to include only feedback that has at least one category - /// from the list unchanged. (optional) - /// An optional string of comma-separated `nature`:`party` pairs. If this is - /// specified, the service filters the output to include only feedback that has at least one `nature`:`party` - /// pair from the list removed. (optional) - /// An optional string of comma-separated `nature`:`party` pairs. If this is specified, - /// the service filters the output to include only feedback that has at least one `nature`:`party` pair from the - /// list removed. (optional) - /// An optional string of comma-separated `nature`:`party` pairs. If this is - /// specified, the service filters the output to include only feedback that has at least one `nature`:`party` - /// pair from the list unchanged. (optional) - /// An optional integer specifying the number of documents that you want the service to - /// return. (optional) - /// An optional string that returns the set of documents after the previous set. Use this - /// parameter with the `page_limit` parameter. (optional) - /// An optional comma-separated list of fields in the document to sort on. You can optionally - /// specify the sort direction by prefixing the value of the field with `-` for descending order or `+` for - /// ascending order (the default). Currently permitted sorting fields are `created`, `user_id`, and - /// `document_title`. (optional) - /// 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) - /// FeedbackList - public bool ListFeedback(Callback 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`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "ListFeedback")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(feedbackType)) - { - req.Parameters["feedback_type"] = feedbackType; - } - if (!string.IsNullOrEmpty(documentTitle)) - { - req.Parameters["document_title"] = documentTitle; - } - if (!string.IsNullOrEmpty(modelId)) - { - req.Parameters["model_id"] = modelId; - } - if (!string.IsNullOrEmpty(modelVersion)) - { - req.Parameters["model_version"] = modelVersion; - } - if (!string.IsNullOrEmpty(categoryRemoved)) - { - req.Parameters["category_removed"] = categoryRemoved; - } - if (!string.IsNullOrEmpty(categoryAdded)) - { - req.Parameters["category_added"] = categoryAdded; - } - if (!string.IsNullOrEmpty(categoryNotChanged)) - { - req.Parameters["category_not_changed"] = categoryNotChanged; - } - if (!string.IsNullOrEmpty(typeRemoved)) - { - req.Parameters["type_removed"] = typeRemoved; - } - if (!string.IsNullOrEmpty(typeAdded)) - { - req.Parameters["type_added"] = typeAdded; - } - if (!string.IsNullOrEmpty(typeNotChanged)) - { - req.Parameters["type_not_changed"] = typeNotChanged; - } - if (pageLimit != null) - { - req.Parameters["page_limit"] = pageLimit; - } - if (!string.IsNullOrEmpty(cursor)) - { - req.Parameters["cursor"] = cursor; - } - if (!string.IsNullOrEmpty(sort)) - { - req.Parameters["sort"] = sort; - } - if (includeTotal != null) - { - req.Parameters["include_total"] = (bool)includeTotal ? "true" : "false"; - } - - req.OnResponse = OnListFeedbackResponse; - - Connector.URL = GetServiceUrl() + "/v1/feedback"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnListFeedbackResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnListFeedbackResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get a specified feedback entry. - /// - /// Gets a feedback entry with a specified `feedback_id`. - /// - /// The callback function that is invoked when the operation completes. - /// A string that specifies the feedback entry to be included in the output. - /// The analysis model to be used by the service. For the **Element classification** and - /// **Compare two documents** methods, the default is `contracts`. For the **Extract tables** method, the - /// default is `tables`. These defaults apply to the standalone methods as well as to the methods' use in - /// batch-processing requests. (optional) - /// GetFeedback - public bool GetFeedback(Callback callback, string feedbackId, string model = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetFeedback`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(feedbackId)) - throw new ArgumentNullException("`feedbackId` is required for `GetFeedback`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "GetFeedback")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(model)) - { - req.Parameters["model"] = model; - } - - req.OnResponse = OnGetFeedbackResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v1/feedback/{0}", feedbackId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetFeedbackResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnGetFeedbackResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Delete a specified feedback entry. - /// - /// Deletes a feedback entry with a specified `feedback_id`. - /// - /// The callback function that is invoked when the operation completes. - /// A string that specifies the feedback entry to be deleted from the document. - /// The analysis model to be used by the service. For the **Element classification** and - /// **Compare two documents** methods, the default is `contracts`. For the **Extract tables** method, the - /// default is `tables`. These defaults apply to the standalone methods as well as to the methods' use in - /// batch-processing requests. (optional) - /// FeedbackDeleted - public bool DeleteFeedback(Callback callback, string feedbackId, string model = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `DeleteFeedback`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(feedbackId)) - throw new ArgumentNullException("`feedbackId` is required for `DeleteFeedback`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbDELETE, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "DeleteFeedback")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(model)) - { - req.Parameters["model"] = model; - } - - req.OnResponse = OnDeleteFeedbackResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v1/feedback/{0}", feedbackId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnDeleteFeedbackResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnDeleteFeedbackResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Submit a batch-processing request. - /// - /// Run Compare and Comply methods over a collection of input documents. - /// - /// **Important:** Batch processing requires the use of the [IBM Cloud Object Storage - /// service](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-about#about-ibm-cloud-object-storage). - /// The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using batch - /// processing](https://cloud.ibm.com/docs/compare-comply?topic=compare-comply-batching#before-you-batch). - /// - /// The callback function that is invoked when the operation completes. - /// The Compare and Comply method to run across the submitted input documents. - /// A JSON file containing the input Cloud Object Storage credentials. At a - /// minimum, the credentials must enable `READ` permissions on the bucket defined by the `input_bucket_name` - /// parameter. - /// The geographical location of the Cloud Object Storage input bucket as - /// listed on the **Endpoint** tab of your Cloud Object Storage instance; for example, `us-geo`, `eu-geo`, or - /// `ap-geo`. - /// The name of the Cloud Object Storage input bucket. - /// A JSON file that lists the Cloud Object Storage output credentials. At a - /// minimum, the credentials must enable `READ` and `WRITE` permissions on the bucket defined by the - /// `output_bucket_name` parameter. - /// The geographical location of the Cloud Object Storage output bucket as - /// listed on the **Endpoint** tab of your Cloud Object Storage instance; for example, `us-geo`, `eu-geo`, or - /// `ap-geo`. - /// The name of the Cloud Object Storage output bucket. - /// The analysis model to be used by the service. For the **Element classification** and - /// **Compare two documents** methods, the default is `contracts`. For the **Extract tables** method, the - /// default is `tables`. These defaults apply to the standalone methods as well as to the methods' use in - /// batch-processing requests. (optional) - /// BatchStatus - public bool CreateBatch(Callback callback, string function, System.IO.MemoryStream inputCredentialsFile, string inputBucketLocation, string inputBucketName, System.IO.MemoryStream outputCredentialsFile, string outputBucketLocation, string outputBucketName, string model = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `CreateBatch`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(function)) - throw new ArgumentNullException("`function` is required for `CreateBatch`"); - if (inputCredentialsFile == null) - throw new ArgumentNullException("`inputCredentialsFile` is required for `CreateBatch`"); - if (string.IsNullOrEmpty(inputBucketLocation)) - throw new ArgumentNullException("`inputBucketLocation` is required for `CreateBatch`"); - if (string.IsNullOrEmpty(inputBucketName)) - throw new ArgumentNullException("`inputBucketName` is required for `CreateBatch`"); - if (outputCredentialsFile == null) - throw new ArgumentNullException("`outputCredentialsFile` is required for `CreateBatch`"); - if (string.IsNullOrEmpty(outputBucketLocation)) - throw new ArgumentNullException("`outputBucketLocation` is required for `CreateBatch`"); - if (string.IsNullOrEmpty(outputBucketName)) - throw new ArgumentNullException("`outputBucketName` is required for `CreateBatch`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "CreateBatch")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (inputCredentialsFile != null) - { - req.Forms["input_credentials_file"] = new RESTConnector.Form(inputCredentialsFile, "filename", "application/json"); - } - if (!string.IsNullOrEmpty(inputBucketLocation)) - { - req.Forms["input_bucket_location"] = new RESTConnector.Form(inputBucketLocation); - } - if (!string.IsNullOrEmpty(inputBucketName)) - { - req.Forms["input_bucket_name"] = new RESTConnector.Form(inputBucketName); - } - if (outputCredentialsFile != null) - { - req.Forms["output_credentials_file"] = new RESTConnector.Form(outputCredentialsFile, "filename", "application/json"); - } - if (!string.IsNullOrEmpty(outputBucketLocation)) - { - req.Forms["output_bucket_location"] = new RESTConnector.Form(outputBucketLocation); - } - if (!string.IsNullOrEmpty(outputBucketName)) - { - req.Forms["output_bucket_name"] = new RESTConnector.Form(outputBucketName); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(function)) - { - req.Parameters["function"] = function; - } - if (!string.IsNullOrEmpty(model)) - { - req.Parameters["model"] = model; - } - - req.OnResponse = OnCreateBatchResponse; - - Connector.URL = GetServiceUrl() + "/v1/batches"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnCreateBatchResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnCreateBatchResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// List submitted batch-processing jobs. - /// - /// Lists batch-processing jobs submitted by users. - /// - /// The callback function that is invoked when the operation completes. - /// Batches - public bool ListBatches(Callback callback) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ListBatches`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "ListBatches")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnListBatchesResponse; - - Connector.URL = GetServiceUrl() + "/v1/batches"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnListBatchesResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnListBatchesResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get information about a specific batch-processing job. - /// - /// Gets information about a batch-processing job with a specified ID. - /// - /// The callback function that is invoked when the operation completes. - /// The ID of the batch-processing job whose information you want to retrieve. - /// BatchStatus - public bool GetBatch(Callback callback, string batchId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetBatch`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(batchId)) - throw new ArgumentNullException("`batchId` is required for `GetBatch`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "GetBatch")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnGetBatchResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v1/batches/{0}", batchId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetBatchResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnGetBatchResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Update a pending or active batch-processing job. - /// - /// Updates a pending or active batch-processing job. You can rescan the input bucket to check for new documents - /// or cancel a job. - /// - /// The callback function that is invoked when the operation completes. - /// The ID of the batch-processing job you want to update. - /// The action you want to perform on the specified batch-processing job. - /// The analysis model to be used by the service. For the **Element classification** and - /// **Compare two documents** methods, the default is `contracts`. For the **Extract tables** method, the - /// default is `tables`. These defaults apply to the standalone methods as well as to the methods' use in - /// batch-processing requests. (optional) - /// BatchStatus - public bool UpdateBatch(Callback callback, string batchId, string action, string model = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `UpdateBatch`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(batchId)) - throw new ArgumentNullException("`batchId` is required for `UpdateBatch`"); - if (string.IsNullOrEmpty(action)) - throw new ArgumentNullException("`action` is required for `UpdateBatch`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPUT, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("compare-comply", "V1", "UpdateBatch")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(action)) - { - req.Parameters["action"] = action; - } - if (!string.IsNullOrEmpty(model)) - { - req.Parameters["model"] = model; - } - - req.OnResponse = OnUpdateBatchResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v1/batches/{0}", batchId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnUpdateBatchResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("CompareComplyService.OnUpdateBatchResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - } -} \ No newline at end of file diff --git a/Scripts/Services/CompareComply/V1/Model.meta b/Scripts/Services/CompareComply/V1/Model.meta deleted file mode 100644 index 82931f305..000000000 --- a/Scripts/Services/CompareComply/V1/Model.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8c98f4a77f7d72c468be480f5a4bf23a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Address.cs b/Scripts/Services/CompareComply/V1/Model/Address.cs deleted file mode 100644 index 44d616411..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Address.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A party's address. - /// - public class Address - { - /// - /// A string listing the address. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/AlignedElement.cs b/Scripts/Services/CompareComply/V1/Model/AlignedElement.cs deleted file mode 100644 index 417b439db..000000000 --- a/Scripts/Services/CompareComply/V1/Model/AlignedElement.cs +++ /dev/null @@ -1,51 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// AlignedElement. - /// - public class AlignedElement - { - /// - /// Identifies two elements that semantically align between the compared documents. - /// - [JsonProperty("element_pair", NullValueHandling = NullValueHandling.Ignore)] - public List ElementPair { get; set; } - /// - /// Specifies whether the aligned element is identical. Elements are considered identical despite minor - /// differences such as leading punctuation, end-of-sentence punctuation, whitespace, the presence or absence of - /// definite or indefinite articles, and others. - /// - [JsonProperty("identical_text", NullValueHandling = NullValueHandling.Ignore)] - public bool? IdenticalText { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - /// - /// Indicates that the elements aligned are contractual clauses of significance. - /// - [JsonProperty("significant_elements", NullValueHandling = NullValueHandling.Ignore)] - public bool? SignificantElements { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Attribute.cs b/Scripts/Services/CompareComply/V1/Model/Attribute.cs deleted file mode 100644 index 235592fff..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Attribute.cs +++ /dev/null @@ -1,89 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// List of document attributes. - /// - public class Attribute - { - /// - /// The type of attribute. - /// - public class TypeValue - { - /// - /// Constant CURRENCY for Currency - /// - public const string CURRENCY = "Currency"; - /// - /// Constant DATETIME for DateTime - /// - public const string DATETIME = "DateTime"; - /// - /// Constant DEFINEDTERM for DefinedTerm - /// - public const string DEFINEDTERM = "DefinedTerm"; - /// - /// Constant DURATION for Duration - /// - public const string DURATION = "Duration"; - /// - /// Constant LOCATION for Location - /// - public const string LOCATION = "Location"; - /// - /// Constant NUMBER for Number - /// - public const string NUMBER = "Number"; - /// - /// Constant ORGANIZATION for Organization - /// - public const string ORGANIZATION = "Organization"; - /// - /// Constant PERCENTAGE for Percentage - /// - public const string PERCENTAGE = "Percentage"; - /// - /// Constant PERSON for Person - /// - public const string PERSON = "Person"; - - } - - /// - /// The type of attribute. - /// Constants for possible values can be found using Attribute.TypeValue - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - /// - /// The text associated with the attribute. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Attribute.cs.meta b/Scripts/Services/CompareComply/V1/Model/Attribute.cs.meta deleted file mode 100644 index 8d4e9fc71..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Attribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e87298f7eb36f9b49bf1882d1385af56 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/BatchStatus.cs b/Scripts/Services/CompareComply/V1/Model/BatchStatus.cs deleted file mode 100644 index 030e38870..000000000 --- a/Scripts/Services/CompareComply/V1/Model/BatchStatus.cs +++ /dev/null @@ -1,104 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The batch-request status. - /// - public class BatchStatus - { - /// - /// The method to be run against the documents. Possible values are `html_conversion`, `element_classification`, - /// and `tables`. - /// - public class FunctionValue - { - /// - /// Constant ELEMENT_CLASSIFICATION for element_classification - /// - public const string ELEMENT_CLASSIFICATION = "element_classification"; - /// - /// Constant HTML_CONVERSION for html_conversion - /// - public const string HTML_CONVERSION = "html_conversion"; - /// - /// Constant TABLES for tables - /// - public const string TABLES = "tables"; - - } - - /// - /// The method to be run against the documents. Possible values are `html_conversion`, `element_classification`, - /// and `tables`. - /// Constants for possible values can be found using BatchStatus.FunctionValue - /// - [JsonProperty("function", NullValueHandling = NullValueHandling.Ignore)] - public string Function { get; set; } - /// - /// The geographical location of the Cloud Object Storage input bucket as listed on the **Endpoint** tab of your - /// COS instance; for example, `us-geo`, `eu-geo`, or `ap-geo`. - /// - [JsonProperty("input_bucket_location", NullValueHandling = NullValueHandling.Ignore)] - public string InputBucketLocation { get; set; } - /// - /// The name of the Cloud Object Storage input bucket. - /// - [JsonProperty("input_bucket_name", NullValueHandling = NullValueHandling.Ignore)] - public string InputBucketName { get; set; } - /// - /// The geographical location of the Cloud Object Storage output bucket as listed on the **Endpoint** tab of - /// your COS instance; for example, `us-geo`, `eu-geo`, or `ap-geo`. - /// - [JsonProperty("output_bucket_location", NullValueHandling = NullValueHandling.Ignore)] - public string OutputBucketLocation { get; set; } - /// - /// The name of the Cloud Object Storage output bucket. - /// - [JsonProperty("output_bucket_name", NullValueHandling = NullValueHandling.Ignore)] - public string OutputBucketName { get; set; } - /// - /// The unique identifier for the batch request. - /// - [JsonProperty("batch_id", NullValueHandling = NullValueHandling.Ignore)] - public string BatchId { get; set; } - /// - /// Document counts. - /// - [JsonProperty("document_counts", NullValueHandling = NullValueHandling.Ignore)] - public DocCounts DocumentCounts { get; set; } - /// - /// The status of the batch request. - /// - [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] - public string Status { get; set; } - /// - /// The creation time of the batch request. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Created { get; set; } - /// - /// The time of the most recent update to the batch request. - /// - [JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Updated { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/BatchStatus.cs.meta b/Scripts/Services/CompareComply/V1/Model/BatchStatus.cs.meta deleted file mode 100644 index b1dd866db..000000000 --- a/Scripts/Services/CompareComply/V1/Model/BatchStatus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d214f8e3d01f5b546b9368147be0f57b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Batches.cs b/Scripts/Services/CompareComply/V1/Model/Batches.cs deleted file mode 100644 index 4569bd06d..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Batches.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The results of a successful **List Batches** request. - /// - public class Batches - { - /// - /// A list of the status of all batch requests. - /// - [JsonProperty("batches", NullValueHandling = NullValueHandling.Ignore)] - public List _Batches { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Batches.cs.meta b/Scripts/Services/CompareComply/V1/Model/Batches.cs.meta deleted file mode 100644 index ddd9d887f..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Batches.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8db13d80af3699641887dd81d59a21fa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/BodyCells.cs b/Scripts/Services/CompareComply/V1/Model/BodyCells.cs deleted file mode 100644 index eaff18586..000000000 --- a/Scripts/Services/CompareComply/V1/Model/BodyCells.cs +++ /dev/null @@ -1,102 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Cells that are not table header, column header, or row header cells. - /// - public class BodyCells - { - /// - /// The unique ID of the cell in the current table. - /// - [JsonProperty("cell_id", NullValueHandling = NullValueHandling.Ignore)] - public string CellId { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The textual contents of this cell from the input document without associated markup content. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The `begin` index of this cell's `row` location in the current table. - /// - [JsonProperty("row_index_begin", NullValueHandling = NullValueHandling.Ignore)] - public long? RowIndexBegin { get; set; } - /// - /// The `end` index of this cell's `row` location in the current table. - /// - [JsonProperty("row_index_end", NullValueHandling = NullValueHandling.Ignore)] - public long? RowIndexEnd { get; set; } - /// - /// The `begin` index of this cell's `column` location in the current table. - /// - [JsonProperty("column_index_begin", NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnIndexBegin { get; set; } - /// - /// The `end` index of this cell's `column` location in the current table. - /// - [JsonProperty("column_index_end", NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnIndexEnd { get; set; } - /// - /// An array that contains the `id` value of a row header that is applicable to this body cell. - /// - [JsonProperty("row_header_ids", NullValueHandling = NullValueHandling.Ignore)] - public List RowHeaderIds { get; set; } - /// - /// An array that contains the `text` value of a row header that is applicable to this body cell. - /// - [JsonProperty("row_header_texts", NullValueHandling = NullValueHandling.Ignore)] - public List RowHeaderTexts { get; set; } - /// - /// If you provide customization input, the normalized version of the row header texts according to the - /// customization; otherwise, the same value as `row_header_texts`. - /// - [JsonProperty("row_header_texts_normalized", NullValueHandling = NullValueHandling.Ignore)] - public List RowHeaderTextsNormalized { get; set; } - /// - /// An array that contains the `id` value of a column header that is applicable to the current cell. - /// - [JsonProperty("column_header_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ColumnHeaderIds { get; set; } - /// - /// An array that contains the `text` value of a column header that is applicable to the current cell. - /// - [JsonProperty("column_header_texts", NullValueHandling = NullValueHandling.Ignore)] - public List ColumnHeaderTexts { get; set; } - /// - /// If you provide customization input, the normalized version of the column header texts according to the - /// customization; otherwise, the same value as `column_header_texts`. - /// - [JsonProperty("column_header_texts_normalized", NullValueHandling = NullValueHandling.Ignore)] - public List ColumnHeaderTextsNormalized { get; set; } - /// - /// Gets or Sets Attributes - /// - [JsonProperty("attributes", NullValueHandling = NullValueHandling.Ignore)] - public List Attributes { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/BodyCells.cs.meta b/Scripts/Services/CompareComply/V1/Model/BodyCells.cs.meta deleted file mode 100644 index 2b07f11a1..000000000 --- a/Scripts/Services/CompareComply/V1/Model/BodyCells.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7d8a4a17ae8e5e244a25e4cb59c73505 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Category.cs b/Scripts/Services/CompareComply/V1/Model/Category.cs deleted file mode 100644 index b77e8edf4..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Category.cs +++ /dev/null @@ -1,174 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Information defining an element's subject matter. - /// - public class Category - { - /// - /// The category of the associated element. - /// - public class LabelValue - { - /// - /// Constant AMENDMENTS for Amendments - /// - public const string AMENDMENTS = "Amendments"; - /// - /// Constant ASSET_USE for Asset Use - /// - public const string ASSET_USE = "Asset Use"; - /// - /// Constant ASSIGNMENTS for Assignments - /// - public const string ASSIGNMENTS = "Assignments"; - /// - /// Constant AUDITS for Audits - /// - public const string AUDITS = "Audits"; - /// - /// Constant BUSINESS_CONTINUITY for Business Continuity - /// - public const string BUSINESS_CONTINUITY = "Business Continuity"; - /// - /// Constant COMMUNICATION for Communication - /// - public const string COMMUNICATION = "Communication"; - /// - /// Constant CONFIDENTIALITY for Confidentiality - /// - public const string CONFIDENTIALITY = "Confidentiality"; - /// - /// Constant DELIVERABLES for Deliverables - /// - public const string DELIVERABLES = "Deliverables"; - /// - /// Constant DELIVERY for Delivery - /// - public const string DELIVERY = "Delivery"; - /// - /// Constant DISPUTE_RESOLUTION for Dispute Resolution - /// - public const string DISPUTE_RESOLUTION = "Dispute Resolution"; - /// - /// Constant FORCE_MAJEURE for Force Majeure - /// - public const string FORCE_MAJEURE = "Force Majeure"; - /// - /// Constant INDEMNIFICATION for Indemnification - /// - public const string INDEMNIFICATION = "Indemnification"; - /// - /// Constant INSURANCE for Insurance - /// - public const string INSURANCE = "Insurance"; - /// - /// Constant INTELLECTUAL_PROPERTY for Intellectual Property - /// - public const string INTELLECTUAL_PROPERTY = "Intellectual Property"; - /// - /// Constant LIABILITY for Liability - /// - public const string LIABILITY = "Liability"; - /// - /// Constant ORDER_OF_PRECEDENCE for Order of Precedence - /// - public const string ORDER_OF_PRECEDENCE = "Order of Precedence"; - /// - /// Constant PAYMENT_TERMS_BILLING for Payment Terms & Billing - /// - public const string PAYMENT_TERMS_BILLING = "Payment Terms & Billing"; - /// - /// Constant PRICING_TAXES for Pricing & Taxes - /// - public const string PRICING_TAXES = "Pricing & Taxes"; - /// - /// Constant PRIVACY for Privacy - /// - public const string PRIVACY = "Privacy"; - /// - /// Constant RESPONSIBILITIES for Responsibilities - /// - public const string RESPONSIBILITIES = "Responsibilities"; - /// - /// Constant SAFETY_AND_SECURITY for Safety and Security - /// - public const string SAFETY_AND_SECURITY = "Safety and Security"; - /// - /// Constant SCOPE_OF_WORK for Scope of Work - /// - public const string SCOPE_OF_WORK = "Scope of Work"; - /// - /// Constant SUBCONTRACTS for Subcontracts - /// - public const string SUBCONTRACTS = "Subcontracts"; - /// - /// Constant TERM_TERMINATION for Term & Termination - /// - public const string TERM_TERMINATION = "Term & Termination"; - /// - /// Constant WARRANTIES for Warranties - /// - public const string WARRANTIES = "Warranties"; - - } - - /// - /// The type of modification of the feedback entry in the updated labels response. - /// - public class ModificationValue - { - /// - /// Constant ADDED for added - /// - public const string ADDED = "added"; - /// - /// Constant UNCHANGED for unchanged - /// - public const string UNCHANGED = "unchanged"; - /// - /// Constant REMOVED for removed - /// - public const string REMOVED = "removed"; - - } - - /// - /// The category of the associated element. - /// Constants for possible values can be found using Category.LabelValue - /// - [JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)] - public string Label { get; set; } - /// - /// The type of modification of the feedback entry in the updated labels response. - /// Constants for possible values can be found using Category.ModificationValue - /// - [JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)] - public string Modification { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Category.cs.meta b/Scripts/Services/CompareComply/V1/Model/Category.cs.meta deleted file mode 100644 index e45041961..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Category.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 270afdae6768a284886cb982856c3331 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/CategoryComparison.cs b/Scripts/Services/CompareComply/V1/Model/CategoryComparison.cs deleted file mode 100644 index 1e3346019..000000000 --- a/Scripts/Services/CompareComply/V1/Model/CategoryComparison.cs +++ /dev/null @@ -1,142 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Information defining an element's subject matter. - /// - public class CategoryComparison - { - /// - /// The category of the associated element. - /// - public class LabelValue - { - /// - /// Constant AMENDMENTS for Amendments - /// - public const string AMENDMENTS = "Amendments"; - /// - /// Constant ASSET_USE for Asset Use - /// - public const string ASSET_USE = "Asset Use"; - /// - /// Constant ASSIGNMENTS for Assignments - /// - public const string ASSIGNMENTS = "Assignments"; - /// - /// Constant AUDITS for Audits - /// - public const string AUDITS = "Audits"; - /// - /// Constant BUSINESS_CONTINUITY for Business Continuity - /// - public const string BUSINESS_CONTINUITY = "Business Continuity"; - /// - /// Constant COMMUNICATION for Communication - /// - public const string COMMUNICATION = "Communication"; - /// - /// Constant CONFIDENTIALITY for Confidentiality - /// - public const string CONFIDENTIALITY = "Confidentiality"; - /// - /// Constant DELIVERABLES for Deliverables - /// - public const string DELIVERABLES = "Deliverables"; - /// - /// Constant DELIVERY for Delivery - /// - public const string DELIVERY = "Delivery"; - /// - /// Constant DISPUTE_RESOLUTION for Dispute Resolution - /// - public const string DISPUTE_RESOLUTION = "Dispute Resolution"; - /// - /// Constant FORCE_MAJEURE for Force Majeure - /// - public const string FORCE_MAJEURE = "Force Majeure"; - /// - /// Constant INDEMNIFICATION for Indemnification - /// - public const string INDEMNIFICATION = "Indemnification"; - /// - /// Constant INSURANCE for Insurance - /// - public const string INSURANCE = "Insurance"; - /// - /// Constant INTELLECTUAL_PROPERTY for Intellectual Property - /// - public const string INTELLECTUAL_PROPERTY = "Intellectual Property"; - /// - /// Constant LIABILITY for Liability - /// - public const string LIABILITY = "Liability"; - /// - /// Constant ORDER_OF_PRECEDENCE for Order of Precedence - /// - public const string ORDER_OF_PRECEDENCE = "Order of Precedence"; - /// - /// Constant PAYMENT_TERMS_BILLING for Payment Terms & Billing - /// - public const string PAYMENT_TERMS_BILLING = "Payment Terms & Billing"; - /// - /// Constant PRICING_TAXES for Pricing & Taxes - /// - public const string PRICING_TAXES = "Pricing & Taxes"; - /// - /// Constant PRIVACY for Privacy - /// - public const string PRIVACY = "Privacy"; - /// - /// Constant RESPONSIBILITIES for Responsibilities - /// - public const string RESPONSIBILITIES = "Responsibilities"; - /// - /// Constant SAFETY_AND_SECURITY for Safety and Security - /// - public const string SAFETY_AND_SECURITY = "Safety and Security"; - /// - /// Constant SCOPE_OF_WORK for Scope of Work - /// - public const string SCOPE_OF_WORK = "Scope of Work"; - /// - /// Constant SUBCONTRACTS for Subcontracts - /// - public const string SUBCONTRACTS = "Subcontracts"; - /// - /// Constant TERM_TERMINATION for Term & Termination - /// - public const string TERM_TERMINATION = "Term & Termination"; - /// - /// Constant WARRANTIES for Warranties - /// - public const string WARRANTIES = "Warranties"; - - } - - /// - /// The category of the associated element. - /// Constants for possible values can be found using CategoryComparison.LabelValue - /// - [JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)] - public string Label { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/CategoryComparison.cs.meta b/Scripts/Services/CompareComply/V1/Model/CategoryComparison.cs.meta deleted file mode 100644 index 622bf59f2..000000000 --- a/Scripts/Services/CompareComply/V1/Model/CategoryComparison.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bd090fec16b0efc43b9a1ed9e2bde066 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ClassifyReturn.cs b/Scripts/Services/CompareComply/V1/Model/ClassifyReturn.cs deleted file mode 100644 index a75421919..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ClassifyReturn.cs +++ /dev/null @@ -1,101 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The analysis of objects returned by the **Element classification** method. - /// - public class ClassifyReturn - { - /// - /// Basic information about the input document. - /// - [JsonProperty("document", NullValueHandling = NullValueHandling.Ignore)] - public Document Document { get; set; } - /// - /// The analysis model used to classify the input document. For the **Element classification** method, the only - /// valid value is `contracts`. - /// - [JsonProperty("model_id", NullValueHandling = NullValueHandling.Ignore)] - public string ModelId { get; set; } - /// - /// The version of the analysis model identified by the value of the `model_id` key. - /// - [JsonProperty("model_version", NullValueHandling = NullValueHandling.Ignore)] - public string ModelVersion { get; set; } - /// - /// Document elements identified by the service. - /// - [JsonProperty("elements", NullValueHandling = NullValueHandling.Ignore)] - public List Elements { get; set; } - /// - /// The date or dates on which the document becomes effective. - /// - [JsonProperty("effective_dates", NullValueHandling = NullValueHandling.Ignore)] - public List EffectiveDates { get; set; } - /// - /// The monetary amounts that identify the total amount of the contract that needs to be paid from one party to - /// another. - /// - [JsonProperty("contract_amounts", NullValueHandling = NullValueHandling.Ignore)] - public List ContractAmounts { get; set; } - /// - /// The dates on which the document is to be terminated. - /// - [JsonProperty("termination_dates", NullValueHandling = NullValueHandling.Ignore)] - public List TerminationDates { get; set; } - /// - /// The contract type as declared in the document. - /// - [JsonProperty("contract_types", NullValueHandling = NullValueHandling.Ignore)] - public List ContractTypes { get; set; } - /// - /// The durations of the contract. - /// - [JsonProperty("contract_terms", NullValueHandling = NullValueHandling.Ignore)] - public List ContractTerms { get; set; } - /// - /// The document's payment durations. - /// - [JsonProperty("payment_terms", NullValueHandling = NullValueHandling.Ignore)] - public List PaymentTerms { get; set; } - /// - /// The contract currencies as declared in the document. - /// - [JsonProperty("contract_currencies", NullValueHandling = NullValueHandling.Ignore)] - public List ContractCurrencies { get; set; } - /// - /// Definition of tables identified in the input document. - /// - [JsonProperty("tables", NullValueHandling = NullValueHandling.Ignore)] - public List Tables { get; set; } - /// - /// The structure of the input document. - /// - [JsonProperty("document_structure", NullValueHandling = NullValueHandling.Ignore)] - public DocStructure DocumentStructure { get; set; } - /// - /// Definitions of the parties identified in the input document. - /// - [JsonProperty("parties", NullValueHandling = NullValueHandling.Ignore)] - public List Parties { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ClassifyReturn.cs.meta b/Scripts/Services/CompareComply/V1/Model/ClassifyReturn.cs.meta deleted file mode 100644 index 0a85199a0..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ClassifyReturn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 663c8ed3de7594641b14b3759f8ae077 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ColumnHeaders.cs b/Scripts/Services/CompareComply/V1/Model/ColumnHeaders.cs deleted file mode 100644 index 4aa1dd3b6..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ColumnHeaders.cs +++ /dev/null @@ -1,71 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Column-level cells, each applicable as a header to other cells in the same column as itself, of the current - /// table. - /// - public class ColumnHeaders - { - /// - /// The unique ID of the cell in the current table. - /// - [JsonProperty("cell_id", NullValueHandling = NullValueHandling.Ignore)] - public string CellId { get; set; } - /// - /// The location of the column header cell in the current table as defined by its `begin` and `end` offsets, - /// respectfully, in the input document. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public object Location { get; set; } - /// - /// The textual contents of this cell from the input document without associated markup content. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// If you provide customization input, the normalized version of the cell text according to the customization; - /// otherwise, the same value as `text`. - /// - [JsonProperty("text_normalized", NullValueHandling = NullValueHandling.Ignore)] - public string TextNormalized { get; set; } - /// - /// The `begin` index of this cell's `row` location in the current table. - /// - [JsonProperty("row_index_begin", NullValueHandling = NullValueHandling.Ignore)] - public long? RowIndexBegin { get; set; } - /// - /// The `end` index of this cell's `row` location in the current table. - /// - [JsonProperty("row_index_end", NullValueHandling = NullValueHandling.Ignore)] - public long? RowIndexEnd { get; set; } - /// - /// The `begin` index of this cell's `column` location in the current table. - /// - [JsonProperty("column_index_begin", NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnIndexBegin { get; set; } - /// - /// The `end` index of this cell's `column` location in the current table. - /// - [JsonProperty("column_index_end", NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnIndexEnd { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ColumnHeaders.cs.meta b/Scripts/Services/CompareComply/V1/Model/ColumnHeaders.cs.meta deleted file mode 100644 index 93e845f73..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ColumnHeaders.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9a029e63bfb11b940a0c8fb15db7e734 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/CompareReturn.cs b/Scripts/Services/CompareComply/V1/Model/CompareReturn.cs deleted file mode 100644 index bbb8cb1ff..000000000 --- a/Scripts/Services/CompareComply/V1/Model/CompareReturn.cs +++ /dev/null @@ -1,55 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The comparison of the two submitted documents. - /// - public class CompareReturn - { - /// - /// The analysis model used to compare the input documents. For the **Compare two documents** method, the only - /// valid value is `contracts`. - /// - [JsonProperty("model_id", NullValueHandling = NullValueHandling.Ignore)] - public string ModelId { get; set; } - /// - /// The version of the analysis model identified by the value of the `model_id` key. - /// - [JsonProperty("model_version", NullValueHandling = NullValueHandling.Ignore)] - public string ModelVersion { get; set; } - /// - /// Information about the documents being compared. - /// - [JsonProperty("documents", NullValueHandling = NullValueHandling.Ignore)] - public List Documents { get; set; } - /// - /// A list of pairs of elements that semantically align between the compared documents. - /// - [JsonProperty("aligned_elements", NullValueHandling = NullValueHandling.Ignore)] - public List AlignedElements { get; set; } - /// - /// A list of elements that do not semantically align between the compared documents. - /// - [JsonProperty("unaligned_elements", NullValueHandling = NullValueHandling.Ignore)] - public List UnalignedElements { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/CompareReturn.cs.meta b/Scripts/Services/CompareComply/V1/Model/CompareReturn.cs.meta deleted file mode 100644 index 0cf92b646..000000000 --- a/Scripts/Services/CompareComply/V1/Model/CompareReturn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8fb9223226ee9d349b3c6760d0eb7bf1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Contact.cs b/Scripts/Services/CompareComply/V1/Model/Contact.cs deleted file mode 100644 index 844d1e351..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Contact.cs +++ /dev/null @@ -1,38 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A contact. - /// - public class Contact - { - /// - /// A string listing the name of the contact. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// A string listing the role of the contact. - /// - [JsonProperty("role", NullValueHandling = NullValueHandling.Ignore)] - public string Role { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Contact.cs.meta b/Scripts/Services/CompareComply/V1/Model/Contact.cs.meta deleted file mode 100644 index aa73447c5..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Contact.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 87db66663fa0280448378206e07ab7bf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Contexts.cs b/Scripts/Services/CompareComply/V1/Model/Contexts.cs deleted file mode 100644 index b1d628e60..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Contexts.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Text that is related to the contents of the table and that precedes or follows the current table. - /// - public class Contexts - { - /// - /// The related text. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Contexts.cs.meta b/Scripts/Services/CompareComply/V1/Model/Contexts.cs.meta deleted file mode 100644 index da872adcb..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Contexts.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 455d03913cfcd45788021fcac02533ab -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ContractAmts.cs b/Scripts/Services/CompareComply/V1/Model/ContractAmts.cs deleted file mode 100644 index 72eeb802d..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ContractAmts.cs +++ /dev/null @@ -1,83 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A monetary amount identified in the input document. - /// - public class ContractAmts - { - /// - /// The confidence level in the identification of the contract amount. - /// - public class ConfidenceLevelValue - { - /// - /// Constant HIGH for High - /// - public const string HIGH = "High"; - /// - /// Constant MEDIUM for Medium - /// - public const string MEDIUM = "Medium"; - /// - /// Constant LOW for Low - /// - public const string LOW = "Low"; - - } - - /// - /// The confidence level in the identification of the contract amount. - /// Constants for possible values can be found using ContractAmts.ConfidenceLevelValue - /// - [JsonProperty("confidence_level", NullValueHandling = NullValueHandling.Ignore)] - public string ConfidenceLevel { get; set; } - /// - /// The monetary amount. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The normalized form of the amount, which is listed as a string. This element is optional; it is returned - /// only if normalized text exists. - /// - [JsonProperty("text_normalized", NullValueHandling = NullValueHandling.Ignore)] - public string TextNormalized { get; set; } - /// - /// The details of the normalized text, if applicable. This element is optional; it is returned only if - /// normalized text exists. - /// - [JsonProperty("interpretation", NullValueHandling = NullValueHandling.Ignore)] - public Interpretation Interpretation { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ContractAmts.cs.meta b/Scripts/Services/CompareComply/V1/Model/ContractAmts.cs.meta deleted file mode 100644 index 3ebf9f1a3..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ContractAmts.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 32f204073ae87e84abcbf44028aa633f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ContractCurrencies.cs b/Scripts/Services/CompareComply/V1/Model/ContractCurrencies.cs deleted file mode 100644 index e93b26916..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ContractCurrencies.cs +++ /dev/null @@ -1,78 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The contract currencies that are declared in the document. - /// - public class ContractCurrencies - { - /// - /// The confidence level in the identification of the contract currency. - /// - public class ConfidenceLevelValue - { - /// - /// Constant HIGH for High - /// - public const string HIGH = "High"; - /// - /// Constant MEDIUM for Medium - /// - public const string MEDIUM = "Medium"; - /// - /// Constant LOW for Low - /// - public const string LOW = "Low"; - - } - - /// - /// The confidence level in the identification of the contract currency. - /// Constants for possible values can be found using ContractCurrencies.ConfidenceLevelValue - /// - [JsonProperty("confidence_level", NullValueHandling = NullValueHandling.Ignore)] - public string ConfidenceLevel { get; set; } - /// - /// The contract currency. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The normalized form of the contract currency, which is listed as a string in - /// [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) format. This element is optional; it is - /// returned only if normalized text exists. - /// - [JsonProperty("text_normalized", NullValueHandling = NullValueHandling.Ignore)] - public string TextNormalized { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ContractCurrencies.cs.meta b/Scripts/Services/CompareComply/V1/Model/ContractCurrencies.cs.meta deleted file mode 100644 index ddbad6abd..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ContractCurrencies.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4682a2429680f48c9a42eb9502f77f3a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ContractTerms.cs b/Scripts/Services/CompareComply/V1/Model/ContractTerms.cs deleted file mode 100644 index b07983253..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ContractTerms.cs +++ /dev/null @@ -1,83 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The duration or durations of the contract. - /// - public class ContractTerms - { - /// - /// The confidence level in the identification of the contract term. - /// - public class ConfidenceLevelValue - { - /// - /// Constant HIGH for High - /// - public const string HIGH = "High"; - /// - /// Constant MEDIUM for Medium - /// - public const string MEDIUM = "Medium"; - /// - /// Constant LOW for Low - /// - public const string LOW = "Low"; - - } - - /// - /// The confidence level in the identification of the contract term. - /// Constants for possible values can be found using ContractTerms.ConfidenceLevelValue - /// - [JsonProperty("confidence_level", NullValueHandling = NullValueHandling.Ignore)] - public string ConfidenceLevel { get; set; } - /// - /// The contract term (duration). - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The normalized form of the contract term, which is listed as a string. This element is optional; it is - /// returned only if normalized text exists. - /// - [JsonProperty("text_normalized", NullValueHandling = NullValueHandling.Ignore)] - public string TextNormalized { get; set; } - /// - /// The details of the normalized text, if applicable. This element is optional; it is returned only if - /// normalized text exists. - /// - [JsonProperty("interpretation", NullValueHandling = NullValueHandling.Ignore)] - public Interpretation Interpretation { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ContractTerms.cs.meta b/Scripts/Services/CompareComply/V1/Model/ContractTerms.cs.meta deleted file mode 100644 index 99d502fdc..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ContractTerms.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a56d0df95350749668c595aeb120d4b3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ContractTypes.cs b/Scripts/Services/CompareComply/V1/Model/ContractTypes.cs deleted file mode 100644 index d3a9f20e9..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ContractTypes.cs +++ /dev/null @@ -1,71 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The contract type identified in the input document. - /// - public class ContractTypes - { - /// - /// The confidence level in the identification of the contract type. - /// - public class ConfidenceLevelValue - { - /// - /// Constant HIGH for High - /// - public const string HIGH = "High"; - /// - /// Constant MEDIUM for Medium - /// - public const string MEDIUM = "Medium"; - /// - /// Constant LOW for Low - /// - public const string LOW = "Low"; - - } - - /// - /// The confidence level in the identification of the contract type. - /// Constants for possible values can be found using ContractTypes.ConfidenceLevelValue - /// - [JsonProperty("confidence_level", NullValueHandling = NullValueHandling.Ignore)] - public string ConfidenceLevel { get; set; } - /// - /// The contract type. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ContractTypes.cs.meta b/Scripts/Services/CompareComply/V1/Model/ContractTypes.cs.meta deleted file mode 100644 index 5331d38b0..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ContractTypes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c9c9375bb991540e8b164435765c7081 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/DocCounts.cs b/Scripts/Services/CompareComply/V1/Model/DocCounts.cs deleted file mode 100644 index 4fbbba2ea..000000000 --- a/Scripts/Services/CompareComply/V1/Model/DocCounts.cs +++ /dev/null @@ -1,48 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Document counts. - /// - public class DocCounts - { - /// - /// Total number of documents. - /// - [JsonProperty("total", NullValueHandling = NullValueHandling.Ignore)] - public long? Total { get; set; } - /// - /// Number of pending documents. - /// - [JsonProperty("pending", NullValueHandling = NullValueHandling.Ignore)] - public long? Pending { get; set; } - /// - /// Number of documents successfully processed. - /// - [JsonProperty("successful", NullValueHandling = NullValueHandling.Ignore)] - public long? Successful { get; set; } - /// - /// Number of documents not successfully processed. - /// - [JsonProperty("failed", NullValueHandling = NullValueHandling.Ignore)] - public long? Failed { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/DocCounts.cs.meta b/Scripts/Services/CompareComply/V1/Model/DocCounts.cs.meta deleted file mode 100644 index 21bcd2403..000000000 --- a/Scripts/Services/CompareComply/V1/Model/DocCounts.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 15bab54872d3764419aa948b67a028a6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/DocInfo.cs b/Scripts/Services/CompareComply/V1/Model/DocInfo.cs deleted file mode 100644 index 0b381c1a7..000000000 --- a/Scripts/Services/CompareComply/V1/Model/DocInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Information about the parsed input document. - /// - public class DocInfo - { - /// - /// The full text of the parsed document in HTML format. - /// - [JsonProperty("html", NullValueHandling = NullValueHandling.Ignore)] - public string Html { get; set; } - /// - /// The title of the parsed document. If the service did not detect a title, the value of this element is - /// `null`. - /// - [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public string Title { get; set; } - /// - /// The MD5 hash of the input document. - /// - [JsonProperty("hash", NullValueHandling = NullValueHandling.Ignore)] - public string Hash { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/DocInfo.cs.meta b/Scripts/Services/CompareComply/V1/Model/DocInfo.cs.meta deleted file mode 100644 index 20323dc27..000000000 --- a/Scripts/Services/CompareComply/V1/Model/DocInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8cec52e55f8f8bb4fb6ead822a987203 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/DocStructure.cs b/Scripts/Services/CompareComply/V1/Model/DocStructure.cs deleted file mode 100644 index 669e70835..000000000 --- a/Scripts/Services/CompareComply/V1/Model/DocStructure.cs +++ /dev/null @@ -1,46 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The structure of the input document. - /// - public class DocStructure - { - /// - /// An array containing one object per section or subsection identified in the input document. - /// - [JsonProperty("section_titles", NullValueHandling = NullValueHandling.Ignore)] - public List SectionTitles { get; set; } - /// - /// An array containing one object per section or subsection, in parallel with the `section_titles` array, that - /// details the leading sentences in the corresponding section or subsection. - /// - [JsonProperty("leading_sentences", NullValueHandling = NullValueHandling.Ignore)] - public List LeadingSentences { get; set; } - /// - /// An array containing one object per paragraph, in parallel with the `section_titles` and `leading_sentences` - /// arrays. - /// - [JsonProperty("paragraphs", NullValueHandling = NullValueHandling.Ignore)] - public List Paragraphs { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/DocStructure.cs.meta b/Scripts/Services/CompareComply/V1/Model/DocStructure.cs.meta deleted file mode 100644 index 439657c9e..000000000 --- a/Scripts/Services/CompareComply/V1/Model/DocStructure.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8e01c215e75aef8428e8d3cb4e78548f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Document.cs b/Scripts/Services/CompareComply/V1/Model/Document.cs deleted file mode 100644 index 449c6707c..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Document.cs +++ /dev/null @@ -1,49 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Basic information about the input document. - /// - public class Document - { - /// - /// Document title, if detected. - /// - [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public string Title { get; set; } - /// - /// The input document converted into HTML format. - /// - [JsonProperty("html", NullValueHandling = NullValueHandling.Ignore)] - public string Html { get; set; } - /// - /// The MD5 hash value of the input document. - /// - [JsonProperty("hash", NullValueHandling = NullValueHandling.Ignore)] - public string Hash { get; set; } - /// - /// The label applied to the input document with the calling method's `file_1_label` or `file_2_label` value. - /// This field is specified only in the output of the **Comparing two documents** method. - /// - [JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)] - public string Label { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Document.cs.meta b/Scripts/Services/CompareComply/V1/Model/Document.cs.meta deleted file mode 100644 index 22ed96b00..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Document.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 55993892496802645b64cf95fc19757e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/EffectiveDates.cs b/Scripts/Services/CompareComply/V1/Model/EffectiveDates.cs deleted file mode 100644 index aad88d2ce..000000000 --- a/Scripts/Services/CompareComply/V1/Model/EffectiveDates.cs +++ /dev/null @@ -1,77 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// An effective date. - /// - public class EffectiveDates - { - /// - /// The confidence level in the identification of the effective date. - /// - public class ConfidenceLevelValue - { - /// - /// Constant HIGH for High - /// - public const string HIGH = "High"; - /// - /// Constant MEDIUM for Medium - /// - public const string MEDIUM = "Medium"; - /// - /// Constant LOW for Low - /// - public const string LOW = "Low"; - - } - - /// - /// The confidence level in the identification of the effective date. - /// Constants for possible values can be found using EffectiveDates.ConfidenceLevelValue - /// - [JsonProperty("confidence_level", NullValueHandling = NullValueHandling.Ignore)] - public string ConfidenceLevel { get; set; } - /// - /// The effective date, listed as a string. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The normalized form of the effective date, which is listed as a string. This element is optional; it is - /// returned only if normalized text exists. - /// - [JsonProperty("text_normalized", NullValueHandling = NullValueHandling.Ignore)] - public string TextNormalized { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/EffectiveDates.cs.meta b/Scripts/Services/CompareComply/V1/Model/EffectiveDates.cs.meta deleted file mode 100644 index f4c4a0685..000000000 --- a/Scripts/Services/CompareComply/V1/Model/EffectiveDates.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 800d290376d1efc4cb994ec1de7baa6e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Element.cs b/Scripts/Services/CompareComply/V1/Model/Element.cs deleted file mode 100644 index 32e6d9119..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Element.cs +++ /dev/null @@ -1,56 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A component part of the document. - /// - public class Element - { - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The text of the element. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// Description of the action specified by the element and whom it affects. - /// - [JsonProperty("types", NullValueHandling = NullValueHandling.Ignore)] - public List Types { get; set; } - /// - /// List of functional categories into which the element falls; in other words, the subject matter of the - /// element. - /// - [JsonProperty("categories", NullValueHandling = NullValueHandling.Ignore)] - public List Categories { get; set; } - /// - /// List of document attributes. - /// - [JsonProperty("attributes", NullValueHandling = NullValueHandling.Ignore)] - public List Attributes { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Element.cs.meta b/Scripts/Services/CompareComply/V1/Model/Element.cs.meta deleted file mode 100644 index c50b48868..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Element.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 377a4b6a605d92a4ba8c02595a2ea42a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ElementLocations.cs b/Scripts/Services/CompareComply/V1/Model/ElementLocations.cs deleted file mode 100644 index ef2febb83..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ElementLocations.cs +++ /dev/null @@ -1,38 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A list of `begin` and `end` indexes that indicate the locations of the elements in the input document. - /// - public class ElementLocations - { - /// - /// An integer that indicates the starting position of the element in the input document. - /// - [JsonProperty("begin", NullValueHandling = NullValueHandling.Ignore)] - public long? Begin { get; set; } - /// - /// An integer that indicates the ending position of the element in the input document. - /// - [JsonProperty("end", NullValueHandling = NullValueHandling.Ignore)] - public long? End { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ElementLocations.cs.meta b/Scripts/Services/CompareComply/V1/Model/ElementLocations.cs.meta deleted file mode 100644 index ccf142e6e..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ElementLocations.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 476bbbbb00378ca42b29288b2c84a00a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ElementPair.cs b/Scripts/Services/CompareComply/V1/Model/ElementPair.cs deleted file mode 100644 index 2881673db..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ElementPair.cs +++ /dev/null @@ -1,62 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Details of semantically aligned elements. - /// - public class ElementPair - { - /// - /// The label of the document (that is, the value of either the `file_1_label` or `file_2_label` parameters) in - /// which the element occurs. - /// - [JsonProperty("document_label", NullValueHandling = NullValueHandling.Ignore)] - public string DocumentLabel { get; set; } - /// - /// The contents of the element. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// Description of the action specified by the element and whom it affects. - /// - [JsonProperty("types", NullValueHandling = NullValueHandling.Ignore)] - public List Types { get; set; } - /// - /// List of functional categories into which the element falls; in other words, the subject matter of the - /// element. - /// - [JsonProperty("categories", NullValueHandling = NullValueHandling.Ignore)] - public List Categories { get; set; } - /// - /// List of document attributes. - /// - [JsonProperty("attributes", NullValueHandling = NullValueHandling.Ignore)] - public List Attributes { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ElementPair.cs.meta b/Scripts/Services/CompareComply/V1/Model/ElementPair.cs.meta deleted file mode 100644 index 753208c8b..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ElementPair.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b83344b0561e82e40a32c05ab015e7bd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackDataInput.cs b/Scripts/Services/CompareComply/V1/Model/FeedbackDataInput.cs deleted file mode 100644 index ce0a33e95..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackDataInput.cs +++ /dev/null @@ -1,69 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Feedback data for submission. - /// - public class FeedbackDataInput - { - /// - /// The type of feedback. The only permitted value is `element_classification`. - /// - [JsonProperty("feedback_type", NullValueHandling = NullValueHandling.Ignore)] - public string FeedbackType { get; set; } - /// - /// Brief information about the input document. - /// - [JsonProperty("document", NullValueHandling = NullValueHandling.Ignore)] - public ShortDoc Document { get; set; } - /// - /// An optional string identifying the model ID. The only permitted value is `contracts`. - /// - [JsonProperty("model_id", NullValueHandling = NullValueHandling.Ignore)] - public string ModelId { get; set; } - /// - /// An optional string identifying the version of the model used. - /// - [JsonProperty("model_version", NullValueHandling = NullValueHandling.Ignore)] - public string ModelVersion { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The text on which to submit feedback. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The original labeling from the input document, without the submitted feedback. - /// - [JsonProperty("original_labels", NullValueHandling = NullValueHandling.Ignore)] - public OriginalLabelsIn OriginalLabels { get; set; } - /// - /// The updated labeling from the input document, accounting for the submitted feedback. - /// - [JsonProperty("updated_labels", NullValueHandling = NullValueHandling.Ignore)] - public UpdatedLabelsIn UpdatedLabels { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackDataInput.cs.meta b/Scripts/Services/CompareComply/V1/Model/FeedbackDataInput.cs.meta deleted file mode 100644 index e3b87af2e..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackDataInput.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b129e4f617c94e34299cdef01a2c585a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackDataOutput.cs b/Scripts/Services/CompareComply/V1/Model/FeedbackDataOutput.cs deleted file mode 100644 index 6e29b66ad..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackDataOutput.cs +++ /dev/null @@ -1,74 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Information returned from the **Add Feedback** method. - /// - public class FeedbackDataOutput - { - /// - /// A string identifying the user adding the feedback. The only permitted value is `element_classification`. - /// - [JsonProperty("feedback_type", NullValueHandling = NullValueHandling.Ignore)] - public string FeedbackType { get; set; } - /// - /// Brief information about the input document. - /// - [JsonProperty("document", NullValueHandling = NullValueHandling.Ignore)] - public ShortDoc Document { get; set; } - /// - /// An optional string identifying the model ID. The only permitted value is `contracts`. - /// - [JsonProperty("model_id", NullValueHandling = NullValueHandling.Ignore)] - public string ModelId { get; set; } - /// - /// An optional string identifying the version of the model used. - /// - [JsonProperty("model_version", NullValueHandling = NullValueHandling.Ignore)] - public string ModelVersion { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The text to which the feedback applies. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The original labeling from the input document, without the submitted feedback. - /// - [JsonProperty("original_labels", NullValueHandling = NullValueHandling.Ignore)] - public OriginalLabelsOut OriginalLabels { get; set; } - /// - /// The updated labeling from the input document, accounting for the submitted feedback. - /// - [JsonProperty("updated_labels", NullValueHandling = NullValueHandling.Ignore)] - public UpdatedLabelsOut UpdatedLabels { get; set; } - /// - /// Pagination details, if required by the length of the output. - /// - [JsonProperty("pagination", NullValueHandling = NullValueHandling.Ignore)] - public Pagination Pagination { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackDataOutput.cs.meta b/Scripts/Services/CompareComply/V1/Model/FeedbackDataOutput.cs.meta deleted file mode 100644 index c6797356b..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackDataOutput.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 29ba4cba205f60a48998c633fba3e6cb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackDeleted.cs b/Scripts/Services/CompareComply/V1/Model/FeedbackDeleted.cs deleted file mode 100644 index 4caab3adb..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackDeleted.cs +++ /dev/null @@ -1,38 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The status and message of the deletion request. - /// - public class FeedbackDeleted - { - /// - /// HTTP return code. - /// - [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] - public long? Status { get; set; } - /// - /// Status message returned from the service. - /// - [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] - public string Message { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackDeleted.cs.meta b/Scripts/Services/CompareComply/V1/Model/FeedbackDeleted.cs.meta deleted file mode 100644 index b56c62660..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackDeleted.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ca173ee1b4927554a81e3409daf365e5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackList.cs b/Scripts/Services/CompareComply/V1/Model/FeedbackList.cs deleted file mode 100644 index 62f539f59..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackList.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The results of a successful **List Feedback** request for all feedback. - /// - public class FeedbackList - { - /// - /// A list of all feedback for the document. - /// - [JsonProperty("feedback", NullValueHandling = NullValueHandling.Ignore)] - public List Feedback { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackList.cs.meta b/Scripts/Services/CompareComply/V1/Model/FeedbackList.cs.meta deleted file mode 100644 index 4659ae309..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c217267315277f74abc280500d739a7f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackReturn.cs b/Scripts/Services/CompareComply/V1/Model/FeedbackReturn.cs deleted file mode 100644 index a9869c952..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackReturn.cs +++ /dev/null @@ -1,54 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Information about the document and the submitted feedback. - /// - public class FeedbackReturn - { - /// - /// The unique ID of the feedback object. - /// - [JsonProperty("feedback_id", NullValueHandling = NullValueHandling.Ignore)] - public string FeedbackId { get; set; } - /// - /// An optional string identifying the person submitting feedback. - /// - [JsonProperty("user_id", NullValueHandling = NullValueHandling.Ignore)] - public string UserId { get; set; } - /// - /// An optional comment from the person submitting the feedback. - /// - [JsonProperty("comment", NullValueHandling = NullValueHandling.Ignore)] - public string Comment { get; set; } - /// - /// Timestamp listing the creation time of the feedback submission. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Created { get; set; } - /// - /// Information returned from the **Add Feedback** method. - /// - [JsonProperty("feedback_data", NullValueHandling = NullValueHandling.Ignore)] - public FeedbackDataOutput FeedbackData { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/FeedbackReturn.cs.meta b/Scripts/Services/CompareComply/V1/Model/FeedbackReturn.cs.meta deleted file mode 100644 index bcb3d01bd..000000000 --- a/Scripts/Services/CompareComply/V1/Model/FeedbackReturn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 11f03a8c07f798842bd6944d596487bb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/GetFeedback.cs b/Scripts/Services/CompareComply/V1/Model/GetFeedback.cs deleted file mode 100644 index 0bcf4dbc7..000000000 --- a/Scripts/Services/CompareComply/V1/Model/GetFeedback.cs +++ /dev/null @@ -1,49 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The results of a successful **Get Feedback** request for a single feedback entry. - /// - public class GetFeedback - { - /// - /// A string uniquely identifying the feedback entry. - /// - [JsonProperty("feedback_id", NullValueHandling = NullValueHandling.Ignore)] - public string FeedbackId { get; set; } - /// - /// A timestamp identifying the creation time of the feedback entry. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Created { get; set; } - /// - /// A string containing the user's comment about the feedback entry. - /// - [JsonProperty("comment", NullValueHandling = NullValueHandling.Ignore)] - public string Comment { get; set; } - /// - /// Information returned from the **Add Feedback** method. - /// - [JsonProperty("feedback_data", NullValueHandling = NullValueHandling.Ignore)] - public FeedbackDataOutput FeedbackData { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/GetFeedback.cs.meta b/Scripts/Services/CompareComply/V1/Model/GetFeedback.cs.meta deleted file mode 100644 index db0477aef..000000000 --- a/Scripts/Services/CompareComply/V1/Model/GetFeedback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c95535b13032af44baeb09694e5758b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/HTMLReturn.cs b/Scripts/Services/CompareComply/V1/Model/HTMLReturn.cs deleted file mode 100644 index 239c79649..000000000 --- a/Scripts/Services/CompareComply/V1/Model/HTMLReturn.cs +++ /dev/null @@ -1,53 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The HTML converted from an input document. - /// - public class HTMLReturn - { - /// - /// The number of pages in the input document. - /// - [JsonProperty("num_pages", NullValueHandling = NullValueHandling.Ignore)] - public string NumPages { get; set; } - /// - /// The author of the input document, if identified. - /// - [JsonProperty("author", NullValueHandling = NullValueHandling.Ignore)] - public string Author { get; set; } - /// - /// The publication date of the input document, if identified. - /// - [JsonProperty("publication_date", NullValueHandling = NullValueHandling.Ignore)] - public string PublicationDate { get; set; } - /// - /// The title of the input document, if identified. - /// - [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public string Title { get; set; } - /// - /// The HTML version of the input document. - /// - [JsonProperty("html", NullValueHandling = NullValueHandling.Ignore)] - public string Html { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/HTMLReturn.cs.meta b/Scripts/Services/CompareComply/V1/Model/HTMLReturn.cs.meta deleted file mode 100644 index 2e02210b9..000000000 --- a/Scripts/Services/CompareComply/V1/Model/HTMLReturn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: abe5d9fbf3b256945b6875c55f1ccc88 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Interpretation.cs b/Scripts/Services/CompareComply/V1/Model/Interpretation.cs deleted file mode 100644 index 86643d775..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Interpretation.cs +++ /dev/null @@ -1,49 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The details of the normalized text, if applicable. This element is optional; it is returned only if normalized - /// text exists. - /// - public class Interpretation - { - /// - /// The value that was located in the normalized text. - /// - [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] - public string Value { get; set; } - /// - /// An integer or float expressing the numeric value of the `value` key. - /// - [JsonProperty("numeric_value", NullValueHandling = NullValueHandling.Ignore)] - public float? NumericValue { get; set; } - /// - /// A string listing the unit of the value that was found in the normalized text. - /// - /// **Note:** The value of `unit` is the [ISO-4217 currency - /// code](https://www.iso.org/iso-4217-currency-codes.html) identified for the currency amount (for example, - /// `USD` or `EUR`). If the service cannot disambiguate a currency symbol (for example, `$` or `£`), the value - /// of `unit` contains the ambiguous symbol as-is. - /// - [JsonProperty("unit", NullValueHandling = NullValueHandling.Ignore)] - public string Unit { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Interpretation.cs.meta b/Scripts/Services/CompareComply/V1/Model/Interpretation.cs.meta deleted file mode 100644 index c5e611dcd..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Interpretation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ef39af4f15bf5480da6cc0fe8a5cd895 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Key.cs b/Scripts/Services/CompareComply/V1/Model/Key.cs deleted file mode 100644 index 2e0bfc501..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Key.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A key in a key-value pair. - /// - public class Key - { - /// - /// The unique ID of the key in the table. - /// - [JsonProperty("cell_id", NullValueHandling = NullValueHandling.Ignore)] - public string CellId { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The text content of the table cell without HTML markup. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Key.cs.meta b/Scripts/Services/CompareComply/V1/Model/Key.cs.meta deleted file mode 100644 index f22ecc8c6..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Key.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aca6f97c99cfb09429a685094600923e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/KeyValuePair.cs.meta b/Scripts/Services/CompareComply/V1/Model/KeyValuePair.cs.meta deleted file mode 100644 index 56bae0ca5..000000000 --- a/Scripts/Services/CompareComply/V1/Model/KeyValuePair.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7713ca0e9b7acc744b7f401ec5a84cb7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Label.cs b/Scripts/Services/CompareComply/V1/Model/Label.cs deleted file mode 100644 index a19969c0b..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Label.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// 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. - /// - public class Label - { - /// - /// The identified `nature` of the element. - /// - [JsonProperty("nature", NullValueHandling = NullValueHandling.Ignore)] - public string Nature { get; set; } - /// - /// The identified `party` of the element. - /// - [JsonProperty("party", NullValueHandling = NullValueHandling.Ignore)] - public string Party { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Label.cs.meta b/Scripts/Services/CompareComply/V1/Model/Label.cs.meta deleted file mode 100644 index 3930f7c7e..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Label.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6f46bafcf083e3a488ff62af92a7e87d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/LeadingSentence.cs b/Scripts/Services/CompareComply/V1/Model/LeadingSentence.cs deleted file mode 100644 index b75ebf4b8..000000000 --- a/Scripts/Services/CompareComply/V1/Model/LeadingSentence.cs +++ /dev/null @@ -1,45 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The leading sentences in a section or subsection of the input document. - /// - public class LeadingSentence - { - /// - /// The text of the leading sentence. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// An array of `location` objects that lists the locations of detected leading sentences. - /// - [JsonProperty("element_locations", NullValueHandling = NullValueHandling.Ignore)] - public List ElementLocations { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/LeadingSentence.cs.meta b/Scripts/Services/CompareComply/V1/Model/LeadingSentence.cs.meta deleted file mode 100644 index 8705d2adc..000000000 --- a/Scripts/Services/CompareComply/V1/Model/LeadingSentence.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3eff22a7a74d6794dbde6f741a92e205 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Location.cs b/Scripts/Services/CompareComply/V1/Model/Location.cs deleted file mode 100644 index 65bf83b68..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Location.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The numeric location of the identified element in the document, represented with two integers labeled `begin` - /// and `end`. - /// - public class Location - { - /// - /// The element's `begin` index. - /// - [JsonProperty("begin", NullValueHandling = NullValueHandling.Ignore)] - public long? Begin { get; set; } - /// - /// The element's `end` index. - /// - [JsonProperty("end", NullValueHandling = NullValueHandling.Ignore)] - public long? End { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Location.cs.meta b/Scripts/Services/CompareComply/V1/Model/Location.cs.meta deleted file mode 100644 index 5d0a49d66..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Location.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a646ed50d2e025b44a6cbfe62143c9a8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Mention.cs b/Scripts/Services/CompareComply/V1/Model/Mention.cs deleted file mode 100644 index a57204a10..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Mention.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A mention of a party. - /// - public class Mention - { - /// - /// The name of the party. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Mention.cs.meta b/Scripts/Services/CompareComply/V1/Model/Mention.cs.meta deleted file mode 100644 index 261c7c116..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Mention.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b0988f51de70842d8adc0bcc1d703a3e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/OriginalLabelsIn.cs b/Scripts/Services/CompareComply/V1/Model/OriginalLabelsIn.cs deleted file mode 100644 index 58860ff79..000000000 --- a/Scripts/Services/CompareComply/V1/Model/OriginalLabelsIn.cs +++ /dev/null @@ -1,40 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The original labeling from the input document, without the submitted feedback. - /// - public class OriginalLabelsIn - { - /// - /// Description of the action specified by the element and whom it affects. - /// - [JsonProperty("types", NullValueHandling = NullValueHandling.Ignore)] - public List Types { get; set; } - /// - /// List of functional categories into which the element falls; in other words, the subject matter of the - /// element. - /// - [JsonProperty("categories", NullValueHandling = NullValueHandling.Ignore)] - public List Categories { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/OriginalLabelsIn.cs.meta b/Scripts/Services/CompareComply/V1/Model/OriginalLabelsIn.cs.meta deleted file mode 100644 index b7fbf846e..000000000 --- a/Scripts/Services/CompareComply/V1/Model/OriginalLabelsIn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ee9adc90d70171641a16c75e60c0fc3a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/OriginalLabelsOut.cs b/Scripts/Services/CompareComply/V1/Model/OriginalLabelsOut.cs deleted file mode 100644 index a42be07c9..000000000 --- a/Scripts/Services/CompareComply/V1/Model/OriginalLabelsOut.cs +++ /dev/null @@ -1,40 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The original labeling from the input document, without the submitted feedback. - /// - public class OriginalLabelsOut - { - /// - /// Description of the action specified by the element and whom it affects. - /// - [JsonProperty("types", NullValueHandling = NullValueHandling.Ignore)] - public List Types { get; set; } - /// - /// List of functional categories into which the element falls; in other words, the subject matter of the - /// element. - /// - [JsonProperty("categories", NullValueHandling = NullValueHandling.Ignore)] - public List Categories { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/OriginalLabelsOut.cs.meta b/Scripts/Services/CompareComply/V1/Model/OriginalLabelsOut.cs.meta deleted file mode 100644 index c793d6bd4..000000000 --- a/Scripts/Services/CompareComply/V1/Model/OriginalLabelsOut.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aa71d5e25372b9e4b9b5f240f018ba59 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Pagination.cs b/Scripts/Services/CompareComply/V1/Model/Pagination.cs deleted file mode 100644 index 462d54d83..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Pagination.cs +++ /dev/null @@ -1,53 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Pagination details, if required by the length of the output. - /// - public class Pagination - { - /// - /// A token identifying the current page of results. - /// - [JsonProperty("refresh_cursor", NullValueHandling = NullValueHandling.Ignore)] - public string RefreshCursor { get; set; } - /// - /// A token identifying the next page of results. - /// - [JsonProperty("next_cursor", NullValueHandling = NullValueHandling.Ignore)] - public string NextCursor { get; set; } - /// - /// The URL that returns the current page of results. - /// - [JsonProperty("refresh_url", NullValueHandling = NullValueHandling.Ignore)] - public string RefreshUrl { get; set; } - /// - /// The URL that returns the next page of results. - /// - [JsonProperty("next_url", NullValueHandling = NullValueHandling.Ignore)] - public string NextUrl { get; set; } - /// - /// Reserved for future use. - /// - [JsonProperty("total", NullValueHandling = NullValueHandling.Ignore)] - public long? Total { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Pagination.cs.meta b/Scripts/Services/CompareComply/V1/Model/Pagination.cs.meta deleted file mode 100644 index c8f82612c..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Pagination.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c81c76522ff5f44bbd7c053ef25845f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Paragraphs.cs b/Scripts/Services/CompareComply/V1/Model/Paragraphs.cs deleted file mode 100644 index 4fd666175..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Paragraphs.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The locations of each paragraph in the input document. - /// - public class Paragraphs - { - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Paragraphs.cs.meta b/Scripts/Services/CompareComply/V1/Model/Paragraphs.cs.meta deleted file mode 100644 index 9a94e6eb3..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Paragraphs.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f23ab7e851359416bbe058520f0f0ee1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Parties.cs b/Scripts/Services/CompareComply/V1/Model/Parties.cs deleted file mode 100644 index cf5027854..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Parties.cs +++ /dev/null @@ -1,76 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A party and its corresponding role, including address and contact information if identified. - /// - public class Parties - { - /// - /// A string that identifies the importance of the party. - /// - public class ImportanceValue - { - /// - /// Constant PRIMARY for Primary - /// - public const string PRIMARY = "Primary"; - /// - /// Constant UNKNOWN for Unknown - /// - public const string UNKNOWN = "Unknown"; - - } - - /// - /// A string that identifies the importance of the party. - /// Constants for possible values can be found using Parties.ImportanceValue - /// - [JsonProperty("importance", NullValueHandling = NullValueHandling.Ignore)] - public string Importance { get; set; } - /// - /// The normalized form of the party's name. - /// - [JsonProperty("party", NullValueHandling = NullValueHandling.Ignore)] - public string Party { get; set; } - /// - /// A string identifying the party's role. - /// - [JsonProperty("role", NullValueHandling = NullValueHandling.Ignore)] - public string Role { get; set; } - /// - /// A list of the party's address or addresses. - /// - [JsonProperty("addresses", NullValueHandling = NullValueHandling.Ignore)] - public List
Addresses { get; set; } - /// - /// A list of the names and roles of contacts identified in the input document. - /// - [JsonProperty("contacts", NullValueHandling = NullValueHandling.Ignore)] - public List Contacts { get; set; } - /// - /// A list of the party's mentions in the input document. - /// - [JsonProperty("mentions", NullValueHandling = NullValueHandling.Ignore)] - public List Mentions { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Parties.cs.meta b/Scripts/Services/CompareComply/V1/Model/Parties.cs.meta deleted file mode 100644 index ac484f81b..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Parties.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 52228898f85aa5049ab8064e72a291f7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/PaymentTerms.cs b/Scripts/Services/CompareComply/V1/Model/PaymentTerms.cs deleted file mode 100644 index 9dd9ea8cd..000000000 --- a/Scripts/Services/CompareComply/V1/Model/PaymentTerms.cs +++ /dev/null @@ -1,83 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The document's payment duration or durations. - /// - public class PaymentTerms - { - /// - /// The confidence level in the identification of the payment term. - /// - public class ConfidenceLevelValue - { - /// - /// Constant HIGH for High - /// - public const string HIGH = "High"; - /// - /// Constant MEDIUM for Medium - /// - public const string MEDIUM = "Medium"; - /// - /// Constant LOW for Low - /// - public const string LOW = "Low"; - - } - - /// - /// The confidence level in the identification of the payment term. - /// Constants for possible values can be found using PaymentTerms.ConfidenceLevelValue - /// - [JsonProperty("confidence_level", NullValueHandling = NullValueHandling.Ignore)] - public string ConfidenceLevel { get; set; } - /// - /// The payment term (duration). - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The normalized form of the payment term, which is listed as a string. This element is optional; it is - /// returned only if normalized text exists. - /// - [JsonProperty("text_normalized", NullValueHandling = NullValueHandling.Ignore)] - public string TextNormalized { get; set; } - /// - /// The details of the normalized text, if applicable. This element is optional; it is returned only if - /// normalized text exists. - /// - [JsonProperty("interpretation", NullValueHandling = NullValueHandling.Ignore)] - public Interpretation Interpretation { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/PaymentTerms.cs.meta b/Scripts/Services/CompareComply/V1/Model/PaymentTerms.cs.meta deleted file mode 100644 index fb98777b8..000000000 --- a/Scripts/Services/CompareComply/V1/Model/PaymentTerms.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0942fa37e2c364725a324618c721fc87 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/RowHeaders.cs b/Scripts/Services/CompareComply/V1/Model/RowHeaders.cs deleted file mode 100644 index f9f457eb8..000000000 --- a/Scripts/Services/CompareComply/V1/Model/RowHeaders.cs +++ /dev/null @@ -1,70 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Row-level cells, each applicable as a header to other cells in the same row as itself, of the current table. - /// - public class RowHeaders - { - /// - /// The unique ID of the cell in the current table. - /// - [JsonProperty("cell_id", NullValueHandling = NullValueHandling.Ignore)] - public string CellId { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The textual contents of this cell from the input document without associated markup content. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// If you provide customization input, the normalized version of the cell text according to the customization; - /// otherwise, the same value as `text`. - /// - [JsonProperty("text_normalized", NullValueHandling = NullValueHandling.Ignore)] - public string TextNormalized { get; set; } - /// - /// The `begin` index of this cell's `row` location in the current table. - /// - [JsonProperty("row_index_begin", NullValueHandling = NullValueHandling.Ignore)] - public long? RowIndexBegin { get; set; } - /// - /// The `end` index of this cell's `row` location in the current table. - /// - [JsonProperty("row_index_end", NullValueHandling = NullValueHandling.Ignore)] - public long? RowIndexEnd { get; set; } - /// - /// The `begin` index of this cell's `column` location in the current table. - /// - [JsonProperty("column_index_begin", NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnIndexBegin { get; set; } - /// - /// The `end` index of this cell's `column` location in the current table. - /// - [JsonProperty("column_index_end", NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnIndexEnd { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/RowHeaders.cs.meta b/Scripts/Services/CompareComply/V1/Model/RowHeaders.cs.meta deleted file mode 100644 index 1e26b5e43..000000000 --- a/Scripts/Services/CompareComply/V1/Model/RowHeaders.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3a3f6dd057060484c9a5823274558de2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/SectionTitle.cs b/Scripts/Services/CompareComply/V1/Model/SectionTitle.cs deleted file mode 100644 index 1f0b570f5..000000000 --- a/Scripts/Services/CompareComply/V1/Model/SectionTitle.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The table's section title, if identified. - /// - public class SectionTitle - { - /// - /// The text of the section title, if identified. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/SectionTitle.cs.meta b/Scripts/Services/CompareComply/V1/Model/SectionTitle.cs.meta deleted file mode 100644 index 8b4355b68..000000000 --- a/Scripts/Services/CompareComply/V1/Model/SectionTitle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 884e1a5784806e04a9fea3acb90f0163 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/SectionTitles.cs b/Scripts/Services/CompareComply/V1/Model/SectionTitles.cs deleted file mode 100644 index 5720b6b11..000000000 --- a/Scripts/Services/CompareComply/V1/Model/SectionTitles.cs +++ /dev/null @@ -1,53 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// An array containing one object per section or subsection detected in the input document. Sections and - /// subsections are not nested; instead, they are flattened out and can be placed back in order by using the `begin` - /// and `end` values of the element and the `level` value of the section. - /// - public class SectionTitles - { - /// - /// The text of the section title, if identified. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// An integer indicating the level at which the section is located in the input document. For example, `1` - /// represents a top-level section, `2` represents a subsection within the level `1` section, and so forth. - /// - [JsonProperty("level", NullValueHandling = NullValueHandling.Ignore)] - public long? Level { get; set; } - /// - /// An array of `location` objects that lists the locations of detected section titles. - /// - [JsonProperty("element_locations", NullValueHandling = NullValueHandling.Ignore)] - public List ElementLocations { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/SectionTitles.cs.meta b/Scripts/Services/CompareComply/V1/Model/SectionTitles.cs.meta deleted file mode 100644 index 91d6062b2..000000000 --- a/Scripts/Services/CompareComply/V1/Model/SectionTitles.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 143510193f0c5e34d887626e38d7fb17 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/ShortDoc.cs b/Scripts/Services/CompareComply/V1/Model/ShortDoc.cs deleted file mode 100644 index cdd04e9b4..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ShortDoc.cs +++ /dev/null @@ -1,38 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Brief information about the input document. - /// - public class ShortDoc - { - /// - /// The title of the input document, if identified. - /// - [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public string Title { get; set; } - /// - /// The MD5 hash of the input document. - /// - [JsonProperty("hash", NullValueHandling = NullValueHandling.Ignore)] - public string Hash { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/ShortDoc.cs.meta b/Scripts/Services/CompareComply/V1/Model/ShortDoc.cs.meta deleted file mode 100644 index 65f979240..000000000 --- a/Scripts/Services/CompareComply/V1/Model/ShortDoc.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1aba36cabe464e5498c8225a97e7fde2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/TableHeaders.cs b/Scripts/Services/CompareComply/V1/Model/TableHeaders.cs deleted file mode 100644 index 9c88128f0..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TableHeaders.cs +++ /dev/null @@ -1,64 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The contents of the current table's header. - /// - public class TableHeaders - { - /// - /// The unique ID of the cell in the current table. - /// - [JsonProperty("cell_id", NullValueHandling = NullValueHandling.Ignore)] - public string CellId { get; set; } - /// - /// The location of the table header cell in the current table as defined by its `begin` and `end` offsets, - /// respectfully, in the input document. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public object Location { get; set; } - /// - /// The textual contents of the cell from the input document without associated markup content. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The `begin` index of this cell's `row` location in the current table. - /// - [JsonProperty("row_index_begin", NullValueHandling = NullValueHandling.Ignore)] - public long? RowIndexBegin { get; set; } - /// - /// The `end` index of this cell's `row` location in the current table. - /// - [JsonProperty("row_index_end", NullValueHandling = NullValueHandling.Ignore)] - public long? RowIndexEnd { get; set; } - /// - /// The `begin` index of this cell's `column` location in the current table. - /// - [JsonProperty("column_index_begin", NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnIndexBegin { get; set; } - /// - /// The `end` index of this cell's `column` location in the current table. - /// - [JsonProperty("column_index_end", NullValueHandling = NullValueHandling.Ignore)] - public long? ColumnIndexEnd { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/TableHeaders.cs.meta b/Scripts/Services/CompareComply/V1/Model/TableHeaders.cs.meta deleted file mode 100644 index 8738fd9eb..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TableHeaders.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7a5087cb157beed4a9e659001fe99c27 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/TableReturn.cs b/Scripts/Services/CompareComply/V1/Model/TableReturn.cs deleted file mode 100644 index bc6dbfde5..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TableReturn.cs +++ /dev/null @@ -1,49 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The analysis of the document's tables. - /// - public class TableReturn - { - /// - /// Information about the parsed input document. - /// - [JsonProperty("document", NullValueHandling = NullValueHandling.Ignore)] - public DocInfo Document { get; set; } - /// - /// The ID of the model used to extract the table contents. The value for table extraction is `tables`. - /// - [JsonProperty("model_id", NullValueHandling = NullValueHandling.Ignore)] - public string ModelId { get; set; } - /// - /// The version of the `tables` model ID. - /// - [JsonProperty("model_version", NullValueHandling = NullValueHandling.Ignore)] - public string ModelVersion { get; set; } - /// - /// Definitions of the tables identified in the input document. - /// - [JsonProperty("tables", NullValueHandling = NullValueHandling.Ignore)] - public List Tables { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/TableReturn.cs.meta b/Scripts/Services/CompareComply/V1/Model/TableReturn.cs.meta deleted file mode 100644 index d029f6f99..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TableReturn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bc9a0ab8c8432454a98ebfbafe8493da -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/TableTitle.cs b/Scripts/Services/CompareComply/V1/Model/TableTitle.cs deleted file mode 100644 index 2750be78b..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TableTitle.cs +++ /dev/null @@ -1,40 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// If identified, the title or caption of the current table of the form `Table x.: ...`. Empty when no title is - /// identified. When exposed, the `title` is also excluded from the `contexts` array of the same table. - /// - public class TableTitle - { - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The text of the identified table title or caption. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/TableTitle.cs.meta b/Scripts/Services/CompareComply/V1/Model/TableTitle.cs.meta deleted file mode 100644 index 8e497dc55..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TableTitle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 448d10d7423084fe7a37edb800c6adb1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Tables.cs b/Scripts/Services/CompareComply/V1/Model/Tables.cs deleted file mode 100644 index e174d2d5d..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Tables.cs +++ /dev/null @@ -1,85 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The contents of the tables extracted from a document. - /// - public class Tables - { - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The textual contents of the current table from the input document without associated markup content. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The table's section title, if identified. - /// - [JsonProperty("section_title", NullValueHandling = NullValueHandling.Ignore)] - public SectionTitle SectionTitle { get; set; } - /// - /// If identified, the title or caption of the current table of the form `Table x.: ...`. Empty when no title is - /// identified. When exposed, the `title` is also excluded from the `contexts` array of the same table. - /// - [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public TableTitle Title { get; set; } - /// - /// An array of table-level cells that apply as headers to all the other cells in the current table. - /// - [JsonProperty("table_headers", NullValueHandling = NullValueHandling.Ignore)] - public List TableHeaders { get; set; } - /// - /// An array of row-level cells, each applicable as a header to other cells in the same row as itself, of the - /// current table. - /// - [JsonProperty("row_headers", NullValueHandling = NullValueHandling.Ignore)] - public List RowHeaders { get; set; } - /// - /// An array of column-level cells, each applicable as a header to other cells in the same column as itself, of - /// the current table. - /// - [JsonProperty("column_headers", NullValueHandling = NullValueHandling.Ignore)] - public List ColumnHeaders { get; set; } - /// - /// An array of cells that are neither table header nor column header nor row header cells, of the current table - /// with corresponding row and column header associations. - /// - [JsonProperty("body_cells", NullValueHandling = NullValueHandling.Ignore)] - public List BodyCells { get; set; } - /// - /// An array of objects that list text that is related to the table contents and that precedes or follows the - /// current table. - /// - [JsonProperty("contexts", NullValueHandling = NullValueHandling.Ignore)] - public List Contexts { get; set; } - /// - /// An array of key-value pairs identified in the current table. - /// - [JsonProperty("key_value_pairs", NullValueHandling = NullValueHandling.Ignore)] - public List KeyValuePairs { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Tables.cs.meta b/Scripts/Services/CompareComply/V1/Model/Tables.cs.meta deleted file mode 100644 index 61ae86f9e..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Tables.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 346be410d625ef74eb20ff8281fb10d1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/TerminationDates.cs b/Scripts/Services/CompareComply/V1/Model/TerminationDates.cs deleted file mode 100644 index b848f3047..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TerminationDates.cs +++ /dev/null @@ -1,77 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Termination dates identified in the input document. - /// - public class TerminationDates - { - /// - /// The confidence level in the identification of the termination date. - /// - public class ConfidenceLevelValue - { - /// - /// Constant HIGH for High - /// - public const string HIGH = "High"; - /// - /// Constant MEDIUM for Medium - /// - public const string MEDIUM = "Medium"; - /// - /// Constant LOW for Low - /// - public const string LOW = "Low"; - - } - - /// - /// The confidence level in the identification of the termination date. - /// Constants for possible values can be found using TerminationDates.ConfidenceLevelValue - /// - [JsonProperty("confidence_level", NullValueHandling = NullValueHandling.Ignore)] - public string ConfidenceLevel { get; set; } - /// - /// The termination date. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The normalized form of the termination date, which is listed as a string. This element is optional; it is - /// returned only if normalized text exists. - /// - [JsonProperty("text_normalized", NullValueHandling = NullValueHandling.Ignore)] - public string TextNormalized { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/TerminationDates.cs.meta b/Scripts/Services/CompareComply/V1/Model/TerminationDates.cs.meta deleted file mode 100644 index 65f5acf2b..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TerminationDates.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 177f5623ff71e1b4c9cd4954007b8bbe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/TypeLabel.cs b/Scripts/Services/CompareComply/V1/Model/TypeLabel.cs deleted file mode 100644 index 64078f2f7..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TypeLabel.cs +++ /dev/null @@ -1,66 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Identification of a specific type. - /// - public class TypeLabel - { - /// - /// The type of modification of the feedback entry in the updated labels response. - /// - public class ModificationValue - { - /// - /// Constant ADDED for added - /// - public const string ADDED = "added"; - /// - /// Constant UNCHANGED for unchanged - /// - public const string UNCHANGED = "unchanged"; - /// - /// Constant REMOVED for removed - /// - public const string REMOVED = "removed"; - - } - - /// - /// The type of modification of the feedback entry in the updated labels response. - /// Constants for possible values can be found using TypeLabel.ModificationValue - /// - [JsonProperty("modification", NullValueHandling = NullValueHandling.Ignore)] - public string Modification { get; set; } - /// - /// 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. - /// - [JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)] - public Label Label { get; set; } - /// - /// Hashed values that you can send to IBM to provide feedback or receive support. - /// - [JsonProperty("provenance_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ProvenanceIds { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/TypeLabel.cs.meta b/Scripts/Services/CompareComply/V1/Model/TypeLabel.cs.meta deleted file mode 100644 index 0f2743fd4..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TypeLabel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3914a585fd8e848489dda4a4d76af08f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/TypeLabelComparison.cs b/Scripts/Services/CompareComply/V1/Model/TypeLabelComparison.cs deleted file mode 100644 index 7394420dd..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TypeLabelComparison.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Identification of a specific type. - /// - public class TypeLabelComparison - { - /// - /// 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. - /// - [JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)] - public Label Label { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/TypeLabelComparison.cs.meta b/Scripts/Services/CompareComply/V1/Model/TypeLabelComparison.cs.meta deleted file mode 100644 index 15a55794b..000000000 --- a/Scripts/Services/CompareComply/V1/Model/TypeLabelComparison.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8c8db3e8b10477c4990f6a549c2ed5ff -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/UnalignedElement.cs b/Scripts/Services/CompareComply/V1/Model/UnalignedElement.cs deleted file mode 100644 index b264e158f..000000000 --- a/Scripts/Services/CompareComply/V1/Model/UnalignedElement.cs +++ /dev/null @@ -1,62 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// Element that does not align semantically between two compared documents. - /// - public class UnalignedElement - { - /// - /// The label assigned to the document by the value of the `file_1_label` or `file_2_label` parameters on the - /// **Compare two documents** method. - /// - [JsonProperty("document_label", NullValueHandling = NullValueHandling.Ignore)] - public string DocumentLabel { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The text of the element. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// Description of the action specified by the element and whom it affects. - /// - [JsonProperty("types", NullValueHandling = NullValueHandling.Ignore)] - public List Types { get; set; } - /// - /// List of functional categories into which the element falls; in other words, the subject matter of the - /// element. - /// - [JsonProperty("categories", NullValueHandling = NullValueHandling.Ignore)] - public List Categories { get; set; } - /// - /// List of document attributes. - /// - [JsonProperty("attributes", NullValueHandling = NullValueHandling.Ignore)] - public List Attributes { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/UnalignedElement.cs.meta b/Scripts/Services/CompareComply/V1/Model/UnalignedElement.cs.meta deleted file mode 100644 index 03c1e8825..000000000 --- a/Scripts/Services/CompareComply/V1/Model/UnalignedElement.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d584d7766891c7b4c857605a07b486f2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsIn.cs b/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsIn.cs deleted file mode 100644 index 7011727ef..000000000 --- a/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsIn.cs +++ /dev/null @@ -1,40 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The updated labeling from the input document, accounting for the submitted feedback. - /// - public class UpdatedLabelsIn - { - /// - /// Description of the action specified by the element and whom it affects. - /// - [JsonProperty("types", NullValueHandling = NullValueHandling.Ignore)] - public List Types { get; set; } - /// - /// List of functional categories into which the element falls; in other words, the subject matter of the - /// element. - /// - [JsonProperty("categories", NullValueHandling = NullValueHandling.Ignore)] - public List Categories { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsIn.cs.meta b/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsIn.cs.meta deleted file mode 100644 index 2f5512b1c..000000000 --- a/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsIn.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7e29145ec4cb63a429c5ceb0d036f4b4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsOut.cs b/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsOut.cs deleted file mode 100644 index de7794f32..000000000 --- a/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsOut.cs +++ /dev/null @@ -1,40 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// The updated labeling from the input document, accounting for the submitted feedback. - /// - public class UpdatedLabelsOut - { - /// - /// Description of the action specified by the element and whom it affects. - /// - [JsonProperty("types", NullValueHandling = NullValueHandling.Ignore)] - public List Types { get; set; } - /// - /// List of functional categories into which the element falls; in other words, the subject matter of the - /// element. - /// - [JsonProperty("categories", NullValueHandling = NullValueHandling.Ignore)] - public List Categories { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsOut.cs.meta b/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsOut.cs.meta deleted file mode 100644 index f7f4690f9..000000000 --- a/Scripts/Services/CompareComply/V1/Model/UpdatedLabelsOut.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9b46b8ce02f2e314e9bc4b9d83285025 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/Value.cs b/Scripts/Services/CompareComply/V1/Model/Value.cs deleted file mode 100644 index fd417e403..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Value.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.CompareComply.V1.Model -{ - /// - /// A value in a key-value pair. - /// - public class Value - { - /// - /// The unique ID of the value in the table. - /// - [JsonProperty("cell_id", NullValueHandling = NullValueHandling.Ignore)] - public string CellId { get; set; } - /// - /// The numeric location of the identified element in the document, represented with two integers labeled - /// `begin` and `end`. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - /// - /// The text content of the table cell without HTML markup. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - } -} diff --git a/Scripts/Services/CompareComply/V1/Model/Value.cs.meta b/Scripts/Services/CompareComply/V1/Model/Value.cs.meta deleted file mode 100644 index bb05d2be7..000000000 --- a/Scripts/Services/CompareComply/V1/Model/Value.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b9a8d5fbde271054a980e9f4a03bd475 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/DiscoveryService.cs b/Scripts/Services/Discovery/V1/DiscoveryService.cs index f5a0058f9..82a705985 100644 --- a/Scripts/Services/Discovery/V1/DiscoveryService.cs +++ b/Scripts/Services/Discovery/V1/DiscoveryService.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ */ /** -* IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025 +* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428 */ using System.Collections.Generic; @@ -363,8 +363,8 @@ private void OnGetEnvironmentResponse(RESTConnector.Request req, RESTConnector.R /// The ID of the environment. /// Name that identifies the environment. (optional, default to ) /// Description of the environment. (optional, default to ) - /// Size that the environment should be increased to. Environment size cannot be modified - /// when using a Lite plan. Environment size can only increased and not decreased. (optional) + /// Size to change the environment to. **Note:** Lite plan users cannot change the + /// environment size. (optional) /// ModelEnvironment public bool UpdateEnvironment(Callback callback, string environmentId, string name = null, string description = null, string size = null) { diff --git a/Scripts/Services/Discovery/V1/Model/Calculation.cs.meta b/Scripts/Services/Discovery/V1/Model/Calculation.cs.meta deleted file mode 100644 index 6e67a5235..000000000 --- a/Scripts/Services/Discovery/V1/Model/Calculation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7e5ae22015ee49741a61cd055c1f093c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Enrichment.cs b/Scripts/Services/Discovery/V1/Model/Enrichment.cs index 4acb7bab7..dba9f4ae1 100644 --- a/Scripts/Services/Discovery/V1/Model/Enrichment.cs +++ b/Scripts/Services/Discovery/V1/Model/Enrichment.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,15 +51,10 @@ public class Enrichment [JsonProperty("overwrite", NullValueHandling = NullValueHandling.Ignore)] public bool? Overwrite { get; set; } /// - /// Name of the enrichment service to call. Current options are `natural_language_understanding` and `elements`. + /// Name of the enrichment service to call. The only supported option is `natural_language_understanding`. The + /// `elements` option is deprecated and support ended on 10 July 2020. /// - /// When using `natual_language_understanding`, the **options** object must contain Natural Language - /// Understanding options. - /// - /// When using `elements` the **options** object must contain Element Classification options. Additionally, when - /// using the `elements` enrichment the configuration specified and files ingested must meet all the criteria - /// specified in [the - /// documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-element-classification#element-classification). + /// The **options** object must contain Natural Language Understanding options. /// [JsonProperty("enrichment", NullValueHandling = NullValueHandling.Ignore)] public string _Enrichment { get; set; } @@ -70,7 +65,11 @@ public class Enrichment [JsonProperty("ignore_downstream_errors", NullValueHandling = NullValueHandling.Ignore)] public bool? IgnoreDownstreamErrors { get; set; } /// - /// Options which are specific to a particular enrichment. + /// Options that are specific to a particular enrichment. + /// + /// The `elements` enrichment type is deprecated. Use the [Create a + /// project](https://cloud.ibm.com/apidocs/discovery-data#createproject) method of the Discovery v2 API to + /// create a `content_intelligence` project type instead. /// [JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)] public EnrichmentOptions Options { get; set; } diff --git a/Scripts/Services/Discovery/V1/Model/EnrichmentOptions.cs b/Scripts/Services/Discovery/V1/Model/EnrichmentOptions.cs index 1dd8b3db0..9fbae4da1 100644 --- a/Scripts/Services/Discovery/V1/Model/EnrichmentOptions.cs +++ b/Scripts/Services/Discovery/V1/Model/EnrichmentOptions.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,11 @@ namespace IBM.Watson.Discovery.V1.Model { /// - /// Options which are specific to a particular enrichment. + /// Options that are specific to a particular enrichment. + /// + /// The `elements` enrichment type is deprecated. Use the [Create a + /// project](https://cloud.ibm.com/apidocs/discovery-data#createproject) method of the Discovery v2 API to create a + /// `content_intelligence` project type instead. /// public class EnrichmentOptions { @@ -86,8 +90,7 @@ public class LanguageValue [JsonProperty("features", NullValueHandling = NullValueHandling.Ignore)] public NluEnrichmentFeatures Features { get; set; } /// - /// For use with `elements` enrichments only. The element extraction model to use. The only model available is - /// `contract`. + /// The element extraction model to use, which can be `contract` only. The `elements` enrichment is deprecated. /// [JsonProperty("model", NullValueHandling = NullValueHandling.Ignore)] public string Model { get; set; } diff --git a/Scripts/Services/Discovery/V1/Model/Filter.cs.meta b/Scripts/Services/Discovery/V1/Model/Filter.cs.meta deleted file mode 100644 index 865246489..000000000 --- a/Scripts/Services/Discovery/V1/Model/Filter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3df678cb3cfe81b4ca6a3e9422b80bd4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Histogram.cs.meta b/Scripts/Services/Discovery/V1/Model/Histogram.cs.meta deleted file mode 100644 index f6701c2a5..000000000 --- a/Scripts/Services/Discovery/V1/Model/Histogram.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8d32fd8625267f44ba1cf197d15459de -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Nested.cs.meta b/Scripts/Services/Discovery/V1/Model/Nested.cs.meta deleted file mode 100644 index 5a7325792..000000000 --- a/Scripts/Services/Discovery/V1/Model/Nested.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: de61b96777e01b045bbf4e7ad34502ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/QueryAggregation.cs b/Scripts/Services/Discovery/V1/Model/QueryAggregation.cs index ba85bd68d..dc3442ce0 100644 --- a/Scripts/Services/Discovery/V1/Model/QueryAggregation.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryAggregation.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -using System.Collections.Generic; using JsonSubTypes; using Newtonsoft.Json; @@ -25,17 +24,17 @@ namespace IBM.Watson.Discovery.V1.Model /// An aggregation produced by Discovery to analyze the input provided. /// [JsonConverter(typeof(JsonSubtypes), "type")] - [JsonSubtypes.KnownSubType(typeof(Histogram), "histogram")] - [JsonSubtypes.KnownSubType(typeof(Calculation), "max")] - [JsonSubtypes.KnownSubType(typeof(Calculation), "min")] - [JsonSubtypes.KnownSubType(typeof(Calculation), "average")] - [JsonSubtypes.KnownSubType(typeof(Calculation), "sum")] - [JsonSubtypes.KnownSubType(typeof(Calculation), "unique_count")] - [JsonSubtypes.KnownSubType(typeof(Term), "term")] - [JsonSubtypes.KnownSubType(typeof(Filter), "filter")] - [JsonSubtypes.KnownSubType(typeof(Nested), "nested")] - [JsonSubtypes.KnownSubType(typeof(Timeslice), "timeslice")] - [JsonSubtypes.KnownSubType(typeof(TopHits), "top_hits")] + [JsonSubtypes.KnownSubType(typeof(QueryHistogramAggregation), "histogram")] + [JsonSubtypes.KnownSubType(typeof(QueryCalculationAggregation), "max")] + [JsonSubtypes.KnownSubType(typeof(QueryCalculationAggregation), "min")] + [JsonSubtypes.KnownSubType(typeof(QueryCalculationAggregation), "average")] + [JsonSubtypes.KnownSubType(typeof(QueryCalculationAggregation), "sum")] + [JsonSubtypes.KnownSubType(typeof(QueryCalculationAggregation), "unique_count")] + [JsonSubtypes.KnownSubType(typeof(QueryTermAggregation), "term")] + [JsonSubtypes.KnownSubType(typeof(QueryFilterAggregation), "filter")] + [JsonSubtypes.KnownSubType(typeof(QueryNestedAggregation), "nested")] + [JsonSubtypes.KnownSubType(typeof(QueryTimesliceAggregation), "timeslice")] + [JsonSubtypes.KnownSubType(typeof(QueryTopHitsAggregation), "top_hits")] public class QueryAggregation { /// @@ -43,20 +42,5 @@ public class QueryAggregation /// [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] public string Type { get; set; } - /// - /// Array of aggregation results. - /// - [JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)] - public List Results { get; set; } - /// - /// Number of matching results. - /// - [JsonProperty("matching_results", NullValueHandling = NullValueHandling.Ignore)] - public long? MatchingResults { get; set; } - /// - /// Aggregations returned by Discovery. - /// - [JsonProperty("aggregations", NullValueHandling = NullValueHandling.Ignore)] - public List Aggregations { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/Calculation.cs b/Scripts/Services/Discovery/V1/Model/QueryCalculationAggregation.cs similarity index 73% rename from Scripts/Services/Discovery/V1/Model/Calculation.cs rename to Scripts/Services/Discovery/V1/Model/QueryCalculationAggregation.cs index ad96c64f8..a4aadb078 100644 --- a/Scripts/Services/Discovery/V1/Model/Calculation.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryCalculationAggregation.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,23 +15,23 @@ * */ -using System.Collections.Generic; using Newtonsoft.Json; namespace IBM.Watson.Discovery.V1.Model { /// - /// Calculation. + /// Returns a scalar calculation across all documents for the field specified. Possible calculations include min, + /// max, sum, average, and unique_count. /// - public class Calculation : QueryAggregation + public class QueryCalculationAggregation : QueryAggregation { /// - /// The field where the aggregation is located in the document. + /// The field to perform the calculation on. /// [JsonProperty("field", NullValueHandling = NullValueHandling.Ignore)] public string Field { get; set; } /// - /// Value of the aggregation. + /// The value of the calculation. /// [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] public double? Value { get; set; } diff --git a/Scripts/Services/Discovery/V1/Model/QueryCalculationAggregation.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryCalculationAggregation.cs.meta new file mode 100644 index 000000000..d7d87fc93 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryCalculationAggregation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1cebba47f0e94498095005ef39641ceb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Filter.cs b/Scripts/Services/Discovery/V1/Model/QueryFilterAggregation.cs similarity index 51% rename from Scripts/Services/Discovery/V1/Model/Filter.cs rename to Scripts/Services/Discovery/V1/Model/QueryFilterAggregation.cs index 1119c55d7..1bcd0bf84 100644 --- a/Scripts/Services/Discovery/V1/Model/Filter.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryFilterAggregation.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,14 +21,25 @@ namespace IBM.Watson.Discovery.V1.Model { /// - /// Filter. + /// A modifier that narrows the document set of the sub-aggregations it precedes. /// - public class Filter : QueryAggregation + public class QueryFilterAggregation : QueryAggregation { /// - /// The match the aggregated results queried for. + /// The filter that is written in Discovery Query Language syntax and is applied to the documents before + /// sub-aggregations are run. /// [JsonProperty("match", NullValueHandling = NullValueHandling.Ignore)] public string Match { get; set; } + /// + /// Number of documents that match the filter. + /// + [JsonProperty("matching_results", NullValueHandling = NullValueHandling.Ignore)] + public long? MatchingResults { get; set; } + /// + /// An array of sub-aggregations. + /// + [JsonProperty("aggregations", NullValueHandling = NullValueHandling.Ignore)] + public List Aggregations { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/QueryFilterAggregation.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryFilterAggregation.cs.meta new file mode 100644 index 000000000..3c6856db1 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryFilterAggregation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bda0edf135b654d8b84b53b6649596ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Histogram.cs b/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregation.cs similarity index 55% rename from Scripts/Services/Discovery/V1/Model/Histogram.cs rename to Scripts/Services/Discovery/V1/Model/QueryHistogramAggregation.cs index 6f18dbb65..d5416e716 100644 --- a/Scripts/Services/Discovery/V1/Model/Histogram.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregation.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,19 +21,30 @@ namespace IBM.Watson.Discovery.V1.Model { /// - /// Histogram. + /// Numeric interval segments to categorize documents by using field values from a single numeric field to describe + /// the category. /// - public class Histogram : QueryAggregation + public class QueryHistogramAggregation : QueryAggregation { /// - /// The field where the aggregation is located in the document. + /// The numeric field name used to create the histogram. /// [JsonProperty("field", NullValueHandling = NullValueHandling.Ignore)] public string Field { get; set; } /// - /// Interval of the aggregation. (For 'histogram' type). + /// The size of the sections that the results are split into. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public long? Interval { get; set; } + /// + /// Identifier specified in the query request of this aggregation. + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + /// + /// Array of numeric intervals. + /// + [JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)] + public List Results { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregation.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregation.cs.meta new file mode 100644 index 000000000..00d1cb255 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d7b4d2d09e2b843589da00ddb5594344 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/CompareComply/V1/Model/KeyValuePair.cs b/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregationResult.cs similarity index 53% rename from Scripts/Services/CompareComply/V1/Model/KeyValuePair.cs rename to Scripts/Services/Discovery/V1/Model/QueryHistogramAggregationResult.cs index e9e538f83..ad4461fcd 100644 --- a/Scripts/Services/CompareComply/V1/Model/KeyValuePair.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregationResult.cs @@ -1,5 +1,5 @@ /** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,22 +18,27 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace IBM.Watson.CompareComply.V1.Model +namespace IBM.Watson.Discovery.V1.Model { /// - /// Key-value pairs detected across cell boundaries. + /// Histogram numeric interval result. /// - public class KeyValuePair + public class QueryHistogramAggregationResult { /// - /// A key in a key-value pair. + /// The value of the upper bound for the numeric segment. /// [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] - public Key Key { get; set; } + public long? Key { get; set; } /// - /// A list of values in a key-value pair. + /// Number of documents with the specified key as the upper bound. /// - [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] - public List Value { get; set; } + [JsonProperty("matching_results", NullValueHandling = NullValueHandling.Ignore)] + public long? MatchingResults { get; set; } + /// + /// An array of sub-aggregations. + /// + [JsonProperty("aggregations", NullValueHandling = NullValueHandling.Ignore)] + public List Aggregations { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregationResult.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregationResult.cs.meta new file mode 100644 index 000000000..f43502490 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryHistogramAggregationResult.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9121a07a19181412d98a66f68d259033 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Nested.cs b/Scripts/Services/Discovery/V1/Model/QueryNestedAggregation.cs similarity index 51% rename from Scripts/Services/Discovery/V1/Model/Nested.cs rename to Scripts/Services/Discovery/V1/Model/QueryNestedAggregation.cs index a5e69d677..7fafbc059 100644 --- a/Scripts/Services/Discovery/V1/Model/Nested.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryNestedAggregation.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,14 +21,25 @@ namespace IBM.Watson.Discovery.V1.Model { /// - /// Nested. + /// A restriction that alters the document set that is used for sub-aggregations it precedes to nested documents + /// found in the field specified. /// - public class Nested : QueryAggregation + public class QueryNestedAggregation : QueryAggregation { /// - /// The area of the results the aggregation was restricted to. + /// The path to the document field to scope sub-aggregations to. /// [JsonProperty("path", NullValueHandling = NullValueHandling.Ignore)] public string Path { get; set; } + /// + /// Number of nested documents found in the specified field. + /// + [JsonProperty("matching_results", NullValueHandling = NullValueHandling.Ignore)] + public long? MatchingResults { get; set; } + /// + /// An array of sub-aggregations. + /// + [JsonProperty("aggregations", NullValueHandling = NullValueHandling.Ignore)] + public List Aggregations { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/QueryNestedAggregation.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryNestedAggregation.cs.meta new file mode 100644 index 000000000..118352c1a --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryNestedAggregation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 69d7d2ff650164747a90e65b395a2328 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Term.cs b/Scripts/Services/Discovery/V1/Model/QueryTermAggregation.cs similarity index 58% rename from Scripts/Services/Discovery/V1/Model/Term.cs rename to Scripts/Services/Discovery/V1/Model/QueryTermAggregation.cs index f91e0acd5..73860ab18 100644 --- a/Scripts/Services/Discovery/V1/Model/Term.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryTermAggregation.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,19 +21,29 @@ namespace IBM.Watson.Discovery.V1.Model { /// - /// Term. + /// Returns the top values for the field specified. /// - public class Term : QueryAggregation + public class QueryTermAggregation : QueryAggregation { /// - /// The field where the aggregation is located in the document. + /// The field in the document used to generate top values from. /// [JsonProperty("field", NullValueHandling = NullValueHandling.Ignore)] public string Field { get; set; } /// - /// The number of terms identified. + /// The number of top values returned. /// [JsonProperty("count", NullValueHandling = NullValueHandling.Ignore)] public long? Count { get; set; } + /// + /// Identifier specified in the query request of this aggregation. + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + /// + /// Array of top values for the field. + /// + [JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)] + public List Results { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/QueryTermAggregation.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryTermAggregation.cs.meta new file mode 100644 index 000000000..9eefe9bd6 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryTermAggregation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6d9465f9916254f78bb1d0a975b6d784 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/QueryTermAggregationResult.cs b/Scripts/Services/Discovery/V1/Model/QueryTermAggregationResult.cs new file mode 100644 index 000000000..eaca59cfc --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryTermAggregationResult.cs @@ -0,0 +1,61 @@ +/** +* (C) Copyright IBM Corp. 2019, 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Discovery.V1.Model +{ + /// + /// Top value result for the term aggregation. + /// + public class QueryTermAggregationResult + { + /// + /// Value of the field with a non-zero frequency in the document set. + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public string Key { get; set; } + /// + /// Number of documents that contain the 'key'. + /// + [JsonProperty("matching_results", NullValueHandling = NullValueHandling.Ignore)] + public long? MatchingResults { get; set; } + /// + /// The relevancy for this term. + /// + [JsonProperty("relevancy", NullValueHandling = NullValueHandling.Ignore)] + public double? Relevancy { get; set; } + /// + /// The number of documents which have the term as the value of specified field in the whole set of documents in + /// this collection. Returned only when the `relevancy` parameter is set to `true`. + /// + [JsonProperty("total_matching_documents", NullValueHandling = NullValueHandling.Ignore)] + public long? TotalMatchingDocuments { get; set; } + /// + /// The estimated number of documents which would match the query and also meet the condition. Returned only + /// when the `relevancy` parameter is set to `true`. + /// + [JsonProperty("estimated_matching_documents", NullValueHandling = NullValueHandling.Ignore)] + public long? EstimatedMatchingDocuments { get; set; } + /// + /// An array of sub-aggregations. + /// + [JsonProperty("aggregations", NullValueHandling = NullValueHandling.Ignore)] + public List Aggregations { get; set; } + } +} diff --git a/Scripts/Services/Discovery/V1/Model/QueryTermAggregationResult.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryTermAggregationResult.cs.meta new file mode 100644 index 000000000..5a7315016 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryTermAggregationResult.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f322888d2e30417dada5bc30e59b37b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Timeslice.cs b/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregation.cs similarity index 58% rename from Scripts/Services/Discovery/V1/Model/Timeslice.cs rename to Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregation.cs index 9b60ff1c6..10a73adc7 100644 --- a/Scripts/Services/Discovery/V1/Model/Timeslice.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregation.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,26 +21,29 @@ namespace IBM.Watson.Discovery.V1.Model { /// - /// Timeslice. + /// A specialized histogram aggregation that uses dates to create interval segments. /// - public class Timeslice : QueryAggregation + public class QueryTimesliceAggregation : QueryAggregation { /// - /// The field where the aggregation is located in the document. + /// The date field name used to create the timeslice. /// [JsonProperty("field", NullValueHandling = NullValueHandling.Ignore)] public string Field { get; set; } /// - /// Interval of the aggregation. Valid date interval values are second/seconds minute/minutes, hour/hours, - /// day/days, week/weeks, month/months, and year/years. + /// The date interval value. Valid values are seconds, minutes, hours, days, weeks, and years. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public string Interval { get; set; } /// - /// Used to indicate that anomaly detection should be performed. Anomaly detection is used to locate unusual - /// datapoints within a time series. + /// Identifier specified in the query request of this aggregation. /// - [JsonProperty("anomaly", NullValueHandling = NullValueHandling.Ignore)] - public bool? Anomaly { get; set; } + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + /// + /// Array of aggregation results. + /// + [JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)] + public List Results { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregation.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregation.cs.meta new file mode 100644 index 000000000..c96dd0a09 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 317f4338641d24070bb979ddaf4dcd42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregationResult.cs b/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregationResult.cs new file mode 100644 index 000000000..55f8a83b4 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregationResult.cs @@ -0,0 +1,49 @@ +/** +* (C) Copyright IBM Corp. 2019, 2022. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace IBM.Watson.Discovery.V1.Model +{ + /// + /// A timeslice interval segment. + /// + public class QueryTimesliceAggregationResult + { + /// + /// String date value of the upper bound for the timeslice interval in ISO-8601 format. + /// + [JsonProperty("key_as_string", NullValueHandling = NullValueHandling.Ignore)] + public string KeyAsString { get; set; } + /// + /// Numeric date value of the upper bound for the timeslice interval in UNIX milliseconds since epoch. + /// + [JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)] + public long? Key { get; set; } + /// + /// Number of documents with the specified key as the upper bound. + /// + [JsonProperty("matching_results", NullValueHandling = NullValueHandling.Ignore)] + public long? MatchingResults { get; set; } + /// + /// An array of sub-aggregations. + /// + [JsonProperty("aggregations", NullValueHandling = NullValueHandling.Ignore)] + public List Aggregations { get; set; } + } +} diff --git a/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregationResult.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregationResult.cs.meta new file mode 100644 index 000000000..1994fd16e --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryTimesliceAggregationResult.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 919d385b0ab914768a3f3ec5f5c1602a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/TopHits.cs b/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregation.cs similarity index 65% rename from Scripts/Services/Discovery/V1/Model/TopHits.cs rename to Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregation.cs index 9bd2a63bc..649b1aeda 100644 --- a/Scripts/Services/Discovery/V1/Model/TopHits.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregation.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,25 +15,29 @@ * */ -using System.Collections.Generic; using Newtonsoft.Json; namespace IBM.Watson.Discovery.V1.Model { /// - /// TopHits. + /// Returns the top documents ranked by the score of the query. /// - public class TopHits : QueryAggregation + public class QueryTopHitsAggregation : QueryAggregation { /// - /// Number of top hits returned by the aggregation. + /// The number of documents to return. /// [JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)] public long? Size { get; set; } /// + /// Identifier specified in the query request of this aggregation. + /// + [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] + public string Name { get; set; } + /// /// Gets or Sets Hits /// [JsonProperty("hits", NullValueHandling = NullValueHandling.Ignore)] - public TopHitsResults Hits { get; set; } + public QueryTopHitsAggregationResult Hits { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregation.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregation.cs.meta new file mode 100644 index 000000000..fbb52198e --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: be46f56f129354dc28874488f41e10bb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/TopHitsResults.cs b/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregationResult.cs similarity index 78% rename from Scripts/Services/Discovery/V1/Model/TopHitsResults.cs rename to Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregationResult.cs index 69c498520..fe5c24aac 100644 --- a/Scripts/Services/Discovery/V1/Model/TopHitsResults.cs +++ b/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregationResult.cs @@ -1,5 +1,5 @@ /** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. +* (C) Copyright IBM Corp. 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,9 +21,9 @@ namespace IBM.Watson.Discovery.V1.Model { /// - /// Top hit information for this query. + /// A query response that contains the matching documents for the preceding aggregations. /// - public class TopHitsResults + public class QueryTopHitsAggregationResult { /// /// Number of matching results. @@ -31,9 +31,9 @@ public class TopHitsResults [JsonProperty("matching_results", NullValueHandling = NullValueHandling.Ignore)] public long? MatchingResults { get; set; } /// - /// Top results returned by the aggregation. + /// An array of the document results. /// [JsonProperty("hits", NullValueHandling = NullValueHandling.Ignore)] - public List Hits { get; set; } + public List> Hits { get; set; } } } diff --git a/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregationResult.cs.meta b/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregationResult.cs.meta new file mode 100644 index 000000000..38e57da9f --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/QueryTopHitsAggregationResult.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bfe684abf638844ebb9dccb3a99ea4ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/StatusDetails.cs b/Scripts/Services/Discovery/V1/Model/StatusDetails.cs index fd2778b2c..59a731244 100644 --- a/Scripts/Services/Discovery/V1/Model/StatusDetails.cs +++ b/Scripts/Services/Discovery/V1/Model/StatusDetails.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2021. +* (C) Copyright IBM Corp. 2021, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ public class StatusDetails [JsonProperty("authenticated", NullValueHandling = NullValueHandling.Ignore)] public bool? Authenticated { get; set; } /// - /// If `authenticated` is `false`, a message describes why the authentication was unsuccessful. + /// If `authenticated` is `false`, a message describes why authentication is unsuccessful. /// [JsonProperty("error_message", NullValueHandling = NullValueHandling.Ignore)] public string ErrorMessage { get; set; } diff --git a/Scripts/Services/Discovery/V1/Model/StatusDetails.cs.meta b/Scripts/Services/Discovery/V1/Model/StatusDetails.cs.meta new file mode 100644 index 000000000..7e140f131 --- /dev/null +++ b/Scripts/Services/Discovery/V1/Model/StatusDetails.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 186551033a6494ea2b956ca7ba8ee1b4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Term.cs.meta b/Scripts/Services/Discovery/V1/Model/Term.cs.meta deleted file mode 100644 index a8aa14515..000000000 --- a/Scripts/Services/Discovery/V1/Model/Term.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 274e040661cdd2c4680e45b7f0785d49 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/Timeslice.cs.meta b/Scripts/Services/Discovery/V1/Model/Timeslice.cs.meta deleted file mode 100644 index 54d4d752c..000000000 --- a/Scripts/Services/Discovery/V1/Model/Timeslice.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0b752d297bf82034db4a0a5b93cd9e0c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/TopHits.cs.meta b/Scripts/Services/Discovery/V1/Model/TopHits.cs.meta deleted file mode 100644 index 51fe64af4..000000000 --- a/Scripts/Services/Discovery/V1/Model/TopHits.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b6893aacbf9b24144b93b27ffd2cfa91 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/Discovery/V1/Model/TopHitsResults.cs.meta b/Scripts/Services/Discovery/V1/Model/TopHitsResults.cs.meta deleted file mode 100644 index 506ff4325..000000000 --- a/Scripts/Services/Discovery/V1/Model/TopHitsResults.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cf666932f338e964484a8bf613cf322d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier.meta b/Scripts/Services/NaturalLanguageClassifier.meta deleted file mode 100644 index 02410c165..000000000 --- a/Scripts/Services/NaturalLanguageClassifier.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 09111bbc26a2c864086243411613366d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1.meta b/Scripts/Services/NaturalLanguageClassifier/V1.meta deleted file mode 100644 index 43927f9c7..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 313cc3ca3252c784382e233d88514d66 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model.meta b/Scripts/Services/NaturalLanguageClassifier/V1/Model.meta deleted file mode 100644 index 3a1230f80..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 760595cbdf7bcb147af276e3d1a42ef4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classification.cs b/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classification.cs deleted file mode 100644 index 71db684e7..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classification.cs +++ /dev/null @@ -1,54 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.NaturalLanguageClassifier.V1.Model -{ - /// - /// Response from the classifier for a phrase. - /// - public class Classification - { - /// - /// Unique identifier for this classifier. - /// - [JsonProperty("classifier_id", NullValueHandling = NullValueHandling.Ignore)] - public string ClassifierId { get; set; } - /// - /// Link to the classifier. - /// - [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] - public string Url { get; set; } - /// - /// The submitted phrase. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The class with the highest confidence. - /// - [JsonProperty("top_class", NullValueHandling = NullValueHandling.Ignore)] - public string TopClass { get; set; } - /// - /// An array of up to ten class-confidence pairs sorted in descending order of confidence. - /// - [JsonProperty("classes", NullValueHandling = NullValueHandling.Ignore)] - public List Classes { get; set; } - } -} diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classification.cs.meta b/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classification.cs.meta deleted file mode 100644 index 74c87b406..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classification.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 72779b8862eca054ba87541499f9f981 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassificationCollection.cs b/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassificationCollection.cs deleted file mode 100644 index e9ce93b22..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassificationCollection.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.NaturalLanguageClassifier.V1.Model -{ - /// - /// Response from the classifier for multiple phrases. - /// - public class ClassificationCollection - { - /// - /// Unique identifier for this classifier. - /// - [JsonProperty("classifier_id", NullValueHandling = NullValueHandling.Ignore)] - public string ClassifierId { get; set; } - /// - /// Link to the classifier. - /// - [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] - public string Url { get; set; } - /// - /// An array of classifier responses for each submitted phrase. - /// - [JsonProperty("collection", NullValueHandling = NullValueHandling.Ignore)] - public List Collection { get; set; } - } -} diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassificationCollection.cs.meta b/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassificationCollection.cs.meta deleted file mode 100644 index 64e69a216..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassificationCollection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 486eeebdd42317b4a81f72dda40d4702 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifiedClass.cs b/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifiedClass.cs deleted file mode 100644 index b4162967b..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifiedClass.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.NaturalLanguageClassifier.V1.Model -{ - /// - /// Class and confidence. - /// - public class ClassifiedClass - { - /// - /// A decimal percentage that represents the confidence that Watson has in this class. Higher values represent - /// higher confidences. - /// - [JsonProperty("confidence", NullValueHandling = NullValueHandling.Ignore)] - public double? Confidence { get; set; } - /// - /// Class label. - /// - [JsonProperty("class_name", NullValueHandling = NullValueHandling.Ignore)] - public string ClassName { get; set; } - } -} diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifiedClass.cs.meta b/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifiedClass.cs.meta deleted file mode 100644 index 9758ec8ba..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifiedClass.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eb12aa18897785046aab147f959d9a08 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classifier.cs b/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classifier.cs deleted file mode 100644 index 955e44d01..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classifier.cs +++ /dev/null @@ -1,93 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.NaturalLanguageClassifier.V1.Model -{ - /// - /// A classifier for natural language phrases. - /// - public class Classifier - { - /// - /// The state of the classifier. - /// - public class StatusValue - { - /// - /// Constant NON_EXISTENT for Non Existent - /// - public const string NON_EXISTENT = "Non Existent"; - /// - /// Constant TRAINING for Training - /// - public const string TRAINING = "Training"; - /// - /// Constant FAILED for Failed - /// - public const string FAILED = "Failed"; - /// - /// Constant AVAILABLE for Available - /// - public const string AVAILABLE = "Available"; - /// - /// Constant UNAVAILABLE for Unavailable - /// - public const string UNAVAILABLE = "Unavailable"; - - } - - /// - /// The state of the classifier. - /// Constants for possible values can be found using Classifier.StatusValue - /// - [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] - public string Status { get; set; } - /// - /// User-supplied name for the classifier. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// Link to the classifier. - /// - [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] - public string Url { get; set; } - /// - /// Unique identifier for this classifier. - /// - [JsonProperty("classifier_id", NullValueHandling = NullValueHandling.Ignore)] - public string ClassifierId { get; set; } - /// - /// Date and time (UTC) the classifier was created. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public virtual DateTime? Created { get; private set; } - /// - /// Additional detail about the status. - /// - [JsonProperty("status_description", NullValueHandling = NullValueHandling.Ignore)] - public virtual string StatusDescription { get; private set; } - /// - /// The language used for the classifier. - /// - [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] - public string Language { get; set; } - } -} diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classifier.cs.meta b/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classifier.cs.meta deleted file mode 100644 index d51ba9ecf..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/Classifier.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ea1f35fcd07ed6a4cb45f367f32c7050 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifierList.cs b/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifierList.cs deleted file mode 100644 index 84af7dc3e..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifierList.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.NaturalLanguageClassifier.V1.Model -{ - /// - /// List of available classifiers. - /// - public class ClassifierList - { - /// - /// The classifiers available to the user. Returns an empty array if no classifiers are available. - /// - [JsonProperty("classifiers", NullValueHandling = NullValueHandling.Ignore)] - public List Classifiers { get; set; } - } -} diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifierList.cs.meta b/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifierList.cs.meta deleted file mode 100644 index 74fb8cca8..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifierList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 46f53e49e7ce071479f6816d9ee67f4d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifyInput.cs b/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifyInput.cs deleted file mode 100644 index dd620e6ec..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifyInput.cs +++ /dev/null @@ -1,33 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.NaturalLanguageClassifier.V1.Model -{ - /// - /// Request payload to classify. - /// - public class ClassifyInput - { - /// - /// The submitted phrase. The maximum length is 2048 characters. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - } -} diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifyInput.cs.meta b/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifyInput.cs.meta deleted file mode 100644 index 5456c1d99..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/ClassifyInput.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b95ad911cefc2b54dad1b9f1f95a0df7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/CollectionItem.cs b/Scripts/Services/NaturalLanguageClassifier/V1/Model/CollectionItem.cs deleted file mode 100644 index 01a5b4f8e..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/CollectionItem.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.NaturalLanguageClassifier.V1.Model -{ - /// - /// Response from the classifier for a phrase in a collection. - /// - public class CollectionItem - { - /// - /// The submitted phrase. The maximum length is 2048 characters. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// The class with the highest confidence. - /// - [JsonProperty("top_class", NullValueHandling = NullValueHandling.Ignore)] - public string TopClass { get; set; } - /// - /// An array of up to ten class-confidence pairs sorted in descending order of confidence. - /// - [JsonProperty("classes", NullValueHandling = NullValueHandling.Ignore)] - public List Classes { get; set; } - } -} diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/Model/CollectionItem.cs.meta b/Scripts/Services/NaturalLanguageClassifier/V1/Model/CollectionItem.cs.meta deleted file mode 100644 index 36b3cc5d7..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/Model/CollectionItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 52fef546a02f7fa4cb6f60aaf5f1281c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/NaturalLanguageClassifierService.cs b/Scripts/Services/NaturalLanguageClassifier/V1/NaturalLanguageClassifierService.cs deleted file mode 100644 index f5fc68217..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/NaturalLanguageClassifierService.cs +++ /dev/null @@ -1,536 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2021. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -/** -* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-a45d89ef-20201209-153452 -*/ - -using System.Collections.Generic; -using System.Text; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Connection; -using IBM.Cloud.SDK.Utilities; -using IBM.Watson.NaturalLanguageClassifier.V1.Model; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using UnityEngine.Networking; - -namespace IBM.Watson.NaturalLanguageClassifier.V1 -{ - public partial class NaturalLanguageClassifierService : BaseService - { - [System.Obsolete("On 9 August 2021, IBM announced the deprecation of the Natural Language Classifier service." + - "\nThe service will no longer be available from 8 August 2022. As of 9 September 2021, you will not be able to create new instances." + - "\nExisting instances will be supported until 8 August 2022. Any instance that still exists on that date will be deleted." + - "\nFor more information, see https://cloud.ibm.com/docs/natural-language-classifier?topic=natural-language-classifier-migrating")] - - private const string defaultServiceName = "natural_language_classifier"; - private const string defaultServiceUrl = "https://api.us-south.natural-language-classifier.watson.cloud.ibm.com"; - - #region DisableSslVerification - private bool disableSslVerification = false; - /// - /// Gets and sets the option to disable ssl verification - /// - public bool DisableSslVerification - { - get { return disableSslVerification; } - set { disableSslVerification = value; } - } - #endregion - - /// - /// NaturalLanguageClassifierService constructor. - /// - public NaturalLanguageClassifierService() : this(defaultServiceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(defaultServiceName)) {} - - /// - /// NaturalLanguageClassifierService constructor. - /// - /// The service authenticator. - public NaturalLanguageClassifierService(Authenticator authenticator) : this(defaultServiceName, authenticator) {} - - /// - /// NaturalLanguageClassifierService constructor. - /// - /// The service name to be used when configuring the client instance - public NaturalLanguageClassifierService(string serviceName) : this(serviceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(serviceName)) {} - - /// - /// NaturalLanguageClassifierService constructor. - /// - /// The service name to be used when configuring the client instance - /// The service authenticator. - public NaturalLanguageClassifierService(string serviceName, Authenticator authenticator) : base(authenticator, serviceName) - { - Authenticator = authenticator; - - if (string.IsNullOrEmpty(GetServiceUrl())) - { - SetServiceUrl(defaultServiceUrl); - } - } - - /// - /// Classify a phrase. - /// - /// Returns label information for the input. The status must be `Available` before you can use the classifier to - /// classify text. - /// - /// The callback function that is invoked when the operation completes. - /// Classifier ID to use. - /// The submitted phrase. The maximum length is 2048 characters. - /// Classification - public bool Classify(Callback callback, string classifierId, string text) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `Classify`"); - if (string.IsNullOrEmpty(classifierId)) - throw new ArgumentNullException("`classifierId` is required for `Classify`"); - if (string.IsNullOrEmpty(text)) - throw new ArgumentNullException("`text` is required for `Classify`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("natural_language_classifier", "V1", "Classify")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - - JObject bodyObject = new JObject(); - if (!string.IsNullOrEmpty(text)) - bodyObject["text"] = text; - req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject)); - - req.OnResponse = OnClassifyResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v1/classifiers/{0}/classify", classifierId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnClassifyResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("NaturalLanguageClassifierService.OnClassifyResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Classify multiple phrases. - /// - /// Returns label information for multiple phrases. The status must be `Available` before you can use the - /// classifier to classify text. - /// - /// Note that classifying Japanese texts is a beta feature. - /// - /// The callback function that is invoked when the operation completes. - /// Classifier ID to use. - /// The submitted phrases. - /// ClassificationCollection - public bool ClassifyCollection(Callback callback, string classifierId, List collection) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ClassifyCollection`"); - if (string.IsNullOrEmpty(classifierId)) - throw new ArgumentNullException("`classifierId` is required for `ClassifyCollection`"); - if (collection == null) - throw new ArgumentNullException("`collection` is required for `ClassifyCollection`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("natural_language_classifier", "V1", "ClassifyCollection")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - - JObject bodyObject = new JObject(); - if (collection != null && collection.Count > 0) - bodyObject["collection"] = JToken.FromObject(collection); - req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject)); - - req.OnResponse = OnClassifyCollectionResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v1/classifiers/{0}/classify_collection", classifierId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnClassifyCollectionResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("NaturalLanguageClassifierService.OnClassifyCollectionResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Create classifier. - /// - /// Sends data to create and train a classifier and returns information about the new classifier. - /// - /// The callback function that is invoked when the operation completes. - /// Metadata in JSON format. The metadata identifies the language of the data, - /// and an optional name to identify the classifier. Specify the language with the 2-letter primary language - /// code as assigned in ISO standard 639. - /// - /// Supported languages are English (`en`), Arabic (`ar`), French (`fr`), German, (`de`), Italian (`it`), - /// Japanese (`ja`), Korean (`ko`), Brazilian Portuguese (`pt`), and Spanish (`es`). - /// Training data in CSV format. Each text value must have at least one class. The - /// data can include up to 3,000 classes and 20,000 records. For details, see [Data - /// preparation](https://cloud.ibm.com/docs/natural-language-classifier?topic=natural-language-classifier-using-your-data). - /// Classifier - public bool CreateClassifier(Callback callback, System.IO.MemoryStream trainingMetadata, System.IO.MemoryStream trainingData) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `CreateClassifier`"); - if (trainingMetadata == null) - throw new ArgumentNullException("`trainingMetadata` is required for `CreateClassifier`"); - if (trainingData == null) - throw new ArgumentNullException("`trainingData` is required for `CreateClassifier`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("natural_language_classifier", "V1", "CreateClassifier")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (trainingMetadata != null) - { - req.Forms["training_metadata"] = new RESTConnector.Form(trainingMetadata, "filename", "application/json"); - } - if (trainingData != null) - { - req.Forms["training_data"] = new RESTConnector.Form(trainingData, "filename", "text/csv"); - } - - req.OnResponse = OnCreateClassifierResponse; - - Connector.URL = GetServiceUrl() + "/v1/classifiers"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnCreateClassifierResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("NaturalLanguageClassifierService.OnCreateClassifierResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// List classifiers. - /// - /// Returns an empty array if no classifiers are available. - /// - /// The callback function that is invoked when the operation completes. - /// ClassifierList - public bool ListClassifiers(Callback callback) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ListClassifiers`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("natural_language_classifier", "V1", "ListClassifiers")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - - req.OnResponse = OnListClassifiersResponse; - - Connector.URL = GetServiceUrl() + "/v1/classifiers"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnListClassifiersResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("NaturalLanguageClassifierService.OnListClassifiersResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get information about a classifier. - /// - /// Returns status and other information about a classifier. - /// - /// The callback function that is invoked when the operation completes. - /// Classifier ID to query. - /// Classifier - public bool GetClassifier(Callback callback, string classifierId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetClassifier`"); - if (string.IsNullOrEmpty(classifierId)) - throw new ArgumentNullException("`classifierId` is required for `GetClassifier`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("natural_language_classifier", "V1", "GetClassifier")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - - req.OnResponse = OnGetClassifierResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v1/classifiers/{0}", classifierId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetClassifierResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("NaturalLanguageClassifierService.OnGetClassifierResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Delete classifier. - /// - /// The callback function that is invoked when the operation completes. - /// Classifier ID to delete. - /// object - public bool DeleteClassifier(Callback callback, string classifierId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `DeleteClassifier`"); - if (string.IsNullOrEmpty(classifierId)) - throw new ArgumentNullException("`classifierId` is required for `DeleteClassifier`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbDELETE, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("natural_language_classifier", "V1", "DeleteClassifier")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - - req.OnResponse = OnDeleteClassifierResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v1/classifiers/{0}", classifierId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnDeleteClassifierResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("NaturalLanguageClassifierService.OnDeleteClassifierResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - } -} \ No newline at end of file diff --git a/Scripts/Services/NaturalLanguageClassifier/V1/NaturalLanguageClassifierService.cs.meta b/Scripts/Services/NaturalLanguageClassifier/V1/NaturalLanguageClassifierService.cs.meta deleted file mode 100644 index 61eca06ea..000000000 --- a/Scripts/Services/NaturalLanguageClassifier/V1/NaturalLanguageClassifierService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 043549a455c3a194e9e64eb940d2523c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/ClassificationsOptions.cs b/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/ClassificationsOptions.cs index 5cd63a480..c2fb92484 100644 --- a/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/ClassificationsOptions.cs +++ b/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/ClassificationsOptions.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2021. +* (C) Copyright IBM Corp. 2021, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,15 +21,17 @@ namespace IBM.Watson.NaturalLanguageUnderstanding.V1.Model { /// /// Returns text classifications for the content. - /// - /// Supported languages: English only. /// public class ClassificationsOptions { /// /// Enter a [custom /// model](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) - /// ID of the classification model to be used. + /// ID of the classifications model to be used. + /// + /// You can analyze tone by using a language-specific model ID. See [Tone analytics + /// (Classifications)](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-tone_analytics) + /// for more information. /// [JsonProperty("model", NullValueHandling = NullValueHandling.Ignore)] public string Model { get; set; } diff --git a/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/Features.cs b/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/Features.cs index c85137572..f44401c11 100644 --- a/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/Features.cs +++ b/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/Features.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ * */ +using System.Collections.Generic; using Newtonsoft.Json; namespace IBM.Watson.NaturalLanguageUnderstanding.V1.Model @@ -26,8 +27,6 @@ public class Features { /// /// Returns text classifications for the content. - /// - /// Supported languages: English only. /// [JsonProperty("classifications", NullValueHandling = NullValueHandling.Ignore)] public ClassificationsOptions Classifications { get; set; } @@ -71,7 +70,7 @@ public class Features /// and publication date. Supports URL and HTML input types only. /// [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] - public object Metadata { get; set; } + public Dictionary Metadata { get; set; } /// /// Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo` /// relation might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation diff --git a/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/MetadataOptions.cs b/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/MetadataOptions.cs deleted file mode 100644 index f90025cf7..000000000 --- a/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/MetadataOptions.cs +++ /dev/null @@ -1,27 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2021. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -namespace IBM.Watson.NaturalLanguageUnderstanding.V1.Model -{ - /// - /// Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and - /// publication date. Supports URL and HTML input types only. - /// - public class MetadataOptions - { - } -} diff --git a/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/MetadataOptions.cs.meta b/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/MetadataOptions.cs.meta deleted file mode 100644 index d72ce46f3..000000000 --- a/Scripts/Services/NaturalLanguageUnderstanding/V1/Model/MetadataOptions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5e8bcd7fe1ddd40b0acdd3664eb74103 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights.meta b/Scripts/Services/PersonalityInsights.meta deleted file mode 100644 index 47c6d3d45..000000000 --- a/Scripts/Services/PersonalityInsights.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9e94fe0713ef0004ba623170245148c4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3.meta b/Scripts/Services/PersonalityInsights/V3.meta deleted file mode 100644 index 4104dba5c..000000000 --- a/Scripts/Services/PersonalityInsights/V3.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 705dcd66cfbdc894e81ddfcfdb25177b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model.meta b/Scripts/Services/PersonalityInsights/V3/Model.meta deleted file mode 100644 index 0a1d48aae..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f9b9f9a3714ab4e41b4a58dcc7f96877 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Behavior.cs b/Scripts/Services/PersonalityInsights/V3/Model/Behavior.cs deleted file mode 100644 index a9d829923..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Behavior.cs +++ /dev/null @@ -1,50 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.PersonalityInsights.V3.Model -{ - /// - /// The temporal behavior for the input content. - /// - public class Behavior - { - /// - /// The unique, non-localized identifier of the characteristic to which the results pertain. IDs have the form - /// `behavior_{value}`. - /// - [JsonProperty("trait_id", NullValueHandling = NullValueHandling.Ignore)] - public string TraitId { get; set; } - /// - /// The user-visible, localized name of the characteristic. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// The category of the characteristic: `behavior` for temporal data. - /// - [JsonProperty("category", NullValueHandling = NullValueHandling.Ignore)] - public string Category { get; set; } - /// - /// For JSON content that is timestamped, the percentage of timestamped input data that occurred during that day - /// of the week or hour of the day. The range is 0 to 1. - /// - [JsonProperty("percentage", NullValueHandling = NullValueHandling.Ignore)] - public double? Percentage { get; set; } - } -} diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Behavior.cs.meta b/Scripts/Services/PersonalityInsights/V3/Model/Behavior.cs.meta deleted file mode 100644 index 29c4e4a6a..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Behavior.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9aed2bd9cf7ca9c47846fbfe1b07cf30 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferences.cs b/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferences.cs deleted file mode 100644 index 57464c2c2..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferences.cs +++ /dev/null @@ -1,50 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.PersonalityInsights.V3.Model -{ - /// - /// A consumption preference that the service inferred from the input content. - /// - public class ConsumptionPreferences - { - /// - /// The unique, non-localized identifier of the consumption preference to which the results pertain. IDs have - /// the form `consumption_preferences_{preference}`. - /// - [JsonProperty("consumption_preference_id", NullValueHandling = NullValueHandling.Ignore)] - public string ConsumptionPreferenceId { get; set; } - /// - /// The user-visible, localized name of the consumption preference. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// The score for the consumption preference: - /// * `0.0`: Unlikely - /// * `0.5`: Neutral - /// * `1.0`: Likely - /// - /// The scores for some preferences are binary and do not allow a neutral value. The score is an indication of - /// preference based on the results inferred from the input text, not a normalized percentile. - /// - [JsonProperty("score", NullValueHandling = NullValueHandling.Ignore)] - public double? Score { get; set; } - } -} diff --git a/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferences.cs.meta b/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferences.cs.meta deleted file mode 100644 index 04a432b50..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferences.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cd8e9028f8110f54c86f1e401821badf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferencesCategory.cs b/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferencesCategory.cs deleted file mode 100644 index 89aeed4b0..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferencesCategory.cs +++ /dev/null @@ -1,45 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.PersonalityInsights.V3.Model -{ - /// - /// The consumption preferences that the service inferred from the input content. - /// - public class ConsumptionPreferencesCategory - { - /// - /// The unique, non-localized identifier of the consumption preferences category to which the results pertain. - /// IDs have the form `consumption_preferences_{category}`. - /// - [JsonProperty("consumption_preference_category_id", NullValueHandling = NullValueHandling.Ignore)] - public string ConsumptionPreferenceCategoryId { get; set; } - /// - /// The user-visible name of the consumption preferences category. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// Detailed results inferred from the input text for the individual preferences of the category. - /// - [JsonProperty("consumption_preferences", NullValueHandling = NullValueHandling.Ignore)] - public List ConsumptionPreferences { get; set; } - } -} diff --git a/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferencesCategory.cs.meta b/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferencesCategory.cs.meta deleted file mode 100644 index 336723fd7..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/ConsumptionPreferencesCategory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6202eca209ca04e4dbc4dd06a90b3354 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Content.cs b/Scripts/Services/PersonalityInsights/V3/Model/Content.cs deleted file mode 100644 index c9bce098c..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Content.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.PersonalityInsights.V3.Model -{ - /// - /// The full input content that the service is to analyze. - /// - public class Content - { - /// - /// An array of `ContentItem` objects that provides the text that is to be analyzed. - /// - [JsonProperty("contentItems", NullValueHandling = NullValueHandling.Ignore)] - public List ContentItems { get; set; } - } -} diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Content.cs.meta b/Scripts/Services/PersonalityInsights/V3/Model/Content.cs.meta deleted file mode 100644 index d8160291d..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Content.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 319f4432956755c4782d682a3c27be9d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model/ContentItem.cs b/Scripts/Services/PersonalityInsights/V3/Model/ContentItem.cs deleted file mode 100644 index 2b502ef11..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/ContentItem.cs +++ /dev/null @@ -1,137 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.PersonalityInsights.V3.Model -{ - /// - /// An input content item that the service is to analyze. - /// - public class ContentItem - { - /// - /// The MIME type of the content. The default is plain text. The tags are stripped from HTML content before it - /// is analyzed; plain text is processed as submitted. - /// - public class ContenttypeValue - { - /// - /// Constant TEXT_PLAIN for text/plain - /// - public const string TEXT_PLAIN = "text/plain"; - /// - /// Constant TEXT_HTML for text/html - /// - public const string TEXT_HTML = "text/html"; - - } - - /// - /// The language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default - /// is `en` (English). Regional variants are treated as their parent language; for example, `en-US` is - /// interpreted as `en`. A language specified with the **Content-Type** parameter overrides the value of this - /// parameter; any content items that specify a different language are ignored. Omit the **Content-Type** - /// parameter to base the language on the most prevalent specification among the content items; again, content - /// items that specify a different language are ignored. You can specify any combination of languages for the - /// input and response content. - /// - public class LanguageValue - { - /// - /// Constant AR for ar - /// - public const string AR = "ar"; - /// - /// Constant EN for en - /// - public const string EN = "en"; - /// - /// Constant ES for es - /// - public const string ES = "es"; - /// - /// Constant JA for ja - /// - public const string JA = "ja"; - /// - /// Constant KO for ko - /// - public const string KO = "ko"; - - } - - /// - /// The MIME type of the content. The default is plain text. The tags are stripped from HTML content before it - /// is analyzed; plain text is processed as submitted. - /// Constants for possible values can be found using ContentItem.ContenttypeValue - /// - [JsonProperty("contenttype", NullValueHandling = NullValueHandling.Ignore)] - public string Contenttype { get; set; } - /// - /// The language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default - /// is `en` (English). Regional variants are treated as their parent language; for example, `en-US` is - /// interpreted as `en`. A language specified with the **Content-Type** parameter overrides the value of this - /// parameter; any content items that specify a different language are ignored. Omit the **Content-Type** - /// parameter to base the language on the most prevalent specification among the content items; again, content - /// items that specify a different language are ignored. You can specify any combination of languages for the - /// input and response content. - /// Constants for possible values can be found using ContentItem.LanguageValue - /// - [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] - public string Language { get; set; } - /// - /// The content that is to be analyzed. The service supports up to 20 MB of content for all `ContentItem` - /// objects combined. - /// - [JsonProperty("content", NullValueHandling = NullValueHandling.Ignore)] - public string Content { get; set; } - /// - /// A unique identifier for this content item. - /// - [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] - public string Id { get; set; } - /// - /// A timestamp that identifies when this content was created. Specify a value in milliseconds since the UNIX - /// Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public long? Created { get; set; } - /// - /// A timestamp that identifies when this content was last updated. Specify a value in milliseconds since the - /// UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data. - /// - [JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)] - public long? Updated { get; set; } - /// - /// The unique ID of the parent content item for this item. Used to identify hierarchical relationships between - /// posts/replies, messages/replies, and so on. - /// - [JsonProperty("parentid", NullValueHandling = NullValueHandling.Ignore)] - public string Parentid { get; set; } - /// - /// Indicates whether this content item is a reply to another content item. - /// - [JsonProperty("reply", NullValueHandling = NullValueHandling.Ignore)] - public bool? Reply { get; set; } - /// - /// Indicates whether this content item is a forwarded/copied version of another content item. - /// - [JsonProperty("forward", NullValueHandling = NullValueHandling.Ignore)] - public bool? Forward { get; set; } - } -} diff --git a/Scripts/Services/PersonalityInsights/V3/Model/ContentItem.cs.meta b/Scripts/Services/PersonalityInsights/V3/Model/ContentItem.cs.meta deleted file mode 100644 index 3350dff2b..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/ContentItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d9ef7094bb6924643b5dd05459eb394d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Profile.cs b/Scripts/Services/PersonalityInsights/V3/Model/Profile.cs deleted file mode 100644 index 558171b38..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Profile.cs +++ /dev/null @@ -1,110 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.PersonalityInsights.V3.Model -{ - /// - /// The personality profile that the service generated for the input content. - /// - public class Profile - { - /// - /// The language model that was used to process the input. - /// - public class ProcessedLanguageValue - { - /// - /// Constant AR for ar - /// - public const string AR = "ar"; - /// - /// Constant EN for en - /// - public const string EN = "en"; - /// - /// Constant ES for es - /// - public const string ES = "es"; - /// - /// Constant JA for ja - /// - public const string JA = "ja"; - /// - /// Constant KO for ko - /// - public const string KO = "ko"; - - } - - /// - /// The language model that was used to process the input. - /// Constants for possible values can be found using Profile.ProcessedLanguageValue - /// - [JsonProperty("processed_language", NullValueHandling = NullValueHandling.Ignore)] - public string ProcessedLanguage { get; set; } - /// - /// The number of words from the input that were used to produce the profile. - /// - [JsonProperty("word_count", NullValueHandling = NullValueHandling.Ignore)] - public long? WordCount { get; set; } - /// - /// When guidance is appropriate, a string that provides a message that indicates the number of words found and - /// where that value falls in the range of required or suggested number of words. - /// - [JsonProperty("word_count_message", NullValueHandling = NullValueHandling.Ignore)] - public string WordCountMessage { get; set; } - /// - /// A recursive array of `Trait` objects that provides detailed results for the Big Five personality - /// characteristics (dimensions and facets) inferred from the input text. - /// - [JsonProperty("personality", NullValueHandling = NullValueHandling.Ignore)] - public List Personality { get; set; } - /// - /// Detailed results for the Needs characteristics inferred from the input text. - /// - [JsonProperty("needs", NullValueHandling = NullValueHandling.Ignore)] - public List Needs { get; set; } - /// - /// Detailed results for the Values characteristics inferred from the input text. - /// - [JsonProperty("values", NullValueHandling = NullValueHandling.Ignore)] - public List Values { get; set; } - /// - /// For JSON content that is timestamped, detailed results about the social behavior disclosed by the input in - /// terms of temporal characteristics. The results include information about the distribution of the content - /// over the days of the week and the hours of the day. - /// - [JsonProperty("behavior", NullValueHandling = NullValueHandling.Ignore)] - public List Behavior { get; set; } - /// - /// If the **consumption_preferences** parameter is `true`, detailed results for each category of consumption - /// preferences. Each element of the array provides information inferred from the input text for the individual - /// preferences of that category. - /// - [JsonProperty("consumption_preferences", NullValueHandling = NullValueHandling.Ignore)] - public List ConsumptionPreferences { get; set; } - /// - /// An array of warning messages that are associated with the input text for the request. The array is empty if - /// the input generated no warnings. - /// - [JsonProperty("warnings", NullValueHandling = NullValueHandling.Ignore)] - public List Warnings { get; set; } - } -} diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Profile.cs.meta b/Scripts/Services/PersonalityInsights/V3/Model/Profile.cs.meta deleted file mode 100644 index 64cdc0932..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Profile.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: caf27a94a5d0d4244a4663774b0fdc72 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Trait.cs b/Scripts/Services/PersonalityInsights/V3/Model/Trait.cs deleted file mode 100644 index 6b286ac36..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Trait.cs +++ /dev/null @@ -1,104 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.PersonalityInsights.V3.Model -{ - /// - /// The characteristics that the service inferred from the input content. - /// - public class Trait - { - /// - /// The category of the characteristic: `personality` for Big Five personality characteristics, `needs` for - /// Needs, and `values` for Values. - /// - public class CategoryValue - { - /// - /// Constant PERSONALITY for personality - /// - public const string PERSONALITY = "personality"; - /// - /// Constant NEEDS for needs - /// - public const string NEEDS = "needs"; - /// - /// Constant VALUES for values - /// - public const string VALUES = "values"; - - } - - /// - /// The category of the characteristic: `personality` for Big Five personality characteristics, `needs` for - /// Needs, and `values` for Values. - /// Constants for possible values can be found using Trait.CategoryValue - /// - [JsonProperty("category", NullValueHandling = NullValueHandling.Ignore)] - public string Category { get; set; } - /// - /// The unique, non-localized identifier of the characteristic to which the results pertain. IDs have the form - /// * `big5_{characteristic}` for Big Five personality dimensions - /// * `facet_{characteristic}` for Big Five personality facets - /// * `need_{characteristic}` for Needs - /// *`value_{characteristic}` for Values. - /// - [JsonProperty("trait_id", NullValueHandling = NullValueHandling.Ignore)] - public string TraitId { get; set; } - /// - /// The user-visible, localized name of the characteristic. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// The normalized percentile score for the characteristic. The range is 0 to 1. For example, if the percentage - /// for Openness is 0.60, the author scored in the 60th percentile; the author is more open than 59 percent of - /// the population and less open than 39 percent of the population. - /// - [JsonProperty("percentile", NullValueHandling = NullValueHandling.Ignore)] - public double? Percentile { get; set; } - /// - /// The raw score for the characteristic. The range is 0 to 1. A higher score generally indicates a greater - /// likelihood that the author has that characteristic, but raw scores must be considered in aggregate: The - /// range of values in practice might be much smaller than 0 to 1, so an individual score must be considered in - /// the context of the overall scores and their range. - /// - /// The raw score is computed based on the input and the service model; it is not normalized or compared with a - /// sample population. The raw score enables comparison of the results against a different sampling population - /// and with a custom normalization approach. - /// - [JsonProperty("raw_score", NullValueHandling = NullValueHandling.Ignore)] - public double? RawScore { get; set; } - /// - /// **`2017-10-13`**: Indicates whether the characteristic is meaningful for the input language. The field is - /// always `true` for all characteristics of English, Spanish, and Japanese input. The field is `false` for the - /// subset of characteristics of Arabic and Korean input for which the service's models are unable to generate - /// meaningful results. **`2016-10-19`**: Not returned. - /// - [JsonProperty("significant", NullValueHandling = NullValueHandling.Ignore)] - public bool? Significant { get; set; } - /// - /// For `personality` (Big Five) dimensions, more detailed results for the facets of each dimension as inferred - /// from the input text. - /// - [JsonProperty("children", NullValueHandling = NullValueHandling.Ignore)] - public List Children { get; set; } - } -} diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Trait.cs.meta b/Scripts/Services/PersonalityInsights/V3/Model/Trait.cs.meta deleted file mode 100644 index bea0a5b7b..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Trait.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ea6339a256ce8854c915c4cce9b4d9bc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Warning.cs b/Scripts/Services/PersonalityInsights/V3/Model/Warning.cs deleted file mode 100644 index bb704b620..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Warning.cs +++ /dev/null @@ -1,74 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.PersonalityInsights.V3.Model -{ - /// - /// A warning message that is associated with the input content. - /// - public class Warning - { - /// - /// The identifier of the warning message. - /// - public class WarningIdValue - { - /// - /// Constant WORD_COUNT_MESSAGE for WORD_COUNT_MESSAGE - /// - public const string WORD_COUNT_MESSAGE = "WORD_COUNT_MESSAGE"; - /// - /// Constant JSON_AS_TEXT for JSON_AS_TEXT - /// - public const string JSON_AS_TEXT = "JSON_AS_TEXT"; - /// - /// Constant CONTENT_TRUNCATED for CONTENT_TRUNCATED - /// - public const string CONTENT_TRUNCATED = "CONTENT_TRUNCATED"; - /// - /// Constant PARTIAL_TEXT_USED for PARTIAL_TEXT_USED - /// - public const string PARTIAL_TEXT_USED = "PARTIAL_TEXT_USED"; - - } - - /// - /// The identifier of the warning message. - /// Constants for possible values can be found using Warning.WarningIdValue - /// - [JsonProperty("warning_id", NullValueHandling = NullValueHandling.Ignore)] - public string WarningId { get; set; } - /// - /// The message associated with the `warning_id`: - /// * `WORD_COUNT_MESSAGE`: "There were {number} words in the input. We need a minimum of 600, preferably 1,200 - /// or more, to compute statistically significant estimates." - /// * `JSON_AS_TEXT`: "Request input was processed as text/plain as indicated, however detected a JSON input. - /// Did you mean application/json?" - /// * `CONTENT_TRUNCATED`: "For maximum accuracy while also optimizing processing time, only the first 250KB of - /// input text (excluding markup) was analyzed. Accuracy levels off at approximately 3,000 words so this did not - /// affect the accuracy of the profile." - /// * `PARTIAL_TEXT_USED`, "The text provided to compute the profile was trimmed for performance reasons. This - /// action does not affect the accuracy of the output, as not all of the input text was required." Applies only - /// when Arabic input text exceeds a threshold at which additional words do not contribute to the accuracy of - /// the profile. - /// - [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] - public string Message { get; set; } - } -} diff --git a/Scripts/Services/PersonalityInsights/V3/Model/Warning.cs.meta b/Scripts/Services/PersonalityInsights/V3/Model/Warning.cs.meta deleted file mode 100644 index 7e8c126d2..000000000 --- a/Scripts/Services/PersonalityInsights/V3/Model/Warning.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 081a2d8c4107db94c844e4e69774d3db -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/PersonalityInsights/V3/PersonalityInsightsService.cs b/Scripts/Services/PersonalityInsights/V3/PersonalityInsightsService.cs deleted file mode 100644 index 56a38b7ee..000000000 --- a/Scripts/Services/PersonalityInsights/V3/PersonalityInsightsService.cs +++ /dev/null @@ -1,439 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -/** -* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-a45d89ef-20201209-153452 -*/ - -using System.Collections.Generic; -using System.Text; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Connection; -using IBM.Cloud.SDK.Utilities; -using IBM.Watson.PersonalityInsights.V3.Model; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using UnityEngine.Networking; - -namespace IBM.Watson.PersonalityInsights.V3 -{ - [System.Obsolete("On 1 December 2021, Personality Insights will no longer be available." + - " Consider migrating to Watson Natural Language Understanding." + - "\nFor more information, see Personality Insights Deprecation " + - "(https://github.com/watson-developer-cloud/unity-sdk/tree/master#personality-insights-deprecation).")] - - public partial class PersonalityInsightsService : BaseService - { - private const string defaultServiceName = "personality_insights"; - private const string defaultServiceUrl = "https://api.us-south.personality-insights.watson.cloud.ibm.com"; - - #region Version - private string version; - /// - /// Gets and sets the version of the service. - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current - /// version is `2017-10-13`. - /// - public string Version - { - get { return version; } - set { version = value; } - } - #endregion - - #region DisableSslVerification - private bool disableSslVerification = false; - /// - /// Gets and sets the option to disable ssl verification - /// - public bool DisableSslVerification - { - get { return disableSslVerification; } - set { disableSslVerification = value; } - } - #endregion - - /// - /// PersonalityInsightsService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2017-10-13`. - public PersonalityInsightsService(string version) : this(version, defaultServiceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(defaultServiceName)) {} - - /// - /// PersonalityInsightsService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2017-10-13`. - /// The service authenticator. - public PersonalityInsightsService(string version, Authenticator authenticator) : this(version, defaultServiceName, authenticator) {} - - /// - /// PersonalityInsightsService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2017-10-13`. - /// The service name to be used when configuring the client instance - public PersonalityInsightsService(string version, string serviceName) : this(version, serviceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(serviceName)) {} - - /// - /// PersonalityInsightsService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2017-10-13`. - /// The service name to be used when configuring the client instance - /// The service authenticator. - public PersonalityInsightsService(string version, string serviceName, Authenticator authenticator) : base(authenticator, serviceName) - { - Authenticator = authenticator; - - if (string.IsNullOrEmpty(version)) - { - throw new ArgumentNullException("`version` is required"); - } - else - { - Version = version; - } - - if (string.IsNullOrEmpty(GetServiceUrl())) - { - SetServiceUrl(defaultServiceUrl); - } - } - - /// - /// Get profile. - /// - /// Generates a personality profile for the author of the input text. The service accepts a maximum of 20 MB of - /// input content, but it requires much less text to produce an accurate profile. The service can analyze text - /// in Arabic, English, Japanese, Korean, or Spanish. It can return its results in a variety of languages. - /// - /// **See also:** - /// * [Requesting a - /// profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#input) - /// * [Providing sufficient - /// input](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#sufficient) - /// - /// ### Content types - /// - /// You can provide input content as plain text (`text/plain`), HTML (`text/html`), or JSON - /// (`application/json`) by specifying the **Content-Type** parameter. The default is `text/plain`. - /// * Per the JSON specification, the default character encoding for JSON content is effectively always UTF-8. - /// * Per the HTTP specification, the default encoding for plain text and HTML is ISO-8859-1 (effectively, the - /// ASCII character set). - /// - /// When specifying a content type of plain text or HTML, include the `charset` parameter to indicate the - /// character encoding of the input text; for example, `Content-Type: text/plain;charset=utf-8`. - /// - /// **See also:** [Specifying request and response - /// formats](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#formats) - /// - /// ### Accept types - /// - /// You must request a response as JSON (`application/json`) or comma-separated values (`text/csv`) by - /// specifying the **Accept** parameter. CSV output includes a fixed number of columns. Set the **csv_headers** - /// parameter to `true` to request optional column headers for CSV output. - /// - /// **See also:** - /// * [Understanding a JSON - /// profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-output#output) - /// * [Understanding a CSV - /// profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-outputCSV#outputCSV). - /// - /// The callback function that is invoked when the operation completes. - /// A maximum of 20 MB of content to analyze, though the service requires much less text; - /// for more information, see [Providing sufficient - /// input](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#sufficient). For - /// JSON input, provide an object of type `Content`. - /// The type of the input. For more information, see **Content types** in the method - /// description. (optional, default to text/plain) - /// The language of the input text for the request: Arabic, English, Japanese, - /// Korean, or Spanish. Regional variants are treated as their parent language; for example, `en-US` is - /// interpreted as `en`. - /// - /// The effect of the **Content-Language** parameter depends on the **Content-Type** parameter. When - /// **Content-Type** is `text/plain` or `text/html`, **Content-Language** is the only way to specify the - /// language. When **Content-Type** is `application/json`, **Content-Language** overrides a language specified - /// with the `language` parameter of a `ContentItem` object, and content items that specify a different language - /// are ignored; omit this parameter to base the language on the specification of the content items. You can - /// specify any combination of languages for **Content-Language** and **Accept-Language**. (optional, default to - /// en) - /// The desired language of the response. For two-character arguments, regional - /// variants are treated as their parent language; for example, `en-US` is interpreted as `en`. You can specify - /// any combination of languages for the input and response content. (optional, default to en) - /// Indicates whether a raw score in addition to a normalized percentile is returned for - /// each characteristic; raw scores are not compared with a sample population. By default, only normalized - /// percentiles are returned. (optional, default to false) - /// Indicates whether column labels are returned with a CSV response. By default, no - /// column labels are returned. Applies only when the response type is CSV (`text/csv`). (optional, default to - /// false) - /// Indicates whether consumption preferences are returned with the - /// results. By default, no consumption preferences are returned. (optional, default to false) - /// Profile - public bool Profile(Callback callback, System.IO.MemoryStream content, string contentType = null, string contentLanguage = null, string acceptLanguage = null, bool? rawScores = null, bool? csvHeaders = null, bool? consumptionPreferences = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `Profile`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (content == null) - throw new ArgumentNullException("`content` is required for `Profile`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("personality_insights", "V3", "Profile")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (rawScores != null) - { - req.Parameters["raw_scores"] = (bool)rawScores ? "true" : "false"; - } - if (csvHeaders != null) - { - req.Parameters["csv_headers"] = (bool)csvHeaders ? "true" : "false"; - } - if (consumptionPreferences != null) - { - req.Parameters["consumption_preferences"] = (bool)consumptionPreferences ? "true" : "false"; - } - req.Headers["Accept"] = "application/json"; - - if (!string.IsNullOrEmpty(contentType)) - { - req.Headers["Content-Type"] = contentType; - } - - if (!string.IsNullOrEmpty(contentLanguage)) - { - req.Headers["Content-Language"] = contentLanguage; - } - - if (!string.IsNullOrEmpty(acceptLanguage)) - { - req.Headers["Accept-Language"] = acceptLanguage; - } - req.Send = content.ToArray(); - - req.OnResponse = OnProfileResponse; - - Connector.URL = GetServiceUrl() + "/v3/profile"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnProfileResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("PersonalityInsightsService.OnProfileResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get profile as csv. - /// - /// Generates a personality profile for the author of the input text. The service accepts a maximum of 20 MB of - /// input content, but it requires much less text to produce an accurate profile. The service can analyze text - /// in Arabic, English, Japanese, Korean, or Spanish. It can return its results in a variety of languages. - /// - /// **See also:** - /// * [Requesting a - /// profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#input) - /// * [Providing sufficient - /// input](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#sufficient) - /// - /// ### Content types - /// - /// You can provide input content as plain text (`text/plain`), HTML (`text/html`), or JSON - /// (`application/json`) by specifying the **Content-Type** parameter. The default is `text/plain`. - /// * Per the JSON specification, the default character encoding for JSON content is effectively always UTF-8. - /// * Per the HTTP specification, the default encoding for plain text and HTML is ISO-8859-1 (effectively, the - /// ASCII character set). - /// - /// When specifying a content type of plain text or HTML, include the `charset` parameter to indicate the - /// character encoding of the input text; for example, `Content-Type: text/plain;charset=utf-8`. - /// - /// **See also:** [Specifying request and response - /// formats](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#formats) - /// - /// ### Accept types - /// - /// You must request a response as JSON (`application/json`) or comma-separated values (`text/csv`) by - /// specifying the **Accept** parameter. CSV output includes a fixed number of columns. Set the **csv_headers** - /// parameter to `true` to request optional column headers for CSV output. - /// - /// **See also:** - /// * [Understanding a JSON - /// profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-output#output) - /// * [Understanding a CSV - /// profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-outputCSV#outputCSV). - /// - /// The callback function that is invoked when the operation completes. - /// A maximum of 20 MB of content to analyze, though the service requires much less text; - /// for more information, see [Providing sufficient - /// input](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#sufficient). For - /// JSON input, provide an object of type `Content`. - /// The type of the input. For more information, see **Content types** in the method - /// description. (optional, default to text/plain) - /// The language of the input text for the request: Arabic, English, Japanese, - /// Korean, or Spanish. Regional variants are treated as their parent language; for example, `en-US` is - /// interpreted as `en`. - /// - /// The effect of the **Content-Language** parameter depends on the **Content-Type** parameter. When - /// **Content-Type** is `text/plain` or `text/html`, **Content-Language** is the only way to specify the - /// language. When **Content-Type** is `application/json`, **Content-Language** overrides a language specified - /// with the `language` parameter of a `ContentItem` object, and content items that specify a different language - /// are ignored; omit this parameter to base the language on the specification of the content items. You can - /// specify any combination of languages for **Content-Language** and **Accept-Language**. (optional, default to - /// en) - /// The desired language of the response. For two-character arguments, regional - /// variants are treated as their parent language; for example, `en-US` is interpreted as `en`. You can specify - /// any combination of languages for the input and response content. (optional, default to en) - /// Indicates whether a raw score in addition to a normalized percentile is returned for - /// each characteristic; raw scores are not compared with a sample population. By default, only normalized - /// percentiles are returned. (optional, default to false) - /// Indicates whether column labels are returned with a CSV response. By default, no - /// column labels are returned. Applies only when the response type is CSV (`text/csv`). (optional, default to - /// false) - /// Indicates whether consumption preferences are returned with the - /// results. By default, no consumption preferences are returned. (optional, default to false) - /// System.IO.MemoryStream - public bool ProfileAsCsv(Callback callback, System.IO.MemoryStream content, string contentType = null, string contentLanguage = null, string acceptLanguage = null, bool? rawScores = null, bool? csvHeaders = null, bool? consumptionPreferences = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ProfileAsCsv`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (content == null) - throw new ArgumentNullException("`content` is required for `ProfileAsCsv`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("personality_insights", "V3", "ProfileAsCsv")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (rawScores != null) - { - req.Parameters["raw_scores"] = (bool)rawScores ? "true" : "false"; - } - if (csvHeaders != null) - { - req.Parameters["csv_headers"] = (bool)csvHeaders ? "true" : "false"; - } - if (consumptionPreferences != null) - { - req.Parameters["consumption_preferences"] = (bool)consumptionPreferences ? "true" : "false"; - } - req.Headers["Accept"] = "text/csv"; - - if (!string.IsNullOrEmpty(contentType)) - { - req.Headers["Content-Type"] = contentType; - } - - if (!string.IsNullOrEmpty(contentLanguage)) - { - req.Headers["Content-Language"] = contentLanguage; - } - - if (!string.IsNullOrEmpty(acceptLanguage)) - { - req.Headers["Accept-Language"] = acceptLanguage; - } - req.Send = content.ToArray(); - - req.OnResponse = OnProfileAsCsvResponse; - - Connector.URL = GetServiceUrl() + "/v3/profile"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnProfileAsCsvResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - response.Result = new System.IO.MemoryStream(resp.Data); - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - } -} \ No newline at end of file diff --git a/Scripts/Services/PersonalityInsights/V3/PersonalityInsightsService.cs.meta b/Scripts/Services/PersonalityInsights/V3/PersonalityInsightsService.cs.meta deleted file mode 100644 index e6864d58c..000000000 --- a/Scripts/Services/PersonalityInsights/V3/PersonalityInsightsService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9e59d47278e448b448d76fc0494f0edc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/SpeechToText/V1/Model/AcousticModel.cs b/Scripts/Services/SpeechToText/V1/Model/AcousticModel.cs index 436b10152..6373b61d3 100644 --- a/Scripts/Services/SpeechToText/V1/Model/AcousticModel.cs +++ b/Scripts/Services/SpeechToText/V1/Model/AcousticModel.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -107,7 +107,7 @@ public class StatusValue /// /// A list of the available versions of the custom acoustic model. Each element of the array indicates a version /// of the base model with which the custom model can be used. Multiple versions exist only if the custom model - /// has been upgraded; otherwise, only a single version is shown. + /// has been upgraded to a new version of its base model. Otherwise, only a single version is shown. /// [JsonProperty("versions", NullValueHandling = NullValueHandling.Ignore)] public List Versions { get; set; } diff --git a/Scripts/Services/SpeechToText/V1/Model/Grammar.cs b/Scripts/Services/SpeechToText/V1/Model/Grammar.cs index afce91095..816a6ea88 100644 --- a/Scripts/Services/SpeechToText/V1/Model/Grammar.cs +++ b/Scripts/Services/SpeechToText/V1/Model/Grammar.cs @@ -1,5 +1,5 @@ /** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,11 @@ public class StatusValue [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] public string Name { get; set; } /// - /// The number of OOV words in the grammar. The value is `0` while the grammar is being processed. + /// _For custom models that are based on previous-generation models_, the number of OOV words extracted from the + /// grammar. The value is `0` while the grammar is being processed. + /// + /// _For custom models that are based on next-generation models_, no OOV words are extracted from grammars, so + /// the value is always `0`. /// [JsonProperty("out_of_vocabulary_words", NullValueHandling = NullValueHandling.Ignore)] public long? OutOfVocabularyWords { get; set; } diff --git a/Scripts/Services/SpeechToText/V1/Model/LanguageModel.cs b/Scripts/Services/SpeechToText/V1/Model/LanguageModel.cs index 4e511647e..489229d79 100644 --- a/Scripts/Services/SpeechToText/V1/Model/LanguageModel.cs +++ b/Scripts/Services/SpeechToText/V1/Model/LanguageModel.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -100,14 +100,18 @@ public class StatusValue [JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)] public string Updated { get; set; } /// - /// The language identifier of the custom language model (for example, `en-US`). + /// The language identifier of the custom language model (for example, `en-US`). The value matches the + /// five-character language identifier from the name of the base model for the custom model. This value might be + /// different from the value of the `dialect` field. /// [JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)] public string Language { get; set; } /// - /// The dialect of the language for the custom language model. For non-Spanish models, the field matches the - /// language of the base model; for example, `en-US` for either of the US English language models. For Spanish - /// models, the field indicates the dialect for which the model was created: + /// The dialect of the language for the custom language model. _For custom models that are based on non-Spanish + /// previous-generation models and on next-generation models,_ the field matches the language of the base model; + /// for example, `en-US` for one of the US English models. _For custom models that are based on Spanish + /// previous-generation models,_ the field indicates the dialect with which the model was created. The value can + /// match the name of the base model or, if it was specified by the user, can be one of the following: /// * `es-ES` for Castilian Spanish (`es-ES` models) /// * `es-LA` for Latin American Spanish (`es-AR`, `es-CL`, `es-CO`, and `es-PE` models) /// * `es-US` for Mexican (North American) Spanish (`es-MX` models) @@ -117,14 +121,9 @@ public class StatusValue [JsonProperty("dialect", NullValueHandling = NullValueHandling.Ignore)] public string Dialect { get; set; } /// - /// _For custom models that are based on previous-generation models_, a list of the available versions of the - /// custom language model. Each element of the array indicates a version of the base model with which the custom - /// model can be used. Multiple versions exist only if the custom model has been upgraded; otherwise, only a - /// single version is shown. - /// - /// _For custom models that are based on next-generation models_, a single version of the custom model. Only one - /// version of a custom model that is based on a next-generation model is ever available, and upgrading does not - /// apply. + /// A list of the available versions of the custom language model. Each element of the array indicates a version + /// of the base model with which the custom model can be used. Multiple versions exist only if the custom model + /// has been upgraded to a new version of its base model. Otherwise, only a single version is shown. /// [JsonProperty("versions", NullValueHandling = NullValueHandling.Ignore)] public List Versions { get; set; } diff --git a/Scripts/Services/SpeechToText/V1/Model/SpeechModel.cs b/Scripts/Services/SpeechToText/V1/Model/SpeechModel.cs index bb7ea9f15..1447d8d7a 100644 --- a/Scripts/Services/SpeechToText/V1/Model/SpeechModel.cs +++ b/Scripts/Services/SpeechToText/V1/Model/SpeechModel.cs @@ -1,5 +1,5 @@ /** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ public class SpeechModel [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] public string Url { get; set; } /// - /// Additional service features that are supported with the model. + /// Indicates whether select service features are supported with the model. /// [JsonProperty("supported_features", NullValueHandling = NullValueHandling.Ignore)] public SupportedFeatures SupportedFeatures { get; set; } diff --git a/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionAlternative.cs b/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionAlternative.cs index d2858ae86..aaffcde89 100644 --- a/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionAlternative.cs +++ b/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionAlternative.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ public class SpeechRecognitionAlternative /// /// A confidence score for each word of the transcript as a list of lists. Each inner list consists of two /// elements: the word and its confidence score in the range of 0.0 to 1.0, for example: - /// `[["hello",0.95],["world",0.866]]`. Confidence scores are returned only for the best alternative and only + /// `[["hello",0.95],["world",0.86]]`. Confidence scores are returned only for the best alternative and only /// with results marked as final. /// [JsonProperty("word_confidence", NullValueHandling = NullValueHandling.Ignore)] diff --git a/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionResult.cs b/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionResult.cs index a4932b3c9..4978be643 100644 --- a/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionResult.cs +++ b/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionResult.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2020. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,9 +68,13 @@ public class EndOfUtteranceValue [JsonProperty("end_of_utterance", NullValueHandling = NullValueHandling.Ignore)] public string EndOfUtterance { get; set; } /// - /// An indication of whether the transcription results are final. If `true`, the results for this utterance are - /// not updated further; no additional results are sent for a `result_index` once its results are indicated as - /// final. + /// An indication of whether the transcription results are final: + /// * If `true`, the results for this utterance are final. They are guaranteed not to be updated further. + /// * If `false`, the results are interim. They can be updated with further interim results until final results + /// are eventually sent. + /// + /// **Note:** Because `final` is a reserved word in Java and Swift, the field is renamed `xFinal` in Java and is + /// escaped with back quotes in Swift. /// [JsonProperty("final", NullValueHandling = NullValueHandling.Ignore)] public bool? Final { get; set; } diff --git a/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionResults.cs b/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionResults.cs index 94fe6cb43..e4a43dd87 100644 --- a/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionResults.cs +++ b/Scripts/Services/SpeechToText/V1/Model/SpeechRecognitionResults.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,15 +28,22 @@ public class SpeechRecognitionResults /// /// An array of `SpeechRecognitionResult` objects that can include interim and final results (interim results /// are returned only if supported by the method). Final results are guaranteed not to change; interim results - /// might be replaced by further interim results and final results. The service periodically sends updates to - /// the results list; the `result_index` is set to the lowest index in the array that has changed; it is - /// incremented for new results. + /// might be replaced by further interim results and eventually final results. + /// + /// For the HTTP interfaces, all results arrive at the same time. For the WebSocket interface, results can be + /// sent as multiple separate responses. The service periodically sends updates to the results list. The + /// `result_index` is incremented to the lowest index in the array that has changed for new results. + /// + /// For more information, see [Understanding speech recognition + /// results](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-basic-response). /// [JsonProperty("results", NullValueHandling = NullValueHandling.Ignore)] public List Results { get; set; } /// - /// An index that indicates a change point in the `results` array. The service increments the index only for - /// additional results that it sends for new audio for the same request. + /// An index that indicates a change point in the `results` array. The service increments the index for + /// additional results that it sends for new audio for the same request. All results with the same index are + /// delivered at the same time. The same index can include multiple final results that are delivered with the + /// same response. /// [JsonProperty("result_index", NullValueHandling = NullValueHandling.Ignore)] public long? ResultIndex { get; set; } diff --git a/Scripts/Services/SpeechToText/V1/Model/SupportedFeatures.cs b/Scripts/Services/SpeechToText/V1/Model/SupportedFeatures.cs index bf55bafa7..af78e7cd7 100644 --- a/Scripts/Services/SpeechToText/V1/Model/SupportedFeatures.cs +++ b/Scripts/Services/SpeechToText/V1/Model/SupportedFeatures.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ namespace IBM.Watson.SpeechToText.V1.Model { /// - /// Additional service features that are supported with the model. + /// Indicates whether select service features are supported with the model. /// public class SupportedFeatures { @@ -31,17 +31,23 @@ public class SupportedFeatures [JsonProperty("custom_language_model", NullValueHandling = NullValueHandling.Ignore)] public bool? CustomLanguageModel { get; set; } /// + /// Indicates whether the customization interface can be used to create a custom acoustic model based on the + /// language model. + /// + [JsonProperty("custom_acoustic_model", NullValueHandling = NullValueHandling.Ignore)] + public bool? CustomAcousticModel { get; set; } + /// /// Indicates whether the `speaker_labels` parameter can be used with the language model. /// - /// **Note:** The field returns `true` for all models. However, speaker labels are supported as beta - /// functionality only for the following languages and models: - /// * For previous-generation models, the parameter can be used for Australian English, US English, German, + /// **Note:** The field returns `true` for all models. However, speaker labels are supported for use only with + /// the following languages and models: + /// * _For previous-generation models,_ the parameter can be used with Australian English, US English, German, /// Japanese, Korean, and Spanish (both broadband and narrowband models) and UK English (narrowband model) /// transcription only. - /// * For next-generation models, the parameter can be used for English (Australian, Indian, UK, and US), - /// German, Japanese, Korean, and Spanish transcription only. + /// * _For next-generation models,_ the parameter can be used with Czech, English (Australian, Indian, UK, and + /// US), German, Japanese, Korean, and Spanish transcription only. /// - /// Speaker labels are not supported for any other models. + /// Speaker labels are not supported for use with any other languages or models. /// [JsonProperty("speaker_labels", NullValueHandling = NullValueHandling.Ignore)] public bool? SpeakerLabels { get; set; } diff --git a/Scripts/Services/SpeechToText/V1/SpeechToTextService.cs b/Scripts/Services/SpeechToText/V1/SpeechToTextService.cs index 384259277..48cbf55c6 100644 --- a/Scripts/Services/SpeechToText/V1/SpeechToTextService.cs +++ b/Scripts/Services/SpeechToText/V1/SpeechToTextService.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ */ /** -* IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025 +* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428 */ using System.Collections.Generic; @@ -89,7 +89,8 @@ public SpeechToTextService(string serviceName, Authenticator authenticator) : ba /// the model and its minimum sampling rate in Hertz, among other things. The ordering of the list of models can /// change from call to call; do not rely on an alphabetized or static list of models. /// - /// **See also:** [Listing models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-list). + /// **See also:** [Listing all + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-list#models-list-all). /// /// The callback function that is invoked when the operation completes. /// SpeechModels @@ -157,7 +158,8 @@ private void OnListModelsResponse(RESTConnector.Request req, RESTConnector.Respo /// Gets information for a single specified language model that is available for use with the service. The /// information includes the name of the model and its minimum sampling rate in Hertz, among other things. /// - /// **See also:** [Listing models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-list). + /// **See also:** [Listing a specific + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-list#models-list-specific). /// /// The callback function that is invoked when the operation completes. /// The identifier of the model in the form of its name from the output of the [List @@ -293,19 +295,25 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// /// You specify a next-generation model by using the `model` query parameter, as you do a previous-generation /// model. Many next-generation models also support the `low_latency` parameter, which is not available with - /// previous-generation models. + /// previous-generation models. Next-generation models do not support all of the parameters that are available + /// for use with previous-generation models. /// - /// But next-generation models do not support all of the parameters that are available for use with - /// previous-generation models. For more information about all parameters that are supported for use with - /// next-generation models, see [Supported features for next-generation - /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-features). + /// **Important:** Effective 15 March 2022, previous-generation models for all languages other than Arabic and + /// Japanese are deprecated. The deprecated models remain available until 15 September 2022, when they will be + /// removed from the service and the documentation. You must migrate to the equivalent next-generation model by + /// the end of service date. For more information, see [Migrating to next-generation + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate). /// - /// **See also:** [Next-generation languages and - /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng). + /// **See also:** + /// * [Next-generation languages and + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng) + /// * [Supported features for next-generation + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-features) /// /// ### Multipart speech recognition /// - /// **Note:** The Watson SDKs do not support multipart speech recognition. + /// **Note:** The asynchronous HTTP interface, WebSocket interface, and Watson SDKs do not support multipart + /// speech recognition. /// /// The HTTP `POST` method of the service also supports multipart speech recognition. With multipart requests, /// you pass all audio data as multipart form data. You specify some parameters as request headers and query @@ -324,10 +332,8 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// The format (MIME type) of the audio. For more information about specifying an /// audio format, see **Audio formats (content types)** in the method description. (optional) /// The identifier of the model that is to be used for the recognition request. (**Note:** - /// The model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) See - /// [Previous-generation languages and - /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models) and [Next-generation - /// languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng). (optional, + /// The model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) See [Using a model for + /// speech recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use). (optional, /// default to en-US_BroadbandModel) /// The customization ID (GUID) of a custom language model that is to be /// used with the recognition request. The base model of the specified custom language model must match the @@ -410,7 +416,9 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// (optional, default to false) /// If `true`, the service filters profanity from all output except for keyword /// results by replacing inappropriate words with a series of asterisks. Set the parameter to `false` to return - /// results with no censoring. Applies to US English and Japanese transcription only. See [Profanity + /// results with no censoring. + /// + /// **Note:** The parameter can be used with US English and Japanese transcription only. See [Profanity /// filtering](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#profanity-filtering). /// (optional, default to true) /// If `true`, the service converts dates, times, series of digits and numbers, @@ -418,7 +426,7 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// the final transcript of a recognition request. For US English, the service also converts certain keyword /// strings to punctuation symbols. By default, the service performs no smart formatting. /// - /// **Beta:** The parameter is beta functionality. Applies to US English, Japanese, and Spanish transcription + /// **Note:** The parameter can be used with US English, Japanese, and Spanish (all dialects) transcription /// only. /// /// See [Smart @@ -428,17 +436,14 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// which participants in a multi-person exchange. By default, the service returns no speaker labels. Setting /// `speaker_labels` to `true` forces the `timestamps` parameter to be `true`, regardless of whether you specify /// `false` for the parameter. - /// - /// **Beta:** The parameter is beta functionality. - /// * For previous-generation models, the parameter can be used for Australian English, US English, German, + /// * _For previous-generation models,_ the parameter can be used with Australian English, US English, German, /// Japanese, Korean, and Spanish (both broadband and narrowband models) and UK English (narrowband model) /// transcription only. - /// * For next-generation models, the parameter can be used for English (Australian, Indian, UK, and US), - /// German, Japanese, Korean, and Spanish transcription only. + /// * _For next-generation models,_ the parameter can be used with Czech, English (Australian, Indian, UK, and + /// US), German, Japanese, Korean, and Spanish transcription only. /// - /// Restrictions and limitations apply to the use of speaker labels for both types of models. See [Speaker - /// labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-speaker-labels). (optional, default - /// to false) + /// See [Speaker labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-speaker-labels). + /// (optional, default to false) /// **Deprecated.** Use the `language_customization_id` parameter to specify the /// customization ID (GUID) of a custom language model that is to be used with the recognition request. Do not /// specify both parameters with a request. (optional) @@ -448,8 +453,6 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// recognized by the specified grammar; it does not recognize other custom words from the model's words /// resource. /// - /// **Beta:** The parameter is beta functionality. - /// /// See [Using a grammar for speech /// recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUse). (optional) /// If `true`, the service redacts, or masks, numeric data from final transcripts. The @@ -462,8 +465,7 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// (ignores the `keywords` and `keywords_threshold` parameters) and returns only a single final transcript /// (forces the `max_alternatives` parameter to be `1`). /// - /// **Beta:** The parameter is beta functionality. Applies to US English, Japanese, and Korean transcription - /// only. + /// **Note:** The parameter can be used with US English, Japanese, and Korean transcription only. /// /// See [Numeric /// redaction](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#numeric-redaction). @@ -493,7 +495,11 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// multiple final results based on semantic features of the input, for example, at the conclusion of meaningful /// phrases such as sentences. The service bases its understanding of semantic features on the base language /// model that you use with a request. Custom language models and grammars can also influence how and where the - /// service splits a transcript. By default, the service splits transcripts based solely on the pause interval. + /// service splits a transcript. + /// + /// By default, the service splits transcripts based solely on the pause interval. If the parameters are used + /// together on the same request, `end_of_phrase_silence_time` has precedence over + /// `split_transcript_at_phrase_end`. /// /// See [Split transcript at phrase /// end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing#split-transcript). (optional, @@ -508,8 +514,13 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// * 0.5 (the default) provides a reasonable compromise for the level of sensitivity. /// * 1.0 suppresses no audio (speech detection sensitivity is disabled). /// - /// The values increase on a monotonic curve. See [Speech detector - /// sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-sensitivity). + /// The values increase on a monotonic curve. + /// + /// The parameter is supported with all next-generation models and with most previous-generation models. See + /// [Speech detector + /// sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-sensitivity) + /// and [Language model + /// support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support). /// (optional) /// The level to which the service is to suppress background audio /// based on its volume to prevent it from being transcribed as speech. Use the parameter to suppress side @@ -520,8 +531,13 @@ private void OnGetModelResponse(RESTConnector.Request req, RESTConnector.Respons /// * 0.5 provides a reasonable level of audio suppression for general usage. /// * 1.0 suppresses all audio (no audio is transcribed). /// - /// The values increase on a monotonic curve. See [Background audio - /// suppression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-suppression). + /// The values increase on a monotonic curve. + /// + /// The parameter is supported with all next-generation models and with most previous-generation models. See + /// [Background audio + /// suppression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-suppression) + /// and [Language model + /// support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support). /// (optional) /// If `true` for next-generation `Multimedia` and `Telephony` models that support low /// latency, directs the service to produce results even more quickly than it usually does. Next-generation @@ -981,25 +997,28 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// /// You specify a next-generation model by using the `model` query parameter, as you do a previous-generation /// model. Many next-generation models also support the `low_latency` parameter, which is not available with - /// previous-generation models. + /// previous-generation models. Next-generation models do not support all of the parameters that are available + /// for use with previous-generation models. /// - /// But next-generation models do not support all of the parameters that are available for use with - /// previous-generation models. For more information about all parameters that are supported for use with - /// next-generation models, see [Supported features for next-generation - /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-features). + /// **Important:** Effective 15 March 2022, previous-generation models for all languages other than Arabic and + /// Japanese are deprecated. The deprecated models remain available until 15 September 2022, when they will be + /// removed from the service and the documentation. You must migrate to the equivalent next-generation model by + /// the end of service date. For more information, see [Migrating to next-generation + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate). /// - /// **See also:** [Next-generation languages and - /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng). + /// **See also:** + /// * [Next-generation languages and + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng) + /// * [Supported features for next-generation + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng#models-ng-features). /// /// The callback function that is invoked when the operation completes. /// The audio to transcribe. /// The format (MIME type) of the audio. For more information about specifying an /// audio format, see **Audio formats (content types)** in the method description. (optional) /// The identifier of the model that is to be used for the recognition request. (**Note:** - /// The model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) See - /// [Previous-generation languages and - /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models) and [Next-generation - /// languages and models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-ng). (optional, + /// The model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) See [Using a model for + /// speech recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-use). (optional, /// default to en-US_BroadbandModel) /// A URL to which callback notifications are to be sent. The URL must already be /// successfully allowlisted by using the [Register a callback](#registercallback) method. You can include the @@ -1113,7 +1132,9 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// (optional, default to false) /// If `true`, the service filters profanity from all output except for keyword /// results by replacing inappropriate words with a series of asterisks. Set the parameter to `false` to return - /// results with no censoring. Applies to US English and Japanese transcription only. See [Profanity + /// results with no censoring. + /// + /// **Note:** The parameter can be used with US English and Japanese transcription only. See [Profanity /// filtering](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#profanity-filtering). /// (optional, default to true) /// If `true`, the service converts dates, times, series of digits and numbers, @@ -1121,7 +1142,7 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// the final transcript of a recognition request. For US English, the service also converts certain keyword /// strings to punctuation symbols. By default, the service performs no smart formatting. /// - /// **Beta:** The parameter is beta functionality. Applies to US English, Japanese, and Spanish transcription + /// **Note:** The parameter can be used with US English, Japanese, and Spanish (all dialects) transcription /// only. /// /// See [Smart @@ -1131,17 +1152,14 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// which participants in a multi-person exchange. By default, the service returns no speaker labels. Setting /// `speaker_labels` to `true` forces the `timestamps` parameter to be `true`, regardless of whether you specify /// `false` for the parameter. - /// - /// **Beta:** The parameter is beta functionality. - /// * For previous-generation models, the parameter can be used for Australian English, US English, German, + /// * _For previous-generation models,_ the parameter can be used with Australian English, US English, German, /// Japanese, Korean, and Spanish (both broadband and narrowband models) and UK English (narrowband model) /// transcription only. - /// * For next-generation models, the parameter can be used for English (Australian, Indian, UK, and US), - /// German, Japanese, Korean, and Spanish transcription only. + /// * _For next-generation models,_ the parameter can be used with Czech, English (Australian, Indian, UK, and + /// US), German, Japanese, Korean, and Spanish transcription only. /// - /// Restrictions and limitations apply to the use of speaker labels for both types of models. See [Speaker - /// labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-speaker-labels). (optional, default - /// to false) + /// See [Speaker labels](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-speaker-labels). + /// (optional, default to false) /// **Deprecated.** Use the `language_customization_id` parameter to specify the /// customization ID (GUID) of a custom language model that is to be used with the recognition request. Do not /// specify both parameters with a request. (optional) @@ -1151,8 +1169,6 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// recognized by the specified grammar; it does not recognize other custom words from the model's words /// resource. /// - /// **Beta:** The parameter is beta functionality. - /// /// See [Using a grammar for speech /// recognition](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUse). (optional) /// If `true`, the service redacts, or masks, numeric data from final transcripts. The @@ -1165,8 +1181,7 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// (ignores the `keywords` and `keywords_threshold` parameters) and returns only a single final transcript /// (forces the `max_alternatives` parameter to be `1`). /// - /// **Beta:** The parameter is beta functionality. Applies to US English, Japanese, and Korean transcription - /// only. + /// **Note:** The parameter can be used with US English, Japanese, and Korean transcription only. /// /// See [Numeric /// redaction](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-formatting#numeric-redaction). @@ -1219,7 +1234,11 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// multiple final results based on semantic features of the input, for example, at the conclusion of meaningful /// phrases such as sentences. The service bases its understanding of semantic features on the base language /// model that you use with a request. Custom language models and grammars can also influence how and where the - /// service splits a transcript. By default, the service splits transcripts based solely on the pause interval. + /// service splits a transcript. + /// + /// By default, the service splits transcripts based solely on the pause interval. If the parameters are used + /// together on the same request, `end_of_phrase_silence_time` has precedence over + /// `split_transcript_at_phrase_end`. /// /// See [Split transcript at phrase /// end](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-parsing#split-transcript). (optional, @@ -1234,8 +1253,13 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// * 0.5 (the default) provides a reasonable compromise for the level of sensitivity. /// * 1.0 suppresses no audio (speech detection sensitivity is disabled). /// - /// The values increase on a monotonic curve. See [Speech detector - /// sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-sensitivity). + /// The values increase on a monotonic curve. + /// + /// The parameter is supported with all next-generation models and with most previous-generation models. See + /// [Speech detector + /// sensitivity](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-sensitivity) + /// and [Language model + /// support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support). /// (optional) /// The level to which the service is to suppress background audio /// based on its volume to prevent it from being transcribed as speech. Use the parameter to suppress side @@ -1246,8 +1270,13 @@ private void OnUnregisterCallbackResponse(RESTConnector.Request req, RESTConnect /// * 0.5 provides a reasonable level of audio suppression for general usage. /// * 1.0 suppresses all audio (no audio is transcribed). /// - /// The values increase on a monotonic curve. See [Background audio - /// suppression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-suppression). + /// The values increase on a monotonic curve. + /// + /// The parameter is supported with all next-generation models and with most previous-generation models. See + /// [Background audio + /// suppression](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-parameters-suppression) + /// and [Language model + /// support](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-detection#detection-support). /// (optional) /// If `true` for next-generation `Multimedia` and `Telephony` models that support low /// latency, directs the service to produce results even more quickly than it usually does. Next-generation @@ -1689,8 +1718,17 @@ private void OnDeleteJobResponse(RESTConnector.Request req, RESTConnector.Respon /// if you attempt to create more than 1024 models. You do not lose any models, but you cannot create any more /// until your model count is below the limit. /// - /// **See also:** [Create a custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#createModel-language). + /// **Important:** Effective 15 March 2022, previous-generation models for all languages other than Arabic and + /// Japanese are deprecated. The deprecated models remain available until 15 September 2022, when they will be + /// removed from the service and the documentation. You must migrate to the equivalent next-generation model by + /// the end of service date. For more information, see [Migrating to next-generation + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate). + /// + /// **See also:** + /// * [Create a custom language + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#createModel-language) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// A user-defined name for the new custom language model. Use a name that is unique among @@ -1703,21 +1741,21 @@ private void OnDeleteJobResponse(RESTConnector.Request req, RESTConnector.Respon /// To determine whether a base model supports language model customization, use the [Get a model](#getmodel) /// method and check that the attribute `custom_language_model` is set to `true`. You can also refer to /// [Language support for - /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support). + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// The dialect of the specified language that is to be used with the custom language - /// model. For most languages, the dialect matches the language of the base model by default. For example, - /// `en-US` is used for the US English language models. All dialect values are case-insensitive. - /// - /// The parameter is meaningful only for Spanish language models, for which you can always safely omit the - /// parameter to have the service create the correct mapping. For Spanish, the service creates a custom language - /// model that is suited for speech in one of the following dialects: + /// model. _For all languages, it is always safe to omit this field._ The service automatically uses the + /// language identifier from the name of the base model. For example, the service automatically uses `en-US` for + /// all US English models. + /// + /// If you specify the `dialect` for a new custom model, follow these guidelines. _For non-Spanish + /// previous-generation models and for next-generation models,_ you must specify a value that matches the + /// five-character language identifier from the name of the base model. _For Spanish previous-generation + /// models,_ you must specify one of the following values: /// * `es-ES` for Castilian Spanish (`es-ES` models) /// * `es-LA` for Latin American Spanish (`es-AR`, `es-CL`, `es-CO`, and `es-PE` models) /// * `es-US` for Mexican (North American) Spanish (`es-MX` models) /// - /// If you specify the `dialect` parameter for a non-Spanish language model, its value must match the language - /// of the base model. If you specify the `dialect` for a Spanish language model, its value must match one of - /// the defined mappings (`es-ES`, `es-LA`, or `es-MX`). (optional) + /// All values that you pass for the `dialect` field are case-insensitive. (optional) /// A description of the new custom language model. Use a localized description that /// matches the language of the custom model. (optional) /// LanguageModel @@ -1804,16 +1842,21 @@ private void OnCreateLanguageModelResponse(RESTConnector.Request req, RESTConnec /// all custom language models for all languages. You must use credentials for the instance of the service that /// owns a model to list information about it. /// - /// **See also:** [Listing custom language - /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#listModels-language). + /// **See also:** + /// * [Listing custom language + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#listModels-language) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The identifier of the language for which custom language or custom acoustic models - /// are to be returned. Omit the parameter to see all custom language or custom acoustic models that are owned - /// by the requesting credentials. (**Note:** The identifier `ar-AR` is deprecated; use `ar-MS` instead.) + /// are to be returned. Specify the five-character language identifier; for example, specify `en-US` to see all + /// custom language or custom acoustic models that are based on US English models. Omit the parameter to see all + /// custom language or custom acoustic models that are owned by the requesting credentials. (**Note:** The + /// identifier `ar-AR` is deprecated; use `ar-MS` instead.) /// /// To determine the languages for which customization is available, see [Language support for - /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support). + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// (optional) /// LanguageModels public bool ListLanguageModels(Callback callback, string language = null) @@ -1884,8 +1927,11 @@ private void OnListLanguageModelsResponse(RESTConnector.Request req, RESTConnect /// Gets information about a specified custom language model. You must use credentials for the instance of the /// service that owns a model to list information about it. /// - /// **See also:** [Listing custom language - /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#listModels-language). + /// **See also:** + /// * [Listing custom language + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#listModels-language) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The customization ID (GUID) of the custom language model that is to be used @@ -1959,8 +2005,11 @@ private void OnGetLanguageModelResponse(RESTConnector.Request req, RESTConnector /// adding a corpus or grammar to the model, is currently being processed. You must use credentials for the /// instance of the service that owns a model to delete it. /// - /// **See also:** [Deleting a custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#deleteModel-language). + /// **See also:** + /// * [Deleting a custom language + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#deleteModel-language) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The customization ID (GUID) of the custom language model that is to be used @@ -2046,8 +2095,11 @@ private void OnDeleteLanguageModelResponse(RESTConnector.Request req, RESTConnec /// custom model is trained and ready to use. The service cannot accept subsequent training requests or requests /// to add new resources until the existing request completes. /// - /// **See also:** [Train the custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#trainModel-language). + /// **See also:** + /// * [Train the custom language + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-languageCreate#trainModel-language) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support) /// /// ### Training failures /// @@ -2167,8 +2219,11 @@ private void OnTrainLanguageModelResponse(RESTConnector.Request req, RESTConnect /// name and language of the model are preserved, but the model's words resource is removed and must be /// re-created. You must use credentials for the instance of the service that owns a model to reset it. /// - /// **See also:** [Resetting a custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#resetModel-language). + /// **See also:** + /// * [Resetting a custom language + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageLanguageModels#resetModel-language) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The customization ID (GUID) of the custom language model that is to be used @@ -2247,15 +2302,17 @@ private void OnResetLanguageModelResponse(RESTConnector.Request req, RESTConnect /// The method returns an HTTP 200 response code to indicate that the upgrade process has begun successfully. /// You can monitor the status of the upgrade by using the [Get a custom language model](#getlanguagemodel) /// method to poll the model's status. The method returns a `LanguageModel` object that includes `status` and - /// `progress` fields. Use a loop to check the status every 10 seconds. While it is being upgraded, the custom - /// model has the status `upgrading`. When the upgrade is complete, the model resumes the status that it had - /// prior to upgrade. The service cannot accept subsequent requests for the model until the upgrade completes. + /// `progress` fields. Use a loop to check the status every 10 seconds. /// - /// **Note:** Upgrading is necessary only for custom language models that are based on previous-generation - /// models. Only a single version of a custom model that is based on a next-generation model is ever available. + /// While it is being upgraded, the custom model has the status `upgrading`. When the upgrade is complete, the + /// model resumes the status that it had prior to upgrade. The service cannot accept subsequent requests for the + /// model until the upgrade completes. /// - /// **See also:** [Upgrading a custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade#custom-upgrade-language). + /// **See also:** + /// * [Upgrading a custom language + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-upgrade#custom-upgrade-language) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The customization ID (GUID) of the custom language model that is to be used @@ -3273,16 +3330,16 @@ private void OnDeleteWordResponse(RESTConnector.Request req, RESTConnector.Respo /// /// List grammars. /// - /// Lists information about all grammars from a custom language model. The information includes the total number - /// of out-of-vocabulary (OOV) words, name, and status of each grammar. You must use credentials for the - /// instance of the service that owns a model to list its grammars. Grammars are available for all languages and - /// models that support language customization. + /// Lists information about all grammars from a custom language model. For each grammar, the information + /// includes the name, status, and (for grammars that are based on previous-generation models) the total number + /// of out-of-vocabulary (OOV) words. You must use credentials for the instance of the service that owns a model + /// to list its grammars. /// - /// **Note:** Grammars are supported only for use with previous-generation models. They are not supported for - /// next-generation models. - /// - /// **See also:** [Listing grammars from a custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#listGrammars). + /// **See also:** + /// * [Listing grammars from a custom language + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#listGrammars) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The customization ID (GUID) of the custom language model that is to be used @@ -3365,10 +3422,12 @@ private void OnListGrammarsResponse(RESTConnector.Request req, RESTConnector.Res /// or to train the model until the service's analysis of the grammar for the current request completes. Use the /// [Get a grammar](#getgrammar) method to check the status of the analysis. /// - /// The service populates the model's words resource with any word that is recognized by the grammar that is not - /// found in the model's base vocabulary. These are referred to as out-of-vocabulary (OOV) words. You can use - /// the [List custom words](#listwords) method to examine the words resource and use other words-related methods - /// to eliminate typos and modify how words are pronounced as needed. + /// _For grammars that are based on previous-generation models,_ the service populates the model's words + /// resource with any word that is recognized by the grammar that is not found in the model's base vocabulary. + /// These are referred to as out-of-vocabulary (OOV) words. You can use the [List custom words](#listwords) + /// method to examine the words resource and use other words-related methods to eliminate typos and modify how + /// words are pronounced as needed. _For grammars that are based on next-generation models,_ the service + /// extracts no OOV words from the grammars. /// /// To add a grammar that has the same name as an existing grammar, set the `allow_overwrite` parameter to /// `true`; otherwise, the request fails. Overwriting an existing grammar causes the service to process the @@ -3377,19 +3436,18 @@ private void OnListGrammarsResponse(RESTConnector.Request req, RESTConnector.Res /// have been modified in some way with the [Add custom words](#addwords) or [Add a custom word](#addword) /// method. /// - /// The service limits the overall amount of data that you can add to a custom model to a maximum of 10 million - /// total words from all sources combined. Also, you can add no more than 90 thousand OOV words to a model. This - /// includes words that the service extracts from corpora and grammars and words that you add directly. Grammars - /// are available for all languages and models that support language customization. - /// - /// **Note:** Grammars are supported only for use with previous-generation models. They are not supported for - /// next-generation models. + /// _For grammars that are based on previous-generation models,_ the service limits the overall amount of data + /// that you can add to a custom model to a maximum of 10 million total words from all sources combined. Also, + /// you can add no more than 90 thousand OOV words to a model. This includes words that the service extracts + /// from corpora and grammars and words that you add directly. /// /// **See also:** /// * [Understanding /// grammars](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarUnderstand#grammarUnderstand) /// * [Add a grammar to the custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarAdd#addGrammar). + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-grammarAdd#addGrammar) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The customization ID (GUID) of the custom language model that is to be used @@ -3501,16 +3559,16 @@ private void OnAddGrammarResponse(RESTConnector.Request req, RESTConnector.Respo /// /// Get a grammar. /// - /// Gets information about a grammar from a custom language model. The information includes the total number of - /// out-of-vocabulary (OOV) words, name, and status of the grammar. You must use credentials for the instance of - /// the service that owns a model to list its grammars. Grammars are available for all languages and models that - /// support language customization. - /// - /// **Note:** Grammars are supported only for use with previous-generation models. They are not supported for - /// next-generation models. + /// Gets information about a grammar from a custom language model. For each grammar, the information includes + /// the name, status, and (for grammars that are based on previous-generation models) the total number of + /// out-of-vocabulary (OOV) words. You must use credentials for the instance of the service that owns a model to + /// list its grammars. /// - /// **See also:** [Listing grammars from a custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#listGrammars). + /// **See also:** + /// * [Listing grammars from a custom language + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#listGrammars) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The customization ID (GUID) of the custom language model that is to be used @@ -3583,19 +3641,19 @@ private void OnGetGrammarResponse(RESTConnector.Request req, RESTConnector.Respo /// /// Delete a grammar. /// - /// Deletes an existing grammar from a custom language model. The service removes any out-of-vocabulary (OOV) - /// words associated with the grammar from the custom model's words resource unless they were also added by - /// another resource or they were modified in some way with the [Add custom words](#addwords) or [Add a custom - /// word](#addword) method. Removing a grammar does not affect the custom model until you train the model with - /// the [Train a custom language model](#trainlanguagemodel) method. You must use credentials for the instance - /// of the service that owns a model to delete its grammar. Grammars are available for all languages and models - /// that support language customization. - /// - /// **Note:** Grammars are supported only for use with previous-generation models. They are not supported for - /// next-generation models. + /// Deletes an existing grammar from a custom language model. _For grammars that are based on + /// previous-generation models,_ the service removes any out-of-vocabulary (OOV) words associated with the + /// grammar from the custom model's words resource unless they were also added by another resource or they were + /// modified in some way with the [Add custom words](#addwords) or [Add a custom word](#addword) method. + /// Removing a grammar does not affect the custom model until you train the model with the [Train a custom + /// language model](#trainlanguagemodel) method. You must use credentials for the instance of the service that + /// owns a model to delete its grammar. /// - /// **See also:** [Deleting a grammar from a custom language - /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#deleteGrammar). + /// **See also:** + /// * [Deleting a grammar from a custom language + /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-manageGrammars#deleteGrammar) + /// * [Language support for + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// /// The callback function that is invoked when the operation completes. /// The customization ID (GUID) of the custom language model that is to be used @@ -3679,6 +3737,12 @@ private void OnDeleteGrammarResponse(RESTConnector.Request req, RESTConnector.Re /// **Note:** Acoustic model customization is supported only for use with previous-generation models. It is not /// supported for next-generation models. /// + /// **Important:** Effective 15 March 2022, previous-generation models for all languages other than Arabic and + /// Japanese are deprecated. The deprecated models remain available until 15 September 2022, when they will be + /// removed from the service and the documentation. You must migrate to the equivalent next-generation model by + /// the end of service date. For more information, see [Migrating to next-generation + /// models](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-models-migrate). + /// /// **See also:** [Create a custom acoustic /// model](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-acoustic#createModel-acoustic). /// @@ -3692,7 +3756,7 @@ private void OnDeleteGrammarResponse(RESTConnector.Request req, RESTConnector.Re /// model `ar-AR_BroadbandModel` is deprecated; use `ar-MS_BroadbandModel` instead.) /// /// To determine whether a base model supports acoustic model customization, refer to [Language support for - /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support). + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// A description of the new custom acoustic model. Use a localized description that /// matches the language of the custom model. (optional) /// AcousticModel @@ -3785,11 +3849,13 @@ private void OnCreateAcousticModelResponse(RESTConnector.Request req, RESTConnec /// /// The callback function that is invoked when the operation completes. /// The identifier of the language for which custom language or custom acoustic models - /// are to be returned. Omit the parameter to see all custom language or custom acoustic models that are owned - /// by the requesting credentials. (**Note:** The identifier `ar-AR` is deprecated; use `ar-MS` instead.) + /// are to be returned. Specify the five-character language identifier; for example, specify `en-US` to see all + /// custom language or custom acoustic models that are based on US English models. Omit the parameter to see all + /// custom language or custom acoustic models that are owned by the requesting credentials. (**Note:** The + /// identifier `ar-AR` is deprecated; use `ar-MS` instead.) /// /// To determine the languages for which customization is available, see [Language support for - /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support#custom-language-support). + /// customization](https://cloud.ibm.com/docs/speech-to-text?topic=speech-to-text-custom-support). /// (optional) /// AcousticModels public bool ListAcousticModels(Callback callback, string language = null) @@ -4231,10 +4297,12 @@ private void OnResetAcousticModelResponse(RESTConnector.Request req, RESTConnect /// The method returns an HTTP 200 response code to indicate that the upgrade process has begun successfully. /// You can monitor the status of the upgrade by using the [Get a custom acoustic model](#getacousticmodel) /// method to poll the model's status. The method returns an `AcousticModel` object that includes `status` and - /// `progress` fields. Use a loop to check the status once a minute. While it is being upgraded, the custom - /// model has the status `upgrading`. When the upgrade is complete, the model resumes the status that it had - /// prior to upgrade. The service cannot upgrade a model while it is handling another request for the model. The - /// service cannot accept subsequent requests for the model until the existing upgrade request completes. + /// `progress` fields. Use a loop to check the status once a minute. + /// + /// While it is being upgraded, the custom model has the status `upgrading`. When the upgrade is complete, the + /// model resumes the status that it had prior to upgrade. The service cannot upgrade a model while it is + /// handling another request for the model. The service cannot accept subsequent requests for the model until + /// the existing upgrade request completes. /// /// If the custom acoustic model was trained with a separately created custom language model, you must use the /// `custom_language_model_id` parameter to specify the GUID of that custom language model. The custom language diff --git a/Scripts/Services/TextToSpeech/V1/TextToSpeechService.cs b/Scripts/Services/TextToSpeech/V1/TextToSpeechService.cs index 7f32dec7f..d9028bdad 100644 --- a/Scripts/Services/TextToSpeech/V1/TextToSpeechService.cs +++ b/Scripts/Services/TextToSpeech/V1/TextToSpeechService.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2019, 2021. +* (C) Copyright IBM Corp. 2019, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ */ /** -* IBM OpenAPI SDK Code Generator Version: 3.38.0-07189efd-20210827-205025 +* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428 */ using System.Collections.Generic; @@ -164,31 +164,12 @@ private void OnListVoicesResponse(RESTConnector.Request req, RESTConnector.Respo /// **See also:** [Listing a specific /// voice](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices#listVoice). /// - /// ### Important voice updates for IBM Cloud - /// - /// The service's voices underwent significant change on 2 December 2020. - /// * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now neural instead of concatenative. - /// * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice instead. - /// * The `ar-AR` language identifier cannot be used to create a custom model. Use the `ar-MS` identifier - /// instead. - /// * The standard concatenative voices for the following languages are now deprecated: Brazilian Portuguese, - /// United Kingdom and United States English, French, German, Italian, Japanese, and Spanish (all dialects). - /// * The features expressive SSML, voice transformation SSML, and use of the `volume` attribute of the - /// `` element are deprecated and are not supported with any of the service's neural voices. - /// * All of the service's voices are now customizable and generally available (GA) for production use. - /// - /// The deprecated voices and features will continue to function for at least one year but might be removed at a - /// future date. You are encouraged to migrate to the equivalent neural voices at your earliest convenience. For - /// more information about all voice updates, see the [2 December 2020 service - /// update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes#December2020) in the - /// release notes for IBM Cloud. + /// **Note:** The Arabic, Chinese, Czech, Dutch (Belgian and Netherlands), Australian English, Korean, and + /// Swedish languages and voices are supported only for IBM Cloud; they are deprecated for IBM Cloud Pak for + /// Data. Also, the `ar-AR_OmarVoice` voice is deprecated; use the `ar-MS_OmarVoice` voice instead. /// /// The callback function that is invoked when the operation completes. - /// The voice for which information is to be returned. For more information about specifying - /// a voice, see **Important voice updates for IBM Cloud** in the method description. - /// - /// **IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and voices are supported - /// only for IBM Cloud. + /// The voice for which information is to be returned. /// The customization ID (GUID) of a custom model for which information is to be /// returned. You must make the request with credentials for the instance of the service that owns the custom /// model. Omit the parameter to see information about the specified voice with no customization. @@ -272,6 +253,10 @@ private void OnGetVoiceResponse(RESTConnector.Request req, RESTConnector.Respons /// **See also:** [The HTTP /// interface](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-usingHTTP#usingHTTP). /// + /// **Note:** The Arabic, Chinese, Czech, Dutch (Belgian and Netherlands), Australian English, Korean, and + /// Swedish languages and voices are supported only for IBM Cloud; they are deprecated for IBM Cloud Pak for + /// Data. Also, the `ar-AR_OmarVoice` voice is deprecated; use the `ar-MS_OmarVoice` voice instead. + /// /// ### Audio formats (accept types) /// /// The service can return audio in the following formats (MIME types). @@ -309,25 +294,6 @@ private void OnGetVoiceResponse(RESTConnector.Request req, RESTConnector.Respons /// formats, see [Using audio /// formats](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-audio-formats). /// - /// ### Important voice updates for IBM Cloud - /// - /// The service's voices underwent significant change on 2 December 2020. - /// * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now neural instead of concatenative. - /// * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice instead. - /// * The `ar-AR` language identifier cannot be used to create a custom model. Use the `ar-MS` identifier - /// instead. - /// * The standard concatenative voices for the following languages are now deprecated: Brazilian Portuguese, - /// United Kingdom and United States English, French, German, Italian, Japanese, and Spanish (all dialects). - /// * The features expressive SSML, voice transformation SSML, and use of the `volume` attribute of the - /// `` element are deprecated and are not supported with any of the service's neural voices. - /// * All of the service's voices are now customizable and generally available (GA) for production use. - /// - /// The deprecated voices and features will continue to function for at least one year but might be removed at a - /// future date. You are encouraged to migrate to the equivalent neural voices at your earliest convenience. For - /// more information about all voice updates, see the [2 December 2020 service - /// update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes#December2020) in the - /// release notes for IBM Cloud. - /// /// ### Warning messages /// /// If a request includes invalid query parameters, the service returns a `Warnings` response header that @@ -342,11 +308,13 @@ private void OnGetVoiceResponse(RESTConnector.Request req, RESTConnector.Respons /// `accept` parameter to specify the audio format. For more information about specifying an audio format, see /// **Audio formats (accept types)** in the method description. (optional, default to /// audio/ogg;codecs=opus) - /// The voice to use for synthesis. For more information about specifying a voice, see - /// **Important voice updates for IBM Cloud** in the method description. - /// - /// **IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and voices are supported - /// only for IBM Cloud. + /// The voice to use for synthesis. If you omit the `voice` parameter, the service uses a + /// default voice, which depends on the version of the service that you are using: + /// * _For IBM Cloud,_ the service always uses the US English `en-US_MichaelV3Voice` by default. + /// * _For IBM Cloud Pak for Data,_ the default voice depends on the voices that you installed. If you installed + /// the _enhanced neural voices_, the service uses the US English `en-US_MichaelV3Voice` by default; if that + /// voice is not installed, you must specify a voice. If you installed the _neural voices_, the service always + /// uses the Australian English `en-AU_MadisonVoice` by default. /// /// **See also:** See also [Using languages and /// voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices). (optional, default to @@ -436,33 +404,15 @@ private void OnSynthesizeResponse(RESTConnector.Request req, RESTConnector.Respo /// **See also:** [Querying a word from a /// language](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customWords#cuWordsQueryLanguage). /// - /// ### Important voice updates for IBM Cloud - /// - /// The service's voices underwent significant change on 2 December 2020. - /// * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now neural instead of concatenative. - /// * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice instead. - /// * The `ar-AR` language identifier cannot be used to create a custom model. Use the `ar-MS` identifier - /// instead. - /// * The standard concatenative voices for the following languages are now deprecated: Brazilian Portuguese, - /// United Kingdom and United States English, French, German, Italian, Japanese, and Spanish (all dialects). - /// * The features expressive SSML, voice transformation SSML, and use of the `volume` attribute of the - /// `` element are deprecated and are not supported with any of the service's neural voices. - /// * All of the service's voices are now customizable and generally available (GA) for production use. - /// - /// The deprecated voices and features will continue to function for at least one year but might be removed at a - /// future date. You are encouraged to migrate to the equivalent neural voices at your earliest convenience. For - /// more information about all voice updates, see the [2 December 2020 service - /// update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes#December2020) in the - /// release notes for IBM Cloud. + /// **Note:** The Arabic, Chinese, Czech, Dutch (Belgian and Netherlands), Australian English, Korean, and + /// Swedish languages and voices are supported only for IBM Cloud; they are deprecated for IBM Cloud Pak for + /// Data. Also, the `ar-AR_OmarVoice` voice is deprecated; use the `ar-MS_OmarVoice` voice instead. /// /// The callback function that is invoked when the operation completes. /// The word for which the pronunciation is requested. /// A voice that specifies the language in which the pronunciation is to be returned. All - /// voices for the same language (for example, `en-US`) return the same translation. For more information about - /// specifying a voice, see **Important voice updates for IBM Cloud** in the method description. - /// - /// **IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and voices are supported - /// only for IBM Cloud. (optional, default to en-US_MichaelV3Voice) + /// voices for the same language (for example, `en-US`) return the same translation. (optional, default to + /// en-US_MichaelV3Voice) /// The phoneme format in which to return the pronunciation. The Arabic, Chinese, Dutch, /// Australian English, and Korean languages support only IPA. Omit the parameter to obtain the pronunciation in /// the default format. (optional, default to ipa) @@ -559,34 +509,21 @@ private void OnGetPronunciationResponse(RESTConnector.Request req, RESTConnector /// **See also:** [Creating a custom /// model](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-customModels#cuModelsCreate). /// - /// ### Important voice updates for IBM Cloud - /// - /// The service's voices underwent significant change on 2 December 2020. - /// * The Arabic, Chinese, Dutch, Australian English, and Korean voices are now neural instead of concatenative. - /// * The `ar-AR_OmarVoice` voice is deprecated. Use `ar-MS_OmarVoice` voice instead. - /// * The `ar-AR` language identifier cannot be used to create a custom model. Use the `ar-MS` identifier - /// instead. - /// * The standard concatenative voices for the following languages are now deprecated: Brazilian Portuguese, - /// United Kingdom and United States English, French, German, Italian, Japanese, and Spanish (all dialects). - /// * The features expressive SSML, voice transformation SSML, and use of the `volume` attribute of the - /// `` element are deprecated and are not supported with any of the service's neural voices. - /// * All of the service's voices are now customizable and generally available (GA) for production use. - /// - /// The deprecated voices and features will continue to function for at least one year but might be removed at a - /// future date. You are encouraged to migrate to the equivalent neural voices at your earliest convenience. For - /// more information about all voice updates, see the [2 December 2020 service - /// update](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-release-notes#December2020) in the - /// release notes for IBM Cloud. + /// **Note:** The Arabic, Chinese, Czech, Dutch (Belgian and Netherlands), Australian English, Korean, and + /// Swedish languages and voices are supported only for IBM Cloud; they are deprecated for IBM Cloud Pak for + /// Data. Also, the `ar-AR` language identifier cannot be used to create a custom model; use the `ar-MS` + /// identifier instead. /// /// The callback function that is invoked when the operation completes. /// The name of the new custom model. /// The language of the new custom model. You create a custom model for a specific /// language, not for a specific voice. A custom model can be used with any voice for its specified language. - /// Omit the parameter to use the the default language, `en-US`. **Note:** The `ar-AR` language identifier - /// cannot be used to create a custom model. Use the `ar-MS` identifier instead. + /// Omit the parameter to use the the default language, `en-US`. /// - /// **IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and voices are supported - /// only for IBM Cloud. (optional, default to en-US) + /// **Important:** If you are using the service on IBM Cloud Pak for Data _and_ you install the neural voices, + /// the `language`parameter is required. You must specify the language for the custom model in the indicated + /// format (for example, `en-AU` for Australian English). The request fails if you do not specify a language. + /// (optional, default to en-US) /// A description of the new custom model. Specifying a description is recommended. /// (optional) /// CustomModel diff --git a/Scripts/Services/ToneAnalyzer.meta b/Scripts/Services/ToneAnalyzer.meta deleted file mode 100644 index 2e40399e3..000000000 --- a/Scripts/Services/ToneAnalyzer.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dcdaa208330284570b810ce18736daee -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3.meta b/Scripts/Services/ToneAnalyzer/V3.meta deleted file mode 100644 index 42362c32c..000000000 --- a/Scripts/Services/ToneAnalyzer/V3.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 20922e805d0d09a448f06b69fadc5b5b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model.meta b/Scripts/Services/ToneAnalyzer/V3/Model.meta deleted file mode 100644 index 1565c1e8d..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3579293cccfab6547881331e3b9b8adf -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/DocumentAnalysis.cs b/Scripts/Services/ToneAnalyzer/V3/Model/DocumentAnalysis.cs deleted file mode 100644 index 93a91f8a2..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/DocumentAnalysis.cs +++ /dev/null @@ -1,50 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// The results of the analysis for the full input content. - /// - public class DocumentAnalysis - { - /// - /// **`2017-09-21`:** An array of `ToneScore` objects that provides the results of the analysis for each - /// qualifying tone of the document. The array includes results for any tone whose score is at least 0.5. The - /// array is empty if no tone has a score that meets this threshold. **`2016-05-19`:** Not returned. - /// - [JsonProperty("tones", NullValueHandling = NullValueHandling.Ignore)] - public List Tones { get; set; } - /// - /// **`2017-09-21`:** Not returned. **`2016-05-19`:** An array of `ToneCategory` objects that provides the - /// results of the tone analysis for the full document of the input content. The service returns results only - /// for the tones specified with the `tones` parameter of the request. - /// - [JsonProperty("tone_categories", NullValueHandling = NullValueHandling.Ignore)] - public List ToneCategories { get; set; } - /// - /// **`2017-09-21`:** A warning message if the overall content exceeds 128 KB or contains more than 1000 - /// sentences. The service analyzes only the first 1000 sentences for document-level analysis and the first 100 - /// sentences for sentence-level analysis. **`2016-05-19`:** Not returned. - /// - [JsonProperty("warning", NullValueHandling = NullValueHandling.Ignore)] - public string Warning { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/DocumentAnalysis.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/DocumentAnalysis.cs.meta deleted file mode 100644 index 0441944fe..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/DocumentAnalysis.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a34f006f2a9c91d40916518fdd6dc2fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/SentenceAnalysis.cs b/Scripts/Services/ToneAnalyzer/V3/Model/SentenceAnalysis.cs deleted file mode 100644 index 834201e1c..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/SentenceAnalysis.cs +++ /dev/null @@ -1,66 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// The results of the analysis for the individual sentences of the input content. - /// - public class SentenceAnalysis - { - /// - /// The unique identifier of a sentence of the input content. The first sentence has ID 0, and the ID of each - /// subsequent sentence is incremented by one. - /// - [JsonProperty("sentence_id", NullValueHandling = NullValueHandling.Ignore)] - public long? SentenceId { get; set; } - /// - /// The text of the input sentence. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// **`2017-09-21`:** An array of `ToneScore` objects that provides the results of the analysis for each - /// qualifying tone of the sentence. The array includes results for any tone whose score is at least 0.5. The - /// array is empty if no tone has a score that meets this threshold. **`2016-05-19`:** Not returned. - /// - [JsonProperty("tones", NullValueHandling = NullValueHandling.Ignore)] - public List Tones { get; set; } - /// - /// **`2017-09-21`:** Not returned. **`2016-05-19`:** An array of `ToneCategory` objects that provides the - /// results of the tone analysis for the sentence. The service returns results only for the tones specified with - /// the `tones` parameter of the request. - /// - [JsonProperty("tone_categories", NullValueHandling = NullValueHandling.Ignore)] - public List ToneCategories { get; set; } - /// - /// **`2017-09-21`:** Not returned. **`2016-05-19`:** The offset of the first character of the sentence in the - /// overall input content. - /// - [JsonProperty("input_from", NullValueHandling = NullValueHandling.Ignore)] - public long? InputFrom { get; set; } - /// - /// **`2017-09-21`:** Not returned. **`2016-05-19`:** The offset of the last character of the sentence in the - /// overall input content. - /// - [JsonProperty("input_to", NullValueHandling = NullValueHandling.Ignore)] - public long? InputTo { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/SentenceAnalysis.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/SentenceAnalysis.cs.meta deleted file mode 100644 index 555de3947..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/SentenceAnalysis.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dc4e12ad1177b344089031faafb565d5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneAnalysis.cs b/Scripts/Services/ToneAnalyzer/V3/Model/ToneAnalysis.cs deleted file mode 100644 index 256f9ee9f..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneAnalysis.cs +++ /dev/null @@ -1,41 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// The tone analysis results for the input from the general-purpose endpoint. - /// - public class ToneAnalysis - { - /// - /// The results of the analysis for the full input content. - /// - [JsonProperty("document_tone", NullValueHandling = NullValueHandling.Ignore)] - public DocumentAnalysis DocumentTone { get; set; } - /// - /// An array of `SentenceAnalysis` objects that provides the results of the analysis for the individual - /// sentences of the input content. The service returns results only for the first 100 sentences of the input. - /// The field is omitted if the `sentences` parameter of the request is set to `false`. - /// - [JsonProperty("sentences_tone", NullValueHandling = NullValueHandling.Ignore)] - public List SentencesTone { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneAnalysis.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/ToneAnalysis.cs.meta deleted file mode 100644 index aeb40c3e6..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneAnalysis.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c4aa34cf87f6ed478382cf82f0f6bd1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneCategory.cs b/Scripts/Services/ToneAnalyzer/V3/Model/ToneCategory.cs deleted file mode 100644 index dcecb8169..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneCategory.cs +++ /dev/null @@ -1,45 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// The category for a tone from the input content. - /// - public class ToneCategory - { - /// - /// An array of `ToneScore` objects that provides the results for the tones of the category. - /// - [JsonProperty("tones", NullValueHandling = NullValueHandling.Ignore)] - public List Tones { get; set; } - /// - /// The unique, non-localized identifier of the category for the results. The service can return results for the - /// following category IDs: `emotion_tone`, `language_tone`, and `social_tone`. - /// - [JsonProperty("category_id", NullValueHandling = NullValueHandling.Ignore)] - public string CategoryId { get; set; } - /// - /// The user-visible, localized name of the category. - /// - [JsonProperty("category_name", NullValueHandling = NullValueHandling.Ignore)] - public string CategoryName { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneCategory.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/ToneCategory.cs.meta deleted file mode 100644 index 69bfc93e5..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneCategory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68e0252f346ec9549a6fc1df6832498e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneChatScore.cs b/Scripts/Services/ToneAnalyzer/V3/Model/ToneChatScore.cs deleted file mode 100644 index 2c760bfa4..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneChatScore.cs +++ /dev/null @@ -1,83 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// The score for an utterance from the input content. - /// - public class ToneChatScore - { - /// - /// The unique, non-localized identifier of the tone for the results. The service returns results only for tones - /// whose scores meet a minimum threshold of 0.5. - /// - public class ToneIdValue - { - /// - /// Constant EXCITED for excited - /// - public const string EXCITED = "excited"; - /// - /// Constant FRUSTRATED for frustrated - /// - public const string FRUSTRATED = "frustrated"; - /// - /// Constant IMPOLITE for impolite - /// - public const string IMPOLITE = "impolite"; - /// - /// Constant POLITE for polite - /// - public const string POLITE = "polite"; - /// - /// Constant SAD for sad - /// - public const string SAD = "sad"; - /// - /// Constant SATISFIED for satisfied - /// - public const string SATISFIED = "satisfied"; - /// - /// Constant SYMPATHETIC for sympathetic - /// - public const string SYMPATHETIC = "sympathetic"; - - } - - /// - /// The unique, non-localized identifier of the tone for the results. The service returns results only for tones - /// whose scores meet a minimum threshold of 0.5. - /// Constants for possible values can be found using ToneChatScore.ToneIdValue - /// - [JsonProperty("tone_id", NullValueHandling = NullValueHandling.Ignore)] - public string ToneId { get; set; } - /// - /// The score for the tone in the range of 0.5 to 1. A score greater than 0.75 indicates a high likelihood that - /// the tone is perceived in the utterance. - /// - [JsonProperty("score", NullValueHandling = NullValueHandling.Ignore)] - public double? Score { get; set; } - /// - /// The user-visible, localized name of the tone. - /// - [JsonProperty("tone_name", NullValueHandling = NullValueHandling.Ignore)] - public string ToneName { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneChatScore.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/ToneChatScore.cs.meta deleted file mode 100644 index 73e3b559b..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneChatScore.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3d94aa1bb034dee418e0377a8a155638 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneInput.cs b/Scripts/Services/ToneAnalyzer/V3/Model/ToneInput.cs deleted file mode 100644 index 09a91c8b0..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneInput.cs +++ /dev/null @@ -1,33 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// Input for the general-purpose endpoint. - /// - public class ToneInput - { - /// - /// The input content that the service is to analyze. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneInput.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/ToneInput.cs.meta deleted file mode 100644 index 16ab552b3..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneInput.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b633138ca21c734abea67367b61d30c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneScore.cs b/Scripts/Services/ToneAnalyzer/V3/Model/ToneScore.cs deleted file mode 100644 index 58a73b45d..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneScore.cs +++ /dev/null @@ -1,56 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// The score for a tone from the input content. - /// - public class ToneScore - { - /// - /// The score for the tone. - /// * **`2017-09-21`:** The score that is returned lies in the range of 0.5 to 1. A score greater than 0.75 - /// indicates a high likelihood that the tone is perceived in the content. - /// * **`2016-05-19`:** The score that is returned lies in the range of 0 to 1. A score less than 0.5 indicates - /// that the tone is unlikely to be perceived in the content; a score greater than 0.75 indicates a high - /// likelihood that the tone is perceived. - /// - [JsonProperty("score", NullValueHandling = NullValueHandling.Ignore)] - public double? Score { get; set; } - /// - /// The unique, non-localized identifier of the tone. - /// * **`2017-09-21`:** The service can return results for the following tone IDs: `anger`, `fear`, `joy`, and - /// `sadness` (emotional tones); `analytical`, `confident`, and `tentative` (language tones). The service - /// returns results only for tones whose scores meet a minimum threshold of 0.5. - /// * **`2016-05-19`:** The service can return results for the following tone IDs of the different categories: - /// for the `emotion` category: `anger`, `disgust`, `fear`, `joy`, and `sadness`; for the `language` category: - /// `analytical`, `confident`, and `tentative`; for the `social` category: `openness_big5`, - /// `conscientiousness_big5`, `extraversion_big5`, `agreeableness_big5`, and `emotional_range_big5`. The service - /// returns scores for all tones of a category, regardless of their values. - /// - [JsonProperty("tone_id", NullValueHandling = NullValueHandling.Ignore)] - public string ToneId { get; set; } - /// - /// The user-visible, localized name of the tone. - /// - [JsonProperty("tone_name", NullValueHandling = NullValueHandling.Ignore)] - public string ToneName { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/ToneScore.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/ToneScore.cs.meta deleted file mode 100644 index 325fdcc06..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/ToneScore.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aecd091932fbee3499a9aaa2346b5e99 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/Utterance.cs b/Scripts/Services/ToneAnalyzer/V3/Model/Utterance.cs deleted file mode 100644 index 5a7c0c71a..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/Utterance.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// An utterance for the input of the general-purpose endpoint. - /// - public class Utterance - { - /// - /// An utterance contributed by a user in the conversation that is to be analyzed. The utterance can contain - /// multiple sentences. - /// - [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)] - public string Text { get; set; } - /// - /// A string that identifies the user who contributed the utterance specified by the `text` parameter. - /// - [JsonProperty("user", NullValueHandling = NullValueHandling.Ignore)] - public string User { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/Utterance.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/Utterance.cs.meta deleted file mode 100644 index 2af96c48d..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/Utterance.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 743fb05dcf8bf4d4684334bd9c2e9a67 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalyses.cs b/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalyses.cs deleted file mode 100644 index 16c36b9c3..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalyses.cs +++ /dev/null @@ -1,40 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// The results of the analysis for the utterances of the input content. - /// - public class UtteranceAnalyses - { - /// - /// An array of `UtteranceAnalysis` objects that provides the results for each utterance of the input. - /// - [JsonProperty("utterances_tone", NullValueHandling = NullValueHandling.Ignore)] - public List UtterancesTone { get; set; } - /// - /// **`2017-09-21`:** A warning message if the content contains more than 50 utterances. The service analyzes - /// only the first 50 utterances. **`2016-05-19`:** Not returned. - /// - [JsonProperty("warning", NullValueHandling = NullValueHandling.Ignore)] - public string Warning { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalyses.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalyses.cs.meta deleted file mode 100644 index d2410e220..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalyses.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a3a7139ae69412a44a413a25a73cc8e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalysis.cs b/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalysis.cs deleted file mode 100644 index a3f818804..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalysis.cs +++ /dev/null @@ -1,53 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.ToneAnalyzer.V3.Model -{ - /// - /// The results of the analysis for an utterance of the input content. - /// - public class UtteranceAnalysis - { - /// - /// The unique identifier of the utterance. The first utterance has ID 0, and the ID of each subsequent - /// utterance is incremented by one. - /// - [JsonProperty("utterance_id", NullValueHandling = NullValueHandling.Ignore)] - public long? UtteranceId { get; set; } - /// - /// The text of the utterance. - /// - [JsonProperty("utterance_text", NullValueHandling = NullValueHandling.Ignore)] - public string UtteranceText { get; set; } - /// - /// An array of `ToneChatScore` objects that provides results for the most prevalent tones of the utterance. The - /// array includes results for any tone whose score is at least 0.5. The array is empty if no tone has a score - /// that meets this threshold. - /// - [JsonProperty("tones", NullValueHandling = NullValueHandling.Ignore)] - public List Tones { get; set; } - /// - /// **`2017-09-21`:** An error message if the utterance contains more than 500 characters. The service does not - /// analyze the utterance. **`2016-05-19`:** Not returned. - /// - [JsonProperty("error", NullValueHandling = NullValueHandling.Ignore)] - public string Error { get; set; } - } -} diff --git a/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalysis.cs.meta b/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalysis.cs.meta deleted file mode 100644 index 8c92a10b0..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/Model/UtteranceAnalysis.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c1ee936fe9fbbe48b8ee9d17f0c0438 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/ToneAnalyzer/V3/ToneAnalyzerService.cs b/Scripts/Services/ToneAnalyzer/V3/ToneAnalyzerService.cs deleted file mode 100644 index 1a2a1c3d4..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/ToneAnalyzerService.cs +++ /dev/null @@ -1,364 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -/** -* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-a45d89ef-20201209-153452 -*/ - -using System.Collections.Generic; -using System.Text; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Connection; -using IBM.Cloud.SDK.Utilities; -using IBM.Watson.ToneAnalyzer.V3.Model; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using UnityEngine.Networking; - -namespace IBM.Watson.ToneAnalyzer.V3 -{ - public partial class ToneAnalyzerService : BaseService - { - private const string defaultServiceName = "tone_analyzer"; - private const string defaultServiceUrl = "https://api.us-south.tone-analyzer.watson.cloud.ibm.com"; - - #region Version - private string version; - /// - /// Gets and sets the version of the service. - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current - /// version is `2017-09-21`. - /// - public string Version - { - get { return version; } - set { version = value; } - } - #endregion - - #region DisableSslVerification - private bool disableSslVerification = false; - /// - /// Gets and sets the option to disable ssl verification - /// - public bool DisableSslVerification - { - get { return disableSslVerification; } - set { disableSslVerification = value; } - } - #endregion - - /// - /// ToneAnalyzerService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2017-09-21`. - public ToneAnalyzerService(string version) : this(version, defaultServiceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(defaultServiceName)) {} - - /// - /// ToneAnalyzerService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2017-09-21`. - /// The service authenticator. - public ToneAnalyzerService(string version, Authenticator authenticator) : this(version, defaultServiceName, authenticator) {} - - /// - /// ToneAnalyzerService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2017-09-21`. - /// The service name to be used when configuring the client instance - public ToneAnalyzerService(string version, string serviceName) : this(version, serviceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(serviceName)) {} - - /// - /// ToneAnalyzerService constructor. - /// - /// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD - /// format. The current version is `2017-09-21`. - /// The service name to be used when configuring the client instance - /// The service authenticator. - public ToneAnalyzerService(string version, string serviceName, Authenticator authenticator) : base(authenticator, serviceName) - { - Authenticator = authenticator; - - if (string.IsNullOrEmpty(version)) - { - throw new ArgumentNullException("`version` is required"); - } - else - { - Version = version; - } - - if (string.IsNullOrEmpty(GetServiceUrl())) - { - SetServiceUrl(defaultServiceUrl); - } - } - - /// - /// Analyze general tone. - /// - /// Use the general-purpose endpoint to analyze the tone of your input content. The service analyzes the content - /// for emotional and language tones. The method always analyzes the tone of the full document; by default, it - /// also analyzes the tone of each individual sentence of the content. - /// - /// You can submit no more than 128 KB of total input content and no more than 1000 individual sentences in - /// JSON, plain text, or HTML format. The service analyzes the first 1000 sentences for document-level analysis - /// and only the first 100 sentences for sentence-level analysis. - /// - /// Per the JSON specification, the default character encoding for JSON content is effectively always UTF-8; per - /// the HTTP specification, the default encoding for plain text and HTML is ISO-8859-1 (effectively, the ASCII - /// character set). When specifying a content type of plain text or HTML, include the `charset` parameter to - /// indicate the character encoding of the input text; for example: `Content-Type: text/plain;charset=utf-8`. - /// For `text/html`, the service removes HTML tags and analyzes only the textual content. - /// - /// **See also:** [Using the general-purpose - /// endpoint](https://cloud.ibm.com/docs/tone-analyzer?topic=tone-analyzer-utgpe#utgpe). - /// - /// The callback function that is invoked when the operation completes. - /// JSON, plain text, or HTML input that contains the content to be analyzed. For JSON - /// input, provide an object of type `ToneInput`. - /// The type of the input. A character encoding can be specified by including a - /// `charset` parameter. For example, 'text/plain;charset=utf-8'. (optional) - /// Indicates whether the service is to return an analysis of each individual sentence - /// in addition to its analysis of the full document. If `true` (the default), the service returns results for - /// each sentence. (optional, default to true) - /// **`2017-09-21`:** Deprecated. The service continues to accept the parameter for - /// backward-compatibility, but the parameter no longer affects the response. - /// - /// **`2016-05-19`:** A comma-separated list of tones for which the service is to return its analysis of the - /// input; the indicated tones apply both to the full document and to individual sentences of the document. You - /// can specify one or more of the valid values. Omit the parameter to request results for all three tones. - /// (optional) - /// The language of the input text for the request: English or French. Regional - /// variants are treated as their parent language; for example, `en-US` is interpreted as `en`. The input - /// content must match the specified language. Do not submit content that contains both languages. You can use - /// different languages for **Content-Language** and **Accept-Language**. - /// * **`2017-09-21`:** Accepts `en` or `fr`. - /// * **`2016-05-19`:** Accepts only `en`. (optional, default to en) - /// The desired language of the response. For two-character arguments, regional - /// variants are treated as their parent language; for example, `en-US` is interpreted as `en`. You can use - /// different languages for **Content-Language** and **Accept-Language**. (optional, default to en) - /// ToneAnalysis - public bool Tone(Callback callback, System.IO.MemoryStream toneInput, string contentType = null, bool? sentences = null, List tones = null, string contentLanguage = null, string acceptLanguage = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `Tone`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (toneInput == null) - throw new ArgumentNullException("`toneInput` is required for `Tone`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("tone_analyzer", "V3", "Tone")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (sentences != null) - { - req.Parameters["sentences"] = (bool)sentences ? "true" : "false"; - } - if (tones != null && tones.Count > 0) - { - req.Parameters["tones"] = string.Join(",", tones.ToArray()); - } - req.Headers["Accept"] = "application/json"; - - if (!string.IsNullOrEmpty(contentType)) - { - req.Headers["Content-Type"] = contentType; - } - - if (!string.IsNullOrEmpty(contentLanguage)) - { - req.Headers["Content-Language"] = contentLanguage; - } - - if (!string.IsNullOrEmpty(acceptLanguage)) - { - req.Headers["Accept-Language"] = acceptLanguage; - } - req.Send = toneInput.ToArray(); - - req.OnResponse = OnToneResponse; - - Connector.URL = GetServiceUrl() + "/v3/tone"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnToneResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("ToneAnalyzerService.OnToneResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Analyze customer-engagement tone. - /// - /// Use the customer-engagement endpoint to analyze the tone of customer service and customer support - /// conversations. For each utterance of a conversation, the method reports the most prevalent subset of the - /// following seven tones: sad, frustrated, satisfied, excited, polite, impolite, and sympathetic. - /// - /// If you submit more than 50 utterances, the service returns a warning for the overall content and analyzes - /// only the first 50 utterances. If you submit a single utterance that contains more than 500 characters, the - /// service returns an error for that utterance and does not analyze the utterance. The request fails if all - /// utterances have more than 500 characters. Per the JSON specification, the default character encoding for - /// JSON content is effectively always UTF-8. - /// - /// **See also:** [Using the customer-engagement - /// endpoint](https://cloud.ibm.com/docs/tone-analyzer?topic=tone-analyzer-utco#utco). - /// - /// The callback function that is invoked when the operation completes. - /// An array of `Utterance` objects that provides the input content that the service is - /// to analyze. - /// The language of the input text for the request: English or French. Regional - /// variants are treated as their parent language; for example, `en-US` is interpreted as `en`. The input - /// content must match the specified language. Do not submit content that contains both languages. You can use - /// different languages for **Content-Language** and **Accept-Language**. - /// * **`2017-09-21`:** Accepts `en` or `fr`. - /// * **`2016-05-19`:** Accepts only `en`. (optional, default to en) - /// The desired language of the response. For two-character arguments, regional - /// variants are treated as their parent language; for example, `en-US` is interpreted as `en`. You can use - /// different languages for **Content-Language** and **Accept-Language**. (optional, default to en) - /// UtteranceAnalyses - public bool ToneChat(Callback callback, List utterances, string contentLanguage = null, string acceptLanguage = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ToneChat`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (utterances == null) - throw new ArgumentNullException("`utterances` is required for `ToneChat`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("tone_analyzer", "V3", "ToneChat")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - - if (!string.IsNullOrEmpty(contentLanguage)) - { - req.Headers["Content-Language"] = contentLanguage; - } - - if (!string.IsNullOrEmpty(acceptLanguage)) - { - req.Headers["Accept-Language"] = acceptLanguage; - } - - JObject bodyObject = new JObject(); - if (utterances != null && utterances.Count > 0) - bodyObject["utterances"] = JToken.FromObject(utterances); - req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject)); - - req.OnResponse = OnToneChatResponse; - - Connector.URL = GetServiceUrl() + "/v3/tone_chat"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnToneChatResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("ToneAnalyzerService.OnToneChatResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - } -} \ No newline at end of file diff --git a/Scripts/Services/ToneAnalyzer/V3/ToneAnalyzerService.cs.meta b/Scripts/Services/ToneAnalyzer/V3/ToneAnalyzerService.cs.meta deleted file mode 100644 index 57d0b32c9..000000000 --- a/Scripts/Services/ToneAnalyzer/V3/ToneAnalyzerService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cf2d85d1f03544740af90359ada34c16 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition.meta b/Scripts/Services/VisualRecognition.meta deleted file mode 100644 index b32f7de9d..000000000 --- a/Scripts/Services/VisualRecognition.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5632266fe4ba9b54da6d33ff6943ed38 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3.meta b/Scripts/Services/VisualRecognition/V3.meta deleted file mode 100644 index 885da29cf..000000000 --- a/Scripts/Services/VisualRecognition/V3.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1c7d317aa84b6474bacb477c1cbf5ea0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model.meta b/Scripts/Services/VisualRecognition/V3/Model.meta deleted file mode 100644 index 226defc7b..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 34e1efa211d101548aac4228e3f247fb -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/ClassResult.cs b/Scripts/Services/VisualRecognition/V3/Model/ClassResult.cs deleted file mode 100644 index d9279203e..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ClassResult.cs +++ /dev/null @@ -1,50 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V3.Model -{ - /// - /// Result of a class within a classifier. - /// - public class ClassResult - { - /// - /// Name of the class. - /// - /// Class names are translated in the language defined by the **Accept-Language** request header for the - /// build-in classifier IDs (`default`, `food`, and `explicit`). Class names of custom classifiers are not - /// translated. The response might not be in the specified language when the requested language is not supported - /// or when there is no translation for the class name. - /// - [JsonProperty("class", NullValueHandling = NullValueHandling.Ignore)] - public string _Class { get; set; } - /// - /// Confidence score for the property in the range of 0 to 1. A higher score indicates greater likelihood that - /// the class is depicted in the image. The default threshold for returning scores from a classifier is 0.5. - /// - [JsonProperty("score", NullValueHandling = NullValueHandling.Ignore)] - public float? Score { get; set; } - /// - /// Knowledge graph of the property. For example, `/fruit/pome/apple/eating apple/Granny Smith`. Included only - /// if identified. - /// - [JsonProperty("type_hierarchy", NullValueHandling = NullValueHandling.Ignore)] - public string TypeHierarchy { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V3/Model/ClassResult.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/ClassResult.cs.meta deleted file mode 100644 index db6f2282a..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ClassResult.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6255b534f418af84ca1f69f4dc5e200e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImage.cs b/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImage.cs deleted file mode 100644 index ca7916439..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImage.cs +++ /dev/null @@ -1,55 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V3.Model -{ - /// - /// Results for one image. - /// - public class ClassifiedImage - { - /// - /// Source of the image before any redirects. Not returned when the image is uploaded. - /// - [JsonProperty("source_url", NullValueHandling = NullValueHandling.Ignore)] - public string SourceUrl { get; set; } - /// - /// Fully resolved URL of the image after redirects are followed. Not returned when the image is uploaded. - /// - [JsonProperty("resolved_url", NullValueHandling = NullValueHandling.Ignore)] - public string ResolvedUrl { get; set; } - /// - /// Relative path of the image file if uploaded directly. Not returned when the image is passed by URL. - /// - [JsonProperty("image", NullValueHandling = NullValueHandling.Ignore)] - public string Image { get; set; } - /// - /// Information about what might have caused a failure, such as an image that is too large. Not returned when - /// there is no error. - /// - [JsonProperty("error", NullValueHandling = NullValueHandling.Ignore)] - public ErrorInfo Error { get; set; } - /// - /// The classifiers. - /// - [JsonProperty("classifiers", NullValueHandling = NullValueHandling.Ignore)] - public List Classifiers { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImage.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImage.cs.meta deleted file mode 100644 index 483af5603..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 14d855687724a8e4eb5677fc64d2e982 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImages.cs b/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImages.cs deleted file mode 100644 index 11abbe6c1..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImages.cs +++ /dev/null @@ -1,51 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V3.Model -{ - /// - /// Results for all images. - /// - public class ClassifiedImages - { - /// - /// Number of custom classes identified in the images. - /// - [JsonProperty("custom_classes", NullValueHandling = NullValueHandling.Ignore)] - public long? CustomClasses { get; set; } - /// - /// Number of images processed for the API call. - /// - [JsonProperty("images_processed", NullValueHandling = NullValueHandling.Ignore)] - public long? ImagesProcessed { get; set; } - /// - /// Classified images. - /// - [JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)] - public List Images { get; set; } - /// - /// Information about what might cause less than optimal output. For example, a request sent with a corrupt .zip - /// file and a list of image URLs will still complete, but does not return the expected output. Not returned - /// when there is no warning. - /// - [JsonProperty("warnings", NullValueHandling = NullValueHandling.Ignore)] - public List Warnings { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImages.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImages.cs.meta deleted file mode 100644 index 16334a1c9..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ClassifiedImages.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d8c8f618615e6df45b4bb7b1dbf5b858 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/Classifier.cs b/Scripts/Services/VisualRecognition/V3/Model/Classifier.cs deleted file mode 100644 index 6dbd4538d..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/Classifier.cs +++ /dev/null @@ -1,107 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.VisualRecognition.V3.Model -{ - /// - /// Information about a classifier. - /// - public class Classifier - { - /// - /// Training status of classifier. - /// - public class StatusValue - { - /// - /// Constant READY for ready - /// - public const string READY = "ready"; - /// - /// Constant TRAINING for training - /// - public const string TRAINING = "training"; - /// - /// Constant RETRAINING for retraining - /// - public const string RETRAINING = "retraining"; - /// - /// Constant FAILED for failed - /// - public const string FAILED = "failed"; - - } - - /// - /// Training status of classifier. - /// Constants for possible values can be found using Classifier.StatusValue - /// - [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] - public string Status { get; set; } - /// - /// ID of a classifier identified in the image. - /// - [JsonProperty("classifier_id", NullValueHandling = NullValueHandling.Ignore)] - public string ClassifierId { get; set; } - /// - /// Name of the classifier. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// Unique ID of the account who owns the classifier. Might not be returned by some requests. - /// - [JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)] - public string Owner { get; set; } - /// - /// Whether the classifier can be downloaded as a Core ML model after the training status is `ready`. - /// - [JsonProperty("core_ml_enabled", NullValueHandling = NullValueHandling.Ignore)] - public bool? CoreMlEnabled { get; set; } - /// - /// If classifier training has failed, this field might explain why. - /// - [JsonProperty("explanation", NullValueHandling = NullValueHandling.Ignore)] - public string Explanation { get; set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that the classifier was created. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Created { get; set; } - /// - /// Classes that define a classifier. - /// - [JsonProperty("classes", NullValueHandling = NullValueHandling.Ignore)] - public List Classes { get; set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that the classifier was updated. Might not be returned by - /// some requests. Identical to `updated` and retained for backward compatibility. - /// - [JsonProperty("retrained", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Retrained { get; set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that the classifier was most recently updated. The field - /// matches either `retrained` or `created`. Might not be returned by some requests. - /// - [JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Updated { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V3/Model/Classifier.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/Classifier.cs.meta deleted file mode 100644 index 513220e69..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/Classifier.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 99c21cc59343cee4680ea1940093e743 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/ClassifierResult.cs b/Scripts/Services/VisualRecognition/V3/Model/ClassifierResult.cs deleted file mode 100644 index 74c021e64..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ClassifierResult.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V3.Model -{ - /// - /// Classifier and score combination. - /// - public class ClassifierResult - { - /// - /// Name of the classifier. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// ID of a classifier identified in the image. - /// - [JsonProperty("classifier_id", NullValueHandling = NullValueHandling.Ignore)] - public string ClassifierId { get; set; } - /// - /// Classes within the classifier. - /// - [JsonProperty("classes", NullValueHandling = NullValueHandling.Ignore)] - public List Classes { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V3/Model/ClassifierResult.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/ClassifierResult.cs.meta deleted file mode 100644 index df724c1c0..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ClassifierResult.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8582f9c3febdc7a4cad7a9f1c2b165e8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/Classifiers.cs b/Scripts/Services/VisualRecognition/V3/Model/Classifiers.cs deleted file mode 100644 index 1b8c8ee9e..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/Classifiers.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V3.Model -{ - /// - /// A container for the list of classifiers. - /// - public class Classifiers - { - /// - /// List of classifiers. - /// - [JsonProperty("classifiers", NullValueHandling = NullValueHandling.Ignore)] - public List _Classifiers { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V3/Model/Classifiers.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/Classifiers.cs.meta deleted file mode 100644 index f4211b4d7..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/Classifiers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 495e52b40e97d004bbb8473a70288e45 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/ErrorInfo.cs b/Scripts/Services/VisualRecognition/V3/Model/ErrorInfo.cs deleted file mode 100644 index d549c2bef..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ErrorInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V3.Model -{ - /// - /// Information about what might have caused a failure, such as an image that is too large. Not returned when there - /// is no error. - /// - public class ErrorInfo - { - /// - /// HTTP status code. - /// - [JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)] - public long? Code { get; set; } - /// - /// Human-readable error description. For example, `File size limit exceeded`. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - /// - /// Codified error string. For example, `limit_exceeded`. - /// - [JsonProperty("error_id", NullValueHandling = NullValueHandling.Ignore)] - public string ErrorId { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V3/Model/ErrorInfo.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/ErrorInfo.cs.meta deleted file mode 100644 index db8cdf270..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ErrorInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8245e08a5aac5f14e94bfb5d1b6ac95f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/ModelClass.cs b/Scripts/Services/VisualRecognition/V3/Model/ModelClass.cs deleted file mode 100644 index 40c00d40c..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ModelClass.cs +++ /dev/null @@ -1,33 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V3.Model -{ - /// - /// A category within a classifier. - /// - public class ModelClass - { - /// - /// The name of the class. - /// - [JsonProperty("class", NullValueHandling = NullValueHandling.Ignore)] - public string _Class { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V3/Model/ModelClass.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/ModelClass.cs.meta deleted file mode 100644 index 0fb6c227b..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/ModelClass.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4bb457b5f706ff44096a9b7d26d03ad2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/Model/WarningInfo.cs.meta b/Scripts/Services/VisualRecognition/V3/Model/WarningInfo.cs.meta deleted file mode 100644 index 255f105cc..000000000 --- a/Scripts/Services/VisualRecognition/V3/Model/WarningInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5ac444fe117435545bd252c4e8ab74a4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V3/VisualRecognitionService.cs b/Scripts/Services/VisualRecognition/V3/VisualRecognitionService.cs deleted file mode 100644 index 2a85daab4..000000000 --- a/Scripts/Services/VisualRecognition/V3/VisualRecognitionService.cs +++ /dev/null @@ -1,854 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -/** -* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-a45d89ef-20201209-153452 -*/ - -using System.Collections.Generic; -using System.Text; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Connection; -using IBM.Cloud.SDK.Utilities; -using IBM.Watson.VisualRecognition.V3.Model; -using Newtonsoft.Json; -using System; -using UnityEngine.Networking; - -namespace IBM.Watson.VisualRecognition.V3 -{ - [System.Obsolete("On 1 December 2021, Visual Recognition will no longer be available. " + - "For more information, see Visual Recognition Deprecation " + - "(https://github.com/watson-developer-cloud/unity-sdk/tree/master#visual-recognition-deprecation).")] - public partial class VisualRecognitionService : BaseService - { - private const string defaultServiceName = "visual_recognition"; - private const string defaultServiceUrl = "https://api.us-south.visual-recognition.watson.cloud.ibm.com"; - - #region Version - private string version; - /// - /// Gets and sets the version of the service. - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is - /// `2018-03-19`. - /// - public string Version - { - get { return version; } - set { version = value; } - } - #endregion - - #region DisableSslVerification - private bool disableSslVerification = false; - /// - /// Gets and sets the option to disable ssl verification - /// - public bool DisableSslVerification - { - get { return disableSslVerification; } - set { disableSslVerification = value; } - } - #endregion - - /// - /// VisualRecognitionService constructor. - /// - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2018-03-19`. - public VisualRecognitionService(string version) : this(version, defaultServiceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(defaultServiceName)) {} - - /// - /// VisualRecognitionService constructor. - /// - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2018-03-19`. - /// The service authenticator. - public VisualRecognitionService(string version, Authenticator authenticator) : this(version, defaultServiceName, authenticator) {} - - /// - /// VisualRecognitionService constructor. - /// - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2018-03-19`. - /// The service name to be used when configuring the client instance - public VisualRecognitionService(string version, string serviceName) : this(version, serviceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(serviceName)) {} - - /// - /// VisualRecognitionService constructor. - /// - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2018-03-19`. - /// The service name to be used when configuring the client instance - /// The service authenticator. - public VisualRecognitionService(string version, string serviceName, Authenticator authenticator) : base(authenticator, serviceName) - { - Authenticator = authenticator; - - if (string.IsNullOrEmpty(version)) - { - throw new ArgumentNullException("`version` is required"); - } - else - { - Version = version; - } - - if (string.IsNullOrEmpty(GetServiceUrl())) - { - SetServiceUrl(defaultServiceUrl); - } - } - - /// - /// Classify images. - /// - /// Classify images with built-in or custom classifiers. - /// - /// The callback function that is invoked when the operation completes. - /// An image file (.gif, .jpg, .png, .tif) or .zip file with images. Maximum image size - /// is 10 MB. Include no more than 20 images and limit the .zip file to 100 MB. Encode the image and .zip file - /// names in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters - /// non-ASCII characters. - /// - /// You can also include an image with the **url** parameter. (optional) - /// The filename for imagesFile. (optional) - /// The content type of imagesFile. (optional) - /// The URL of an image (.gif, .jpg, .png, .tif) to analyze. The minimum recommended pixel - /// density is 32X32 pixels, but the service tends to perform better with images that are at least 224 x 224 - /// pixels. The maximum image size is 10 MB. - /// - /// You can also include images with the **images_file** parameter. (optional) - /// The minimum score a class must have to be displayed in the response. Set the - /// threshold to `0.0` to return all identified classes. (optional) - /// The categories of classifiers to apply. The **classifier_ids** parameter overrides - /// **owners**, so make sure that **classifier_ids** is empty. - /// - Use `IBM` to classify against the `default` general classifier. You get the same result if both - /// **classifier_ids** and **owners** parameters are empty. - /// - Use `me` to classify against all your custom classifiers. However, for better performance use - /// **classifier_ids** to specify the specific custom classifiers to apply. - /// - Use both `IBM` and `me` to analyze the image against both classifier categories. (optional) - /// Which classifiers to apply. Overrides the **owners** parameter. You can specify - /// both custom and built-in classifier IDs. The built-in `default` classifier is used if both - /// **classifier_ids** and **owners** parameters are empty. - /// - /// The following built-in classifier IDs require no training: - /// - `default`: Returns classes from thousands of general tags. - /// - `food`: Enhances specificity and accuracy for images of food items. - /// - `explicit`: Evaluates whether the image might be pornographic. (optional) - /// The desired language of parts of the response. See the response for details. - /// (optional, default to en) - /// ClassifiedImages - public bool Classify(Callback callback, System.IO.MemoryStream imagesFile = null, string imagesFilename = null, string imagesFileContentType = null, string url = null, float? threshold = null, List owners = null, List classifierIds = null, string acceptLanguage = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `Classify`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V3", "Classify")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (imagesFile != null) - { - req.Forms["images_file"] = new RESTConnector.Form(imagesFile, imagesFilename, imagesFileContentType); - } - if (!string.IsNullOrEmpty(url)) - { - req.Forms["url"] = new RESTConnector.Form(url); - } - if (threshold != null) - { - req.Forms["threshold"] = new RESTConnector.Form(threshold.ToString()); - } - if (owners != null && owners.Count > 0) - { - req.Forms["owners"] = new RESTConnector.Form(string.Join(", ", owners.ToArray())); - } - if (classifierIds != null && classifierIds.Count > 0) - { - req.Forms["classifier_ids"] = new RESTConnector.Form(string.Join(", ", classifierIds.ToArray())); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnClassifyResponse; - - Connector.URL = GetServiceUrl() + "/v3/classify"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnClassifyResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnClassifyResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Create a classifier. - /// - /// Train a new multi-faceted classifier on the uploaded image data. Create your custom classifier with positive - /// or negative example training images. Include at least two sets of examples, either two positive example - /// files or one positive and one negative file. You can upload a maximum of 256 MB per call. - /// - /// **Tips when creating:** - /// - /// - If you set the **X-Watson-Learning-Opt-Out** header parameter to `true` when you create a classifier, the - /// example training images are not stored. Save your training images locally. For more information, see [Data - /// collection](#data-collection). - /// - /// - Encode all names in UTF-8 if they contain non-ASCII characters (.zip and image file names, and classifier - /// and class names). The service assumes UTF-8 encoding if it encounters non-ASCII characters. - /// - /// The callback function that is invoked when the operation completes. - /// The name of the new classifier. Encode special characters in UTF-8. - /// A dictionary that contains the value for each classname. The value is a .zip - /// file of images that depict the visual subject of a class in the new classifier. You can include more than - /// one positive example file in a call. - /// - /// Specify the parameter name by appending `_positive_examples` to the class name. For example, - /// `goldenretriever_positive_examples` creates the class **goldenretriever**. The string cannot contain the - /// following characters: ``$ * - { } \ | / ' " ` [ ]``. - /// - /// Include at least 10 images in .jpg or .png format. The minimum recommended image resolution is 32X32 pixels. - /// The maximum number of images is 10,000 images or 100 MB per .zip file. - /// - /// Encode special characters in the file name in UTF-8. - /// A .zip file of images that do not depict the visual subject of any of the - /// classes of the new classifier. Must contain a minimum of 10 images. - /// - /// Encode special characters in the file name in UTF-8. (optional) - /// The filename for negativeExamples. (optional) - /// Classifier - public bool CreateClassifier(Callback callback, string name, Dictionary positiveExamples, System.IO.MemoryStream negativeExamples = null, string negativeExamplesFilename = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `CreateClassifier`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(name)) - throw new ArgumentNullException("`name` is required for `CreateClassifier`"); - if (positiveExamples == null) - throw new ArgumentNullException("`positiveExamples` is required for `CreateClassifier`"); - if (positiveExamples.Count == 0) - throw new ArgumentException("`positiveExamples` must contain at least one dictionary entry"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V3", "CreateClassifier")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (!string.IsNullOrEmpty(name)) - { - req.Forms["name"] = new RESTConnector.Form(name); - } - if (positiveExamples != null && positiveExamples.Count > 0) - { - foreach (KeyValuePair entry in positiveExamples) - { - var partName = string.Format("{0}_positive_examples", entry.Key); - req.Forms[partName] = new RESTConnector.Form(entry.Value, entry.Key + ".zip", "application/octet-stream"); - } - } - if (negativeExamples != null) - { - req.Forms["negative_examples"] = new RESTConnector.Form(negativeExamples, negativeExamplesFilename, "application/octet-stream"); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnCreateClassifierResponse; - - Connector.URL = GetServiceUrl() + "/v3/classifiers"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnCreateClassifierResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnCreateClassifierResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Retrieve a list of classifiers. - /// - /// The callback function that is invoked when the operation completes. - /// Specify `true` to return details about the classifiers. Omit this parameter to return - /// a brief list of classifiers. (optional) - /// Classifiers - public bool ListClassifiers(Callback callback, bool? verbose = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ListClassifiers`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V3", "ListClassifiers")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (verbose != null) - { - req.Parameters["verbose"] = (bool)verbose ? "true" : "false"; - } - - req.OnResponse = OnListClassifiersResponse; - - Connector.URL = GetServiceUrl() + "/v3/classifiers"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnListClassifiersResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnListClassifiersResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Retrieve classifier details. - /// - /// Retrieve information about a custom classifier. - /// - /// The callback function that is invoked when the operation completes. - /// The ID of the classifier. - /// Classifier - public bool GetClassifier(Callback callback, string classifierId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetClassifier`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(classifierId)) - throw new ArgumentNullException("`classifierId` is required for `GetClassifier`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V3", "GetClassifier")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnGetClassifierResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v3/classifiers/{0}", classifierId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetClassifierResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnGetClassifierResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Update a classifier. - /// - /// Update a custom classifier by adding new positive or negative classes or by adding new images to existing - /// classes. You must supply at least one set of positive or negative examples. For details, see [Updating - /// custom - /// classifiers](https://cloud.ibm.com/docs/visual-recognition?topic=visual-recognition-customizing#updating-custom-classifiers). - /// - /// Encode all names in UTF-8 if they contain non-ASCII characters (.zip and image file names, and classifier - /// and class names). The service assumes UTF-8 encoding if it encounters non-ASCII characters. - /// - /// **Tips about retraining:** - /// - /// - You can't update the classifier if the **X-Watson-Learning-Opt-Out** header parameter was set to `true` - /// when the classifier was created. Training images are not stored in that case. Instead, create another - /// classifier. For more information, see [Data collection](#data-collection). - /// - /// - Don't make retraining calls on a classifier until the status is ready. When you submit retraining requests - /// in parallel, the last request overwrites the previous requests. The `retrained` property shows the last time - /// the classifier retraining finished. - /// - /// The callback function that is invoked when the operation completes. - /// The ID of the classifier. - /// A dictionary that contains the value for each classname. The value is a .zip - /// file of images that depict the visual subject of a class in the classifier. The positive examples create or - /// update classes in the classifier. You can include more than one positive example file in a call. - /// - /// Specify the parameter name by appending `_positive_examples` to the class name. For example, - /// `goldenretriever_positive_examples` creates the class `goldenretriever`. The string cannot contain the - /// following characters: ``$ * - { } \ | / ' " ` [ ]``. - /// - /// Include at least 10 images in .jpg or .png format. The minimum recommended image resolution is 32X32 pixels. - /// The maximum number of images is 10,000 images or 100 MB per .zip file. - /// - /// Encode special characters in the file name in UTF-8. (optional) - /// A .zip file of images that do not depict the visual subject of any of the - /// classes of the new classifier. Must contain a minimum of 10 images. - /// - /// Encode special characters in the file name in UTF-8. (optional) - /// The filename for negativeExamples. (optional) - /// Classifier - public bool UpdateClassifier(Callback callback, string classifierId, Dictionary positiveExamples = null, System.IO.MemoryStream negativeExamples = null, string negativeExamplesFilename = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `UpdateClassifier`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(classifierId)) - throw new ArgumentNullException("`classifierId` is required for `UpdateClassifier`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V3", "UpdateClassifier")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (positiveExamples != null && positiveExamples.Count > 0) - { - foreach (KeyValuePair entry in positiveExamples) - { - var partName = string.Format("{0}_positive_examples", entry.Key); - req.Forms[partName] = new RESTConnector.Form(entry.Value, entry.Key + ".zip", "application/octet-stream"); - } - } - if (negativeExamples != null) - { - req.Forms["negative_examples"] = new RESTConnector.Form(negativeExamples, negativeExamplesFilename, "application/octet-stream"); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnUpdateClassifierResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v3/classifiers/{0}", classifierId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnUpdateClassifierResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnUpdateClassifierResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Delete a classifier. - /// - /// The callback function that is invoked when the operation completes. - /// The ID of the classifier. - /// object - public bool DeleteClassifier(Callback callback, string classifierId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `DeleteClassifier`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(classifierId)) - throw new ArgumentNullException("`classifierId` is required for `DeleteClassifier`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbDELETE, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V3", "DeleteClassifier")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnDeleteClassifierResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v3/classifiers/{0}", classifierId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnDeleteClassifierResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnDeleteClassifierResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Retrieve a Core ML model of a classifier. - /// - /// Download a Core ML model file (.mlmodel) of a custom classifier that returns "core_ml_enabled": - /// true in the classifier details. - /// - /// The callback function that is invoked when the operation completes. - /// The ID of the classifier. - /// byte[] - public bool GetCoreMlModel(Callback callback, string classifierId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetCoreMlModel`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(classifierId)) - throw new ArgumentNullException("`classifierId` is required for `GetCoreMlModel`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V3", "GetCoreMlModel")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnGetCoreMlModelResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v3/classifiers/{0}/core_ml_model", classifierId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetCoreMlModelResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - response.Result = resp.Data; - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Delete labeled data. - /// - /// Deletes all data associated with a specified customer ID. The method has no effect if no data is associated - /// with the customer ID. - /// - /// You associate a customer ID with data by passing the `X-Watson-Metadata` header with a request that passes - /// data. For more information about personal data and customer IDs, see [Information - /// security](https://cloud.ibm.com/docs/visual-recognition?topic=visual-recognition-information-security). - /// - /// The callback function that is invoked when the operation completes. - /// The customer ID for which all data is to be deleted. - /// object - public bool DeleteUserData(Callback callback, string customerId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `DeleteUserData`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(customerId)) - throw new ArgumentNullException("`customerId` is required for `DeleteUserData`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbDELETE, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V3", "DeleteUserData")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(customerId)) - { - req.Parameters["customer_id"] = customerId; - } - - req.OnResponse = OnDeleteUserDataResponse; - - Connector.URL = GetServiceUrl() + "/v3/user_data"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnDeleteUserDataResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnDeleteUserDataResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - } -} \ No newline at end of file diff --git a/Scripts/Services/VisualRecognition/V3/VisualRecognitionService.cs.meta b/Scripts/Services/VisualRecognition/V3/VisualRecognitionService.cs.meta deleted file mode 100644 index cd190893d..000000000 --- a/Scripts/Services/VisualRecognition/V3/VisualRecognitionService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2b35b54bd38660e4a827f355919f46d8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4.meta b/Scripts/Services/VisualRecognition/V4.meta deleted file mode 100644 index 6eaae9942..000000000 --- a/Scripts/Services/VisualRecognition/V4.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 97f2602322ffe41c79fc4d582ea3c20e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model.meta b/Scripts/Services/VisualRecognition/V4/Model.meta deleted file mode 100644 index 69ac7260f..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9c303c62f8964486da67eaaf010014f8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/AnalyzeResponse.cs b/Scripts/Services/VisualRecognition/V4/Model/AnalyzeResponse.cs deleted file mode 100644 index 87c8546c6..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/AnalyzeResponse.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Results for all images. - /// - public class AnalyzeResponse - { - /// - /// Analyzed images. - /// - [JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)] - public List Images { get; set; } - /// - /// Information about what might cause less than optimal output. - /// - [JsonProperty("warnings", NullValueHandling = NullValueHandling.Ignore)] - public List Warnings { get; set; } - /// - /// A unique identifier of the request. Included only when an error or warning is returned. - /// - [JsonProperty("trace", NullValueHandling = NullValueHandling.Ignore)] - public string Trace { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/AnalyzeResponse.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/AnalyzeResponse.cs.meta deleted file mode 100644 index c28d30cad..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/AnalyzeResponse.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0dd805cb47c9433fac0c285480a96e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/Collection.cs b/Scripts/Services/VisualRecognition/V4/Model/Collection.cs deleted file mode 100644 index b97b14277..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Collection.cs +++ /dev/null @@ -1,64 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about a collection. - /// - public class Collection - { - /// - /// The identifier of the collection. - /// - [JsonProperty("collection_id", NullValueHandling = NullValueHandling.Ignore)] - public virtual string CollectionId { get; private set; } - /// - /// The name of the collection. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - /// - /// The description of the collection. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that the collection was created. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public virtual DateTime? Created { get; private set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that the collection was most recently updated. - /// - [JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)] - public virtual DateTime? Updated { get; private set; } - /// - /// Number of images in the collection. - /// - [JsonProperty("image_count", NullValueHandling = NullValueHandling.Ignore)] - public virtual long? ImageCount { get; private set; } - /// - /// Training status information for the collection. - /// - [JsonProperty("training_status", NullValueHandling = NullValueHandling.Ignore)] - public CollectionTrainingStatus TrainingStatus { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/Collection.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/Collection.cs.meta deleted file mode 100644 index a6aa5feba..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Collection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9d472723c9b5842ac8aad273020cf81b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/CollectionObjects.cs b/Scripts/Services/VisualRecognition/V4/Model/CollectionObjects.cs deleted file mode 100644 index f5299bf6a..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/CollectionObjects.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// The objects in a collection that are detected in an image. - /// - public class CollectionObjects - { - /// - /// The identifier of the collection. - /// - [JsonProperty("collection_id", NullValueHandling = NullValueHandling.Ignore)] - public string CollectionId { get; set; } - /// - /// The identified objects in a collection. - /// - [JsonProperty("objects", NullValueHandling = NullValueHandling.Ignore)] - public List Objects { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/CollectionObjects.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/CollectionObjects.cs.meta deleted file mode 100644 index 8463d7ba4..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/CollectionObjects.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 59805e22915c24058a103a1e2721e4d7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/CollectionTrainingStatus.cs b/Scripts/Services/VisualRecognition/V4/Model/CollectionTrainingStatus.cs deleted file mode 100644 index a1cbe2946..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/CollectionTrainingStatus.cs +++ /dev/null @@ -1,33 +0,0 @@ -/** -* (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. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Training status information for the collection. - /// - public class CollectionTrainingStatus - { - /// - /// Training status for the objects in the collection. - /// - [JsonProperty("objects", NullValueHandling = NullValueHandling.Ignore)] - public ObjectTrainingStatus Objects { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/CollectionTrainingStatus.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/CollectionTrainingStatus.cs.meta deleted file mode 100644 index dc2afe65b..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/CollectionTrainingStatus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6117ead2ebfc4ae4087476e66312c707 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/CollectionsList.cs b/Scripts/Services/VisualRecognition/V4/Model/CollectionsList.cs deleted file mode 100644 index 8e25a6a1e..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/CollectionsList.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// A container for the list of collections. - /// - public class CollectionsList - { - /// - /// The collections in this service instance. - /// - [JsonProperty("collections", NullValueHandling = NullValueHandling.Ignore)] - public List Collections { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/CollectionsList.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/CollectionsList.cs.meta deleted file mode 100644 index 4990a01db..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/CollectionsList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c21cc1fccd7744d148210633549ba786 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/DetectedObjects.cs b/Scripts/Services/VisualRecognition/V4/Model/DetectedObjects.cs deleted file mode 100644 index d17bbf38c..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/DetectedObjects.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Container for the list of collections that have objects detected in an image. - /// - public class DetectedObjects - { - /// - /// The collections with identified objects. - /// - [JsonProperty("collections", NullValueHandling = NullValueHandling.Ignore)] - public List Collections { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/DetectedObjects.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/DetectedObjects.cs.meta deleted file mode 100644 index 4c20aed3e..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/DetectedObjects.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8d556e5a9f023476b9cee4e4b7f9c288 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/Error.cs b/Scripts/Services/VisualRecognition/V4/Model/Error.cs deleted file mode 100644 index 9d375127a..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Error.cs +++ /dev/null @@ -1,77 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about an error. - /// - public class Error - { - /// - /// Identifier of the problem. - /// - public class CodeValue - { - /// - /// Constant INVALID_FIELD for invalid_field - /// - public const string INVALID_FIELD = "invalid_field"; - /// - /// Constant INVALID_HEADER for invalid_header - /// - public const string INVALID_HEADER = "invalid_header"; - /// - /// Constant INVALID_METHOD for invalid_method - /// - public const string INVALID_METHOD = "invalid_method"; - /// - /// Constant MISSING_FIELD for missing_field - /// - public const string MISSING_FIELD = "missing_field"; - /// - /// Constant SERVER_ERROR for server_error - /// - public const string SERVER_ERROR = "server_error"; - - } - - /// - /// Identifier of the problem. - /// Constants for possible values can be found using Error.CodeValue - /// - [JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)] - public string Code { get; set; } - /// - /// An explanation of the problem with possible solutions. - /// - [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] - public string Message { get; set; } - /// - /// A URL for more information about the solution. - /// - [JsonProperty("more_info", NullValueHandling = NullValueHandling.Ignore)] - public string MoreInfo { get; set; } - /// - /// Details about the specific area of the problem. - /// - [JsonProperty("target", NullValueHandling = NullValueHandling.Ignore)] - public ErrorTarget Target { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/Error.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/Error.cs.meta deleted file mode 100644 index b4de75e7a..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Error.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 261d3650a0e04405c949c2e588e2f3ce -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ErrorTarget.cs b/Scripts/Services/VisualRecognition/V4/Model/ErrorTarget.cs deleted file mode 100644 index 8799c67be..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ErrorTarget.cs +++ /dev/null @@ -1,59 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about the specific area of the problem. - /// - public class ErrorTarget - { - /// - /// The parameter or property that is the focus of the problem. - /// - public class TypeValue - { - /// - /// Constant FIELD for field - /// - public const string FIELD = "field"; - /// - /// Constant PARAMETER for parameter - /// - public const string PARAMETER = "parameter"; - /// - /// Constant HEADER for header - /// - public const string HEADER = "header"; - - } - - /// - /// The parameter or property that is the focus of the problem. - /// Constants for possible values can be found using ErrorTarget.TypeValue - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - /// - /// The property that is identified with the problem. - /// - [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] - public string Name { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ErrorTarget.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ErrorTarget.cs.meta deleted file mode 100644 index 7317db9db..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ErrorTarget.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 81127a959e3784f1a8ab8d4b925333ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/Image.cs b/Scripts/Services/VisualRecognition/V4/Model/Image.cs deleted file mode 100644 index a0652727f..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Image.cs +++ /dev/null @@ -1,49 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about an image. - /// - public class Image - { - /// - /// The source type of the image. - /// - [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] - public ImageSource Source { get; set; } - /// - /// Height and width of an image. - /// - [JsonProperty("dimensions", NullValueHandling = NullValueHandling.Ignore)] - public ImageDimensions Dimensions { get; set; } - /// - /// Container for the list of collections that have objects detected in an image. - /// - [JsonProperty("objects", NullValueHandling = NullValueHandling.Ignore)] - public DetectedObjects Objects { get; set; } - /// - /// A container for the problems in the request. - /// - [JsonProperty("errors", NullValueHandling = NullValueHandling.Ignore)] - public List Errors { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/Image.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/Image.cs.meta deleted file mode 100644 index eecfcae49..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Image.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7224026db8ed14b638b9c96176828c9a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageDetails.cs b/Scripts/Services/VisualRecognition/V4/Model/ImageDetails.cs deleted file mode 100644 index 542f59ffc..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageDetails.cs +++ /dev/null @@ -1,65 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2018, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about an image. - /// - public class ImageDetails - { - /// - /// The identifier of the image. - /// - [JsonProperty("image_id", NullValueHandling = NullValueHandling.Ignore)] - public string ImageId { get; set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that the image was most recently updated. - /// - [JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Updated { get; set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that the image was created. - /// - [JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Created { get; set; } - /// - /// The source type of the image. - /// - [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)] - public ImageSource Source { get; set; } - /// - /// Height and width of an image. - /// - [JsonProperty("dimensions", NullValueHandling = NullValueHandling.Ignore)] - public ImageDimensions Dimensions { get; set; } - /// - /// Details about the errors. - /// - [JsonProperty("errors", NullValueHandling = NullValueHandling.Ignore)] - public List Errors { get; set; } - /// - /// Training data for all objects. - /// - [JsonProperty("training_data", NullValueHandling = NullValueHandling.Ignore)] - public TrainingDataObjects TrainingData { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageDetails.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ImageDetails.cs.meta deleted file mode 100644 index b895f03aa..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageDetails.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d81711964681b45c5ad982d24e6b615b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageDetailsList.cs b/Scripts/Services/VisualRecognition/V4/Model/ImageDetailsList.cs deleted file mode 100644 index eaf4afd09..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageDetailsList.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// List of information about the images. - /// - public class ImageDetailsList - { - /// - /// The images in the collection. - /// - [JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)] - public List Images { get; set; } - /// - /// Information about what might cause less than optimal output. - /// - [JsonProperty("warnings", NullValueHandling = NullValueHandling.Ignore)] - public List Warnings { get; set; } - /// - /// A unique identifier of the request. Included only when an error or warning is returned. - /// - [JsonProperty("trace", NullValueHandling = NullValueHandling.Ignore)] - public string Trace { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageDetailsList.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ImageDetailsList.cs.meta deleted file mode 100644 index 250fcf934..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageDetailsList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c525f04f1b8114aa8a3fa75a372ea19b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageDimensions.cs b/Scripts/Services/VisualRecognition/V4/Model/ImageDimensions.cs deleted file mode 100644 index ca498669a..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageDimensions.cs +++ /dev/null @@ -1,38 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Height and width of an image. - /// - public class ImageDimensions - { - /// - /// Height in pixels of the image. - /// - [JsonProperty("height", NullValueHandling = NullValueHandling.Ignore)] - public long? Height { get; set; } - /// - /// Width in pixels of the image. - /// - [JsonProperty("width", NullValueHandling = NullValueHandling.Ignore)] - public long? Width { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageDimensions.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ImageDimensions.cs.meta deleted file mode 100644 index 7464e56a2..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageDimensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bdc0da5fb04694f78b5a955e17bba56a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageSource.cs b/Scripts/Services/VisualRecognition/V4/Model/ImageSource.cs deleted file mode 100644 index 6325743e8..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageSource.cs +++ /dev/null @@ -1,70 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// The source type of the image. - /// - public class ImageSource - { - /// - /// The source type of the image. - /// - public class TypeValue - { - /// - /// Constant FILE for file - /// - public const string FILE = "file"; - /// - /// Constant URL for url - /// - public const string URL = "url"; - - } - - /// - /// The source type of the image. - /// Constants for possible values can be found using ImageSource.TypeValue - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - /// - /// Name of the image file if uploaded. Not returned when the image is passed by URL. - /// - [JsonProperty("filename", NullValueHandling = NullValueHandling.Ignore)] - public string Filename { get; set; } - /// - /// Name of the .zip file of images if uploaded. Not returned when the image is passed directly or by URL. - /// - [JsonProperty("archive_filename", NullValueHandling = NullValueHandling.Ignore)] - public string ArchiveFilename { get; set; } - /// - /// Source of the image before any redirects. Not returned when the image is uploaded. - /// - [JsonProperty("source_url", NullValueHandling = NullValueHandling.Ignore)] - public string SourceUrl { get; set; } - /// - /// Fully resolved URL of the image after redirects are followed. Not returned when the image is uploaded. - /// - [JsonProperty("resolved_url", NullValueHandling = NullValueHandling.Ignore)] - public string ResolvedUrl { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageSource.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ImageSource.cs.meta deleted file mode 100644 index 038fe3d57..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageSource.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: db7b988a33c2f422c9f6ff262466b0a0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageSummary.cs b/Scripts/Services/VisualRecognition/V4/Model/ImageSummary.cs deleted file mode 100644 index 236868405..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageSummary.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Basic information about an image. - /// - public class ImageSummary - { - /// - /// The identifier of the image. - /// - [JsonProperty("image_id", NullValueHandling = NullValueHandling.Ignore)] - public string ImageId { get; set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that the image was most recently updated. - /// - [JsonProperty("updated", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? Updated { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageSummary.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ImageSummary.cs.meta deleted file mode 100644 index 67e6b63af..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageSummary.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ab5436c1f6dcc4e89a3362a8486c1df7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageSummaryList.cs b/Scripts/Services/VisualRecognition/V4/Model/ImageSummaryList.cs deleted file mode 100644 index a33cc4544..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageSummaryList.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// List of images. - /// - public class ImageSummaryList - { - /// - /// The images in the collection. - /// - [JsonProperty("images", NullValueHandling = NullValueHandling.Ignore)] - public List Images { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ImageSummaryList.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ImageSummaryList.cs.meta deleted file mode 100644 index 5ce208f03..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ImageSummaryList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2e1fdce12e5ff4249994bc0d78f31855 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/Location.cs b/Scripts/Services/VisualRecognition/V4/Model/Location.cs deleted file mode 100644 index ce8701984..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Location.cs +++ /dev/null @@ -1,48 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Defines the location of the bounding box around the object. - /// - public class Location - { - /// - /// Y-position of top-left pixel of the bounding box. - /// - [JsonProperty("top", NullValueHandling = NullValueHandling.Ignore)] - public long? Top { get; set; } - /// - /// X-position of top-left pixel of the bounding box. - /// - [JsonProperty("left", NullValueHandling = NullValueHandling.Ignore)] - public long? Left { get; set; } - /// - /// Width in pixels of of the bounding box. - /// - [JsonProperty("width", NullValueHandling = NullValueHandling.Ignore)] - public long? Width { get; set; } - /// - /// Height in pixels of the bounding box. - /// - [JsonProperty("height", NullValueHandling = NullValueHandling.Ignore)] - public long? Height { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/Location.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/Location.cs.meta deleted file mode 100644 index f2128b9de..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Location.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dd9cc9d49797c470999029e6d8de113e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectDetail.cs b/Scripts/Services/VisualRecognition/V4/Model/ObjectDetail.cs deleted file mode 100644 index 695e69199..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectDetail.cs +++ /dev/null @@ -1,44 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about an object in the collection. - /// - public class ObjectDetail - { - /// - /// The label for the object. - /// - [JsonProperty("object", NullValueHandling = NullValueHandling.Ignore)] - public string _Object { get; set; } - /// - /// Defines the location of the bounding box around the object. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public ObjectDetailLocation Location { get; set; } - /// - /// Confidence score for the object in the range of 0 to 1. A higher score indicates greater likelihood that the - /// object is depicted at this location in the image. - /// - [JsonProperty("score", NullValueHandling = NullValueHandling.Ignore)] - public float? Score { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectDetail.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ObjectDetail.cs.meta deleted file mode 100644 index a25b6006e..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectDetail.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: de067b2d9c60c40039d1772c6c76fcaf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectDetailLocation.cs b/Scripts/Services/VisualRecognition/V4/Model/ObjectDetailLocation.cs deleted file mode 100644 index c3f620e24..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectDetailLocation.cs +++ /dev/null @@ -1,48 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Defines the location of the bounding box around the object. - /// - public class ObjectDetailLocation - { - /// - /// Y-position of top-left pixel of the bounding box. - /// - [JsonProperty("top", NullValueHandling = NullValueHandling.Ignore)] - public long? Top { get; set; } - /// - /// X-position of top-left pixel of the bounding box. - /// - [JsonProperty("left", NullValueHandling = NullValueHandling.Ignore)] - public long? Left { get; set; } - /// - /// Width in pixels of of the bounding box. - /// - [JsonProperty("width", NullValueHandling = NullValueHandling.Ignore)] - public long? Width { get; set; } - /// - /// Height in pixels of the bounding box. - /// - [JsonProperty("height", NullValueHandling = NullValueHandling.Ignore)] - public long? Height { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectDetailLocation.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ObjectDetailLocation.cs.meta deleted file mode 100644 index 3ca5624b2..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectDetailLocation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 699f78901d1c18b4a9295d0231d2057c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadata.cs b/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadata.cs deleted file mode 100644 index de46739f2..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadata.cs +++ /dev/null @@ -1,38 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2018, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Basic information about an object. - /// - public class ObjectMetadata - { - /// - /// The name of the object. - /// - [JsonProperty("object", NullValueHandling = NullValueHandling.Ignore)] - public string _Object { get; set; } - /// - /// Number of bounding boxes with this object name in the collection. - /// - [JsonProperty("count", NullValueHandling = NullValueHandling.Ignore)] - public virtual long? Count { get; private set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadata.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadata.cs.meta deleted file mode 100644 index b9fd0d46c..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadata.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3f33bffcef3264fa98d2169ee2a94c5e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadataList.cs b/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadataList.cs deleted file mode 100644 index 346afdf28..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadataList.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2018, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// List of objects. - /// - public class ObjectMetadataList - { - /// - /// Number of unique named objects in the collection. - /// - [JsonProperty("object_count", NullValueHandling = NullValueHandling.Ignore)] - public virtual long? ObjectCount { get; private set; } - /// - /// The objects in the collection. - /// - [JsonProperty("objects", NullValueHandling = NullValueHandling.Ignore)] - public List Objects { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadataList.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadataList.cs.meta deleted file mode 100644 index 99dbc4710..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectMetadataList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 99b24a6ae3b77457a8f17967b7770fb5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectTrainingStatus.cs b/Scripts/Services/VisualRecognition/V4/Model/ObjectTrainingStatus.cs deleted file mode 100644 index f5a403d2a..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectTrainingStatus.cs +++ /dev/null @@ -1,59 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2018, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Training status for the objects in the collection. - /// - public class ObjectTrainingStatus - { - /// - /// Whether you can analyze images in the collection with the **objects** feature. - /// - [JsonProperty("ready", NullValueHandling = NullValueHandling.Ignore)] - public bool? Ready { get; set; } - /// - /// Whether training is in progress. - /// - [JsonProperty("in_progress", NullValueHandling = NullValueHandling.Ignore)] - public bool? InProgress { get; set; } - /// - /// Whether there are changes to the training data since the most recent training. - /// - [JsonProperty("data_changed", NullValueHandling = NullValueHandling.Ignore)] - public bool? DataChanged { get; set; } - /// - /// Whether the most recent training failed. - /// - [JsonProperty("latest_failed", NullValueHandling = NullValueHandling.Ignore)] - public bool? LatestFailed { get; set; } - /// - /// Whether the model can be downloaded after the training status is `ready`. - /// - [JsonProperty("rscnn_ready", NullValueHandling = NullValueHandling.Ignore)] - public bool? RscnnReady { get; set; } - /// - /// Details about the training. If training is in progress, includes information about the status. If training - /// is not in progress, includes a success message or information about why training failed. - /// - [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] - public string Description { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/ObjectTrainingStatus.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/ObjectTrainingStatus.cs.meta deleted file mode 100644 index 203a96aa0..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/ObjectTrainingStatus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a56739a4771c7451cab83fce02146016 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObject.cs b/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObject.cs deleted file mode 100644 index 9c8896180..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObject.cs +++ /dev/null @@ -1,38 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about the training data. - /// - public class TrainingDataObject - { - /// - /// The name of the object. - /// - [JsonProperty("object", NullValueHandling = NullValueHandling.Ignore)] - public string _Object { get; set; } - /// - /// Defines the location of the bounding box around the object. - /// - [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)] - public Location Location { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObject.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObject.cs.meta deleted file mode 100644 index 7512c8705..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ca4b62cf8c6a24bb99c9c1363e9ef287 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObjects.cs b/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObjects.cs deleted file mode 100644 index 045c62cb7..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObjects.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Training data for all objects. - /// - public class TrainingDataObjects - { - /// - /// Training data for specific objects. - /// - [JsonProperty("objects", NullValueHandling = NullValueHandling.Ignore)] - public List Objects { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObjects.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObjects.cs.meta deleted file mode 100644 index 1fc50cd1e..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingDataObjects.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c001910da99744443b8ae12b45bfca20 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingEvent.cs b/Scripts/Services/VisualRecognition/V4/Model/TrainingEvent.cs deleted file mode 100644 index c86a3a10a..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingEvent.cs +++ /dev/null @@ -1,84 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about the training event. - /// - public class TrainingEvent - { - /// - /// Trained object type. Only `objects` is currently supported. - /// - public class TypeValue - { - /// - /// Constant OBJECTS for objects - /// - public const string OBJECTS = "objects"; - - } - - /// - /// Training status of the training event. - /// - public class StatusValue - { - /// - /// Constant FAILED for failed - /// - public const string FAILED = "failed"; - /// - /// Constant SUCCEEDED for succeeded - /// - public const string SUCCEEDED = "succeeded"; - - } - - /// - /// Trained object type. Only `objects` is currently supported. - /// Constants for possible values can be found using TrainingEvent.TypeValue - /// - [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] - public string Type { get; set; } - /// - /// Training status of the training event. - /// Constants for possible values can be found using TrainingEvent.StatusValue - /// - [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] - public string Status { get; set; } - /// - /// Identifier of the trained collection. - /// - [JsonProperty("collection_id", NullValueHandling = NullValueHandling.Ignore)] - public string CollectionId { get; set; } - /// - /// Date and time in Coordinated Universal Time (UTC) that training on the collection finished. - /// - [JsonProperty("completion_time", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? CompletionTime { get; set; } - /// - /// The total number of images that were used in training for this training event. - /// - [JsonProperty("image_count", NullValueHandling = NullValueHandling.Ignore)] - public long? ImageCount { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingEvent.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/TrainingEvent.cs.meta deleted file mode 100644 index 091f81082..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 260eacd007d1c4b628a30da2ab1321d3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingEvents.cs b/Scripts/Services/VisualRecognition/V4/Model/TrainingEvents.cs deleted file mode 100644 index 3243938ba..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingEvents.cs +++ /dev/null @@ -1,57 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections.Generic; -using Newtonsoft.Json; -using System; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about the training events. - /// - public class TrainingEvents - { - /// - /// The starting day for the returned training events in Coordinated Universal Time (UTC). If not specified in - /// the request, it identifies the earliest training event. - /// - [JsonProperty("start_time", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? StartTime { get; set; } - /// - /// The ending day for the returned training events in Coordinated Universal Time (UTC). If not specified in the - /// request, it lists the current time. - /// - [JsonProperty("end_time", NullValueHandling = NullValueHandling.Ignore)] - public DateTime? EndTime { get; set; } - /// - /// The total number of training events in the response for the start and end times. - /// - [JsonProperty("completed_events", NullValueHandling = NullValueHandling.Ignore)] - public long? CompletedEvents { get; set; } - /// - /// The total number of images that were used in training for the start and end times. - /// - [JsonProperty("trained_images", NullValueHandling = NullValueHandling.Ignore)] - public long? TrainedImages { get; set; } - /// - /// The completed training events for the start and end time. - /// - [JsonProperty("events", NullValueHandling = NullValueHandling.Ignore)] - public List Events { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingEvents.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/TrainingEvents.cs.meta deleted file mode 100644 index 113139606..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingEvents.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 537b8bb7926c2449fa42337c46a4783f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingStatus.cs b/Scripts/Services/VisualRecognition/V4/Model/TrainingStatus.cs deleted file mode 100644 index ab2fbecb3..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingStatus.cs +++ /dev/null @@ -1,33 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Training status information for the collection. - /// - public class TrainingStatus - { - /// - /// Training status for the objects in the collection. - /// - [JsonProperty("objects", NullValueHandling = NullValueHandling.Ignore)] - public ObjectTrainingStatus Objects { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/TrainingStatus.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/TrainingStatus.cs.meta deleted file mode 100644 index 9ef40098d..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/TrainingStatus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ccb5d0e420a7446ad9aaab7917238bb9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/UpdateObjectMetadata.cs b/Scripts/Services/VisualRecognition/V4/Model/UpdateObjectMetadata.cs deleted file mode 100644 index cede69943..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/UpdateObjectMetadata.cs +++ /dev/null @@ -1,39 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2018, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Basic information about an updated object. - /// - public class UpdateObjectMetadata - { - /// - /// The updated name of the object. The name can contain alphanumeric, underscore, hyphen, space, and dot - /// characters. It cannot begin with the reserved prefix `sys-`. - /// - [JsonProperty("object", NullValueHandling = NullValueHandling.Ignore)] - public string _Object { get; set; } - /// - /// Number of bounding boxes in the collection with the updated object name. - /// - [JsonProperty("count", NullValueHandling = NullValueHandling.Ignore)] - public virtual long? Count { get; private set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/UpdateObjectMetadata.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/UpdateObjectMetadata.cs.meta deleted file mode 100644 index 0d790ef82..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/UpdateObjectMetadata.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0b179b550e4df43db86dd9198dd17735 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/Model/Warning.cs b/Scripts/Services/VisualRecognition/V4/Model/Warning.cs deleted file mode 100644 index fb3014415..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Warning.cs +++ /dev/null @@ -1,72 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using Newtonsoft.Json; - -namespace IBM.Watson.VisualRecognition.V4.Model -{ - /// - /// Details about a problem. - /// - public class Warning - { - /// - /// Identifier of the problem. - /// - public class CodeValue - { - /// - /// Constant INVALID_FIELD for invalid_field - /// - public const string INVALID_FIELD = "invalid_field"; - /// - /// Constant INVALID_HEADER for invalid_header - /// - public const string INVALID_HEADER = "invalid_header"; - /// - /// Constant INVALID_METHOD for invalid_method - /// - public const string INVALID_METHOD = "invalid_method"; - /// - /// Constant MISSING_FIELD for missing_field - /// - public const string MISSING_FIELD = "missing_field"; - /// - /// Constant SERVER_ERROR for server_error - /// - public const string SERVER_ERROR = "server_error"; - - } - - /// - /// Identifier of the problem. - /// Constants for possible values can be found using Warning.CodeValue - /// - [JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)] - public string Code { get; set; } - /// - /// An explanation of the problem with possible solutions. - /// - [JsonProperty("message", NullValueHandling = NullValueHandling.Ignore)] - public string Message { get; set; } - /// - /// A URL for more information about the solution. - /// - [JsonProperty("more_info", NullValueHandling = NullValueHandling.Ignore)] - public string MoreInfo { get; set; } - } -} diff --git a/Scripts/Services/VisualRecognition/V4/Model/Warning.cs.meta b/Scripts/Services/VisualRecognition/V4/Model/Warning.cs.meta deleted file mode 100644 index 8a2b710bb..000000000 --- a/Scripts/Services/VisualRecognition/V4/Model/Warning.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8510c565e381e40b4aaa9d90040c5c78 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Scripts/Services/VisualRecognition/V4/VisualRecognitionService.cs b/Scripts/Services/VisualRecognition/V4/VisualRecognitionService.cs deleted file mode 100644 index 619b383b0..000000000 --- a/Scripts/Services/VisualRecognition/V4/VisualRecognitionService.cs +++ /dev/null @@ -1,1808 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2019, 2021. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -/** -* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-a45d89ef-20201209-153452 -*/ - -using System.Collections.Generic; -using System.Text; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Connection; -using IBM.Cloud.SDK.Model; -using IBM.Cloud.SDK.Utilities; -using IBM.Watson.VisualRecognition.V4.Model; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using UnityEngine.Networking; - -namespace IBM.Watson.VisualRecognition.V4 -{ - [System.Obsolete("On 1 December 2021, Visual Recognition will no longer be available. " + - "For more information, see Visual Recognition Deprecation " + - "(https://github.com/watson-developer-cloud/unity-sdk/tree/master#visual-recognition-deprecation).")] - public partial class VisualRecognitionService : BaseService - { - private const string defaultServiceName = "visual_recognition"; - private const string defaultServiceUrl = "https://api.us-south.visual-recognition.watson.cloud.ibm.com"; - - #region Version - private string version; - /// - /// Gets and sets the version of the service. - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is - /// `2019-02-11`. - /// - public string Version - { - get { return version; } - set { version = value; } - } - #endregion - - #region DisableSslVerification - private bool disableSslVerification = false; - /// - /// Gets and sets the option to disable ssl verification - /// - public bool DisableSslVerification - { - get { return disableSslVerification; } - set { disableSslVerification = value; } - } - #endregion - - /// - /// VisualRecognitionService constructor. - /// - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2019-02-11`. - public VisualRecognitionService(string version) : this(version, defaultServiceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(defaultServiceName)) {} - - /// - /// VisualRecognitionService constructor. - /// - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2019-02-11`. - /// The service authenticator. - public VisualRecognitionService(string version, Authenticator authenticator) : this(version, defaultServiceName, authenticator) {} - - /// - /// VisualRecognitionService constructor. - /// - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2019-02-11`. - /// The service name to be used when configuring the client instance - public VisualRecognitionService(string version, string serviceName) : this(version, serviceName, ConfigBasedAuthenticatorFactory.GetAuthenticator(serviceName)) {} - - /// - /// VisualRecognitionService constructor. - /// - /// Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. - /// The current version is `2019-02-11`. - /// The service name to be used when configuring the client instance - /// The service authenticator. - public VisualRecognitionService(string version, string serviceName, Authenticator authenticator) : base(authenticator, serviceName) - { - Authenticator = authenticator; - - if (string.IsNullOrEmpty(version)) - { - throw new ArgumentNullException("`version` is required"); - } - else - { - Version = version; - } - - if (string.IsNullOrEmpty(GetServiceUrl())) - { - SetServiceUrl(defaultServiceUrl); - } - } - - /// - /// Analyze images. - /// - /// Analyze images by URL, by file, or both against your own collection. Make sure that - /// **training_status.objects.ready** is `true` for the feature before you use a collection to analyze images. - /// - /// Encode the image and .zip file names in UTF-8 if they contain non-ASCII characters. The service assumes - /// UTF-8 encoding if it encounters non-ASCII characters. - /// - /// The callback function that is invoked when the operation completes. - /// The IDs of the collections to analyze. - /// The features to analyze. - /// An array of image files (.jpg or .png) or .zip files with images. - /// - Include a maximum of 20 images in a request. - /// - Limit the .zip file to 100 MB. - /// - Limit each image file to 10 MB. - /// - /// You can also include an image with the **image_url** parameter. (optional) - /// An array of URLs of image files (.jpg or .png). - /// - Include a maximum of 20 images in a request. - /// - Limit each image file to 10 MB. - /// - Minimum width and height is 30 pixels, but the service tends to perform better with images that are at - /// least 300 x 300 pixels. Maximum is 5400 pixels for either height or width. - /// - /// You can also include images with the **images_file** parameter. (optional) - /// The minimum score a feature must have to be returned. (optional) - /// AnalyzeResponse - public bool Analyze(Callback callback, List collectionIds, List features, List imagesFile = null, List imageUrl = null, float? threshold = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `Analyze`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (collectionIds == null || collectionIds.Count == 0) - { - throw new ArgumentNullException("`collectionIds` is required for `Analyze`"); - } - if (features == null || features.Count == 0) - { - throw new ArgumentNullException("`features` is required for `Analyze`"); - } - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "Analyze")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (collectionIds != null) - { - foreach (string item in collectionIds) - { - req.Forms["collection_ids"] = new RESTConnector.Form(item); - } - } - if (features != null) - { - foreach (string item in features) - { - req.Forms["features"] = new RESTConnector.Form(item); - } - } - if (imagesFile != null) - { - foreach (FileWithMetadata item in imagesFile) - { - req.Forms["images_file"] = new RESTConnector.Form(item.Data, item.Filename, item.ContentType); - } - } - if (imageUrl != null) - { - foreach (string item in imageUrl) - { - req.Forms["image_url"] = new RESTConnector.Form(item); - } - } - if (threshold != null) - { - req.Forms["threshold"] = new RESTConnector.Form(threshold.ToString()); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnAnalyzeResponse; - - Connector.URL = GetServiceUrl() + "/v4/analyze"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnAnalyzeResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnAnalyzeResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Create a collection. - /// - /// Create a collection that can be used to store images. - /// - /// To create a collection without specifying a name and description, include an empty JSON object in the - /// request body. - /// - /// Encode the name and description in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 - /// encoding if it encounters non-ASCII characters. - /// - /// The callback function that is invoked when the operation completes. - /// The name of the collection. The name can contain alphanumeric, underscore, hyphen, and - /// dot characters. It cannot begin with the reserved prefix `sys-`. (optional) - /// The description of the collection. (optional) - /// Training status information for the collection. (optional) - /// Collection - public bool CreateCollection(Callback callback, string name = null, string description = null, TrainingStatus trainingStatus = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `CreateCollection`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "CreateCollection")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - - JObject bodyObject = new JObject(); - if (!string.IsNullOrEmpty(name)) - bodyObject["name"] = name; - if (!string.IsNullOrEmpty(description)) - bodyObject["description"] = description; - if (trainingStatus != null) - bodyObject["training_status"] = JToken.FromObject(trainingStatus); - req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject)); - - req.OnResponse = OnCreateCollectionResponse; - - Connector.URL = GetServiceUrl() + "/v4/collections"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnCreateCollectionResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnCreateCollectionResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// List collections. - /// - /// Retrieves a list of collections for the service instance. - /// - /// The callback function that is invoked when the operation completes. - /// CollectionsList - public bool ListCollections(Callback callback) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ListCollections`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "ListCollections")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnListCollectionsResponse; - - Connector.URL = GetServiceUrl() + "/v4/collections"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnListCollectionsResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnListCollectionsResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get collection details. - /// - /// Get details of one collection. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// Collection - public bool GetCollection(Callback callback, string collectionId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetCollection`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `GetCollection`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "GetCollection")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnGetCollectionResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}", collectionId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetCollectionResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnGetCollectionResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Update a collection. - /// - /// Update the name or description of a collection. - /// - /// Encode the name and description in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 - /// encoding if it encounters non-ASCII characters. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The name of the collection. The name can contain alphanumeric, underscore, hyphen, and - /// dot characters. It cannot begin with the reserved prefix `sys-`. (optional) - /// The description of the collection. (optional) - /// Training status information for the collection. (optional) - /// Collection - public bool UpdateCollection(Callback callback, string collectionId, string name = null, string description = null, TrainingStatus trainingStatus = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `UpdateCollection`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `UpdateCollection`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "UpdateCollection")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - - JObject bodyObject = new JObject(); - if (!string.IsNullOrEmpty(name)) - bodyObject["name"] = name; - if (!string.IsNullOrEmpty(description)) - bodyObject["description"] = description; - if (trainingStatus != null) - bodyObject["training_status"] = JToken.FromObject(trainingStatus); - req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject)); - - req.OnResponse = OnUpdateCollectionResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}", collectionId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnUpdateCollectionResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnUpdateCollectionResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Delete a collection. - /// - /// Delete a collection from the service instance. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// object - public bool DeleteCollection(Callback callback, string collectionId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `DeleteCollection`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `DeleteCollection`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbDELETE, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "DeleteCollection")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnDeleteCollectionResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}", collectionId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnDeleteCollectionResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnDeleteCollectionResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get a model. - /// - /// Download a model that you can deploy to detect objects in images. The collection must include a generated - /// model, which is indicated in the response for the collection details as `"rscnn_ready": true`. If the value - /// is `false`, train or retrain the collection to generate the model. - /// - /// Currently, the model format is specific to Android apps. For more information about how to deploy the model - /// to your app, see the [Watson Visual Recognition on Android](https://github.com/matt-ny/rscnn) project in - /// GitHub. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The feature for the model. - /// The format of the returned model. - /// byte[] - public bool GetModelFile(Callback callback, string collectionId, string feature, string modelFormat) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetModelFile`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `GetModelFile`"); - if (string.IsNullOrEmpty(feature)) - throw new ArgumentNullException("`feature` is required for `GetModelFile`"); - if (string.IsNullOrEmpty(modelFormat)) - throw new ArgumentNullException("`modelFormat` is required for `GetModelFile`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "GetModelFile")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(feature)) - { - req.Parameters["feature"] = feature; - } - if (!string.IsNullOrEmpty(modelFormat)) - { - req.Parameters["model_format"] = modelFormat; - } - - req.OnResponse = OnGetModelFileResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/model", collectionId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetModelFileResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - response.Result = resp.Data; - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Add images. - /// - /// Add images to a collection by URL, by file, or both. - /// - /// Encode the image and .zip file names in UTF-8 if they contain non-ASCII characters. The service assumes - /// UTF-8 encoding if it encounters non-ASCII characters. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// An array of image files (.jpg or .png) or .zip files with images. - /// - Include a maximum of 20 images in a request. - /// - Limit the .zip file to 100 MB. - /// - Limit each image file to 10 MB. - /// - /// You can also include an image with the **image_url** parameter. (optional) - /// The array of URLs of image files (.jpg or .png). - /// - Include a maximum of 20 images in a request. - /// - Limit each image file to 10 MB. - /// - Minimum width and height is 30 pixels, but the service tends to perform better with images that are at - /// least 300 x 300 pixels. Maximum is 5400 pixels for either height or width. - /// - /// You can also include images with the **images_file** parameter. (optional) - /// Training data for a single image. Include training data only if you add one image - /// with the request. - /// - /// The `object` property can contain alphanumeric, underscore, hyphen, space, and dot characters. It cannot - /// begin with the reserved prefix `sys-` and must be no longer than 32 characters. (optional) - /// ImageDetailsList - public bool AddImages(Callback callback, string collectionId, List imagesFile = null, List imageUrl = null, string trainingData = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `AddImages`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `AddImages`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "AddImages")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - req.Forms = new Dictionary(); - if (imagesFile != null) - { - foreach (FileWithMetadata item in imagesFile) - { - req.Forms["images_file"] = new RESTConnector.Form(item.Data, item.Filename, item.ContentType); - } - } - if (imageUrl != null) - { - foreach (string item in imageUrl) - { - req.Forms["image_url"] = new RESTConnector.Form(item); - } - } - if (!string.IsNullOrEmpty(trainingData)) - { - req.Forms["training_data"] = new RESTConnector.Form(trainingData); - } - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnAddImagesResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/images", collectionId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnAddImagesResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnAddImagesResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// List images. - /// - /// Retrieves a list of images in a collection. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// ImageSummaryList - public bool ListImages(Callback callback, string collectionId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ListImages`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `ListImages`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "ListImages")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnListImagesResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/images", collectionId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnListImagesResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnListImagesResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get image details. - /// - /// Get the details of an image in a collection. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The identifier of the image. - /// ImageDetails - public bool GetImageDetails(Callback callback, string collectionId, string imageId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetImageDetails`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `GetImageDetails`"); - if (string.IsNullOrEmpty(imageId)) - throw new ArgumentNullException("`imageId` is required for `GetImageDetails`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "GetImageDetails")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnGetImageDetailsResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/images/{1}", collectionId, imageId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetImageDetailsResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnGetImageDetailsResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Delete an image. - /// - /// Delete one image from a collection. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The identifier of the image. - /// object - public bool DeleteImage(Callback callback, string collectionId, string imageId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `DeleteImage`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `DeleteImage`"); - if (string.IsNullOrEmpty(imageId)) - throw new ArgumentNullException("`imageId` is required for `DeleteImage`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbDELETE, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "DeleteImage")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnDeleteImageResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/images/{1}", collectionId, imageId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnDeleteImageResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnDeleteImageResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get a JPEG file of an image. - /// - /// Download a JPEG representation of an image. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The identifier of the image. - /// The image size. Specify `thumbnail` to return a version that maintains the original - /// aspect ratio but is no larger than 200 pixels in the larger dimension. For example, an original 800 x 1000 - /// image is resized to 160 x 200 pixels. (optional, default to full) - /// byte[] - public bool GetJpegImage(Callback callback, string collectionId, string imageId, string size = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetJpegImage`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `GetJpegImage`"); - if (string.IsNullOrEmpty(imageId)) - throw new ArgumentNullException("`imageId` is required for `GetJpegImage`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "GetJpegImage")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(size)) - { - req.Parameters["size"] = size; - } - - req.OnResponse = OnGetJpegImageResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/images/{1}/jpeg", collectionId, imageId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetJpegImageResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - response.Result = resp.Data; - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// List object metadata. - /// - /// Retrieves a list of object names in a collection. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// ObjectMetadataList - public bool ListObjectMetadata(Callback callback, string collectionId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `ListObjectMetadata`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `ListObjectMetadata`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "ListObjectMetadata")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnListObjectMetadataResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/objects", collectionId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnListObjectMetadataResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnListObjectMetadataResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Update an object name. - /// - /// Update the name of an object. A successful request updates the training data for all images that use the - /// object. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The name of the object. - /// The updated name of the object. The name can contain alphanumeric, underscore, - /// hyphen, space, and dot characters. It cannot begin with the reserved prefix `sys-`. - /// UpdateObjectMetadata - public bool UpdateObjectMetadata(Callback callback, string collectionId, string _object, string newObject) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `UpdateObjectMetadata`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `UpdateObjectMetadata`"); - if (string.IsNullOrEmpty(_object)) - throw new ArgumentNullException("`_object` is required for `UpdateObjectMetadata`"); - if (string.IsNullOrEmpty(newObject)) - throw new ArgumentNullException("`newObject` is required for `UpdateObjectMetadata`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "UpdateObjectMetadata")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - - JObject bodyObject = new JObject(); - if (!string.IsNullOrEmpty(newObject)) - bodyObject["object"] = newObject; - req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject)); - - req.OnResponse = OnUpdateObjectMetadataResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/objects/{1}", collectionId, _object); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnUpdateObjectMetadataResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnUpdateObjectMetadataResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get object metadata. - /// - /// Get the number of bounding boxes for a single object in a collection. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The name of the object. - /// ObjectMetadata - public bool GetObjectMetadata(Callback callback, string collectionId, string _object) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetObjectMetadata`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `GetObjectMetadata`"); - if (string.IsNullOrEmpty(_object)) - throw new ArgumentNullException("`_object` is required for `GetObjectMetadata`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "GetObjectMetadata")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnGetObjectMetadataResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/objects/{1}", collectionId, _object); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetObjectMetadataResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnGetObjectMetadataResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Delete an object. - /// - /// Delete one object from a collection. A successful request deletes the training data from all images that use - /// the object. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The name of the object. - /// object - public bool DeleteObject(Callback callback, string collectionId, string _object) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `DeleteObject`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `DeleteObject`"); - if (string.IsNullOrEmpty(_object)) - throw new ArgumentNullException("`_object` is required for `DeleteObject`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbDELETE, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "DeleteObject")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnDeleteObjectResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/objects/{1}", collectionId, _object); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnDeleteObjectResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnDeleteObjectResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Train a collection. - /// - /// Start training on images in a collection. The collection must have enough training data and untrained data - /// (the **training_status.objects.data_changed** is `true`). If training is in progress, the request queues the - /// next training job. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// Collection - public bool Train(Callback callback, string collectionId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `Train`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `Train`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "Train")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - - req.OnResponse = OnTrainResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/train", collectionId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnTrainResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnTrainResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Add training data to an image. - /// - /// Add, update, or delete training data for an image. Encode the object name in UTF-8 if it contains non-ASCII - /// characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters. - /// - /// Elements in the request replace the existing elements. - /// - /// - To update the training data, provide both the unchanged and the new or changed values. - /// - /// - To delete the training data, provide an empty value for the training data. - /// - /// The callback function that is invoked when the operation completes. - /// The identifier of the collection. - /// The identifier of the image. - /// Training data for specific objects. (optional) - /// TrainingDataObjects - public bool AddImageTrainingData(Callback callback, string collectionId, string imageId, List objects = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `AddImageTrainingData`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(collectionId)) - throw new ArgumentNullException("`collectionId` is required for `AddImageTrainingData`"); - if (string.IsNullOrEmpty(imageId)) - throw new ArgumentNullException("`imageId` is required for `AddImageTrainingData`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbPOST, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "AddImageTrainingData")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - req.Headers["Content-Type"] = "application/json"; - req.Headers["Accept"] = "application/json"; - - JObject bodyObject = new JObject(); - if (objects != null && objects.Count > 0) - bodyObject["objects"] = JToken.FromObject(objects); - req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject)); - - req.OnResponse = OnAddImageTrainingDataResponse; - - Connector.URL = GetServiceUrl() + string.Format("/v4/collections/{0}/images/{1}/training_data", collectionId, imageId); - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnAddImageTrainingDataResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnAddImageTrainingDataResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Get training usage. - /// - /// Information about the completed training events. You can use this information to determine how close you are - /// to the training limits for the month. - /// - /// The callback function that is invoked when the operation completes. - /// The earliest day to include training events. Specify dates in YYYY-MM-DD format. If - /// empty or not specified, the earliest training event is included. (optional) - /// The most recent day to include training events. Specify dates in YYYY-MM-DD format. - /// All events for the day are included. If empty or not specified, the current day is used. Specify the same - /// value as `start_time` to request events for a single day. (optional) - /// TrainingEvents - public bool GetTrainingUsage(Callback callback, DateTime? startTime = null, DateTime? endTime = null) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `GetTrainingUsage`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbGET, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "GetTrainingUsage")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (startTime != null) - { - req.Parameters["start_time"] = startTime.Value.ToString("yyyy-MM-dd"); - } - if (endTime != null) - { - req.Parameters["end_time"] = endTime.Value.ToString("yyyy-MM-dd"); - } - - req.OnResponse = OnGetTrainingUsageResponse; - - Connector.URL = GetServiceUrl() + "/v4/training_usage"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnGetTrainingUsageResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnGetTrainingUsageResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - - /// - /// Delete labeled data. - /// - /// Deletes all data associated with a specified customer ID. The method has no effect if no data is associated - /// with the customer ID. - /// - /// You associate a customer ID with data by passing the `X-Watson-Metadata` header with a request that passes - /// data. For more information about personal data and customer IDs, see [Information - /// security](https://cloud.ibm.com/docs/visual-recognition?topic=visual-recognition-information-security). - /// - /// The callback function that is invoked when the operation completes. - /// The customer ID for which all data is to be deleted. - /// object - public bool DeleteUserData(Callback callback, string customerId) - { - if (callback == null) - throw new ArgumentNullException("`callback` is required for `DeleteUserData`"); - if (string.IsNullOrEmpty(Version)) - throw new ArgumentNullException("`Version` is required"); - if (string.IsNullOrEmpty(customerId)) - throw new ArgumentNullException("`customerId` is required for `DeleteUserData`"); - - RequestObject req = new RequestObject - { - Callback = callback, - HttpMethod = UnityWebRequest.kHttpVerbDELETE, - DisableSslVerification = DisableSslVerification - }; - - foreach (KeyValuePair kvp in customRequestHeaders) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - ClearCustomRequestHeaders(); - - foreach (KeyValuePair kvp in Common.GetSdkHeaders("watson_vision_combined", "V4", "DeleteUserData")) - { - req.Headers.Add(kvp.Key, kvp.Value); - } - - if (!string.IsNullOrEmpty(Version)) - { - req.Parameters["version"] = Version; - } - if (!string.IsNullOrEmpty(customerId)) - { - req.Parameters["customer_id"] = customerId; - } - - req.OnResponse = OnDeleteUserDataResponse; - - Connector.URL = GetServiceUrl() + "/v4/user_data"; - Authenticator.Authenticate(Connector); - - return Connector.Send(req); - } - - private void OnDeleteUserDataResponse(RESTConnector.Request req, RESTConnector.Response resp) - { - DetailedResponse response = new DetailedResponse(); - foreach (KeyValuePair kvp in resp.Headers) - { - response.Headers.Add(kvp.Key, kvp.Value); - } - response.StatusCode = resp.HttpResponseCode; - - try - { - string json = Encoding.UTF8.GetString(resp.Data); - response.Result = JsonConvert.DeserializeObject(json); - response.Response = json; - } - catch (Exception e) - { - Log.Error("VisualRecognitionService.OnDeleteUserDataResponse()", "Exception: {0}", e.ToString()); - resp.Success = false; - } - - if (((RequestObject)req).Callback != null) - ((RequestObject)req).Callback(response, resp.Error); - } - } -} \ No newline at end of file diff --git a/Scripts/Services/VisualRecognition/V4/VisualRecognitionService.cs.meta b/Scripts/Services/VisualRecognition/V4/VisualRecognitionService.cs.meta deleted file mode 100644 index d0636fa17..000000000 --- a/Scripts/Services/VisualRecognition/V4/VisualRecognitionService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f9f1210dce7014f06af4dd2cc5a97739 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/AssistantV1IntegrationTests.cs b/Tests/AssistantV1IntegrationTests.cs index 7a93bb72c..a1a6dd519 100644 --- a/Tests/AssistantV1IntegrationTests.cs +++ b/Tests/AssistantV1IntegrationTests.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2021. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1174,6 +1174,37 @@ public IEnumerator TestBulkClassify() yield return null; } + [UnityTest, Order(37)] + public IEnumerator TestRuntimeResponseGeneric() + { + workspaceId = Environment.GetEnvironmentVariable("ASSISTANT_WORKSPACE_ID"); + string[] inputStrings = { "audio", "iframe", "video" }; + + MessageResponse messageResponse = null; + + foreach (string inputMessage in inputStrings) + { + MessageInput input = new MessageInput(); + input.Text = inputMessage; + + Log.Debug("AssistantV1IntegrationTests", "Attempting to Message...test sdk"); + + service.Message( + callback: (DetailedResponse response, IBMError error) => + { + messageResponse = response.Result; + Assert.IsNotNull(messageResponse); + Assert.IsTrue(messageResponse.Output.Generic[0].ResponseType.Contains(inputMessage)); + }, + workspaceId: workspaceId, + input: input + ); + } + + while (messageResponse == null) + yield return null; + } + [UnityTest, Order(91)] public IEnumerator TestDeleteUserData() { diff --git a/Tests/CompareComplyV1IntegrationTests.cs b/Tests/CompareComplyV1IntegrationTests.cs deleted file mode 100644 index 40bc4cb38..000000000 --- a/Tests/CompareComplyV1IntegrationTests.cs +++ /dev/null @@ -1,578 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections; -using System.Collections.Generic; -using System.IO; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Utilities; -using IBM.Watson.CompareComply.V1; -using IBM.Watson.CompareComply.V1.Model; -using NUnit.Framework; -using UnityEngine; -using UnityEngine.TestTools; - -namespace IBM.Watson.Tests -{ - public class CompareComplyV1IntegrationTests - { - private CompareComplyService service; - private string versionDate = "2019-02-13"; - private string contractAFilepath; - private string contractBFilepath; - private string tablePdfFilepath; - private string tablePngFilepath; - private string createdFeedbackId; - private string objectStorageCredentialsInputFilepath; - private string objectStorageCredentialsOutputFilepath; - private string createdBatchId; - - [OneTimeSetUp] - public void OneTimeSetup() - { - LogSystem.InstallDefaultReactors(); - - contractAFilepath = Application.dataPath + "/Watson/Tests/TestData/CompareComplyV1/contract_A.pdf"; - contractBFilepath = Application.dataPath + "/Watson/Tests/TestData/CompareComplyV1/contract_B.pdf"; - tablePdfFilepath = Application.dataPath + "/Watson/Tests/TestData/CompareComplyV1/TestTable.pdf"; - tablePngFilepath = Application.dataPath + "/Watson/Tests/TestData/CompareComplyV1/TableTestV3.png"; - - objectStorageCredentialsInputFilepath = "../sdk-credentials/cloud-object-storage-credentials-input.json"; - objectStorageCredentialsOutputFilepath = "../sdk-credentials/cloud-object-storage-credentials-output.json"; - } - - [UnitySetUp] - public IEnumerator UnityTestSetup() - { - if (service == null) - { - service = new CompareComplyService(versionDate); - } - - while (!service.Authenticator.CanAuthenticate()) - yield return null; - } - - [SetUp] - public void TestSetup() - { - service.WithHeader("X-Watson-Test", "1"); - } - - #region ConvertToHtml - [UnityTest, Order(0)] - public IEnumerator TestConvertToHtml() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to ConvertToHtml..."); - HTMLReturn convertToHtmlResponse = null; - using (FileStream fs = File.OpenRead(contractAFilepath)) - { - using (MemoryStream ms = new MemoryStream()) - { - fs.CopyTo(ms); - service.ConvertToHtml( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "ConvertToHtml result: {0}", response.Response); - convertToHtmlResponse = response.Result; - Assert.IsNotNull(convertToHtmlResponse); - Assert.IsNotNull(convertToHtmlResponse.Html); - Assert.IsNull(error); - }, - file: ms, - model: "contracts", - fileContentType: Utility.GetMimeType(Path.GetExtension(contractAFilepath)) - ); - - while (convertToHtmlResponse == null) - yield return null; - } - } - } - #endregion - - #region ClassifyElements - [UnityTest, Order(1)] - public IEnumerator TestClassifyElements() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to ClassifyElements..."); - ClassifyReturn classifyElementsResponse = null; - using (FileStream fs = File.OpenRead(contractAFilepath)) - { - using (MemoryStream ms = new MemoryStream()) - { - fs.CopyTo(ms); - service.ClassifyElements( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "ClassifyElements result: {0}", response.Response); - classifyElementsResponse = response.Result; - Assert.IsNotNull(classifyElementsResponse); - //Assert.IsNotNull(classifyElementsResponse.ContractType); - Assert.IsNotNull(classifyElementsResponse.Elements); - Assert.IsNull(error); - }, - file: ms, - model: "contracts", - fileContentType: Utility.GetMimeType(Path.GetExtension(contractAFilepath)) - ); - - while (classifyElementsResponse == null) - yield return null; - } - } - } - #endregion - - #region ExtractTablesPdf - [UnityTest, Order(2)] - public IEnumerator TestExtractPdfTables() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to ExtractTables..."); - TableReturn extractTablesResponse = null; - using (FileStream fs = File.OpenRead(tablePdfFilepath)) - { - using (MemoryStream ms = new MemoryStream()) - { - fs.CopyTo(ms); - service.ExtractTables( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "ExtractTables result: {0}", response.Response); - extractTablesResponse = response.Result; - Assert.IsNotNull(extractTablesResponse); - Assert.IsNotNull(extractTablesResponse.Tables); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].RowHeaderIds); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].RowHeaderTexts); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].RowHeaderTextsNormalized); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].ColumnHeaderIds); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].ColumnHeaderTexts); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].ColumnHeaderTextsNormalized); - Assert.IsNotNull(extractTablesResponse.Tables[0].KeyValuePairs); - Assert.IsNull(error); - }, - file: ms, - model: "tables", - fileContentType: Utility.GetMimeType(Path.GetExtension(tablePdfFilepath)) - ); - - while (extractTablesResponse == null) - yield return null; - } - } - } - #endregion - - #region ExtractTablesPng - [UnityTest, Order(3)] - public IEnumerator TestExtractPngTables() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to ExtractTables..."); - TableReturn extractTablesResponse = null; - using (FileStream fs = File.OpenRead(tablePngFilepath)) - { - using (MemoryStream ms = new MemoryStream()) - { - fs.CopyTo(ms); - service.ExtractTables( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "ExtractTables from png file result: {0}", response.Response); - extractTablesResponse = response.Result; - Assert.IsNotNull(extractTablesResponse); - Assert.IsNotNull(extractTablesResponse.Tables); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].RowHeaderIds); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].RowHeaderTexts); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].RowHeaderTextsNormalized); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].ColumnHeaderIds); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].ColumnHeaderTexts); - Assert.IsNotNull(extractTablesResponse.Tables[0].BodyCells[0].ColumnHeaderTextsNormalized); - Assert.IsNotNull(extractTablesResponse.Tables[0].KeyValuePairs); - Assert.IsNull(error); - }, - file: ms, - model: "tables", - fileContentType: Utility.GetMimeType(Path.GetExtension(tablePngFilepath)) - ); - - while (extractTablesResponse == null) - yield return null; - } - } - } - #endregion - - #region CompareDocuments - [UnityTest, Order(4)] - public IEnumerator TestCompareDocuments() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to CompareDocuments..."); - CompareReturn compareDocumentsResponse = null; - using (FileStream fs0 = File.OpenRead(contractAFilepath)) - { - using (FileStream fs1 = File.OpenRead(contractBFilepath)) - { - using (MemoryStream ms0 = new MemoryStream()) - { - using (MemoryStream ms1 = new MemoryStream()) - { - fs0.CopyTo(ms0); - fs1.CopyTo(ms1); - service.CompareDocuments( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "CompareDocuments result: {0}", response.Response); - compareDocumentsResponse = response.Result; - Assert.IsNotNull(compareDocumentsResponse); - Assert.IsNotNull(compareDocumentsResponse.Documents); - Assert.IsNull(error); - }, - file1: ms0, - file2: ms1, - file1Label: "Contract A", - file2Label: "Contract B", - model: "contracts", - file1ContentType: Utility.GetMimeType(Path.GetExtension(contractAFilepath)), - file2ContentType: Utility.GetMimeType(Path.GetExtension(contractBFilepath)) - ); - - while (compareDocumentsResponse == null) - yield return null; - } - } - } - } - } - #endregion - - #region AddFeedback - [UnityTest, Order(5)] - public IEnumerator TestAddFeedback() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to AddFeedback..."); - FeedbackReturn addFeedbackResponse = null; - - #region feedbackData - var feedbackData = new FeedbackDataInput() - { - FeedbackType = "element_classification", - Document = new ShortDoc() - { - Hash = "", - Title = "doc title" - }, - ModelId = "contracts", - ModelVersion = "11.00", - Location = new Location() - { - Begin = 241, - End = 237 - }, - Text = "1. IBM will provide a Senior Managing Consultant / expert resource, for up to 80 hours, to assist Florida Power & Light (FPL) with the creation of an IT infrastructure unit cost model for existing infrastructure.", - OriginalLabels = new OriginalLabelsIn() - { - Types = new List() - { - new TypeLabel() - { - Label = new Label() - { - Nature = "Obligation", - Party= "IBM" - }, - ProvenanceIds = new List() - { - "85f5981a-ba91-44f5-9efa-0bd22e64b7bc", - "ce0480a1-5ef1-4c3e-9861-3743b5610795" - } - }, - new TypeLabel() - { - Label = new Label() - { - Nature = "End User", - Party= "Exclusion" - }, - ProvenanceIds = new List() - { - "85f5981a-ba91-44f5-9efa-0bd22e64b7bc", - "ce0480a1-5ef1-4c3e-9861-3743b5610795" - } - } - }, - Categories = new List() - { - new Category() - { - Label = Category.LabelValue.RESPONSIBILITIES, - ProvenanceIds = new List(){ } - }, - new Category() - { - Label = Category.LabelValue.AMENDMENTS, - ProvenanceIds = new List(){ } - } - } - }, - UpdatedLabels = new UpdatedLabelsIn() - { - Types = new List() - { - new TypeLabel() - { - Label = new Label() - { - Nature = "Obligation", - Party = "IBM" - } - }, - new TypeLabel() - { - Label = new Label() - { - Nature = "Disclaimer", - Party = "buyer" - } - } - }, - Categories = new List() - { - new Category() - { - Label = Category.LabelValue.RESPONSIBILITIES, - }, - new Category() - { - Label = Category.LabelValue.AUDITS - } - } - } - }; - #endregion - - service.AddFeedback( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "AddFeedback result: {0}", response.Response); - addFeedbackResponse = response.Result; - createdFeedbackId = addFeedbackResponse.FeedbackId; - Assert.IsNotNull(addFeedbackResponse); - Assert.IsNotNull(createdFeedbackId); - Assert.IsNull(error); - }, - feedbackData: feedbackData, - userId: "user_id_123x", - comment: "Test feedback comment" - ); - - while (addFeedbackResponse == null) - yield return null; - } - #endregion - - #region GetFeedback - [UnityTest, Order(6)] - public IEnumerator TestGetFeedback() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to GetFeedback..."); - GetFeedback getFeedbackResponse = null; - service.GetFeedback( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "GetFeedback result: {0}", response.Response); - getFeedbackResponse = response.Result; - Assert.IsNotNull(getFeedbackResponse); - Assert.IsTrue(getFeedbackResponse.FeedbackId == createdFeedbackId); - Assert.IsNull(error); - }, - feedbackId: createdFeedbackId, - model: "contracts" - ); - - while (getFeedbackResponse == null) - yield return null; - } - #endregion - - #region ListFeedback - [UnityTest, Order(7)] - public IEnumerator TestListFeedback() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to ListFeedback..."); - FeedbackList listFeedbackResponse = null; - service.ListFeedback( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "ListFeedback result: {0}", response.Response); - listFeedbackResponse = response.Result; - Assert.IsNotNull(listFeedbackResponse); - Assert.IsNotNull(listFeedbackResponse.Feedback); - Assert.IsTrue(listFeedbackResponse.Feedback.Count > 0); - Assert.IsNull(error); - }, - feedbackType: "element_classification", - includeTotal: true - ); - - while (listFeedbackResponse == null) - yield return null; - } - #endregion - - #region CreateBatch - [UnityTest, Order(8)] - public IEnumerator TestCreateBatch() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to CreateBatch..."); - BatchStatus createBatchResponse = null; - using (FileStream fsInput = File.OpenRead(objectStorageCredentialsInputFilepath)) - { - using (FileStream fsOutput = File.OpenRead(objectStorageCredentialsOutputFilepath)) - { - using (MemoryStream msInput = new MemoryStream()) - { - using (MemoryStream msOutput = new MemoryStream()) - { - fsInput.CopyTo(msInput); - fsOutput.CopyTo(msOutput); - service.CreateBatch( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "CreateBatch result: {0}", response.Response); - createBatchResponse = response.Result; - createdBatchId = createBatchResponse.BatchId; - Assert.IsNotNull(createBatchResponse); - Assert.IsNotNull(createdBatchId); - Assert.IsNull(error); - }, - function: "html_conversion", - inputCredentialsFile: msInput, - inputBucketLocation: "us-south", - inputBucketName: "compare-comply-integration-test-bucket-input", - outputCredentialsFile: msOutput, - outputBucketLocation: "us-south", - outputBucketName: "compare-comply-integration-test-bucket-output", - model: "contracts" - ); - } - } - - - } - } - while (createBatchResponse == null) - yield return null; - } - #endregion - - #region GetBatch - [UnityTest, Order(9)] - public IEnumerator TestGetBatch() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to GetBatch..."); - BatchStatus getBatchResponse = null; - service.GetBatch( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "GetBatch result: {0}", response.Response); - getBatchResponse = response.Result; - Assert.IsNotNull(getBatchResponse); - Assert.IsTrue(getBatchResponse.BatchId == createdBatchId); - Assert.IsNull(error); - }, - batchId: createdBatchId - ); - - while (getBatchResponse == null) - yield return null; - } - #endregion - - #region ListBatches - [UnityTest, Order(10)] - public IEnumerator TestListBatches() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to ListBatches..."); - Batches listBatchesResponse = null; - service.ListBatches( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "ListBatches result: {0}", response.Response); - listBatchesResponse = response.Result; - Assert.IsNotNull(listBatchesResponse); - Assert.IsNotNull(listBatchesResponse._Batches); - Assert.IsTrue(listBatchesResponse._Batches.Count > 0); - Assert.IsNull(error); - } - ); - - while (listBatchesResponse == null) - yield return null; - } - #endregion - - #region UpdateBatch - [UnityTest, Order(11)] - public IEnumerator TestUpdateBatch() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to UpdateBatch..."); - BatchStatus updateBatchResponse = null; - service.UpdateBatch( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "UpdateBatch result: {0}", response.Response); - updateBatchResponse = response.Result; - Assert.IsNotNull(updateBatchResponse); - Assert.IsNull(error); - }, - batchId: createdBatchId, - action: "rescan", - model: "contracts" - ); - - while (updateBatchResponse == null) - yield return null; - } - #endregion - - #region DeleteFeedback - [UnityTest, Order(99)] - public IEnumerator TestDeleteFeedback() - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "Attempting to DeleteFeedback..."); - FeedbackDeleted deleteFeedbackResponse = null; - service.DeleteFeedback( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("CompareComplyServiceV1IntegrationTests", "DeleteFeedback result: {0}", response.Response); - deleteFeedbackResponse = response.Result; - Assert.IsNotNull(deleteFeedbackResponse); - Assert.IsTrue(deleteFeedbackResponse.Status == 200); - Assert.IsTrue(deleteFeedbackResponse.Message.Contains(createdFeedbackId)); - Assert.IsNull(error); - }, - feedbackId: createdFeedbackId, - model: "contracts" - ); - - while (deleteFeedbackResponse == null) - yield return null; - } - #endregion - } -} diff --git a/Tests/CompareComplyV1IntegrationTests.cs.meta b/Tests/CompareComplyV1IntegrationTests.cs.meta deleted file mode 100644 index fa951a12b..000000000 --- a/Tests/CompareComplyV1IntegrationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c42a634ab175e441940cd66f0658513 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/DiscoveryV1IntegrationTests.cs b/Tests/DiscoveryV1IntegrationTests.cs index 68b24b11f..08cbec119 100644 --- a/Tests/DiscoveryV1IntegrationTests.cs +++ b/Tests/DiscoveryV1IntegrationTests.cs @@ -1,5 +1,5 @@ /** -* (C) Copyright IBM Corp. 2018, 2020. +* (C) Copyright IBM Corp. 2018, 2022. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -932,8 +932,8 @@ public IEnumerator TestQueryAggregation() Assert.IsNotNull(queryResultTimeslice); Assert.IsNull(error); Assert.IsNotNull(queryResultTimeslice.Aggregations); - Assert.IsTrue((queryResultTimeslice.Aggregations[0] as Timeslice).Field == "product.sales"); - Assert.IsTrue((queryResultTimeslice.Aggregations[0] as Timeslice).Interval == "2d"); + Assert.IsTrue((queryResultTimeslice.Aggregations[0] as QueryTimesliceAggregation).Field == "product.sales"); + Assert.IsTrue((queryResultTimeslice.Aggregations[0] as QueryTimesliceAggregation).Interval == "2d"); }, environmentId: "system", collectionId: "news-en", @@ -950,8 +950,8 @@ public IEnumerator TestQueryAggregation() Assert.IsNotNull(queryResultTerm); Assert.IsNull(error); Assert.IsNotNull(queryResultTerm.Aggregations); - Assert.IsTrue((queryResultTerm.Aggregations[0] as Term).Field == "enriched_text.concepts.text"); - Assert.IsTrue((queryResultTerm.Aggregations[0] as Term).Count == 10); + Assert.IsTrue((queryResultTerm.Aggregations[0] as QueryTermAggregation).Field == "enriched_text.concepts.text"); + Assert.IsTrue((queryResultTerm.Aggregations[0] as QueryTermAggregation).Count == 10); }, environmentId: "system", collectionId: "news-en", @@ -968,7 +968,7 @@ public IEnumerator TestQueryAggregation() Assert.IsNotNull(queryResultFilter); Assert.IsNull(error); Assert.IsNotNull(queryResultFilter.Aggregations); - Assert.IsTrue((queryResultFilter.Aggregations[0] as Filter).Match == "enriched_text.concepts.text:\"cloud computing\""); + Assert.IsTrue((queryResultFilter.Aggregations[0] as QueryFilterAggregation).Match == "enriched_text.concepts.text:\"cloud computing\""); }, environmentId: "system", collectionId: "news-en", diff --git a/Tests/NaturalLanguageClassifierV1IntegrationTests.cs b/Tests/NaturalLanguageClassifierV1IntegrationTests.cs deleted file mode 100644 index f6cb9edbc..000000000 --- a/Tests/NaturalLanguageClassifierV1IntegrationTests.cs +++ /dev/null @@ -1,246 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections; -using System.Collections.Generic; -using System.IO; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Watson.NaturalLanguageClassifier.V1; -using IBM.Watson.NaturalLanguageClassifier.V1.Model; -using NUnit.Framework; -using UnityEngine; -using UnityEngine.TestTools; - -namespace IBM.Watson.Tests -{ - public class NaturalLanguageClassifierV1IntegrationTests - { - private NaturalLanguageClassifierService service; - private string classifierId; - private string createdClassifierId; - private string classifierDataFilePath; - private string metadataDataFilePath; - private string textToClassify0 = "Is it raining?"; - private string textToClassify1 = "Will it be hot today?"; - - [OneTimeSetUp] - public void OneTimeSetup() - { - LogSystem.InstallDefaultReactors(); - classifierDataFilePath = Application.dataPath + "/Watson/Tests/TestData/NaturalLanguageClassifierV1/weather-data.csv"; - metadataDataFilePath = Application.dataPath + "/Watson/Tests/TestData/NaturalLanguageClassifierV1/metadata.json"; - } - - [UnitySetUp] - public IEnumerator UnityTestSetup() - { - if (service == null) - { - service = new NaturalLanguageClassifierService(); - } - - while (!service.Authenticator.CanAuthenticate()) - yield return null; - } - - [SetUp] - public void TestSetup() - { - service.WithHeader("X-Watson-Test", "1"); - } - - #region ListClassifiers - [UnityTest, Order(0)] - public IEnumerator TestListClassifiers() - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "Attempting to ListClassifiers..."); - ClassifierList listClassifiersResponse = null; - service.ListClassifiers( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "ListClassifiers result: {0}", response.Response); - listClassifiersResponse = response.Result; - classifierId = listClassifiersResponse.Classifiers[0].ClassifierId; - Assert.IsNotNull(listClassifiersResponse); - Assert.IsNotNull(listClassifiersResponse.Classifiers); - Assert.IsTrue(listClassifiersResponse.Classifiers.Count > 0); - Assert.IsNull(error); - } - ); - - while (listClassifiersResponse == null) - yield return null; - } - #endregion - - #region Classify - [UnityTest, Order(1)] - public IEnumerator TestClassify() - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "Attempting to Classify..."); - Classification classifyResponse = null; - service.Classify( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "Classify result: {0}", response.Response); - classifyResponse = response.Result; - Assert.IsNotNull(classifyResponse); - Assert.IsNotNull(classifyResponse.Classes); - Assert.IsTrue(classifyResponse.Classes.Count > 0); - Assert.IsNotNull(classifyResponse.TopClass); - Assert.IsTrue(classifyResponse.Text == textToClassify0); - Assert.IsTrue(classifyResponse.ClassifierId == classifierId); - Assert.IsNull(error); - }, - classifierId: classifierId, - text: textToClassify0 - ); - - while (classifyResponse == null) - yield return null; - } - #endregion - - #region ClassifyCollection - [UnityTest, Order(2)] - public IEnumerator TestClassifyCollection() - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "Attempting to ClassifyCollection..."); - ClassificationCollection classifyCollectionResponse = null; - List collection = new List() - { - new ClassifyInput() - { - Text = textToClassify0 - }, - new ClassifyInput() - { - Text = textToClassify1 - } - }; - - service.ClassifyCollection( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "ClassifyCollection result: {0}", response.Response); - classifyCollectionResponse = response.Result; - Assert.IsNotNull(classifyCollectionResponse); - Assert.IsNotNull(classifyCollectionResponse.Collection); - Assert.IsTrue(classifyCollectionResponse.Collection.Count > 0); - Assert.IsTrue(classifyCollectionResponse.ClassifierId == classifierId); - Assert.IsNull(error); - }, - classifierId: classifierId, - collection: collection - ); - - while (classifyCollectionResponse == null) - yield return null; - } - #endregion - - #region CreateClassifier - [UnityTest, Order(3)] - public IEnumerator TestCreateClassifier() - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "Attempting to CreateClassifier..."); - Classifier createClassifierResponse = null; - using (FileStream fs0 = File.OpenRead(metadataDataFilePath)) - { - using (FileStream fs1 = File.OpenRead(classifierDataFilePath)) - { - using (MemoryStream ms0 = new MemoryStream()) - { - using (MemoryStream ms1 = new MemoryStream()) - { - fs0.CopyTo(ms0); - fs1.CopyTo(ms1); - service.CreateClassifier( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "CreateClassifier result: {0}", response.Response); - createClassifierResponse = response.Result; - createdClassifierId = createClassifierResponse.ClassifierId; - Assert.IsNotNull(createClassifierResponse); - Assert.IsNotNull(createdClassifierId); - Assert.IsTrue(createClassifierResponse.Name == "unity-classifier-delete"); - Assert.IsTrue(createClassifierResponse.Language == "en"); - Assert.IsNull(error); - }, - trainingMetadata: ms0, - trainingData: ms1 - ); - - while (createClassifierResponse == null) - yield return null; - } - } - } - } - } - #endregion - - - - #region GetClassifier - [UnityTest, Order(4)] - public IEnumerator TestGetClassifier() - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "Attempting to GetClassifier..."); - Classifier getClassifierResponse = null; - service.GetClassifier( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "GetClassifier result: {0}", response.Response); - getClassifierResponse = response.Result; - Assert.IsNotNull(getClassifierResponse); - Assert.IsTrue(getClassifierResponse.Name == "unity-classifier-delete"); - Assert.IsTrue(getClassifierResponse.Language == "en"); - Assert.IsNull(error); - }, - classifierId: createdClassifierId - ); - - while (getClassifierResponse == null) - yield return null; - } - #endregion - - #region DeleteClassifier - [UnityTest, Order(99)] - public IEnumerator TestDeleteClassifier() - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "Attempting to DeleteClassifier..."); - object deleteClassifierResponse = null; - service.DeleteClassifier( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("NaturalLanguageClassifierServiceV1IntegrationTests", "DeleteClassifier result: {0}", response.Response); - deleteClassifierResponse = response.Result; - Assert.IsNotNull(deleteClassifierResponse); - Assert.IsNull(error); - }, - classifierId: createdClassifierId - ); - - while (deleteClassifierResponse == null) - yield return null; - } - #endregion - } -} diff --git a/Tests/NaturalLanguageClassifierV1IntegrationTests.cs.meta b/Tests/NaturalLanguageClassifierV1IntegrationTests.cs.meta deleted file mode 100644 index da4e86f35..000000000 --- a/Tests/NaturalLanguageClassifierV1IntegrationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 16a2e3194f6e0b2448c3804d62675df0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/PersonalityInsightsV3IntegrationTests.cs b/Tests/PersonalityInsightsV3IntegrationTests.cs deleted file mode 100644 index 10f15796b..000000000 --- a/Tests/PersonalityInsightsV3IntegrationTests.cs +++ /dev/null @@ -1,134 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2018, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections; -using System.Collections.Generic; -using System.IO; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Watson.PersonalityInsights.V3; -using IBM.Watson.PersonalityInsights.V3.Model; -using NUnit.Framework; -using UnityEngine; -using UnityEngine.TestTools; -using System.Text; -using System.IO; - -namespace IBM.Watson.Tests -{ - public class PersonalityInsightsV3IntegrationTests - { - private PersonalityInsightsService service; - private string versionDate = "2019-02-13"; - private string contentToProfile = "The IBM Watson™ Personality Insights service provides a Representational State Transfer (REST) Application Programming Interface (API) that enables applications to derive insights from social media, enterprise data, or other digital communications. The service uses linguistic analytics to infer individuals' intrinsic personality characteristics, including Big Five, Needs, and Values, from digital communications such as email, text messages, tweets, and forum posts. The service can automatically infer, from potentially noisy social media, portraits of individuals that reflect their personality characteristics. The service can report consumption preferences based on the results of its analysis, and for JSON content that is timestamped, it can report temporal behavior."; - - [OneTimeSetUp] - public void OneTimeSetup() - { - LogSystem.InstallDefaultReactors(); - } - - [UnitySetUp] - public IEnumerator UnityTestSetup() - { - if (service == null) - { - service = new PersonalityInsightsService(versionDate); - } - - while (!service.Authenticator.CanAuthenticate()) - yield return null; - } - - [SetUp] - public void TestSetup() - { - service.WithHeader("X-Watson-Test", "1"); - } - - #region Profile - [UnityTest, Order(0)] - public IEnumerator TestProfile() - { - Log.Debug("PersonalityInsightsServiceV3IntegrationTests", "Attempting to Profile..."); - Profile profileResponse = null; - byte[] bytes = Encoding.ASCII.GetBytes(contentToProfile); - MemoryStream content = new MemoryStream(bytes); - - service.Profile( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("PersonalityInsightsServiceV3IntegrationTests", "Profile result: {0}", response.Response); - profileResponse = response.Result; - Assert.IsNotNull(profileResponse); - Assert.IsNotNull(profileResponse.Personality); - Assert.IsNull(error); - }, - content: content, - contentLanguage: "en", - acceptLanguage: "en", - rawScores: true, - csvHeaders: true, - consumptionPreferences: true, - contentType: "text/plain" - ); - - while (profileResponse == null) - yield return null; - } - #endregion - - #region ProfileAsCsv - [UnityTest, Order(1)] - public IEnumerator TestProfileAsCsv() - { - Log.Debug("PersonalityInsightsServiceV3IntegrationTests", "Attempting to ProfileAsCsv..."); - System.IO.MemoryStream profileAsCsvResponse = null; - byte[] bytes = Encoding.ASCII.GetBytes(contentToProfile); - MemoryStream content = new MemoryStream(bytes); - - service.ProfileAsCsv( - callback: (DetailedResponse response, IBMError error) => - { - profileAsCsvResponse = response.Result; - Assert.IsNotNull(profileAsCsvResponse); - Assert.IsNull(error); - - // Save file - using (FileStream fs = File.Create(Application.dataPath + "/personality-profile.csv")) - { - profileAsCsvResponse.WriteTo(fs); - fs.Close(); - profileAsCsvResponse.Close(); - } - }, - content: content, - contentLanguage: "en", - acceptLanguage: "en", - rawScores: true, - csvHeaders: true, - consumptionPreferences: true, - contentType: "text/plain" - ); - - while (profileAsCsvResponse == null) - yield return null; - } - #endregion - - } -} diff --git a/Tests/PersonalityInsightsV3IntegrationTests.cs.meta b/Tests/PersonalityInsightsV3IntegrationTests.cs.meta deleted file mode 100644 index 426522754..000000000 --- a/Tests/PersonalityInsightsV3IntegrationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c07879a817f53474c80372d84d458351 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/CompareComplyV1.meta b/Tests/TestData/CompareComplyV1.meta deleted file mode 100644 index 6d0467f7e..000000000 --- a/Tests/TestData/CompareComplyV1.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 442bb54487deba04c96efb52eb3f49d0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/CompareComplyV1/TableTestV3.png b/Tests/TestData/CompareComplyV1/TableTestV3.png deleted file mode 100644 index e709df6a1..000000000 Binary files a/Tests/TestData/CompareComplyV1/TableTestV3.png and /dev/null differ diff --git a/Tests/TestData/CompareComplyV1/TableTestV3.png.meta b/Tests/TestData/CompareComplyV1/TableTestV3.png.meta deleted file mode 100644 index 9d75e8534..000000000 --- a/Tests/TestData/CompareComplyV1/TableTestV3.png.meta +++ /dev/null @@ -1,91 +0,0 @@ -fileFormatVersion: 2 -guid: d8adb9b3c003d4252a9e7232f83502e0 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 10 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/CompareComplyV1/TestTable.pdf b/Tests/TestData/CompareComplyV1/TestTable.pdf deleted file mode 100644 index 34985d494..000000000 Binary files a/Tests/TestData/CompareComplyV1/TestTable.pdf and /dev/null differ diff --git a/Tests/TestData/CompareComplyV1/TestTable.pdf.meta b/Tests/TestData/CompareComplyV1/TestTable.pdf.meta deleted file mode 100644 index 758770109..000000000 --- a/Tests/TestData/CompareComplyV1/TestTable.pdf.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 94dcc1e2f1dd13e4580745249518705b -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/CompareComplyV1/contract_A.pdf b/Tests/TestData/CompareComplyV1/contract_A.pdf deleted file mode 100644 index 09f4999b5..000000000 Binary files a/Tests/TestData/CompareComplyV1/contract_A.pdf and /dev/null differ diff --git a/Tests/TestData/CompareComplyV1/contract_A.pdf.meta b/Tests/TestData/CompareComplyV1/contract_A.pdf.meta deleted file mode 100644 index 3ac7e0c04..000000000 --- a/Tests/TestData/CompareComplyV1/contract_A.pdf.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e6214b5a644b07f47ba226e91b32aa51 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/CompareComplyV1/contract_B.pdf b/Tests/TestData/CompareComplyV1/contract_B.pdf deleted file mode 100644 index 13433fad5..000000000 Binary files a/Tests/TestData/CompareComplyV1/contract_B.pdf and /dev/null differ diff --git a/Tests/TestData/CompareComplyV1/contract_B.pdf.meta b/Tests/TestData/CompareComplyV1/contract_B.pdf.meta deleted file mode 100644 index adbf05b58..000000000 --- a/Tests/TestData/CompareComplyV1/contract_B.pdf.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 790d363972c7e7b449ea1586a2f251d9 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/NaturalLanguageClassifierV1.meta b/Tests/TestData/NaturalLanguageClassifierV1.meta deleted file mode 100644 index f71487749..000000000 --- a/Tests/TestData/NaturalLanguageClassifierV1.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7710f0efc4f698b41a83b7bcabd5b7fc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/NaturalLanguageClassifierV1/metadata.json b/Tests/TestData/NaturalLanguageClassifierV1/metadata.json deleted file mode 100644 index 79ebc3aa5..000000000 --- a/Tests/TestData/NaturalLanguageClassifierV1/metadata.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "language":"en", - "name":"unity-classifier-delete" -} \ No newline at end of file diff --git a/Tests/TestData/NaturalLanguageClassifierV1/metadata.json.meta b/Tests/TestData/NaturalLanguageClassifierV1/metadata.json.meta deleted file mode 100644 index 50930ebbf..000000000 --- a/Tests/TestData/NaturalLanguageClassifierV1/metadata.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f52caef991a130547a3a83895a6ec86b -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/NaturalLanguageClassifierV1/weather-data.csv b/Tests/TestData/NaturalLanguageClassifierV1/weather-data.csv deleted file mode 100644 index 1b250e630..000000000 --- a/Tests/TestData/NaturalLanguageClassifierV1/weather-data.csv +++ /dev/null @@ -1,50 +0,0 @@ -How hot is it today?,temperature -Is it hot outside?,temperature -Will it be uncomfortably hot?,temperature -Will it be sweltering?,temperature -How cold is it today?,temperature -Is it cold outside?,temperature -Will it be uncomfortably cold?,temperature -Will it be frigid?,temperature -What is the expected high for today?,temperature -What is the expected temperature?,temperature -Will high temperatures be dangerous?,temperature -Is it dangerously cold?,temperature -When will the heat subside?,temperature -Is it hot?,temperature -Is it cold?,temperature -How cold is it now?,temperature -Will we have a cold day today?,temperature -When will the cold subside?,temperature -What highs are we expecting?,temperature -What lows are we expecting?,temperature -Is it warm?,temperature -Is it chilly?,temperature -What's the current temp in Celsius?,temperature -What is the temperature in Fahrenheit?,temperature -Is it windy?,conditions -Will it rain today?,conditions -What are the chances for rain?,conditions -Will we get snow?,conditions -Are we expecting sunny conditions?,conditions -Is it overcast?,conditions -Will it be cloudy?,conditions -How much rain will fall today?,conditions -How much snow are we expecting?,conditions -Is it windy outside?,conditions -How much snow do we expect?,conditions -Is the forecast calling for snow today?,conditions -Will we see some sun?,conditions -When will the rain subside?,conditions -Is it cloudy?,conditions -Is it sunny now?,conditions -Will it rain?,conditions -Will we have much snow?,conditions -Are the winds dangerous?,conditions -What is the expected snowfall today?,conditions -Will it be dry?,conditions -Will it be breezy?,conditions -Will it be humid?,conditions -What is today's expected humidity?,conditions -Will the blizzard hit us?,conditions -Is it drizzling?,conditions diff --git a/Tests/TestData/NaturalLanguageClassifierV1/weather-data.csv.meta b/Tests/TestData/NaturalLanguageClassifierV1/weather-data.csv.meta deleted file mode 100644 index bb76dd8c9..000000000 --- a/Tests/TestData/NaturalLanguageClassifierV1/weather-data.csv.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 1d322be39a21d5a42b53dea1265bdf5e -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/VisualRecognitionV3.meta b/Tests/TestData/VisualRecognitionV3.meta deleted file mode 100644 index 265a30cfd..000000000 --- a/Tests/TestData/VisualRecognitionV3.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3557dfd8fc6108345a1945fb37381b17 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/VisualRecognitionV3/giraffe_positive_examples.zip b/Tests/TestData/VisualRecognitionV3/giraffe_positive_examples.zip deleted file mode 100644 index abb38a0f9..000000000 Binary files a/Tests/TestData/VisualRecognitionV3/giraffe_positive_examples.zip and /dev/null differ diff --git a/Tests/TestData/VisualRecognitionV3/giraffe_positive_examples.zip.meta b/Tests/TestData/VisualRecognitionV3/giraffe_positive_examples.zip.meta deleted file mode 100644 index 215c28987..000000000 --- a/Tests/TestData/VisualRecognitionV3/giraffe_positive_examples.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b3885293b4dadde4f916b1c7730d2ba3 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/VisualRecognitionV3/giraffe_to_classify.jpg b/Tests/TestData/VisualRecognitionV3/giraffe_to_classify.jpg deleted file mode 100644 index c05714295..000000000 Binary files a/Tests/TestData/VisualRecognitionV3/giraffe_to_classify.jpg and /dev/null differ diff --git a/Tests/TestData/VisualRecognitionV3/giraffe_to_classify.jpg.meta b/Tests/TestData/VisualRecognitionV3/giraffe_to_classify.jpg.meta deleted file mode 100644 index 446722745..000000000 --- a/Tests/TestData/VisualRecognitionV3/giraffe_to_classify.jpg.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: c3d7a278b17446e47b508adfcb0d33c6 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/VisualRecognitionV3/imageMetadata.json b/Tests/TestData/VisualRecognitionV3/imageMetadata.json deleted file mode 100644 index 5d6514c9a..000000000 --- a/Tests/TestData/VisualRecognitionV3/imageMetadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Jeffrey", - "type": "Giraffe", - "best friend": "Turtle" -} diff --git a/Tests/TestData/VisualRecognitionV3/imageMetadata.json.meta b/Tests/TestData/VisualRecognitionV3/imageMetadata.json.meta deleted file mode 100644 index 4a83aeb16..000000000 --- a/Tests/TestData/VisualRecognitionV3/imageMetadata.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2badea579a07e194285d177f23dbc705 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/VisualRecognitionV3/negative_examples.zip b/Tests/TestData/VisualRecognitionV3/negative_examples.zip deleted file mode 100644 index 1fbef1d57..000000000 Binary files a/Tests/TestData/VisualRecognitionV3/negative_examples.zip and /dev/null differ diff --git a/Tests/TestData/VisualRecognitionV3/negative_examples.zip.meta b/Tests/TestData/VisualRecognitionV3/negative_examples.zip.meta deleted file mode 100644 index 3933e8eac..000000000 --- a/Tests/TestData/VisualRecognitionV3/negative_examples.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5699fa1c03eeaf84d8fdfe3f19709109 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/VisualRecognitionV3/obama.jpg b/Tests/TestData/VisualRecognitionV3/obama.jpg deleted file mode 100644 index 60141451f..000000000 Binary files a/Tests/TestData/VisualRecognitionV3/obama.jpg and /dev/null differ diff --git a/Tests/TestData/VisualRecognitionV3/obama.jpg.meta b/Tests/TestData/VisualRecognitionV3/obama.jpg.meta deleted file mode 100644 index 51664a42e..000000000 --- a/Tests/TestData/VisualRecognitionV3/obama.jpg.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 468a611badaa47348a08357c99fc67a7 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/VisualRecognitionV3/turtle_positive_examples.zip b/Tests/TestData/VisualRecognitionV3/turtle_positive_examples.zip deleted file mode 100644 index 22fbb0b3a..000000000 Binary files a/Tests/TestData/VisualRecognitionV3/turtle_positive_examples.zip and /dev/null differ diff --git a/Tests/TestData/VisualRecognitionV3/turtle_positive_examples.zip.meta b/Tests/TestData/VisualRecognitionV3/turtle_positive_examples.zip.meta deleted file mode 100644 index b9a76574e..000000000 --- a/Tests/TestData/VisualRecognitionV3/turtle_positive_examples.zip.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: fea4672a268340a4d871208f3e8fac4f -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/TestData/VisualRecognitionV3/turtle_to_classify.jpg b/Tests/TestData/VisualRecognitionV3/turtle_to_classify.jpg deleted file mode 100644 index 3dd7befec..000000000 Binary files a/Tests/TestData/VisualRecognitionV3/turtle_to_classify.jpg and /dev/null differ diff --git a/Tests/TestData/VisualRecognitionV3/turtle_to_classify.jpg.meta b/Tests/TestData/VisualRecognitionV3/turtle_to_classify.jpg.meta deleted file mode 100644 index 2096257a7..000000000 --- a/Tests/TestData/VisualRecognitionV3/turtle_to_classify.jpg.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 2378231219ecd374ea827228acf19951 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/ToneAnalyzerV3IntegrationTests.cs b/Tests/ToneAnalyzerV3IntegrationTests.cs deleted file mode 100644 index 979244a93..000000000 --- a/Tests/ToneAnalyzerV3IntegrationTests.cs +++ /dev/null @@ -1,126 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2018, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System.Collections; -using System.Collections.Generic; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Watson.ToneAnalyzer.V3; -using IBM.Watson.ToneAnalyzer.V3.Model; -using NUnit.Framework; -using UnityEngine.TestTools; -using System.Text; -using System.IO; - - -namespace IBM.Watson.Tests -{ - public class ToneAnalyzerV3IntegrationTests - { - private ToneAnalyzerService service; - private string versionDate = "2019-02-13"; - private string inputText = "Hello! Welcome to IBM Watson! How can I help you?"; - private string chatUser = "testChatUser"; - - [OneTimeSetUp] - public void OneTimeSetup() - { - LogSystem.InstallDefaultReactors(); - } - - [UnitySetUp] - public IEnumerator UnityTestSetup() - { - if (service == null) - { - service = new ToneAnalyzerService(versionDate); - } - - while (!service.Authenticator.CanAuthenticate()) - yield return null; - } - - [SetUp] - public void TestSetup() - { - service.WithHeader("X-Watson-Test", "1"); - } - - #region Tone - [UnityTest, Order(0)] - public IEnumerator TestTone() - { - Log.Debug("ToneAnalyzerServiceV3IntegrationTests", "Attempting to Tone..."); - ToneAnalysis toneResponse = null; - byte[] bytes = Encoding.ASCII.GetBytes(inputText); - MemoryStream toneInput = new MemoryStream(bytes); - service.Tone( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("ToneAnalyzerServiceV3IntegrationTests", "Tone result: {0}", response.Response); - toneResponse = response.Result; - Assert.IsNotNull(toneResponse); - Assert.IsNotNull(toneResponse.SentencesTone); - Assert.IsNotNull(toneResponse.DocumentTone); - Assert.IsNull(error); - }, - toneInput: toneInput, - contentLanguage: "en", - acceptLanguage: "en", - contentType: "text/plain" - ); - - while (toneResponse == null) - yield return null; - } - #endregion - - #region ToneChat - [UnityTest, Order(1)] - public IEnumerator TestToneChat() - { - Log.Debug("ToneAnalyzerServiceV3IntegrationTests", "Attempting to ToneChat..."); - UtteranceAnalyses toneChatResponse = null; - List utterances = new List() - { - new Utterance() - { - Text = inputText, - User = chatUser - } - }; - service.ToneChat( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("ToneAnalyzerServiceV3IntegrationTests", "ToneChat result: {0}", response.Response); - toneChatResponse = response.Result; - Assert.IsNotNull(toneChatResponse); - Assert.IsNotNull(toneChatResponse.UtterancesTone); - Assert.IsNull(error); - }, - utterances: utterances, - contentLanguage: "en", - acceptLanguage: "en" - ); - - while (toneChatResponse == null) - yield return null; - } - #endregion - - } -} diff --git a/Tests/ToneAnalyzerV3IntegrationTests.cs.meta b/Tests/ToneAnalyzerV3IntegrationTests.cs.meta deleted file mode 100644 index 1b394b32c..000000000 --- a/Tests/ToneAnalyzerV3IntegrationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dadba47dab65a234ababe0dd3783b6d9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/VisualRecognitionV3IntegrationTests.cs b/Tests/VisualRecognitionV3IntegrationTests.cs deleted file mode 100644 index 269ca6d2f..000000000 --- a/Tests/VisualRecognitionV3IntegrationTests.cs +++ /dev/null @@ -1,381 +0,0 @@ -/** -* Copyright 2018, 2019 IBM Corp. All Rights Reserved. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Utilities; -using IBM.Watson.VisualRecognition.V3; -using IBM.Watson.VisualRecognition.V3.Model; -using NUnit.Framework; -using UnityEngine; -using UnityEngine.TestTools; - -namespace IBM.Watson.Tests -{ - public class VisualRecognitionV3IntegrationTests - { - private VisualRecognitionService service; - private string versionDate = "2019-02-13"; - private string giraffePositiveExamplesFilepath; - private string turtlePositiveExamplesFilepath; - private string negativeExamplesFilepath; - private string giraffeImageFilepath; - private string turtleImageFilepath; - private string turtleImageContentType = "image/jpeg"; - private string obamaImageFilepath; - private string imageMetadataFilepath; - private string classifierName = "unity-sdk-classifier-safe-to-delete"; - private string classifierId; - private bool isClassifierReady = false; - - [OneTimeSetUp] - public void OneTimeSetup() - { - LogSystem.InstallDefaultReactors(); - - giraffePositiveExamplesFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/giraffe_positive_examples.zip"; - turtlePositiveExamplesFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/turtle_positive_examples.zip"; - negativeExamplesFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/negative_examples.zip"; - giraffeImageFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/giraffe_to_classify.jpg"; - turtleImageFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/turtle_to_classify.jpg"; - obamaImageFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/obama.jpg"; - imageMetadataFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/imageMetadata.json"; - } - - [UnitySetUp] - public IEnumerator UnityTestSetup() - { - if (service == null) - { - service = new VisualRecognitionService(versionDate); - } - - while (!service.Authenticator.CanAuthenticate()) - yield return null; - } - - [SetUp] - public void TestSetup() - { - service.WithHeader("X-Watson-Test", "1"); - } - - #region CreateClassifier - //[UnityTest, Order(0)] - public IEnumerator TestCreateClassifier() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to CreateClassifier..."); - Classifier createClassifierResponse = null; - using (FileStream fs0 = File.OpenRead(giraffePositiveExamplesFilepath)) - { - using (FileStream fs1 = File.OpenRead(negativeExamplesFilepath)) - { - using (MemoryStream ms0 = new MemoryStream()) - { - using (MemoryStream ms1 = new MemoryStream()) - { - fs0.CopyTo(ms0); - fs1.CopyTo(ms1); - Dictionary positiveExamples = new Dictionary(); - positiveExamples.Add("giraffe", ms0); - service.CreateClassifier( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "CreateClassifier result: {0}", response.Response); - createClassifierResponse = response.Result; - classifierId = createClassifierResponse.ClassifierId; - Assert.IsNotNull(createClassifierResponse); - Assert.IsNotNull(classifierId); - Assert.IsTrue(createClassifierResponse.Name == classifierName); - Assert.IsNotNull(createClassifierResponse.Classes); - Assert.IsTrue(createClassifierResponse.Classes.Count > 0); - Assert.IsTrue(createClassifierResponse.Classes[0]._Class == "giraffe"); - Assert.IsNull(error); - }, - name: classifierName, - positiveExamples: positiveExamples, - negativeExamples: ms1, - negativeExamplesFilename: Path.GetFileName(negativeExamplesFilepath) - ); - - while (createClassifierResponse == null) - yield return null; - } - } - } - } - } - #endregion - - #region Classify - [UnityTest, Order(1)] - public IEnumerator TestClassify() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to Classify..."); - ClassifiedImages classifyResponse = null; - using (FileStream fs = File.OpenRead(turtleImageFilepath)) - { - using (MemoryStream ms = new MemoryStream()) - { - fs.CopyTo(ms); - service.Classify( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Classify result: {0}", response.Response); - classifyResponse = response.Result; - Assert.IsNotNull(classifyResponse); - Assert.IsNotNull(classifyResponse.Images); - Assert.IsTrue(classifyResponse.Images.Count > 0); - Assert.IsNotNull(classifyResponse.Images[0].Classifiers); - Assert.IsTrue(classifyResponse.Images[0].Classifiers.Count > 0); - Assert.IsNull(error); - }, - imagesFile: ms, - imagesFileContentType: turtleImageContentType, - imagesFilename: Path.GetFileName(turtleImageFilepath) - ); - - while (classifyResponse == null) - yield return null; - } - } - } - #endregion - - #region GetClassifier - //[UnityTest, Order(3)] - public IEnumerator TestGetClassifier() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to GetClassifier..."); - Classifier getClassifierResponse = null; - service.GetClassifier( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "GetClassifier result: {0}", response.Response); - getClassifierResponse = response.Result; - Assert.IsNotNull(getClassifierResponse); - Assert.IsTrue(getClassifierResponse.ClassifierId == classifierId); - Assert.IsNull(error); - }, - classifierId: classifierId - ); - - while (getClassifierResponse == null) - yield return null; - } - #endregion - - #region ListClassifiers - [UnityTest, Order(4)] - public IEnumerator TestListClassifiers() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to ListClassifiers..."); - Classifiers listClassifiersResponse = null; - service.ListClassifiers( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "ListClassifiers result: {0}", response.Response); - listClassifiersResponse = response.Result; - Assert.IsNotNull(listClassifiersResponse); - Assert.IsNotNull(listClassifiersResponse._Classifiers); - Assert.IsTrue(listClassifiersResponse._Classifiers.Count > 0); - Assert.IsNull(error); - }, - verbose: true - ); - - while (listClassifiersResponse == null) - yield return null; - } - #endregion - - #region WaitForClassifier - //[UnityTest, Order(5)] - [Timeout(int.MaxValue)] - public IEnumerator WaitForClassifier() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to WaitForClassifier..."); - isClassifierReady = false; - Runnable.Run(CheckClassifierStatus()); - - while (!isClassifierReady) - yield return null; - } - #endregion - - #region UpdateClassifier - //[UnityTest, Order(6)] - public IEnumerator TestUpdateClassifier() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to UpdateClassifier..."); - using (FileStream fs = File.OpenRead(turtlePositiveExamplesFilepath)) - { - using (MemoryStream ms = new MemoryStream()) - { - fs.CopyTo(ms); - Classifier updateClassifierResponse = null; - Dictionary positiveExamples = new Dictionary(); - positiveExamples.Add("turtles_positive_examples", ms); - service.UpdateClassifier( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "UpdateClassifier result: {0}", response.Response); - updateClassifierResponse = response.Result; - Assert.IsNotNull(updateClassifierResponse); - Assert.IsNotNull(updateClassifierResponse.Classes); - Assert.IsTrue(updateClassifierResponse.Classes.Count > 0); - Assert.IsNull(error); - }, - classifierId: classifierId, - positiveExamples: positiveExamples - ); - - while (updateClassifierResponse == null) - yield return null; - } - } - } - #endregion - - #region WaitForClassifier - //[UnityTest, Order(7)] - [Timeout(int.MaxValue)] - public IEnumerator WaitForClassifier2() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to WaitForClassifier2..."); - isClassifierReady = false; - Runnable.Run(CheckClassifierStatus()); - - while (!isClassifierReady) - yield return null; - } - #endregion - - #region GetCoreMlModel - //[UnityTest, Order(8)] - public IEnumerator TestGetCoreMlModel() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to GetCoreMlModel..."); - byte[] getCoreMlModelResponse = null; - service.GetCoreMlModel( - callback: (DetailedResponse response, IBMError error) => - { - getCoreMlModelResponse = response.Result; - Assert.IsNotNull(getCoreMlModelResponse); - Assert.IsNull(error); - - // Save file - using (FileStream fs = File.Create(Application.dataPath + "/myModel.mlmodel")) - { - fs.Write(getCoreMlModelResponse, 0, getCoreMlModelResponse.Length); - fs.Close(); - } - }, - classifierId: classifierId - ); - - while (getCoreMlModelResponse == null) - yield return null; - } - #endregion - - #region DeleteClassifier - //[UnityTest, Order(98)] - public IEnumerator TestDeleteClassifier() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to DeleteClassifier..."); - bool isComplete = false; - service.DeleteClassifier( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "DeleteClassifier result: {0}", response.Response); - Assert.IsTrue(response.StatusCode == 200); - Assert.IsNull(error); - isComplete = true; - }, - classifierId: classifierId - ); - - while (!isComplete) - yield return null; - } - #endregion - - #region DeleteUserData - [UnityTest, Order(99)] - public IEnumerator TestDeleteUserData() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to DeleteUserData..."); - object deleteUserDataResponse = null; - service.DeleteUserData( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "DeleteUserData result: {0}", response.Response); - deleteUserDataResponse = response.Result; - Assert.IsNotNull(deleteUserDataResponse); - Assert.IsNull(error); - }, - customerId: "customerId" - ); - - while (deleteUserDataResponse == null) - yield return null; - } - #endregion - - #region CheckClassifierStatus - private IEnumerator CheckClassifierStatus() - { - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to CheckClassifierStatus in 15 seconds..."); - yield return new WaitForSeconds(15f); - - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "Attempting to GetClassifier..."); - Classifier getClassifierResponse = null; - try - { - service.GetClassifier( - callback: (DetailedResponse response, IBMError error) => - { - getClassifierResponse = response.Result; - Log.Debug("VisualRecognitionServiceV3IntegrationTests", "CheckClassifierStatus: {0}", getClassifierResponse.Status); - if (getClassifierResponse.Status == Classifier.StatusValue.READY || getClassifierResponse.Status == Classifier.StatusValue.FAILED) - { - isClassifierReady = true; - } - else - { - Runnable.Run(CheckClassifierStatus()); - } - }, - classifierId: classifierId - ); - } - catch - { - Runnable.Run(CheckClassifierStatus()); - } - - while (getClassifierResponse == null) - yield return null; - } - #endregion - } -} diff --git a/Tests/VisualRecognitionV3IntegrationTests.cs.meta b/Tests/VisualRecognitionV3IntegrationTests.cs.meta deleted file mode 100644 index 6c904cd6a..000000000 --- a/Tests/VisualRecognitionV3IntegrationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b83c88558b29e284da9badd358e476be -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/VisualRecognitionV4IntegrationTests.cs b/Tests/VisualRecognitionV4IntegrationTests.cs deleted file mode 100644 index 412c24183..000000000 --- a/Tests/VisualRecognitionV4IntegrationTests.cs +++ /dev/null @@ -1,503 +0,0 @@ -/** -* (C) Copyright IBM Corp. 2018, 2020. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Text; -using IBM.Cloud.SDK; -using IBM.Cloud.SDK.Authentication; -using IBM.Cloud.SDK.Utilities; -using IBM.Cloud.SDK.Model; -using IBM.Watson.VisualRecognition.V4; -using IBM.Watson.VisualRecognition.V4.Model; -using NUnit.Framework; -using UnityEngine; -using UnityEngine.TestTools; - -namespace IBM.Watson.Tests -{ - public class VisualRecognitionV4IntegrationTests - { - private VisualRecognitionService service; - private string versionDate = "2019-02-13"; - private string negativeExamplesFilepath; - private string giraffeImageFilepath; - private string turtleImageFilepath; - private string imageMetadataFilepath; - private string giraffeCollectionId = "a06f7036-0529-49ee-bdf6-82ddec276923"; - private string giraffeClassname = "giraffe"; - private string collectionId; - private string imageId; - - [OneTimeSetUp] - public void OneTimeSetup() - { - LogSystem.InstallDefaultReactors(); - - negativeExamplesFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/negative_examples.zip"; - giraffeImageFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/giraffe_to_classify.jpg"; - turtleImageFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/turtle_to_classify.jpg"; - imageMetadataFilepath = Application.dataPath + "/Watson/Tests/TestData/VisualRecognitionV3/imageMetadata.json"; - } - - [UnitySetUp] - public IEnumerator UnityTestSetup() - { - if (service == null) - { - service = new VisualRecognitionService(versionDate); - } - - while (!service.Authenticator.CanAuthenticate()) - yield return null; - } - - [SetUp] - public void TestSetup() - { - service.WithHeader("X-Watson-Test", "1"); - } - - #region Analyze - [UnityTest, Order(1)] - public IEnumerator TestAnalyze() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Analyze..."); - AnalyzeResponse analyzeResponse = null; - List imagesFile = new List(); - using (FileStream fs1 = File.OpenRead(giraffeImageFilepath), fs2 = File.OpenRead(turtleImageFilepath)) - { - using (MemoryStream ms1 = new MemoryStream(), ms2 = new MemoryStream()) - { - fs1.CopyTo(ms1); - fs2.CopyTo(ms2); - FileWithMetadata fileWithMetadata = new FileWithMetadata() - { - Data = ms1, - ContentType = "image/jpeg", - Filename = Path.GetFileName(giraffeImageFilepath) - }; - imagesFile.Add(fileWithMetadata); - - FileWithMetadata fileWithMetadata2 = new FileWithMetadata() - { - Data = ms2, - ContentType = "image/jpeg", - Filename = Path.GetFileName(turtleImageFilepath) - }; - imagesFile.Add(fileWithMetadata2); - - service.Analyze( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Analyze result: {0}", response.Response); - analyzeResponse = response.Result; - Assert.IsNotNull(analyzeResponse); - Assert.IsNotNull(analyzeResponse.Images); - Assert.IsTrue(analyzeResponse.Images.Count > 0); - Assert.IsNotNull(analyzeResponse.Images[0].Objects.Collections); - Assert.IsTrue(analyzeResponse.Images[0].Objects.Collections.Count > 0); - Assert.IsNull(error); - }, - collectionIds: new List() { giraffeCollectionId }, - features: new List() { "objects" }, - imagesFile: imagesFile - ); - - while (analyzeResponse == null) - yield return null; - } - } - } - #endregion - - #region Collections - [UnityTest, Order(2)] - public IEnumerator TestListCollections() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to List Collections..."); - CollectionsList collectionsList = null; - service.ListCollections( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "List Collections result: {0}", response.Response); - collectionsList = response.Result; - Assert.IsNotNull(collectionsList.Collections); - Assert.IsTrue(collectionsList.Collections.Count > 0); - Assert.IsNull(error); - } - ); - - while (collectionsList == null) - yield return null; - } - - [UnityTest, Order(3)] - public IEnumerator TestGetCollection() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Get Collection..."); - Collection collection = null; - service.GetCollection( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "GetCollection result: {0}", response.Response); - collection = response.Result; - Assert.IsNotNull(collection.CollectionId); - Assert.IsTrue(collection.CollectionId == giraffeCollectionId); - Assert.IsNull(error); - }, - collectionId: giraffeCollectionId - ); - - while (collection == null) - yield return null; - } - - [UnityTest, Order(4)] - public IEnumerator TestCreateCollection() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Create Collection..."); - Collection collection = null; - service.CreateCollection( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "CreateCollection result: {0}", response.Response); - collection = response.Result; - Assert.IsNotNull(collection.CollectionId); - Assert.IsNull(error); - collectionId = collection.CollectionId; - } - ); - - while (collection == null) - yield return null; - } - - [UnityTest, Order(5)] - public IEnumerator TestUpdateCollection() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Update Collection..."); - Collection collection = null; - string updatedTestCollectionName = "newTestCollection"; - byte[] updatedTestCollectionNameUtf8Bytes = System.Text.Encoding.UTF8.GetBytes(updatedTestCollectionName); - service.UpdateCollection( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "UpdateCollection result: {0}", response.Response); - collection = response.Result; - Assert.IsNotNull(collection.CollectionId); - Assert.IsTrue(collection.CollectionId == collectionId); - Assert.IsNull(error); - }, - collectionId: collectionId, - name: System.Text.Encoding.UTF8.GetString(updatedTestCollectionNameUtf8Bytes) - ); - - while (collection == null) - yield return null; - } - - [UnityTest, Order(99)] - public IEnumerator TestDeleteCollection() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Delete Collection..."); - bool isComplete = false; - service.DeleteCollection( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "DeleteCollection result: {0}", response.Response); - Assert.IsNotNull(response.Result); - Assert.IsTrue(response.StatusCode == 200); - isComplete = true; - }, - collectionId: collectionId - ); - - while (isComplete == true) - yield return null; - } - #endregion - - #region Images - [UnityTest, Order(6)] - public IEnumerator TestAddImage() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Add Images..."); - ImageDetailsList imageDetailsList = null; - List imagesFile = new List(); - using (FileStream fs1 = File.OpenRead(giraffeImageFilepath), fs2 = File.OpenRead(turtleImageFilepath)) - { - using (MemoryStream ms1 = new MemoryStream(), ms2 = new MemoryStream()) - { - fs1.CopyTo(ms1); - fs2.CopyTo(ms2); - FileWithMetadata fileWithMetadata = new FileWithMetadata() - { - Data = ms1, - ContentType = "image/jpeg", - Filename = Path.GetFileName(giraffeImageFilepath) - }; - imagesFile.Add(fileWithMetadata); - - FileWithMetadata fileWithMetadata2 = new FileWithMetadata() - { - Data = ms2, - ContentType = "image/jpeg", - Filename = Path.GetFileName(turtleImageFilepath) - }; - imagesFile.Add(fileWithMetadata2); - - service.AddImages( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "AddImages result: {0}", response.Response); - imageDetailsList = response.Result; - Assert.IsNotNull(imageDetailsList.Images); - Assert.IsTrue(imageDetailsList.Images.Count > 0); - Assert.IsNull(error); - imageId = imageDetailsList.Images[0].ImageId; - }, - collectionId: collectionId, - imagesFile: imagesFile - ); - - while (imageDetailsList == null) - yield return null; - } - } - } - - [UnityTest, Order(7)] - public IEnumerator TestListImages() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to List Images..."); - ImageSummaryList imagesList = null; - service.ListImages( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "ListImages result: {0}", response.Response); - imagesList = response.Result; - Assert.IsNotNull(imagesList.Images); - Assert.IsTrue(imagesList.Images.Count > 0); - Assert.IsNull(error); - }, - collectionId: collectionId - ); - - while (imagesList == null) - yield return null; - } - - [UnityTest, Order(8)] - public IEnumerator TestGetImage() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Get Image..."); - ImageDetails imageDetails = null; - service.GetImageDetails( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "GetImage result: {0}", response.Response); - imageDetails = response.Result; - Assert.IsNotNull(imageDetails); - Assert.IsTrue(imageDetails.ImageId == imageId); - Assert.IsNull(error); - }, - collectionId: collectionId, - imageId: imageId - ); - - while (imageDetails == null) - yield return null; - } - - [UnityTest, Order(9)] - public IEnumerator TestGetJpegImage() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Get Image..."); - bool isComplete = false; - service.GetJpegImage( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "GetImage result: {0}", response.Response); - Assert.IsNotNull(response.Result); - isComplete = true; - }, - collectionId: collectionId, - imageId: imageId - ); - - while (isComplete == true) - yield return null; - } - - [UnityTest, Order(98)] - public IEnumerator TestDeleteImage() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Delete Image..."); - bool isComplete = false; - service.DeleteImage( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "DeleteImage result: {0}", response.Response); - Assert.IsNotNull(response.Result); - Assert.IsTrue(response.StatusCode == 200); - isComplete = true; - }, - collectionId: collectionId, - imageId: imageId - ); - - while (isComplete == true) - yield return null; - } - #endregion - - #region Training Data - [UnityTest, Order(10)] - public IEnumerator TestAddImageTrainingData() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Add Image Training Data..."); - TrainingDataObjects trainingDataObjects = null; - var objectName = giraffeClassname; - List objects = new List() - { - new TrainingDataObject() - { - _Object = objectName, - Location = new Location() - { - Left = 27, - Top = 64, - Width = 75, - Height = 78 - } - - } - }; - service.AddImageTrainingData( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "AddImageTrainingData result: {0}", response.Response); - trainingDataObjects = response.Result; - Assert.IsNotNull(trainingDataObjects); - Assert.IsTrue(trainingDataObjects.Objects.Count > 0); - Assert.IsNull(error); - }, - collectionId: collectionId, - imageId: imageId, - objects: objects - ); - - while (trainingDataObjects == null) - yield return null; - } - - [UnityTest, Order(11)] - public IEnumerator TestTrain() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Train..."); - Collection collection = null; - service.Train( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Train result: {0}", response.Response); - collection = response.Result; - Assert.IsNotNull(collection); - Assert.IsTrue(collection.TrainingStatus.Objects.InProgress == true); - Assert.IsNull(error); - }, - collectionId: collectionId - ); - - while (collection == null) - yield return null; - } - - [UnityTest, Order(12)] - public IEnumerator TestGetTrainingUsage() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Train..."); - var startTime = "2019-11-18"; - var endTime = "2020-11-20"; - var dateStartTime = DateTime.Parse(startTime); - var dateEndTime = DateTime.Parse(endTime); - TrainingEvents trainingEvents = null; - service.GetTrainingUsage( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "GetTrainingUsage result: {0}", response.Response); - trainingEvents = response.Result; - Assert.IsNotNull(trainingEvents); - Assert.IsNotNull(trainingEvents.Events); - Assert.IsTrue(trainingEvents.Events.Count > 0); - Assert.IsNull(error); - }, - startTime: dateStartTime, - endTime: dateEndTime - ); - - while (trainingEvents == null) - yield return null; - } - - [UnityTest, Order(13)] - public IEnumerator TestListObjectMetadata() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to List ObjectMetadata..."); - ObjectMetadataList objectList = null; - service.ListObjectMetadata( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "ListObjectMetadata result: {0}", response.Response); - objectList = response.Result; - Assert.IsNotNull(objectList.Objects); - Assert.IsTrue(objectList.Objects.Count > 0); - Assert.IsNull(error); - }, - collectionId: giraffeCollectionId - ); - - while (objectList == null) - yield return null; - } - - [UnityTest, Order(13)] - public IEnumerator TestGetObjectMetadata() - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "Attempting to Get ObjectMetadata..."); - ObjectMetadata objectMetadata = null; - service.GetObjectMetadata( - callback: (DetailedResponse response, IBMError error) => - { - Log.Debug("VisualRecognitionServiceV4IntegrationTests", "GetObjectMetadata result: {0}", response.Response); - objectMetadata = response.Result; - Assert.IsNotNull(objectMetadata._Object); - Assert.IsTrue(objectMetadata.Count > 0); - Assert.IsNull(error); - }, - collectionId: giraffeCollectionId, - _object: "giraffe" - ); - - while (objectMetadata == null) - yield return null; - } - #endregion - } -} diff --git a/Tests/VisualRecognitionV4IntegrationTests.cs.meta b/Tests/VisualRecognitionV4IntegrationTests.cs.meta deleted file mode 100644 index 56709d89d..000000000 --- a/Tests/VisualRecognitionV4IntegrationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1942de15e39b34bc8b5f8705c9b95a1a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: