//
// VariableNameTest.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation


/** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 4 reserved words. */

open class VariableNameTest: Codable {

    /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */
    public var exampleName: String?
    /** This property name is a reserved word in most languages, including Swift 4. */
    public var _for: String?


    public init(exampleName: String?, _for: String?) {
        self.exampleName = exampleName
        self._for = _for
    }

    // Encodable protocol methods

    public func encode(to encoder: Encoder) throws {

        var container = encoder.container(keyedBy: String.self)

        try container.encodeIfPresent(exampleName, forKey: "example_name")
        try container.encodeIfPresent(_for, forKey: "for")
    }

    // Decodable protocol methods

    public required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: String.self)

        exampleName = try container.decodeIfPresent(String.self, forKey: "example_name")
        _for = try container.decodeIfPresent(String.self, forKey: "for")
    }
}

