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

com.iovation.launchkey.sdk.domain.service.AuthorizationRequest Maven / Gradle / Ivy

Go to download

SDK for interacting with the LaunchKey distributed authentication and authorization platform

There is a newer version: 4.10.0
Show newest version
package com.iovation.launchkey.sdk.domain.service;

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

/**
 * Object that represents an authorization request
 */
public class AuthorizationRequest {

    /**
     * Unique identifier for the authorization request generated by the LaunchKey API.
     */
    private final String id;

    /**
     * Push package to be sent to Devices when managing your own Device push notifications.
     */
    private final String pushPackage;

    /**
     * Device IDs for Devices that may respond to the authorization request. This will be null when requests are made
     * for Organization Services
     */
    private List deviceIds;

    /**
     *
     * @param id Unique identifier for the authorization request generated by the LaunchKey API.
     * @param pushPackage Push package to be sent to Devices when managing your own Device push notifications.
     */
    public AuthorizationRequest(String id, String pushPackage, List deviceIds) {
        this.id = id;
        this.pushPackage = pushPackage;
        this.deviceIds = deviceIds;
    }

    /**
     * Unique identifier for the authorization request generated by the LaunchKey API.
     * @return Authorization request ID
     */
    public String getId() {
        return id;
    }

    /**
     * Push package to be sent to Devices when managing your own Device push notifications.
     * @return Push package
     */
    public String getPushPackage() {
        return pushPackage;
    }

    /**
     * Device IDs for Devices that may respond to the authorization request. This will be null when requests are made
     * for an Organization Service
     * @return List of Device IDs
     */
    public List getDeviceIds() {
        return deviceIds;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AuthorizationRequest that = (AuthorizationRequest) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(pushPackage, that.pushPackage) &&
                Objects.equals(deviceIds, that.deviceIds);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, pushPackage, deviceIds);
    }

    @Override
    public String toString() {
        return "AuthorizationRequest{" +
                "id='" + id + '\'' +
                ", pushPackage='" + pushPackage + '\'' +
                ", deviceIds=" + deviceIds +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy