ContactDetail Class

  • java.lang.Object
    • com.azure.resourcemanager.peering.models.ContactDetail

Implements

public final class ContactDetail
implements JsonSerializable<ContactDetail>

The contact detail class.

Constructor Summary

Constructor Description
ContactDetail()

Creates an instance of ContactDetail class.

Method Summary

Modifier and Type Method and Description
String email()

Get the email property: The e-mail address of the contact.

static ContactDetail fromJson(JsonReader jsonReader)

Reads an instance of ContactDetail from the JsonReader.

String phone()

Get the phone property: The phone number of the contact.

Role role()

Get the role property: The role of the contact.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ContactDetail withEmail(String email)

Set the email property: The e-mail address of the contact.

ContactDetail withPhone(String phone)

Set the phone property: The phone number of the contact.

ContactDetail withRole(Role role)

Set the role property: The role of the contact.

Methods inherited from java.lang.Object

Constructor Details

ContactDetail

public ContactDetail()

Creates an instance of ContactDetail class.

Method Details

email

public String email()

Get the email property: The e-mail address of the contact.

Returns:

the email value.

fromJson

public static ContactDetail fromJson(JsonReader jsonReader)

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.

phone

public String phone()

Get the phone property: The phone number of the contact.

Returns:

the phone value.

role

public Role role()

Get the role property: The role of the contact.

Returns:

the role value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

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.

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.

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.

Applies to