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 * as C from "../category.js";
import { SensitiveString } from "../sensitive.js";
const svc = T.AwsApiService({
    sdkId: "Resource Explorer 2",
    serviceShapeName: "ResourceExplorer",
});
const auth = T.AwsAuthSigv4({ name: "resource-explorer-2" });
const ver = T.ServiceVersion("2022-07-28");
const proto = T.AwsProtocolsRestJson1();
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://resource-explorer-2-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://resource-explorer-2-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://resource-explorer-2.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://resource-explorer-2.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const ViewArnList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const BatchGetViewInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ViewArns: S.optional(ViewArnList) }).pipe(T.all(T.Http({ method: "POST", uri: "/BatchGetView" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "BatchGetViewInput",
});
export const IncludedProperty = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Name: S.String })).annotate({
    identifier: "IncludedProperty",
});
export const IncludedPropertyList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(IncludedProperty);
export const SearchFilter = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ FilterString: S.String })).annotate({ identifier: "SearchFilter" });
export const View = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ViewArn: S.optional(S.String),
    ViewName: S.optional(S.String),
    Owner: S.optional(S.String),
    LastUpdatedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    Scope: S.optional(S.String),
    IncludedProperties: S.optional(IncludedPropertyList),
    Filters: S.optional(SearchFilter),
})).annotate({ identifier: "View" });
export const ViewList = /*@__PURE__*/ /*#__PURE__*/ S.Array(View);
export const BatchGetViewError_ = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ViewArn: S.String, ErrorMessage: S.String })).annotate({
    identifier: "BatchGetViewError",
});
export const BatchGetViewErrors = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(BatchGetViewError_);
export const BatchGetViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Views: S.optional(ViewList),
    Errors: S.optional(BatchGetViewErrors),
})).annotate({
    identifier: "BatchGetViewOutput",
});
export const ValidationExceptionField = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Name: S.String, ValidationIssue: S.String })).annotate({
    identifier: "ValidationExceptionField",
});
export const ValidationExceptionFieldList = /*@__PURE__*/ /*#__PURE__*/ S.Array(ValidationExceptionField);
export const RegionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const CreateResourceExplorerSetupInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    RegionList: RegionList,
    AggregatorRegions: S.optional(RegionList),
    ViewName: S.String,
}).pipe(T.all(T.Http({ method: "POST", uri: "/CreateResourceExplorerSetup" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateResourceExplorerSetupInput",
});
export const CreateResourceExplorerSetupOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ TaskId: S.String })).annotate({
    identifier: "CreateResourceExplorerSetupOutput",
});
export const DeleteResourceExplorerSetupInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    RegionList: S.optional(RegionList),
    DeleteInAllRegions: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/DeleteResourceExplorerSetup" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteResourceExplorerSetupInput",
});
export const DeleteResourceExplorerSetupOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ TaskId: S.String })).annotate({
    identifier: "DeleteResourceExplorerSetupOutput",
});
export const DisassociateDefaultViewRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DisassociateDefaultViewRequest",
});
export const DisassociateDefaultViewResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DisassociateDefaultViewResponse",
});
export const GetAccountLevelServiceConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetAccountLevelServiceConfigurationRequest",
});
export const OrgConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AWSServiceAccessStatus: S.String,
    ServiceLinkedRole: S.optional(S.String),
})).annotate({
    identifier: "OrgConfiguration",
});
export const GetAccountLevelServiceConfigurationOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ OrgConfiguration: S.optional(OrgConfiguration) })).annotate({
    identifier: "GetAccountLevelServiceConfigurationOutput",
});
export const GetDefaultViewRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetDefaultViewRequest",
});
export const GetDefaultViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ViewArn: S.optional(S.String) })).annotate({
    identifier: "GetDefaultViewOutput",
});
export const GetIndexRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetIndexRequest",
});
export const TagMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const GetIndexOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    Type: S.optional(S.String),
    State: S.optional(S.String),
    ReplicatingFrom: S.optional(RegionList),
    ReplicatingTo: S.optional(RegionList),
    CreatedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    LastUpdatedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    Tags: S.optional(TagMap),
})).annotate({ identifier: "GetIndexOutput" });
export const GetManagedViewInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ManagedViewArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetManagedView" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetManagedViewInput",
});
export const ManagedView = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ManagedViewArn: S.optional(S.String),
    ManagedViewName: S.optional(S.String),
    TrustedService: S.optional(S.String),
    LastUpdatedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    Owner: S.optional(S.String),
    Scope: S.optional(S.String),
    IncludedProperties: S.optional(IncludedPropertyList),
    Filters: S.optional(SearchFilter),
    ResourcePolicy: S.optional(S.String),
    Version: S.optional(S.String),
})).annotate({ identifier: "ManagedView" });
export const GetManagedViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ManagedView: S.optional(ManagedView) })).annotate({
    identifier: "GetManagedViewOutput",
});
export const GetResourceExplorerSetupInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TaskId: S.String,
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/GetResourceExplorerSetup" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetResourceExplorerSetupInput",
});
export const Index = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Region: S.optional(S.String),
    Arn: S.optional(S.String),
    Type: S.optional(S.String),
})).annotate({ identifier: "Index" });
export const ErrorDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Code: S.optional(S.String), Message: S.optional(S.String) })).annotate({ identifier: "ErrorDetails" });
export const IndexStatus = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Status: S.optional(S.String),
    Index: S.optional(Index),
    ErrorDetails: S.optional(ErrorDetails),
})).annotate({ identifier: "IndexStatus" });
export const ViewStatus = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Status: S.optional(S.String),
    View: S.optional(View),
    ErrorDetails: S.optional(ErrorDetails),
})).annotate({ identifier: "ViewStatus" });
export const RegionStatus = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Region: S.optional(S.String),
    Index: S.optional(IndexStatus),
    View: S.optional(ViewStatus),
})).annotate({ identifier: "RegionStatus" });
export const RegionStatusList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(RegionStatus);
export const GetResourceExplorerSetupOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Regions: S.optional(RegionStatusList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "GetResourceExplorerSetupOutput",
});
export const GetServiceIndexRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetServiceIndexRequest",
});
export const GetServiceIndexOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Arn: S.optional(S.String), Type: S.optional(S.String) })).annotate({
    identifier: "GetServiceIndexOutput",
});
export const GetServiceViewInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ServiceViewArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetServiceView" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetServiceViewInput",
});
export const ServiceView = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServiceViewArn: S.String,
    ServiceViewName: S.optional(S.String),
    Filters: S.optional(SearchFilter),
    IncludedProperties: S.optional(IncludedPropertyList),
    StreamingAccessForService: S.optional(S.String),
    ScopeType: S.optional(S.String),
})).annotate({ identifier: "ServiceView" });
export const GetServiceViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ View: ServiceView })).annotate({
    identifier: "GetServiceViewOutput",
});
export const AccountIdList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ListIndexesForMembersInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AccountIdList: AccountIdList,
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListIndexesForMembers" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListIndexesForMembersInput",
});
export const MemberIndex = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AccountId: S.optional(S.String),
    Region: S.optional(S.String),
    Arn: S.optional(S.String),
    Type: S.optional(S.String),
})).annotate({ identifier: "MemberIndex" });
export const MemberIndexList = /*@__PURE__*/ /*#__PURE__*/ S.Array(MemberIndex);
export const ListIndexesForMembersOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Indexes: S.optional(MemberIndexList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListIndexesForMembersOutput",
});
export const ListManagedViewsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
    ServicePrincipal: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListManagedViews" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListManagedViewsInput",
});
export const ManagedViewArnList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ListManagedViewsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    ManagedViews: S.optional(ManagedViewArnList),
})).annotate({
    identifier: "ListManagedViewsOutput",
});
export const ListResourcesInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Filters: S.optional(SearchFilter),
    MaxResults: S.optional(S.Number),
    ViewArn: S.optional(S.String),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListResources" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListResourcesInput",
});
export const ResourceProperty = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Name: S.optional(S.String),
    LastReportedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    Data: S.optional(S.Any),
})).annotate({
    identifier: "ResourceProperty",
});
export const ResourcePropertyList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ResourceProperty);
export const Resource = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    OwningAccountId: S.optional(S.String),
    Region: S.optional(S.String),
    ResourceType: S.optional(S.String),
    Service: S.optional(S.String),
    LastReportedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    Properties: S.optional(ResourcePropertyList),
})).annotate({ identifier: "Resource" });
export const ResourceList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Resource);
export const ListResourcesOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Resources: S.optional(ResourceList),
    NextToken: S.optional(S.String),
    ViewArn: S.optional(S.String),
})).annotate({
    identifier: "ListResourcesOutput",
});
export const ListServiceIndexesInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Regions: S.optional(RegionList),
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListServiceIndexes" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListServiceIndexesInput",
});
export const IndexList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Index);
export const ListServiceIndexesOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Indexes: S.optional(IndexList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListServiceIndexesOutput",
});
export const ListServiceViewsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListServiceViews" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListServiceViewsInput",
});
export const ServiceViewArnList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ListServiceViewsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    ServiceViews: S.optional(ServiceViewArnList),
})).annotate({
    identifier: "ListServiceViewsOutput",
});
export const ListStreamingAccessForServicesInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListStreamingAccessForServices" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListStreamingAccessForServicesInput",
});
export const StreamingAccessDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServicePrincipal: S.String,
    CreatedAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
})).annotate({
    identifier: "StreamingAccessDetails",
});
export const StreamingAccessDetailsList = /*@__PURE__*/ /*#__PURE__*/ S.Array(StreamingAccessDetails);
export const ListStreamingAccessForServicesOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    StreamingAccessForServices: StreamingAccessDetailsList,
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListStreamingAccessForServicesOutput",
});
export const ListSupportedResourceTypesInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListSupportedResourceTypes" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListSupportedResourceTypesInput",
});
export const SupportedResourceType = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Service: S.optional(S.String),
    ResourceType: S.optional(S.String),
})).annotate({
    identifier: "SupportedResourceType",
});
export const ResourceTypeList = /*@__PURE__*/ /*#__PURE__*/ S.Array(SupportedResourceType);
export const ListSupportedResourceTypesOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ResourceTypes: S.optional(ResourceTypeList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListSupportedResourceTypesOutput",
});
export const ListTagsForResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String.pipe(T.HttpLabel("resourceArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceInput",
});
export const ListTagsForResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Tags: S.optional(TagMap) })).annotate({
    identifier: "ListTagsForResourceOutput",
});
export const SearchInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    QueryString: SensitiveString,
    MaxResults: S.optional(S.Number),
    ViewArn: S.optional(S.String),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/Search" }), svc, auth, proto, ver, rules))).annotate({ identifier: "SearchInput" });
