// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.peering.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The contact detail class. */
@Fluent
public final class ContactDetail {
    /*
     * The role of the contact.
     */
    @JsonProperty(value = "role")
    private Role role;

    /*
     * The e-mail address of the contact.
     */
    @JsonProperty(value = "email")
    private String email;

    /*
     * The phone number of the contact.
     */
    @JsonProperty(value = "phone")
    private String phone;

    /** Creates an instance of ContactDetail class. */
    public ContactDetail() {
    }

    /**
     * Get the role property: The role of the contact.
     *
     * @return the role value.
     */
    public Role role() {
        return this.role;
    }

    /**
     * Set the role property: The role of the contact.
     *
     * @param role the role value to set.
     * @return the ContactDetail object itself.
     */
    public ContactDetail withRole(Role role) {
        this.role = role;
        return this;
    }

    /**
     * Get the email property: The e-mail address of the contact.
     *
     * @return the email value.
     */
    public String email() {
        return this.email;
    }

    /**
     * Set the email property: The e-mail address of the contact.
     *
     * @param email the email value to set.
     * @return the ContactDetail object itself.
     */
    public ContactDetail withEmail(String email) {
        this.email = email;
        return this;
    }

    /**
     * Get the phone property: The phone number of the contact.
     *
     * @return the phone value.
     */
    public String phone() {
        return this.phone;
    }

    /**
     * Set the phone property: The phone number of the contact.
     *
     * @param phone the phone value to set.
     * @return the ContactDetail object itself.
     */
    public ContactDetail withPhone(String phone) {
        this.phone = phone;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
