Skip to content

Commit 68ecf2d

Browse files
authored
Merge pull request #400 from watson-developer-cloud/4.0.0-rc
.NET Standard SDK v4.0.0
2 parents d9831e6 + 0c5d14a commit 68ecf2d

File tree

225 files changed

+7811
-6690
lines changed

Some content is hidden

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

225 files changed

+7811
-6690
lines changed

.bumpversion.cfg

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ replace = {new_version}
1515
search = {current_version}
1616
replace = {new_version}
1717

18-
[bumpversion:file:src/IBM.Watson.Common/Common.cs]
19-
search = {current_version}
20-
replace = {new_version}
21-
22-
[bumpversion:file:src/IBM.Watson.Common/IBM.Watson.Common.csproj]
23-
search = {current_version}
24-
replace = {new_version}
25-
2618
[bumpversion:file:src/IBM.Watson.CompareComply.v1/IBM.Watson.CompareComply.v1.csproj]
2719
search = {current_version}
2820
replace = {new_version}
@@ -63,6 +55,10 @@ replace = {new_version}
6355
search = {current_version}
6456
replace = {new_version}
6557

58+
[bumpversion:file:src/IBM.Watson.VisualRecognition.v4/IBM.Watson.VisualRecognition.v4.csproj]
59+
search = {current_version}
60+
replace = {new_version}
61+
6662
[bumpversion:file:test/Assistant.v1.IntegrationTests/IBM.Watson.Assistant.v1.IntegrationTests.csproj]
6763
search = {current_version}
6864
replace = {new_version}
@@ -143,3 +139,10 @@ replace = {new_version}
143139
search = {current_version}
144140
replace = {new_version}
145141

142+
[bumpversion:file:test/VisualRecognition.v4.IntegrationTests/IBM.Watson.VisualRecognition.v4.IntegrationTests.csproj]
143+
search = {current_version}
144+
replace = {new_version}
145+
146+
[bumpversion:file:test/VisualRecognition.v4.UnitTests/IBM.Watson.VisualRecognition.v4.UnitTests.csproj]
147+
search = {current_version}
148+
replace = {new_version}

