Class ContactDetail
java.lang.Object
com.azure.resourcemanager.peering.models.ContactDetail
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ContactDetail>
public final class ContactDetail
extends Object
implements com.azure.json.JsonSerializable<ContactDetail>
The contact detail class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionemail()Get the email property: The e-mail address of the contact.static ContactDetailfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ContactDetail from the JsonReader.phone()Get the phone property: The phone number of the contact.role()Get the role property: The role of the contact.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the email property: The e-mail address of the contact.Set the phone property: The phone number of the contact.Set the role property: The role of the contact.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
-
ContactDetail
public ContactDetail()Creates an instance of ContactDetail class.
-
-
Method Details
-
role
Get the role property: The role of the contact.- Returns:
- the role value.
-
withRole
Set the role property: The role of the contact.- Parameters:
role- the role value to set.- Returns:
- the ContactDetail object itself.
-
email
Get the email property: The e-mail address of the contact.- Returns:
- the email value.
-
withEmail
Set the email property: The e-mail address of the contact.- Parameters:
email- the email value to set.- Returns:
- the ContactDetail object itself.
-
phone
Get the phone property: The phone number of the contact.- Returns:
- the phone value.
-
withPhone
Set the phone property: The phone number of the contact.- Parameters:
phone- the phone value to set.- Returns:
- the ContactDetail 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<ContactDetail>- Throws:
IOException
-
fromJson
Reads an instance of ContactDetail from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ContactDetail 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 ContactDetail.
-