CognitiveServicesAccount.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.JsonProperty;
  10. import com.fasterxml.jackson.annotation.JsonSubTypes;
  11. import com.fasterxml.jackson.annotation.JsonTypeInfo;
  12. import com.fasterxml.jackson.annotation.JsonTypeName;

  13. /** Base type for describing any cognitive service resource attached to a skillset. */
  14. @JsonTypeInfo(
  15.         use = JsonTypeInfo.Id.NAME,
  16.         include = JsonTypeInfo.As.PROPERTY,
  17.         property = "@odata.type",
  18.         defaultImpl = CognitiveServicesAccount.class,
  19.         visible = true)
  20. @JsonTypeName("CognitiveServicesAccount")
  21. @JsonSubTypes({
  22.     @JsonSubTypes.Type(
  23.             name = "#Microsoft.Azure.Search.DefaultCognitiveServices",
  24.             value = DefaultCognitiveServicesAccount.class),
  25.     @JsonSubTypes.Type(
  26.             name = "#Microsoft.Azure.Search.CognitiveServicesByKey",
  27.             value = CognitiveServicesAccountKey.class)
  28. })
  29. @Fluent
  30. public abstract class CognitiveServicesAccount {

  31.     /*
  32.      * Description of the cognitive service resource attached to a skillset.
  33.      */
  34.     @JsonProperty(value = "description")
  35.     private String description;

  36.     /**
  37.      * Get the description property: Description of the cognitive service resource attached to a skillset.
  38.      *
  39.      * @return the description value.
  40.      */
  41.     public String getDescription() {
  42.         return this.description;
  43.     }

  44.     /**
  45.      * Set the description property: Description of the cognitive service resource attached to a skillset.
  46.      *
  47.      * @param description the description value to set.
  48.      * @return the CognitiveServicesAccount object itself.
  49.      */
  50.     public CognitiveServicesAccount setDescription(String description) {
  51.         this.description = description;
  52.         return this;
  53.     }
  54. }