3131module  IBMWatson 
3232  ## 
3333  # The Language Translator V3 service. 
34-   class  LanguageTranslatorV3 
34+   class  LanguageTranslatorV3  <  WatsonService 
3535    include  Concurrent ::Async 
3636    ## 
3737    # @!method initialize(args) 
@@ -72,7 +72,6 @@ class LanguageTranslatorV3
7272    #   'https://iam.ng.bluemix.net/identity/token'. 
7373    def  initialize ( args  =  { } ) 
7474      @__async_initialized__  =  false 
75-       super ( ) 
7675      defaults  =  { } 
7776      defaults [ :version ]  =  nil 
7877      defaults [ :url ]  =  "https://gateway.watsonplatform.net/language-translator/api" 
@@ -82,84 +81,11 @@ def initialize(args = {})
8281      defaults [ :iam_access_token ]  =  nil 
8382      defaults [ :iam_url ]  =  nil 
8483      args  =  defaults . merge ( args ) 
85-       @watson_service  =  WatsonService . new ( 
86-         vcap_services_name : "language_translator" , 
87-         url : args [ :url ] , 
88-         username : args [ :username ] , 
89-         password : args [ :password ] , 
90-         iam_apikey : args [ :iam_apikey ] , 
91-         iam_access_token : args [ :iam_access_token ] , 
92-         iam_url : args [ :iam_url ] , 
93-         use_vcap_services : true 
94-       ) 
84+       args [ :vcap_services_name ]  =  "language_translator" 
85+       super 
9586      @version  =  args [ :version ] 
9687    end 
9788
98-     # :nocov: 
99-     def  add_default_headers ( headers : { } ) 
100-       @watson_service . add_default_headers ( headers : headers ) 
101-     end 
102- 
103-     def  _iam_access_token ( iam_access_token :) 
104-       @watson_service . _iam_access_token ( iam_access_token : iam_access_token ) 
105-     end 
106- 
107-     def  _iam_apikey ( iam_apikey :) 
108-       @watson_service . _iam_apikey ( iam_apikey : iam_apikey ) 
109-     end 
110- 
111-     # @return [DetailedResponse] 
112-     def  request ( args ) 
113-       @watson_service . request ( args ) 
114-     end 
115- 
116-     # @note Chainable 
117-     # @param headers [Hash] Custom headers to be sent with the request 
118-     # @return [self] 
119-     def  headers ( headers ) 
120-       @watson_service . headers ( headers ) 
121-       self 
122-     end 
123- 
124-     def  password = ( password ) 
125-       @watson_service . password  =  password 
126-     end 
127- 
128-     def  password 
129-       @watson_service . password 
130-     end 
131- 
132-     def  username = ( username ) 
133-       @watson_service . username  =  username 
134-     end 
135- 
136-     def  username 
137-       @watson_service . username 
138-     end 
139- 
140-     def  url = ( url ) 
141-       @watson_service . url  =  url 
142-     end 
143- 
144-     def  url 
145-       @watson_service . url 
146-     end 
147- 
148-     # @!method configure_http_client(proxy: {}, timeout: {}) 
149-     # Sets the http client config, currently works with timeout and proxies 
150-     # @param proxy [Hash] The hash of proxy configurations 
151-     # @option proxy address [String] The address of the proxy 
152-     # @option proxy port [Integer] The port of the proxy 
153-     # @option proxy username [String] The username of the proxy, if authentication is needed 
154-     # @option proxy password [String] The password of the proxy, if authentication is needed 
155-     # @option proxy headers [Hash] The headers to be used with the proxy 
156-     # @param timeout [Hash] The hash for configuring timeouts. `per_operation` has priority over `global` 
157-     # @option timeout per_operation [Hash] Timeouts per operation. Requires `read`, `write`, `connect` 
158-     # @option timeout global [Integer] Upper bound on total request time 
159-     def  configure_http_client ( proxy : { } ,  timeout : { } ) 
160-       @watson_service . configure_http_client ( proxy : proxy ,  timeout : timeout ) 
161-     end 
162-     # :nocov: 
16389    ######################### 
16490    # Translation 
16591    ######################### 
@@ -182,6 +108,7 @@ def configure_http_client(proxy: {}, timeout: {})
182108    # @return [DetailedResponse] A `DetailedResponse` object representing the response. 
183109    def  translate ( text :,  model_id : nil ,  source : nil ,  target : nil ) 
184110      raise  ArgumentError ( "text must be provided" )  if  text . nil? 
111+ 
185112      headers  =  { 
186113      } 
187114      params  =  { 
@@ -239,6 +166,7 @@ def list_identifiable_languages
239166    # @return [DetailedResponse] A `DetailedResponse` object representing the response. 
240167    def  identify ( text :) 
241168      raise  ArgumentError ( "text must be provided" )  if  text . nil? 
169+ 
242170      headers  =  { 
243171      } 
244172      params  =  { 
@@ -330,6 +258,7 @@ def list_models(source: nil, target: nil, default_models: nil)
330258    # @return [DetailedResponse] A `DetailedResponse` object representing the response. 
331259    def  create_model ( base_model_id :,  name : nil ,  forced_glossary : nil ,  parallel_corpus : nil ,  forced_glossary_filename : nil ,  parallel_corpus_filename : nil ) 
332260      raise  ArgumentError ( "base_model_id must be provided" )  if  base_model_id . nil? 
261+ 
333262      headers  =  { 
334263      } 
335264      params  =  { 
@@ -382,6 +311,7 @@ def create_model(base_model_id:, name: nil, forced_glossary: nil, parallel_corpu
382311    # @return [DetailedResponse] A `DetailedResponse` object representing the response. 
383312    def  delete_model ( model_id :) 
384313      raise  ArgumentError ( "model_id must be provided" )  if  model_id . nil? 
314+ 
385315      headers  =  { 
386316      } 
387317      params  =  { 
@@ -408,6 +338,7 @@ def delete_model(model_id:)
408338    # @return [DetailedResponse] A `DetailedResponse` object representing the response. 
409339    def  get_model ( model_id :) 
410340      raise  ArgumentError ( "model_id must be provided" )  if  model_id . nil? 
341+ 
411342      headers  =  { 
412343      } 
413344      params  =  { 
0 commit comments