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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingAdditionalProperties;
import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingScenario;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Details required for SQL VM troubleshooting. */
@Fluent
public final class SqlVmTroubleshootingInner {
    /*
     * Start time in UTC timezone.
     */
    @JsonProperty(value = "startTimeUtc")
    private OffsetDateTime startTimeUtc;

    /*
     * End time in UTC timezone.
     */
    @JsonProperty(value = "endTimeUtc")
    private OffsetDateTime endTimeUtc;

    /*
     * SQL VM troubleshooting scenario.
     */
    @JsonProperty(value = "troubleshootingScenario")
    private TroubleshootingScenario troubleshootingScenario;

    /*
     * Troubleshooting properties
     */
    @JsonProperty(value = "properties")
    private TroubleshootingAdditionalProperties properties;

    /*
     * Virtual machine resource id for response.
     */
    @JsonProperty(value = "virtualMachineResourceId", access = JsonProperty.Access.WRITE_ONLY)
    private String virtualMachineResourceId;

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

    /**
     * Get the startTimeUtc property: Start time in UTC timezone.
     *
     * @return the startTimeUtc value.
     */
    public OffsetDateTime startTimeUtc() {
        return this.startTimeUtc;
    }

    /**
     * Set the startTimeUtc property: Start time in UTC timezone.
     *
     * @param startTimeUtc the startTimeUtc value to set.
     * @return the SqlVmTroubleshootingInner object itself.
     */
    public SqlVmTroubleshootingInner withStartTimeUtc(OffsetDateTime startTimeUtc) {
        this.startTimeUtc = startTimeUtc;
        return this;
    }

    /**
     * Get the endTimeUtc property: End time in UTC timezone.
     *
     * @return the endTimeUtc value.
     */
    public OffsetDateTime endTimeUtc() {
        return this.endTimeUtc;
    }

    /**
     * Set the endTimeUtc property: End time in UTC timezone.
     *
     * @param endTimeUtc the endTimeUtc value to set.
     * @return the SqlVmTroubleshootingInner object itself.
     */
    public SqlVmTroubleshootingInner withEndTimeUtc(OffsetDateTime endTimeUtc) {
        this.endTimeUtc = endTimeUtc;
        return this;
    }

    /**
     * Get the troubleshootingScenario property: SQL VM troubleshooting scenario.
     *
     * @return the troubleshootingScenario value.
     */
    public TroubleshootingScenario troubleshootingScenario() {
        return this.troubleshootingScenario;
    }

    /**
     * Set the troubleshootingScenario property: SQL VM troubleshooting scenario.
     *
     * @param troubleshootingScenario the troubleshootingScenario value to set.
     * @return the SqlVmTroubleshootingInner object itself.
     */
    public SqlVmTroubleshootingInner withTroubleshootingScenario(TroubleshootingScenario troubleshootingScenario) {
        this.troubleshootingScenario = troubleshootingScenario;
        return this;
    }

    /**
     * Get the properties property: Troubleshooting properties.
     *
     * @return the properties value.
     */
    public TroubleshootingAdditionalProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: Troubleshooting properties.
     *
     * @param properties the properties value to set.
     * @return the SqlVmTroubleshootingInner object itself.
     */
    public SqlVmTroubleshootingInner withProperties(TroubleshootingAdditionalProperties properties) {
        this.properties = properties;
        return this;
    }

    /**
     * Get the virtualMachineResourceId property: Virtual machine resource id for response.
     *
     * @return the virtualMachineResourceId value.
     */
    public String virtualMachineResourceId() {
        return this.virtualMachineResourceId;
    }

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