// Path: clustering-response/src/main/java/com/apitore/banana/request/clustering/VecvecRequestEntity.java
// @ApiModel
// @Data
// public class VecvecRequestEntity implements Serializable {
// 
//   /**
//    *
//    */
//   private static final long serialVersionUID = -9107786130526792159L;
// 
//   @ApiModelProperty(required=true, value="Vector1")
//   double[] vec1;
//   @ApiModelProperty(required=true, value="Vector2")
//   double[] vec2;
// 
// }
// 
// Path: clustering-response/src/main/java/com/apitore/banana/response/clustering/SimilarityResponseEntity.java
// @ApiModel
// @Data
// @EqualsAndHashCode(callSuper=false)
// public class SimilarityResponseEntity extends BaseResponseEntity {
// 
//   /**
//    *
//    */
//   private static final long serialVersionUID = 4013846503995589485L;
// 
//   @ApiModelProperty(required=true, value="Score")
//   private double score;
// 
// }


import java.io.IOException;
import java.nio.charset.Charset;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.web.client.RestTemplate;
import com.apitore.banana.request.clustering.VecvecRequestEntity;
import com.apitore.banana.response.clustering.SimilarityResponseEntity;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
package com.apitore.banana.response.clustering.sample;






/**
 * @author Keigo Hattori
 */
public class Api49CosineSimilarityExample {

  static String ENDPOINT     = "https://api.apitore.com/api/49/cosine-similarity/vec-vec";
  static String ACCESS_TOKEN = "YOUR-ACCESS-TOKEN";

  public static void main(String[] args) throws JsonParseException, JsonMappingException, IOException {
    RestTemplate restTemplate = new RestTemplate();
    restTemplate.getMessageConverters().add(0, new StringHttpMessageConverter(Charset.forName("UTF-8")));

    String url = String.format("%s?access_token=%s", ENDPOINT, ACCESS_TOKEN);
    ObjectMapper mapper = new ObjectMapper();
// Path: clustering-response/src/main/java/com/apitore/banana/request/clustering/VecvecRequestEntity.java
// @ApiModel
// @Data
// public class VecvecRequestEntity implements Serializable {
// 
//   /**
//    *
//    */
//   private static final long serialVersionUID = -9107786130526792159L;
// 
//   @ApiModelProperty(required=true, value="Vector1")
//   double[] vec1;
//   @ApiModelProperty(required=true, value="Vector2")
//   double[] vec2;
// 
// }
// 
// Path: clustering-response/src/main/java/com/apitore/banana/response/clustering/SimilarityResponseEntity.java
// @ApiModel
// @Data
// @EqualsAndHashCode(callSuper=false)
// public class SimilarityResponseEntity extends BaseResponseEntity {
// 
//   /**
//    *
//    */
//   private static final long serialVersionUID = 4013846503995589485L;
// 
//   @ApiModelProperty(required=true, value="Score")
//   private double score;
// 
// }


// Path: clustering-response/src/main/java/com/apitore/banana/response/clustering/sample/Api49CosineSimilarityExample.java
import java.io.IOException;
import java.nio.charset.Charset;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.web.client.RestTemplate;
import com.apitore.banana.request.clustering.VecvecRequestEntity;
import com.apitore.banana.response.clustering.SimilarityResponseEntity;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;

package com.apitore.banana.response.clustering.sample;






/**
 * @author Keigo Hattori
 */
public class Api49CosineSimilarityExample {

  static String ENDPOINT     = "https://api.apitore.com/api/49/cosine-similarity/vec-vec";
  static String ACCESS_TOKEN = "YOUR-ACCESS-TOKEN";

  public static void main(String[] args) throws JsonParseException, JsonMappingException, IOException {
    RestTemplate restTemplate = new RestTemplate();
    restTemplate.getMessageConverters().add(0, new StringHttpMessageConverter(Charset.forName("UTF-8")));

    String url = String.format("%s?access_token=%s", ENDPOINT, ACCESS_TOKEN);
    ObjectMapper mapper = new ObjectMapper();
    VecvecRequestEntity req = new VecvecRequestEntity();