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

com.dke.data.agrirouter.api.service.parameters.CloudOnboardingParameters.kt Maven / Gradle / Ivy

Go to download

This project contains the API for the communication with the agrirouter. Everything you need for the onboarding process, secure communication and much more.

There is a newer version: 1.0.0-jdk11-RC1
Show newest version
package com.dke.data.agrirouter.api.service.parameters

import com.dke.data.agrirouter.api.dto.onboard.OnboardingResponse
import com.dke.data.agrirouter.api.exception.IllegalParameterDefinitionException
import com.dke.data.agrirouter.api.service.ParameterValidation
import com.dke.data.agrirouter.api.service.parameters.base.AbstractParameterBase
import lombok.ToString
import javax.validation.constraints.NotNull

/**
 * Parameters class. Encapsulation for the services.
 */
@ToString
class CloudOnboardingParameters : AbstractParameterBase(), ParameterValidation {

    @NotNull
    lateinit var onboardingResponse: OnboardingResponse

    @NotNull
    lateinit var endpointDetails: List

    override fun validate() {
        super.validate()
        if (endpointDetails.isEmpty()) {
            throw IllegalParameterDefinitionException("There have to be endpoint details to onboard.")
        }
    }

    class EndpointDetailsParameters {

        @org.jetbrains.annotations.NotNull
        lateinit var endpointId: String

        @org.jetbrains.annotations.NotNull
        lateinit var endpointName: String

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy