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

package com.azure.resourcemanager.workloads.models;

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

/**
 * Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.
 */
@Fluent
public final class SshPublicKey {
    /*
     * SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit
     * and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in
     * Azure](https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
     */
    @JsonProperty(value = "keyData")
    private String keyData;

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

    /**
     * Get the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs
     * to be at least 2048-bit and in ssh-rsa format. &lt;br&gt;&lt;br&gt; For creating ssh keys, see [Create SSH keys
     * on Linux and Mac for Linux VMs in
     * Azure](https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
     *
     * @return the keyData value.
     */
    public String keyData() {
        return this.keyData;
    }

    /**
     * Set the keyData property: SSH public key certificate used to authenticate with the VM through ssh. The key needs
     * to be at least 2048-bit and in ssh-rsa format. &lt;br&gt;&lt;br&gt; For creating ssh keys, see [Create SSH keys
     * on Linux and Mac for Linux VMs in
     * Azure](https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
     *
     * @param keyData the keyData value to set.
     * @return the SshPublicKey object itself.
     */
    public SshPublicKey withKeyData(String keyData) {
        this.keyData = keyData;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
