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: "CodeConnections",
    serviceShapeName: "CodeConnections_20231201",
});
const auth = T.AwsAuthSigv4({ name: "codeconnections" });
const ver = T.ServiceVersion("2023-12-01");
const proto = T.AwsProtocolsAwsJson1_0();
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://codeconnections-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://codeconnections-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://codeconnections.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://codeconnections.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const ProviderType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Tag = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Key: S.String, Value: S.String })).annotate({ identifier: "Tag" });
export const TagList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const CreateConnectionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProviderType: S.optional(ProviderType),
    ConnectionName: S.String,
    Tags: S.optional(TagList),
    HostArn: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateConnectionInput",
});
export const CreateConnectionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ConnectionArn: S.String, Tags: S.optional(TagList) })).annotate({
    identifier: "CreateConnectionOutput",
});
export const SubnetIds = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const SecurityGroupIds = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const VpcConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    VpcId: S.String,
    SubnetIds: SubnetIds,
    SecurityGroupIds: SecurityGroupIds,
    TlsCertificate: S.optional(S.String),
})).annotate({
    identifier: "VpcConfiguration",
});
export const CreateHostInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Name: S.String,
    ProviderType: ProviderType,
    ProviderEndpoint: S.String,
    VpcConfiguration: S.optional(VpcConfiguration),
    Tags: S.optional(TagList),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateHostInput",
});
export const CreateHostOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ HostArn: S.optional(S.String), Tags: S.optional(TagList) })).annotate({
    identifier: "CreateHostOutput",
});
export const CreateRepositoryLinkInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ConnectionArn: S.String,
    OwnerId: S.String,
    RepositoryName: S.String,
    EncryptionKeyArn: S.optional(S.String),
    Tags: S.optional(TagList),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateRepositoryLinkInput",
});
export const RepositoryLinkInfo = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ConnectionArn: S.String,
    EncryptionKeyArn: S.optional(S.String),
    OwnerId: S.String,
    ProviderType: ProviderType,
    RepositoryLinkArn: S.String,
    RepositoryLinkId: S.String,
    RepositoryName: S.String,
})).annotate({
    identifier: "RepositoryLinkInfo",
});
export const CreateRepositoryLinkOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ RepositoryLinkInfo: RepositoryLinkInfo })).annotate({
    identifier: "CreateRepositoryLinkOutput",
});
export const SyncConfigurationType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PublishDeploymentStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const TriggerResourceUpdateOn = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PullRequestComment = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CreateSyncConfigurationInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Branch: S.String,
    ConfigFile: S.String,
    RepositoryLinkId: S.String,
    ResourceName: S.String,
    RoleArn: S.String,
    SyncType: SyncConfigurationType,
    PublishDeploymentStatus: S.optional(PublishDeploymentStatus),
    TriggerResourceUpdateOn: S.optional(TriggerResourceUpdateOn),
    PullRequestComment: S.optional(PullRequestComment),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateSyncConfigurationInput",
});
export const SyncConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Branch: S.String,
    ConfigFile: S.optional(S.String),
    OwnerId: S.String,
    ProviderType: ProviderType,
    RepositoryLinkId: S.String,
    RepositoryName: S.String,
    ResourceName: S.String,
    RoleArn: S.String,
    SyncType: SyncConfigurationType,
    PublishDeploymentStatus: S.optional(PublishDeploymentStatus),
    TriggerResourceUpdateOn: S.optional(TriggerResourceUpdateOn),
    PullRequestComment: S.optional(PullRequestComment),
})).annotate({
    identifier: "SyncConfiguration",
});
export const CreateSyncConfigurationOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SyncConfiguration: SyncConfiguration })).annotate({
    identifier: "CreateSyncConfigurationOutput",
});
export const DeleteConnectionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ConnectionArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteConnectionInput",
});
export const DeleteConnectionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteConnectionOutput",
});
export const DeleteHostInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ HostArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteHostInput",
});
export const DeleteHostOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteHostOutput",
});
export const DeleteRepositoryLinkInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ RepositoryLinkId: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteRepositoryLinkInput",
});
export const DeleteRepositoryLinkOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteRepositoryLinkOutput",
});
export const DeleteSyncConfigurationInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SyncType: SyncConfigurationType, ResourceName: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteSyncConfigurationInput",
});
export const DeleteSyncConfigurationOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteSyncConfigurationOutput",
});
export const GetConnectionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ConnectionArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetConnectionInput",
});
export const ConnectionStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Connection = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ConnectionName: S.optional(S.String),
    ConnectionArn: S.optional(S.String),
    ProviderType: S.optional(ProviderType),
    OwnerAccountId: S.optional(S.String),
    ConnectionStatus: S.optional(ConnectionStatus),
    HostArn: S.optional(S.String),
})).annotate({ identifier: "Connection" });
export const GetConnectionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Connection: S.optional(Connection) })).annotate({
    identifier: "GetConnectionOutput",
});
export const GetHostInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ HostArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({ identifier: "GetHostInput" });
export const GetHostOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Name: S.optional(S.String),
    Status: S.optional(S.String),
    ProviderType: S.optional(ProviderType),
    ProviderEndpoint: S.optional(S.String),
    VpcConfiguration: S.optional(VpcConfiguration),
})).annotate({ identifier: "GetHostOutput" });
export const GetRepositoryLinkInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ RepositoryLinkId: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetRepositoryLinkInput",
});
export const GetRepositoryLinkOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ RepositoryLinkInfo: RepositoryLinkInfo })).annotate({
    identifier: "GetRepositoryLinkOutput",
});
export const GetRepositorySyncStatusInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Branch: S.String,
    RepositoryLinkId: S.String,
    SyncType: SyncConfigurationType,
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetRepositorySyncStatusInput",
});
export const RepositorySyncStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const RepositorySyncEvent = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Event: S.String,
    ExternalId: S.optional(S.String),
    Time: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    Type: S.String,
})).annotate({
    identifier: "RepositorySyncEvent",
});
export const RepositorySyncEventList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(RepositorySyncEvent);
export const RepositorySyncAttempt = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    StartedAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    Status: RepositorySyncStatus,
    Events: RepositorySyncEventList,
})).annotate({
    identifier: "RepositorySyncAttempt",
});
export const GetRepositorySyncStatusOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ LatestSync: RepositorySyncAttempt })).annotate({
    identifier: "GetRepositorySyncStatusOutput",
});
export const GetResourceSyncStatusInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ResourceName: S.String, SyncType: SyncConfigurationType }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetResourceSyncStatusInput",
});
export const Revision = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Branch: S.String,
    Directory: S.String,
    OwnerId: S.String,
    RepositoryName: S.String,
    ProviderType: ProviderType,
    Sha: S.String,
})).annotate({ identifier: "Revision" });
export const ResourceSyncEvent = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Event: S.String,
    ExternalId: S.optional(S.String),
    Time: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    Type: S.String,
})).annotate({
    identifier: "ResourceSyncEvent",
});
export const ResourceSyncEventList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ResourceSyncEvent);
export const ResourceSyncStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ResourceSyncAttempt = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Events: ResourceSyncEventList,
    InitialRevision: Revision,
    StartedAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    Status: ResourceSyncStatus,
    TargetRevision: Revision,
    Target: S.String,
})).annotate({
    identifier: "ResourceSyncAttempt",
});
export const GetResourceSyncStatusOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DesiredState: S.optional(Revision),
    LatestSuccessfulSync: S.optional(ResourceSyncAttempt),
    LatestSync: ResourceSyncAttempt,
})).annotate({
    identifier: "GetResourceSyncStatusOutput",
});
export const GetSyncBlockerSummaryInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SyncType: SyncConfigurationType, ResourceName: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetSyncBlockerSummaryInput",
});
export const BlockerType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const BlockerStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SyncBlockerContext = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Key: S.String, Value: S.String })).annotate({
    identifier: "SyncBlockerContext",
});
export const SyncBlockerContextList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SyncBlockerContext);
export const SyncBlocker = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Id: S.String,
    Type: BlockerType,
    Status: BlockerStatus,
    CreatedReason: S.String,
    CreatedAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    Contexts: S.optional(SyncBlockerContextList),
    ResolvedReason: S.optional(S.String),
    ResolvedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({ identifier: "SyncBlocker" });
