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

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The FqdnEndpoint model. */
@Fluent
public final class FqdnEndpoint {
    /*
     * The domainName property.
     */
    @JsonProperty(value = "domainName")
    private String domainName;

    /*
     * The endpointDetails property.
     */
    @JsonProperty(value = "endpointDetails")
    private List<FqdnEndpointDetail> endpointDetails;

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

    /**
     * Get the domainName property: The domainName property.
     *
     * @return the domainName value.
     */
    public String domainName() {
        return this.domainName;
    }

    /**
     * Set the domainName property: The domainName property.
     *
     * @param domainName the domainName value to set.
     * @return the FqdnEndpoint object itself.
     */
    public FqdnEndpoint withDomainName(String domainName) {
        this.domainName = domainName;
        return this;
    }

    /**
     * Get the endpointDetails property: The endpointDetails property.
     *
     * @return the endpointDetails value.
     */
    public List<FqdnEndpointDetail> endpointDetails() {
        return this.endpointDetails;
    }

    /**
     * Set the endpointDetails property: The endpointDetails property.
     *
     * @param endpointDetails the endpointDetails value to set.
     * @return the FqdnEndpoint object itself.
     */
    public FqdnEndpoint withEndpointDetails(List<FqdnEndpointDetail> endpointDetails) {
        this.endpointDetails = endpointDetails;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (endpointDetails() != null) {
            endpointDetails().forEach(e -> e.validate());
        }
    }
}
