Class Contact
java.lang.Object
com.azure.resourcemanager.apicenter.models.Contact
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Contact>
Contact information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionemail()
Get the email property: Email address of the contact.static Contact
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of Contact from the JsonReader.name()
Get the name property: Name of the contact.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) url()
Get the url property: URL for the contact.void
validate()
Validates the instance.Set the email property: Email address of the contact.Set the name property: Name of the contact.Set the url property: URL for the contact.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
-
Contact
public Contact()Creates an instance of Contact class.
-
-
Method Details
-
name
Get the name property: Name of the contact.- Returns:
- the name value.
-
withName
Set the name property: Name of the contact.- Parameters:
name
- the name value to set.- Returns:
- the Contact object itself.
-
url
Get the url property: URL for the contact.- Returns:
- the url value.
-
withUrl
Set the url property: URL for the contact.- Parameters:
url
- the url value to set.- Returns:
- the Contact object itself.
-
email
Get the email property: Email address of the contact.- Returns:
- the email value.
-
withEmail
Set the email property: Email address of the contact.- Parameters:
email
- the email value to set.- Returns:
- the Contact 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<Contact>
- Throws:
IOException
-
fromJson
Reads an instance of Contact from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of Contact 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 Contact.
-