import * as HttpClient from "effect/unstable/http/HttpClient";
import * as redacted from "effect/Redacted";
import * as S from "effect/Schema";
import * as stream from "effect/Stream";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import { SensitiveString } from "../sensitive.js";
const ns = T.XmlNamespace("http://pi.amazonaws.com/doc/2018-02-27/");
const svc = T.AwsApiService({
    sdkId: "PI",
    serviceShapeName: "PerformanceInsightsv20180227",
});
const auth = T.AwsAuthSigv4({ name: "pi" });
const ver = T.ServiceVersion("2018-02-27");
const proto = T.AwsProtocolsAwsJson1_1();
const rules = T.EndpointResolver((p, _) => {
    const { Region, UseDualStack = false, UseFIPS = false, Endpoint } = p;
    const e = (u, p = {}, h = {}) => ({
        type: "endpoint",
        endpoint: { url: u, properties: p, headers: h },
    });
    const err = (m) => ({
        type: "error",
        message: m,
    });
    if (Endpoint != null) {
        if (UseFIPS === true) {
            return err("Invalid Configuration: FIPS and custom endpoint are not supported");
        }
        if (UseDualStack === true) {
            return err("Invalid Configuration: Dualstack and custom endpoint are not supported");
        }
        return e(Endpoint);
    }
    if (Region != null) {
        {
            const PartitionResult = _.partition(Region);
            if (PartitionResult != null && PartitionResult !== false) {
                if (UseFIPS === true && UseDualStack === true) {
                    if (true === _.getAttr(PartitionResult, "supportsFIPS") &&
                        true === _.getAttr(PartitionResult, "supportsDualStack")) {
                        return e(`https://pi-fips.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("FIPS and DualStack are enabled, but this partition does not support one or both");
                }
                if (UseFIPS === true) {
                    if (_.getAttr(PartitionResult, "supportsFIPS") === true) {
                        return e(`https://pi-fips.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
                    }
                    return err("FIPS is enabled but this partition does not support FIPS");
                }
                if (UseDualStack === true) {
                    if (true === _.getAttr(PartitionResult, "supportsDualStack")) {
                        return e(`https://pi.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://pi.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const ServiceType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Tag = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Key: S.String, Value: S.String })).annotate({ identifier: "Tag" });
export const TagList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const CreatePerformanceAnalysisReportRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    StartTime: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    EndTime: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    Tags: S.optional(TagList),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreatePerformanceAnalysisReportRequest",
});
export const CreatePerformanceAnalysisReportResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ AnalysisReportId: S.optional(S.String) }).pipe(ns)).annotate({
    identifier: "CreatePerformanceAnalysisReportResponse",
});
export const DeletePerformanceAnalysisReportRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    AnalysisReportId: S.String,
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeletePerformanceAnalysisReportRequest",
});
export const DeletePerformanceAnalysisReportResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeletePerformanceAnalysisReportResponse",
});
export const SanitizedStringList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const DimensionGroup = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Group: S.String,
    Dimensions: S.optional(SanitizedStringList),
    Limit: S.optional(S.Number),
})).annotate({ identifier: "DimensionGroup" });
export const AdditionalMetricsList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const MetricQueryFilterMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const DescribeDimensionKeysRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    StartTime: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    EndTime: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    Metric: S.String,
    PeriodInSeconds: S.optional(S.Number),
    GroupBy: DimensionGroup,
    AdditionalMetrics: S.optional(AdditionalMetricsList),
    PartitionBy: S.optional(DimensionGroup),
    Filter: S.optional(MetricQueryFilterMap),
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeDimensionKeysRequest",
});
export const DimensionMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const ResponsePartitionKey = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Dimensions: DimensionMap })).annotate({
    identifier: "ResponsePartitionKey",
});
export const ResponsePartitionKeyList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ResponsePartitionKey);
export const AdditionalMetricsMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.Number.pipe(S.optional));
export const MetricValuesList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.Number);
export const DimensionKeyDescription = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Dimensions: S.optional(DimensionMap),
    Total: S.optional(S.Number),
    AdditionalMetrics: S.optional(AdditionalMetricsMap),
    Partitions: S.optional(MetricValuesList),
})).annotate({
    identifier: "DimensionKeyDescription",
});
export const DimensionKeyDescriptionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(DimensionKeyDescription);
export const DescribeDimensionKeysResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AlignedStartTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    AlignedEndTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    PartitionKeys: S.optional(ResponsePartitionKeyList),
    Keys: S.optional(DimensionKeyDescriptionList),
    NextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "DescribeDimensionKeysResponse",
});
export const RequestedDimensionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const GetDimensionKeyDetailsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    Group: S.String,
    GroupIdentifier: S.String,
    RequestedDimensions: S.optional(RequestedDimensionList),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetDimensionKeyDetailsRequest",
});
export const DetailStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DimensionKeyDetail = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Value: S.optional(S.String),
    Dimension: S.optional(S.String),
    Status: S.optional(DetailStatus),
})).annotate({
    identifier: "DimensionKeyDetail",
});
export const DimensionKeyDetailList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(DimensionKeyDetail);
export const GetDimensionKeyDetailsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Dimensions: S.optional(DimensionKeyDetailList) }).pipe(ns)).annotate({
    identifier: "GetDimensionKeyDetailsResponse",
});
export const TextFormat = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const AcceptLanguage = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const GetPerformanceAnalysisReportRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    AnalysisReportId: S.String,
    TextFormat: S.optional(TextFormat),
    AcceptLanguage: S.optional(AcceptLanguage),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetPerformanceAnalysisReportRequest",
});
export const AnalysisStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ContextType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Severity = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Recommendation = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    RecommendationId: S.optional(S.String),
    RecommendationDescription: S.optional(SensitiveString),
})).annotate({ identifier: "Recommendation" });
export const RecommendationList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(Recommendation);
export const DescriptiveMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const PerformanceInsightsMetric = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Metric: S.optional(S.String),
    DisplayName: S.optional(S.String),
    Dimensions: S.optional(DescriptiveMap),
    Filter: S.optional(DescriptiveMap),
    Value: S.optional(S.Number),
})).annotate({
    identifier: "PerformanceInsightsMetric",
});
export const Data = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    PerformanceInsightsMetric: S.optional(PerformanceInsightsMetric),
})).annotate({ identifier: "Data" });
export const DataList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Data);
export const Insight = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    InsightId: S.String,
    InsightType: S.optional(S.String),
    Context: S.optional(ContextType),
    StartTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    EndTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    Severity: S.optional(Severity),
    SupportingInsights: S.optional(S.suspend(() => InsightList).annotate({ identifier: "InsightList" })),
    Description: S.optional(SensitiveString),
    Recommendations: S.optional(RecommendationList),
    InsightData: S.optional(DataList),
    BaselineData: S.optional(DataList),
})).annotate({ identifier: "Insight" });
export const InsightList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.suspend(() => Insight).annotate({
    identifier: "Insight",
}));
export const AnalysisReport = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AnalysisReportId: S.String,
    Identifier: S.optional(S.String),
    ServiceType: S.optional(ServiceType),
    CreateTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    StartTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    EndTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    Status: S.optional(AnalysisStatus),
    Insights: S.optional(InsightList),
})).annotate({ identifier: "AnalysisReport" });
export const GetPerformanceAnalysisReportResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ AnalysisReport: S.optional(AnalysisReport) }).pipe(ns)).annotate({
    identifier: "GetPerformanceAnalysisReportResponse",
});
export const GetResourceMetadataRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ServiceType: ServiceType, Identifier: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetResourceMetadataRequest",
});
export const FeatureStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const FeatureMetadata = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Status: S.optional(FeatureStatus) })).annotate({
    identifier: "FeatureMetadata",
});
export const FeatureMetadataMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, FeatureMetadata.pipe(S.optional));
export const GetResourceMetadataResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Identifier: S.optional(S.String),
    Features: S.optional(FeatureMetadataMap),
}).pipe(ns)).annotate({
    identifier: "GetResourceMetadataResponse",
});
export const MetricQuery = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Metric: S.String,
    GroupBy: S.optional(DimensionGroup),
    Filter: S.optional(MetricQueryFilterMap),
})).annotate({ identifier: "MetricQuery" });
export const MetricQueryList = /*@__PURE__*/ /*#__PURE__*/ S.Array(MetricQuery);
export const PeriodAlignment = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const GetResourceMetricsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    MetricQueries: MetricQueryList,
    StartTime: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    EndTime: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    PeriodInSeconds: S.optional(S.Number),
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
    PeriodAlignment: S.optional(PeriodAlignment),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetResourceMetricsRequest",
});
export const ResponseResourceMetricKey = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Metric: S.String, Dimensions: S.optional(DimensionMap) })).annotate({
    identifier: "ResponseResourceMetricKey",
});
export const DataPoint = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Timestamp: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    Value: S.Number,
})).annotate({ identifier: "DataPoint" });
export const DataPointsList = /*@__PURE__*/ /*#__PURE__*/ S.Array(DataPoint);
export const MetricKeyDataPoints = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Key: S.optional(ResponseResourceMetricKey),
    DataPoints: S.optional(DataPointsList),
})).annotate({
    identifier: "MetricKeyDataPoints",
});
export const MetricKeyDataPointsList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(MetricKeyDataPoints);
export const GetResourceMetricsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AlignedStartTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    AlignedEndTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    Identifier: S.optional(S.String),
    MetricList: S.optional(MetricKeyDataPointsList),
    NextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "GetResourceMetricsResponse",
});
export const DimensionsMetricList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const FineGrainedAction = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const AuthorizedActionsList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(FineGrainedAction);
export const ListAvailableResourceDimensionsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    Metrics: DimensionsMetricList,
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
    AuthorizedActions: S.optional(AuthorizedActionsList),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListAvailableResourceDimensionsRequest",
});
export const DimensionDetail = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Identifier: S.optional(S.String) })).annotate({
    identifier: "DimensionDetail",
});
export const DimensionDetailList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(DimensionDetail);
export const DimensionGroupDetail = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Group: S.optional(S.String),
    Dimensions: S.optional(DimensionDetailList),
})).annotate({
    identifier: "DimensionGroupDetail",
});
export const DimensionGroupDetailList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(DimensionGroupDetail);
export const MetricDimensionGroups = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Metric: S.optional(S.String),
    Groups: S.optional(DimensionGroupDetailList),
})).annotate({
    identifier: "MetricDimensionGroups",
});
export const MetricDimensionsList = /*@__PURE__*/ /*#__PURE__*/ S.Array(MetricDimensionGroups);
export const ListAvailableResourceDimensionsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MetricDimensions: S.optional(MetricDimensionsList),
    NextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "ListAvailableResourceDimensionsResponse",
});
export const MetricTypeList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ListAvailableResourceMetricsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    MetricTypes: MetricTypeList,
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListAvailableResourceMetricsRequest",
});
export const ResponseResourceMetric = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Metric: S.optional(S.String),
    Description: S.optional(S.String),
    Unit: S.optional(S.String),
})).annotate({
    identifier: "ResponseResourceMetric",
});
export const ResponseResourceMetricList = /*@__PURE__*/ /*#__PURE__*/ S.Array(ResponseResourceMetric);
export const ListAvailableResourceMetricsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Metrics: S.optional(ResponseResourceMetricList),
    NextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "ListAvailableResourceMetricsResponse",
});
export const ListPerformanceAnalysisReportsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    Identifier: S.String,
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
    ListTags: S.optional(S.Boolean),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListPerformanceAnalysisReportsRequest",
});
export const AnalysisReportSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AnalysisReportId: S.optional(S.String),
    CreateTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    StartTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    EndTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    Status: S.optional(AnalysisStatus),
    Tags: S.optional(TagList),
})).annotate({
    identifier: "AnalysisReportSummary",
});
export const AnalysisReportSummaryList = /*@__PURE__*/ /*#__PURE__*/ S.Array(AnalysisReportSummary);
export const ListPerformanceAnalysisReportsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AnalysisReports: S.optional(AnalysisReportSummaryList),
    NextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "ListPerformanceAnalysisReportsResponse",
});
export const ListTagsForResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ServiceType: ServiceType, ResourceARN: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceRequest",
});
export const ListTagsForResourceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Tags: S.optional(TagList) }).pipe(ns)).annotate({
    identifier: "ListTagsForResourceResponse",
});
export const TagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    ResourceARN: S.String,
    Tags: TagList,
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceRequest",
});
export const TagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "TagResourceResponse",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceType: ServiceType,
    ResourceARN: S.String,
    TagKeys: TagKeyList,
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceRequest",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "UntagResourceResponse",
});
//# Errors
export class InternalServiceError extends S.TaggedErrorClass()("InternalServiceError", { Message: S.optional(S.String) }) {
}
export class InvalidArgumentException extends S.TaggedErrorClass()("InvalidArgumentException", { Message: S.optional(S.String) }) {
}
export class NotAuthorizedException extends S.TaggedErrorClass()("NotAuthorizedException", { Message: S.optional(S.String) }) {
}
/**
 * Creates a new performance analysis report for a specific time period for the
 * DB instance.
 */
export const createPerformanceAnalysisReport = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePerformanceAnalysisReportRequest,
    output: CreatePerformanceAnalysisReportResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
}));
/**
 * Deletes a performance analysis report.
 */
export const deletePerformanceAnalysisReport = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeletePerformanceAnalysisReportRequest,
    output: DeletePerformanceAnalysisReportResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
}));
/**
 * For a specific time period, retrieve the top `N` dimension keys for a metric.
 *
 * Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements,
 * only the first 500 bytes are returned.
 */
export const describeDimensionKeys = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: DescribeDimensionKeysRequest,
    output: DescribeDimensionKeysResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Get the attributes of the specified dimension group for a DB instance or data source. For example, if you specify a SQL ID,
 * `GetDimensionKeyDetails` retrieves the full text of the dimension `db.sql.statement` associated with this ID.
 * This operation is useful because `GetResourceMetrics` and `DescribeDimensionKeys` don't support retrieval of large
 * SQL statement text, lock snapshots, and execution plans.
 */
export const getDimensionKeyDetails = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDimensionKeyDetailsRequest,
    output: GetDimensionKeyDetailsResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
}));
/**
 * Retrieves the report including the report ID, status, time details, and the insights
 * with recommendations. The report status can be `RUNNING`,
 * `SUCCEEDED`, or `FAILED`. The insights include the
 * `description` and `recommendation` fields.
 */
export const getPerformanceAnalysisReport = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetPerformanceAnalysisReportRequest,
    output: GetPerformanceAnalysisReportResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
}));
/**
 * Retrieve the metadata for different features. For example, the metadata might indicate
 * that a feature is turned on or off on a specific DB instance.
 */
export const getResourceMetadata = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetResourceMetadataRequest,
    output: GetResourceMetadataResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
}));
/**
 * Retrieve Performance Insights metrics for a set of data sources over a time period. You can provide
 * specific dimension groups and dimensions, and provide filtering criteria for each group. You must specify an aggregate function for
 * each metric.
 *
 * Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements,
 * only the first 500 bytes are returned.
 */
export const getResourceMetrics = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetResourceMetricsRequest,
    output: GetResourceMetricsResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Retrieve the dimensions that can be queried for each specified metric type on a specified DB instance.
 */
export const listAvailableResourceDimensions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAvailableResourceDimensionsRequest,
    output: ListAvailableResourceDimensionsResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Retrieve metrics of the specified types that can be queried for a specified DB instance.
 */
export const listAvailableResourceMetrics = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAvailableResourceMetricsRequest,
    output: ListAvailableResourceMetricsResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists all the analysis reports created for the DB instance. The reports are sorted based on the start time of each report.
 */
export const listPerformanceAnalysisReports = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPerformanceAnalysisReportsRequest,
    output: ListPerformanceAnalysisReportsResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Retrieves all the metadata tags associated with Amazon RDS Performance Insights resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
}));
/**
 * Adds metadata tags to the Amazon RDS Performance Insights resource.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
}));
/**
 * Deletes the metadata tags from the Amazon RDS Performance Insights resource.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [
        InternalServiceError,
        InvalidArgumentException,
        NotAuthorizedException,
    ],
}));
//# sourceMappingURL=pi.js.map