All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.memority.citadel.shared.api.im.MyMFASyncResponse Maven / Gradle / Ivy

Go to download

This artifact provides the API classes that are necessary to implement general configuration Rules on the Memority IM platform.

There is a newer version: 3.43.1
Show newest version
/*
 * Copyright (c) 2016-2023 Memority. All Rights Reserved.
 *
 * This file is part of Memority Citadel API , a Memority project.
 *
 * This file is released under the Memority Public Artifacts End-User License Agreement,
 * see 
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 */
package com.memority.citadel.shared.api.im;

import lombok.AllArgsConstructor;
import lombok.Data;

import com.memority.toolkit.inwebo.api.DeviceType;

import java.util.ArrayList;
import java.util.List;

/**
 * Response object to an inwebo synchronization request.
 *
 * @see MyMFASyncRequest
 */
@Data
public class MyMFASyncResponse {

    private MyMFASyncMode syncMode;

    private MyMFASyncDeviceCategory deviceCategory;

    private String inweboLogin; // TODO 9249 MOB dto need to be adapted

    private List devices = new ArrayList<>();

    public static MyMFASyncResponse fromRequest(MyMFASyncRequest request) {
        MyMFASyncResponse syncResponse = new MyMFASyncResponse();
        syncResponse.syncMode = request.getSyncMode();
        syncResponse.deviceCategory = request.getDeviceCategory();
        syncResponse.inweboLogin = request.getInweboLogin();
        return syncResponse;
    }

    @Data
    @AllArgsConstructor
    public static class SyncResponseDevice {
        private Long id;
        private String name;
        private String alias;
        private DeviceType deviceType;
        private DeviceSyncStatus status;
    }

    /**
     * Status of a Device after reconciliation:
     *
     * OK: The Device has been found on the InWebo Server.
     * UNKNOWN: The Device has not been found on the InWebo Server.
     * MISSING: The Device has been found on the InWebo Server but was not in the request.
     */
    public enum DeviceSyncStatus {
        OK,
        UNKNOWN,
        MISSING
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy