UNPKG

awscdk-construct-scte-scheduler

Version:

AWS CDK Construct for scheduling SCTE-35 events using the MediaLive schedule API

1,309 lines 318 kB
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core"; import { requestBuilder as rb } from "@smithy/core"; import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, parseRfc7231DateTime as __parseRfc7231DateTime, serializeFloat as __serializeFloat, strictParseLong as __strictParseLong, take, withBaseException, } from "@smithy/smithy-client"; import { v4 as generateIdempotencyToken } from "uuid"; import { MediaLiveServiceException as __BaseException } from "../models/MediaLiveServiceException"; import { BadGatewayException, BadRequestException, ConflictException, ForbiddenException, GatewayTimeoutException, InternalServerErrorException, NotFoundException, TooManyRequestsException, UnprocessableEntityException, } from "../models/models_1"; export const se_AcceptInputDeviceTransferCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDevices/{InputDeviceId}/accept"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_BatchDeleteCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/batch/delete"); let body; body = JSON.stringify(take(input, { channelIds: [, (_) => _json(_), `ChannelIds`], inputIds: [, (_) => _json(_), `InputIds`], inputSecurityGroupIds: [, (_) => _json(_), `InputSecurityGroupIds`], multiplexIds: [, (_) => _json(_), `MultiplexIds`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_BatchStartCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/batch/start"); let body; body = JSON.stringify(take(input, { channelIds: [, (_) => _json(_), `ChannelIds`], multiplexIds: [, (_) => _json(_), `MultiplexIds`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_BatchStopCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/batch/stop"); let body; body = JSON.stringify(take(input, { channelIds: [, (_) => _json(_), `ChannelIds`], multiplexIds: [, (_) => _json(_), `MultiplexIds`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_BatchUpdateScheduleCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/channels/{ChannelId}/schedule"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; body = JSON.stringify(take(input, { creates: [, (_) => se_BatchScheduleActionCreateRequest(_, context), `Creates`], deletes: [, (_) => se_BatchScheduleActionDeleteRequest(_, context), `Deletes`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_CancelInputDeviceTransferCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDevices/{InputDeviceId}/cancel"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_ClaimDeviceCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/claimDevice"); let body; body = JSON.stringify(take(input, { id: [, , `Id`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateChannelCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/channels"); let body; body = JSON.stringify(take(input, { cdiInputSpecification: [, (_) => se_CdiInputSpecification(_, context), `CdiInputSpecification`], channelClass: [, , `ChannelClass`], destinations: [, (_) => se___listOfOutputDestination(_, context), `Destinations`], encoderSettings: [, (_) => se_EncoderSettings(_, context), `EncoderSettings`], inputAttachments: [, (_) => se___listOfInputAttachment(_, context), `InputAttachments`], inputSpecification: [, (_) => se_InputSpecification(_, context), `InputSpecification`], logLevel: [, , `LogLevel`], maintenance: [, (_) => se_MaintenanceCreateSettings(_, context), `Maintenance`], name: [, , `Name`], requestId: [true, (_) => _ ?? generateIdempotencyToken(), `RequestId`], reserved: [, , `Reserved`], roleArn: [, , `RoleArn`], tags: [, (_) => _json(_), `Tags`], vpc: [, (_) => se_VpcOutputSettings(_, context), `Vpc`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateCloudWatchAlarmTemplateCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/cloudwatch-alarm-templates"); let body; body = JSON.stringify(take(input, { comparisonOperator: [, , `ComparisonOperator`], datapointsToAlarm: [, , `DatapointsToAlarm`], description: [, , `Description`], evaluationPeriods: [, , `EvaluationPeriods`], groupIdentifier: [, , `GroupIdentifier`], metricName: [, , `MetricName`], name: [, , `Name`], period: [, , `Period`], statistic: [, , `Statistic`], tags: [, (_) => _json(_), `Tags`], targetResourceType: [, , `TargetResourceType`], threshold: [, (_) => __serializeFloat(_), `Threshold`], treatMissingData: [, , `TreatMissingData`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateCloudWatchAlarmTemplateGroupCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/cloudwatch-alarm-template-groups"); let body; body = JSON.stringify(take(input, { description: [, , `Description`], name: [, , `Name`], tags: [, (_) => _json(_), `Tags`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateEventBridgeRuleTemplateCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/eventbridge-rule-templates"); let body; body = JSON.stringify(take(input, { description: [, , `Description`], eventTargets: [, (_) => se___listOfEventBridgeRuleTemplateTarget(_, context), `EventTargets`], eventType: [, , `EventType`], groupIdentifier: [, , `GroupIdentifier`], name: [, , `Name`], tags: [, (_) => _json(_), `Tags`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateEventBridgeRuleTemplateGroupCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/eventbridge-rule-template-groups"); let body; body = JSON.stringify(take(input, { description: [, , `Description`], name: [, , `Name`], tags: [, (_) => _json(_), `Tags`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateInputCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/inputs"); let body; body = JSON.stringify(take(input, { destinations: [, (_) => se___listOfInputDestinationRequest(_, context), `Destinations`], inputDevices: [, (_) => se___listOfInputDeviceSettings(_, context), `InputDevices`], inputSecurityGroups: [, (_) => _json(_), `InputSecurityGroups`], mediaConnectFlows: [, (_) => se___listOfMediaConnectFlowRequest(_, context), `MediaConnectFlows`], name: [, , `Name`], requestId: [true, (_) => _ ?? generateIdempotencyToken(), `RequestId`], roleArn: [, , `RoleArn`], sources: [, (_) => se___listOfInputSourceRequest(_, context), `Sources`], srtSettings: [, (_) => se_SrtSettingsRequest(_, context), `SrtSettings`], tags: [, (_) => _json(_), `Tags`], type: [, , `Type`], vpc: [, (_) => se_InputVpcRequest(_, context), `Vpc`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateInputSecurityGroupCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/inputSecurityGroups"); let body; body = JSON.stringify(take(input, { tags: [, (_) => _json(_), `Tags`], whitelistRules: [, (_) => se___listOfInputWhitelistRuleCidr(_, context), `WhitelistRules`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateMultiplexCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/multiplexes"); let body; body = JSON.stringify(take(input, { availabilityZones: [, (_) => _json(_), `AvailabilityZones`], multiplexSettings: [, (_) => se_MultiplexSettings(_, context), `MultiplexSettings`], name: [, , `Name`], requestId: [true, (_) => _ ?? generateIdempotencyToken(), `RequestId`], tags: [, (_) => _json(_), `Tags`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateMultiplexProgramCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/multiplexes/{MultiplexId}/programs"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); let body; body = JSON.stringify(take(input, { multiplexProgramSettings: [, (_) => se_MultiplexProgramSettings(_, context), `MultiplexProgramSettings`], programName: [, , `ProgramName`], requestId: [true, (_) => _ ?? generateIdempotencyToken(), `RequestId`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreatePartnerInputCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/inputs/{InputId}/partners"); b.p("InputId", () => input.InputId, "{InputId}", false); let body; body = JSON.stringify(take(input, { requestId: [true, (_) => _ ?? generateIdempotencyToken(), `RequestId`], tags: [, (_) => _json(_), `Tags`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateSignalMapCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/signal-maps"); let body; body = JSON.stringify(take(input, { cloudWatchAlarmTemplateGroupIdentifiers: [, (_) => _json(_), `CloudWatchAlarmTemplateGroupIdentifiers`], description: [, , `Description`], discoveryEntryPointArn: [, , `DiscoveryEntryPointArn`], eventBridgeRuleTemplateGroupIdentifiers: [, (_) => _json(_), `EventBridgeRuleTemplateGroupIdentifiers`], name: [, , `Name`], tags: [, (_) => _json(_), `Tags`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateTagsCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/tags/{ResourceArn}"); b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false); let body; body = JSON.stringify(take(input, { tags: [, (_) => _json(_), `Tags`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_DeleteChannelCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/channels/{ChannelId}"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteCloudWatchAlarmTemplateCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/cloudwatch-alarm-templates/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteCloudWatchAlarmTemplateGroupCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/cloudwatch-alarm-template-groups/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteEventBridgeRuleTemplateCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/eventbridge-rule-templates/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteEventBridgeRuleTemplateGroupCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/eventbridge-rule-template-groups/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteInputCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputs/{InputId}"); b.p("InputId", () => input.InputId, "{InputId}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteInputSecurityGroupCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputSecurityGroups/{InputSecurityGroupId}"); b.p("InputSecurityGroupId", () => input.InputSecurityGroupId, "{InputSecurityGroupId}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteMultiplexCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/multiplexes/{MultiplexId}"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteMultiplexProgramCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/multiplexes/{MultiplexId}/programs/{ProgramName}"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); b.p("ProgramName", () => input.ProgramName, "{ProgramName}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteReservationCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/reservations/{ReservationId}"); b.p("ReservationId", () => input.ReservationId, "{ReservationId}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteScheduleCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/channels/{ChannelId}/schedule"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteSignalMapCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/signal-maps/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteTagsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/tags/{ResourceArn}"); b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false); const query = map({ [_tK]: [ __expectNonNull(input.TagKeys, `TagKeys`) != null, () => (input[_TK] || []).map((_entry) => _entry), ], }); let body; b.m("DELETE").h(headers).q(query).b(body); return b.build(); }; export const se_DescribeAccountConfigurationCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/accountConfiguration"); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeChannelCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/channels/{ChannelId}"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeInputCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputs/{InputId}"); b.p("InputId", () => input.InputId, "{InputId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeInputDeviceCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDevices/{InputDeviceId}"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeInputDeviceThumbnailCommand = async (input, context) => { const b = rb(input, context); const headers = map({}, isSerializableHeaderValue, { [_a]: input[_A], }); b.bp("/prod/inputDevices/{InputDeviceId}/thumbnailData"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeInputSecurityGroupCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputSecurityGroups/{InputSecurityGroupId}"); b.p("InputSecurityGroupId", () => input.InputSecurityGroupId, "{InputSecurityGroupId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeMultiplexCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/multiplexes/{MultiplexId}"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeMultiplexProgramCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/multiplexes/{MultiplexId}/programs/{ProgramName}"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); b.p("ProgramName", () => input.ProgramName, "{ProgramName}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeOfferingCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/offerings/{OfferingId}"); b.p("OfferingId", () => input.OfferingId, "{OfferingId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeReservationCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/reservations/{ReservationId}"); b.p("ReservationId", () => input.ReservationId, "{ReservationId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_DescribeScheduleCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/channels/{ChannelId}/schedule"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_DescribeThumbnailsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/channels/{ChannelId}/thumbnails"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); const query = map({ [_pI]: [, __expectNonNull(input[_PI], `PipelineId`)], [_tT]: [, __expectNonNull(input[_TT], `ThumbnailType`)], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_GetCloudWatchAlarmTemplateCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/cloudwatch-alarm-templates/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetCloudWatchAlarmTemplateGroupCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/cloudwatch-alarm-template-groups/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetEventBridgeRuleTemplateCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/eventbridge-rule-templates/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetEventBridgeRuleTemplateGroupCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/eventbridge-rule-template-groups/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetSignalMapCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/signal-maps/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_ListChannelsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/channels"); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListCloudWatchAlarmTemplateGroupsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/cloudwatch-alarm-template-groups"); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], [_s]: [, input[_S]], [_sMI]: [, input[_SMI]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListCloudWatchAlarmTemplatesCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/cloudwatch-alarm-templates"); const query = map({ [_gI]: [, input[_GI]], [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], [_s]: [, input[_S]], [_sMI]: [, input[_SMI]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListEventBridgeRuleTemplateGroupsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/eventbridge-rule-template-groups"); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], [_sMI]: [, input[_SMI]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListEventBridgeRuleTemplatesCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/eventbridge-rule-templates"); const query = map({ [_gI]: [, input[_GI]], [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], [_sMI]: [, input[_SMI]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListInputDevicesCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDevices"); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListInputDeviceTransfersCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDeviceTransfers"); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], [_tTr]: [, __expectNonNull(input[_TTr], `TransferType`)], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListInputsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputs"); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListInputSecurityGroupsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputSecurityGroups"); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListMultiplexesCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/multiplexes"); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListMultiplexProgramsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/multiplexes/{MultiplexId}/programs"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); const query = map({ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListOfferingsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/offerings"); const query = map({ [_cC]: [, input[_CC]], [_cCh]: [, input[_CCh]], [_c]: [, input[_C]], [_d]: [, input[_D]], [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_mB]: [, input[_MB]], [_mF]: [, input[_MF]], [_nT]: [, input[_NT]], [_r]: [, input[_R]], [_rT]: [, input[_RT]], [_sF]: [, input[_SF]], [_vQ]: [, input[_VQ]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListReservationsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/reservations"); const query = map({ [_cC]: [, input[_CC]], [_c]: [, input[_C]], [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_mB]: [, input[_MB]], [_mF]: [, input[_MF]], [_nT]: [, input[_NT]], [_r]: [, input[_R]], [_rT]: [, input[_RT]], [_sF]: [, input[_SF]], [_vQ]: [, input[_VQ]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListSignalMapsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/signal-maps"); const query = map({ [_cWATGI]: [, input[_CWATGI]], [_eBRTGI]: [, input[_EBRTGI]], [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], [_nT]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListTagsForResourceCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/tags/{ResourceArn}"); b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_PurchaseOfferingCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/offerings/{OfferingId}/purchase"); b.p("OfferingId", () => input.OfferingId, "{OfferingId}", false); let body; body = JSON.stringify(take(input, { count: [, , `Count`], name: [, , `Name`], renewalSettings: [, (_) => se_RenewalSettings(_, context), `RenewalSettings`], requestId: [true, (_) => _ ?? generateIdempotencyToken(), `RequestId`], start: [, , `Start`], tags: [, (_) => _json(_), `Tags`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_RebootInputDeviceCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/inputDevices/{InputDeviceId}/reboot"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; body = JSON.stringify(take(input, { force: [, , `Force`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_RejectInputDeviceTransferCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDevices/{InputDeviceId}/reject"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_RestartChannelPipelinesCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/channels/{ChannelId}/restartChannelPipelines"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; body = JSON.stringify(take(input, { pipelineIds: [, (_) => _json(_), `PipelineIds`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_StartChannelCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/channels/{ChannelId}/start"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_StartDeleteMonitorDeploymentCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/signal-maps/{Identifier}/monitor-deployment"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_StartInputDeviceCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDevices/{InputDeviceId}/start"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_StartInputDeviceMaintenanceWindowCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDevices/{InputDeviceId}/startInputDeviceMaintenanceWindow"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_StartMonitorDeploymentCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/signal-maps/{Identifier}/monitor-deployment"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; body = JSON.stringify(take(input, { dryRun: [, , `DryRun`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_StartMultiplexCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/multiplexes/{MultiplexId}/start"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_StartUpdateSignalMapCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/signal-maps/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; body = JSON.stringify(take(input, { cloudWatchAlarmTemplateGroupIdentifiers: [, (_) => _json(_), `CloudWatchAlarmTemplateGroupIdentifiers`], description: [, , `Description`], discoveryEntryPointArn: [, , `DiscoveryEntryPointArn`], eventBridgeRuleTemplateGroupIdentifiers: [, (_) => _json(_), `EventBridgeRuleTemplateGroupIdentifiers`], forceRediscovery: [, , `ForceRediscovery`], name: [, , `Name`], })); b.m("PATCH").h(headers).b(body); return b.build(); }; export const se_StopChannelCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/channels/{ChannelId}/stop"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_StopInputDeviceCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/inputDevices/{InputDeviceId}/stop"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_StopMultiplexCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/prod/multiplexes/{MultiplexId}/stop"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_TransferInputDeviceCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/inputDevices/{InputDeviceId}/transfer"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; body = JSON.stringify(take(input, { targetCustomerId: [, , `TargetCustomerId`], targetRegion: [, , `TargetRegion`], transferMessage: [, , `TransferMessage`], })); b.m("POST").h(headers).b(body); return b.build(); }; export const se_UpdateAccountConfigurationCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/accountConfiguration"); let body; body = JSON.stringify(take(input, { accountConfiguration: [, (_) => se_AccountConfiguration(_, context), `AccountConfiguration`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_UpdateChannelCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/channels/{ChannelId}"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; body = JSON.stringify(take(input, { cdiInputSpecification: [, (_) => se_CdiInputSpecification(_, context), `CdiInputSpecification`], destinations: [, (_) => se___listOfOutputDestination(_, context), `Destinations`], encoderSettings: [, (_) => se_EncoderSettings(_, context), `EncoderSettings`], inputAttachments: [, (_) => se___listOfInputAttachment(_, context), `InputAttachments`], inputSpecification: [, (_) => se_InputSpecification(_, context), `InputSpecification`], logLevel: [, , `LogLevel`], maintenance: [, (_) => se_MaintenanceUpdateSettings(_, context), `Maintenance`], name: [, , `Name`], roleArn: [, , `RoleArn`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_UpdateChannelClassCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/channels/{ChannelId}/channelClass"); b.p("ChannelId", () => input.ChannelId, "{ChannelId}", false); let body; body = JSON.stringify(take(input, { channelClass: [, , `ChannelClass`], destinations: [, (_) => se___listOfOutputDestination(_, context), `Destinations`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_UpdateCloudWatchAlarmTemplateCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/cloudwatch-alarm-templates/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; body = JSON.stringify(take(input, { comparisonOperator: [, , `ComparisonOperator`], datapointsToAlarm: [, , `DatapointsToAlarm`], description: [, , `Description`], evaluationPeriods: [, , `EvaluationPeriods`], groupIdentifier: [, , `GroupIdentifier`], metricName: [, , `MetricName`], name: [, , `Name`], period: [, , `Period`], statistic: [, , `Statistic`], targetResourceType: [, , `TargetResourceType`], threshold: [, (_) => __serializeFloat(_), `Threshold`], treatMissingData: [, , `TreatMissingData`], })); b.m("PATCH").h(headers).b(body); return b.build(); }; export const se_UpdateCloudWatchAlarmTemplateGroupCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/cloudwatch-alarm-template-groups/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; body = JSON.stringify(take(input, { description: [, , `Description`], })); b.m("PATCH").h(headers).b(body); return b.build(); }; export const se_UpdateEventBridgeRuleTemplateCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/eventbridge-rule-templates/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; body = JSON.stringify(take(input, { description: [, , `Description`], eventTargets: [, (_) => se___listOfEventBridgeRuleTemplateTarget(_, context), `EventTargets`], eventType: [, , `EventType`], groupIdentifier: [, , `GroupIdentifier`], name: [, , `Name`], })); b.m("PATCH").h(headers).b(body); return b.build(); }; export const se_UpdateEventBridgeRuleTemplateGroupCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/eventbridge-rule-template-groups/{Identifier}"); b.p("Identifier", () => input.Identifier, "{Identifier}", false); let body; body = JSON.stringify(take(input, { description: [, , `Description`], })); b.m("PATCH").h(headers).b(body); return b.build(); }; export const se_UpdateInputCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/inputs/{InputId}"); b.p("InputId", () => input.InputId, "{InputId}", false); let body; body = JSON.stringify(take(input, { destinations: [, (_) => se___listOfInputDestinationRequest(_, context), `Destinations`], inputDevices: [, (_) => se___listOfInputDeviceRequest(_, context), `InputDevices`], inputSecurityGroups: [, (_) => _json(_), `InputSecurityGroups`], mediaConnectFlows: [, (_) => se___listOfMediaConnectFlowRequest(_, context), `MediaConnectFlows`], name: [, , `Name`], roleArn: [, , `RoleArn`], sources: [, (_) => se___listOfInputSourceRequest(_, context), `Sources`], srtSettings: [, (_) => se_SrtSettingsRequest(_, context), `SrtSettings`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_UpdateInputDeviceCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/inputDevices/{InputDeviceId}"); b.p("InputDeviceId", () => input.InputDeviceId, "{InputDeviceId}", false); let body; body = JSON.stringify(take(input, { availabilityZone: [, , `AvailabilityZone`], hdDeviceSettings: [, (_) => se_InputDeviceConfigurableSettings(_, context), `HdDeviceSettings`], name: [, , `Name`], uhdDeviceSettings: [, (_) => se_InputDeviceConfigurableSettings(_, context), `UhdDeviceSettings`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_UpdateInputSecurityGroupCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/inputSecurityGroups/{InputSecurityGroupId}"); b.p("InputSecurityGroupId", () => input.InputSecurityGroupId, "{InputSecurityGroupId}", false); let body; body = JSON.stringify(take(input, { tags: [, (_) => _json(_), `Tags`], whitelistRules: [, (_) => se___listOfInputWhitelistRuleCidr(_, context), `WhitelistRules`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_UpdateMultiplexCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/multiplexes/{MultiplexId}"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); let body; body = JSON.stringify(take(input, { multiplexSettings: [, (_) => se_MultiplexSettings(_, context), `MultiplexSettings`], name: [, , `Name`], packetIdentifiersMapping: [, (_) => se_MultiplexPacketIdentifiersMapping(_, context), `PacketIdentifiersMapping`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_UpdateMultiplexProgramCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/multiplexes/{MultiplexId}/programs/{ProgramName}"); b.p("MultiplexId", () => input.MultiplexId, "{MultiplexId}", false); b.p("ProgramName", () => input.ProgramName, "{ProgramName}", false); let body; body = JSON.stringify(take(input, { multiplexProgramSettings: [, (_) => se_MultiplexProgramSettings(_, context), `MultiplexProgramSettings`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const se_UpdateReservationCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/json", }; b.bp("/prod/reservations/{ReservationId}"); b.p("ReservationId", () => input.ReservationId, "{ReservationId}", false); let body; body = JSON.stringify(take(input, { name: [, , `Name`], renewalSettings: [, (_) => se_RenewalSettings(_, context), `RenewalSettings`], })); b.m("PUT").h(headers).b(body); return b.build(); }; export const de_AcceptInputDeviceTransferCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_BatchDeleteCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { Failed: [, (_) => de___listOfBatchFailedResultModel(_, context), `failed`], Successful: [, (_) => de___listOfBatchSuccessfulResultModel(_, context), `successful`], }); Object.assign(contents, doc); return contents; }; export const de_BatchStartCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { Failed: [, (_) => de___listOfBatchFailedResultModel(_, context), `failed`], Successful: [, (_) => de___listOfBatchSuccessfulResultModel(_, context), `successful`], }); Object.assign(contents, doc); return contents; }; export const de_BatchStopCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { Failed: [, (_) => de___listOfBatchFailedResultModel(_, context), `failed`], Successful: [, (_) => de___listOfBatchSuccessfulResultModel(_, context), `successful`], }); Object.assign(contents, doc); return contents; }; export const de_BatchUpdateScheduleCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { Creates: [, (_) => de_BatchScheduleActionCreateResult(_, context), `creates`], Deletes: [, (_) => de_BatchScheduleActionDeleteResult(_, context), `deletes`], }); Object.assign(contents, doc); return contents; }; export const de_CancelInputDeviceTransferCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_ClaimDeviceCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_CreateChannelCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { Channel: [, (_) => de_Channel(_, context), `channel`], }); Object.assign(contents, doc); return contents; }; export const de_CreateCloudWatchAlarmTem