export const ResourceCount = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TotalResources: S.optional(S.Number),
    Complete: S.optional(S.Boolean),
})).annotate({ identifier: "ResourceCount" });
export const SearchOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Resources: S.optional(ResourceList),
    NextToken: S.optional(S.String),
    ViewArn: S.optional(S.String),
    Count: S.optional(ResourceCount),
})).annotate({ identifier: "SearchOutput" });
export const TagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    Tags: S.optional(TagMap),
}).pipe(T.all(T.Http({ method: "POST", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceInput",
});
export const TagResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceOutput",
});
export const StringList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tagKeys: StringList.pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceInput",
});
export const UntagResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceOutput",
});
export const CreateIndexInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    Tags: S.optional(TagMap),
}).pipe(T.all(T.Http({ method: "POST", uri: "/CreateIndex" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateIndexInput",
});
export const CreateIndexOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    State: S.optional(S.String),
    CreatedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
})).annotate({
    identifier: "CreateIndexOutput",
});
export const UpdateIndexTypeInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Arn: S.String, Type: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/UpdateIndexType" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateIndexTypeInput",
});
export const UpdateIndexTypeOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    Type: S.optional(S.String),
    State: S.optional(S.String),
    LastUpdatedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
})).annotate({
    identifier: "UpdateIndexTypeOutput",
});
export const DeleteIndexInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/DeleteIndex" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteIndexInput",
});
export const DeleteIndexOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    State: S.optional(S.String),
    LastUpdatedAt: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
})).annotate({
    identifier: "DeleteIndexOutput",
});
export const ListIndexesInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Type: S.optional(S.String),
    Regions: S.optional(RegionList),
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListIndexes" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListIndexesInput",
});
export const ListIndexesOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Indexes: S.optional(IndexList), NextToken: S.optional(S.String) })).annotate({
    identifier: "ListIndexesOutput",
});
export const CreateViewInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    ViewName: S.String,
    IncludedProperties: S.optional(IncludedPropertyList),
    Scope: S.optional(S.String),
    Filters: S.optional(SearchFilter),
    Tags: S.optional(TagMap),
}).pipe(T.all(T.Http({ method: "POST", uri: "/CreateView" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateViewInput",
});
export const CreateViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ View: S.optional(View) })).annotate({
    identifier: "CreateViewOutput",
});
export const GetViewInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ViewArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetView" }), svc, auth, proto, ver, rules))).annotate({ identifier: "GetViewInput" });
export const GetViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ View: S.optional(View), Tags: S.optional(TagMap) })).annotate({ identifier: "GetViewOutput" });
export const UpdateViewInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ViewArn: S.String,
    IncludedProperties: S.optional(IncludedPropertyList),
    Filters: S.optional(SearchFilter),
}).pipe(T.all(T.Http({ method: "POST", uri: "/UpdateView" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateViewInput",
});
export const UpdateViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ View: S.optional(View) })).annotate({
    identifier: "UpdateViewOutput",
});
export const DeleteViewInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ViewArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/DeleteView" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteViewInput",
});
export const DeleteViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ViewArn: S.optional(S.String) })).annotate({
    identifier: "DeleteViewOutput",
});
export const ListViewsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListViews" }), svc, auth, proto, ver, rules))).annotate({ identifier: "ListViewsInput" });
export const ListViewsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Views: S.optional(ViewArnList), NextToken: S.optional(S.String) })).annotate({
    identifier: "ListViewsOutput",
});
export const AssociateDefaultViewInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ViewArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/AssociateDefaultView" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "AssociateDefaultViewInput",
});
export const AssociateDefaultViewOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ViewArn: S.optional(S.String) })).annotate({
    identifier: "AssociateDefaultViewOutput",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { Message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { Message: S.optional(S.String) }).pipe(C.withServerError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", { Message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class UnauthorizedException extends S.TaggedErrorClass()("UnauthorizedException", { Message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", { Message: S.String, FieldList: S.optional(ValidationExceptionFieldList) }).pipe(C.withBadRequestError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { Message: S.String }).pipe(C.withConflictError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ServiceQuotaExceededException extends S.TaggedErrorClass()("ServiceQuotaExceededException", { Message: S.String, Name: S.String, Value: S.String }).pipe(C.withQuotaError) {
}
/**
 * Retrieves details about a list of views.
 */
export const batchGetView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BatchGetViewInput,
    output: BatchGetViewOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Creates a Resource Explorer setup configuration across multiple Amazon Web Services Regions. This operation sets up indexes and views in the specified Regions. This operation can also be used to set an aggregator Region for cross-Region resource search.
 */
export const createResourceExplorerSetup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateResourceExplorerSetupInput,
    output: CreateResourceExplorerSetupOutput,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes a Resource Explorer setup configuration. This operation removes indexes and views from the specified Regions or all Regions where Resource Explorer is configured.
 */
export const deleteResourceExplorerSetup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteResourceExplorerSetupInput,
    output: DeleteResourceExplorerSetupOutput,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * After you call this operation, the affected Amazon Web Services Region no longer has a default view. All Search operations in that Region must explicitly specify a view or the operation fails. You can configure a new default by calling the AssociateDefaultView operation.
 *
 * If an Amazon Web Services Region doesn't have a default view configured, then users must explicitly specify a view with every `Search` operation performed in that Region.
 */
export const disassociateDefaultView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DisassociateDefaultViewRequest,
    output: DisassociateDefaultViewResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves the status of your account's Amazon Web Services service access, and validates the service linked role required to access the multi-account search feature. Only the management account can invoke this API call.
 */
export const getAccountLevelServiceConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAccountLevelServiceConfigurationRequest,
    output: GetAccountLevelServiceConfigurationOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Retrieves the Amazon Resource Name (ARN) of the view that is the default for the Amazon Web Services Region in which you call this operation. You can then call GetView to retrieve the details of that view.
 */
export const getDefaultView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDefaultViewRequest,
    output: GetDefaultViewOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves details about the Amazon Web Services Resource Explorer index in the Amazon Web Services Region in which you invoked the operation.
 */
export const getIndex = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetIndexRequest,
    output: GetIndexOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves details of the specified Amazon Web Services-managed view.
 */
export const getManagedView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetManagedViewInput,
    output: GetManagedViewOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Retrieves the status and details of a Resource Explorer setup operation. This operation returns information about the progress of creating or deleting Resource Explorer configurations across Regions.
 */
export const getResourceExplorerSetup = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetResourceExplorerSetupInput,
    output: GetResourceExplorerSetupOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Regions",
        pageSize: "MaxResults",
    },
}));
/**
 * Retrieves information about the Resource Explorer index in the current Amazon Web Services Region. This operation returns the ARN and type of the index if one exists.
 */
