java.lang.Object
com.azure.resourcemanager.apicenter.models.Contact
All Implemented Interfaces:
com.azure.json.JsonSerializable<Contact>

public final class Contact extends Object implements com.azure.json.JsonSerializable<Contact>
Contact information.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of Contact class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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
    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

      public String name()
      Get the name property: Name of the contact.
      Returns:
      the name value.
    • withName

      public Contact withName(String name)
      Set the name property: Name of the contact.
      Parameters:
      name - the name value to set.
      Returns:
      the Contact object itself.
    • url

      public String url()
      Get the url property: URL for the contact.
      Returns:
      the url value.
    • withUrl

      public Contact withUrl(String url)
      Set the url property: URL for the contact.
      Parameters:
      url - the url value to set.
      Returns:
      the Contact object itself.
    • email

      public String email()
      Get the email property: Email address of the contact.
      Returns:
      the email value.
    • withEmail

      public Contact withEmail(String email)
      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

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

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