//
// Copyright © 2023 Nevis Security AG. All rights reserved.
//

import NevisMobileAuthentication

struct DeviceInformationChangeMethodHandler: MethodHandler {
	func execute(using client: MobileAuthenticationClient, with message: ChannelInMessage) {
		let message: DeviceInformationChangeMessage = validate(message: message)
		let operation = DeviceInformationChangeOperation(operationId: message.operationId)
		OperationCache.shared.put(operation, using: message.operationId)

		client.operations.deviceInformationChange
			.configure(by: message, operation: operation)
			.execute()
	}
}