export const getServiceIndex = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetServiceIndexRequest,
    output: GetServiceIndexOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves details about a specific Resource Explorer service view. This operation returns the configuration and properties of the specified view.
 */
export const getServiceView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetServiceViewInput,
    output: GetServiceViewOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves a list of a member's indexes in all Amazon Web Services Regions that are currently collecting resource information for Amazon Web Services Resource Explorer. Only the management account or a delegated administrator with service access enabled can invoke this API call.
 */
export const listIndexesForMembers = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListIndexesForMembersInput,
    output: ListIndexesForMembersOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Indexes",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists the Amazon resource names (ARNs) of the Amazon Web Services-managed views available in the Amazon Web Services Region in which you call this operation.
 */
export const listManagedViews = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListManagedViewsInput,
    output: ListManagedViewsOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "ManagedViews",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns a list of resources and their details that match the specified criteria. This query must use a view. If you don’t explicitly specify a view, then Resource Explorer uses the default view for the Amazon Web Services Region in which you call this operation.
 */
export const listResources = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListResourcesInput,
    output: ListResourcesOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Resources",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists all Resource Explorer indexes across the specified Amazon Web Services Regions. This operation returns information about indexes including their ARNs, types, and Regions.
 */
export const listServiceIndexes = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListServiceIndexesInput,
    output: ListServiceIndexesOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Indexes",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists all Resource Explorer service views available in the current Amazon Web Services account. This operation returns the ARNs of available service views.
 */
