// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // using Microsoft.SqlServer.Management.QueryStoreModel.Common; using Microsoft.SqlServer.Management.QueryStoreModel.OverallResourceConsumption; using Microsoft.SqlTools.Hosting.Protocol.Contracts; #nullable disable namespace Microsoft.SqlTools.ServiceLayer.QueryStore.Contracts { /// /// Parameters for getting an Overall Resource Consumption report /// public class GetOverallResourceConsumptionReportParams : QueryConfigurationParams { /// /// Time interval for the report /// public BasicTimeInterval SpecifiedTimeInterval { get; set; } /// /// Bucket interval for the report /// public BucketInterval SpecifiedBucketInterval { get; set; } public override OverallResourceConsumptionConfiguration Convert() { OverallResourceConsumptionConfiguration result = base.Convert(); result.SpecifiedTimeInterval = SpecifiedTimeInterval.Convert(); result.SelectedBucketInterval = SpecifiedBucketInterval; return result; } } /// /// Gets the query for an Overall Resource Consumption report /// public class GetOverallResourceConsumptionReportRequest { public static readonly RequestType Type = RequestType.Create("queryStore/getOverallResourceConsumptionReport"); } }