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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** The properties of a wait statistic. */
@Fluent
public final class WaitStatisticProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticProperties.class);

    /*
     * Observation start time.
     */
    @JsonProperty(value = "startTime")
    private OffsetDateTime startTime;

    /*
     * Observation end time.
     */
    @JsonProperty(value = "endTime")
    private OffsetDateTime endTime;

    /*
     * Wait event name.
     */
    @JsonProperty(value = "eventName")
    private String eventName;

    /*
     * Wait event type name.
     */
    @JsonProperty(value = "eventTypeName")
    private String eventTypeName;

    /*
     * Database query identifier.
     */
    @JsonProperty(value = "queryId")
    private Long queryId;

    /*
     * Database Name.
     */
    @JsonProperty(value = "databaseName")
    private String databaseName;

    /*
     * Database user identifier.
     */
    @JsonProperty(value = "userId")
    private Long userId;

    /*
     * Wait event count observed in this time interval.
     */
    @JsonProperty(value = "count")
    private Long count;

    /*
     * Total time of wait in milliseconds in this time interval.
     */
    @JsonProperty(value = "totalTimeInMs")
    private Double totalTimeInMs;

    /**
     * Get the startTime property: Observation start time.
     *
     * @return the startTime value.
     */
    public OffsetDateTime startTime() {
        return this.startTime;
    }

    /**
     * Set the startTime property: Observation start time.
     *
     * @param startTime the startTime value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withStartTime(OffsetDateTime startTime) {
        this.startTime = startTime;
        return this;
    }

    /**
     * Get the endTime property: Observation end time.
     *
     * @return the endTime value.
     */
    public OffsetDateTime endTime() {
        return this.endTime;
    }

    /**
     * Set the endTime property: Observation end time.
     *
     * @param endTime the endTime value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withEndTime(OffsetDateTime endTime) {
        this.endTime = endTime;
        return this;
    }

    /**
     * Get the eventName property: Wait event name.
     *
     * @return the eventName value.
     */
    public String eventName() {
        return this.eventName;
    }

    /**
     * Set the eventName property: Wait event name.
     *
     * @param eventName the eventName value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withEventName(String eventName) {
        this.eventName = eventName;
        return this;
    }

    /**
     * Get the eventTypeName property: Wait event type name.
     *
     * @return the eventTypeName value.
     */
    public String eventTypeName() {
        return this.eventTypeName;
    }

    /**
     * Set the eventTypeName property: Wait event type name.
     *
     * @param eventTypeName the eventTypeName value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withEventTypeName(String eventTypeName) {
        this.eventTypeName = eventTypeName;
        return this;
    }

    /**
     * Get the queryId property: Database query identifier.
     *
     * @return the queryId value.
     */
    public Long queryId() {
        return this.queryId;
    }

    /**
     * Set the queryId property: Database query identifier.
     *
     * @param queryId the queryId value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withQueryId(Long queryId) {
        this.queryId = queryId;
        return this;
    }

    /**
     * Get the databaseName property: Database Name.
     *
     * @return the databaseName value.
     */
    public String databaseName() {
        return this.databaseName;
    }

    /**
     * Set the databaseName property: Database Name.
     *
     * @param databaseName the databaseName value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withDatabaseName(String databaseName) {
        this.databaseName = databaseName;
        return this;
    }

    /**
     * Get the userId property: Database user identifier.
     *
     * @return the userId value.
     */
    public Long userId() {
        return this.userId;
    }

    /**
     * Set the userId property: Database user identifier.
     *
     * @param userId the userId value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    /**
     * Get the count property: Wait event count observed in this time interval.
     *
     * @return the count value.
     */
    public Long count() {
        return this.count;
    }

    /**
     * Set the count property: Wait event count observed in this time interval.
     *
     * @param count the count value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withCount(Long count) {
        this.count = count;
        return this;
    }

    /**
     * Get the totalTimeInMs property: Total time of wait in milliseconds in this time interval.
     *
     * @return the totalTimeInMs value.
     */
    public Double totalTimeInMs() {
        return this.totalTimeInMs;
    }

    /**
     * Set the totalTimeInMs property: Total time of wait in milliseconds in this time interval.
     *
     * @param totalTimeInMs the totalTimeInMs value to set.
     * @return the WaitStatisticProperties object itself.
     */
    public WaitStatisticProperties withTotalTimeInMs(Double totalTimeInMs) {
        this.totalTimeInMs = totalTimeInMs;
        return this;
    }

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