import * as HttpClient from "effect/unstable/http/HttpClient";
import * as S from "effect/Schema";
import * as stream from "effect/Stream";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import * as C from "../category.js";
const svc = T.AwsApiService({
    sdkId: "MediaPackage Vod",
    serviceShapeName: "MediaPackageVod",
});
const auth = T.AwsAuthSigv4({ name: "mediapackage-vod" });
const ver = T.ServiceVersion("2018-11-07");
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://mediapackage-vod-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://mediapackage-vod-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://mediapackage-vod.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://mediapackage-vod.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const EgressAccessLogs = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ LogGroupName: S.optional(S.String) }).pipe(S.encodeKeys({ LogGroupName: "logGroupName" }))).annotate({
    identifier: "EgressAccessLogs",
});
export const ConfigureLogsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    EgressAccessLogs: S.optional(EgressAccessLogs),
    Id: S.String.pipe(T.HttpLabel("Id")),
})
    .pipe(S.encodeKeys({ EgressAccessLogs: "egressAccessLogs" }))
    .pipe(T.all(T.Http({ method: "PUT", uri: "/packaging_groups/{Id}/configure_logs" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ConfigureLogsRequest",
});
export const Authorization = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    CdnIdentifierSecret: S.optional(S.String),
    SecretsRoleArn: S.optional(S.String),
}).pipe(S.encodeKeys({
    CdnIdentifierSecret: "cdnIdentifierSecret",
    SecretsRoleArn: "secretsRoleArn",
}))).annotate({ identifier: "Authorization" });
export const Tags = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const ConfigureLogsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    Authorization: S.optional(Authorization),
    CreatedAt: S.optional(S.String),
    DomainName: S.optional(S.String),
    EgressAccessLogs: S.optional(EgressAccessLogs),
    Id: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    Arn: "arn",
    Authorization: "authorization",
    CreatedAt: "createdAt",
    DomainName: "domainName",
    EgressAccessLogs: "egressAccessLogs",
    Id: "id",
    Tags: "tags",
}))).annotate({
    identifier: "ConfigureLogsResponse",
});
export const CreateAssetRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Id: S.optional(S.String),
    PackagingGroupId: S.optional(S.String),
    ResourceId: S.optional(S.String),
    SourceArn: S.optional(S.String),
    SourceRoleArn: S.optional(S.String),
    Tags: S.optional(Tags),
})
    .pipe(S.encodeKeys({
    Id: "id",
    PackagingGroupId: "packagingGroupId",
    ResourceId: "resourceId",
    SourceArn: "sourceArn",
    SourceRoleArn: "sourceRoleArn",
    Tags: "tags",
}))
    .pipe(T.all(T.Http({ method: "POST", uri: "/assets" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateAssetRequest",
});
export const EgressEndpoint = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    PackagingConfigurationId: S.optional(S.String),
    Status: S.optional(S.String),
    Url: S.optional(S.String),
}).pipe(S.encodeKeys({
    PackagingConfigurationId: "packagingConfigurationId",
    Status: "status",
    Url: "url",
}))).annotate({ identifier: "EgressEndpoint" });
export const __listOfEgressEndpoint = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(EgressEndpoint);
export const CreateAssetResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    CreatedAt: S.optional(S.String),
    EgressEndpoints: S.optional(__listOfEgressEndpoint),
    Id: S.optional(S.String),
    PackagingGroupId: S.optional(S.String),
    ResourceId: S.optional(S.String),
    SourceArn: S.optional(S.String),
    SourceRoleArn: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    Arn: "arn",
    CreatedAt: "createdAt",
    EgressEndpoints: "egressEndpoints",
    Id: "id",
    PackagingGroupId: "packagingGroupId",
    ResourceId: "resourceId",
    SourceArn: "sourceArn",
    SourceRoleArn: "sourceRoleArn",
    Tags: "tags",
}))).annotate({
    identifier: "CreateAssetResponse",
});
export const PresetSpeke20Audio = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PresetSpeke20Video = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const EncryptionContractConfiguration = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    PresetSpeke20Audio: S.optional(PresetSpeke20Audio),
    PresetSpeke20Video: S.optional(PresetSpeke20Video),
}).pipe(S.encodeKeys({
    PresetSpeke20Audio: "presetSpeke20Audio",
    PresetSpeke20Video: "presetSpeke20Video",
}))).annotate({
    identifier: "EncryptionContractConfiguration",
});
export const __listOf__string = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const SpekeKeyProvider = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    EncryptionContractConfiguration: S.optional(EncryptionContractConfiguration),
    RoleArn: S.optional(S.String),
    SystemIds: S.optional(__listOf__string),
    Url: S.optional(S.String),
}).pipe(S.encodeKeys({
    EncryptionContractConfiguration: "encryptionContractConfiguration",
    RoleArn: "roleArn",
    SystemIds: "systemIds",
    Url: "url",
}))).annotate({
    identifier: "SpekeKeyProvider",
});
export const CmafEncryption = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ConstantInitializationVector: S.optional(S.String),
    SpekeKeyProvider: S.optional(SpekeKeyProvider),
}).pipe(S.encodeKeys({
    ConstantInitializationVector: "constantInitializationVector",
    SpekeKeyProvider: "spekeKeyProvider",
}))).annotate({ identifier: "CmafEncryption" });
export const AdMarkers = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const StreamOrder = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const StreamSelection = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxVideoBitsPerSecond: S.optional(S.Number),
    MinVideoBitsPerSecond: S.optional(S.Number),
    StreamOrder: S.optional(StreamOrder),
}).pipe(S.encodeKeys({
    MaxVideoBitsPerSecond: "maxVideoBitsPerSecond",
    MinVideoBitsPerSecond: "minVideoBitsPerSecond",
    StreamOrder: "streamOrder",
}))).annotate({
    identifier: "StreamSelection",
});
export const HlsManifest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AdMarkers: S.optional(AdMarkers),
    IncludeIframeOnlyStream: S.optional(S.Boolean),
    ManifestName: S.optional(S.String),
    ProgramDateTimeIntervalSeconds: S.optional(S.Number),
    RepeatExtXKey: S.optional(S.Boolean),
    StreamSelection: S.optional(StreamSelection),
}).pipe(S.encodeKeys({
    AdMarkers: "adMarkers",
    IncludeIframeOnlyStream: "includeIframeOnlyStream",
    ManifestName: "manifestName",
    ProgramDateTimeIntervalSeconds: "programDateTimeIntervalSeconds",
    RepeatExtXKey: "repeatExtXKey",
    StreamSelection: "streamSelection",
}))).annotate({ identifier: "HlsManifest" });
export const __listOfHlsManifest = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(HlsManifest);
export const CmafPackage = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Encryption: S.optional(CmafEncryption),
    HlsManifests: S.optional(__listOfHlsManifest),
    IncludeEncoderConfigurationInSegments: S.optional(S.Boolean),
    SegmentDurationSeconds: S.optional(S.Number),
}).pipe(S.encodeKeys({
    Encryption: "encryption",
    HlsManifests: "hlsManifests",
    IncludeEncoderConfigurationInSegments: "includeEncoderConfigurationInSegments",
    SegmentDurationSeconds: "segmentDurationSeconds",
}))).annotate({ identifier: "CmafPackage" });
export const ManifestLayout = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Profile = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ScteMarkersSource = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DashManifest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ManifestLayout: S.optional(ManifestLayout),
    ManifestName: S.optional(S.String),
    MinBufferTimeSeconds: S.optional(S.Number),
    Profile: S.optional(Profile),
    ScteMarkersSource: S.optional(ScteMarkersSource),
    StreamSelection: S.optional(StreamSelection),
}).pipe(S.encodeKeys({
    ManifestLayout: "manifestLayout",
    ManifestName: "manifestName",
    MinBufferTimeSeconds: "minBufferTimeSeconds",
    Profile: "profile",
    ScteMarkersSource: "scteMarkersSource",
    StreamSelection: "streamSelection",
}))).annotate({ identifier: "DashManifest" });
export const __listOfDashManifest = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(DashManifest);
export const DashEncryption = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SpekeKeyProvider: S.optional(SpekeKeyProvider) }).pipe(S.encodeKeys({ SpekeKeyProvider: "spekeKeyProvider" }))).annotate({ identifier: "DashEncryption" });
export const __PeriodTriggersElement = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const __listOf__PeriodTriggersElement = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(__PeriodTriggersElement);
export const SegmentTemplateFormat = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DashPackage = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DashManifests: S.optional(__listOfDashManifest),
    Encryption: S.optional(DashEncryption),
    IncludeEncoderConfigurationInSegments: S.optional(S.Boolean),
    IncludeIframeOnlyStream: S.optional(S.Boolean),
    PeriodTriggers: S.optional(__listOf__PeriodTriggersElement),
    SegmentDurationSeconds: S.optional(S.Number),
    SegmentTemplateFormat: S.optional(SegmentTemplateFormat),
}).pipe(S.encodeKeys({
    DashManifests: "dashManifests",
    Encryption: "encryption",
    IncludeEncoderConfigurationInSegments: "includeEncoderConfigurationInSegments",
    IncludeIframeOnlyStream: "includeIframeOnlyStream",
    PeriodTriggers: "periodTriggers",
    SegmentDurationSeconds: "segmentDurationSeconds",
    SegmentTemplateFormat: "segmentTemplateFormat",
}))).annotate({ identifier: "DashPackage" });
export const EncryptionMethod = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const HlsEncryption = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ConstantInitializationVector: S.optional(S.String),
    EncryptionMethod: S.optional(EncryptionMethod),
    SpekeKeyProvider: S.optional(SpekeKeyProvider),
}).pipe(S.encodeKeys({
    ConstantInitializationVector: "constantInitializationVector",
    EncryptionMethod: "encryptionMethod",
    SpekeKeyProvider: "spekeKeyProvider",
}))).annotate({ identifier: "HlsEncryption" });
export const HlsPackage = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Encryption: S.optional(HlsEncryption),
    HlsManifests: S.optional(__listOfHlsManifest),
    IncludeDvbSubtitles: S.optional(S.Boolean),
    SegmentDurationSeconds: S.optional(S.Number),
    UseAudioRenditionGroup: S.optional(S.Boolean),
}).pipe(S.encodeKeys({
    Encryption: "encryption",
    HlsManifests: "hlsManifests",
    IncludeDvbSubtitles: "includeDvbSubtitles",
    SegmentDurationSeconds: "segmentDurationSeconds",
    UseAudioRenditionGroup: "useAudioRenditionGroup",
}))).annotate({ identifier: "HlsPackage" });
export const MssEncryption = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SpekeKeyProvider: S.optional(SpekeKeyProvider) }).pipe(S.encodeKeys({ SpekeKeyProvider: "spekeKeyProvider" }))).annotate({ identifier: "MssEncryption" });
export const MssManifest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ManifestName: S.optional(S.String),
    StreamSelection: S.optional(StreamSelection),
}).pipe(S.encodeKeys({
    ManifestName: "manifestName",
    StreamSelection: "streamSelection",
}))).annotate({ identifier: "MssManifest" });
export const __listOfMssManifest = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(MssManifest);
export const MssPackage = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Encryption: S.optional(MssEncryption),
    MssManifests: S.optional(__listOfMssManifest),
    SegmentDurationSeconds: S.optional(S.Number),
}).pipe(S.encodeKeys({
    Encryption: "encryption",
    MssManifests: "mssManifests",
    SegmentDurationSeconds: "segmentDurationSeconds",
}))).annotate({ identifier: "MssPackage" });
export const CreatePackagingConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    CmafPackage: S.optional(CmafPackage),
    DashPackage: S.optional(DashPackage),
    HlsPackage: S.optional(HlsPackage),
    Id: S.optional(S.String),
    MssPackage: S.optional(MssPackage),
    PackagingGroupId: S.optional(S.String),
    Tags: S.optional(Tags),
})
    .pipe(S.encodeKeys({
    CmafPackage: "cmafPackage",
    DashPackage: "dashPackage",
    HlsPackage: "hlsPackage",
    Id: "id",
    MssPackage: "mssPackage",
    PackagingGroupId: "packagingGroupId",
    Tags: "tags",
}))
    .pipe(T.all(T.Http({ method: "POST", uri: "/packaging_configurations" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreatePackagingConfigurationRequest",
});
export const CreatePackagingConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    CmafPackage: S.optional(CmafPackage),
    CreatedAt: S.optional(S.String),
    DashPackage: S.optional(DashPackage),
    HlsPackage: S.optional(HlsPackage),
    Id: S.optional(S.String),
    MssPackage: S.optional(MssPackage),
    PackagingGroupId: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    Arn: "arn",
    CmafPackage: "cmafPackage",
    CreatedAt: "createdAt",
    DashPackage: "dashPackage",
    HlsPackage: "hlsPackage",
    Id: "id",
    MssPackage: "mssPackage",
    PackagingGroupId: "packagingGroupId",
    Tags: "tags",
}))).annotate({
    identifier: "CreatePackagingConfigurationResponse",
});
export const CreatePackagingGroupRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Authorization: S.optional(Authorization),
    EgressAccessLogs: S.optional(EgressAccessLogs),
    Id: S.optional(S.String),
    Tags: S.optional(Tags),
})
    .pipe(S.encodeKeys({
    Authorization: "authorization",
    EgressAccessLogs: "egressAccessLogs",
    Id: "id",
    Tags: "tags",
}))
    .pipe(T.all(T.Http({ method: "POST", uri: "/packaging_groups" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreatePackagingGroupRequest",
});
export const CreatePackagingGroupResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    Authorization: S.optional(Authorization),
    CreatedAt: S.optional(S.String),
    DomainName: S.optional(S.String),
    EgressAccessLogs: S.optional(EgressAccessLogs),
    Id: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    Arn: "arn",
    Authorization: "authorization",
    CreatedAt: "createdAt",
    DomainName: "domainName",
    EgressAccessLogs: "egressAccessLogs",
    Id: "id",
    Tags: "tags",
}))).annotate({
    identifier: "CreatePackagingGroupResponse",
});
export const DeleteAssetRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Id: S.String.pipe(T.HttpLabel("Id")) }).pipe(T.all(T.Http({ method: "DELETE", uri: "/assets/{Id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteAssetRequest",
});
export const DeleteAssetResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteAssetResponse",
});
export const DeletePackagingConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Id: S.String.pipe(T.HttpLabel("Id")) }).pipe(T.all(T.Http({ method: "DELETE", uri: "/packaging_configurations/{Id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeletePackagingConfigurationRequest",
});
export const DeletePackagingConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeletePackagingConfigurationResponse",
});
export const DeletePackagingGroupRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Id: S.String.pipe(T.HttpLabel("Id")) }).pipe(T.all(T.Http({ method: "DELETE", uri: "/packaging_groups/{Id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeletePackagingGroupRequest",
});
export const DeletePackagingGroupResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeletePackagingGroupResponse",
});
export const DescribeAssetRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Id: S.String.pipe(T.HttpLabel("Id")) }).pipe(T.all(T.Http({ method: "GET", uri: "/assets/{Id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeAssetRequest",
});
export const DescribeAssetResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    CreatedAt: S.optional(S.String),
    EgressEndpoints: S.optional(__listOfEgressEndpoint),
    Id: S.optional(S.String),
    PackagingGroupId: S.optional(S.String),
    ResourceId: S.optional(S.String),
    SourceArn: S.optional(S.String),
    SourceRoleArn: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    Arn: "arn",
    CreatedAt: "createdAt",
    EgressEndpoints: "egressEndpoints",
    Id: "id",
    PackagingGroupId: "packagingGroupId",
    ResourceId: "resourceId",
    SourceArn: "sourceArn",
    SourceRoleArn: "sourceRoleArn",
    Tags: "tags",
}))).annotate({
    identifier: "DescribeAssetResponse",
});
export const DescribePackagingConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Id: S.String.pipe(T.HttpLabel("Id")) }).pipe(T.all(T.Http({ method: "GET", uri: "/packaging_configurations/{Id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribePackagingConfigurationRequest",
});
export const DescribePackagingConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    CmafPackage: S.optional(CmafPackage),
    CreatedAt: S.optional(S.String),
    DashPackage: S.optional(DashPackage),
    HlsPackage: S.optional(HlsPackage),
    Id: S.optional(S.String),
    MssPackage: S.optional(MssPackage),
    PackagingGroupId: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    Arn: "arn",
    CmafPackage: "cmafPackage",
    CreatedAt: "createdAt",
    DashPackage: "dashPackage",
    HlsPackage: "hlsPackage",
    Id: "id",
    MssPackage: "mssPackage",
    PackagingGroupId: "packagingGroupId",
    Tags: "tags",
}))).annotate({
    identifier: "DescribePackagingConfigurationResponse",
});
export const DescribePackagingGroupRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Id: S.String.pipe(T.HttpLabel("Id")) }).pipe(T.all(T.Http({ method: "GET", uri: "/packaging_groups/{Id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribePackagingGroupRequest",
});
export const DescribePackagingGroupResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ApproximateAssetCount: S.optional(S.Number),
    Arn: S.optional(S.String),
    Authorization: S.optional(Authorization),
    CreatedAt: S.optional(S.String),
    DomainName: S.optional(S.String),
    EgressAccessLogs: S.optional(EgressAccessLogs),
    Id: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    ApproximateAssetCount: "approximateAssetCount",
    Arn: "arn",
    Authorization: "authorization",
    CreatedAt: "createdAt",
    DomainName: "domainName",
    EgressAccessLogs: "egressAccessLogs",
    Id: "id",
    Tags: "tags",
}))).annotate({
    identifier: "DescribePackagingGroupResponse",
});
export const ListAssetsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
    NextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
    PackagingGroupId: S.optional(S.String).pipe(T.HttpQuery("packagingGroupId")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/assets" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListAssetsRequest",
});
export const AssetShallow = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    CreatedAt: S.optional(S.String),
    Id: S.optional(S.String),
    PackagingGroupId: S.optional(S.String),
    ResourceId: S.optional(S.String),
    SourceArn: S.optional(S.String),
    SourceRoleArn: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    Arn: "arn",
    CreatedAt: "createdAt",
    Id: "id",
    PackagingGroupId: "packagingGroupId",
    ResourceId: "resourceId",
    SourceArn: "sourceArn",
    SourceRoleArn: "sourceRoleArn",
    Tags: "tags",
}))).annotate({ identifier: "AssetShallow" });
export const __listOfAssetShallow = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(AssetShallow);
export const ListAssetsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Assets: S.optional(__listOfAssetShallow),
    NextToken: S.optional(S.String),
}).pipe(S.encodeKeys({ Assets: "assets", NextToken: "nextToken" }))).annotate({
    identifier: "ListAssetsResponse",
});
export const ListPackagingConfigurationsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
    NextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
    PackagingGroupId: S.optional(S.String).pipe(T.HttpQuery("packagingGroupId")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/packaging_configurations" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListPackagingConfigurationsRequest",
});
export const PackagingConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    CmafPackage: S.optional(CmafPackage),
    CreatedAt: S.optional(S.String),
    DashPackage: S.optional(DashPackage),
    HlsPackage: S.optional(HlsPackage),
    Id: S.optional(S.String),
    MssPackage: S.optional(MssPackage),
    PackagingGroupId: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    Arn: "arn",
    CmafPackage: "cmafPackage",
    CreatedAt: "createdAt",
    DashPackage: "dashPackage",
    HlsPackage: "hlsPackage",
    Id: "id",
    MssPackage: "mssPackage",
    PackagingGroupId: "packagingGroupId",
    Tags: "tags",
}))).annotate({
    identifier: "PackagingConfiguration",
});
export const __listOfPackagingConfiguration = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(PackagingConfiguration);
export const ListPackagingConfigurationsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    PackagingConfigurations: S.optional(__listOfPackagingConfiguration),
}).pipe(S.encodeKeys({
    NextToken: "nextToken",
    PackagingConfigurations: "packagingConfigurations",
}))).annotate({
    identifier: "ListPackagingConfigurationsResponse",
});
export const ListPackagingGroupsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
    NextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/packaging_groups" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListPackagingGroupsRequest",
});
export const PackagingGroup = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ApproximateAssetCount: S.optional(S.Number),
    Arn: S.optional(S.String),
    Authorization: S.optional(Authorization),
    CreatedAt: S.optional(S.String),
    DomainName: S.optional(S.String),
    EgressAccessLogs: S.optional(EgressAccessLogs),
    Id: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    ApproximateAssetCount: "approximateAssetCount",
    Arn: "arn",
    Authorization: "authorization",
    CreatedAt: "createdAt",
    DomainName: "domainName",
    EgressAccessLogs: "egressAccessLogs",
    Id: "id",
    Tags: "tags",
}))).annotate({ identifier: "PackagingGroup" });
export const __listOfPackagingGroup = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(PackagingGroup);
export const ListPackagingGroupsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    PackagingGroups: S.optional(__listOfPackagingGroup),
}).pipe(S.encodeKeys({
    NextToken: "nextToken",
    PackagingGroups: "packagingGroups",
}))).annotate({
    identifier: "ListPackagingGroupsResponse",
});
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 __mapOf__string = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const ListTagsForResourceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Tags: S.optional(__mapOf__string) }).pipe(S.encodeKeys({ Tags: "tags" }))).annotate({
    identifier: "ListTagsForResourceResponse",
});
export const TagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ResourceArn: S.String.pipe(T.HttpLabel("ResourceArn")),
    Tags: S.optional(__mapOf__string),
})
    .pipe(S.encodeKeys({ 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 UntagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ResourceArn: S.String.pipe(T.HttpLabel("ResourceArn")),
    TagKeys: S.optional(__listOf__string).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 UpdatePackagingGroupRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Authorization: S.optional(Authorization),
    Id: S.String.pipe(T.HttpLabel("Id")),
})
    .pipe(S.encodeKeys({ Authorization: "authorization" }))
    .pipe(T.all(T.Http({ method: "PUT", uri: "/packaging_groups/{Id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdatePackagingGroupRequest",
});
export const UpdatePackagingGroupResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ApproximateAssetCount: S.optional(S.Number),
    Arn: S.optional(S.String),
    Authorization: S.optional(Authorization),
    CreatedAt: S.optional(S.String),
    DomainName: S.optional(S.String),
    EgressAccessLogs: S.optional(EgressAccessLogs),
    Id: S.optional(S.String),
    Tags: S.optional(Tags),
}).pipe(S.encodeKeys({
    ApproximateAssetCount: "approximateAssetCount",
    Arn: "arn",
    Authorization: "authorization",
    CreatedAt: "createdAt",
    DomainName: "domainName",
    EgressAccessLogs: "egressAccessLogs",
    Id: "id",
    Tags: "tags",
}))).annotate({
    identifier: "UpdatePackagingGroupResponse",
});
//# Errors
export class ForbiddenException extends S.TaggedErrorClass()("ForbiddenException", { Message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class InternalServerErrorException extends S.TaggedErrorClass()("InternalServerErrorException", { Message: S.optional(S.String) }).pipe(C.withServerError) {
}
export class NotFoundException extends S.TaggedErrorClass()("NotFoundException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ServiceUnavailableException extends S.TaggedErrorClass()("ServiceUnavailableException", { Message: S.optional(S.String) }).pipe(C.withServerError) {
}
export class TooManyRequestsException extends S.TaggedErrorClass()("TooManyRequestsException", { Message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class UnprocessableEntityException extends S.TaggedErrorClass()("UnprocessableEntityException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
/**
 * Changes the packaging group's properities to configure log subscription
 */
export const configureLogs = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ConfigureLogsRequest,
    output: ConfigureLogsResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Creates a new MediaPackage VOD Asset resource.
 */
export const createAsset = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAssetRequest,
    output: CreateAssetResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Creates a new MediaPackage VOD PackagingConfiguration resource.
 */
export const createPackagingConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePackagingConfigurationRequest,
    output: CreatePackagingConfigurationResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Creates a new MediaPackage VOD PackagingGroup resource.
 */
export const createPackagingGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePackagingGroupRequest,
    output: CreatePackagingGroupResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Deletes an existing MediaPackage VOD Asset resource.
 */
export const deleteAsset = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteAssetRequest,
    output: DeleteAssetResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Deletes a MediaPackage VOD PackagingConfiguration resource.
 */
export const deletePackagingConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeletePackagingConfigurationRequest,
    output: DeletePackagingConfigurationResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Deletes a MediaPackage VOD PackagingGroup resource.
 */
export const deletePackagingGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeletePackagingGroupRequest,
    output: DeletePackagingGroupResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Returns a description of a MediaPackage VOD Asset resource.
 */
export const describeAsset = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeAssetRequest,
    output: DescribeAssetResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Returns a description of a MediaPackage VOD PackagingConfiguration resource.
 */
export const describePackagingConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribePackagingConfigurationRequest,
    output: DescribePackagingConfigurationResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Returns a description of a MediaPackage VOD PackagingGroup resource.
 */
export const describePackagingGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribePackagingGroupRequest,
    output: DescribePackagingGroupResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
/**
 * Returns a collection of MediaPackage VOD Asset resources.
 */
export const listAssets = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListAssetsRequest,
    output: ListAssetsResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Assets",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns a collection of MediaPackage VOD PackagingConfiguration resources.
 */
export const listPackagingConfigurations = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPackagingConfigurationsRequest,
    output: ListPackagingConfigurationsResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "PackagingConfigurations",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns a collection of MediaPackage VOD PackagingGroup resources.
 */
export const listPackagingGroups = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListPackagingGroupsRequest,
    output: ListPackagingGroupsResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "PackagingGroups",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns a list of the tags assigned to the specified resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [],
}));
/**
 * Adds tags to the specified resource. You can specify one or more tags to add.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [],
}));
/**
 * Removes tags from the specified resource. You can specify one or more tags to remove.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [],
}));
/**
 * Updates a specific packaging group. You can't change the id attribute or any other system-generated attributes.
 */
export const updatePackagingGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdatePackagingGroupRequest,
    output: UpdatePackagingGroupResponse,
    errors: [
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        ServiceUnavailableException,
        TooManyRequestsException,
        UnprocessableEntityException,
    ],
}));
//# sourceMappingURL=mediapackage-vod.js.map