{
  "type": "object",
  "properties": {
    "version": {
      "type": "string"
    },
    "cognitoConfig": {
      "allOf": [
        {
          "$ref": "#/definitions/ServiceQuestionsBaseResult"
        },
        {
          "$ref": "#/definitions/OAuthResult"
        },
        {
          "$ref": "#/definitions/SocialProviderResult"
        },
        {
          "$ref": "#/definitions/IdentityPoolResult"
        },
        {
          "$ref": "#/definitions/PasswordPolicyResult"
        },
        {
          "$ref": "#/definitions/PasswordRecoveryResult"
        },
        {
          "$ref": "#/definitions/MfaResult"
        },
        {
          "$ref": "#/definitions/AdminQueriesResult"
        },
        {
          "$ref": "#/definitions/Triggers"
        }
      ]
    }
  },
  "required": ["cognitoConfig"],
  "definitions": {
    "ServiceQuestionsBaseResult": {
      "type": "object",
      "properties": {
        "serviceName": {
          "type": "string",
          "enum": ["Cognito"]
        },
        "resourceName": {
          "type": "string"
        },
        "useDefault": {
          "enum": ["default", "defaultSocial", "manual"],
          "type": "string"
        },
        "updateFlow": {
          "enum": ["callbacks", "default", "defaultSocial", "manual", "providers", "updateAdminQueries", "updateUserPoolGroups"],
          "type": "string"
        },
        "requiredAttributes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "authSelections": {
          "enum": ["identityPoolAndUserPool", "identityPoolOnly", "userPoolOnly"],
          "type": "string"
        },
        "userPoolName": {
          "type": "string"
        },
        "usernameAttributes": {
          "type": "array",
          "items": {
            "enum": ["email", "email, phone_number", "phone_number"],
            "type": "string"
          }
        },
        "aliasAttributes": {
          "type": "array",
          "items": {
            "enum": ["email", "phone_number", "preferred_username"],
            "type": "string"
          }
        },
        "userPoolGroups": {
          "type": "boolean"
        },
        "userPoolGroupList": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "userpoolClientRefreshTokenValidity": {
          "type": ["string", "number"]
        },
        "userpoolClientReadAttributes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "userpoolClientWriteAttributes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "userpoolClientSetAttributes": {
          "type": "boolean"
        },
        "usernameCaseSensitive": {
          "type": "boolean"
        },
        "verificationBucketName": {
          "type": "string"
        },
        "resourceNameTruncated": {
          "type": "string"
        },
        "sharedId": {
          "type": "string"
        },
        "userpoolClientGenerateSecret": {
          "type": "boolean"
        },
        "userpoolClientLambdaRole": {
          "type": "string"
        },
        "useEnabledMfas": {
          "type": "boolean"
        }
      },
      "required": ["authSelections", "resourceName", "serviceName", "useDefault"]
    },
    "OAuthResult": {
      "type": "object",
      "properties": {
        "hostedUI": {
          "type": "boolean"
        },
        "hostedUIDomainName": {
          "type": "string"
        },
        "hostedUIProviderMeta": {},
        "hostedUIProviderCreds": {},
        "AllowedOAuthFlows": {
          "enum": ["code", "implicit"],
          "type": "string"
        },
        "AllowedOAuthScopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "newCallbackURLs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "newLogoutURLs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "oAuthMetadata": {}
      }
    },
    "SocialProviderResult": {
      "type": "object",
      "properties": {
        "authProvidersUserPool": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "facebookAppIdUserPool": {
          "type": "string"
        },
        "facebookAppSecretUserPool": {
          "type": "string"
        },
        "googleAppIdUserPool": {
          "type": "string"
        },
        "googleAppSecretUserPool": {
          "type": "string"
        },
        "loginwithamazonAppIdUserPool": {
          "type": "string"
        },
        "loginwithamazonAppSecretUserPool": {
          "type": "string"
        },
        "signinwithappleClientIdUserPool": {
          "type": "string"
        },
        "signinwithappleTeamIdUserPool": {
          "type": "string"
        },
        "signinwithappleKeyIdUserPool": {
          "type": "string"
        },
        "signinwithapplePrivateKeyUserPool": {
          "type": "string"
        }
      }
    },
    "IdentityPoolResult": {
      "type": "object",
      "properties": {
        "thirdPartyAuth": {
          "type": "boolean"
        },
        "identityPoolName": {
          "type": "string"
        },
        "allowUnauthenticatedIdentities": {
          "type": "boolean"
        },
        "authProviders": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "googleClientId": {
          "type": "string"
        },
        "googleIos": {
          "type": "string"
        },
        "googleAndroid": {
          "type": "string"
        },
        "facebookAppId": {
          "type": "string"
        },
        "amazonAppId": {
          "type": "string"
        },
        "appleAppId": {
          "type": "string"
        },
        "selectedParties": {
          "type": "string"
        },
        "audiences": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "PasswordPolicyResult": {
      "type": "object",
      "properties": {
        "passwordPolicyCharacters": {
          "type": "array",
          "items": {
            "enum": ["Requires Lowercase", "Requires Numbers", "Requires Symbols", "Requires Uppercase"],
            "type": "string"
          }
        },
        "passwordPolicyMinLength": {
          "type": ["string", "number"]
        }
      }
    },
    "PasswordRecoveryResult": {
      "type": "object",
      "properties": {
        "emailVerificationMessage": {
          "type": "string"
        },
        "emailVerificationSubject": {
          "type": "string"
        },
        "smsVerificationMessage": {
          "type": "string"
        },
        "autoVerifiedAttributes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "MfaResult": {
      "type": "object",
      "properties": {
        "mfaConfiguration": {
          "enum": ["OFF", "ON", "OPTIONAL"],
          "type": "string"
        },
        "mfaTypes": {
          "type": "array",
          "items": {
            "enum": ["SMS Text Message", "TOTP"],
            "type": "string"
          }
        },
        "smsAuthenticationMessage": {
          "type": "string"
        }
      }
    },
    "AdminQueriesResult": {
      "type": "object",
      "properties": {
        "adminQueries": {
          "type": "boolean"
        },
        "adminQueryGroup": {
          "type": "string"
        }
      }
    },
    "Triggers": {
      "type": "object",
      "properties": {
        "triggers": {}
      }
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
