ImageAnalysisSkill.java

  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License.
  3. //
  4. // Code generated by Microsoft (R) AutoRest Code Generator.
  5. // Changes may cause incorrect behavior and will be lost if the code is
  6. // regenerated.
  7. package com.azure.search.documents.indexes.models;

  8. import com.azure.core.annotation.Fluent;
  9. import com.fasterxml.jackson.annotation.JsonCreator;
  10. import com.fasterxml.jackson.annotation.JsonProperty;
  11. import com.fasterxml.jackson.annotation.JsonSetter;
  12. import com.fasterxml.jackson.annotation.JsonTypeId;
  13. import com.fasterxml.jackson.annotation.JsonTypeInfo;
  14. import com.fasterxml.jackson.annotation.JsonTypeName;
  15. import java.util.List;

  16. /** A skill that analyzes image files. It extracts a rich set of visual features based on the image content. */
  17. @JsonTypeInfo(
  18.         use = JsonTypeInfo.Id.NAME,
  19.         include = JsonTypeInfo.As.EXISTING_PROPERTY,
  20.         property = "@odata.type",
  21.         visible = true)
  22. @JsonTypeName("#Microsoft.Skills.Vision.ImageAnalysisSkill")
  23. @Fluent
  24. public final class ImageAnalysisSkill extends SearchIndexerSkill {

  25.     /*
  26.      * Identifies the concrete type of the skill.
  27.      */
  28.     @JsonTypeId
  29.     @JsonProperty(value = "@odata.type", required = true)
  30.     private String odataType = "#Microsoft.Skills.Vision.ImageAnalysisSkill";

  31.     /*
  32.      * A value indicating which language code to use. Default is en.
  33.      */
  34.     @JsonProperty(value = "defaultLanguageCode")
  35.     private ImageAnalysisSkillLanguage defaultLanguageCode;

  36.     /*
  37.      * A list of visual features.
  38.      */
  39.     @JsonProperty(value = "visualFeatures")
  40.     private List<VisualFeature> visualFeatures;

  41.     /*
  42.      * A string indicating which domain-specific details to return.
  43.      */
  44.     @JsonProperty(value = "details")
  45.     private List<ImageDetail> details;

  46.     /**
  47.      * Creates an instance of ImageAnalysisSkill class.
  48.      *
  49.      * @param inputs the inputs value to set.
  50.      * @param outputs the outputs value to set.
  51.      */
  52.     @JsonCreator
  53.     public ImageAnalysisSkill(
  54.             @JsonProperty(value = "inputs", required = true) List<InputFieldMappingEntry> inputs,
  55.             @JsonProperty(value = "outputs", required = true) List<OutputFieldMappingEntry> outputs) {
  56.         super(inputs, outputs);
  57.     }

  58.     /**
  59.      * Get the defaultLanguageCode property: A value indicating which language code to use. Default is en.
  60.      *
  61.      * @return the defaultLanguageCode value.
  62.      */
  63.     public ImageAnalysisSkillLanguage getDefaultLanguageCode() {
  64.         return this.defaultLanguageCode;
  65.     }

  66.     /**
  67.      * Set the defaultLanguageCode property: A value indicating which language code to use. Default is en.
  68.      *
  69.      * @param defaultLanguageCode the defaultLanguageCode value to set.
  70.      * @return the ImageAnalysisSkill object itself.
  71.      */
  72.     public ImageAnalysisSkill setDefaultLanguageCode(ImageAnalysisSkillLanguage defaultLanguageCode) {
  73.         this.defaultLanguageCode = defaultLanguageCode;
  74.         return this;
  75.     }

  76.     /**
  77.      * Get the visualFeatures property: A list of visual features.
  78.      *
  79.      * @return the visualFeatures value.
  80.      */
  81.     public List<VisualFeature> getVisualFeatures() {
  82.         return this.visualFeatures;
  83.     }

  84.     /**
  85.      * Set the visualFeatures property: A list of visual features.
  86.      *
  87.      * @param visualFeatures the visualFeatures value to set.
  88.      * @return the ImageAnalysisSkill object itself.
  89.      */
  90.     @JsonSetter
  91.     public ImageAnalysisSkill setVisualFeatures(List<VisualFeature> visualFeatures) {
  92.         this.visualFeatures = visualFeatures;
  93.         return this;
  94.     }

  95.     /**
  96.      * Get the details property: A string indicating which domain-specific details to return.
  97.      *
  98.      * @return the details value.
  99.      */
  100.     public List<ImageDetail> getDetails() {
  101.         return this.details;
  102.     }

  103.     /**
  104.      * Set the details property: A string indicating which domain-specific details to return.
  105.      *
  106.      * @param details the details value to set.
  107.      * @return the ImageAnalysisSkill object itself.
  108.      */
  109.     @JsonSetter
  110.     public ImageAnalysisSkill setDetails(List<ImageDetail> details) {
  111.         this.details = details;
  112.         return this;
  113.     }

  114.     /**
  115.      * Set the visualFeatures property: A list of visual features.
  116.      *
  117.      * @param visualFeatures the visualFeatures value to set.
  118.      * @return the ImageAnalysisSkill object itself.
  119.      */
  120.     public ImageAnalysisSkill setVisualFeatures(VisualFeature... visualFeatures) {
  121.         this.visualFeatures = (visualFeatures == null) ? null : java.util.Arrays.asList(visualFeatures);
  122.         return this;
  123.     }

  124.     /**
  125.      * Set the details property: A string indicating which domain-specific details to return.
  126.      *
  127.      * @param details the details value to set.
  128.      * @return the ImageAnalysisSkill object itself.
  129.      */
  130.     public ImageAnalysisSkill setDetails(ImageDetail... details) {
  131.         this.details = (details == null) ? null : java.util.Arrays.asList(details);
  132.         return this;
  133.     }
  134. }