Skip to content

feat: [DevOps] Update document-grounding specification #515

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

Closed
wants to merge 3 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.sap.ai.sdk.grounding.model.GetPipelineExecutions;
import com.sap.ai.sdk.grounding.model.GetPipelineStatus;
import com.sap.ai.sdk.grounding.model.GetPipelines;
import com.sap.ai.sdk.grounding.model.ManualPipelineTrigger;
import com.sap.ai.sdk.grounding.model.PipelineDocumentResponse;
import com.sap.ai.sdk.grounding.model.PipelineId;
import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
Expand Down Expand Up @@ -1002,4 +1003,72 @@ public GetPipelineStatus getPipelineStatus(
localVarAuthNames,
localVarReturnType);
}

/**
* Pipeline Trigger
*
* <p>Manually trigger a pipeline
*
* <p><b>202</b> - Accepted
*
* <p><b>400</b> - The specification of the resource was incorrect
*
* @param aiResourceGroup Resource Group ID
* @param manualPipelineTrigger The value for the parameter manualPipelineTrigger
* @return An OpenApiResponse containing the status code of the HttpResponse.
* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
*/
@Nonnull
public OpenApiResponse manualTriggerPipeline(
@Nonnull final String aiResourceGroup,
@Nonnull final ManualPipelineTrigger manualPipelineTrigger)
throws OpenApiRequestException {
final Object localVarPostBody = manualPipelineTrigger;

// verify the required parameter 'aiResourceGroup' is set
if (aiResourceGroup == null) {
throw new OpenApiRequestException(
"Missing the required parameter 'aiResourceGroup' when calling manualTriggerPipeline");
}

// verify the required parameter 'manualPipelineTrigger' is set
if (manualPipelineTrigger == null) {
throw new OpenApiRequestException(
"Missing the required parameter 'manualPipelineTrigger' when calling pipelineV1PipelineEndpointsTriggerPipeline");
}

final String localVarPath =
UriComponentsBuilder.fromPath("/pipelines/trigger").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>();

if (aiResourceGroup != null)
localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup));

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

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