export const listServiceViews = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListServiceViewsInput,
    output: ListServiceViewsOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "ServiceViews",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns a list of Amazon Web Services services that have been granted streaming access to your Resource Explorer data. Streaming access allows Amazon Web Services services to receive real-time updates about your resources as they are indexed by Resource Explorer.
 */
export const listStreamingAccessForServices = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListStreamingAccessForServicesInput,
    output: ListStreamingAccessForServicesOutput,
    errors: [AccessDeniedException, InternalServerException, ValidationException],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "StreamingAccessForServices",
        pageSize: "MaxResults",
    },
}));
/**
 * Retrieves a list of all resource types currently supported by Amazon Web Services Resource Explorer.
 */
export const listSupportedResourceTypes = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListSupportedResourceTypesInput,
    output: ListSupportedResourceTypesOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "ResourceTypes",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists the tags that are attached to the specified resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceInput,
    output: ListTagsForResourceOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Searches for resources and displays details about all resources that match the specified criteria. You must specify a query string.
 *
 * All search queries must use a view. If you don't explicitly specify a view, then Amazon Web Services Resource Explorer uses the default view for the Amazon Web Services Region in which you call this operation. The results are the logical intersection of the results that match both the `QueryString` parameter supplied to this operation and the `SearchFilter` parameter attached to the view.
 *
 * For the complete syntax supported by the `QueryString` parameter, see Search query syntax reference for Resource Explorer.
 *
 * If your search results are empty, or are missing results that you think should be there, see Troubleshooting Resource Explorer search.
 */
