import * as HttpClient from "effect/unstable/http/HttpClient";
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";
const svc = T.AwsApiService({
    sdkId: "IoTThingsGraph",
    serviceShapeName: "IotThingsGraphFrontEndService",
});
const auth = T.AwsAuthSigv4({ name: "iotthingsgraph" });
const ver = T.ServiceVersion("2018-09-06");
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://iotthingsgraph-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://iotthingsgraph-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://iotthingsgraph.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                if ("aws" === _.getAttr(PartitionResult, "name")) {
                    return e(`https://iotthingsgraph.${Region}.amazonaws.com`);
                }
                return e(`https://iotthingsgraph.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const AssociateEntityToThingRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    thingName: S.String,
    entityId: S.String,
    namespaceVersion: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "AssociateEntityToThingRequest",
});
export const AssociateEntityToThingResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "AssociateEntityToThingResponse",
});
export const DefinitionLanguage = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DefinitionDocument = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ language: DefinitionLanguage, text: S.String })).annotate({
    identifier: "DefinitionDocument",
});
export const CreateFlowTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    definition: DefinitionDocument,
    compatibleNamespaceVersion: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateFlowTemplateRequest",
});
export const FlowTemplateSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.optional(S.String),
    arn: S.optional(S.String),
    revisionNumber: S.optional(S.Number),
    createdAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "FlowTemplateSummary",
});
export const CreateFlowTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ summary: S.optional(FlowTemplateSummary) })).annotate({
    identifier: "CreateFlowTemplateResponse",
});
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 DeploymentTarget = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MetricsConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    cloudMetricEnabled: S.optional(S.Boolean),
    metricRuleRoleArn: S.optional(S.String),
})).annotate({
    identifier: "MetricsConfiguration",
});
export const CreateSystemInstanceRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tags: S.optional(TagList),
    definition: DefinitionDocument,
    target: DeploymentTarget,
    greengrassGroupName: S.optional(S.String),
    s3BucketName: S.optional(S.String),
    metricsConfiguration: S.optional(MetricsConfiguration),
    flowActionsRoleArn: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateSystemInstanceRequest",
});
export const SystemInstanceDeploymentStatus = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const SystemInstanceSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.optional(S.String),
    arn: S.optional(S.String),
    status: S.optional(SystemInstanceDeploymentStatus),
    target: S.optional(DeploymentTarget),
    greengrassGroupName: S.optional(S.String),
    createdAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    updatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    greengrassGroupId: S.optional(S.String),
    greengrassGroupVersionId: S.optional(S.String),
})).annotate({
    identifier: "SystemInstanceSummary",
});
export const CreateSystemInstanceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ summary: S.optional(SystemInstanceSummary) })).annotate({
    identifier: "CreateSystemInstanceResponse",
});
export const CreateSystemTemplateRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    definition: DefinitionDocument,
    compatibleNamespaceVersion: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateSystemTemplateRequest",
});
export const SystemTemplateSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.optional(S.String),
    arn: S.optional(S.String),
    revisionNumber: S.optional(S.Number),
    createdAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "SystemTemplateSummary",
});
export const CreateSystemTemplateResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ summary: S.optional(SystemTemplateSummary) })).annotate({
    identifier: "CreateSystemTemplateResponse",
});
export const DeleteFlowTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteFlowTemplateRequest",
});
export const DeleteFlowTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteFlowTemplateResponse",
});
export const DeleteNamespaceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteNamespaceRequest",
});
export const DeleteNamespaceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    namespaceArn: S.optional(S.String),
    namespaceName: S.optional(S.String),
})).annotate({
    identifier: "DeleteNamespaceResponse",
});
export const DeleteSystemInstanceRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String) }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteSystemInstanceRequest",
});
export const DeleteSystemInstanceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteSystemInstanceResponse",
});
export const DeleteSystemTemplateRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteSystemTemplateRequest",
});
export const DeleteSystemTemplateResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteSystemTemplateResponse",
});
export const DeploySystemInstanceRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String) }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeploySystemInstanceRequest",
});
export const DeploySystemInstanceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summary: SystemInstanceSummary,
    greengrassDeploymentId: S.optional(S.String),
})).annotate({
    identifier: "DeploySystemInstanceResponse",
});
export const DeprecateFlowTemplateRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeprecateFlowTemplateRequest",
});
export const DeprecateFlowTemplateResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeprecateFlowTemplateResponse",
});
export const DeprecateSystemTemplateRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeprecateSystemTemplateRequest",
});
export const DeprecateSystemTemplateResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeprecateSystemTemplateResponse",
});
export const DescribeNamespaceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ namespaceName: S.optional(S.String) }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeNamespaceRequest",
});
export const DescribeNamespaceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    namespaceArn: S.optional(S.String),
    namespaceName: S.optional(S.String),
    trackingNamespaceName: S.optional(S.String),
    trackingNamespaceVersion: S.optional(S.Number),
    namespaceVersion: S.optional(S.Number),
})).annotate({
    identifier: "DescribeNamespaceResponse",
});
export const EntityType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DissociateEntityFromThingRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ thingName: S.String, entityType: EntityType }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DissociateEntityFromThingRequest",
});
export const DissociateEntityFromThingResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DissociateEntityFromThingResponse",
});
export const Urns = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const GetEntitiesRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ids: Urns, namespaceVersion: S.optional(S.Number) }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetEntitiesRequest",
});
export const EntityDescription = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.optional(S.String),
    arn: S.optional(S.String),
    type: S.optional(EntityType),
    createdAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    definition: S.optional(DefinitionDocument),
})).annotate({
    identifier: "EntityDescription",
});
export const EntityDescriptions = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(EntityDescription);
export const GetEntitiesResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ descriptions: S.optional(EntityDescriptions) })).annotate({
    identifier: "GetEntitiesResponse",
});
export const GetFlowTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String, revisionNumber: S.optional(S.Number) }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetFlowTemplateRequest",
});
export const FlowTemplateDescription = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summary: S.optional(FlowTemplateSummary),
    definition: S.optional(DefinitionDocument),
    validatedNamespaceVersion: S.optional(S.Number),
})).annotate({
    identifier: "FlowTemplateDescription",
});
export const GetFlowTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ description: S.optional(FlowTemplateDescription) })).annotate({
    identifier: "GetFlowTemplateResponse",
});
export const GetFlowTemplateRevisionsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String,
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetFlowTemplateRevisionsRequest",
});
export const FlowTemplateSummaries = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(FlowTemplateSummary);
export const GetFlowTemplateRevisionsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summaries: S.optional(FlowTemplateSummaries),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "GetFlowTemplateRevisionsResponse",
});
export const GetNamespaceDeletionStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetNamespaceDeletionStatusRequest",
});
export const NamespaceDeletionStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const NamespaceDeletionStatusErrorCodes = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const GetNamespaceDeletionStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    namespaceArn: S.optional(S.String),
    namespaceName: S.optional(S.String),
    status: S.optional(NamespaceDeletionStatus),
    errorCode: S.optional(NamespaceDeletionStatusErrorCodes),
    errorMessage: S.optional(S.String),
})).annotate({
    identifier: "GetNamespaceDeletionStatusResponse",
});
export const GetSystemInstanceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetSystemInstanceRequest",
});
export const DependencyRevision = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), revisionNumber: S.optional(S.Number) })).annotate({
    identifier: "DependencyRevision",
});
export const DependencyRevisions = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(DependencyRevision);
export const SystemInstanceDescription = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summary: S.optional(SystemInstanceSummary),
    definition: S.optional(DefinitionDocument),
    s3BucketName: S.optional(S.String),
    metricsConfiguration: S.optional(MetricsConfiguration),
    validatedNamespaceVersion: S.optional(S.Number),
    validatedDependencyRevisions: S.optional(DependencyRevisions),
    flowActionsRoleArn: S.optional(S.String),
})).annotate({
    identifier: "SystemInstanceDescription",
});
export const GetSystemInstanceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ description: S.optional(SystemInstanceDescription) })).annotate({
    identifier: "GetSystemInstanceResponse",
});
export const GetSystemTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String, revisionNumber: S.optional(S.Number) }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetSystemTemplateRequest",
});
export const SystemTemplateDescription = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summary: S.optional(SystemTemplateSummary),
    definition: S.optional(DefinitionDocument),
    validatedNamespaceVersion: S.optional(S.Number),
})).annotate({
    identifier: "SystemTemplateDescription",
});
export const GetSystemTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ description: S.optional(SystemTemplateDescription) })).annotate({
    identifier: "GetSystemTemplateResponse",
});
export const GetSystemTemplateRevisionsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String,
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetSystemTemplateRevisionsRequest",
});
export const SystemTemplateSummaries = /*@__PURE__*/ /*#__PURE__*/ S.Array(SystemTemplateSummary);
export const GetSystemTemplateRevisionsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summaries: S.optional(SystemTemplateSummaries),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "GetSystemTemplateRevisionsResponse",
});
export const GetUploadStatusRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ uploadId: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetUploadStatusRequest",
});
export const UploadStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const StringList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const GetUploadStatusResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    uploadId: S.String,
    uploadStatus: UploadStatus,
    namespaceArn: S.optional(S.String),
    namespaceName: S.optional(S.String),
    namespaceVersion: S.optional(S.Number),
    failureReason: S.optional(StringList),
    createdDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
})).annotate({
    identifier: "GetUploadStatusResponse",
});
export const ListFlowExecutionMessagesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    flowExecutionId: S.String,
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListFlowExecutionMessagesRequest",
});
export const FlowExecutionEventType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const FlowExecutionMessage = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    messageId: S.optional(S.String),
    eventType: S.optional(FlowExecutionEventType),
    timestamp: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    payload: S.optional(S.String),
})).annotate({
    identifier: "FlowExecutionMessage",
});
export const FlowExecutionMessages = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(FlowExecutionMessage);
export const ListFlowExecutionMessagesResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    messages: S.optional(FlowExecutionMessages),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "ListFlowExecutionMessagesResponse",
});
export const ListTagsForResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    maxResults: S.optional(S.Number),
    resourceArn: S.String,
    nextToken: S.optional(S.String),
}).pipe(T.all(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), nextToken: S.optional(S.String) })).annotate({
    identifier: "ListTagsForResourceResponse",
});
export const EntityTypes = /*@__PURE__*/ /*#__PURE__*/ S.Array(EntityType);
export const EntityFilterName = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const EntityFilterValues = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const EntityFilter = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.optional(EntityFilterName),
    value: S.optional(EntityFilterValues),
})).annotate({ identifier: "EntityFilter" });
export const EntityFilters = /*@__PURE__*/ /*#__PURE__*/ S.Array(EntityFilter);
export const SearchEntitiesRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    entityTypes: EntityTypes,
    filters: S.optional(EntityFilters),
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
    namespaceVersion: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SearchEntitiesRequest",
});
export const SearchEntitiesResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    descriptions: S.optional(EntityDescriptions),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "SearchEntitiesResponse",
});
export const SearchFlowExecutionsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    systemInstanceId: S.String,
    flowExecutionId: S.optional(S.String),
    startTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    endTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SearchFlowExecutionsRequest",
});
export const FlowExecutionStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const FlowExecutionSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    flowExecutionId: S.optional(S.String),
    status: S.optional(FlowExecutionStatus),
    systemInstanceId: S.optional(S.String),
    flowTemplateId: S.optional(S.String),
    createdAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    updatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "FlowExecutionSummary",
});
export const FlowExecutionSummaries = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(FlowExecutionSummary);
export const SearchFlowExecutionsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summaries: S.optional(FlowExecutionSummaries),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "SearchFlowExecutionsResponse",
});
export const FlowTemplateFilterName = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const FlowTemplateFilterValues = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const FlowTemplateFilter = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ name: FlowTemplateFilterName, value: FlowTemplateFilterValues })).annotate({
    identifier: "FlowTemplateFilter",
});
export const FlowTemplateFilters = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(FlowTemplateFilter);
export const SearchFlowTemplatesRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    filters: S.optional(FlowTemplateFilters),
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SearchFlowTemplatesRequest",
});
export const SearchFlowTemplatesResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summaries: S.optional(FlowTemplateSummaries),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "SearchFlowTemplatesResponse",
});
export const SystemInstanceFilterName = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SystemInstanceFilterValues = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const SystemInstanceFilter = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.optional(SystemInstanceFilterName),
    value: S.optional(SystemInstanceFilterValues),
})).annotate({
    identifier: "SystemInstanceFilter",
});
export const SystemInstanceFilters = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SystemInstanceFilter);
export const SearchSystemInstancesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    filters: S.optional(SystemInstanceFilters),
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SearchSystemInstancesRequest",
});
export const SystemInstanceSummaries = /*@__PURE__*/ /*#__PURE__*/ S.Array(SystemInstanceSummary);
export const SearchSystemInstancesResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summaries: S.optional(SystemInstanceSummaries),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "SearchSystemInstancesResponse",
});
export const SystemTemplateFilterName = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SystemTemplateFilterValues = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const SystemTemplateFilter = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: SystemTemplateFilterName,
    value: SystemTemplateFilterValues,
})).annotate({
    identifier: "SystemTemplateFilter",
});
export const SystemTemplateFilters = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SystemTemplateFilter);
export const SearchSystemTemplatesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    filters: S.optional(SystemTemplateFilters),
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SearchSystemTemplatesRequest",
});
export const SearchSystemTemplatesResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summaries: S.optional(SystemTemplateSummaries),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "SearchSystemTemplatesResponse",
});
export const SearchThingsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    entityId: S.String,
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
    namespaceVersion: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SearchThingsRequest",
});
export const Thing = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ thingArn: S.optional(S.String), thingName: S.optional(S.String) })).annotate({ identifier: "Thing" });
export const Things = /*@__PURE__*/ /*#__PURE__*/ S.Array(Thing);
export const SearchThingsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ things: S.optional(Things), nextToken: S.optional(S.String) })).annotate({
    identifier: "SearchThingsResponse",
});
export const TagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String, tags: TagList }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceRequest",
});
export const TagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceResponse",
});
export const UndeploySystemInstanceRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String) }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UndeploySystemInstanceRequest",
});
export const UndeploySystemInstanceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ summary: S.optional(SystemInstanceSummary) })).annotate({
    identifier: "UndeploySystemInstanceResponse",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String, tagKeys: TagKeyList }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceRequest",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceResponse",
});
export const UpdateFlowTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String,
    definition: DefinitionDocument,
    compatibleNamespaceVersion: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateFlowTemplateRequest",
});
export const UpdateFlowTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ summary: S.optional(FlowTemplateSummary) })).annotate({
    identifier: "UpdateFlowTemplateResponse",
});
export const UpdateSystemTemplateRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String,
    definition: DefinitionDocument,
    compatibleNamespaceVersion: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateSystemTemplateRequest",
});
export const UpdateSystemTemplateResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ summary: S.optional(SystemTemplateSummary) })).annotate({
    identifier: "UpdateSystemTemplateResponse",
});
export const UploadEntityDefinitionsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    document: S.optional(DefinitionDocument),
    syncWithPublicNamespace: S.optional(S.Boolean),
    deprecateExistingEntities: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UploadEntityDefinitionsRequest",
});
export const UploadEntityDefinitionsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ uploadId: S.String })).annotate({
    identifier: "UploadEntityDefinitionsResponse",
});
//# Errors
export class InternalFailureException extends S.TaggedErrorClass()("InternalFailureException", { message: S.optional(S.String) }).pipe(C.withServerError) {
}
export class InvalidRequestException extends S.TaggedErrorClass()("InvalidRequestException", { message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", { message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class LimitExceededException extends S.TaggedErrorClass()("LimitExceededException", { message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ResourceAlreadyExistsException extends S.TaggedErrorClass()("ResourceAlreadyExistsException", { message: S.optional(S.String) }).pipe(C.withConflictError, C.withAlreadyExistsError) {
}
export class ResourceInUseException extends S.TaggedErrorClass()("ResourceInUseException", { message: S.optional(S.String) }) {
}
/**
 * Associates a device with a concrete thing that is in the user's registry.
 *
 * A thing can be associated with only one device at a time. If you associate a thing with a new device id, its previous association will be removed.
 */
export const associateEntityToThing = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: AssociateEntityToThingRequest,
    output: AssociateEntityToThingResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Creates a workflow template. Workflows can be created only in the user's namespace. (The public namespace contains only
 * entities.) The workflow can contain only entities in the specified namespace. The workflow is validated against the entities in the
 * latest version of the user's namespace unless another namespace version is specified in the request.
 */
export const createFlowTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateFlowTemplateRequest,
    output: CreateFlowTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        LimitExceededException,
        ResourceAlreadyExistsException,
        ThrottlingException,
    ],
}));
/**
 * Creates a system instance.
 *
 * This action validates the system instance, prepares the deployment-related resources. For Greengrass deployments, it updates the Greengrass group that is
 * specified by the `greengrassGroupName` parameter. It also adds a file to the S3 bucket specified by the `s3BucketName` parameter. You need to
 * call `DeploySystemInstance` after running this action.
 *
 * For Greengrass deployments, since this action modifies and adds resources to a Greengrass group and an S3 bucket on the caller's behalf, the calling identity must have write permissions
 * to both the specified Greengrass group and S3 bucket. Otherwise, the call will fail with an authorization error.
 *
 * For cloud deployments, this action requires a `flowActionsRoleArn` value. This is an IAM role
 * that has permissions to access AWS services, such as AWS Lambda and AWS IoT, that the flow uses when it executes.
 *
 * If the definition document doesn't specify a version of the user's namespace, the latest version will be used by default.
 */
export const createSystemInstance = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateSystemInstanceRequest,
    output: CreateSystemInstanceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        LimitExceededException,
        ResourceAlreadyExistsException,
        ThrottlingException,
    ],
}));
/**
 * Creates a system. The system is validated against the entities in the
 * latest version of the user's namespace unless another namespace version is specified in the request.
 */
export const createSystemTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateSystemTemplateRequest,
    output: CreateSystemTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceAlreadyExistsException,
        ThrottlingException,
    ],
}));
/**
 * Deletes a workflow. Any new system or deployment that contains this workflow will fail to update or deploy.
 * Existing deployments that contain the workflow will continue to run (since they use a snapshot of the workflow taken at the time of deployment).
 */
export const deleteFlowTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteFlowTemplateRequest,
    output: DeleteFlowTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceInUseException,
        ThrottlingException,
    ],
}));
/**
 * Deletes the specified namespace. This action deletes all of the entities in the namespace. Delete the systems and flows that use entities in the namespace before performing this action. This action takes no
 * request parameters.
 */
export const deleteNamespace = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteNamespaceRequest,
    output: DeleteNamespaceResponse,
    errors: [InternalFailureException, ThrottlingException],
}));
/**
 * Deletes a system instance.
 * Only system instances that have never been deployed, or that have been undeployed can be deleted.
 *
 * Users can create a new system instance that has the same ID as a deleted system instance.
 */
export const deleteSystemInstance = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteSystemInstanceRequest,
    output: DeleteSystemInstanceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceInUseException,
        ThrottlingException,
    ],
}));
/**
 * Deletes a system. New deployments can't contain the system after its deletion.
 * Existing deployments that contain the system will continue to work because they use a snapshot of the system that is taken when it is deployed.
 */
export const deleteSystemTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteSystemTemplateRequest,
    output: DeleteSystemTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceInUseException,
        ThrottlingException,
    ],
}));
/**
 * **Greengrass and Cloud Deployments**
 *
 * Deploys the system instance to the target specified in `CreateSystemInstance`.
 *
 * **Greengrass Deployments**
 *
 * If the system or any workflows and entities have been updated before this action is called, then the deployment will create a new Amazon Simple Storage Service
 * resource file and then deploy it.
 *
 * Since this action creates a Greengrass deployment on the caller's behalf, the calling identity must have write permissions
 * to the specified Greengrass group. Otherwise, the call will fail with an authorization error.
 *
 * For information about the artifacts that get added to your Greengrass core device when you use this API, see AWS IoT Things Graph and AWS IoT Greengrass.
 */
export const deploySystemInstance = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeploySystemInstanceRequest,
    output: DeploySystemInstanceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceInUseException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Deprecates the specified workflow. This action marks the workflow for deletion. Deprecated flows can't be deployed, but existing deployments will continue to run.
 */
export const deprecateFlowTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeprecateFlowTemplateRequest,
    output: DeprecateFlowTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Deprecates the specified system.
 */
export const deprecateSystemTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeprecateSystemTemplateRequest,
    output: DeprecateSystemTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Gets the latest version of the user's namespace and the public version that it is tracking.
 */
export const describeNamespace = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeNamespaceRequest,
    output: DescribeNamespaceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Dissociates a device entity from a concrete thing. The action takes only the type of the entity that you need to dissociate because only
 * one entity of a particular type can be associated with a thing.
 */
export const dissociateEntityFromThing = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DissociateEntityFromThingRequest,
    output: DissociateEntityFromThingResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Gets definitions of the specified entities. Uses the latest version of the user's namespace by default. This API returns the
 * following TDM entities.
 *
 * - Properties
 *
 * - States
 *
 * - Events
 *
 * - Actions
 *
 * - Capabilities
 *
 * - Mappings
 *
 * - Devices
 *
 * - Device Models
 *
 * - Services
 *
 * This action doesn't return definitions for systems, flows, and deployments.
 */
export const getEntities = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetEntitiesRequest,
    output: GetEntitiesResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Gets the latest version of the `DefinitionDocument` and `FlowTemplateSummary` for the specified workflow.
 */
export const getFlowTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetFlowTemplateRequest,
    output: GetFlowTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Gets revisions of the specified workflow. Only the last 100 revisions are stored. If the workflow has been deprecated,
 * this action will return revisions that occurred before the deprecation. This action won't work for workflows that have been deleted.
 */
export const getFlowTemplateRevisions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetFlowTemplateRevisionsRequest,
    output: GetFlowTemplateRevisionsResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "summaries",
        pageSize: "maxResults",
    },
}));
/**
 * Gets the status of a namespace deletion task.
 */
export const getNamespaceDeletionStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetNamespaceDeletionStatusRequest,
    output: GetNamespaceDeletionStatusResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ThrottlingException,
    ],
}));
/**
 * Gets a system instance.
 */
export const getSystemInstance = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetSystemInstanceRequest,
    output: GetSystemInstanceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Gets a system.
 */
export const getSystemTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetSystemTemplateRequest,
    output: GetSystemTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Gets revisions made to the specified system template. Only the previous 100 revisions are stored. If the system has been deprecated, this action will return
 * the revisions that occurred before its deprecation. This action won't work with systems that have been deleted.
 */
export const getSystemTemplateRevisions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetSystemTemplateRevisionsRequest,
    output: GetSystemTemplateRevisionsResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "summaries",
        pageSize: "maxResults",
    },
}));
/**
 * Gets the status of the specified upload.
 */
export const getUploadStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetUploadStatusRequest,
    output: GetUploadStatusResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Returns a list of objects that contain information about events in a flow execution.
 */
export const listFlowExecutionMessages = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListFlowExecutionMessagesRequest,
    output: ListFlowExecutionMessagesResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "messages",
        pageSize: "maxResults",
    },
}));
/**
 * Lists all tags on an AWS IoT Things Graph resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceAlreadyExistsException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "tags",
        pageSize: "maxResults",
    },
}));
/**
 * Searches for entities of the specified type. You can search for entities in your namespace and the public namespace that you're tracking.
 */
export const searchEntities = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchEntitiesRequest,
    output: SearchEntitiesResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "descriptions",
        pageSize: "maxResults",
    },
}));
/**
 * Searches for AWS IoT Things Graph workflow execution instances.
 */
export const searchFlowExecutions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchFlowExecutionsRequest,
    output: SearchFlowExecutionsResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "summaries",
        pageSize: "maxResults",
    },
}));
/**
 * Searches for summary information about workflows.
 */
export const searchFlowTemplates = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchFlowTemplatesRequest,
    output: SearchFlowTemplatesResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "summaries",
        pageSize: "maxResults",
    },
}));
/**
 * Searches for system instances in the user's account.
 */
export const searchSystemInstances = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchSystemInstancesRequest,
    output: SearchSystemInstancesResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "summaries",
        pageSize: "maxResults",
    },
}));
/**
 * Searches for summary information about systems in the user's account. You can filter by the ID of a workflow to return only systems that use the specified workflow.
 */
export const searchSystemTemplates = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchSystemTemplatesRequest,
    output: SearchSystemTemplatesResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "summaries",
        pageSize: "maxResults",
    },
}));
/**
 * Searches for things associated with the specified entity. You can search by both device and device model.
 *
 * For example, if two different devices, camera1 and camera2, implement the camera device model, the user can associate thing1 to camera1 and thing2 to camera2.
 * `SearchThings(camera2)` will return only thing2, but `SearchThings(camera)` will return both thing1 and thing2.
 *
 * This action searches for exact matches and doesn't perform partial text matching.
 */
export const searchThings = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchThingsRequest,
    output: SearchThingsResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "things",
        pageSize: "maxResults",
    },
}));
/**
 * Creates a tag for the specified resource.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceAlreadyExistsException,
        ThrottlingException,
    ],
}));
/**
 * Removes a system instance from its target (Cloud or Greengrass).
 */
export const undeploySystemInstance = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UndeploySystemInstanceRequest,
    output: UndeploySystemInstanceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceInUseException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Removes a tag from the specified resource.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceAlreadyExistsException,
        ThrottlingException,
    ],
}));
/**
 * Updates the specified workflow. All deployed systems and system instances that use the workflow will see the changes in the flow when it is redeployed. If you don't want this
 * behavior, copy the workflow (creating a new workflow with a different ID), and update the copy. The workflow can contain only entities in the specified namespace.
 */
export const updateFlowTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateFlowTemplateRequest,
    output: UpdateFlowTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Updates the specified system. You don't need to run this action after updating a workflow. Any deployment that uses the system will see the changes in the system when it is redeployed.
 */
export const updateSystemTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateSystemTemplateRequest,
    output: UpdateSystemTemplateResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Asynchronously uploads one or more entity definitions to the user's namespace. The `document` parameter is required if
 * `syncWithPublicNamespace` and `deleteExistingEntites` are false. If the `syncWithPublicNamespace` parameter is set to
 * `true`, the user's namespace will synchronize with the latest version of the public namespace. If `deprecateExistingEntities` is set to true,
 * all entities in the latest version will be deleted before the new `DefinitionDocument` is uploaded.
 *
 * When a user uploads entity definitions for the first time, the service creates a new namespace for the user. The new namespace tracks the public namespace. Currently users
 * can have only one namespace. The namespace version increments whenever a user uploads entity definitions that are backwards-incompatible and whenever a user sets the
 * `syncWithPublicNamespace` parameter or the `deprecateExistingEntities` parameter to `true`.
 *
 * The IDs for all of the entities should be in URN format. Each entity must be in the user's namespace. Users can't create entities in the public namespace, but entity definitions can refer to entities in the public namespace.
 *
 * Valid entities are `Device`, `DeviceModel`, `Service`, `Capability`, `State`, `Action`, `Event`, `Property`,
 * `Mapping`, `Enum`.
 */
export const uploadEntityDefinitions = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UploadEntityDefinitionsRequest,
    output: UploadEntityDefinitionsResponse,
    errors: [
        InternalFailureException,
        InvalidRequestException,
        ThrottlingException,
    ],
}));
//# sourceMappingURL=iotthingsgraph.js.map