Skip to content

Commit

Permalink
feat: regenerate services and add new default URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
mamoonraja committed Aug 12, 2020
1 parent 21283bc commit e484113
Show file tree
Hide file tree
Showing 18 changed files with 112 additions and 69 deletions.
2 changes: 1 addition & 1 deletion Scripts/Services/CompareComply/V1/CompareComplyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace IBM.Watson.CompareComply.V1
public partial class CompareComplyService : BaseService
{
private const string serviceId = "compare_comply";
private const string defaultServiceUrl = "https://gateway.watsonplatform.net/compare-comply/api";
private const string defaultServiceUrl = "https://api.us-south.compare-comply.watson.cloud.ibm.com";

#region VersionDate
private string versionDate;
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Services/Discovery/V1/DiscoveryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace IBM.Watson.Discovery.V1
public partial class DiscoveryService : BaseService
{
private const string serviceId = "discovery";
private const string defaultServiceUrl = "https://gateway.watsonplatform.net/discovery/api";
private const string defaultServiceUrl = "https://api.us-south.discovery.watson.cloud.ibm.com";

#region VersionDate
private string versionDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace IBM.Watson.NaturalLanguageClassifier.V1
public partial class NaturalLanguageClassifierService : BaseService
{
private const string serviceId = "natural_language_classifier";
private const string defaultServiceUrl = "https://gateway.watsonplatform.net/natural-language-classifier/api";
private const string defaultServiceUrl = "https://api.us-south.natural-language-classifier.watson.cloud.ibm.com";


#region DisableSslVerification
Expand Down Expand Up @@ -507,4 +507,4 @@ private void OnDeleteClassifierResponse(RESTConnector.Request req, RESTConnector
((RequestObject<object>)req).Callback(response, resp.Error);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ namespace IBM.Watson.NaturalLanguageUnderstanding.V1.Model
public class CategoriesResult
{
/// <summary>
/// The path to the category through the 5-level taxonomy hierarchy. For the complete list of categories, see
/// the [Categories
/// hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy)
/// documentation.
/// The path to the category through the 5-level taxonomy hierarchy. For more information about the categories,
/// see [Categories
/// hierarchy](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-categories#categories-hierarchy).
/// </summary>
[JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)]
public string Label { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
namespace IBM.Watson.NaturalLanguageUnderstanding.V1.Model
{
/// <summary>
/// Identifies people, cities, organizations, and other entities in the content. See [Entity types and
/// Identifies people, cities, organizations, and other entities in the content. For more information, see [Entity
/// types and
/// subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types).
///
/// Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public class Features
[JsonProperty("emotion", NullValueHandling = NullValueHandling.Ignore)]
public EmotionOptions Emotion { get; set; }
/// <summary>
/// Identifies people, cities, organizations, and other entities in the content. See [Entity types and
/// Identifies people, cities, organizations, and other entities in the content. For more information, see
/// [Entity types and
/// subtypes](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-entity-types).
///
/// Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish,
Expand All @@ -66,7 +67,7 @@ public class Features
public MetadataOptions Metadata { get; set; }
/// <summary>
/// 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". See [Relation
/// relation might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation
/// types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).
///
/// Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian,
Expand Down
35 changes: 34 additions & 1 deletion Scripts/Services/NaturalLanguageUnderstanding/V1/Model/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,39 @@ public class Model
/// <summary>
/// When the status is `available`, the model is ready to use.
/// </summary>
public class StatusValue
{
/// <summary>
/// Constant STARTING for starting
/// </summary>
public const string STARTING = "starting";
/// <summary>
/// Constant TRAINING for training
/// </summary>
public const string TRAINING = "training";
/// <summary>
/// Constant DEPLOYING for deploying
/// </summary>
public const string DEPLOYING = "deploying";
/// <summary>
/// Constant AVAILABLE for available
/// </summary>
public const string AVAILABLE = "available";
/// <summary>
/// Constant ERROR for error
/// </summary>
public const string ERROR = "error";
/// <summary>
/// Constant DELETED for deleted
/// </summary>
public const string DELETED = "deleted";

}

/// <summary>
/// When the status is `available`, the model is ready to use.
/// Constants for possible values can be found using Model.StatusValue
/// </summary>
[JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)]
public string Status { get; set; }
/// <summary>
Expand All @@ -36,7 +69,7 @@ public class Model
[JsonProperty("model_id", NullValueHandling = NullValueHandling.Ignore)]
public string ModelId { get; set; }
/// <summary>
/// ISO 639-1 code indicating the language of the model.
/// ISO 639-1 code that indicates the language of the model.
/// </summary>
[JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)]
public string Language { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace IBM.Watson.NaturalLanguageUnderstanding.V1.Model
{
/// <summary>
/// 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". See [Relation
/// relation might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation
/// types](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-relations).
///
/// Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
* (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.
Expand All @@ -26,7 +26,7 @@ namespace IBM.Watson.NaturalLanguageUnderstanding.V1.Model
public class TokenResult
{
/// <summary>
/// The part of speech of the token. For descriptions of the values, see [Universal Dependencies POS
/// The part of speech of the token. For more information about the values, see [Universal Dependencies POS
/// tags](https://universaldependencies.org/u/pos/).
/// </summary>
public class PartOfSpeechValue
Expand Down Expand Up @@ -103,7 +103,7 @@ public class PartOfSpeechValue
}

/// <summary>
/// The part of speech of the token. For descriptions of the values, see [Universal Dependencies POS
/// The part of speech of the token. For more information about the values, see [Universal Dependencies POS
/// tags](https://universaldependencies.org/u/pos/).
/// Constants for possible values can be found using TokenResult.PartOfSpeechValue
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace IBM.Watson.NaturalLanguageUnderstanding.V1
public partial class NaturalLanguageUnderstandingService : BaseService
{
private const string serviceId = "natural_language_understanding";
private const string defaultServiceUrl = "https://gateway.watsonplatform.net/natural-language-understanding/api";
private const string defaultServiceUrl = "https://api.us-south.natural-language-understanding.watson.cloud.ibm.com";

#region VersionDate
private string versionDate;
Expand Down Expand Up @@ -101,7 +101,7 @@ public NaturalLanguageUnderstandingService(string versionDate, Authenticator aut
/// - Relations
/// - Semantic roles
/// - Sentiment
/// - Syntax (Experimental).
/// - Syntax.
///
/// If a language for the input text is not specified with the `language` parameter, the service [automatically
/// detects the
Expand All @@ -115,10 +115,10 @@ public NaturalLanguageUnderstandingService(string versionDate, Authenticator aut
/// (optional)</param>
/// <param name="url">The webpage to analyze. One of the `text`, `html`, or `url` parameters is required.
/// (optional)</param>
/// <param name="clean">Set this to `false` to disable webpage cleaning. To learn more about webpage cleaning,
/// see the [Analyzing
/// webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages)
/// documentation. (optional, default to true)</param>
/// <param name="clean">Set this to `false` to disable webpage cleaning. For more information about webpage
/// cleaning, see [Analyzing
/// webpages](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages).
/// (optional, default to true)</param>
/// <param name="xpath">An [XPath
/// query](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-analyzing-webpages#xpath)
/// to perform on `html` or `url` input. Results of the query will be appended to the cleaned webpage text
Expand All @@ -129,10 +129,10 @@ public NaturalLanguageUnderstandingService(string versionDate, Authenticator aut
/// <param name="returnAnalyzedText">Whether or not to return the analyzed text. (optional, default to
/// false)</param>
/// <param name="language">ISO 639-1 code that specifies the language of your text. This overrides automatic
/// language detection. Language support differs depending on the features you include in your analysis. See
/// [Language
/// support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support)
/// for more information. (optional)</param>
/// language detection. Language support differs depending on the features you include in your analysis. For
/// more information, see [Language
/// support](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-language-support).
/// (optional)</param>
/// <param name="limitTextCharacters">Sets the maximum number of characters that are processed by the service.
/// (optional)</param>
/// <returns><see cref="AnalysisResults" />AnalysisResults</returns>
Expand Down Expand Up @@ -357,4 +357,4 @@ private void OnDeleteModelResponse(RESTConnector.Request req, RESTConnector.Resp
((RequestObject<DeleteModelResults>)req).Callback(response, resp.Error);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace IBM.Watson.PersonalityInsights.V3
public partial class PersonalityInsightsService : BaseService
{
private const string serviceId = "personality_insights";
private const string defaultServiceUrl = "https://gateway.watsonplatform.net/personality-insights/api";
private const string defaultServiceUrl = "https://api.us-south.personality-insights.watson.cloud.ibm.com";

#region VersionDate
private string versionDate;
Expand Down Expand Up @@ -395,4 +395,4 @@ private void OnProfileAsCsvResponse(RESTConnector.Request req, RESTConnector.Res
((RequestObject<System.IO.MemoryStream>)req).Callback(response, resp.Error);
}
}
}
}
10 changes: 5 additions & 5 deletions Scripts/Services/SpeechToText/V1/Model/RegisterStatus.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
* (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.
Expand All @@ -26,8 +26,8 @@ public class RegisterStatus
{
/// <summary>
/// The current status of the job:
/// * `created`: The service successfully white-listed the callback URL as a result of the call.
/// * `already created`: The URL was already white-listed.
/// * `created`: The service successfully allowlisted the callback URL as a result of the call.
/// * `already created`: The URL was already allowlisted.
/// </summary>
public class StatusValue
{
Expand All @@ -44,8 +44,8 @@ public class StatusValue

/// <summary>
/// The current status of the job:
/// * `created`: The service successfully white-listed the callback URL as a result of the call.
/// * `already created`: The URL was already white-listed.
/// * `created`: The service successfully allowlisted the callback URL as a result of the call.
/// * `already created`: The URL was already allowlisted.
/// Constants for possible values can be found using RegisterStatus.StatusValue
/// </summary>
[JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)]
Expand Down
6 changes: 5 additions & 1 deletion Scripts/Services/SpeechToText/V1/Model/SupportedFeatures.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
* (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.
Expand Down Expand Up @@ -32,6 +32,10 @@ public class SupportedFeatures
public bool? CustomLanguageModel { get; set; }
/// <summary>
/// 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 only for US
/// English, Australian English, German, Japanese, Korean, and Spanish (both broadband and narrowband models)
/// and UK English (narrowband model only). Speaker labels are not supported for any other models.
/// </summary>
[JsonProperty("speaker_labels", NullValueHandling = NullValueHandling.Ignore)]
public bool? SpeakerLabels { get; set; }
Expand Down
Loading

0 comments on commit e484113

Please sign in to comment.