Skip to content

Commit d49dad7

Browse files
authored
Merge pull request #663 from watson-developer-cloud/regenerate-taj
feat(regeneration): regenerated with generator 3.21.0 and api def sdk-major-release-2020
2 parents 0339538 + 7f0cf63 commit d49dad7

File tree

163 files changed

+2237
-2446
lines changed

Some content is hidden

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

163 files changed

+2237
-2446
lines changed

Examples/ExampleNaturalLanguageClassifierV1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019, 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

Examples/ExampleNaturalLanguageUnderstandingV1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019, 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

Examples/ExamplePersonalityInsightsV3.cs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using System.Collections.Generic;
2727
using System.IO;
2828
using UnityEngine;
29+
using System.Text;
2930

3031
namespace IBM.Watson.Examples
3132
{
@@ -62,18 +63,8 @@ private IEnumerator CreateService()
6263

6364
private IEnumerator Examples()
6465
{
65-
Content content = new Content()
66-
{
67-
ContentItems = new List<ContentItem>()
68-
{
69-
new ContentItem()
70-
{
71-
Content = testString,
72-
Contenttype = ContentItem.ContenttypeValue.TEXT_PLAIN,
73-
Language = ContentItem.LanguageValue.EN
74-
}
75-
}
76-
};
66+
byte[] bytes = Encoding.ASCII.GetBytes(testString);
67+
MemoryStream content = new MemoryStream(bytes);
7768

7869
Log.Debug("ExamplePersonalityInsights.Examples()", "Attempting to Profile...");
7970
service.Profile(OnProfile, content: content);

Examples/ExampleToneAnalyzerV3.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019, 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,8 @@
2424
using IBM.Cloud.SDK;
2525
using IBM.Cloud.SDK.Authentication;
2626
using IBM.Cloud.SDK.Authentication.Iam;
27+
using System.Text;
28+
using System.IO;
2729

2830
namespace IBM.Watson.Examples
2931
{
@@ -79,10 +81,8 @@ private IEnumerator CreateService()
7981

8082
private IEnumerator Examples()
8183
{
82-
ToneInput toneInput = new ToneInput()
83-
{
84-
Text = stringToTestTone
85-
};
84+
byte[] bytes = Encoding.ASCII.GetBytes(stringToTestTone);
85+
MemoryStream toneInput = new MemoryStream(bytes);
8686

8787
List<string> tones = new List<string>()
8888
{

Examples/GenericSerialization.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ void Start()
3434

3535
MessageResponse messageResponse = JsonConvert.DeserializeObject<MessageResponse>(responseJson);
3636

37-
var name = messageResponse.Context.Skills.Get("main skill").UserDefined["name"].ToString();
37+
MessageContextSkill mainSkill;
38+
messageResponse.Context.Skills.TryGetValue("main skill", out mainSkill);
39+
var name = mainSkill.UserDefined["name"].ToString();
3840
Log.Debug("GenericSerialization", "name: {0}", name);
3941

4042
}

0 commit comments

Comments
 (0)