<commit_before>//
//  ErrorCode.swift
//  VimeoNetworking
//
//  Created by Huebner, Rob on 4/25/16.
//  Copyright © 2016 Vimeo. All rights reserved.
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//

import Foundation

/// `VimeoErrorCode` contains all api error codes that are currently recognized by our client applications
public enum VimeoErrorCode: Int
{
    // Upload
    case UploadStorageQuotaExceeded = 4101
    case UploadDailyQuotaExceeded = 4102
    
    case InvalidRequestInput = 2204 // root error code for all invalid parameters errors below
    
    // Password-protected video playback
    case VideoPasswordIncorrect = 2222
    case NoVideoPasswordProvided = 2223
    
    // Authentication
    case EmailTooLong = 2216
    case PasswordTooShort = 2210
    case PasswordTooSimple = 2211
    case NameInPassword = 2212
    case EmailNotRecognized = 2217
    case PasswordEmailMismatch = 2218
    case NoPasswordProvided = 2209
    case NoEmailProvided = 2214
    case InvalidEmail = 2215
    case NoNameProvided = 2213
    case NameTooLong = 2208
    case FacebookJoinInvalidToken = 2303
    case FacebookJoinNoToken = 2306
    case FacebookJoinMissingProperty = 2304
    case FacebookJoinMalformedToken = 2305
    case FacebookJoinDecryptFail = 2307
    case FacebookJoinTokenTooLong = 2308
    case FacebookLoginNoToken = 2312
    case FacebookLoginMissingProperty = 2310
    case FacebookLoginMalformedToken = 2311
    case FacebookLoginDecryptFail = 2313
    case FacebookLoginTokenTooLong = 2314
    case FacebookInvalidInputGrantType = 2221
    case FacebookJoinValidateTokenFail = 2315
    case FacebookInvalidNoInput = 2207
    case FacebookInvalidToken = 2300
    case FacebookMissingProperty = 2301
    case FacebookMalformedToken = 2302
    case EmailAlreadyRegistered = 2400
    case EmailBlocked = 2401
    case EmailSpammer = 2402
    case EmailPurgatory = 2403
    case URLUnavailable = 2404
    case Timeout = 5000
    case TokenNotGenerated = 5001
    case DRMStreamLimitHit = 3420
    case DRMDeviceLimitHit = 3421

    // Batch follow
    case BatchUserDoesNotExist = 2900
    case BatchFollowUserRequestExceeded = 2901
    case BatchSubscribeChannelRequestExceeded = 2902
    case BatchChannelDoesNotExist = 2903
    case UserNotAllowedToFollowUsers = 3417
    case UserNotAllowedToFollowChannels = 3418
    case BatchFollowUserRequestFailed = 4005
    case BatchSubscribeChannelRequestFailed = 4006
}

/// `HTTPStatusCode` contains HTTP status code constants used to inspect response status
public enum HTTPStatusCode: Int
{
    case ServiceUnavailable = 503
    case BadRequest = 400
    case Unauthorized = 401
    case Forbidden = 403
    case NotFound = 404
}<commit_msg>Add error code for unverified users.<commit_after>//
//  ErrorCode.swift
//  VimeoNetworking
//
//  Created by <NAME> 4/25/16.
//  Copyright © 2016 Vimeo. All rights reserved.
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//

import Foundation

/// `VimeoErrorCode` contains all api error codes that are currently recognized by our client applications
public enum VimeoErrorCode: Int
{
    // Upload
    case UploadStorageQuotaExceeded = 4101
    case UploadDailyQuotaExceeded = 4102
    
    case InvalidRequestInput = 2204 // root error code for all invalid parameters errors below
    
    // Password-protected video playback
    case VideoPasswordIncorrect = 2222
    case NoVideoPasswordProvided = 2223
    
    // Authentication
    case EmailTooLong = 2216
    case PasswordTooShort = 2210
    case PasswordTooSimple = 2211
    case NameInPassword = <PASSWORD>
    case EmailNotRecognized = 2217
    case PasswordEmailMismatch = 2218
    case NoPasswordProvided = 2209
    case NoEmailProvided = 2214
    case InvalidEmail = 2215
    case NoNameProvided = 2213
    case NameTooLong = 2208
    case FacebookJoinInvalidToken = 2303
    case FacebookJoinNoToken = 2306
    case FacebookJoinMissingProperty = 2304
    case FacebookJoinMalformedToken = 2305
    case FacebookJoinDecryptFail = 2307
    case FacebookJoinTokenTooLong = 2308
    case FacebookLoginNoToken = 2312
    case FacebookLoginMissingProperty = 2310
    case FacebookLoginMalformedToken = 2311
    case FacebookLoginDecryptFail = 2313
    case FacebookLoginTokenTooLong = 2314
    case FacebookInvalidInputGrantType = 2221
    case FacebookJoinValidateTokenFail = 2315
    case FacebookInvalidNoInput = 2207
    case FacebookInvalidToken = 2300
    case FacebookMissingProperty = 2301
    case FacebookMalformedToken = 2302
    case EmailAlreadyRegistered = 2400
    case EmailBlocked = 2401
    case EmailSpammer = 2402
    case EmailPurgatory = 2403
    case URLUnavailable = 2404
    case Timeout = 5000
    case TokenNotGenerated = 5001
    case DRMStreamLimitHit = 3420
    case DRMDeviceLimitHit = 3421
    case UnverifiedUser = 3411

    // Batch follow
    case BatchUserDoesNotExist = 2900
    case BatchFollowUserRequestExceeded = 2901
    case BatchSubscribeChannelRequestExceeded = 2902
    case BatchChannelDoesNotExist = 2903
    case UserNotAllowedToFollowUsers = 3417
    case UserNotAllowedToFollowChannels = 3418
    case BatchFollowUserRequestFailed = 4005
    case BatchSubscribeChannelRequestFailed = 4006
}

/// `HTTPStatusCode` contains HTTP status code constants used to inspect response status
public enum HTTPStatusCode: Int
{
    case ServiceUnavailable = 503
    case BadRequest = 400
    case Unauthorized = 401
    case Forbidden = 403
    case NotFound = 404
}
{'fraction_non_alphanumeric': 0.04717853839037928, 'fraction_numerical': 0.05920444033302498, 'mean_word_length': 3.5020820939916715, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '236129', 'n_tokens_mistral': 2386, 'n_tokens_neox': 2000, 'n_words': 794}