import * as HttpClient from "effect/unstable/http/HttpClient";
import * as redacted from "effect/Redacted";
import * as S from "effect/Schema";
import * as stream from "effect/Stream";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import * as C from "../category.js";
import { SensitiveString } from "../sensitive.js";
const svc = T.AwsApiService({
    sdkId: "ivs",
    serviceShapeName: "AmazonInteractiveVideoService",
});
const auth = T.AwsAuthSigv4({ name: "ivs" });
const ver = T.ServiceVersion("2020-07-14");
const proto = T.AwsProtocolsRestJson1();
const rules = T.EndpointResolver((p, _) => {
    const { Region, UseDualStack = false, UseFIPS = false, Endpoint } = p;
    const e = (u, p = {}, h = {}) => ({
        type: "endpoint",
        endpoint: { url: u, properties: p, headers: h },
    });
    const err = (m) => ({
        type: "error",
        message: m,
    });
    if (Endpoint != null) {
        if (UseFIPS === true) {
            return err("Invalid Configuration: FIPS and custom endpoint are not supported");
        }
        if (UseDualStack === true) {
            return err("Invalid Configuration: Dualstack and custom endpoint are not supported");
        }
        return e(Endpoint);
    }
    if (Region != null) {
        {
            const PartitionResult = _.partition(Region);
            if (PartitionResult != null && PartitionResult !== false) {
                if (UseFIPS === true && UseDualStack === true) {
                    if (true === _.getAttr(PartitionResult, "supportsFIPS") &&
                        true === _.getAttr(PartitionResult, "supportsDualStack")) {
                        return e(`https://ivs-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://ivs-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://ivs.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://ivs.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const ChannelArnList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const BatchGetChannelRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arns: ChannelArnList }).pipe(T.all(T.Http({ method: "POST", uri: "/BatchGetChannel" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "BatchGetChannelRequest",
});
export const ChannelType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Tags = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const TranscodePreset = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Srt = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    endpoint: S.optional(S.String),
    passphrase: S.optional(SensitiveString),
})).annotate({ identifier: "Srt" });
export const MultitrackPolicy = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MultitrackMaximumResolution = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MultitrackInputConfiguration = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    enabled: S.optional(S.Boolean),
    policy: S.optional(MultitrackPolicy),
    maximumResolution: S.optional(MultitrackMaximumResolution),
})).annotate({
    identifier: "MultitrackInputConfiguration",
});
export const Channel = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.optional(S.String),
    name: S.optional(S.String),
    latencyMode: S.optional(S.String),
    type: S.optional(ChannelType),
    recordingConfigurationArn: S.optional(S.String),
    ingestEndpoint: S.optional(S.String),
    playbackUrl: S.optional(S.String),
    authorized: S.optional(S.Boolean),
    tags: S.optional(Tags),
    insecureIngest: S.optional(S.Boolean),
    preset: S.optional(TranscodePreset),
    srt: S.optional(Srt),
    playbackRestrictionPolicyArn: S.optional(S.String),
    multitrackInputConfiguration: S.optional(MultitrackInputConfiguration),
    containerFormat: S.optional(S.String),
})).annotate({ identifier: "Channel" });
export const Channels = /*@__PURE__*/ /*#__PURE__*/ S.Array(Channel);
export const BatchError = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.optional(S.String),
    code: S.optional(S.String),
    message: S.optional(S.String),
})).annotate({ identifier: "BatchError" });
export const BatchErrors = /*@__PURE__*/ /*#__PURE__*/ S.Array(BatchError);
export const BatchGetChannelResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channels: S.optional(Channels),
    errors: S.optional(BatchErrors),
})).annotate({
    identifier: "BatchGetChannelResponse",
});
export const StreamKeyArnList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const BatchGetStreamKeyRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arns: StreamKeyArnList }).pipe(T.all(T.Http({ method: "POST", uri: "/BatchGetStreamKey" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "BatchGetStreamKeyRequest",
});
export const StreamKey = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.optional(S.String),
    value: S.optional(SensitiveString),
    channelArn: S.optional(S.String),
    tags: S.optional(Tags),
})).annotate({ identifier: "StreamKey" });
export const StreamKeys = /*@__PURE__*/ /*#__PURE__*/ S.Array(StreamKey);
export const BatchGetStreamKeyResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    streamKeys: S.optional(StreamKeys),
    errors: S.optional(BatchErrors),
})).annotate({
    identifier: "BatchGetStreamKeyResponse",
});
export const BatchStartViewerSessionRevocationViewerSession = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channelArn: S.String,
    viewerId: S.String,
    viewerSessionVersionsLessThanOrEqualTo: S.optional(S.Number),
})).annotate({
    identifier: "BatchStartViewerSessionRevocationViewerSession",
});
export const BatchStartViewerSessionRevocationViewerSessionList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(BatchStartViewerSessionRevocationViewerSession);
export const BatchStartViewerSessionRevocationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    viewerSessions: BatchStartViewerSessionRevocationViewerSessionList,
}).pipe(T.all(T.Http({ method: "POST", uri: "/BatchStartViewerSessionRevocation" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "BatchStartViewerSessionRevocationRequest",
});
export const BatchStartViewerSessionRevocationError_ = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channelArn: S.String,
    viewerId: S.String,
    code: S.optional(S.String),
    message: S.optional(S.String),
})).annotate({
    identifier: "BatchStartViewerSessionRevocationError",
});
export const BatchStartViewerSessionRevocationErrors = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(BatchStartViewerSessionRevocationError_);
export const BatchStartViewerSessionRevocationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ errors: S.optional(BatchStartViewerSessionRevocationErrors) })).annotate({
    identifier: "BatchStartViewerSessionRevocationResponse",
});
export const CreateChannelRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.optional(S.String),
    latencyMode: S.optional(S.String),
    type: S.optional(ChannelType),
    authorized: S.optional(S.Boolean),
    recordingConfigurationArn: S.optional(S.String),
    tags: S.optional(Tags),
    insecureIngest: S.optional(S.Boolean),
    preset: S.optional(TranscodePreset),
    playbackRestrictionPolicyArn: S.optional(S.String),
    multitrackInputConfiguration: S.optional(MultitrackInputConfiguration),
    containerFormat: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/CreateChannel" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateChannelRequest",
});
export const CreateChannelResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channel: S.optional(Channel), streamKey: S.optional(StreamKey) })).annotate({
    identifier: "CreateChannelResponse",
});
export const PlaybackRestrictionPolicyAllowedCountryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const PlaybackRestrictionPolicyAllowedOriginList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const CreatePlaybackRestrictionPolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    allowedCountries: S.optional(PlaybackRestrictionPolicyAllowedCountryList),
    allowedOrigins: S.optional(PlaybackRestrictionPolicyAllowedOriginList),
    enableStrictOriginEnforcement: S.optional(S.Boolean),
    name: S.optional(S.String),
    tags: S.optional(Tags),
}).pipe(T.all(T.Http({ method: "POST", uri: "/CreatePlaybackRestrictionPolicy" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreatePlaybackRestrictionPolicyRequest",
});
export const PlaybackRestrictionPolicy = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.String,
    allowedCountries: PlaybackRestrictionPolicyAllowedCountryList,
    allowedOrigins: PlaybackRestrictionPolicyAllowedOriginList,
    enableStrictOriginEnforcement: S.optional(S.Boolean),
    name: S.optional(S.String),
    tags: S.optional(Tags),
})).annotate({
    identifier: "PlaybackRestrictionPolicy",
});
export const CreatePlaybackRestrictionPolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    playbackRestrictionPolicy: S.optional(PlaybackRestrictionPolicy),
})).annotate({
    identifier: "CreatePlaybackRestrictionPolicyResponse",
});
export const S3DestinationConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ bucketName: S.String })).annotate({
    identifier: "S3DestinationConfiguration",
});
export const DestinationConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ s3: S.optional(S3DestinationConfiguration) })).annotate({
    identifier: "DestinationConfiguration",
});
export const ThumbnailConfigurationResolution = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const ThumbnailConfigurationStorageList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ThumbnailConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    recordingMode: S.optional(S.String),
    targetIntervalSeconds: S.optional(S.Number),
    resolution: S.optional(ThumbnailConfigurationResolution),
    storage: S.optional(ThumbnailConfigurationStorageList),
})).annotate({
    identifier: "ThumbnailConfiguration",
});
export const RenditionConfigurationRendition = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const RenditionConfigurationRenditionList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(RenditionConfigurationRendition);
export const RenditionConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    renditionSelection: S.optional(S.String),
    renditions: S.optional(RenditionConfigurationRenditionList),
})).annotate({
    identifier: "RenditionConfiguration",
});
export const CreateRecordingConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.optional(S.String),
    destinationConfiguration: DestinationConfiguration,
    tags: S.optional(Tags),
    thumbnailConfiguration: S.optional(ThumbnailConfiguration),
    recordingReconnectWindowSeconds: S.optional(S.Number),
    renditionConfiguration: S.optional(RenditionConfiguration),
}).pipe(T.all(T.Http({ method: "POST", uri: "/CreateRecordingConfiguration" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateRecordingConfigurationRequest",
});
export const RecordingConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.String,
    name: S.optional(S.String),
    destinationConfiguration: DestinationConfiguration,
    state: S.String,
    tags: S.optional(Tags),
    thumbnailConfiguration: S.optional(ThumbnailConfiguration),
    recordingReconnectWindowSeconds: S.optional(S.Number),
    renditionConfiguration: S.optional(RenditionConfiguration),
})).annotate({
    identifier: "RecordingConfiguration",
});
export const CreateRecordingConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ recordingConfiguration: S.optional(RecordingConfiguration) })).annotate({
    identifier: "CreateRecordingConfigurationResponse",
});
export const CreateStreamKeyRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channelArn: S.String, tags: S.optional(Tags) }).pipe(T.all(T.Http({ method: "POST", uri: "/CreateStreamKey" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateStreamKeyRequest",
});
export const CreateStreamKeyResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ streamKey: S.optional(StreamKey) })).annotate({
    identifier: "CreateStreamKeyResponse",
});
export const DeleteChannelRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/DeleteChannel" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteChannelRequest",
});
export const DeleteChannelResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteChannelResponse",
});
export const DeletePlaybackKeyPairRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/DeletePlaybackKeyPair" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeletePlaybackKeyPairRequest",
});
export const DeletePlaybackKeyPairResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeletePlaybackKeyPairResponse",
});
export const DeletePlaybackRestrictionPolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/DeletePlaybackRestrictionPolicy" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeletePlaybackRestrictionPolicyRequest",
});
export const DeletePlaybackRestrictionPolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeletePlaybackRestrictionPolicyResponse",
});
export const DeleteRecordingConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/DeleteRecordingConfiguration" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteRecordingConfigurationRequest",
});
export const DeleteRecordingConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteRecordingConfigurationResponse",
});
export const DeleteStreamKeyRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/DeleteStreamKey" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteStreamKeyRequest",
});
export const DeleteStreamKeyResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteStreamKeyResponse",
});
export const GetChannelRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetChannel" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetChannelRequest",
});
export const GetChannelResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channel: S.optional(Channel) })).annotate({
    identifier: "GetChannelResponse",
});
export const GetPlaybackKeyPairRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetPlaybackKeyPair" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetPlaybackKeyPairRequest",
});
export const PlaybackKeyPair = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.optional(S.String),
    name: S.optional(S.String),
    fingerprint: S.optional(S.String),
    tags: S.optional(Tags),
})).annotate({
    identifier: "PlaybackKeyPair",
});
export const GetPlaybackKeyPairResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ keyPair: S.optional(PlaybackKeyPair) })).annotate({
    identifier: "GetPlaybackKeyPairResponse",
});
export const GetPlaybackRestrictionPolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetPlaybackRestrictionPolicy" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetPlaybackRestrictionPolicyRequest",
});
export const GetPlaybackRestrictionPolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    playbackRestrictionPolicy: S.optional(PlaybackRestrictionPolicy),
})).annotate({
    identifier: "GetPlaybackRestrictionPolicyResponse",
});
export const GetRecordingConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetRecordingConfiguration" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetRecordingConfigurationRequest",
});
export const GetRecordingConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ recordingConfiguration: S.optional(RecordingConfiguration) })).annotate({
    identifier: "GetRecordingConfigurationResponse",
});
export const GetStreamRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channelArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetStream" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetStreamRequest",
});
export const Stream = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channelArn: S.optional(S.String),
    streamId: S.optional(S.String),
    playbackUrl: S.optional(S.String),
    startTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    state: S.optional(S.String),
    health: S.optional(S.String),
    viewerCount: S.optional(S.Number),
})).annotate({ identifier: "Stream" });
export const GetStreamResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ stream: S.optional(Stream) })).annotate({
    identifier: "GetStreamResponse",
});
export const GetStreamKeyRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/GetStreamKey" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetStreamKeyRequest",
});
export const GetStreamKeyResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ streamKey: S.optional(StreamKey) })).annotate({
    identifier: "GetStreamKeyResponse",
});
export const GetStreamSessionRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channelArn: S.String, streamId: S.optional(S.String) }).pipe(T.all(T.Http({ method: "POST", uri: "/GetStreamSession" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetStreamSessionRequest",
});
export const VideoConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    avcProfile: S.optional(S.String),
    avcLevel: S.optional(S.String),
    codec: S.optional(S.String),
    encoder: S.optional(S.String),
    targetBitrate: S.optional(S.Number),
    targetFramerate: S.optional(S.Number),
    videoHeight: S.optional(S.Number),
    videoWidth: S.optional(S.Number),
    level: S.optional(S.String),
    track: S.optional(S.String),
    profile: S.optional(S.String),
})).annotate({
    identifier: "VideoConfiguration",
});
export const AudioConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    codec: S.optional(S.String),
    targetBitrate: S.optional(S.Number),
    sampleRate: S.optional(S.Number),
    channels: S.optional(S.Number),
    track: S.optional(S.String),
})).annotate({
    identifier: "AudioConfiguration",
});
export const IngestConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    video: S.optional(VideoConfiguration),
    audio: S.optional(AudioConfiguration),
})).annotate({
    identifier: "IngestConfiguration",
});
export const VideoConfigurationList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(VideoConfiguration);
export const AudioConfigurationList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(AudioConfiguration);
export const IngestConfigurations = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    videoConfigurations: VideoConfigurationList,
    audioConfigurations: AudioConfigurationList,
})).annotate({
    identifier: "IngestConfigurations",
});
export const StreamEvent = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.optional(S.String),
    type: S.optional(S.String),
    eventTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    code: S.optional(S.String),
})).annotate({ identifier: "StreamEvent" });
export const StreamEvents = /*@__PURE__*/ /*#__PURE__*/ S.Array(StreamEvent);
export const StreamSession = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    streamId: S.optional(S.String),
    startTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    endTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    channel: S.optional(Channel),
    ingestConfiguration: S.optional(IngestConfiguration),
    ingestConfigurations: S.optional(IngestConfigurations),
    recordingConfiguration: S.optional(RecordingConfiguration),
    truncatedEvents: S.optional(StreamEvents),
})).annotate({ identifier: "StreamSession" });
export const GetStreamSessionResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ streamSession: S.optional(StreamSession) })).annotate({
    identifier: "GetStreamSessionResponse",
});
export const ImportPlaybackKeyPairRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    publicKeyMaterial: S.String,
    name: S.optional(S.String),
    tags: S.optional(Tags),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ImportPlaybackKeyPair" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ImportPlaybackKeyPairRequest",
});
export const ImportPlaybackKeyPairResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ keyPair: S.optional(PlaybackKeyPair) })).annotate({
    identifier: "ImportPlaybackKeyPairResponse",
});
export const ListChannelsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    filterByName: S.optional(S.String),
    filterByRecordingConfigurationArn: S.optional(S.String),
    filterByPlaybackRestrictionPolicyArn: S.optional(S.String),
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListChannels" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListChannelsRequest",
});
export const ChannelSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.optional(S.String),
    name: S.optional(S.String),
    latencyMode: S.optional(S.String),
    authorized: S.optional(S.Boolean),
    recordingConfigurationArn: S.optional(S.String),
    tags: S.optional(Tags),
    insecureIngest: S.optional(S.Boolean),
    type: S.optional(ChannelType),
    preset: S.optional(TranscodePreset),
    playbackRestrictionPolicyArn: S.optional(S.String),
})).annotate({ identifier: "ChannelSummary" });
export const ChannelList = /*@__PURE__*/ /*#__PURE__*/ S.Array(ChannelSummary);
export const ListChannelsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channels: ChannelList, nextToken: S.optional(S.String) })).annotate({
    identifier: "ListChannelsResponse",
});
export const ListPlaybackKeyPairsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListPlaybackKeyPairs" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListPlaybackKeyPairsRequest",
});
export const PlaybackKeyPairSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.optional(S.String),
    name: S.optional(S.String),
    tags: S.optional(Tags),
})).annotate({
    identifier: "PlaybackKeyPairSummary",
});
export const PlaybackKeyPairList = /*@__PURE__*/ /*#__PURE__*/ S.Array(PlaybackKeyPairSummary);
export const ListPlaybackKeyPairsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    keyPairs: PlaybackKeyPairList,
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "ListPlaybackKeyPairsResponse",
});
export const ListPlaybackRestrictionPoliciesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListPlaybackRestrictionPolicies" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListPlaybackRestrictionPoliciesRequest",
});
export const PlaybackRestrictionPolicySummary = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.String,
    allowedCountries: PlaybackRestrictionPolicyAllowedCountryList,
    allowedOrigins: PlaybackRestrictionPolicyAllowedOriginList,
    enableStrictOriginEnforcement: S.optional(S.Boolean),
    name: S.optional(S.String),
    tags: S.optional(Tags),
})).annotate({
    identifier: "PlaybackRestrictionPolicySummary",
});
export const PlaybackRestrictionPolicyList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(PlaybackRestrictionPolicySummary);
export const ListPlaybackRestrictionPoliciesResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    playbackRestrictionPolicies: PlaybackRestrictionPolicyList,
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "ListPlaybackRestrictionPoliciesResponse",
});
export const ListRecordingConfigurationsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListRecordingConfigurations" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListRecordingConfigurationsRequest",
});
export const RecordingConfigurationSummary = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.String,
    name: S.optional(S.String),
    destinationConfiguration: DestinationConfiguration,
    state: S.String,
    tags: S.optional(Tags),
})).annotate({
    identifier: "RecordingConfigurationSummary",
});
export const RecordingConfigurationList = /*@__PURE__*/ /*#__PURE__*/ S.Array(RecordingConfigurationSummary);
export const ListRecordingConfigurationsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    recordingConfigurations: RecordingConfigurationList,
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "ListRecordingConfigurationsResponse",
});
export const ListStreamKeysRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channelArn: S.String,
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListStreamKeys" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListStreamKeysRequest",
});
export const StreamKeySummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.optional(S.String),
    channelArn: S.optional(S.String),
    tags: S.optional(Tags),
})).annotate({
    identifier: "StreamKeySummary",
});
export const StreamKeyList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(StreamKeySummary);
export const ListStreamKeysResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ streamKeys: StreamKeyList, nextToken: S.optional(S.String) })).annotate({
    identifier: "ListStreamKeysResponse",
});
export const StreamFilters = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ health: S.optional(S.String) })).annotate({ identifier: "StreamFilters" });
export const ListStreamsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    filterBy: S.optional(StreamFilters),
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListStreams" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListStreamsRequest",
});
export const StreamSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channelArn: S.optional(S.String),
    streamId: S.optional(S.String),
    state: S.optional(S.String),
    health: S.optional(S.String),
    viewerCount: S.optional(S.Number),
    startTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
})).annotate({ identifier: "StreamSummary" });
export const StreamList = /*@__PURE__*/ /*#__PURE__*/ S.Array(StreamSummary);
export const ListStreamsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ streams: StreamList, nextToken: S.optional(S.String) })).annotate({
    identifier: "ListStreamsResponse",
});
export const ListStreamSessionsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channelArn: S.String,
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/ListStreamSessions" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListStreamSessionsRequest",
});
export const StreamSessionSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    streamId: S.optional(S.String),
    startTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    endTime: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    hasErrorEvent: S.optional(S.Boolean),
})).annotate({
    identifier: "StreamSessionSummary",
});
export const StreamSessionList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(StreamSessionSummary);
export const ListStreamSessionsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    streamSessions: StreamSessionList,
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "ListStreamSessionsResponse",
});
export const ListTagsForResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String.pipe(T.HttpLabel("resourceArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceRequest",
});
export const ListTagsForResourceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tags: Tags })).annotate({
    identifier: "ListTagsForResourceResponse",
});
export const PutMetadataRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channelArn: S.String, metadata: SensitiveString }).pipe(T.all(T.Http({ method: "POST", uri: "/PutMetadata" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutMetadataRequest",
});
export const PutMetadataResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutMetadataResponse",
});
export const StartViewerSessionRevocationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    channelArn: S.String,
    viewerId: S.String,
    viewerSessionVersionsLessThanOrEqualTo: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/StartViewerSessionRevocation" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartViewerSessionRevocationRequest",
});
export const StartViewerSessionRevocationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "StartViewerSessionRevocationResponse",
});
export const StopStreamRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channelArn: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/StopStream" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StopStreamRequest",
});
export const StopStreamResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "StopStreamResponse",
});
export const TagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tags: Tags,
}).pipe(T.all(T.Http({ method: "POST", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceRequest",
});
export const TagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceResponse",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tagKeys: TagKeyList.pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceRequest",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceResponse",
});
export const UpdateChannelRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.String,
    name: S.optional(S.String),
    latencyMode: S.optional(S.String),
    type: S.optional(ChannelType),
    authorized: S.optional(S.Boolean),
    recordingConfigurationArn: S.optional(S.String),
    insecureIngest: S.optional(S.Boolean),
    preset: S.optional(TranscodePreset),
    playbackRestrictionPolicyArn: S.optional(S.String),
    multitrackInputConfiguration: S.optional(MultitrackInputConfiguration),
    containerFormat: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/UpdateChannel" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateChannelRequest",
});
export const UpdateChannelResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ channel: S.optional(Channel) })).annotate({
    identifier: "UpdateChannelResponse",
});
export const UpdatePlaybackRestrictionPolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.String,
    allowedCountries: S.optional(PlaybackRestrictionPolicyAllowedCountryList),
    allowedOrigins: S.optional(PlaybackRestrictionPolicyAllowedOriginList),
    enableStrictOriginEnforcement: S.optional(S.Boolean),
    name: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/UpdatePlaybackRestrictionPolicy" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdatePlaybackRestrictionPolicyRequest",
});
export const UpdatePlaybackRestrictionPolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    playbackRestrictionPolicy: S.optional(PlaybackRestrictionPolicy),
})).annotate({
    identifier: "UpdatePlaybackRestrictionPolicyResponse",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { exceptionMessage: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class PendingVerification extends S.TaggedErrorClass()("PendingVerification", { exceptionMessage: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", { exceptionMessage: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", { exceptionMessage: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { exceptionMessage: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ServiceQuotaExceededException extends S.TaggedErrorClass()("ServiceQuotaExceededException", { exceptionMessage: S.optional(S.String) }).pipe(C.withQuotaError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { exceptionMessage: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { exceptionMessage: S.optional(S.String) }).pipe(C.withServerError) {
}
export class ChannelNotBroadcasting extends S.TaggedErrorClass()("ChannelNotBroadcasting", { exceptionMessage: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class StreamUnavailable extends S.TaggedErrorClass()("StreamUnavailable", { exceptionMessage: S.optional(S.String) }).pipe(C.withServerError) {
}
/**
 * Performs GetChannel on multiple ARNs simultaneously.
 */
export const batchGetChannel = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BatchGetChannelRequest,
    output: BatchGetChannelResponse,
    errors: [],
}));
/**
 * Performs GetStreamKey on multiple ARNs simultaneously.
 */
export const batchGetStreamKey = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BatchGetStreamKeyRequest,
    output: BatchGetStreamKeyResponse,
    errors: [],
}));
/**
 * Performs StartViewerSessionRevocation on multiple channel ARN and viewer
 * ID pairs simultaneously.
 */
export const batchStartViewerSessionRevocation = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BatchStartViewerSessionRevocationRequest,
    output: BatchStartViewerSessionRevocationResponse,
    errors: [
        AccessDeniedException,
        PendingVerification,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Creates a new channel and an associated stream key to start streaming.
 */
export const createChannel = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateChannelRequest,
    output: CreateChannelResponse,
    errors: [
        AccessDeniedException,
        PendingVerification,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ValidationException,
    ],
}));
/**
 * Creates a new playback restriction policy, for constraining playback by countries and/or
 * origins.
 */
export const createPlaybackRestrictionPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePlaybackRestrictionPolicyRequest,
    output: CreatePlaybackRestrictionPolicyResponse,
    errors: [
        AccessDeniedException,
        PendingVerification,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Creates a new recording configuration, used to enable recording to Amazon S3.
 *
 * **Known issue:** In the us-east-1 region, if you use the
 * Amazon Web Services CLI to create a recording configuration, it returns success even if the
 * S3 bucket is in a different region. In this case, the `state` of the recording
 * configuration is `CREATE_FAILED` (instead of `ACTIVE`). (In other
 * regions, the CLI correctly returns failure if the bucket is in a different region.)
 *
 * **Workaround:** Ensure that your S3 bucket is in the same
 * region as the recording configuration. If you create a recording configuration in a different
 * region as your S3 bucket, delete that recording configuration and create a new one with an S3
 * bucket from the correct region.
 */
export const createRecordingConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateRecordingConfigurationRequest,
    output: CreateRecordingConfigurationResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        PendingVerification,
        ServiceQuotaExceededException,
        ValidationException,
    ],
}));
/**
 * Creates a stream key, used to initiate a stream, for the specified channel ARN.
 *
 * Note that CreateChannel creates a stream key. If you subsequently use
 * CreateStreamKey on the same channel, it will fail because a stream key already exists and
 * there is a limit of 1 stream key per channel. To reset the stream key on a channel, use DeleteStreamKey and then CreateStreamKey.
 */
export const createStreamKey = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateStreamKeyRequest,
    output: CreateStreamKeyResponse,
    errors: [
        AccessDeniedException,
        PendingVerification,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ValidationException,
    ],
}));
/**
 * Deletes the specified channel and its associated stream keys.
 *
 * If you try to delete a live channel, you will get an error (409 ConflictException). To
 * delete a channel that is live, call StopStream, wait for the Amazon
 * EventBridge "Stream End" event (to verify that the stream's state is no longer Live), then
 * call DeleteChannel. (See Using EventBridge with Amazon IVS.)
 */
export const deleteChannel = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteChannelRequest,
    output: DeleteChannelResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        PendingVerification,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Deletes a specified authorization key pair. This invalidates future viewer tokens
 * generated using the key pair’s `privateKey`. For more information, see Setting Up Private
 * Channels in the *Amazon IVS User Guide*.
 */
export const deletePlaybackKeyPair = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeletePlaybackKeyPairRequest,
    output: DeletePlaybackKeyPairResponse,
    errors: [
        AccessDeniedException,
        PendingVerification,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Deletes the specified playback restriction policy.
 */
export const deletePlaybackRestrictionPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeletePlaybackRestrictionPolicyRequest,
    output: DeletePlaybackRestrictionPolicyResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        PendingVerification,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Deletes the recording configuration for the specified ARN.
 *
 * If you try to delete a recording configuration that is associated with a channel, you will
 * get an error (409 ConflictException). To avoid this, for all channels that reference the
 * recording configuration, first use UpdateChannel to set the
 * `recordingConfigurationArn` field to an empty string, then use
 * DeleteRecordingConfiguration.
 */
export const deleteRecordingConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteRecordingConfigurationRequest,
    output: DeleteRecordingConfigurationResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Deletes the stream key for the specified ARN, so it can no longer be used to
 * stream.
 */
export const deleteStreamKey = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteStreamKeyRequest,
    output: DeleteStreamKeyResponse,
    errors: [
        AccessDeniedException,
        PendingVerification,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Gets the channel configuration for the specified channel ARN. See also BatchGetChannel.
 */
export const getChannel = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetChannelRequest,
    output: GetChannelResponse,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Gets a specified playback authorization key pair and returns the `arn` and
 * `fingerprint`. The `privateKey` held by the caller can be used to
 * generate viewer authorization tokens, to grant viewers access to private channels. For more
 * information, see Setting Up Private Channels in the Amazon IVS User
 * Guide.
 */
export const getPlaybackKeyPair = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetPlaybackKeyPairRequest,
    output: GetPlaybackKeyPairResponse,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Gets the specified playback restriction policy.
 */
export const getPlaybackRestrictionPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetPlaybackRestrictionPolicyRequest,
    output: GetPlaybackRestrictionPolicyResponse,
    errors: [
        AccessDeniedException,
        PendingVerification,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Gets the recording configuration for the specified ARN.
 */
export const getRecordingConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetRecordingConfigurationRequest,
    output: GetRecordingConfigurationResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Gets information about the active (live) stream on a specified channel.
 */
export const getStream = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetStreamRequest,
    output: GetStreamResponse,
    errors: [
        AccessDeniedException,
        ChannelNotBroadcasting,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Gets stream-key information for a specified ARN.
 */
export const getStreamKey = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetStreamKeyRequest,
    output: GetStreamKeyResponse,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Gets metadata on a specified stream.
 */
export const getStreamSession = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetStreamSessionRequest,
    output: GetStreamSessionResponse,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Imports the public portion of a new key pair and returns its `arn` and
 * `fingerprint`. The `privateKey` can then be used to generate viewer
 * authorization tokens, to grant viewers access to private channels. For more information, see
 * Setting Up
 * Private Channels in the *Amazon IVS User Guide*.
 */
export const importPlaybackKeyPair = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ImportPlaybackKeyPairRequest,
    output: ImportPlaybackKeyPairResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        PendingVerification,
        ServiceQuotaExceededException,
        ValidationException,
    ],
}));
/**
 * Gets summary information about all channels in your account, in the Amazon Web Services
 * region where the API request is processed. This list can be filtered to match a specified name
 * or recording-configuration ARN. Filters are mutually exclusive and cannot be used together. If
 * you try to use both filters, you will get an error (409 ConflictException).
 */
export const listChannels = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListChannelsRequest,
    output: ListChannelsResponse,
    errors: [AccessDeniedException, ConflictException, ValidationException],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        pageSize: "maxResults",
    },
}));
/**
 * Gets summary information about playback key pairs. For more information, see Setting Up Private
 * Channels in the *Amazon IVS User Guide*.
 */
export const listPlaybackKeyPairs = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPlaybackKeyPairsRequest,
    output: ListPlaybackKeyPairsResponse,
    errors: [AccessDeniedException, ValidationException],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        pageSize: "maxResults",
    },
}));
/**
 * Gets summary information about playback restriction policies.
 */
export const listPlaybackRestrictionPolicies = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPlaybackRestrictionPoliciesRequest,
    output: ListPlaybackRestrictionPoliciesResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        PendingVerification,
        ValidationException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        pageSize: "maxResults",
    },
}));
/**
 * Gets summary information about all recording configurations in your account, in the
 * Amazon Web Services region where the API request is processed.
 */
export const listRecordingConfigurations = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListRecordingConfigurationsRequest,
    output: ListRecordingConfigurationsResponse,
    errors: [AccessDeniedException, InternalServerException, ValidationException],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        pageSize: "maxResults",
    },
}));
/**
 * Gets summary information about stream keys for the specified channel.
 */
export const listStreamKeys = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListStreamKeysRequest,
    output: ListStreamKeysResponse,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        pageSize: "maxResults",
    },
}));
/**
 * Gets summary information about live streams in your account, in the Amazon Web Services
 * region where the API request is processed.
 */
export const listStreams = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListStreamsRequest,
    output: ListStreamsResponse,
    errors: [AccessDeniedException, ValidationException],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        pageSize: "maxResults",
    },
}));
/**
 * Gets a summary of current and previous streams for a specified channel in your account, in
 * the AWS region where the API request is processed.
 */
export const listStreamSessions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListStreamSessionsRequest,
    output: ListStreamSessionsResponse,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        pageSize: "maxResults",
    },
}));
/**
 * Gets information about Amazon Web Services tags for the specified ARN.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Inserts metadata into the active stream of the specified channel. At most 5 requests per
 * second per channel are allowed, each with a maximum 1 KB payload. (If 5 TPS is not sufficient
 * for your needs, we recommend batching your data into a single PutMetadata call.) At most 155
 * requests per second per account are allowed. Also see Embedding Metadata within a Video Stream in
 * the *Amazon IVS User Guide*.
 */
export const putMetadata = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutMetadataRequest,
    output: PutMetadataResponse,
    errors: [
        AccessDeniedException,
        ChannelNotBroadcasting,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Starts the process of revoking the viewer session associated with a specified channel ARN
 * and viewer ID. Optionally, you can provide a version to revoke viewer sessions less than and
 * including that version. For instructions on associating a viewer ID with a viewer session, see
 * Setting Up
 * Private Channels.
 */
export const startViewerSessionRevocation = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartViewerSessionRevocationRequest,
    output: StartViewerSessionRevocationResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        PendingVerification,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Disconnects the incoming RTMPS stream for the specified channel. Can be used in
 * conjunction with DeleteStreamKey to prevent further streaming to a
 * channel.
 *
 * Many streaming client-software libraries automatically reconnect a dropped RTMPS
 * session, so to stop the stream permanently, you may want to first revoke the
 * `streamKey` attached to the channel.
 */
export const stopStream = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StopStreamRequest,
    output: StopStreamResponse,
    errors: [
        AccessDeniedException,
        ChannelNotBroadcasting,
        ResourceNotFoundException,
        StreamUnavailable,
        ValidationException,
    ],
}));
/**
 * Adds or updates tags for the Amazon Web Services resource with the specified ARN.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Removes tags from the resource with the specified ARN.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Updates a channel's configuration. Live channels cannot be updated. You must stop the
 * ongoing stream, update the channel, and restart the stream for the changes to take
 * effect.
 */
export const updateChannel = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateChannelRequest,
    output: UpdateChannelResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        PendingVerification,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Updates a specified playback restriction policy.
 */
export const updatePlaybackRestrictionPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdatePlaybackRestrictionPolicyRequest,
    output: UpdatePlaybackRestrictionPolicyResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        PendingVerification,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
//# sourceMappingURL=ivs.js.map