Class SrvRecord
java.lang.Object
com.azure.resourcemanager.dns.models.SrvRecord
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SrvRecord>
An SRV record.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SrvRecordfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SrvRecord from the JsonReader.port()Get the port property: The port value for this SRV record.priority()Get the priority property: The priority value for this SRV record.target()Get the target property: The target domain name for this SRV record.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.weight()Get the weight property: The weight value for this SRV record.Set the port property: The port value for this SRV record.withPriority(Integer priority) Set the priority property: The priority value for this SRV record.withTarget(String target) Set the target property: The target domain name for this SRV record.withWeight(Integer weight) Set the weight property: The weight value for this SRV record.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SrvRecord
public SrvRecord()Creates an instance of SrvRecord class.
-
-
Method Details
-
priority
Get the priority property: The priority value for this SRV record.- Returns:
- the priority value.
-
withPriority
Set the priority property: The priority value for this SRV record.- Parameters:
priority- the priority value to set.- Returns:
- the SrvRecord object itself.
-
weight
Get the weight property: The weight value for this SRV record.- Returns:
- the weight value.
-
withWeight
Set the weight property: The weight value for this SRV record.- Parameters:
weight- the weight value to set.- Returns:
- the SrvRecord object itself.
-
port
Get the port property: The port value for this SRV record.- Returns:
- the port value.
-
withPort
Set the port property: The port value for this SRV record.- Parameters:
port- the port value to set.- Returns:
- the SrvRecord object itself.
-
target
Get the target property: The target domain name for this SRV record.- Returns:
- the target value.
-
withTarget
Set the target property: The target domain name for this SRV record.- Parameters:
target- the target value to set.- Returns:
- the SrvRecord object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SrvRecord>- Throws:
IOException
-
fromJson
Reads an instance of SrvRecord from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SrvRecord 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 SrvRecord.
-