export const LatestSyncBlockerList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SyncBlocker);
export const SyncBlockerSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ResourceName: S.String,
    ParentResourceName: S.optional(S.String),
    LatestBlockers: S.optional(LatestSyncBlockerList),
})).annotate({
    identifier: "SyncBlockerSummary",
});
export const GetSyncBlockerSummaryOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SyncBlockerSummary: SyncBlockerSummary })).annotate({
    identifier: "GetSyncBlockerSummaryOutput",
});
export const GetSyncConfigurationInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SyncType: SyncConfigurationType, ResourceName: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetSyncConfigurationInput",
});
export const GetSyncConfigurationOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SyncConfiguration: SyncConfiguration })).annotate({
    identifier: "GetSyncConfigurationOutput",
});
export const ListConnectionsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProviderTypeFilter: S.optional(ProviderType),
    HostArnFilter: S.optional(S.String),
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListConnectionsInput",
});
export const ConnectionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Connection);
export const ListConnectionsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Connections: S.optional(ConnectionList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListConnectionsOutput",
});
export const ListHostsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({ identifier: "ListHostsInput" });
export const Host = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Name: S.optional(S.String),
    HostArn: S.optional(S.String),
    ProviderType: S.optional(ProviderType),
    ProviderEndpoint: S.optional(S.String),
    VpcConfiguration: S.optional(VpcConfiguration),
    Status: S.optional(S.String),
    StatusMessage: S.optional(S.String),
})).annotate({ identifier: "Host" });
export const HostList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Host);
export const ListHostsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Hosts: S.optional(HostList), NextToken: S.optional(S.String) })).annotate({
    identifier: "ListHostsOutput",
});
export const ListRepositoryLinksInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListRepositoryLinksInput",
});
export const RepositoryLinkList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(RepositoryLinkInfo);
export const ListRepositoryLinksOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    RepositoryLinks: RepositoryLinkList,
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListRepositoryLinksOutput",
});
export const ListRepositorySyncDefinitionsInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    RepositoryLinkId: S.String,
    SyncType: SyncConfigurationType,
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListRepositorySyncDefinitionsInput",
});
export const RepositorySyncDefinition = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Branch: S.String,
    Directory: S.String,
    Parent: S.String,
    Target: S.String,
})).annotate({
    identifier: "RepositorySyncDefinition",
});
export const RepositorySyncDefinitionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(RepositorySyncDefinition);
export const ListRepositorySyncDefinitionsOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    RepositorySyncDefinitions: RepositorySyncDefinitionList,
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListRepositorySyncDefinitionsOutput",
});
export const ListSyncConfigurationsInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number),
    NextToken: S.optional(S.String),
    RepositoryLinkId: S.String,
    SyncType: SyncConfigurationType,
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListSyncConfigurationsInput",
});
export const SyncConfigurationList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SyncConfiguration);
export const ListSyncConfigurationsOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SyncConfigurations: SyncConfigurationList,
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListSyncConfigurationsOutput",
});
export const ListTagsForResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ResourceArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceInput",
});
export const ListTagsForResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Tags: S.optional(TagList) })).annotate({
    identifier: "ListTagsForResourceOutput",
});
export const TagResourceInput = /*@__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: "TagResourceInput",
});
export const TagResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceOutput",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceInput = /*@__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: "UntagResourceInput",
});
export const UntagResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceOutput",
});
export const UpdateHostInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    HostArn: S.String,
    ProviderEndpoint: S.optional(S.String),
    VpcConfiguration: S.optional(VpcConfiguration),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateHostInput",
});
export const UpdateHostOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateHostOutput",
});
export const UpdateRepositoryLinkInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ConnectionArn: S.optional(S.String),
    EncryptionKeyArn: S.optional(S.String),
    RepositoryLinkId: S.String,
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateRepositoryLinkInput",
});
export const UpdateRepositoryLinkOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ RepositoryLinkInfo: RepositoryLinkInfo })).annotate({
    identifier: "UpdateRepositoryLinkOutput",
});
export const UpdateSyncBlockerInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Id: S.String,
    SyncType: SyncConfigurationType,
    ResourceName: S.String,
    ResolvedReason: S.String,
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateSyncBlockerInput",
});
export const UpdateSyncBlockerOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ResourceName: S.String,
    ParentResourceName: S.optional(S.String),
    SyncBlocker: SyncBlocker,
})).annotate({
    identifier: "UpdateSyncBlockerOutput",
});
export const UpdateSyncConfigurationInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Branch: S.optional(S.String),
    ConfigFile: S.optional(S.String),
    RepositoryLinkId: S.optional(S.String),
    ResourceName: S.String,
    RoleArn: S.optional(S.String),
    SyncType: SyncConfigurationType,
    PublishDeploymentStatus: S.optional(PublishDeploymentStatus),
    TriggerResourceUpdateOn: S.optional(TriggerResourceUpdateOn),
    PullRequestComment: S.optional(PullRequestComment),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateSyncConfigurationInput",
});
export const UpdateSyncConfigurationOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SyncConfiguration: SyncConfiguration })).annotate({
    identifier: "UpdateSyncConfigurationOutput",
});
//# Errors
export class LimitExceededException extends S.TaggedErrorClass()("LimitExceededException", { Message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ResourceUnavailableException extends S.TaggedErrorClass()("ResourceUnavailableException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { Message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class ConcurrentModificationException extends S.TaggedErrorClass()("ConcurrentModificationException", { Message: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { Message: S.optional(S.String) }).pipe(C.withServerError) {
}
export class InvalidInputException extends S.TaggedErrorClass()("InvalidInputException", { 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 ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", { Message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class SyncConfigurationStillExistsException extends S.TaggedErrorClass()("SyncConfigurationStillExistsException", { Message: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class UnsupportedProviderTypeException extends S.TaggedErrorClass()("UnsupportedProviderTypeException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { Message: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class UnsupportedOperationException extends S.TaggedErrorClass()("UnsupportedOperationException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ConditionalCheckFailedException extends S.TaggedErrorClass()("ConditionalCheckFailedException", { Message: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class UpdateOutOfSyncException extends S.TaggedErrorClass()("UpdateOutOfSyncException", { Message: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class RetryLatestCommitFailedException extends S.TaggedErrorClass()("RetryLatestCommitFailedException", { Message: S.optional(S.String) }).pipe(C.withServerError) {
}
export class SyncBlockerDoesNotExistException extends S.TaggedErrorClass()("SyncBlockerDoesNotExistException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
/**
 * Creates a connection that can then be given to other Amazon Web Services services like CodePipeline so
 * that it can access third-party code repositories. The connection is in pending status until
 * the third-party connection handshake is completed from the console.
 */
