java.lang.Object
com.azure.resourcemanager.apicenter.models.License
All Implemented Interfaces:
com.azure.json.JsonSerializable<License>

public final class License extends Object implements com.azure.json.JsonSerializable<License>
The license information for the API.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of License class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static License
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of License from the JsonReader.
    Get the identifier property: SPDX license information for the API.
    Get the name property: Name of the license.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    url()
    Get the url property: URL pointing to the license details.
    void
    Validates the instance.
    withIdentifier(String identifier)
    Set the identifier property: SPDX license information for the API.
    Set the name property: Name of the license.
    Set the url property: URL pointing to the license details.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • License

      public License()
      Creates an instance of License class.
  • Method Details

    • name

      public String name()
      Get the name property: Name of the license.
      Returns:
      the name value.
    • withName

      public License withName(String name)
      Set the name property: Name of the license.
      Parameters:
      name - the name value to set.
      Returns:
      the License object itself.
    • url

      public String url()
      Get the url property: URL pointing to the license details. The URL field is mutually exclusive of the identifier field.
      Returns:
      the url value.
    • withUrl

      public License withUrl(String url)
      Set the url property: URL pointing to the license details. The URL field is mutually exclusive of the identifier field.
      Parameters:
      url - the url value to set.
      Returns:
      the License object itself.
    • identifier

      public String identifier()
      Get the identifier property: SPDX license information for the API. The identifier field is mutually exclusive of the URL field.
      Returns:
      the identifier value.
    • withIdentifier

      public License withIdentifier(String identifier)
      Set the identifier property: SPDX license information for the API. The identifier field is mutually exclusive of the URL field.
      Parameters:
      identifier - the identifier value to set.
      Returns:
      the License object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<License>
      Throws:
      IOException
    • fromJson

      public static License fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of License from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of License if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the License.