export const search = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchInput,
    output: SearchOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Resources",
        pageSize: "MaxResults",
    },
}));
/**
 * Adds one or more tag key and value pairs to an Amazon Web Services Resource Explorer view or index.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceInput,
    output: TagResourceOutput,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Removes one or more tag key and value pairs from an Amazon Web Services Resource Explorer view or index.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceInput,
    output: UntagResourceOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Turns on Amazon Web Services Resource Explorer in the Amazon Web Services Region in which you called this operation by creating an index. Resource Explorer begins discovering the resources in this Region and stores the details about the resources in the index so that they can be queried by using the Search operation. You can create only one index in a Region.
 *
 * This operation creates only a *local* index. To promote the local index in one Amazon Web Services Region into the aggregator index for the Amazon Web Services account, use the UpdateIndexType operation. For more information, see Turning on cross-Region search by creating an aggregator index in the *Amazon Web Services Resource Explorer User Guide*.
 *
 * For more details about what happens when you turn on Resource Explorer in an Amazon Web Services Region, see Turn on Resource Explorer to index your resources in an Amazon Web Services Region in the *Amazon Web Services Resource Explorer User Guide*.
 *
 * If this is the first Amazon Web Services Region in which you've created an index for Resource Explorer, then this operation also creates a service-linked role in your Amazon Web Services account that allows Resource Explorer to enumerate your resources to populate the index.
 *
 * - **Action**: `resource-explorer-2:CreateIndex`
 *
 * **Resource**: The ARN of the index (as it will exist after the operation completes) in the Amazon Web Services Region and account in which you're trying to create the index. Use the wildcard character (`*`) at the end of the string to match the eventual UUID. For example, the following `Resource` element restricts the role or user to creating an index in only the `us-east-2` Region of the specified account.
 *
 * `"Resource": "arn:aws:resource-explorer-2:us-west-2:*<account-id>*:index/*"`
 *
 * Alternatively, you can use `"Resource": "*"` to allow the role or user to create an index in any Region.
 *
 * - **Action**: `iam:CreateServiceLinkedRole`
 *
 * **Resource**: No specific resource (*).
 *
 * This permission is required only the first time you create an index to turn on Resource Explorer in the account. Resource Explorer uses this to create the service-linked role needed to index the resources in your account. Resource Explorer uses the same service-linked role for all additional indexes you create afterwards.
 */
