Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable automatic formatting of generated code #33

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,6 @@
</execution>
</executions>
</plugin>
<!-- skip spotless-maven-plugin -->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
3 changes: 2 additions & 1 deletion core/src/main/java/com/sap/ai/sdk/core/Core.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public static ApiClient getOrchestrationClient(@Nonnull final String resourceGro
*/
private static String getOrchestrationDeployment(@Nonnull final String resourceGroup)
throws NoSuchElementException {
final var deployments = new DeploymentApi(getClient(getDestination())).deploymentQuery(resourceGroup);
final var deployments =
new DeploymentApi(getClient(getDestination())).deploymentQuery(resourceGroup);

return deployments.getResources().stream()
.filter(deployment -> "orchestration".equals(deployment.getScenarioId()))
Expand Down
1,167 changes: 677 additions & 490 deletions core/src/main/java/com/sap/ai/sdk/core/client/ApplicationApi.java

Large diffs are not rendered by default.

760 changes: 438 additions & 322 deletions core/src/main/java/com/sap/ai/sdk/core/client/ArtifactApi.java

Large diffs are not rendered by default.

707 changes: 403 additions & 304 deletions core/src/main/java/com/sap/ai/sdk/core/client/ConfigurationApi.java

Large diffs are not rendered by default.

1,275 changes: 738 additions & 537 deletions core/src/main/java/com/sap/ai/sdk/core/client/DeploymentApi.java

Large diffs are not rendered by default.

Large diffs are not rendered by default.

374 changes: 207 additions & 167 deletions core/src/main/java/com/sap/ai/sdk/core/client/ExecutableApi.java

Large diffs are not rendered by default.

1,286 changes: 743 additions & 543 deletions core/src/main/java/com/sap/ai/sdk/core/client/ExecutionApi.java

Large diffs are not rendered by default.

876 changes: 502 additions & 374 deletions core/src/main/java/com/sap/ai/sdk/core/client/ExecutionScheduleApi.java

Large diffs are not rendered by default.

560 changes: 324 additions & 236 deletions core/src/main/java/com/sap/ai/sdk/core/client/FileApi.java

Large diffs are not rendered by default.

217 changes: 118 additions & 99 deletions core/src/main/java/com/sap/ai/sdk/core/client/KpiApi.java
Original file line number Diff line number Diff line change
@@ -1,116 +1,135 @@


package com.sap.ai.sdk.core.client;

import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;
import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse;
import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;

import com.google.common.annotations.Beta;
import com.sap.ai.sdk.core.client.model.KpiColumnName;
import com.sap.ai.sdk.core.client.model.KpiGet400Response;
import com.sap.ai.sdk.core.client.model.KpiResultSet;
import java.util.Set;

import java.util.HashMap;
import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;
import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.util.UriComponentsBuilder;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.annotations.Beta;

import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.util.UriComponentsBuilder;

/**
* AI Core in version 2.33.0.
*
* Provides tools to manage your scenarios and workflows in SAP AI Core. Execute pipelines as a batch job, for example to pre-process or train your models, or perform batch inference. Serve inference requests of trained models. Deploy а trained machine learning model as a web service to serve inference requests with high performance. Register your own Docker registry, synchronize your AI content from your own git repository, and register your own object store for training data and trained models.
* <p>Provides tools to manage your scenarios and workflows in SAP AI Core. Execute pipelines as a
* batch job, for example to pre-process or train your models, or perform batch inference. Serve
* inference requests of trained models. Deploy а trained machine learning model as a web service to
* serve inference requests with high performance. Register your own Docker registry, synchronize
* your AI content from your own git repository, and register your own object store for training
* data and trained models.
*/
public class KpiApi extends AbstractOpenApiService {
/**
* Instantiates this API class to invoke operations on the AI Core.
*
* @param httpDestination The destination that API should be used with
*/
public KpiApi( @Nonnull final Destination httpDestination )
{
super(httpDestination);
}

/**
* Instantiates this API class to invoke operations on the AI Core based on a given {@link ApiClient}.
*
* @param apiClient
* ApiClient to invoke the API on
*/
@Beta
public KpiApi( @Nonnull final ApiClient apiClient )
{
super(apiClient);
}


/**
* <p>Get KPIs</p>
*<p>Retrieve the number of executions, artifacts, and deployments for each resource group, scenario, and executable. The columns to be returned can be specified in a query parameter. </p>
* <p><b>200</b> - KPIs
* <p><b>400</b> - Invalid request
* <p><b>404</b> - The specified resource was not found
* <p><b>429</b> - Too many requests
* @param $select (optional
Columns to select
* @return KpiResultSet
* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
*/
@Nonnull
public KpiResultSet kpiGet( @Nullable final Set<KpiColumnName> $select) throws OpenApiRequestException {
final Object localVarPostBody = null;

final String localVarPath = UriComponentsBuilder.fromPath("/analytics/kpis").build().toUriString();

final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();

localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "$select", $select));


final String[] localVarAccepts = {
"application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

final String[] localVarAuthNames = new String[] { "Oauth2" };

final ParameterizedTypeReference<KpiResultSet> localVarReturnType = new ParameterizedTypeReference<KpiResultSet>() {};
return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}

/**
* <p>Get KPIs</p>
* <p>Retrieve the number of executions, artifacts, and deployments for each resource group, scenario, and executable. The columns to be returned can be specified in a query parameter. </p>
* <p><b>200</b> - KPIs
* <p><b>400</b> - Invalid request
* <p><b>404</b> - The specified resource was not found
* <p><b>429</b> - Too many requests
* @return KpiResultSet
* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
*/
@Nonnull
public KpiResultSet kpiGet() throws OpenApiRequestException {
return kpiGet(null);
}
/**
* Instantiates this API class to invoke operations on the AI Core.
*
* @param httpDestination The destination that API should be used with
*/
public KpiApi(@Nonnull final Destination httpDestination) {
super(httpDestination);
}

/**
* Instantiates this API class to invoke operations on the AI Core based on a given {@link
* ApiClient}.
*
* @param apiClient ApiClient to invoke the API on
*/
@Beta
public KpiApi(@Nonnull final ApiClient apiClient) {
super(apiClient);
}

/**
* Get KPIs
*
* <p>Retrieve the number of executions, artifacts, and deployments for each resource group,
* scenario, and executable. The columns to be returned can be specified in a query parameter.
*
* <p><b>200</b> - KPIs
*
* <p><b>400</b> - Invalid request
*
* <p><b>404</b> - The specified resource was not found
*
* <p><b>429</b> - Too many requests
*
* @param $select (optional Columns to select
* @return KpiResultSet
* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
*/
@Nonnull
public KpiResultSet kpiGet(@Nullable final Set<KpiColumnName> $select)
throws OpenApiRequestException {
final Object localVarPostBody = null;

final String localVarPath =
UriComponentsBuilder.fromPath("/analytics/kpis").build().toUriString();

final MultiValueMap<String, String> localVarQueryParams =
new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, Object> localVarFormParams =
new LinkedMultiValueMap<String, Object>();

localVarQueryParams.putAll(
apiClient.parameterToMultiValueMap(
ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)),
"$select",
$select));

final String[] localVarAccepts = {"application/json"};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

final String[] localVarAuthNames = new String[] {"Oauth2"};

final ParameterizedTypeReference<KpiResultSet> localVarReturnType =
new ParameterizedTypeReference<KpiResultSet>() {};
return apiClient.invokeAPI(
localVarPath,
HttpMethod.GET,
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}

/**
* Get KPIs
*
* <p>Retrieve the number of executions, artifacts, and deployments for each resource group,
* scenario, and executable. The columns to be returned can be specified in a query parameter.
*
* <p><b>200</b> - KPIs
*
* <p><b>400</b> - Invalid request
*
* <p><b>404</b> - The specified resource was not found
*
* <p><b>429</b> - Too many requests
*
* @return KpiResultSet
* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
*/
@Nonnull
public KpiResultSet kpiGet() throws OpenApiRequestException {
return kpiGet(null);
}
}
Loading