export const createConnection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateConnectionInput,
    output: CreateConnectionOutput,
    errors: [
        LimitExceededException,
        ResourceNotFoundException,
        ResourceUnavailableException,
    ],
}));
/**
 * Creates a resource that represents the infrastructure where a third-party provider is
 * installed. The host is used when you create connections to an installed third-party provider
 * type, such as GitHub Enterprise Server. You create one host for all connections to that
 * provider.
 *
 * A host created through the CLI or the SDK is in `PENDING` status by
 * default. You can make its status `AVAILABLE` by setting up the host in the console.
 */
export const createHost = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateHostInput,
    output: CreateHostOutput,
    errors: [LimitExceededException],
}));
/**
 * Creates a link to a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.
 */
export const createRepositoryLink = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateRepositoryLinkInput,
    output: CreateRepositoryLinkOutput,
    errors: [
        AccessDeniedException,
        ConcurrentModificationException,
        InternalServerException,
        InvalidInputException,
        LimitExceededException,
        ResourceAlreadyExistsException,
        ThrottlingException,
    ],
}));
/**
 * Creates a sync configuration which allows Amazon Web Services to sync content from a Git
 * repository to update a specified Amazon Web Services resource. Parameters for the sync
 * configuration are determined by the sync type.
 */
export const createSyncConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateSyncConfigurationInput,
    output: CreateSyncConfigurationOutput,
    errors: [
        AccessDeniedException,
        ConcurrentModificationException,
        InternalServerException,
        InvalidInputException,
        LimitExceededException,
        ResourceAlreadyExistsException,
        ThrottlingException,
    ],
}));
/**
 * The connection to be deleted.
 */
