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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.connectedvmware.models.Identity;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Defines the resource properties. */
@Fluent
public final class HybridIdentityMetadataProperties {
    /*
     * Gets or sets the Vm Id.
     */
    @JsonProperty(value = "vmId")
    private String vmId;

    /*
     * Gets or sets the Public Key.
     */
    @JsonProperty(value = "publicKey")
    private String publicKey;

    /*
     * The identity of the resource.
     */
    @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY)
    private Identity identity;

    /*
     * Gets or sets the provisioning state.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningState;

    /**
     * Get the vmId property: Gets or sets the Vm Id.
     *
     * @return the vmId value.
     */
    public String vmId() {
        return this.vmId;
    }

    /**
     * Set the vmId property: Gets or sets the Vm Id.
     *
     * @param vmId the vmId value to set.
     * @return the HybridIdentityMetadataProperties object itself.
     */
    public HybridIdentityMetadataProperties withVmId(String vmId) {
        this.vmId = vmId;
        return this;
    }

    /**
     * Get the publicKey property: Gets or sets the Public Key.
     *
     * @return the publicKey value.
     */
    public String publicKey() {
        return this.publicKey;
    }

    /**
     * Set the publicKey property: Gets or sets the Public Key.
     *
     * @param publicKey the publicKey value to set.
     * @return the HybridIdentityMetadataProperties object itself.
     */
    public HybridIdentityMetadataProperties withPublicKey(String publicKey) {
        this.publicKey = publicKey;
        return this;
    }

    /**
     * Get the identity property: The identity of the resource.
     *
     * @return the identity value.
     */
    public Identity identity() {
        return this.identity;
    }

    /**
     * Get the provisioningState property: Gets or sets the provisioning state.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

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