Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Azure.Test.HttpRecorder;
using Microsoft.Azure.CognitiveServices.SpellCheck;
using Microsoft.Azure.CognitiveServices.SpellCheck.Models;
using Microsoft.Azure.CognitiveServices.Language.SpellCheck;
using Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
using System.Linq;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Microsoft.Azure.CognitiveServices.SpellCheck
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck
{
using System;
using System.Net.Http;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices\data-plane\SpellCheck" -PowershellInvoker -AutoRestVersion "latest"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace this with
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "..\..\..\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "cognitiveservices/data-plane/SpellCheck/BingSpellCheck" -PowershellInvoker -AutoRestVersion "latest"

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck
{
using Microsoft.Rest;
using Models;
Expand Down Expand Up @@ -50,6 +50,15 @@ public partial interface ISpellCheckAPI : System.IDisposable
/// algorithm. The spell-checker is based on a massive corpus of web
/// searches and documents.
/// </summary>
/// <param name='text'>
/// The text string to check for spelling and grammar errors. The
/// combined length of the text string, preContextText string, and
/// postContextText string may not exceed 10,000 characters. You may
/// specify this parameter in the query string of a GET request or in
/// the body of a POST request. Because of the query string length
/// limit, you'll typically use a POST request unless you're checking
/// only short strings.
/// </param>
/// <param name='acceptLanguage'>
/// A comma-delimited list of one or more languages to use for user
/// interface strings. The list is in decreasing order of preference.
Expand Down Expand Up @@ -252,7 +261,7 @@ public partial interface ISpellCheckAPI : System.IDisposable
/// mistakes. 2) Spell—Finds most spelling mistakes but does not find
/// some of the grammar errors that Proof catches (for example,
/// capitalization and repeated words). Possible values include:
/// 'Proof', 'Spell'
/// 'proof', 'spell'
/// </param>
/// <param name='preContextText'>
/// A string that gives context to the text string. For example, the
Expand All @@ -276,22 +285,13 @@ public partial interface ISpellCheckAPI : System.IDisposable
/// characters. You may specify this parameter in the query string of a
/// GET request or in the body of a POST request.
/// </param>
/// <param name='text'>
/// The text string to check for spelling and grammar errors. The
/// combined length of the text string, preContextText string, and
/// postContextText string may not exceed 10,000 characters. You may
/// specify this parameter in the query string of a GET request or in
/// the body of a POST request. Because of the query string length
/// limit, you'll typically use a POST request unless you're checking
/// only short strings.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<HttpOperationResponse<SpellCheckModel>> SpellCheckerWithHttpMessagesAsync(string acceptLanguage = default(string), string pragma = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string actionType = default(string), string appName = default(string), string countryCode = default(string), string clientMachineName = default(string), string docId = default(string), string market = default(string), string sessionId = default(string), string setLang = default(string), string userId = default(string), string mode = default(string), string preContextText = default(string), string postContextText = default(string), string text = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<HttpOperationResponse<SpellCheckModel>> SpellCheckerWithHttpMessagesAsync(string text, string acceptLanguage = default(string), string pragma = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string actionType = default(string), string appName = default(string), string countryCode = default(string), string clientMachineName = default(string), string docId = default(string), string market = default(string), string sessionId = default(string), string setLang = default(string), string userId = default(string), string mode = default(string), string preContextText = default(string), string postContextText = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using System.Linq;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using Microsoft.Rest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using Newtonsoft.Json;
using System.Linq;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using System.Linq;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using System.Linq;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck.Models
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

using System;
using System.Collections.Generic;
using System.Linq;

internal static partial class SdkInfo
{
public static IEnumerable<Tuple<string, string, string>> ApiInfo_SpellCheckAPI
{
get
{
return new Tuple<string, string, string>[]
{
new Tuple<string, string, string>("SpellCheckAPI", "SpellChecker", "1.0"),
}.AsEnumerable();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck
{
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
Expand Down Expand Up @@ -281,6 +281,14 @@ private void Initialize()
/// constantly evolving and highly contextual algorithm. The spell-checker is
/// based on a massive corpus of web searches and documents.
/// </summary>
/// <param name='text'>
/// The text string to check for spelling and grammar errors. The combined
/// length of the text string, preContextText string, and postContextText
/// string may not exceed 10,000 characters. You may specify this parameter in
/// the query string of a GET request or in the body of a POST request. Because
/// of the query string length limit, you'll typically use a POST request
/// unless you're checking only short strings.
/// </param>
/// <param name='acceptLanguage'>
/// A comma-delimited list of one or more languages to use for user interface
/// strings. The list is in decreasing order of preference. For additional
Expand Down Expand Up @@ -462,7 +470,7 @@ private void Initialize()
/// Proof—Finds most spelling and grammar mistakes. 2) Spell—Finds most
/// spelling mistakes but does not find some of the grammar errors that Proof
/// catches (for example, capitalization and repeated words). Possible values
/// include: 'Proof', 'Spell'
/// include: 'proof', 'spell'
/// </param>
/// <param name='preContextText'>
/// A string that gives context to the text string. For example, the text
Expand All @@ -484,14 +492,6 @@ private void Initialize()
/// 10,000 characters. You may specify this parameter in the query string of a
/// GET request or in the body of a POST request.
/// </param>
/// <param name='text'>
/// The text string to check for spelling and grammar errors. The combined
/// length of the text string, preContextText string, and postContextText
/// string may not exceed 10,000 characters. You may specify this parameter in
/// the query string of a GET request or in the body of a POST request. Because
/// of the query string length limit, you'll typically use a POST request
/// unless you're checking only short strings.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -504,11 +504,21 @@ private void Initialize()
/// <exception cref="SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="ValidationException">
/// Thrown when a required parameter is null
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse<SpellCheckModel>> SpellCheckerWithHttpMessagesAsync(string acceptLanguage = default(string), string pragma = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string actionType = default(string), string appName = default(string), string countryCode = default(string), string clientMachineName = default(string), string docId = default(string), string market = default(string), string sessionId = default(string), string setLang = default(string), string userId = default(string), string mode = default(string), string preContextText = default(string), string postContextText = default(string), string text = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<HttpOperationResponse<SpellCheckModel>> SpellCheckerWithHttpMessagesAsync(string text, string acceptLanguage = default(string), string pragma = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string actionType = default(string), string appName = default(string), string countryCode = default(string), string clientMachineName = default(string), string docId = default(string), string market = default(string), string sessionId = default(string), string setLang = default(string), string userId = default(string), string mode = default(string), string preContextText = default(string), string postContextText = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (text == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "text");
}
string xBingApisSDK = "true";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.SpellCheck
namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck
{
using Models;
using System.Threading;
Expand All @@ -25,6 +25,14 @@ public static partial class SpellCheckAPIExtensions
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='text'>
/// The text string to check for spelling and grammar errors. The combined
/// length of the text string, preContextText string, and postContextText
/// string may not exceed 10,000 characters. You may specify this parameter in
/// the query string of a GET request or in the body of a POST request. Because
/// of the query string length limit, you'll typically use a POST request
/// unless you're checking only short strings.
/// </param>
/// <param name='acceptLanguage'>
/// A comma-delimited list of one or more languages to use for user interface
/// strings. The list is in decreasing order of preference. For additional
Expand Down Expand Up @@ -206,7 +214,7 @@ public static partial class SpellCheckAPIExtensions
/// Proof—Finds most spelling and grammar mistakes. 2) Spell—Finds most
/// spelling mistakes but does not find some of the grammar errors that Proof
/// catches (for example, capitalization and repeated words). Possible values
/// include: 'Proof', 'Spell'
/// include: 'proof', 'spell'
/// </param>
/// <param name='preContextText'>
/// A string that gives context to the text string. For example, the text
Expand All @@ -228,20 +236,12 @@ public static partial class SpellCheckAPIExtensions
/// 10,000 characters. You may specify this parameter in the query string of a
/// GET request or in the body of a POST request.
/// </param>
/// <param name='text'>
/// The text string to check for spelling and grammar errors. The combined
/// length of the text string, preContextText string, and postContextText
/// string may not exceed 10,000 characters. You may specify this parameter in
/// the query string of a GET request or in the body of a POST request. Because
/// of the query string length limit, you'll typically use a POST request
/// unless you're checking only short strings.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<SpellCheckModel> SpellCheckerAsync(this ISpellCheckAPI operations, string acceptLanguage = default(string), string pragma = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string actionType = default(string), string appName = default(string), string countryCode = default(string), string clientMachineName = default(string), string docId = default(string), string market = default(string), string sessionId = default(string), string setLang = default(string), string userId = default(string), string mode = default(string), string preContextText = default(string), string postContextText = default(string), string text = default(string), CancellationToken cancellationToken = default(CancellationToken))
public static async Task<SpellCheckModel> SpellCheckerAsync(this ISpellCheckAPI operations, string text, string acceptLanguage = default(string), string pragma = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string actionType = default(string), string appName = default(string), string countryCode = default(string), string clientMachineName = default(string), string docId = default(string), string market = default(string), string sessionId = default(string), string setLang = default(string), string userId = default(string), string mode = default(string), string preContextText = default(string), string postContextText = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.SpellCheckerWithHttpMessagesAsync(acceptLanguage, pragma, userAgent, clientId, clientIp, location, actionType, appName, countryCode, clientMachineName, docId, market, sessionId, setLang, userId, mode, preContextText, postContextText, text, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.SpellCheckerWithHttpMessagesAsync(text, acceptLanguage, pragma, userAgent, clientId, clientIp, location, actionType, appName, countryCode, clientMachineName, docId, market, sessionId, setLang, userId, mode, preContextText, postContextText, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Loading