//===----------------------------------------------------------------------===//
//
// This source file is part of the AWSSDKSwift open source project
//
// Copyright (c) 2017-2020 the AWSSDKSwift project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of AWSSDKSwift project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/swift-aws/aws-sdk-swift/blob/master/CodeGenerator/Sources/CodeGenerator/main.swift. DO NOT EDIT.

import AWSSDKSwiftCore
import Foundation

extension MediaConnect {
    // MARK: Enums

    public enum Algorithm: String, CustomStringConvertible, Codable {
        case aes128 = "aes128"
        case aes192 = "aes192"
        case aes256 = "aes256"
        public var description: String { return self.rawValue }
    }

    public enum EntitlementStatus: String, CustomStringConvertible, Codable {
        case enabled = "ENABLED"
        case disabled = "DISABLED"
        public var description: String { return self.rawValue }
    }

    public enum KeyType: String, CustomStringConvertible, Codable {
        case speke = "speke"
        case staticKey = "static-key"
        public var description: String { return self.rawValue }
    }

    public enum `Protocol`: String, CustomStringConvertible, Codable {
        case zixiPush = "zixi-push"
        case rtpFec = "rtp-fec"
        case rtp = "rtp"
        case zixiPull = "zixi-pull"
        case rist = "rist"
        public var description: String { return self.rawValue }
    }

    public enum SourceType: String, CustomStringConvertible, Codable {
        case owned = "OWNED"
        case entitled = "ENTITLED"
        public var description: String { return self.rawValue }
    }

    public enum State: String, CustomStringConvertible, Codable {
        case enabled = "ENABLED"
        case disabled = "DISABLED"
        public var description: String { return self.rawValue }
    }

    public enum Status: String, CustomStringConvertible, Codable {
        case standby = "STANDBY"
        case active = "ACTIVE"
        case updating = "UPDATING"
        case deleting = "DELETING"
        case starting = "STARTING"
        case stopping = "STOPPING"
        case error = "ERROR"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddFlowOutputsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let flowArn: String
        /// A list of outputs that you want to add.
        public let outputs: [AddOutputRequest]

        public init(flowArn: String, outputs: [AddOutputRequest]) {
            self.flowArn = flowArn
            self.outputs = outputs
        }

        private enum CodingKeys: String, CodingKey {
            case outputs = "outputs"
        }
    }

    public struct AddFlowOutputsResponse: AWSDecodableShape {

        /// The ARN of the flow that these outputs were added to.
        public let flowArn: String?
        /// The details of the newly added outputs.
        public let outputs: [Output]?

        public init(flowArn: String? = nil, outputs: [Output]? = nil) {
            self.flowArn = flowArn
            self.outputs = outputs
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case outputs = "outputs"
        }
    }

    public struct AddFlowSourcesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let flowArn: String
        /// A list of sources that you want to add.
        public let sources: [SetSourceRequest]

        public init(flowArn: String, sources: [SetSourceRequest]) {
            self.flowArn = flowArn
            self.sources = sources
        }

