Skip to content

Commit

Permalink
docs(adapters): rewords all warning messages with deprecated message …
Browse files Browse the repository at this point in the history
…names
  • Loading branch information
Anwesha Naskar authored and Anwesha Naskar committed Mar 8, 2018
1 parent 2ba85dd commit d2b0d68
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 44 deletions.
16 changes: 8 additions & 8 deletions conversation/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ConversationV1 extends GeneratedConversationV1 {
}

getIntents(params, callback) {
console.warn("WARNING: getIntents() was renamed to listIntents(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getIntents() was renamed to listIntents(). Support for getIntents() will be removed in the next major release");
return super.listIntents(params, callback);
}

Expand Down Expand Up @@ -75,7 +75,7 @@ class ConversationV1 extends GeneratedConversationV1 {
}

getExamples(params, callback) {
console.warn("WARNING: getExamples() was renamed to listExamples(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getExamples() was renamed to listExamples(). Support for getExamples() will be removed in the next major release");
return super.listExamples(params, callback);
}

Expand All @@ -96,7 +96,7 @@ class ConversationV1 extends GeneratedConversationV1 {
}

getCounterExamples(params, callback) {
console.warn("WARNING: getCounterExamples() was renamed to listCounterExamples(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getCounterExamples() was renamed to listCounterExamples(). Support for getCounterExamples() will be removed in the next major release");
return super.listCounterexamples(params, callback);
}

Expand Down Expand Up @@ -129,7 +129,7 @@ class ConversationV1 extends GeneratedConversationV1 {
}

getEntities(params, callback) {
console.warn("WARNING: getEntities() was renamed to listEntities(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getEntities() was renamed to listEntities(). Support for getEntities() will be removed in the next major release");
return super.listEntities(params, callback);
}

Expand Down Expand Up @@ -162,7 +162,7 @@ class ConversationV1 extends GeneratedConversationV1 {
}

getValues(params, callback) {
console.warn("WARNING: getValues() was renamed to listValues(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getValues() was renamed to listValues(). Support for getValues() will be removed in the next major release");
return super.listValues(params, callback);
}

Expand Down Expand Up @@ -195,7 +195,7 @@ class ConversationV1 extends GeneratedConversationV1 {
}

getSynonyms(params, callback) {
console.warn("WARNING: getSynonyms() was renamed to listSynonyms(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getSynonyms() was renamed to listSynonyms(). Support for getSynonyms() will be removed in the next major release");
return super.listSynonyms(params, callback);
}

Expand All @@ -222,7 +222,7 @@ class ConversationV1 extends GeneratedConversationV1 {
}

getLogs(params, callback) {
console.warn("WARNING: getLogs() was renamed to listLogs(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getLogs() was renamed to listLogs(). Support for getLogs() will be removed in the next major release");
return super.listLogs(params, callback);
}

Expand All @@ -235,7 +235,7 @@ class ConversationV1 extends GeneratedConversationV1 {
}

getDialogNodes(params, callback) {
console.warn("WARNING: getDialogNodes() was renamed to listDialogNodes(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getDialogNodes() was renamed to listDialogNodes(). Support for getDialogNodes() will be removed in the next major release");
return super.listDialogNodes(params, callback);
}

Expand Down
12 changes: 6 additions & 6 deletions discovery/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class DiscoveryV1 extends GeneratedDiscoveryV1 {
}

getEnvironments(params, callback) {
console.warn("WARNING: getEnvironments() was renamed to listEnvironments(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getEnvironments() was renamed to listEnvironments(). Support for getEnvironments() will be removed in the next major release");
return super.listEnvironments(params, callback);
}

Expand Down Expand Up @@ -96,7 +96,7 @@ class DiscoveryV1 extends GeneratedDiscoveryV1 {
}

getCollections(params, callback) {
console.warn("WARNING: getCollections() was renamed to listCollections(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getCollections() was renamed to listCollections(). Support for getCollections() will be removed in the next major release");
return super.listCollections(params, callback);
}

Expand All @@ -117,7 +117,7 @@ class DiscoveryV1 extends GeneratedDiscoveryV1 {
}