export const deleteConnection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteConnectionInput,
    output: DeleteConnectionOutput,
    errors: [ResourceNotFoundException],
}));
/**
 * The host to be deleted. Before you delete a host, all connections associated to the host must be deleted.
 *
 * A host cannot be deleted if it is in the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.
 */
export const deleteHost = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteHostInput,
    output: DeleteHostOutput,
    errors: [ResourceNotFoundException, ResourceUnavailableException],
}));
/**
 * Deletes the association between your connection and a specified external Git repository.
 */
export const deleteRepositoryLink = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteRepositoryLinkInput,
    output: DeleteRepositoryLinkOutput,
    errors: [
        AccessDeniedException,
        ConcurrentModificationException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        SyncConfigurationStillExistsException,
        ThrottlingException,
        UnsupportedProviderTypeException,
    ],
}));
/**
 * Deletes the sync configuration for a specified repository and connection.
 */
export const deleteSyncConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteSyncConfigurationInput,
    output: DeleteSyncConfigurationOutput,
    errors: [
        AccessDeniedException,
        ConcurrentModificationException,
        InternalServerException,
        InvalidInputException,
        LimitExceededException,
        ThrottlingException,
    ],
}));
/**
 * Returns the connection ARN and details such as status, owner, and provider type.
 */