        private enum CodingKeys: String, CodingKey {
            case sources = "sources"
        }
    }

    public struct AddFlowSourcesResponse: AWSDecodableShape {

        /// The ARN of the flow that these sources were added to.
        public let flowArn: String?
        /// The details of the newly added sources.
        public let sources: [Source]?

        public init(flowArn: String? = nil, sources: [Source]? = nil) {
            self.flowArn = flowArn
            self.sources = sources
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case sources = "sources"
        }
    }

    public struct AddFlowVpcInterfacesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let flowArn: String
        /// A list of VPC interfaces that you want to add.
        public let vpcInterfaces: [VpcInterfaceRequest]

        public init(flowArn: String, vpcInterfaces: [VpcInterfaceRequest]) {
            self.flowArn = flowArn
            self.vpcInterfaces = vpcInterfaces
        }

        private enum CodingKeys: String, CodingKey {
            case vpcInterfaces = "vpcInterfaces"
        }
    }

    public struct AddFlowVpcInterfacesResponse: AWSDecodableShape {

        /// The ARN of the flow that these VPC interfaces were added to.
        public let flowArn: String?
        /// The details of the newly added VPC interfaces.
        public let vpcInterfaces: [VpcInterface]?

        public init(flowArn: String? = nil, vpcInterfaces: [VpcInterface]? = nil) {
            self.flowArn = flowArn
            self.vpcInterfaces = vpcInterfaces
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case vpcInterfaces = "vpcInterfaces"
        }
    }

    public struct AddOutputRequest: AWSEncodableShape {

        /// The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let cidrAllowList: [String]?
        /// A description of the output. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the end user.
        public let description: String?
        /// The IP address from which video will be sent to output destinations.
        public let destination: String?
        /// The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
        public let encryption: Encryption?
        /// The maximum latency in milliseconds for Zixi-based streams.
        public let maxLatency: Int?
        /// The name of the output. This value must be unique within the current flow.
        public let name: String?
        /// The port to use when content is distributed to this output.
        public let port: Int?
        /// The protocol to use for the output.
        public let `protocol`: Protocol
        /// The remote ID for the Zixi-pull output stream.
        public let remoteId: String?
        /// The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.
        public let smoothingLatency: Int?
        /// The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.
        public let streamId: String?
        /// The name of the VPC interface attachment to use for this output.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        public init(cidrAllowList: [String]? = nil, description: String? = nil, destination: String? = nil, encryption: Encryption? = nil, maxLatency: Int? = nil, name: String? = nil, port: Int? = nil, protocol: Protocol, remoteId: String? = nil, smoothingLatency: Int? = nil, streamId: String? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.cidrAllowList = cidrAllowList
            self.description = description
            self.destination = destination
            self.encryption = encryption
            self.maxLatency = maxLatency
            self.name = name
            self.port = port
            self.`protocol` = `protocol`
            self.remoteId = remoteId
            self.smoothingLatency = smoothingLatency
            self.streamId = streamId
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case cidrAllowList = "cidrAllowList"
            case description = "description"
            case destination = "destination"
            case encryption = "encryption"
            case maxLatency = "maxLatency"
            case name = "name"
            case port = "port"
            case `protocol` = "protocol"
            case remoteId = "remoteId"
            case smoothingLatency = "smoothingLatency"
            case streamId = "streamId"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct CreateFlowRequest: AWSEncodableShape {

        /// The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current AWS Region.
        public let availabilityZone: String?
        /// The entitlements that you want to grant on a flow.
        public let entitlements: [GrantEntitlementRequest]?
        /// The name of the flow.
        public let name: String
        /// The outputs that you want to add to this flow.
        public let outputs: [AddOutputRequest]?
        public let source: SetSourceRequest?
        public let sourceFailoverConfig: FailoverConfig?
        public let sources: [SetSourceRequest]?
        /// The VPC interfaces you want on the flow.
        public let vpcInterfaces: [VpcInterfaceRequest]?

        public init(availabilityZone: String? = nil, entitlements: [GrantEntitlementRequest]? = nil, name: String, outputs: [AddOutputRequest]? = nil, source: SetSourceRequest? = nil, sourceFailoverConfig: FailoverConfig? = nil, sources: [SetSourceRequest]? = nil, vpcInterfaces: [VpcInterfaceRequest]? = nil) {
            self.availabilityZone = availabilityZone
            self.entitlements = entitlements
            self.name = name
            self.outputs = outputs
            self.source = source
            self.sourceFailoverConfig = sourceFailoverConfig
            self.sources = sources
            self.vpcInterfaces = vpcInterfaces
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "availabilityZone"
            case entitlements = "entitlements"
            case name = "name"
            case outputs = "outputs"
            case source = "source"
            case sourceFailoverConfig = "sourceFailoverConfig"
            case sources = "sources"
            case vpcInterfaces = "vpcInterfaces"
        }
    }

    public struct CreateFlowResponse: AWSDecodableShape {

        public let flow: Flow?

        public init(flow: Flow? = nil) {
            self.flow = flow
        }

        private enum CodingKeys: String, CodingKey {
            case flow = "flow"
        }
    }

    public struct DeleteFlowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let flowArn: String

        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteFlowResponse: AWSDecodableShape {

        /// The ARN of the flow that was deleted.
        public let flowArn: String?
        /// The status of the flow when the DeleteFlow process begins.
        public let status: Status?

        public init(flowArn: String? = nil, status: Status? = nil) {
            self.flowArn = flowArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case status = "status"
        }
    }

    public struct DescribeFlowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let flowArn: String

        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeFlowResponse: AWSDecodableShape {

        public let flow: Flow?
        public let messages: Messages?

        public init(flow: Flow? = nil, messages: Messages? = nil) {
            self.flow = flow
            self.messages = messages
        }

        private enum CodingKeys: String, CodingKey {
            case flow = "flow"
            case messages = "messages"
        }
    }

    public struct Encryption: AWSEncodableShape & AWSDecodableShape {

        /// The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).
        public let algorithm: Algorithm
        /// A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.
        public let constantInitializationVector: String?
        /// The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let deviceId: String?
        /// The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
        public let keyType: KeyType?
        /// The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let region: String?
        /// An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let resourceId: String?
        /// The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity).
        public let roleArn: String
        /// The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.
        public let secretArn: String?
        /// The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let url: String?

        public init(algorithm: Algorithm, constantInitializationVector: String? = nil, deviceId: String? = nil, keyType: KeyType? = nil, region: String? = nil, resourceId: String? = nil, roleArn: String, secretArn: String? = nil, url: String? = nil) {
            self.algorithm = algorithm
            self.constantInitializationVector = constantInitializationVector
            self.deviceId = deviceId
            self.keyType = keyType
            self.region = region
            self.resourceId = resourceId
            self.roleArn = roleArn
            self.secretArn = secretArn
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case algorithm = "algorithm"
            case constantInitializationVector = "constantInitializationVector"
            case deviceId = "deviceId"
            case keyType = "keyType"
            case region = "region"
            case resourceId = "resourceId"
            case roleArn = "roleArn"
            case secretArn = "secretArn"
            case url = "url"
        }
    }

    public struct Entitlement: AWSDecodableShape {

        /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        /// A description of the entitlement.
        public let description: String?
        /// The type of encryption that will be used on the output that is associated with this entitlement.
        public let encryption: Encryption?
        /// The ARN of the entitlement.
        public let entitlementArn: String
        /// An indication of whether the entitlement is enabled.
        public let entitlementStatus: EntitlementStatus?
        /// The name of the entitlement.
        public let name: String
        /// The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.
        public let subscribers: [String]

        public init(dataTransferSubscriberFeePercent: Int? = nil, description: String? = nil, encryption: Encryption? = nil, entitlementArn: String, entitlementStatus: EntitlementStatus? = nil, name: String, subscribers: [String]) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.description = description
            self.encryption = encryption
            self.entitlementArn = entitlementArn
            self.entitlementStatus = entitlementStatus
            self.name = name
            self.subscribers = subscribers
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case description = "description"
            case encryption = "encryption"
            case entitlementArn = "entitlementArn"
            case entitlementStatus = "entitlementStatus"
            case name = "name"
            case subscribers = "subscribers"
        }
    }

    public struct FailoverConfig: AWSEncodableShape & AWSDecodableShape {

        /// Search window time to look for dash-7 packets
        public let recoveryWindow: Int?
        public let state: State?

        public init(recoveryWindow: Int? = nil, state: State? = nil) {
            self.recoveryWindow = recoveryWindow
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case recoveryWindow = "recoveryWindow"
            case state = "state"
        }
    }

    public struct Flow: AWSDecodableShape {

        /// The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current AWS.
        public let availabilityZone: String
        /// A description of the flow. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
        public let description: String?
        /// The IP address from which video will be sent to output destinations.
        public let egressIp: String?
        /// The entitlements in this flow.
        public let entitlements: [Entitlement]
        /// The Amazon Resource Name (ARN), a unique identifier for any AWS resource, of the flow.
        public let flowArn: String
        /// The name of the flow.
        public let name: String
        /// The outputs in this flow.
        public let outputs: [Output]
        public let source: Source
        public let sourceFailoverConfig: FailoverConfig?
        public let sources: [Source]?
        /// The current status of the flow.
        public let status: Status
        /// The VPC Interfaces for this flow.
        public let vpcInterfaces: [VpcInterface]?

        public init(availabilityZone: String, description: String? = nil, egressIp: String? = nil, entitlements: [Entitlement], flowArn: String, name: String, outputs: [Output], source: Source, sourceFailoverConfig: FailoverConfig? = nil, sources: [Source]? = nil, status: Status, vpcInterfaces: [VpcInterface]? = nil) {
            self.availabilityZone = availabilityZone
            self.description = description
            self.egressIp = egressIp
            self.entitlements = entitlements
            self.flowArn = flowArn
            self.name = name
            self.outputs = outputs
            self.source = source
            self.sourceFailoverConfig = sourceFailoverConfig
            self.sources = sources
            self.status = status
            self.vpcInterfaces = vpcInterfaces
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "availabilityZone"
            case description = "description"
            case egressIp = "egressIp"
            case entitlements = "entitlements"
            case flowArn = "flowArn"
            case name = "name"
            case outputs = "outputs"
            case source = "source"
            case sourceFailoverConfig = "sourceFailoverConfig"
            case sources = "sources"
            case status = "status"
            case vpcInterfaces = "vpcInterfaces"
        }
    }

    public struct GrantEntitlementRequest: AWSEncodableShape {

        /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        /// A description of the entitlement. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the subscriber or end user.
        public let description: String?
        /// The type of encryption that will be used on the output that is associated with this entitlement.
        public let encryption: Encryption?
        /// An indication of whether the new entitlement should be enabled or disabled as soon as it is created. If you don’t specify the entitlementStatus field in your request, MediaConnect sets it to ENABLED.
        public let entitlementStatus: EntitlementStatus?
        /// The name of the entitlement. This value must be unique within the current flow.
        public let name: String?
        /// The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flows using your content as the source.
        public let subscribers: [String]

        public init(dataTransferSubscriberFeePercent: Int? = nil, description: String? = nil, encryption: Encryption? = nil, entitlementStatus: EntitlementStatus? = nil, name: String? = nil, subscribers: [String]) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.description = description
            self.encryption = encryption
            self.entitlementStatus = entitlementStatus
            self.name = name
            self.subscribers = subscribers
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case description = "description"
            case encryption = "encryption"
            case entitlementStatus = "entitlementStatus"
            case name = "name"
            case subscribers = "subscribers"
        }
    }

    public struct GrantFlowEntitlementsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        /// The list of entitlements that you want to grant.
        public let entitlements: [GrantEntitlementRequest]
        public let flowArn: String

        public init(entitlements: [GrantEntitlementRequest], flowArn: String) {
            self.entitlements = entitlements
            self.flowArn = flowArn
        }

        private enum CodingKeys: String, CodingKey {
            case entitlements = "entitlements"
        }
    }

    public struct GrantFlowEntitlementsResponse: AWSDecodableShape {

        /// The entitlements that were just granted.
        public let entitlements: [Entitlement]?
        /// The ARN of the flow that these entitlements were granted to.
        public let flowArn: String?

        public init(entitlements: [Entitlement]? = nil, flowArn: String? = nil) {
            self.entitlements = entitlements
            self.flowArn = flowArn
        }

        private enum CodingKeys: String, CodingKey {
            case entitlements = "entitlements"
            case flowArn = "flowArn"
        }
    }

    public struct ListEntitlementsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")), 
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        public let maxResults: Int?
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListEntitlementsResponse: AWSDecodableShape {

        /// A list of entitlements that have been granted to you from other AWS accounts.
        public let entitlements: [ListedEntitlement]?
        /// The token that identifies which batch of results that you want to see. For example, you submit a ListEntitlements request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListEntitlements request a second time and specify the NextToken value.
        public let nextToken: String?

        public init(entitlements: [ListedEntitlement]? = nil, nextToken: String? = nil) {
            self.entitlements = entitlements
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case entitlements = "entitlements"
            case nextToken = "nextToken"
        }
    }

    public struct ListFlowsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")), 
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        public let maxResults: Int?
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListFlowsResponse: AWSDecodableShape {

        /// A list of flow summaries.
        public let flows: [ListedFlow]?
        /// The token that identifies which batch of results that you want to see. For example, you submit a ListFlows request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListFlows request a second time and specify the NextToken value.
        public let nextToken: String?

        public init(flows: [ListedFlow]? = nil, nextToken: String? = nil) {
            self.flows = flows
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case flows = "flows"
            case nextToken = "nextToken"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn"))
        ]

        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {

        /// A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct ListedEntitlement: AWSDecodableShape {

        /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        /// The ARN of the entitlement.
        public let entitlementArn: String
        /// The name of the entitlement.
        public let entitlementName: String

        public init(dataTransferSubscriberFeePercent: Int? = nil, entitlementArn: String, entitlementName: String) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.entitlementArn = entitlementArn
            self.entitlementName = entitlementName
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case entitlementArn = "entitlementArn"
            case entitlementName = "entitlementName"
        }
    }

    public struct ListedFlow: AWSDecodableShape {

        /// The Availability Zone that the flow was created in.
        public let availabilityZone: String
        /// A description of the flow.
        public let description: String
        /// The ARN of the flow.
        public let flowArn: String
        /// The name of the flow.
        public let name: String
        /// The type of source. This value is either owned (originated somewhere other than an AWS Elemental MediaConnect flow owned by another AWS account) or entitled (originated at an AWS Elemental MediaConnect flow owned by another AWS account).
        public let sourceType: SourceType
        /// The current status of the flow.
        public let status: Status

        public init(availabilityZone: String, description: String, flowArn: String, name: String, sourceType: SourceType, status: Status) {
            self.availabilityZone = availabilityZone
            self.description = description
            self.flowArn = flowArn
            self.name = name
            self.sourceType = sourceType
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZone = "availabilityZone"
            case description = "description"
            case flowArn = "flowArn"
            case name = "name"
            case sourceType = "sourceType"
            case status = "status"
        }
    }

    public struct Messages: AWSDecodableShape {

        /// A list of errors that might have been generated from processes on this flow.
        public let errors: [String]

        public init(errors: [String]) {
            self.errors = errors
        }

        private enum CodingKeys: String, CodingKey {
            case errors = "errors"
        }
    }

    public struct Output: AWSDecodableShape {

        /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        /// A description of the output.
        public let description: String?
        /// The address where you want to send the output.
        public let destination: String?
        /// The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
        public let encryption: Encryption?
        /// The ARN of the entitlement on the originator''s flow. This value is relevant only on entitled flows.
        public let entitlementArn: String?
        /// The input ARN of the AWS Elemental MediaLive channel. This parameter is relevant only for outputs that were added by creating a MediaLive input.
        public let mediaLiveInputArn: String?
        /// The name of the output. This value must be unique within the current flow.
        public let name: String
        /// The ARN of the output.
        public let outputArn: String
        /// The port to use when content is distributed to this output.
        public let port: Int?
        /// Attributes related to the transport stream that are used in the output.
        public let transport: Transport?
        /// The name of the VPC interface attachment to use for this output.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        public init(dataTransferSubscriberFeePercent: Int? = nil, description: String? = nil, destination: String? = nil, encryption: Encryption? = nil, entitlementArn: String? = nil, mediaLiveInputArn: String? = nil, name: String, outputArn: String, port: Int? = nil, transport: Transport? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.description = description
            self.destination = destination
            self.encryption = encryption
            self.entitlementArn = entitlementArn
            self.mediaLiveInputArn = mediaLiveInputArn
            self.name = name
            self.outputArn = outputArn
            self.port = port
            self.transport = transport
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case description = "description"
            case destination = "destination"
            case encryption = "encryption"
            case entitlementArn = "entitlementArn"
            case mediaLiveInputArn = "mediaLiveInputArn"
            case name = "name"
            case outputArn = "outputArn"
            case port = "port"
            case transport = "transport"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct RemoveFlowOutputRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn")), 
            AWSMemberEncoding(label: "outputArn", location: .uri(locationName: "outputArn"))
        ]

        public let flowArn: String
        public let outputArn: String

        public init(flowArn: String, outputArn: String) {
            self.flowArn = flowArn
            self.outputArn = outputArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveFlowOutputResponse: AWSDecodableShape {

        /// The ARN of the flow that is associated with the output you removed.
        public let flowArn: String?
        /// The ARN of the output that was removed.
        public let outputArn: String?

        public init(flowArn: String? = nil, outputArn: String? = nil) {
            self.flowArn = flowArn
            self.outputArn = outputArn
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case outputArn = "outputArn"
        }
    }

    public struct RemoveFlowSourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn")), 
            AWSMemberEncoding(label: "sourceArn", location: .uri(locationName: "sourceArn"))
        ]

        public let flowArn: String
        public let sourceArn: String

        public init(flowArn: String, sourceArn: String) {
            self.flowArn = flowArn
            self.sourceArn = sourceArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveFlowSourceResponse: AWSDecodableShape {

        /// The ARN of the flow that is associated with the source you removed.
        public let flowArn: String?
        /// The ARN of the source that was removed.
        public let sourceArn: String?

        public init(flowArn: String? = nil, sourceArn: String? = nil) {
            self.flowArn = flowArn
            self.sourceArn = sourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case sourceArn = "sourceArn"
        }
    }

    public struct RemoveFlowVpcInterfaceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn")), 
            AWSMemberEncoding(label: "vpcInterfaceName", location: .uri(locationName: "vpcInterfaceName"))
        ]

        public let flowArn: String
        public let vpcInterfaceName: String

        public init(flowArn: String, vpcInterfaceName: String) {
            self.flowArn = flowArn
            self.vpcInterfaceName = vpcInterfaceName
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RemoveFlowVpcInterfaceResponse: AWSDecodableShape {

        /// The ARN of the flow that is associated with the VPC interface you removed.
        public let flowArn: String?
        /// IDs of network interfaces associated with the removed VPC interface that Media Connect was unable to remove.
        public let nonDeletedNetworkInterfaceIds: [String]?
        /// The name of the VPC interface that was removed.
        public let vpcInterfaceName: String?

        public init(flowArn: String? = nil, nonDeletedNetworkInterfaceIds: [String]? = nil, vpcInterfaceName: String? = nil) {
            self.flowArn = flowArn
            self.nonDeletedNetworkInterfaceIds = nonDeletedNetworkInterfaceIds
            self.vpcInterfaceName = vpcInterfaceName
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case nonDeletedNetworkInterfaceIds = "nonDeletedNetworkInterfaceIds"
            case vpcInterfaceName = "vpcInterfaceName"
        }
    }

    public struct RevokeFlowEntitlementRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "entitlementArn", location: .uri(locationName: "entitlementArn")), 
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let entitlementArn: String
        public let flowArn: String

        public init(entitlementArn: String, flowArn: String) {
            self.entitlementArn = entitlementArn
            self.flowArn = flowArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RevokeFlowEntitlementResponse: AWSDecodableShape {

        /// The ARN of the entitlement that was revoked.
        public let entitlementArn: String?
        /// The ARN of the flow that the entitlement was revoked from.
        public let flowArn: String?

        public init(entitlementArn: String? = nil, flowArn: String? = nil) {
            self.entitlementArn = entitlementArn
            self.flowArn = flowArn
        }

        private enum CodingKeys: String, CodingKey {
            case entitlementArn = "entitlementArn"
            case flowArn = "flowArn"
        }
    }

    public struct SetSourceRequest: AWSEncodableShape {

        /// The type of encryption that is used on the content ingested from this source.
        public let decryption: Encryption?
        /// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
        public let description: String?
        /// The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator's flow.
        public let entitlementArn: String?
        /// The port that the flow will be listening on for incoming content.
        public let ingestPort: Int?
        /// The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
        public let maxBitrate: Int?
        /// The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.
        public let maxLatency: Int?
        /// The name of the source.
        public let name: String?
        /// The protocol that is used by the source.
        public let `protocol`: Protocol?
        /// The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.
        public let streamId: String?
        /// The name of the VPC interface to use for this source.
        public let vpcInterfaceName: String?
        /// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let whitelistCidr: String?

        public init(decryption: Encryption? = nil, description: String? = nil, entitlementArn: String? = nil, ingestPort: Int? = nil, maxBitrate: Int? = nil, maxLatency: Int? = nil, name: String? = nil, protocol: Protocol? = nil, streamId: String? = nil, vpcInterfaceName: String? = nil, whitelistCidr: String? = nil) {
            self.decryption = decryption
            self.description = description
            self.entitlementArn = entitlementArn
            self.ingestPort = ingestPort
            self.maxBitrate = maxBitrate
            self.maxLatency = maxLatency
            self.name = name
            self.`protocol` = `protocol`
            self.streamId = streamId
            self.vpcInterfaceName = vpcInterfaceName
            self.whitelistCidr = whitelistCidr
        }

        private enum CodingKeys: String, CodingKey {
            case decryption = "decryption"
            case description = "description"
            case entitlementArn = "entitlementArn"
            case ingestPort = "ingestPort"
            case maxBitrate = "maxBitrate"
            case maxLatency = "maxLatency"
            case name = "name"
            case `protocol` = "protocol"
            case streamId = "streamId"
            case vpcInterfaceName = "vpcInterfaceName"
            case whitelistCidr = "whitelistCidr"
        }
    }

    public struct Source: AWSDecodableShape {

        /// Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
        public let dataTransferSubscriberFeePercent: Int?
        /// The type of encryption that is used on the content ingested from this source.
        public let decryption: Encryption?
        /// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
        public let description: String?
        /// The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator's flow.
        public let entitlementArn: String?
        /// The IP address that the flow will be listening on for incoming content.
        public let ingestIp: String?
        /// The port that the flow will be listening on for incoming content.
        public let ingestPort: Int?
        /// The name of the source.
        public let name: String
        /// The ARN of the source.
        public let sourceArn: String
        /// Attributes related to the transport stream that are used in the source.
        public let transport: Transport?
        /// The name of the VPC Interface this Source is configured with.
        public let vpcInterfaceName: String?
        /// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let whitelistCidr: String?

        public init(dataTransferSubscriberFeePercent: Int? = nil, decryption: Encryption? = nil, description: String? = nil, entitlementArn: String? = nil, ingestIp: String? = nil, ingestPort: Int? = nil, name: String, sourceArn: String, transport: Transport? = nil, vpcInterfaceName: String? = nil, whitelistCidr: String? = nil) {
            self.dataTransferSubscriberFeePercent = dataTransferSubscriberFeePercent
            self.decryption = decryption
            self.description = description
            self.entitlementArn = entitlementArn
            self.ingestIp = ingestIp
            self.ingestPort = ingestPort
            self.name = name
            self.sourceArn = sourceArn
            self.transport = transport
            self.vpcInterfaceName = vpcInterfaceName
            self.whitelistCidr = whitelistCidr
        }

        private enum CodingKeys: String, CodingKey {
            case dataTransferSubscriberFeePercent = "dataTransferSubscriberFeePercent"
            case decryption = "decryption"
            case description = "description"
            case entitlementArn = "entitlementArn"
            case ingestIp = "ingestIp"
            case ingestPort = "ingestPort"
            case name = "name"
            case sourceArn = "sourceArn"
            case transport = "transport"
            case vpcInterfaceName = "vpcInterfaceName"
            case whitelistCidr = "whitelistCidr"
        }
    }

    public struct StartFlowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let flowArn: String

        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StartFlowResponse: AWSDecodableShape {

        /// The ARN of the flow that you started.
        public let flowArn: String?
        /// The status of the flow when the StartFlow process begins.
        public let status: Status?

        public init(flowArn: String? = nil, status: Status? = nil) {
            self.flowArn = flowArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case status = "status"
        }
    }

    public struct StopFlowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let flowArn: String

        public init(flowArn: String) {
            self.flowArn = flowArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopFlowResponse: AWSDecodableShape {

        /// The ARN of the flow that you stopped.
        public let flowArn: String?
        /// The status of the flow when the StopFlow process begins.
        public let status: Status?

        public init(flowArn: String? = nil, status: Status? = nil) {
            self.flowArn = flowArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case status = "status"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn"))
        ]

        public let resourceArn: String
        /// A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct Transport: AWSDecodableShape {

        /// The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let cidrAllowList: [String]?
        /// The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
        public let maxBitrate: Int?
        /// The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.
        public let maxLatency: Int?
        /// The protocol that is used by the source or output.
        public let `protocol`: Protocol
        /// The remote ID for the Zixi-pull stream.
        public let remoteId: String?
        /// The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.
        public let smoothingLatency: Int?
        /// The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.
        public let streamId: String?

        public init(cidrAllowList: [String]? = nil, maxBitrate: Int? = nil, maxLatency: Int? = nil, protocol: Protocol, remoteId: String? = nil, smoothingLatency: Int? = nil, streamId: String? = nil) {
            self.cidrAllowList = cidrAllowList
            self.maxBitrate = maxBitrate
            self.maxLatency = maxLatency
            self.`protocol` = `protocol`
            self.remoteId = remoteId
            self.smoothingLatency = smoothingLatency
            self.streamId = streamId
        }

        private enum CodingKeys: String, CodingKey {
            case cidrAllowList = "cidrAllowList"
            case maxBitrate = "maxBitrate"
            case maxLatency = "maxLatency"
            case `protocol` = "protocol"
            case remoteId = "remoteId"
            case smoothingLatency = "smoothingLatency"
            case streamId = "streamId"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn")), 
            AWSMemberEncoding(label: "tagKeys", location: .querystring(locationName: "tagKeys"))
        ]

        public let resourceArn: String
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UpdateEncryption: AWSEncodableShape {

        /// The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).
        public let algorithm: Algorithm?
        /// A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.
        public let constantInitializationVector: String?
        /// The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let deviceId: String?
        /// The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
        public let keyType: KeyType?
        /// The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let region: String?
        /// An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let resourceId: String?
        /// The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity).
        public let roleArn: String?
        /// The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.
        public let secretArn: String?
        /// The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.
        public let url: String?

        public init(algorithm: Algorithm? = nil, constantInitializationVector: String? = nil, deviceId: String? = nil, keyType: KeyType? = nil, region: String? = nil, resourceId: String? = nil, roleArn: String? = nil, secretArn: String? = nil, url: String? = nil) {
            self.algorithm = algorithm
            self.constantInitializationVector = constantInitializationVector
            self.deviceId = deviceId
            self.keyType = keyType
            self.region = region
            self.resourceId = resourceId
            self.roleArn = roleArn
            self.secretArn = secretArn
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case algorithm = "algorithm"
            case constantInitializationVector = "constantInitializationVector"
            case deviceId = "deviceId"
            case keyType = "keyType"
            case region = "region"
            case resourceId = "resourceId"
            case roleArn = "roleArn"
            case secretArn = "secretArn"
            case url = "url"
        }
    }

    public struct UpdateFailoverConfig: AWSEncodableShape {

        /// Recovery window time to look for dash-7 packets
        public let recoveryWindow: Int?
        public let state: State?

        public init(recoveryWindow: Int? = nil, state: State? = nil) {
            self.recoveryWindow = recoveryWindow
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case recoveryWindow = "recoveryWindow"
            case state = "state"
        }
    }

    public struct UpdateFlowEntitlementRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "entitlementArn", location: .uri(locationName: "entitlementArn")), 
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        /// A description of the entitlement. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the subscriber or end user.
        public let description: String?
        /// The type of encryption that will be used on the output associated with this entitlement.
        public let encryption: UpdateEncryption?
        public let entitlementArn: String
        /// An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the entitlementStatus field in your request, MediaConnect leaves the value unchanged.
        public let entitlementStatus: EntitlementStatus?
        public let flowArn: String
        /// The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.
        public let subscribers: [String]?

        public init(description: String? = nil, encryption: UpdateEncryption? = nil, entitlementArn: String, entitlementStatus: EntitlementStatus? = nil, flowArn: String, subscribers: [String]? = nil) {
            self.description = description
            self.encryption = encryption
            self.entitlementArn = entitlementArn
            self.entitlementStatus = entitlementStatus
            self.flowArn = flowArn
            self.subscribers = subscribers
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case encryption = "encryption"
            case entitlementStatus = "entitlementStatus"
            case subscribers = "subscribers"
        }
    }

    public struct UpdateFlowEntitlementResponse: AWSDecodableShape {

        public let entitlement: Entitlement?
        /// The ARN of the flow that this entitlement was granted on.
        public let flowArn: String?

        public init(entitlement: Entitlement? = nil, flowArn: String? = nil) {
            self.entitlement = entitlement
            self.flowArn = flowArn
        }

        private enum CodingKeys: String, CodingKey {
            case entitlement = "entitlement"
            case flowArn = "flowArn"
        }
    }

    public struct UpdateFlowOutputRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn")), 
            AWSMemberEncoding(label: "outputArn", location: .uri(locationName: "outputArn"))
        ]

        /// The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let cidrAllowList: [String]?
        /// A description of the output. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the end user.
        public let description: String?
        /// The IP address where you want to send the output.
        public let destination: String?
        /// The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
        public let encryption: UpdateEncryption?
        public let flowArn: String
        /// The maximum latency in milliseconds for Zixi-based streams.
        public let maxLatency: Int?
        public let outputArn: String
        /// The port to use when content is distributed to this output.
        public let port: Int?
        /// The protocol to use for the output.
        public let `protocol`: Protocol?
        /// The remote ID for the Zixi-pull stream.
        public let remoteId: String?
        /// The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.
        public let smoothingLatency: Int?
        /// The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.
        public let streamId: String?
        /// The name of the VPC interface attachment to use for this output.
        public let vpcInterfaceAttachment: VpcInterfaceAttachment?

        public init(cidrAllowList: [String]? = nil, description: String? = nil, destination: String? = nil, encryption: UpdateEncryption? = nil, flowArn: String, maxLatency: Int? = nil, outputArn: String, port: Int? = nil, protocol: Protocol? = nil, remoteId: String? = nil, smoothingLatency: Int? = nil, streamId: String? = nil, vpcInterfaceAttachment: VpcInterfaceAttachment? = nil) {
            self.cidrAllowList = cidrAllowList
            self.description = description
            self.destination = destination
            self.encryption = encryption
            self.flowArn = flowArn
            self.maxLatency = maxLatency
            self.outputArn = outputArn
            self.port = port
            self.`protocol` = `protocol`
            self.remoteId = remoteId
            self.smoothingLatency = smoothingLatency
            self.streamId = streamId
            self.vpcInterfaceAttachment = vpcInterfaceAttachment
        }

        private enum CodingKeys: String, CodingKey {
            case cidrAllowList = "cidrAllowList"
            case description = "description"
            case destination = "destination"
            case encryption = "encryption"
            case maxLatency = "maxLatency"
            case port = "port"
            case `protocol` = "protocol"
            case remoteId = "remoteId"
            case smoothingLatency = "smoothingLatency"
            case streamId = "streamId"
            case vpcInterfaceAttachment = "vpcInterfaceAttachment"
        }
    }

    public struct UpdateFlowOutputResponse: AWSDecodableShape {

        /// The ARN of the flow that is associated with the updated output.
        public let flowArn: String?
        public let output: Output?

        public init(flowArn: String? = nil, output: Output? = nil) {
            self.flowArn = flowArn
            self.output = output
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case output = "output"
        }
    }

    public struct UpdateFlowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn"))
        ]

        public let flowArn: String
        public let sourceFailoverConfig: UpdateFailoverConfig?

        public init(flowArn: String, sourceFailoverConfig: UpdateFailoverConfig? = nil) {
            self.flowArn = flowArn
            self.sourceFailoverConfig = sourceFailoverConfig
        }

        private enum CodingKeys: String, CodingKey {
            case sourceFailoverConfig = "sourceFailoverConfig"
        }
    }

    public struct UpdateFlowResponse: AWSDecodableShape {

        public let flow: Flow?

        public init(flow: Flow? = nil) {
            self.flow = flow
        }

        private enum CodingKeys: String, CodingKey {
            case flow = "flow"
        }
    }

    public struct UpdateFlowSourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "flowArn", location: .uri(locationName: "flowArn")), 
            AWSMemberEncoding(label: "sourceArn", location: .uri(locationName: "sourceArn"))
        ]

        /// The type of encryption used on the content ingested from this source.
        public let decryption: UpdateEncryption?
        /// A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.
        public let description: String?
        /// The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator's flow.
        public let entitlementArn: String?
        public let flowArn: String
        /// The port that the flow will be listening on for incoming content.
        public let ingestPort: Int?
        /// The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
        public let maxBitrate: Int?
        /// The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.
        public let maxLatency: Int?
        /// The protocol that is used by the source.
        public let `protocol`: Protocol?
        public let sourceArn: String
        /// The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.
        public let streamId: String?
        /// The name of the VPC Interface to configure this Source with.
        public let vpcInterfaceName: String?
        /// The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.
        public let whitelistCidr: String?

        public init(decryption: UpdateEncryption? = nil, description: String? = nil, entitlementArn: String? = nil, flowArn: String, ingestPort: Int? = nil, maxBitrate: Int? = nil, maxLatency: Int? = nil, protocol: Protocol? = nil, sourceArn: String, streamId: String? = nil, vpcInterfaceName: String? = nil, whitelistCidr: String? = nil) {
            self.decryption = decryption
            self.description = description
            self.entitlementArn = entitlementArn
            self.flowArn = flowArn
            self.ingestPort = ingestPort
            self.maxBitrate = maxBitrate
            self.maxLatency = maxLatency
            self.`protocol` = `protocol`
            self.sourceArn = sourceArn
            self.streamId = streamId
            self.vpcInterfaceName = vpcInterfaceName
            self.whitelistCidr = whitelistCidr
        }

        private enum CodingKeys: String, CodingKey {
            case decryption = "decryption"
            case description = "description"
            case entitlementArn = "entitlementArn"
            case ingestPort = "ingestPort"
            case maxBitrate = "maxBitrate"
            case maxLatency = "maxLatency"
            case `protocol` = "protocol"
            case streamId = "streamId"
            case vpcInterfaceName = "vpcInterfaceName"
            case whitelistCidr = "whitelistCidr"
        }
    }

    public struct UpdateFlowSourceResponse: AWSDecodableShape {

        /// The ARN of the flow that you want to update.
        public let flowArn: String?
        /// The settings for the source of the flow.
        public let source: Source?

        public init(flowArn: String? = nil, source: Source? = nil) {
            self.flowArn = flowArn
            self.source = source
        }

        private enum CodingKeys: String, CodingKey {
            case flowArn = "flowArn"
            case source = "source"
        }
    }

    public struct VpcInterface: AWSDecodableShape {

        /// Immutable and has to be a unique against other VpcInterfaces in this Flow
        public let name: String
        /// IDs of the network interfaces created in customer's account by MediaConnect.
        public let networkInterfaceIds: [String]
        /// Role Arn MediaConnect can assumes to create ENIs in customer's account
        public let roleArn: String
        /// Security Group IDs to be used on ENI.
        public let securityGroupIds: [String]
        /// Subnet must be in the AZ of the Flow
        public let subnetId: String

        public init(name: String, networkInterfaceIds: [String], roleArn: String, securityGroupIds: [String], subnetId: String) {
            self.name = name
            self.networkInterfaceIds = networkInterfaceIds
            self.roleArn = roleArn
            self.securityGroupIds = securityGroupIds
            self.subnetId = subnetId
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case networkInterfaceIds = "networkInterfaceIds"
            case roleArn = "roleArn"
            case securityGroupIds = "securityGroupIds"
            case subnetId = "subnetId"
        }
    }

    public struct VpcInterfaceAttachment: AWSEncodableShape & AWSDecodableShape {

        /// The name of the VPC interface to use for this output.
        public let vpcInterfaceName: String?

        public init(vpcInterfaceName: String? = nil) {
            self.vpcInterfaceName = vpcInterfaceName
        }

        private enum CodingKeys: String, CodingKey {
            case vpcInterfaceName = "vpcInterfaceName"
        }
    }

    public struct VpcInterfaceRequest: AWSEncodableShape {

        /// The name of the VPC Interface. This value must be unique within the current flow.
        public let name: String
        /// Role Arn MediaConnect can assumes to create ENIs in customer's account
        public let roleArn: String
        /// Security Group IDs to be used on ENI.
        public let securityGroupIds: [String]
        /// Subnet must be in the AZ of the Flow
        public let subnetId: String

        public init(name: String, roleArn: String, securityGroupIds: [String], subnetId: String) {
            self.name = name
            self.roleArn = roleArn
            self.securityGroupIds = securityGroupIds
            self.subnetId = subnetId
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case roleArn = "roleArn"
            case securityGroupIds = "securityGroupIds"
            case subnetId = "subnetId"
        }
    }
}