final ParameterizedTypeReference<Void> localVarReturnType =
new ParameterizedTypeReference<Void>() {};
apiClient.invokeAPI(
localVarPath,
HttpMethod.POST,
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new OpenApiResponse(apiClient);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
@JsonSubTypes({
@JsonSubTypes.Type(value = MSSharePointPipelineCreateRequest.class, name = "MSSharePoint"),
@JsonSubTypes.Type(value = S3PipelineCreateRequest.class, name = "S3"),
@JsonSubTypes.Type(value = SDMPipelineCreateRequest.class, name = "SDM"),
@JsonSubTypes.Type(value = SFTPPipelineCreateRequest.class, name = "SFTP"),
@JsonSubTypes.Type(value = WorkZonePipelineCreateRequest.class, name = "WorkZone"),
@JsonSubTypes.Type(
value = MSSharePointPipelineCreateRequest.class,
name = "MSSharePointPipelineCreateRequest"),
@JsonSubTypes.Type(value = S3PipelineCreateRequest.class, name = "S3PipelineCreateRequest"),
@JsonSubTypes.Type(value = SDMPipelineCreateRequest.class, name = "SDMPipelineCreateRequest"),
@JsonSubTypes.Type(value = SFTPPipelineCreateRequest.class, name = "SFTPPipelineCreateRequest"),
@JsonSubTypes.Type(
value = WorkZonePipelineCreateRequest.class,
name = "WorkZonePipelineCreateRequest"),
})
public interface CreatePipeline {
Object getType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public enum DocumentStatus {

FAILED_TO_BE_RETRIED("FAILED_TO_BE_RETRIED"),

TO_BE_SCHEDULED("TO_BE_SCHEDULED"),

UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");

private final String value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ public class DocumentsStatusResponseResourcesInner
@JsonProperty("status")
private DocumentStatus status;

@JsonProperty("absoluteUrl")
private String absoluteUrl;

@JsonProperty("title")
private String title;

@JsonProperty("metadataId")
private String metadataId;

@JsonProperty("createdTimestamp")
private String createdTimestamp;

@JsonProperty("lastUpdatedTimestamp")
private String lastUpdatedTimestamp;

@JsonAnySetter @JsonAnyGetter
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();

Expand Down Expand Up @@ -104,6 +119,176 @@ public void setStatus(@Nullable final DocumentStatus status) {
this.status = status;
}

/**
* Set the absoluteUrl of this {@link DocumentsStatusResponseResourcesInner} instance and return
* the same instance.
*
* @param absoluteUrl The absoluteUrl of this {@link DocumentsStatusResponseResourcesInner}
* @return The same instance of this {@link DocumentsStatusResponseResourcesInner} class
*/
@Nonnull
public DocumentsStatusResponseResourcesInner absoluteUrl(@Nullable final String absoluteUrl) {
this.absoluteUrl = absoluteUrl;
return this;
}

/**
* Get absoluteUrl
*
* @return absoluteUrl The absoluteUrl of this {@link DocumentsStatusResponseResourcesInner}
* instance.
*/
@Nullable
public String getAbsoluteUrl() {
return absoluteUrl;
}

/**
* Set the absoluteUrl of this {@link DocumentsStatusResponseResourcesInner} instance.
*
* @param absoluteUrl The absoluteUrl of this {@link DocumentsStatusResponseResourcesInner}
*/
public void setAbsoluteUrl(@Nullable final String absoluteUrl) {
this.absoluteUrl = absoluteUrl;
}

/**
* Set the title of this {@link DocumentsStatusResponseResourcesInner} instance and return the
* same instance.
*
* @param title The title of this {@link DocumentsStatusResponseResourcesInner}
* @return The same instance of this {@link DocumentsStatusResponseResourcesInner} class
*/
@Nonnull
public DocumentsStatusResponseResourcesInner title(@Nullable final String title) {
this.title = title;
return this;
}

/**
* Get title
*
* @return title The title of this {@link DocumentsStatusResponseResourcesInner} instance.
*/
@Nullable
public String getTitle() {
return title;
}

/**
* Set the title of this {@link DocumentsStatusResponseResourcesInner} instance.
*
* @param title The title of this {@link DocumentsStatusResponseResourcesInner}
*/
public void setTitle(@Nullable final String title) {
this.title = title;
}

/**
* Set the metadataId of this {@link DocumentsStatusResponseResourcesInner} instance and return
* the same instance.
*
* @param metadataId The metadataId of this {@link DocumentsStatusResponseResourcesInner}
* @return The same instance of this {@link DocumentsStatusResponseResourcesInner} class
*/
@Nonnull
public DocumentsStatusResponseResourcesInner metadataId(@Nullable final String metadataId) {
this.metadataId = metadataId;
return this;
}

/**
* Get metadataId
*
* @return metadataId The metadataId of this {@link DocumentsStatusResponseResourcesInner}
* instance.
*/
@Nullable
public String getMetadataId() {
return metadataId;
}

/**
* Set the metadataId of this {@link DocumentsStatusResponseResourcesInner} instance.
*
* @param metadataId The metadataId of this {@link DocumentsStatusResponseResourcesInner}
*/
public void setMetadataId(@Nullable final String metadataId) {
this.metadataId = metadataId;
}

/**
* Set the createdTimestamp of this {@link DocumentsStatusResponseResourcesInner} instance and
* return the same instance.
*
* @param createdTimestamp The createdTimestamp of this {@link
* DocumentsStatusResponseResourcesInner}
* @return The same instance of this {@link DocumentsStatusResponseResourcesInner} class
*/
@Nonnull
public DocumentsStatusResponseResourcesInner createdTimestamp(
@Nullable final String createdTimestamp) {
this.createdTimestamp = createdTimestamp;
return this;
}

/**
* Get createdTimestamp
*
* @return createdTimestamp The createdTimestamp of this {@link
* DocumentsStatusResponseResourcesInner} instance.
*/
@Nonnull
public String getCreatedTimestamp() {
return createdTimestamp;
}

/**
* Set the createdTimestamp of this {@link DocumentsStatusResponseResourcesInner} instance.
*
* @param createdTimestamp The createdTimestamp of this {@link
* DocumentsStatusResponseResourcesInner}
*/
public void setCreatedTimestamp(@Nullable final String createdTimestamp) {
this.createdTimestamp = createdTimestamp;
}

/**
* Set the lastUpdatedTimestamp of this {@link DocumentsStatusResponseResourcesInner} instance and
* return the same instance.
*
* @param lastUpdatedTimestamp The lastUpdatedTimestamp of this {@link
* DocumentsStatusResponseResourcesInner}
* @return The same instance of this {@link DocumentsStatusResponseResourcesInner} class
*/
@Nonnull
public DocumentsStatusResponseResourcesInner lastUpdatedTimestamp(
@Nullable final String lastUpdatedTimestamp) {
this.lastUpdatedTimestamp = lastUpdatedTimestamp;
return this;
}

/**
* Get lastUpdatedTimestamp
*
* @return lastUpdatedTimestamp The lastUpdatedTimestamp of this {@link
* DocumentsStatusResponseResourcesInner} instance.
*/
@Nonnull
public String getLastUpdatedTimestamp() {
return lastUpdatedTimestamp;
}

/**
* Set the lastUpdatedTimestamp of this {@link DocumentsStatusResponseResourcesInner} instance.
*
* @param lastUpdatedTimestamp The lastUpdatedTimestamp of this {@link
* DocumentsStatusResponseResourcesInner}
*/
public void setLastUpdatedTimestamp(@Nullable final String lastUpdatedTimestamp) {
this.lastUpdatedTimestamp = lastUpdatedTimestamp;
}

/**
* Get the names of the unrecognizable properties of the {@link
* DocumentsStatusResponseResourcesInner}.
Expand Down Expand Up @@ -147,6 +332,12 @@ public Map<String, Object> toMap() {
final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
if (id != null) declaredFields.put("id", id);
if (status != null) declaredFields.put("status", status);
if (absoluteUrl != null) declaredFields.put("absoluteUrl", absoluteUrl);
if (title != null) declaredFields.put("title", title);
if (metadataId != null) declaredFields.put("metadataId", metadataId);
if (createdTimestamp != null) declaredFields.put("createdTimestamp", createdTimestamp);
if (lastUpdatedTimestamp != null)
declaredFields.put("lastUpdatedTimestamp", lastUpdatedTimestamp);
return declaredFields;
}

Expand Down Expand Up @@ -176,12 +367,27 @@ public boolean equals(@Nullable final java.lang.Object o) {
return Objects.equals(
this.cloudSdkCustomFields, documentsStatusResponseResourcesInner.cloudSdkCustomFields)
&& Objects.equals(this.id, documentsStatusResponseResourcesInner.id)
&& Objects.equals(this.status, documentsStatusResponseResourcesInner.status);
&& Objects.equals(this.status, documentsStatusResponseResourcesInner.status)
&& Objects.equals(this.absoluteUrl, documentsStatusResponseResourcesInner.absoluteUrl)
&& Objects.equals(this.title, documentsStatusResponseResourcesInner.title)
&& Objects.equals(this.metadataId, documentsStatusResponseResourcesInner.metadataId)
&& Objects.equals(
this.createdTimestamp, documentsStatusResponseResourcesInner.createdTimestamp)
&& Objects.equals(
this.lastUpdatedTimestamp, documentsStatusResponseResourcesInner.lastUpdatedTimestamp);
}

@Override
public int hashCode() {
return Objects.hash(id, status, cloudSdkCustomFields);
return Objects.hash(
id,
status,
absoluteUrl,
title,
metadataId,
createdTimestamp,
lastUpdatedTimestamp,
cloudSdkCustomFields);
}

@Override
Expand All @@ -191,6 +397,13 @@ public String toString() {
sb.append("class DocumentsStatusResponseResourcesInner {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" absoluteUrl: ").append(toIndentedString(absoluteUrl)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" metadataId: ").append(toIndentedString(metadataId)).append("\n");
sb.append(" createdTimestamp: ").append(toIndentedString(createdTimestamp)).append("\n");
sb.append(" lastUpdatedTimestamp: ")
.append(toIndentedString(lastUpdatedTimestamp))
.append("\n");
cloudSdkCustomFields.forEach(
(k, v) ->
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
@JsonSubTypes({
@JsonSubTypes.Type(value = MSSharePointPipelineGetResponse.class, name = "MSSharePoint"),
@JsonSubTypes.Type(value = S3PipelineGetResponse.class, name = "S3"),
@JsonSubTypes.Type(value = SDMPipelineGetResponse.class, name = "SDM"),
@JsonSubTypes.Type(value = SFTPPipelineGetResponse.class, name = "SFTP"),
@JsonSubTypes.Type(value = WorkZonePipelineGetResponse.class, name = "WorkZone"),
@JsonSubTypes.Type(
value = MSSharePointPipelineGetResponse.class,
name = "MSSharePointPipelineGetResponse"),
@JsonSubTypes.Type(value = S3PipelineGetResponse.class, name = "S3PipelineGetResponse"),
@JsonSubTypes.Type(value = SDMPipelineGetResponse.class, name = "SDMPipelineGetResponse"),
@JsonSubTypes.Type(value = SFTPPipelineGetResponse.class, name = "SFTPPipelineGetResponse"),
@JsonSubTypes.Type(
value = WorkZonePipelineGetResponse.class,
name = "WorkZonePipelineGetResponse"),
})
public interface GetPipeline {
Object getType();
Expand Down
Loading