export const createIndex = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateIndexInput,
    output: CreateIndexOutput,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Changes the type of the index from one of the following types to the other. For more information about indexes and the role they perform in Amazon Web Services Resource Explorer, see Turning on cross-Region search by creating an aggregator index in the *Amazon Web Services Resource Explorer User Guide*.
 *
 * - ** `AGGREGATOR` index type**
 *
 * The index contains information about resources from all Amazon Web Services Regions in the Amazon Web Services account in which you've created a Resource Explorer index. Resource information from all other Regions is replicated to this Region's index.
 *
 * When you change the index type to `AGGREGATOR`, Resource Explorer turns on replication of all discovered resource information from the other Amazon Web Services Regions in your account to this index. You can then, from this Region only, perform resource search queries that span all Amazon Web Services Regions in the Amazon Web Services account. Turning on replication from all other Regions is performed by asynchronous background tasks. You can check the status of the asynchronous tasks by using the GetIndex operation. When the asynchronous tasks complete, the `Status` response of that operation changes from `UPDATING` to `ACTIVE`. After that, you can start to see results from other Amazon Web Services Regions in query results. However, it can take several hours for replication from all other Regions to complete.
 *
 * You can have only one aggregator index per Amazon Web Services account. Before you can promote a different index to be the aggregator index for the account, you must first demote the existing aggregator index to type `LOCAL`.
 *
 * - ** `LOCAL` index type**
 *
 * The index contains information about resources in only the Amazon Web Services Region in which the index exists. If an aggregator index in another Region exists, then information in this local index is replicated to the aggregator index.
 *
 * When you change the index type to `LOCAL`, Resource Explorer turns off the replication of resource information from all other Amazon Web Services Regions in the Amazon Web Services account to this Region. The aggregator index remains in the `UPDATING` state until all replication with other Regions successfully stops. You can check the status of the asynchronous task by using the GetIndex operation. When Resource Explorer successfully stops all replication with other Regions, the `Status` response of that operation changes from `UPDATING` to `ACTIVE`. Separately, the resource information from other Regions that was previously stored in the index is deleted within 30 days by another background task. Until that asynchronous task completes, some results from other Regions can continue to appear in search results.
 *
 * After you demote an aggregator index to a local index, you must wait 24 hours before you can promote another index to be the new aggregator index for the account.
 */
