//
// Autogenerated by Scrooge
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
import Foundation
import TwitterApacheThrift
enum Day: Int32, ThriftCodable {
  case mon = 1
  case tue = 2

  func thriftEncode(to encoder: ThriftEncoder) throws {
     var container = encoder.unkeyedContainer()
     try container.encode(self.rawValue)
  }

  init(fromThrift decoder: ThriftDecoder) throws {
    var container = try decoder.unkeyedContainer()
    let value = try container.decode(Int32.self)
    guard let enumValue = Day(rawValue: value) else {
      throw ThriftDecoderError.undecodableType(type: value.self)
    }
    self = enumValue
  }

  static func thriftType() -> ThriftType {
    return .int32
  }
}
