=begin #Onfido API v3.6 #The Onfido API (v3.6) The version of the OpenAPI document: v3.6 Generated by: https://openapi-generator.tech Generator version: 7.9.0 =end require 'date' require 'time' module Onfido module Report class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ :'DeviceIntelligenceReport', :'DocumentReport', :'DocumentVideoReport', :'DocumentVideoWithAddressInformationReport', :'DocumentWithAddressInformationReport', :'DocumentWithDriverVerificationReport', :'DocumentWithDrivingLicenceInformationReport', :'FacialSimilarityMotionReport', :'FacialSimilarityPhotoFullyAutoReport', :'FacialSimilarityPhotoReport', :'FacialSimilarityVideoReport', :'IdentityEnhancedReport', :'IndiaPanReport', :'KnownFacesReport', :'ProofOfAddressReport', :'UsDrivingLicenceReport', :'WatchlistAmlReport', :'WatchlistEnhancedReport', :'WatchlistPepsOnlyReport', :'WatchlistSanctionsOnlyReport', :'WatchlistStandardReport' ] end # Discriminator's property name (OpenAPI v3) def openapi_discriminator_name :'name' end # Discriminator's mapping (OpenAPI v3) def openapi_discriminator_mapping { :'device_intelligence' => :'DeviceIntelligenceReport', :'document' => :'DocumentReport', :'document_video' => :'DocumentVideoReport', :'document_video_with_address_information' => :'DocumentVideoWithAddressInformationReport', :'document_with_address_information' => :'DocumentWithAddressInformationReport', :'document_with_driver_verification' => :'DocumentWithDriverVerificationReport', :'document_with_driving_licence_information' => :'DocumentWithDrivingLicenceInformationReport', :'facial_similarity_motion' => :'FacialSimilarityMotionReport', :'facial_similarity_photo' => :'FacialSimilarityPhotoReport', :'facial_similarity_photo_fully_auto' => :'FacialSimilarityPhotoFullyAutoReport', :'facial_similarity_video' => :'FacialSimilarityVideoReport', :'identity_enhanced' => :'IdentityEnhancedReport', :'india_pan' => :'IndiaPanReport', :'known_faces' => :'KnownFacesReport', :'proof_of_address' => :'ProofOfAddressReport', :'us_driving_licence' => :'UsDrivingLicenceReport', :'watchlist_aml' => :'WatchlistAmlReport', :'watchlist_enhanced' => :'WatchlistEnhancedReport', :'watchlist_peps_only' => :'WatchlistPepsOnlyReport', :'watchlist_sanctions_only' => :'WatchlistSanctionsOnlyReport', :'watchlist_standard' => :'WatchlistStandardReport' } end # Builds the object # @param [Mixed] Data to be matched against the list of oneOf items # @return [Object] Returns the model or the data itself def build(data) discriminator_value = data[openapi_discriminator_name] return nil if discriminator_value.nil? klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym] return nil unless klass Onfido.const_get(klass).build_from_hash(data) end end end end