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

package com.azure.resourcemanager.hybridcontainerservice.models;

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

/** SSH - SSH configuration for Linux-based VMs running on Azure. */
@Fluent
public final class LinuxProfilePropertiesSsh {
    /*
     * PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key
     * specified.
     */
    @JsonProperty(value = "publicKeys")
    private List<LinuxProfilePropertiesSshPublicKeysItem> publicKeys;

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

    /**
     * Get the publicKeys property: PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs.
     * Only expect one key specified.
     *
     * @return the publicKeys value.
     */
    public List<LinuxProfilePropertiesSshPublicKeysItem> publicKeys() {
        return this.publicKeys;
    }

    /**
     * Set the publicKeys property: PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs.
     * Only expect one key specified.
     *
     * @param publicKeys the publicKeys value to set.
     * @return the LinuxProfilePropertiesSsh object itself.
     */
    public LinuxProfilePropertiesSsh withPublicKeys(List<LinuxProfilePropertiesSshPublicKeysItem> publicKeys) {
        this.publicKeys = publicKeys;
        return this;
    }

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