Package overit.geocallapp.wfm.ai.rs.v1
Class AIApi
java.lang.Object
overit.geocallapp.wfm.ai.rs.v1.AIApi
- Direct Known Subclasses:
AIChatbotApi,AIModelsApi,AIPredictionAPI,AIProcessingApi,AITrainingApi
Basic API class containing the methods shared between all the AI Api.
- Since:
- 13.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected M2Mapperprotected final SimpleDateFormat -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected URIbuildUriForSpringClient(String pathApi, RequestJobParams params) Method that builds the URI for the Spring RestClient.abstract voiddeleteJob(AWSRequestHeaders headers, String predictionJobId) protected org.springframework.web.client.RestClient.Builderprotected Stringprotected StringgetEncodedUrl(String pathApi, RequestJobParams params) abstract ObjectgetJob(AWSRequestHeaders headers, String predictionJobId) abstract List<SagemakerJobStatus> getJobs(AWSRequestHeaders headers) getMultiHeaders(AWSRequestHeaders headers) getMultiParams(RequestJobParams params) protected StringgetPath()protected StringmanageFileResult(AWSRequestHeaders headers, String fileToDownload) abstract SagemakerJobStatusstartJob(AWSRequestHeaders headers, RequestJobParams params, Object body)
-
Field Details
-
mapper
-
sdf
-
AWS_SERVICE_NAME
- See Also:
-
-
Constructor Details
-
AIApi
public AIApi()
-
-
Method Details
-
getPath
-
getScheme
-
getDomain
-
getAIRestClientBuilder
protected org.springframework.web.client.RestClient.Builder getAIRestClientBuilder(AWSRestClientAuthStrategy strategy) -
manageFileResult
protected List<Map<String,Object>> manageFileResult(AWSRequestHeaders headers, String fileToDownload) throws IOException, DAValidateException - Throws:
IOExceptionDAValidateException
-
getMultiHeaders
protected org.springframework.util.MultiValueMap<String,String> getMultiHeaders(AWSRequestHeaders headers) -
getMultiParams
protected org.springframework.util.MultiValueMap<String,String> getMultiParams(RequestJobParams params) -
getEncodedUrl
-
buildUriForSpringClient
Method that builds the URI for the Spring RestClient.- Parameters:
pathApi- the service pathparams- the query params- Returns:
- a URI object with the service path and query params encoded if present
-
getJobs
public abstract List<SagemakerJobStatus> getJobs(AWSRequestHeaders headers) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
getJob
public abstract Object getJob(AWSRequestHeaders headers, String predictionJobId) throws DAValidateException, DAException, IOException -
startJob
public abstract SagemakerJobStatus startJob(AWSRequestHeaders headers, RequestJobParams params, Object body) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
deleteJob
public abstract void deleteJob(AWSRequestHeaders headers, String predictionJobId) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-