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

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

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.resourceconnector.models.ApplianceCredentialKubeconfig;
import com.azure.resourcemanager.resourceconnector.models.HybridConnectionConfig;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The List Cluster User Credential appliance. */
@Immutable
public final class ApplianceListCredentialResultsInner {
    /*
     * Contains the REP (rendezvous endpoint) and “Listener” access token from notification service (NS).
     */
    @JsonProperty(value = "hybridConnectionConfig", access = JsonProperty.Access.WRITE_ONLY)
    private HybridConnectionConfig hybridConnectionConfig;

    /*
     * The list of appliance kubeconfigs.
     */
    @JsonProperty(value = "kubeconfigs", access = JsonProperty.Access.WRITE_ONLY)
    private List<ApplianceCredentialKubeconfig> kubeconfigs;

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

    /**
     * Get the hybridConnectionConfig property: Contains the REP (rendezvous endpoint) and “Listener” access token from
     * notification service (NS).
     *
     * @return the hybridConnectionConfig value.
     */
    public HybridConnectionConfig hybridConnectionConfig() {
        return this.hybridConnectionConfig;
    }

    /**
     * Get the kubeconfigs property: The list of appliance kubeconfigs.
     *
     * @return the kubeconfigs value.
     */
    public List<ApplianceCredentialKubeconfig> kubeconfigs() {
        return this.kubeconfigs;
    }

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