code: public ServiceCall<TranslationResult> translate(TranslateOptions translateOptions) {
      Validator.notNull(translateOptions, "translateOptions cannot be null");
      String[] pathSegments = { "v3/translate" };
      RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
      builder.query("version", versionDate);
      Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("language_translator", "v3", "translate");
      for (Entry<String, String> header : sdkHeaders.entrySet()) {
        builder.header(header.getKey(), header.getValue());
      }
      builder.header("Accept", "application/json");
      final JsonObject contentJson = new JsonObject();
      contentJson.add("text", GsonSingleton.getGson().toJsonTree(translateOptions.text()));
      if (translateOptions.modelId() != null) {
        contentJson.addProperty("model_id", translateOptions.modelId());
      }
      if (translateOptions.source() != null) {
        contentJson.addProperty("source", translateOptions.source());
      }
      if (translateOptions.target() != null) {
        contentJson.addProperty("target", translateOptions.target());
      }
      builder.bodyJson(contentJson);
      return createServiceCall(builder.build(), ResponseConverterUtils.getObject(TranslationResult.class));
    }
docs: Translate.
  
  Translates the input text from the source language to the target language.
  
  @param translateOptions the {@link TranslateOptions} containing the options for the call
  @return a {@link ServiceCall} with a response type of {@link TranslationResult}