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

package com.azure.resourcemanager.devspaces.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.devspaces.models.ControllerConnectionDetails;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The ControllerConnectionDetailsList model. */
@Fluent
public final class ControllerConnectionDetailsListInner {
    /*
     * List of Azure Dev Spaces Controller connection details.
     */
    @JsonProperty(value = "connectionDetailsList")
    private List<ControllerConnectionDetails> connectionDetailsList;

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

    /**
     * Get the connectionDetailsList property: List of Azure Dev Spaces Controller connection details.
     *
     * @return the connectionDetailsList value.
     */
    public List<ControllerConnectionDetails> connectionDetailsList() {
        return this.connectionDetailsList;
    }

    /**
     * Set the connectionDetailsList property: List of Azure Dev Spaces Controller connection details.
     *
     * @param connectionDetailsList the connectionDetailsList value to set.
     * @return the ControllerConnectionDetailsListInner object itself.
     */
    public ControllerConnectionDetailsListInner withConnectionDetailsList(
        List<ControllerConnectionDetails> connectionDetailsList) {
        this.connectionDetailsList = connectionDetailsList;
        return this;
    }

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