Skip to content

feat(regeneration): regenerated with generator 3.21.0 and api def sdk-major-release-2020 #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Examples/ExampleNaturalLanguageClassifierV1.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2019 IBM Corp. All Rights Reserved.
* (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.
Expand Down
2 changes: 1 addition & 1 deletion Examples/ExampleNaturalLanguageUnderstandingV1.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2019 IBM Corp. All Rights Reserved.
* (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.
Expand Down
15 changes: 3 additions & 12 deletions Examples/ExamplePersonalityInsightsV3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using System.Text;

namespace IBM.Watson.Examples
{
Expand Down Expand Up @@ -62,18 +63,8 @@ private IEnumerator CreateService()

private IEnumerator Examples()
{
Content content = new Content()
{
ContentItems = new List<ContentItem>()
{
new ContentItem()
{
Content = testString,
Contenttype = ContentItem.ContenttypeValue.TEXT_PLAIN,
Language = ContentItem.LanguageValue.EN
}
}
};
byte[] bytes = Encoding.ASCII.GetBytes(testString);
MemoryStream content = new MemoryStream(bytes);

Log.Debug("ExamplePersonalityInsights.Examples()", "Attempting to Profile...");
service.Profile(OnProfile, content: content);
Expand Down
10 changes: 5 additions & 5 deletions Examples/ExampleToneAnalyzerV3.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2019 IBM Corp. All Rights Reserved.
* (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.
Expand All @@ -24,6 +24,8 @@
using IBM.Cloud.SDK;
using IBM.Cloud.SDK.Authentication;
using IBM.Cloud.SDK.Authentication.Iam;
using System.Text;
using System.IO;

namespace IBM.Watson.Examples
{
Expand Down Expand Up @@ -79,10 +81,8 @@ private IEnumerator CreateService()

private IEnumerator Examples()
{
ToneInput toneInput = new ToneInput()
{
Text = stringToTestTone
};
byte[] bytes = Encoding.ASCII.GetBytes(stringToTestTone);
MemoryStream toneInput = new MemoryStream(bytes);

List<string> tones = new List<string>()
{
Expand Down
4 changes: 3 additions & 1 deletion Examples/GenericSerialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ void Start()

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

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

}
Expand Down
Loading