Class SapLoginClient
java.lang.Object
com.developer.nefarious.zjoule.plugin.login.api.SapLoginClient
- All Implemented Interfaces:
ISapLoginClient
Implements the
ISapLoginClient
interface for managing API interactions related to login operations.
The LoginClient
class communicates with SAP AI Core APIs to retrieve deployments
and resource groups, leveraging an IAuthClient
for authentication and an ISapLoginClientHelper
for building requests and parsing responses.
-
Constructor Summary
ConstructorDescriptionSapLoginClient
(ISapLoginClientHelper sapLoginClientHelper, IAuthClient authClient) Constructs a newLoginClient
instance. -
Method Summary
Modifier and TypeMethodDescriptiongetDeployments
(ServiceKey serviceKey, String resourceGroup) Retrieves a list of deployments from the SAP AI Core API.getResourceGroups
(ServiceKey serviceKey) Retrieves a list of resource groups from the SAP AI Core API.
-
Constructor Details
-
SapLoginClient
Constructs a newLoginClient
instance.- Parameters:
sapLoginClientHelper
- the helper for constructing requests and parsing responses.authClient
- the authentication client for retrieving access tokens.
-
-
Method Details
-
getDeployments
public GetDeploymentsResponse getDeployments(ServiceKey serviceKey, String resourceGroup) throws IOException, InterruptedException Retrieves a list of deployments from the SAP AI Core API.- Specified by:
getDeployments
in interfaceISapLoginClient
- Parameters:
serviceKey
- theServiceKey
containing credentials and service information.resourceGroup
- the resource group for which deployments are to be retrieved.- Returns:
- a
GetDeploymentsResponse
containing the deployments data. - Throws:
IOException
- if an I/O error occurs during the request.InterruptedException
- if the request is interrupted.
-
getResourceGroups
public GetResourceGroupsResponse getResourceGroups(ServiceKey serviceKey) throws IOException, InterruptedException Retrieves a list of resource groups from the SAP AI Core API.- Specified by:
getResourceGroups
in interfaceISapLoginClient
- Parameters:
serviceKey
- theServiceKey
containing credentials and service information.- Returns:
- a
GetResourceGroupsResponse
containing the resource groups data. - Throws:
IOException
- if an I/O error occurs during the request.InterruptedException
- if the request is interrupted.
-