export const getConnection = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetConnectionInput,
    output: GetConnectionOutput,
    errors: [ResourceNotFoundException, ResourceUnavailableException],
}));
/**
 * Returns the host ARN and details such as status, provider type, endpoint, and, if
 * applicable, the VPC configuration.
 */
export const getHost = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetHostInput,
    output: GetHostOutput,
    errors: [ResourceNotFoundException, ResourceUnavailableException],
}));
/**
 * Returns details about a repository link. A repository link allows Git sync to monitor
 * and sync changes from files in a specified Git repository.
 */
export const getRepositoryLink = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetRepositoryLinkInput,
    output: GetRepositoryLinkOutput,
    errors: [
        AccessDeniedException,
        ConcurrentModificationException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Returns details about the sync status for a repository. A repository sync uses Git sync
 * to push and pull changes from your remote repository.
 */
export const getRepositorySyncStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetRepositorySyncStatusInput,
    output: GetRepositorySyncStatusOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Returns the status of the sync with the Git repository for a specific Amazon Web Services
 * resource.
 */
export const getResourceSyncStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetResourceSyncStatusInput,
    output: GetResourceSyncStatusOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Returns a list of the most recent sync blockers.
 */
export const getSyncBlockerSummary = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetSyncBlockerSummaryInput,
    output: GetSyncBlockerSummaryOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Returns details about a sync configuration, including the sync type and resource name. A sync configuration allows the configuration to sync (push and pull) changes from the remote repository for a specified branch in a Git repository.
 */
export const getSyncConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetSyncConfigurationInput,
    output: GetSyncConfigurationOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Lists the connections associated with your account.
 */
export const listConnections = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListConnectionsInput,
    output: ListConnectionsOutput,
    errors: [ResourceNotFoundException],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists the hosts associated with your account.
 */
export const listHosts = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListHostsInput,
    output: ListHostsOutput,
    errors: [],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists the repository links created for connections in your account.
 */
export const listRepositoryLinks = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListRepositoryLinksInput,
    output: ListRepositoryLinksOutput,
    errors: [
        AccessDeniedException,
        ConcurrentModificationException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists the repository sync definitions for repository links in your account.
 */
export const listRepositorySyncDefinitions = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListRepositorySyncDefinitionsInput,
    output: ListRepositorySyncDefinitionsOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
}));
/**
 * Returns a list of sync configurations for a specified repository.
 */
export const listSyncConfigurations = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListSyncConfigurationsInput,
    output: ListSyncConfigurationsOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Gets the set of key-value pairs (metadata) that are used to manage the resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceInput,
    output: ListTagsForResourceOutput,
    errors: [ResourceNotFoundException],
}));
/**
 * Adds to or modifies the tags of the given resource. Tags are metadata that can be used
 * to manage a resource.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceInput,
    output: TagResourceOutput,
    errors: [LimitExceededException, ResourceNotFoundException],
}));
/**
 * Removes tags from an Amazon Web Services resource.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceInput,
    output: UntagResourceOutput,
    errors: [ResourceNotFoundException],
}));
/**
 * Updates a specified host with the provided configurations.
 */
export const updateHost = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateHostInput,
    output: UpdateHostOutput,
    errors: [
        ConflictException,
        ResourceNotFoundException,
        ResourceUnavailableException,
        UnsupportedOperationException,
    ],
}));
/**
 * Updates the association between your connection and a specified external Git repository.
 * A repository link allows Git sync to monitor and sync changes to files in a specified Git
 * repository.
 */
export const updateRepositoryLink = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateRepositoryLinkInput,
    output: UpdateRepositoryLinkOutput,
    errors: [
        AccessDeniedException,
        ConditionalCheckFailedException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
        UpdateOutOfSyncException,
    ],
}));
/**
 * Allows you to update the status of a sync blocker, resolving the blocker and allowing syncing to continue.
 */
export const updateSyncBlocker = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateSyncBlockerInput,
    output: UpdateSyncBlockerOutput,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        RetryLatestCommitFailedException,
        SyncBlockerDoesNotExistException,
        ThrottlingException,
    ],
}));
/**
 * Updates the sync configuration for your connection and a specified external Git repository.
 */
export const updateSyncConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateSyncConfigurationInput,
    output: UpdateSyncConfigurationOutput,
    errors: [
        AccessDeniedException,
        ConcurrentModificationException,
        InternalServerException,
        InvalidInputException,
        ResourceNotFoundException,
        ThrottlingException,
        UpdateOutOfSyncException,
    ],
}));
//# sourceMappingURL=codeconnections.js.map