// 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.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/** Defines the resource properties. */
@Immutable
public final class GuestAgentProfile {
    /*
     * Specifies the VM's unique SMBIOS ID.
     */
    @JsonProperty(value = "vmUuid", access = JsonProperty.Access.WRITE_ONLY)
    private String vmUuid;

    /*
     * The status of the hybrid machine agent.
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private StatusTypes status;

    /*
     * The time of the last status change.
     */
    @JsonProperty(value = "lastStatusChange", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime lastStatusChange;

    /*
     * The hybrid machine agent full version.
     */
    @JsonProperty(value = "agentVersion", access = JsonProperty.Access.WRITE_ONLY)
    private String agentVersion;

    /*
     * Details about the error state.
     */
    @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY)
    private List<ErrorDetail> errorDetails;

    /**
     * Get the vmUuid property: Specifies the VM's unique SMBIOS ID.
     *
     * @return the vmUuid value.
     */
    public String vmUuid() {
        return this.vmUuid;
    }

    /**
     * Get the status property: The status of the hybrid machine agent.
     *
     * @return the status value.
     */
    public StatusTypes status() {
        return this.status;
    }

    /**
     * Get the lastStatusChange property: The time of the last status change.
     *
     * @return the lastStatusChange value.
     */
    public OffsetDateTime lastStatusChange() {
        return this.lastStatusChange;
    }

    /**
     * Get the agentVersion property: The hybrid machine agent full version.
     *
     * @return the agentVersion value.
     */
    public String agentVersion() {
        return this.agentVersion;
    }

    /**
     * Get the errorDetails property: Details about the error state.
     *
     * @return the errorDetails value.
     */
    public List<ErrorDetail> errorDetails() {
        return this.errorDetails;
    }

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