declare enum AWSRegionType{
    AWSRegionUnknown = 0,
    AWSRegionUSEast1 = 1,
    AWSRegionUSEast2 =2,
    AWSRegionUSWest1=3,
    AWSRegionUSWest2=4,
    AWSRegionEUWest1=5,
    AWSRegionEUWest2=6,
    AWSRegionEUCentral1=7,
    AWSRegionAPSoutheast1=8,
    AWSRegionAPNortheast1=9,
    AWSRegionAPNortheast2=10,
    AWSRegionAPSoutheast2=11,
    AWSRegionAPSouth1=12,
    AWSRegionSAEast1=13,
    AWSRegionCNNorth1=14,
    AWSRegionCACentral1=15,
    AWSRegionUSGovWest1=16
}

declare class AWSCredentialProvider{

}
declare class AWSServiceConfiguration{
    static alloc():AWSServiceConfiguration;
    public initWithRegionCredentialsProvider(awsRegionType:AWSRegionType, awsCredentialProvider:AWSCredentialProvider )
}

declare class AWSCognitoIdentityUserPoolConfiguration{
    static alloc():AWSCognitoIdentityUserPoolConfiguration;
    public initWithClientIdClientSecretPoolId(clientId:String, secretId:String,poolId:String);
}

declare class AWSCognitoIdentityUserPool{
    static registerCognitoIdentityUserPoolWithConfigurationUserPoolConfigurationForKey(awsServiceConfiguration:AWSServiceConfiguration, awsCognitoIdentityUserPoolConfiguration:AWSCognitoIdentityUserPoolConfiguration, key:String);
    static CognitoIdentityUserPoolForKey(key:String):AWSCognitoIdentityUserPool;
    signUpPasswordUserAttributesValidationData(userName:String, password:String, userAttributes: NSMutableArray<AWSCognitoIdentityUserAttributeType>, validationDate:any);
    getUser(userName:String):AWSCognitoIdentityUser;
    currentUser():AWSCognitoIdentityUser;
    delegate:AWSCognitoIdentityInteractiveAuthenticationDelegate;
}

declare class AWSCognitoIdentityUserAttributeType{
    static alloc():AWSCognitoIdentityUserAttributeType;
    public initWithNameValue(name:String, value:String);
}

declare class CognitoIdentityUserPoolSignUpResponse{

}

declare interface AWSTask <T>{
      <T> (arg:T):T;
      error:NSError;
      result:any;
      continueWithBlock(block:any):AWSTask <T>;
}

declare class AWSCognitoIdentityUser{
     confirmSignUp(confirmationCode:String):AWSTask<AWSCognitoIdentityUserConfirmSignUpResponse>;
     getDetails():AWSTask<AWSCognitoIdentityUserGetDetailsResponse >;
     signOut();
}

declare class AWSCognitoIdentityUserConfirmSignUpResponse{
    
}

declare class AWSCognitoIdentityUserGetDetailsResponse{
    
}


interface AWSCognitoIdentityInteractiveAuthenticationDelegate extends NSObjectProtocol{
    startPasswordAuthentication():AWSCognitoIdentityPasswordAuthentication;
}
declare var AWSCognitoIdentityInteractiveAuthenticationDelegate:{
    prototype:AWSCognitoIdentityInteractiveAuthenticationDelegate;
}

interface AWSCognitoIdentityPasswordAuthentication extends NSObjectProtocol{
    getPasswordAuthenticationDetailsPasswordAuthenticationCompletionSource(authenticationInput:AWSCognitoIdentityPasswordAuthenticationInput, passwordAuthenticationCompletionSource:AWSTaskCompletionSource<AWSCognitoIdentityPasswordAuthenticationDetails>);
    didCompletePasswordAuthenticationStepWithError(error:NSError);
}
declare var AWSCognitoIdentityPasswordAuthentication:{
    prototype:AWSCognitoIdentityPasswordAuthentication;
}

interface AWSCognitoIdentityPasswordAuthenticationInput extends NSObject{
    lastKnownUsername:String;
}

interface AWSTaskCompletionSource<T>{
    <T>(arg:T):T;
    setResult(result:any);
}

declare class AWSCognitoIdentityPasswordAuthenticationDetails extends NSObject{
    static alloc():AWSCognitoIdentityPasswordAuthenticationDetails;
    initWithUsernamePassword(username:String, password:String);
}