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

import Foundation
import AWSSDKSwiftCore

extension CognitoIdentity {

    public struct MappingRule: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "Claim", required: true, type: .string), 
            AWSShapeMember(label: "MatchType", required: true, type: .enum), 
            AWSShapeMember(label: "Value", required: true, type: .string), 
            AWSShapeMember(label: "RoleARN", required: true, type: .string)
        ]
        /// The claim name that must be present in the token, for example, "isAdmin" or "paid".
        public let claim: String
        /// The match condition that specifies how closely the claim value in the IdP token must match Value.
        public let matchType: MappingRuleMatchType
        /// A brief string that the claim must match, for example, "paid" or "yes".
        public let value: String
        /// The role ARN.
        public let roleARN: String

        public init(claim: String, matchType: MappingRuleMatchType, value: String, roleARN: String) {
            self.claim = claim
            self.matchType = matchType
            self.value = value
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case claim = "Claim"
            case matchType = "MatchType"
            case value = "Value"
            case roleARN = "RoleARN"
        }
    }

    public struct CreateIdentityPoolInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "OpenIdConnectProviderARNs", required: false, type: .list), 
            AWSShapeMember(label: "CognitoIdentityProviders", required: false, type: .list), 
            AWSShapeMember(label: "DeveloperProviderName", required: false, type: .string), 
            AWSShapeMember(label: "IdentityPoolName", required: true, type: .string), 
            AWSShapeMember(label: "AllowUnauthenticatedIdentities", required: true, type: .boolean), 
            AWSShapeMember(label: "SupportedLoginProviders", required: false, type: .map), 
            AWSShapeMember(label: "SamlProviderARNs", required: false, type: .list)
        ]
        /// A list of OpendID Connect provider ARNs.
        public let openIdConnectProviderARNs: [String]?
        /// An array of Amazon Cognito Identity user pools and their client IDs.
        public let cognitoIdentityProviders: [CognitoIdentityProvider]?
        /// The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-). Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.
        public let developerProviderName: String?
        /// A string that you provide.
        public let identityPoolName: String
        /// TRUE if the identity pool supports unauthenticated logins.
        public let allowUnauthenticatedIdentities: Bool
        /// Optional key:value pairs mapping provider names to provider app IDs.
        public let supportedLoginProviders: [String: String]?
        /// An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
        public let samlProviderARNs: [String]?

        public init(openIdConnectProviderARNs: [String]? = nil, cognitoIdentityProviders: [CognitoIdentityProvider]? = nil, developerProviderName: String? = nil, identityPoolName: String, allowUnauthenticatedIdentities: Bool, supportedLoginProviders: [String: String]? = nil, samlProviderARNs: [String]? = nil) {
            self.openIdConnectProviderARNs = openIdConnectProviderARNs
            self.cognitoIdentityProviders = cognitoIdentityProviders
            self.developerProviderName = developerProviderName
            self.identityPoolName = identityPoolName
            self.allowUnauthenticatedIdentities = allowUnauthenticatedIdentities
            self.supportedLoginProviders = supportedLoginProviders
            self.samlProviderARNs = samlProviderARNs
        }

        private enum CodingKeys: String, CodingKey {
            case openIdConnectProviderARNs = "OpenIdConnectProviderARNs"
            case cognitoIdentityProviders = "CognitoIdentityProviders"
            case developerProviderName = "DeveloperProviderName"
            case identityPoolName = "IdentityPoolName"
            case allowUnauthenticatedIdentities = "AllowUnauthenticatedIdentities"
            case supportedLoginProviders = "SupportedLoginProviders"
            case samlProviderARNs = "SamlProviderARNs"
        }
    }

    public struct ListIdentityPoolsInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "NextToken", required: false, type: .string), 
            AWSShapeMember(label: "MaxResults", required: true, type: .integer)
        ]
        /// A pagination token.
        public let nextToken: String?
        /// The maximum number of identities to return.
        public let maxResults: Int32

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

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case maxResults = "MaxResults"
        }
    }

    public struct Credentials: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "SecretKey", required: false, type: .string), 
            AWSShapeMember(label: "AccessKeyId", required: false, type: .string), 
            AWSShapeMember(label: "SessionToken", required: false, type: .string), 
            AWSShapeMember(label: "Expiration", required: false, type: .timestamp)
        ]
        /// The Secret Access Key portion of the credentials
        public let secretKey: String?
        /// The Access Key portion of the credentials.
        public let accessKeyId: String?
        /// The Session Token portion of the credentials
        public let sessionToken: String?
        /// The date at which these credentials will expire.
        public let expiration: TimeStamp?

        public init(secretKey: String? = nil, accessKeyId: String? = nil, sessionToken: String? = nil, expiration: TimeStamp? = nil) {
            self.secretKey = secretKey
            self.accessKeyId = accessKeyId
            self.sessionToken = sessionToken
            self.expiration = expiration
        }

        private enum CodingKeys: String, CodingKey {
            case secretKey = "SecretKey"
            case accessKeyId = "AccessKeyId"
            case sessionToken = "SessionToken"
            case expiration = "Expiration"
        }
    }

    public struct GetCredentialsForIdentityInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "CustomRoleArn", required: false, type: .string), 
            AWSShapeMember(label: "Logins", required: false, type: .map), 
            AWSShapeMember(label: "IdentityId", required: true, type: .string)
        ]
        /// The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.
        public let customRoleArn: String?
        /// A set of optional name-value pairs that map provider names to provider tokens.
        public let logins: [String: String]?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String

        public init(customRoleArn: String? = nil, logins: [String: String]? = nil, identityId: String) {
            self.customRoleArn = customRoleArn
            self.logins = logins
            self.identityId = identityId
        }

        private enum CodingKeys: String, CodingKey {
            case customRoleArn = "CustomRoleArn"
            case logins = "Logins"
            case identityId = "IdentityId"
        }
    }

    public struct LookupDeveloperIdentityInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "DeveloperUserIdentifier", required: false, type: .string), 
            AWSShapeMember(label: "IdentityId", required: false, type: .string), 
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string), 
            AWSShapeMember(label: "NextToken", required: false, type: .string), 
            AWSShapeMember(label: "MaxResults", required: false, type: .integer)
        ]
        /// A unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.
        public let developerUserIdentifier: String?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String
        /// A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.
        public let nextToken: String?
        /// The maximum number of identities to return.
        public let maxResults: Int32?

        public init(developerUserIdentifier: String? = nil, identityId: String? = nil, identityPoolId: String, nextToken: String? = nil, maxResults: Int32? = nil) {
            self.developerUserIdentifier = developerUserIdentifier
            self.identityId = identityId
            self.identityPoolId = identityPoolId
            self.nextToken = nextToken
            self.maxResults = maxResults
        }

        private enum CodingKeys: String, CodingKey {
            case developerUserIdentifier = "DeveloperUserIdentifier"
            case identityId = "IdentityId"
            case identityPoolId = "IdentityPoolId"
            case nextToken = "NextToken"
            case maxResults = "MaxResults"
        }
    }

    public struct RulesConfigurationType: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "Rules", required: true, type: .list)
        ]
        /// An array of rules. You can specify up to 25 rules per identity provider. Rules are evaluated in order. The first one to match specifies the role.
        public let rules: [MappingRule]

        public init(rules: [MappingRule]) {
            self.rules = rules
        }

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

    public struct IdentityPool: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "OpenIdConnectProviderARNs", required: false, type: .list), 
            AWSShapeMember(label: "CognitoIdentityProviders", required: false, type: .list), 
            AWSShapeMember(label: "DeveloperProviderName", required: false, type: .string), 
            AWSShapeMember(label: "IdentityPoolName", required: true, type: .string), 
            AWSShapeMember(label: "AllowUnauthenticatedIdentities", required: true, type: .boolean), 
            AWSShapeMember(label: "SupportedLoginProviders", required: false, type: .map), 
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string), 
            AWSShapeMember(label: "SamlProviderARNs", required: false, type: .list)
        ]
        /// A list of OpendID Connect provider ARNs.
        public let openIdConnectProviderARNs: [String]?
        /// A list representing an Amazon Cognito Identity User Pool and its client ID.
        public let cognitoIdentityProviders: [CognitoIdentityProvider]?
        /// The "domain" by which Cognito will refer to your users.
        public let developerProviderName: String?
        /// A string that you provide.
        public let identityPoolName: String
        /// TRUE if the identity pool supports unauthenticated logins.
        public let allowUnauthenticatedIdentities: Bool
        /// Optional key:value pairs mapping provider names to provider app IDs.
        public let supportedLoginProviders: [String: String]?
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String
        /// An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.
        public let samlProviderARNs: [String]?

        public init(openIdConnectProviderARNs: [String]? = nil, cognitoIdentityProviders: [CognitoIdentityProvider]? = nil, developerProviderName: String? = nil, identityPoolName: String, allowUnauthenticatedIdentities: Bool, supportedLoginProviders: [String: String]? = nil, identityPoolId: String, samlProviderARNs: [String]? = nil) {
            self.openIdConnectProviderARNs = openIdConnectProviderARNs
            self.cognitoIdentityProviders = cognitoIdentityProviders
            self.developerProviderName = developerProviderName
            self.identityPoolName = identityPoolName
            self.allowUnauthenticatedIdentities = allowUnauthenticatedIdentities
            self.supportedLoginProviders = supportedLoginProviders
            self.identityPoolId = identityPoolId
            self.samlProviderARNs = samlProviderARNs
        }

        private enum CodingKeys: String, CodingKey {
            case openIdConnectProviderARNs = "OpenIdConnectProviderARNs"
            case cognitoIdentityProviders = "CognitoIdentityProviders"
            case developerProviderName = "DeveloperProviderName"
            case identityPoolName = "IdentityPoolName"
            case allowUnauthenticatedIdentities = "AllowUnauthenticatedIdentities"
            case supportedLoginProviders = "SupportedLoginProviders"
            case identityPoolId = "IdentityPoolId"
            case samlProviderARNs = "SamlProviderARNs"
        }
    }

    public struct IdentityPoolShortDescription: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityPoolId", required: false, type: .string), 
            AWSShapeMember(label: "IdentityPoolName", required: false, type: .string)
        ]
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String?
        /// A string that you provide.
        public let identityPoolName: String?

        public init(identityPoolId: String? = nil, identityPoolName: String? = nil) {
            self.identityPoolId = identityPoolId
            self.identityPoolName = identityPoolName
        }

        private enum CodingKeys: String, CodingKey {
            case identityPoolId = "IdentityPoolId"
            case identityPoolName = "IdentityPoolName"
        }
    }

    public struct ListIdentitiesInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "HideDisabled", required: false, type: .boolean), 
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string), 
            AWSShapeMember(label: "NextToken", required: false, type: .string), 
            AWSShapeMember(label: "MaxResults", required: true, type: .integer)
        ]
        /// An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.
        public let hideDisabled: Bool?
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String
        /// A pagination token.
        public let nextToken: String?
        /// The maximum number of identities to return.
        public let maxResults: Int32

        public init(hideDisabled: Bool? = nil, identityPoolId: String, nextToken: String? = nil, maxResults: Int32) {
            self.hideDisabled = hideDisabled
            self.identityPoolId = identityPoolId
            self.nextToken = nextToken
            self.maxResults = maxResults
        }

        private enum CodingKeys: String, CodingKey {
            case hideDisabled = "HideDisabled"
            case identityPoolId = "IdentityPoolId"
            case nextToken = "NextToken"
            case maxResults = "MaxResults"
        }
    }

    public struct DeleteIdentityPoolInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string)
        ]
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String

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

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

    public struct GetCredentialsForIdentityResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "Credentials", required: false, type: .structure), 
            AWSShapeMember(label: "IdentityId", required: false, type: .string)
        ]
        /// Credentials for the provided identity ID.
        public let credentials: Credentials?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?

        public init(credentials: Credentials? = nil, identityId: String? = nil) {
            self.credentials = credentials
            self.identityId = identityId
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
            case identityId = "IdentityId"
        }
    }

    public struct MergeDeveloperIdentitiesInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "DestinationUserIdentifier", required: true, type: .string), 
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string), 
            AWSShapeMember(label: "SourceUserIdentifier", required: true, type: .string), 
            AWSShapeMember(label: "DeveloperProviderName", required: true, type: .string)
        ]
        /// User identifier for the destination user. The value should be a DeveloperUserIdentifier.
        public let destinationUserIdentifier: String
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String
        /// User identifier for the source user. The value should be a DeveloperUserIdentifier.
        public let sourceUserIdentifier: String
        /// The "domain" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).
        public let developerProviderName: String

        public init(destinationUserIdentifier: String, identityPoolId: String, sourceUserIdentifier: String, developerProviderName: String) {
            self.destinationUserIdentifier = destinationUserIdentifier
            self.identityPoolId = identityPoolId
            self.sourceUserIdentifier = sourceUserIdentifier
            self.developerProviderName = developerProviderName
        }

        private enum CodingKeys: String, CodingKey {
            case destinationUserIdentifier = "DestinationUserIdentifier"
            case identityPoolId = "IdentityPoolId"
            case sourceUserIdentifier = "SourceUserIdentifier"
            case developerProviderName = "DeveloperProviderName"
        }
    }

    public struct DeleteIdentitiesResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "UnprocessedIdentityIds", required: false, type: .list)
        ]
        /// An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.
        public let unprocessedIdentityIds: [UnprocessedIdentityId]?

        public init(unprocessedIdentityIds: [UnprocessedIdentityId]? = nil) {
            self.unprocessedIdentityIds = unprocessedIdentityIds
        }

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

    public struct GetOpenIdTokenForDeveloperIdentityInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "TokenDuration", required: false, type: .long), 
            AWSShapeMember(label: "IdentityId", required: false, type: .string), 
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string), 
            AWSShapeMember(label: "Logins", required: true, type: .map)
        ]
        /// The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.
        public let tokenDuration: Int64?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String
        /// A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.
        public let logins: [String: String]

        public init(tokenDuration: Int64? = nil, identityId: String? = nil, identityPoolId: String, logins: [String: String]) {
            self.tokenDuration = tokenDuration
            self.identityId = identityId
            self.identityPoolId = identityPoolId
            self.logins = logins
        }

        private enum CodingKeys: String, CodingKey {
            case tokenDuration = "TokenDuration"
            case identityId = "IdentityId"
            case identityPoolId = "IdentityPoolId"
            case logins = "Logins"
        }
    }

    public struct GetOpenIdTokenInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "Logins", required: false, type: .map), 
            AWSShapeMember(label: "IdentityId", required: true, type: .string)
        ]
        /// A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito Identity Provider, or any other OpenId Connect provider, always include the id_token.
        public let logins: [String: String]?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String

        public init(logins: [String: String]? = nil, identityId: String) {
            self.logins = logins
            self.identityId = identityId
        }

        private enum CodingKeys: String, CodingKey {
            case logins = "Logins"
            case identityId = "IdentityId"
        }
    }

    public struct DeleteIdentitiesInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityIdsToDelete", required: true, type: .list)
        ]
        /// A list of 1-60 identities that you want to delete.
        public let identityIdsToDelete: [String]

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

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

    public struct GetIdInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "AccountId", required: false, type: .string), 
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string), 
            AWSShapeMember(label: "Logins", required: false, type: .map)
        ]
        /// A standard AWS account ID (9+ digits).
        public let accountId: String?
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String
        /// A set of optional name-value pairs that map provider names to provider tokens. The available provider names for Logins are as follows:   Facebook: graph.facebook.com    Amazon Cognito Identity Provider: cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789    Google: accounts.google.com    Amazon: www.amazon.com    Twitter: api.twitter.com    Digits: www.digits.com   
        public let logins: [String: String]?

        public init(accountId: String? = nil, identityPoolId: String, logins: [String: String]? = nil) {
            self.accountId = accountId
            self.identityPoolId = identityPoolId
            self.logins = logins
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "AccountId"
            case identityPoolId = "IdentityPoolId"
            case logins = "Logins"
        }
    }

    public struct ListIdentityPoolsResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityPools", required: false, type: .list), 
            AWSShapeMember(label: "NextToken", required: false, type: .string)
        ]
        /// The identity pools returned by the ListIdentityPools action.
        public let identityPools: [IdentityPoolShortDescription]?
        /// A pagination token.
        public let nextToken: String?

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

        private enum CodingKeys: String, CodingKey {
            case identityPools = "IdentityPools"
            case nextToken = "NextToken"
        }
    }

    public struct GetIdentityPoolRolesResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityPoolId", required: false, type: .string), 
            AWSShapeMember(label: "RoleMappings", required: false, type: .map), 
            AWSShapeMember(label: "Roles", required: false, type: .map)
        ]
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String?
        /// How users for a specific identity provider are to mapped to roles. This is a String-to-RoleMapping object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id".
        public let roleMappings: [String: RoleMapping]?
        /// The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.
        public let roles: [String: String]?

        public init(identityPoolId: String? = nil, roleMappings: [String: RoleMapping]? = nil, roles: [String: String]? = nil) {
            self.identityPoolId = identityPoolId
            self.roleMappings = roleMappings
            self.roles = roles
        }

        private enum CodingKeys: String, CodingKey {
            case identityPoolId = "IdentityPoolId"
            case roleMappings = "RoleMappings"
            case roles = "Roles"
        }
    }

    public struct GetOpenIdTokenForDeveloperIdentityResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "Token", required: false, type: .string), 
            AWSShapeMember(label: "IdentityId", required: false, type: .string)
        ]
        /// An OpenID token.
        public let token: String?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?

        public init(token: String? = nil, identityId: String? = nil) {
            self.token = token
            self.identityId = identityId
        }

        private enum CodingKeys: String, CodingKey {
            case token = "Token"
            case identityId = "IdentityId"
        }
    }

    public struct DescribeIdentityPoolInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string)
        ]
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String

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

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

    public struct GetIdentityPoolRolesInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string)
        ]
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String

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

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

    public struct UnlinkDeveloperIdentityInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "DeveloperUserIdentifier", required: true, type: .string), 
            AWSShapeMember(label: "IdentityId", required: true, type: .string), 
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string), 
            AWSShapeMember(label: "DeveloperProviderName", required: true, type: .string)
        ]
        /// A unique ID used by your backend authentication process to identify a user.
        public let developerUserIdentifier: String
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String
        /// The "domain" by which Cognito will refer to your users.
        public let developerProviderName: String

        public init(developerUserIdentifier: String, identityId: String, identityPoolId: String, developerProviderName: String) {
            self.developerUserIdentifier = developerUserIdentifier
            self.identityId = identityId
            self.identityPoolId = identityPoolId
            self.developerProviderName = developerProviderName
        }

        private enum CodingKeys: String, CodingKey {
            case developerUserIdentifier = "DeveloperUserIdentifier"
            case identityId = "IdentityId"
            case identityPoolId = "IdentityPoolId"
            case developerProviderName = "DeveloperProviderName"
        }
    }

    public struct GetIdResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityId", required: false, type: .string)
        ]
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?

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

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

    public enum RoleMappingType: String, CustomStringConvertible, Codable {
        case token = "Token"
        case rules = "Rules"
        public var description: String { return self.rawValue }
    }

    public enum ErrorCode: String, CustomStringConvertible, Codable {
        case accessdenied = "AccessDenied"
        case internalservererror = "InternalServerError"
        public var description: String { return self.rawValue }
    }

    public struct IdentityDescription: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "LastModifiedDate", required: false, type: .timestamp), 
            AWSShapeMember(label: "CreationDate", required: false, type: .timestamp), 
            AWSShapeMember(label: "IdentityId", required: false, type: .string), 
            AWSShapeMember(label: "Logins", required: false, type: .list)
        ]
        /// Date on which the identity was last modified.
        public let lastModifiedDate: TimeStamp?
        /// Date on which the identity was created.
        public let creationDate: TimeStamp?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?
        /// A set of optional name-value pairs that map provider names to provider tokens.
        public let logins: [String]?

        public init(lastModifiedDate: TimeStamp? = nil, creationDate: TimeStamp? = nil, identityId: String? = nil, logins: [String]? = nil) {
            self.lastModifiedDate = lastModifiedDate
            self.creationDate = creationDate
            self.identityId = identityId
            self.logins = logins
        }

        private enum CodingKeys: String, CodingKey {
            case lastModifiedDate = "LastModifiedDate"
            case creationDate = "CreationDate"
            case identityId = "IdentityId"
            case logins = "Logins"
        }
    }

    public struct SetIdentityPoolRolesInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityPoolId", required: true, type: .string), 
            AWSShapeMember(label: "RoleMappings", required: false, type: .map), 
            AWSShapeMember(label: "Roles", required: true, type: .map)
        ]
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String
        /// How users for a specific identity provider are to mapped to roles. This is a string to RoleMapping object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id". Up to 25 rules can be specified per identity provider.
        public let roleMappings: [String: RoleMapping]?
        /// The map of roles associated with this pool. For a given role, the key will be either "authenticated" or "unauthenticated" and the value will be the Role ARN.
        public let roles: [String: String]

        public init(identityPoolId: String, roleMappings: [String: RoleMapping]? = nil, roles: [String: String]) {
            self.identityPoolId = identityPoolId
            self.roleMappings = roleMappings
            self.roles = roles
        }

        private enum CodingKeys: String, CodingKey {
            case identityPoolId = "IdentityPoolId"
            case roleMappings = "RoleMappings"
            case roles = "Roles"
        }
    }

    public struct UnlinkIdentityInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "Logins", required: true, type: .map), 
            AWSShapeMember(label: "LoginsToRemove", required: true, type: .list), 
            AWSShapeMember(label: "IdentityId", required: true, type: .string)
        ]
        /// A set of optional name-value pairs that map provider names to provider tokens.
        public let logins: [String: String]
        /// Provider names to unlink from this identity.
        public let loginsToRemove: [String]
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String

        public init(logins: [String: String], loginsToRemove: [String], identityId: String) {
            self.logins = logins
            self.loginsToRemove = loginsToRemove
            self.identityId = identityId
        }

        private enum CodingKeys: String, CodingKey {
            case logins = "Logins"
            case loginsToRemove = "LoginsToRemove"
            case identityId = "IdentityId"
        }
    }

    public struct GetOpenIdTokenResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "Token", required: false, type: .string), 
            AWSShapeMember(label: "IdentityId", required: false, type: .string)
        ]
        /// An OpenID token, valid for 15 minutes.
        public let token: String?
        /// A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input.
        public let identityId: String?

        public init(token: String? = nil, identityId: String? = nil) {
            self.token = token
            self.identityId = identityId
        }

        private enum CodingKeys: String, CodingKey {
            case token = "Token"
            case identityId = "IdentityId"
        }
    }

    public struct CognitoIdentityProvider: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "ServerSideTokenCheck", required: false, type: .boolean), 
            AWSShapeMember(label: "ProviderName", required: false, type: .string), 
            AWSShapeMember(label: "ClientId", required: false, type: .string)
        ]
        /// TRUE if server-side token validation is enabled for the identity provider’s token.
        public let serverSideTokenCheck: Bool?
        /// The provider name for an Amazon Cognito Identity User Pool. For example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.
        public let providerName: String?
        /// The client ID for the Amazon Cognito Identity User Pool.
        public let clientId: String?

        public init(serverSideTokenCheck: Bool? = nil, providerName: String? = nil, clientId: String? = nil) {
            self.serverSideTokenCheck = serverSideTokenCheck
            self.providerName = providerName
            self.clientId = clientId
        }

        private enum CodingKeys: String, CodingKey {
            case serverSideTokenCheck = "ServerSideTokenCheck"
            case providerName = "ProviderName"
            case clientId = "ClientId"
        }
    }

    public struct ListIdentitiesResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityPoolId", required: false, type: .string), 
            AWSShapeMember(label: "Identities", required: false, type: .list), 
            AWSShapeMember(label: "NextToken", required: false, type: .string)
        ]
        /// An identity pool ID in the format REGION:GUID.
        public let identityPoolId: String?
        /// An object containing a set of identities and associated mappings.
        public let identities: [IdentityDescription]?
        /// A pagination token.
        public let nextToken: String?

        public init(identityPoolId: String? = nil, identities: [IdentityDescription]? = nil, nextToken: String? = nil) {
            self.identityPoolId = identityPoolId
            self.identities = identities
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case identityPoolId = "IdentityPoolId"
            case identities = "Identities"
            case nextToken = "NextToken"
        }
    }

    public struct LookupDeveloperIdentityResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "DeveloperUserIdentifierList", required: false, type: .list), 
            AWSShapeMember(label: "NextToken", required: false, type: .string), 
            AWSShapeMember(label: "IdentityId", required: false, type: .string)
        ]
        /// This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.
        public let developerUserIdentifierList: [String]?
        /// A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.
        public let nextToken: String?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?

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

        private enum CodingKeys: String, CodingKey {
            case developerUserIdentifierList = "DeveloperUserIdentifierList"
            case nextToken = "NextToken"
            case identityId = "IdentityId"
        }
    }

    public struct UnprocessedIdentityId: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "ErrorCode", required: false, type: .enum), 
            AWSShapeMember(label: "IdentityId", required: false, type: .string)
        ]
        /// The error code indicating the type of error that occurred.
        public let errorCode: ErrorCode?
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?

        public init(errorCode: ErrorCode? = nil, identityId: String? = nil) {
            self.errorCode = errorCode
            self.identityId = identityId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case identityId = "IdentityId"
        }
    }

    public struct MergeDeveloperIdentitiesResponse: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityId", required: false, type: .string)
        ]
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String?

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

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

    public enum MappingRuleMatchType: String, CustomStringConvertible, Codable {
        case equals = "Equals"
        case contains = "Contains"
        case startswith = "StartsWith"
        case notequal = "NotEqual"
        public var description: String { return self.rawValue }
    }

    public struct RoleMapping: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "Type", required: true, type: .enum), 
            AWSShapeMember(label: "RulesConfiguration", required: false, type: .structure), 
            AWSShapeMember(label: "AmbiguousRoleResolution", required: false, type: .enum)
        ]
        /// The role mapping type. Token will use cognito:roles and cognito:preferred_role claims from the Cognito identity provider token to map groups to roles. Rules will attempt to match claims from the token to map to a role.
        public let `type`: RoleMappingType
        /// The rules to be used for mapping users to roles. If you specify Rules as the role mapping type, RulesConfiguration is required.
        public let rulesConfiguration: RulesConfigurationType?
        /// If you specify Token or Rules as the Type, AmbiguousRoleResolution is required. Specifies the action to be taken if either no rules match the claim value for the Rules type, or there is no cognito:preferred_role claim and there are multiple cognito:roles matches for the Token type.
        public let ambiguousRoleResolution: AmbiguousRoleResolutionType?

        public init(type: RoleMappingType, rulesConfiguration: RulesConfigurationType? = nil, ambiguousRoleResolution: AmbiguousRoleResolutionType? = nil) {
            self.`type` = `type`
            self.rulesConfiguration = rulesConfiguration
            self.ambiguousRoleResolution = ambiguousRoleResolution
        }

        private enum CodingKeys: String, CodingKey {
            case `type` = "Type"
            case rulesConfiguration = "RulesConfiguration"
            case ambiguousRoleResolution = "AmbiguousRoleResolution"
        }
    }

    public enum AmbiguousRoleResolutionType: String, CustomStringConvertible, Codable {
        case authenticatedrole = "AuthenticatedRole"
        case deny = "Deny"
        public var description: String { return self.rawValue }
    }

    public struct DescribeIdentityInput: AWSShape {
        public static var _members: [AWSShapeMember] = [
            AWSShapeMember(label: "IdentityId", required: true, type: .string)
        ]
        /// A unique identifier in the format REGION:GUID.
        public let identityId: String

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

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

}