//
// UsAPI.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//

import Foundation
import Alamofire



open class UsAPI {
    /**
     Read User
     
     - parameter username: (path)  
     - parameter completion: completion handler to receive the data and the error objects
     */
    open class func readUserImageImageUncolorizationUsersUsernamePost(username: String, completion: @escaping ((_ data: Any?,_ error: Error?) -> Void)) {
        readUserImageImageUncolorizationUsersUsernamePostWithRequestBuilder(username: username).execute { (response, error) -> Void in
            completion(response?.body, error)
        }
    }

    /**
     Read User
     - POST /image/image/uncolorization/users/{username}
     - parameter username: (path)  
     - returns: RequestBuilder<Any> 
     */
    open class func readUserImageImageUncolorizationUsersUsernamePostWithRequestBuilder(username: String) -> RequestBuilder<Any> {
        var path = "/image/image/uncolorization/users/{username}"
        let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))"
        let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
        path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil)
        let URLString = OpenAPIClientAPI.basePath + path
        let parameters: [String:Any]? = nil
        
        let url = URLComponents(string: URLString)

        let requestBuilder: RequestBuilder<Any>.Type = OpenAPIClientAPI.requestBuilderFactory.getBuilder()

        return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
    }

}
