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

package com.azure.resourcemanager.securityinsights.models;

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

/** The set of contacts associated with this domain. */
@Fluent
public final class EnrichmentDomainWhoisContacts {
    /*
     * The admin contact for this whois record
     */
    @JsonProperty(value = "admin")
    private EnrichmentDomainWhoisContact admin;

    /*
     * The billing contact for this whois record
     */
    @JsonProperty(value = "billing")
    private EnrichmentDomainWhoisContact billing;

    /*
     * The registrant contact for this whois record
     */
    @JsonProperty(value = "registrant")
    private EnrichmentDomainWhoisContact registrant;

    /*
     * The technical contact for this whois record
     */
    @JsonProperty(value = "tech")
    private EnrichmentDomainWhoisContact tech;

    /**
     * Get the admin property: The admin contact for this whois record.
     *
     * @return the admin value.
     */
    public EnrichmentDomainWhoisContact admin() {
        return this.admin;
    }

    /**
     * Set the admin property: The admin contact for this whois record.
     *
     * @param admin the admin value to set.
     * @return the EnrichmentDomainWhoisContacts object itself.
     */
    public EnrichmentDomainWhoisContacts withAdmin(EnrichmentDomainWhoisContact admin) {
        this.admin = admin;
        return this;
    }

    /**
     * Get the billing property: The billing contact for this whois record.
     *
     * @return the billing value.
     */
    public EnrichmentDomainWhoisContact billing() {
        return this.billing;
    }

    /**
     * Set the billing property: The billing contact for this whois record.
     *
     * @param billing the billing value to set.
     * @return the EnrichmentDomainWhoisContacts object itself.
     */
    public EnrichmentDomainWhoisContacts withBilling(EnrichmentDomainWhoisContact billing) {
        this.billing = billing;
        return this;
    }

    /**
     * Get the registrant property: The registrant contact for this whois record.
     *
     * @return the registrant value.
     */
    public EnrichmentDomainWhoisContact registrant() {
        return this.registrant;
    }

    /**
     * Set the registrant property: The registrant contact for this whois record.
     *
     * @param registrant the registrant value to set.
     * @return the EnrichmentDomainWhoisContacts object itself.
     */
    public EnrichmentDomainWhoisContacts withRegistrant(EnrichmentDomainWhoisContact registrant) {
        this.registrant = registrant;
        return this;
    }

    /**
     * Get the tech property: The technical contact for this whois record.
     *
     * @return the tech value.
     */
    public EnrichmentDomainWhoisContact tech() {
        return this.tech;
    }

    /**
     * Set the tech property: The technical contact for this whois record.
     *
     * @param tech the tech value to set.
     * @return the EnrichmentDomainWhoisContacts object itself.
     */
    public EnrichmentDomainWhoisContacts withTech(EnrichmentDomainWhoisContact tech) {
        this.tech = tech;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (admin() != null) {
            admin().validate();
        }
        if (billing() != null) {
            billing().validate();
        }
        if (registrant() != null) {
            registrant().validate();
        }
        if (tech() != null) {
            tech().validate();
        }
    }
}
