SearchIndexerSkillset.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 java.util.List;

  13. /** A list of skills. */
  14. @Fluent
  15. public final class SearchIndexerSkillset {
  16.     /*
  17.      * The name of the skillset.
  18.      */
  19.     @JsonProperty(value = "name", required = true)
  20.     private String name;

  21.     /*
  22.      * The description of the skillset.
  23.      */
  24.     @JsonProperty(value = "description")
  25.     private String description;

  26.     /*
  27.      * A list of skills in the skillset.
  28.      */
  29.     @JsonProperty(value = "skills", required = true)
  30.     private List<SearchIndexerSkill> skills;

  31.     /*
  32.      * Details about cognitive services to be used when running skills.
  33.      */
  34.     @JsonProperty(value = "cognitiveServices")
  35.     private CognitiveServicesAccount cognitiveServicesAccount;

  36.     /*
  37.      * Definition of additional projections to azure blob, table, or files, of
  38.      * enriched data.
  39.      */
  40.     @JsonProperty(value = "knowledgeStore")
  41.     private SearchIndexerKnowledgeStore knowledgeStore;

  42.     /*
  43.      * The ETag of the skillset.
  44.      */
  45.     @JsonProperty(value = "@odata.etag")
  46.     private String eTag;

  47.     /*
  48.      * A description of an encryption key that you create in Azure Key Vault.
  49.      * This key is used to provide an additional level of encryption-at-rest
  50.      * for your skillset definition when you want full assurance that no one,
  51.      * not even Microsoft, can decrypt your skillset definition in Azure
  52.      * Cognitive Search. Once you have encrypted your skillset definition, it
  53.      * will always remain encrypted. Azure Cognitive Search will ignore
  54.      * attempts to set this property to null. You can change this property as
  55.      * needed if you want to rotate your encryption key; Your skillset
  56.      * definition will be unaffected. Encryption with customer-managed keys is
  57.      * not available for free search services, and is only available for paid
  58.      * services created on or after January 1, 2019.
  59.      */
  60.     @JsonProperty(value = "encryptionKey")
  61.     private SearchResourceEncryptionKey encryptionKey;

  62.     /**
  63.      * Creates an instance of SearchIndexerSkillset class.
  64.      *
  65.      * @param name the name value to set.
  66.      * @param skills the skills value to set.
  67.      */
  68.     @JsonCreator
  69.     public SearchIndexerSkillset(
  70.             @JsonProperty(value = "name") String name,
  71.             @JsonProperty(value = "skills") List<SearchIndexerSkill> skills) {
  72.         this.name = name;
  73.         this.skills = skills;
  74.     }

  75.     /**
  76.      * Creates an instance of SearchIndexerSkillset class.
  77.      *
  78.      * @param name the name value to set.
  79.      */
  80.     public SearchIndexerSkillset(String name) {
  81.         this(name, null);
  82.     }

  83.     /**
  84.      * Get the name property: The name of the skillset.
  85.      *
  86.      * @return the name value.
  87.      */
  88.     public String getName() {
  89.         return this.name;
  90.     }

  91.     /**
  92.      * Get the description property: The description of the skillset.
  93.      *
  94.      * @return the description value.
  95.      */
  96.     public String getDescription() {
  97.         return this.description;
  98.     }

  99.     /**
  100.      * Set the description property: The description of the skillset.
  101.      *
  102.      * @param description the description value to set.
  103.      * @return the SearchIndexerSkillset object itself.
  104.      */
  105.     public SearchIndexerSkillset setDescription(String description) {
  106.         this.description = description;
  107.         return this;
  108.     }

  109.     /**
  110.      * Get the skills property: A list of skills in the skillset.
  111.      *
  112.      * @return the skills value.
  113.      */
  114.     public List<SearchIndexerSkill> getSkills() {
  115.         return this.skills;
  116.     }

  117.     /**
  118.      * Get the cognitiveServicesAccount property: Details about cognitive services to be used when running skills.
  119.      *
  120.      * @return the cognitiveServicesAccount value.
  121.      */
  122.     public CognitiveServicesAccount getCognitiveServicesAccount() {
  123.         return this.cognitiveServicesAccount;
  124.     }

  125.     /**
  126.      * Set the cognitiveServicesAccount property: Details about cognitive services to be used when running skills.
  127.      *
  128.      * @param cognitiveServicesAccount the cognitiveServicesAccount value to set.
  129.      * @return the SearchIndexerSkillset object itself.
  130.      */
  131.     public SearchIndexerSkillset setCognitiveServicesAccount(CognitiveServicesAccount cognitiveServicesAccount) {
  132.         this.cognitiveServicesAccount = cognitiveServicesAccount;
  133.         return this;
  134.     }

  135.     /**
  136.      * Get the knowledgeStore property: Definition of additional projections to azure blob, table, or files, of enriched
  137.      * data.
  138.      *
  139.      * @return the knowledgeStore value.
  140.      */
  141.     public SearchIndexerKnowledgeStore getKnowledgeStore() {
  142.         return this.knowledgeStore;
  143.     }

  144.     /**
  145.      * Set the knowledgeStore property: Definition of additional projections to azure blob, table, or files, of enriched
  146.      * data.
  147.      *
  148.      * @param knowledgeStore the knowledgeStore value to set.
  149.      * @return the SearchIndexerSkillset object itself.
  150.      */
  151.     public SearchIndexerSkillset setKnowledgeStore(SearchIndexerKnowledgeStore knowledgeStore) {
  152.         this.knowledgeStore = knowledgeStore;
  153.         return this;
  154.     }

  155.     /**
  156.      * Get the eTag property: The ETag of the skillset.
  157.      *
  158.      * @return the eTag value.
  159.      */
  160.     public String getETag() {
  161.         return this.eTag;
  162.     }

  163.     /**
  164.      * Set the eTag property: The ETag of the skillset.
  165.      *
  166.      * @param eTag the eTag value to set.
  167.      * @return the SearchIndexerSkillset object itself.
  168.      */
  169.     public SearchIndexerSkillset setETag(String eTag) {
  170.         this.eTag = eTag;
  171.         return this;
  172.     }

  173.     /**
  174.      * Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault. This key
  175.      * is used to provide an additional level of encryption-at-rest for your skillset definition when you want full
  176.      * assurance that no one, not even Microsoft, can decrypt your skillset definition in Azure Cognitive Search. Once
  177.      * you have encrypted your skillset definition, it will always remain encrypted. Azure Cognitive Search will ignore
  178.      * attempts to set this property to null. You can change this property as needed if you want to rotate your
  179.      * encryption key; Your skillset definition will be unaffected. Encryption with customer-managed keys is not
  180.      * available for free search services, and is only available for paid services created on or after January 1, 2019.
  181.      *
  182.      * @return the encryptionKey value.
  183.      */
  184.     public SearchResourceEncryptionKey getEncryptionKey() {
  185.         return this.encryptionKey;
  186.     }

  187.     /**
  188.      * Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault. This key
  189.      * is used to provide an additional level of encryption-at-rest for your skillset definition when you want full
  190.      * assurance that no one, not even Microsoft, can decrypt your skillset definition in Azure Cognitive Search. Once
  191.      * you have encrypted your skillset definition, it will always remain encrypted. Azure Cognitive Search will ignore
  192.      * attempts to set this property to null. You can change this property as needed if you want to rotate your
  193.      * encryption key; Your skillset definition will be unaffected. Encryption with customer-managed keys is not
  194.      * available for free search services, and is only available for paid services created on or after January 1, 2019.
  195.      *
  196.      * @param encryptionKey the encryptionKey value to set.
  197.      * @return the SearchIndexerSkillset object itself.
  198.      */
  199.     public SearchIndexerSkillset setEncryptionKey(SearchResourceEncryptionKey encryptionKey) {
  200.         this.encryptionKey = encryptionKey;
  201.         return this;
  202.     }

  203.     /**
  204.      * Sets the skills property: A list of skills in the skillset.
  205.      *
  206.      * @param skills the skills value to set.
  207.      * @return the SearchIndexerSkillset object itself.
  208.      */
  209.     @JsonSetter
  210.     public SearchIndexerSkillset setSkills(List<SearchIndexerSkill> skills) {
  211.         this.skills = skills;
  212.         return this;
  213.     }

  214.     /**
  215.      * Sets the skills property: A list of skills in the skillset.
  216.      *
  217.      * @param skills the skills value to set.
  218.      * @return the SearchIndexerSkillset object itself.
  219.      */
  220.     public SearchIndexerSkillset setSkills(SearchIndexerSkill... skills) {
  221.         this.skills = (skills == null) ? null : java.util.Arrays.asList(skills);
  222.         return this;
  223.     }
  224. }