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
    Constructor
    Description
    Creates an instance of ContactDetail class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the email property: The e-mail address of the contact.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ContactDetail from the JsonReader.
    Get the phone property: The phone number of the contact.
    Get the role property: The role of the contact.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the email property: The e-mail address of the contact.
    Set the phone property: The phone number of the contact.
    withRole(Role role)
    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, wait

    Methods 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

      public Role role()
      Get the role property: The role of the contact.
      Returns:
      the role value.
    • withRole

      public ContactDetail withRole(Role role)
      Set the role property: The role of the contact.
      Parameters:
      role - the role value to set.
      Returns:
      the ContactDetail object itself.
    • email

      public String email()
      Get the email property: The e-mail address of the contact.
      Returns:
      the email value.
    • withEmail

      public ContactDetail withEmail(String email)
      Set the email property: The e-mail address of the contact.
      Parameters:
      email - the email value to set.
      Returns:
      the ContactDetail object itself.
    • phone

      public String phone()
      Get the phone property: The phone number of the contact.
      Returns:
      the phone value.
    • withPhone

      public ContactDetail withPhone(String phone)
      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

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

      public static ContactDetail fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.