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

package com.azure.resourcemanager.mariadb.implementation;

import com.azure.resourcemanager.mariadb.fluent.models.QueryStatisticInner;
import com.azure.resourcemanager.mariadb.models.QueryStatistic;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;

public final class QueryStatisticImpl implements QueryStatistic {
    private QueryStatisticInner innerObject;

    private final com.azure.resourcemanager.mariadb.MariaDBManager serviceManager;

    QueryStatisticImpl(
        QueryStatisticInner innerObject, com.azure.resourcemanager.mariadb.MariaDBManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public String id() {
        return this.innerModel().id();
    }

    public String name() {
        return this.innerModel().name();
    }

    public String type() {
        return this.innerModel().type();
    }

    public String queryId() {
        return this.innerModel().queryId();
    }

    public OffsetDateTime startTime() {
        return this.innerModel().startTime();
    }

    public OffsetDateTime endTime() {
        return this.innerModel().endTime();
    }

    public String aggregationFunction() {
        return this.innerModel().aggregationFunction();
    }

    public List<String> databaseNames() {
        List<String> inner = this.innerModel().databaseNames();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public Long queryExecutionCount() {
        return this.innerModel().queryExecutionCount();
    }

    public String metricName() {
        return this.innerModel().metricName();
    }

    public String metricDisplayName() {
        return this.innerModel().metricDisplayName();
    }

    public Double metricValue() {
        return this.innerModel().metricValue();
    }

    public String metricValueUnit() {
        return this.innerModel().metricValueUnit();
    }

    public QueryStatisticInner innerModel() {
        return this.innerObject;
    }

    private com.azure.resourcemanager.mariadb.MariaDBManager manager() {
        return this.serviceManager;
    }
}