getCollectionFields(params, callback) {
console.warn("WARNING: getCollectionFields() was renamed to listCollectionFields(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getCollectionFields() was renamed to listCollectionFields(). Support for getCollectionFields() will be removed in the next major release");
// listFields expects an array of collection ids
if (params && !Array.isArray(params.collection_id)) {
params.collection_ids = [params.collection_id];
Expand All @@ -126,7 +126,7 @@ class DiscoveryV1 extends GeneratedDiscoveryV1 {
}

getConfigurations(params, callback) {
console.warn("WARNING: getConfigurations() was renamed to listConfigurations(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getConfigurations() was renamed to listConfigurations(). Support for getConfigurations() will be removed in the next major release");
return super.listConfigurations(params, callback);
}

Expand All @@ -145,7 +145,7 @@ class DiscoveryV1 extends GeneratedDiscoveryV1 {
}

addJsonDocument(params, callback) {
console.warn("WARNING: addJsonDocument() was renamed to addDocument(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: addJsonDocument() was renamed to addDocument(). Support for addJsonDocument() will be removed in the next major release");
const fileParamType: string = typeof params.file;
if (fileParamType !== 'object') {
throw new Error(
Expand All @@ -164,7 +164,7 @@ class DiscoveryV1 extends GeneratedDiscoveryV1 {
}

updateJsonDocument(params, callback) {
console.warn("WARNING: updateJsonDocument() was renamed to updateDocument(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: updateJsonDocument() was renamed to updateDocument(). Support for updateJsonDocument() will be removed in the next major release");
const fileParamType = typeof params.file;
if (fileParamType !== 'object') {
throw new Error(
Expand Down
4 changes: 2 additions & 2 deletions language-translator/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LanguageTranslatorV2 extends GeneratedLanguageTranslatorV2 {
}

getModels(params, callback) {
console.warn("WARNING: getModels() was renamed to listModels(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getModels() was renamed to listModels(). Support for getModels() will be removed in the next major release");
return super.listModels(params, callback);
}

Expand Down Expand Up @@ -60,7 +60,7 @@ class LanguageTranslatorV2 extends GeneratedLanguageTranslatorV2 {
}

getIdentifiableLanguages(params, callback) {
console.warn("WARNING: getIdentifiableLanguages() was renamed to listIdentifiableLanguages(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getIdentifiableLanguages() was renamed to listIdentifiableLanguages(). Support for getIdentifiableLanguages() will be removed in the next major release");
return super.listIdentifiableLanguages(params, callback);
}
}
Expand Down
8 changes: 4 additions & 4 deletions natural-language-classifier/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class NaturalLanguageClassifierV1 extends GeneratedNaturalLanguageClassifierV1 {
}

create(params, callback) {
console.warn("WARNING: create() was renamed to createClassifier(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: create() was renamed to createClassifier(). Support for create() will be removed in the next major release");
if (!params || !params.training_data) {
callback(new Error('Missing required parameters: training_data'));
return;
Expand Down Expand Up @@ -72,7 +72,7 @@ class NaturalLanguageClassifierV1 extends GeneratedNaturalLanguageClassifierV1 {
}

status(params, callback) {
console.warn("WARNING: status() was renamed to getClassifier(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: status() was renamed to getClassifier(). Support for status() will be removed in the next major release");
const newParams = params || {};
if (!newParams.classifier_id) {
newParams.classifier_id = newParams.classifier;
Expand All @@ -81,12 +81,12 @@ class NaturalLanguageClassifierV1 extends GeneratedNaturalLanguageClassifierV1 {
}

list(params, callback) {
console.warn("WARNING: list() was renamed to listClassifiers(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: list() was renamed to listClassifiers(). Support for list() will be removed in the next major release");
return super.listClassifiers(params, callback);
}

remove(params, callback) {
console.warn("WARNING: remove() was renamed to deleteClassifier(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: remove() was renamed to deleteClassifier(). Support for remove() will be removed in the next major release");
const newParams = params || {};
if (!newParams.classifier_id) {
newParams.classifier_id = newParams.classifier;
Expand Down
26 changes: 13 additions & 13 deletions speech-to-text/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,45 +97,45 @@ class SpeechToTextV1 extends GeneratedSpeechToTextV1 {


getModels(params, callback) {
console.warn("WARNING: getModels() was renamed to listModels(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getModels() was renamed to listModels(). Support for getModels() will be removed in the next major release");
return super.listModels(params, callback);
}

getCustomization(params, callback) {
console.warn("WARNING: getCustomization() was renamed to getLanguageModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getCustomization() was renamed to getLanguageModel(). Support for getCustomization() will be removed in the next major release");
return super.getLanguageModel(params, callback);
}

getRecognitionJob(params, callback) {
console.warn("WARNING: getRecognitionJob() was renamed to checkJob(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getRecognitionJob() was renamed to checkJob(). Support for getRecognitionJob() will be removed in the next major release");
return super.checkJob(params, callback);
}

createCustomization(params, callback) {
console.warn("WARNING: createCustomization() was renamed to createLanguageModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: createCustomization() was renamed to createLanguageModel(). Support for createCustomization() will be removed in the next major release");
if (params && !params.content_type) {
params.content_type = 'application/json';
}
return super.createLanguageModel(params, callback);
}

getRecognitionJobs(params, callback) {
console.warn("WARNING: getRecognitionJobs() was renamed to checkJobs(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getRecognitionJobs() was renamed to checkJobs(). Support for getRecognitionJobs() will be removed in the next major release");
return super.checkJobs(params, callback);
}

deleteRecognitionJob(params, callback) {
console.warn("WARNING: deleteRecognitionJob() was renamed to deleteJob(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: deleteRecognitionJob() was renamed to deleteJob(). Support for deleteRecognitionJob() will be removed in the next major release");
return super.deleteJob(params, callback);
}

getCustomizations(params, callback) {
console.warn("WARNING: getCustomizations() was renamed to listLanguageModels(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getCustomizations() was renamed to listLanguageModels(). Support for getCustomizations() will be removed in the next major release");
return super.listLanguageModels(params, callback);
}

createRecognitionJob(params, callback) {
console.warn("WARNING: createRecognitionJob() was renamed to createJob(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: createRecognitionJob() was renamed to createJob(). Support for createRecognitionJob() will be removed in the next major release");
if (params && Array.isArray(params.events)) {
params.events = params.events.join(',');
}
Expand Down Expand Up @@ -167,7 +167,7 @@ class SpeechToTextV1 extends GeneratedSpeechToTextV1 {
}

getCorpora(params, callback) {
console.warn("WARNING: getCorpora() was renamed to listCorpora(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getCorpora() was renamed to listCorpora(). Support for getCorpora() will be removed in the next major release");
return super.listCorpora(params, callback);
}

Expand All @@ -189,7 +189,7 @@ class SpeechToTextV1 extends GeneratedSpeechToTextV1 {
}

getWords(params, callback) {
console.warn("WARNING: getWords() was renamed to listWords(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getWords() was renamed to listWords(). Support for getWords() will be removed in the next major release");
return super.listWords(params, callback);
}

Expand All @@ -208,12 +208,12 @@ class SpeechToTextV1 extends GeneratedSpeechToTextV1 {
}

trainCustomization(params, callback) {
console.warn("WARNING: trainCustomization() was renamed to trainLanguageModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: trainCustomization() was renamed to trainLanguageModel(). Support for trainCustomization() will be removed in the next major release");
return super.trainLanguageModel(params, callback);
}

resetCustomization(params, callback) {
console.warn("WARNING: resetCustomization() was renamed to resetLanguageModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: resetCustomization() was renamed to resetLanguageModel(). Support for resetCustomization() will be removed in the next major release");
return super.resetLanguageModel(params, callback);
}

Expand Down Expand Up @@ -521,7 +521,7 @@ class SpeechToTextV1 extends GeneratedSpeechToTextV1 {
}

deleteCustomization(params, callback) {
console.warn("WARNING: deleteCustomization() was renamed to deleteLanguageModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: deleteCustomization() was renamed to deleteLanguageModel(). Support for deleteCustomization() will be removed in the next major release");
return super.deleteLanguageModel(params, callback);
}

Expand Down
18 changes: 9 additions & 9 deletions text-to-speech/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,47 @@ class TextToSpeechV1 extends GeneratedTextToSpeechV1 {
}

getCustomizations(params, callback) {
console.warn("WARNING: getCustomizations() was renamed to listVoiceModels(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getCustomizations() was renamed to listVoiceModels(). Support for getCustomizations() will be removed in the next major release");
return super.listVoiceModels(params, callback);
}

getCustomization(params, callback) {
console.warn("WARNING: getCustomization() was renamed to getVoiceModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getCustomization() was renamed to getVoiceModel(). Support for getCustomization() will be removed in the next major release");
return super.getVoiceModel(params, callback);
}

updateCustomization(params, callback) {
console.warn("WARNING: updateCustomization() was renamed to updateVoiceModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: updateCustomization() was renamed to updateVoiceModel(). Support for updateCustomization() will be removed in the next major release");
return super.updateVoiceModel(params, callback);
}

deleteCustomization(params, callback) {
console.warn("WARNING: deleteCustomization() was renamed to deleteVoiceModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: deleteCustomization() was renamed to deleteVoiceModel(). Support for deleteCustomization() will be removed in the next major release");
return super.deleteVoiceModel(params, callback);
}

createCustomization(params, callback) {
console.warn("WARNING: createCustomization() was renamed to createVoiceModel(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: createCustomization() was renamed to createVoiceModel(). Support for createCustomization() will be removed in the next major release");
return super.createVoiceModel(params, callback);
}

getWords(params, callback) {
console.warn("WARNING: getWords() was renamed to listWords(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: getWords() was renamed to listWords(). Support for getWords() will be removed in the next major release");
return super.listWords(params, callback);
}

voices(params, callback) {
console.warn("WARNING: voices() was renamed to listVoices(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: voices() was renamed to listVoices(). Support for voices() will be removed in the next major release");
return super.listVoices(params, callback);
}

voice(params, callback) {
console.warn("WARNING: voice() was renamed to getVoice(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: voice() was renamed to getVoice(). Support for voice() will be removed in the next major release");
return super.getVoice(params, callback);
}

pronunciation(params, callback) {
console.warn("WARNING: pronunciation() was renamed to getPronunciation(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: pronunciation() was renamed to getPronunciation(). Support for pronunciation() will be removed in the next major release");
return super.getPronunciation(params, callback);
}

Expand Down
2 changes: 1 addition & 1 deletion tone-analyzer/v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ToneAnalyzerV3 extends GeneratedToneAnalyzerV3 {
}

tone_chat(params, callback) {
console.warn("WARNING: tone_chat() was renamed to toneChat(). Support for the old method name will be removed in the next major release");
console.warn("WARNING: tone_chat() was renamed to toneChat(). Support for tone_chat() will be removed in the next major release");
const missingParams = getMissingParams(params, ['utterances']);
if (missingParams) { return callback(missingParams); }

Expand Down
Loading

0 comments on commit d2b0d68

Please sign in to comment.