com.dke.data.agrirouter.api.service.parameters.CloudOnboardingParameters.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agrirouter-api-java-api Show documentation
Show all versions of agrirouter-api-java-api Show documentation
This project contains the API for the communication with the agrirouter. Everything you need for the onboarding process, secure communication and much more.
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
}
}