export const updateIndexType = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateIndexTypeInput,
    output: UpdateIndexTypeOutput,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes the specified index and turns off Amazon Web Services Resource Explorer in the specified Amazon Web Services Region. When you delete an index, Resource Explorer stops discovering and indexing resources in that Region. Resource Explorer also deletes all views in that Region. These actions occur as asynchronous background tasks. You can check to see when the actions are complete by using the GetIndex operation and checking the `Status` response value.
 *
 * If the index you delete is the aggregator index for the Amazon Web Services account, you must wait 24 hours before you can promote another local index to be the aggregator index for the account. Users can't perform account-wide searches using Resource Explorer until another aggregator index is configured.
 */
export const deleteIndex = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteIndexInput,
    output: DeleteIndexOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves a list of all of the indexes in Amazon Web Services Regions that are currently collecting resource information for Amazon Web Services Resource Explorer.
 */
export const listIndexes = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListIndexesInput,
    output: ListIndexesOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Indexes",
        pageSize: "MaxResults",
    },
}));
/**
 * Creates a view that users can query by using the Search operation. Results from queries that you make using this view include only resources that match the view's `Filters`. For more information about Amazon Web Services Resource Explorer views, see Managing views in the *Amazon Web Services Resource Explorer User Guide*.
 *
 * Only the principals with an IAM identity-based policy that grants `Allow` to the `Search` action on a `Resource` with the Amazon resource name (ARN) of this view can Search using views you create with this operation.
 */
export const createView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateViewInput,
    output: CreateViewOutput,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ServiceQuotaExceededException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Retrieves details of the specified view.
 */
export const getView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetViewInput,
    output: GetViewOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Modifies some of the details of a view. You can change the filter string and the list of included properties. You can't change the name of the view.
 */
export const updateView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateViewInput,
    output: UpdateViewOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ServiceQuotaExceededException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Deletes the specified view.
 *
 * If the specified view is the default view for its Amazon Web Services Region, then all Search operations in that Region must explicitly specify the view to use until you configure a new default by calling the AssociateDefaultView operation.
 */
export const deleteView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteViewInput,
    output: DeleteViewOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        UnauthorizedException,
        ValidationException,
    ],
}));
/**
 * Lists the Amazon resource names (ARNs) of the views available in the Amazon Web Services Region in which you call this operation.
 *
 * Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.
 */
export const listViews = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListViewsInput,
    output: ListViewsOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Views",
        pageSize: "MaxResults",
    },
}));
/**
 * Sets the specified view as the default for the Amazon Web Services Region in which you call this operation. When a user performs a Search that doesn't explicitly specify which view to use, then Amazon Web Services Resource Explorer automatically chooses this default view for searches performed in this Amazon Web Services Region.
 *
 * If an Amazon Web Services Region doesn't have a default view configured, then users must explicitly specify a view with every `Search` operation performed in that Region.
 */
export const associateDefaultView = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: AssociateDefaultViewInput,
    output: AssociateDefaultViewOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
//# sourceMappingURL=resource-explorer-2.js.map