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

package com.azure.resourcemanager.communication.models;

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

/** List of DnsRecord. */
@Fluent
public final class DomainPropertiesVerificationRecords {
    /*
     * A class that represents a VerificationStatus record.
     */
    @JsonProperty(value = "Domain")
    private DnsRecord domain;

    /*
     * A class that represents a VerificationStatus record.
     */
    @JsonProperty(value = "SPF")
    private DnsRecord spf;

    /*
     * A class that represents a VerificationStatus record.
     */
    @JsonProperty(value = "DKIM")
    private DnsRecord dkim;

    /*
     * A class that represents a VerificationStatus record.
     */
    @JsonProperty(value = "DKIM2")
    private DnsRecord dkim2;

    /*
     * A class that represents a VerificationStatus record.
     */
    @JsonProperty(value = "DMARC")
    private DnsRecord dmarc;

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

    /**
     * Get the domain property: A class that represents a VerificationStatus record.
     *
     * @return the domain value.
     */
    public DnsRecord domain() {
        return this.domain;
    }

    /**
     * Set the domain property: A class that represents a VerificationStatus record.
     *
     * @param domain the domain value to set.
     * @return the DomainPropertiesVerificationRecords object itself.
     */
    public DomainPropertiesVerificationRecords withDomain(DnsRecord domain) {
        this.domain = domain;
        return this;
    }

    /**
     * Get the spf property: A class that represents a VerificationStatus record.
     *
     * @return the spf value.
     */
    public DnsRecord spf() {
        return this.spf;
    }

    /**
     * Set the spf property: A class that represents a VerificationStatus record.
     *
     * @param spf the spf value to set.
     * @return the DomainPropertiesVerificationRecords object itself.
     */
    public DomainPropertiesVerificationRecords withSpf(DnsRecord spf) {
        this.spf = spf;
        return this;
    }

    /**
     * Get the dkim property: A class that represents a VerificationStatus record.
     *
     * @return the dkim value.
     */
    public DnsRecord dkim() {
        return this.dkim;
    }

    /**
     * Set the dkim property: A class that represents a VerificationStatus record.
     *
     * @param dkim the dkim value to set.
     * @return the DomainPropertiesVerificationRecords object itself.
     */
    public DomainPropertiesVerificationRecords withDkim(DnsRecord dkim) {
        this.dkim = dkim;
        return this;
    }

    /**
     * Get the dkim2 property: A class that represents a VerificationStatus record.
     *
     * @return the dkim2 value.
     */
    public DnsRecord dkim2() {
        return this.dkim2;
    }

    /**
     * Set the dkim2 property: A class that represents a VerificationStatus record.
     *
     * @param dkim2 the dkim2 value to set.
     * @return the DomainPropertiesVerificationRecords object itself.
     */
    public DomainPropertiesVerificationRecords withDkim2(DnsRecord dkim2) {
        this.dkim2 = dkim2;
        return this;
    }

    /**
     * Get the dmarc property: A class that represents a VerificationStatus record.
     *
     * @return the dmarc value.
     */
    public DnsRecord dmarc() {
        return this.dmarc;
    }

    /**
     * Set the dmarc property: A class that represents a VerificationStatus record.
     *
     * @param dmarc the dmarc value to set.
     * @return the DomainPropertiesVerificationRecords object itself.
     */
    public DomainPropertiesVerificationRecords withDmarc(DnsRecord dmarc) {
        this.dmarc = dmarc;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (domain() != null) {
            domain().validate();
        }
        if (spf() != null) {
            spf().validate();
        }
        if (dkim() != null) {
            dkim().validate();
        }
        if (dkim2() != null) {
            dkim2().validate();
        }
        if (dmarc() != null) {
            dmarc().validate();
        }
    }
}
