Class License
java.lang.Object
com.azure.resourcemanager.apicenter.models.License
- All Implemented Interfaces:
com.azure.json.JsonSerializable<License>
The license information for the API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.name()
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
validate()
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
Get the name property: Name of the license.- Returns:
- the name value.
-
withName
Set the name property: Name of the license.- Parameters:
name
- the name value to set.- Returns:
- the License object itself.
-
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
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
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
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<License>
- Throws:
IOException
-
fromJson
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.
-