IBM.Watson.sln

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.Watson.ToneAnalyzer.v3.
119119
EndProject
120120
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.Watson.VisualRecognition.v3.Examples", "examples\IBM.Watson.VisualRecognition.v3.Examples\IBM.Watson.VisualRecognition.v3.Examples.csproj", "{EBED7B56-15D3-472E-A758-6452415AA941}"
121121
EndProject
122+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualRecognitionV4", "VisualRecognitionV4", "{69DE0999-CABC-4108-9B49-2B902D9A318E}"
123+
EndProject
124+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.Watson.VisualRecognition.v4", "src\IBM.Watson.VisualRecognition.v4\IBM.Watson.VisualRecognition.v4.csproj", "{DC0B8384-A8F4-49E0-9A72-57FF4AA124C3}"
125+
EndProject
126+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.Watson.VisualRecognition.v4.IntegrationTests", "test\VisualRecognition.v4.IntegrationTests\IBM.Watson.VisualRecognition.v4.IntegrationTests.csproj", "{86FC135E-3D1E-40FE-9BE6-1B0A72ACDC20}"
127+
EndProject
128+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.Watson.VisualRecognition.v4.UnitTests", "test\VisualRecognition.v4.UnitTests\IBM.Watson.VisualRecognition.v4.UnitTests.csproj", "{AF2B1FCA-118D-4ABA-B7B0-EFB6BBC7164F}"
129+
EndProject
130+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IBM.Watson.VisualRecognition.v4.Examples", "examples\IBM.Watson.VisualRecognition.v4.Examples\IBM.Watson.VisualRecognition.v4.Examples.csproj", "{EAB0C966-76C7-4457-AAC4-383A298A5EAB}"
131+
EndProject
122132
Global
123133
GlobalSection(SolutionConfigurationPlatforms) = preSolution
124134
Debug|Any CPU = Debug|Any CPU
@@ -305,6 +315,22 @@ Global
305315
{EBED7B56-15D3-472E-A758-6452415AA941}.Debug|Any CPU.Build.0 = Debug|Any CPU
306316
{EBED7B56-15D3-472E-A758-6452415AA941}.Release|Any CPU.ActiveCfg = Release|Any CPU
307317
{EBED7B56-15D3-472E-A758-6452415AA941}.Release|Any CPU.Build.0 = Release|Any CPU
318+
{DC0B8384-A8F4-49E0-9A72-57FF4AA124C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
319+
{DC0B8384-A8F4-49E0-9A72-57FF4AA124C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
320+
{DC0B8384-A8F4-49E0-9A72-57FF4AA124C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
321+
{DC0B8384-A8F4-49E0-9A72-57FF4AA124C3}.Release|Any CPU.Build.0 = Release|Any CPU
322+
{86FC135E-3D1E-40FE-9BE6-1B0A72ACDC20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
323+
{86FC135E-3D1E-40FE-9BE6-1B0A72ACDC20}.Debug|Any CPU.Build.0 = Debug|Any CPU
324+
{86FC135E-3D1E-40FE-9BE6-1B0A72ACDC20}.Release|Any CPU.ActiveCfg = Release|Any CPU
325+
{86FC135E-3D1E-40FE-9BE6-1B0A72ACDC20}.Release|Any CPU.Build.0 = Release|Any CPU
326+
{AF2B1FCA-118D-4ABA-B7B0-EFB6BBC7164F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
327+
{AF2B1FCA-118D-4ABA-B7B0-EFB6BBC7164F}.Debug|Any CPU.Build.0 = Debug|Any CPU
328+
{AF2B1FCA-118D-4ABA-B7B0-EFB6BBC7164F}.Release|Any CPU.ActiveCfg = Release|Any CPU
329+
{AF2B1FCA-118D-4ABA-B7B0-EFB6BBC7164F}.Release|Any CPU.Build.0 = Release|Any CPU
330+
{EAB0C966-76C7-4457-AAC4-383A298A5EAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
331+
{EAB0C966-76C7-4457-AAC4-383A298A5EAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
332+
{EAB0C966-76C7-4457-AAC4-383A298A5EAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
333+
{EAB0C966-76C7-4457-AAC4-383A298A5EAB}.Release|Any CPU.Build.0 = Release|Any CPU
308334
EndGlobalSection
309335
GlobalSection(SolutionProperties) = preSolution
310336
HideSolutionNode = FALSE
@@ -354,6 +380,10 @@ Global
354380
{D8E0E626-B930-42A9-88E7-13C05A08B868} = {A86D4D5B-AECE-49F2-A2BC-F6897B3EB2E8}
355381
{523AE6E0-11CD-40CA-ABB1-8010E35C416D} = {C7873F44-7188-49BE-84C5-532BE4E07147}
356382
{EBED7B56-15D3-472E-A758-6452415AA941} = {A1BC3262-1837-40D9-A530-DCFE679927C2}
383+
{DC0B8384-A8F4-49E0-9A72-57FF4AA124C3} = {69DE0999-CABC-4108-9B49-2B902D9A318E}
384+
{86FC135E-3D1E-40FE-9BE6-1B0A72ACDC20} = {69DE0999-CABC-4108-9B49-2B902D9A318E}
385+
{AF2B1FCA-118D-4ABA-B7B0-EFB6BBC7164F} = {69DE0999-CABC-4108-9B49-2B902D9A318E}
386+
{EAB0C966-76C7-4457-AAC4-383A298A5EAB} = {69DE0999-CABC-4108-9B49-2B902D9A318E}
357387
EndGlobalSection
358388
GlobalSection(ExtensibilityGlobals) = postSolution
359389
SolutionGuid = {B9D9D17B-1C17-402F-B701-DC671528690A}

MIGRATION-V4.md

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
### .NET SDK V4 Migration guide
2+
3+
#### Authentication
4+
5+
##### v3.x.x
6+
7+
Previously different `Config` objects were used for authentication.
8+
9+
```cs
10+
void Example()
11+
{
12+
IamConfig iamConfig = new IamConfig(
13+
apikey: "{iam-apikey}");
14+
service = new AssistantService("{versionDate}", iamConfig);
15+
service.SetEndpoint("{service-endpoint}");
16+
}
17+
```
18+
19+
Or constructors accepted `TokenOptions` or `username` and `password`.
20+
21+
```cs
22+
void Example()
23+
{
24+
service = new AssistantService("{tokenOptions}", "{versionDate}");
25+
service2 = new DiscoveryService("{username}", "{password}", "{versionDate}");
26+
}
27+
```
28+
29+
##### v4.x.x
30+
31+
Now we use an `Authenticator` to authenticate the service. Available authentication schemes include `IamAuthenticator`, `BasicAuthenticator`, `CloudPakForDataAuthenticator` and `BearerTokenAuthenticator`
32+
33+
###### IamAuthenticator
34+
35+
```cs
36+
void Example()
37+
{
38+
IamAuthenticator authenticator = new IamAuthenticator(
39+
apikey: "{apikey}");
40+
var service = new AssistantService("{versionDate}", authenticator);
41+
service.SetServiceUrl("{serviceUrl}");
42+
}
43+
```
44+
45+
##### BasicAuthenticator
46+
47+
```cs
48+
void Example()
49+
{
50+
BasicAuthenticator authenticator = new BasicAuthenticator(
51+
username: "{username}",
52+
password: "{password}");
53+
var service = new AssistantService("{versionDate}", authenticator);
54+
service.SetServiceUrl("{serviceUrl}");
55+
}
56+
```
57+
58+
###### BearerTokenAuthenticator
59+
60+
```cs
61+
void Example()
62+
{
63+
BearerTokenAuthenticator authenticator = new BearerTokenAuthenticator(
64+
bearerToken: "{bearerToken}");
65+
var service = new AssistantService("{versionDate}", authenticator);
66+
service.SetServiceUrl("{serviceUrl}");
67+
}
68+
```
69+
70+
###### CloudPakForDataAuthenticator
71+
72+
```cs
73+
void Example()
74+
{
75+
CloudPakForDataAuthenticator authenticator = new CloudPakForDataAuthenticator(
76+
url: "https://{cp4d_cluster_host}{:port}",
77+
username: "{username}",
78+
password: "{password}");
79+
var service = new AssistantService("{version-date}", authenticator);
80+
service.SetServiceUrl("{serviceUrl}");
81+
var results = service.Message("{workspace-id}", "{message-request}");
82+
}
83+
```
84+
85+
Constructors that did not take an `Authenticator` were removed.
86+
87+
#### Supplying credentials
88+
89+
You can supply credentials to your service using external `ibm-credentials.env` files.
90+
91+
```cs
92+
AssistantService service = new AssistantService("{version-date}");
93+
var listWorkspacesResult = service.ListWorkspaces();
94+
```
95+
96+
##### v3.x.x
97+
98+
Previously we would look for these files first in the system `home` directory, followed by the current project directory.
99+
100+
##### v4.x.x
101+
Now in order to allow developers to have different configurations for each project we look first in the current project directory, followed by the home directory.
102+
103+
#### Setting the service url
104+
105+
##### v3.x.x
106+
107+
Previously we set the service url via SetEndpoint() method.
108+
109+
```cs
110+
void Example()
111+
{
112+
IamConfig iamConfig = new IamConfig(
113+
apikey: "{iam-apikey}");
114+
service = new AssistantService("{versionDate}", iamConfig);
115+
service.SetEndpoint("{service-endpoint}");
116+
}
117+
```
118+
119+
##### v4.x.x
120+
121+
Now we set the service url via the SetServiceUrl() method.
122+
123+
```cs
124+
void Example()
125+
{
126+
IamAuthenticator authenticator = new IamAuthenticator(
127+
apikey: "{apikey}");
128+
var service = new AssistantService("{versionDate}", authenticator);
129+
service.SetServiceUrl("{serviceUrl}");
130+
}
131+
```
132+
133+
#### Service changes
134+
135+
##### Assistant v1
136+
137+
* `includeCount` is no longer a parameter of the `ListWorkspaces()` method
138+
* `includeCount` is no longer a parameter of the `ListIntents()` method
139+
* `includeCount` is no longer a parameter of the `ListExamples()` method
140+
* `includeCount` is no longer a parameter of the `ListCounterexamples()` method
141+
* `includeCount` is no longer a parameter of the `ListEntities()` method
142+
* `includeCount` is no longer a parameter of the `ListValues()` method
143+
* `includeCount` is no longer a parameter of the `ListSynonyms()` method
144+
* `includeCount` is no longer a parameter of the `ListDialogNodes()` method
145+
* `valueType` was renamed to `type` in the `CreateValue()` method
146+
* `newValueType` was renamed to `newType` in the `UpdateValue()` method
147+
* `nodeType` was renamed to `type` in the `CreateDialogNode()` method
148+
* `nodeType` was renamed to `type` in the `CreateDialogNode()` method
149+
* `newNodeType` was renamed to `newType` in the `UpdateDialogNode()` method
150+
* `ValueTypeEnumValue` was renamed to `TypeEnumValue` in the `CreateValue` model
151+
* `ValueType` was renamed to `Type` in the `CreateValue` model
152+
* `NodeTypeEnumValue` was renamed to `TypeEnumValue` in the `DialogNode` model
153+
* `NodeType` was renamed to `Type` in the `DialogNode` model
154+
* `ActionTypeEnumValue` was renamed to `TypeEnumValue` in the `DialogNodeAction` model
155+
* `ActionType` was renamed to `Type` in the `DialogNodeAction` model
156+
* `SEARCH_SKILL` constant was added to the `DialogNodeOutputGeneric` model
157+
* `QueryTypeEnumValue` constants were added to the `DialogNodeOutputGeneric` model
158+
* `QueryType` property was added to the `DialogNodeOutputGeneric` model
159+
* `Query` property was added to the `DialogNodeOutputGeneric` model
160+
* `Filter` property was added to the `DialogNodeOutputGeneric` model
161+
* `DiscoveryVersion` property was added to the `DialogNodeOutputGeneric` model
162+
* `Output` property type was converted from `Dictionary<string, object>` to `DialogSuggestionOutput` in the `DialogSuggestion` model
163+
* `LogMessage` model no longer has `additionalProperties`
164+
* `DialogRuntimeResponseGeneric` was renamed to `RuntimeResponseGeneric`
165+
* `RuntimeEntity` model no longer has `additionalProperties`
166+
* `RuntimeIntent` model no longer has `additionalProperties`
167+
* `ValueTypeEnumValue` was renamed to `TypeEnumValue` in the `Value` model
168+
* `ValueType` was renamed to `Type` in the `Value` model
169+
170+
##### Assistant v2
171+
172+
* `ActionTypeEnumValue` was renamed to `TypeEnumValue` in the `DialogNodeAction` model
173+
* `ActionType` was renamed to `Type` in the `DialogNodeAction` model
174+
* `DialogRuntimeResponseGeneric` was renamed to `RuntimeResponseGeneric`
175+
176+
##### Compare Comply v1
177+
178+
* `ConvertToHtml()` method does not require a `filename` parameter
179+
180+
##### Discovery v1
181+
182+
* `returnFields` was renamed to `_return` in the `Query()` method
183+
* `loggingOptOut` was renamed to `xWatsonLoggingOptOut` in the `Query()` method
184+
* `spellingSuggestions` was added to the `Query()` method
185+
* `collectionIds` is no longer a parameter of the `Query()` method
186+
* `returnFields` was renamed to `_return` in the `QueryNotices()` method
187+
* `loggingOptOut` was renamed to `xWatsonLoggingOptOut` in the `FederatedQuery()` method
188+
* `collectionIds` is now required in the `FederatedQuery()` method
189+
* `collectionIds` changed position in the `FederatedQuery()` method
190+
* `returnFields` was renamed to `_return` in the `FederatedQuery()` method
191+
* `returnFields` was renamed to `_return` in the `FederatedQueryNotices()` method
192+
* `EnrichmentName` was renamed to `_Enrichment` in the `Enrichment` model
193+
* `FieldTypeEnumValue` was renamed to `TypeEnumValue` in the `Field` model
194+
* `FieldType` was renamed to `Type` in the `Field` model
195+
* `FieldName` was renamed to `_Field` in the `Field` model
196+
* `TestConfigurationInEnvironment()` method was removed
197+
* `QueryEntities()` method was removed
198+
* `QueryRelations()` method was removed
199+
200+
##### Language Translator v3
201+
202+
* `defaultModels` was renamed to `_default` in the `ListModels()` method
203+
* `TranslationOutput` was renamed to `_Translation` in the `Translation` model
204+
205+
##### Natural Language Classifier v1
206+
207+
* `metadata` was renamed to `trainingMetadata` in the `CreateClassifier()` method
208+
209+
##### Speech to Text v1
210+
211+
* `processingMetrics` is no longer a parameter of the `Recognize()` method
212+
* `processingMetricsInterval` is no longer a parameter of the `Recognize()` method
213+
* `strict` is no longer a parameter of the `TrainLanguageModel()` method
214+
* `strict` is no longer a parameter of the `TrainAcousticModel()` method
215+
* `FinalResults` was renamed to `Final` in the `SpeakerLabelsResult` model
216+
* `FinalResults` was renamed to `Final` in the `SpeechRecognitionResult` model
217+
218+
##### Visual Recognition v3
219+
220+
* `DetectFaces()` method was removed
221+
* `ClassName` was renamed to `_Class` in the `ClassResult` model
222+
* `ClassName` was renamed to `_Class` in the `ModelClass` model
223+
224+
##### Visual Recognition v4
225+
226+
* New service!

0 commit comments

Comments
 (0)