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

import Foundation



public struct OBWriteDataFileConsentResponse2: Codable {

    /** OB: Unique identification as assigned by the ASPSP to uniquely identify the consent resource. */
    public var consentId: String
    /** Date and time at which the resource was created. All dates in the JSON payloads are represented in ISO 8601 date-time format.  All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00 */
    public var creationDateTime: Date
    public var status: OBExternalConsentStatus2Code
    /** Date and time at which the consent resource status was updated. All dates in the JSON payloads are represented in ISO 8601 date-time format.  All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00 */
    public var statusUpdateDateTime: Date
    /** Specified cut-off date and time for the payment consent. All dates in the JSON payloads are represented in ISO 8601 date-time format.  All date-time fields in responses must include the timezone. An example is below: 2017-04-05T10:43:07+00:00 */
    public var cutOffDateTime: Date?
    /** Set of elements used to provide details of a charge for the payment initiation. */
    public var charges: [OBCharge2]?
    public var initiation: OBFile2
    public var authorisation: OBAuthorisation1?

    public init(consentId: String, creationDateTime: Date, status: OBExternalConsentStatus2Code, statusUpdateDateTime: Date, cutOffDateTime: Date?, charges: [OBCharge2]?, initiation: OBFile2, authorisation: OBAuthorisation1?) {
        self.consentId = consentId
        self.creationDateTime = creationDateTime
        self.status = status
        self.statusUpdateDateTime = statusUpdateDateTime
        self.cutOffDateTime = cutOffDateTime
        self.charges = charges
        self.initiation = initiation
        self.authorisation = authorisation
    }

    public enum CodingKeys: String, CodingKey { 
        case consentId = "ConsentId"
        case creationDateTime = "CreationDateTime"
        case status = "Status"
        case statusUpdateDateTime = "StatusUpdateDateTime"
        case cutOffDateTime = "CutOffDateTime"
        case charges = "Charges"
        case initiation = "Initiation"
        case authorisation = "Authorisation"
    }


}

