|
9 | 9 | import com.sap.ai.sdk.grounding.model.GetPipelineStatus; |
10 | 10 | import com.sap.ai.sdk.grounding.model.GetPipelines; |
11 | 11 | import com.sap.ai.sdk.grounding.model.ManualPipelineTrigger; |
| 12 | +import com.sap.ai.sdk.grounding.model.PatchPipeline; |
12 | 13 | import com.sap.ai.sdk.grounding.model.PipelineDocumentResponse; |
13 | 14 | import com.sap.ai.sdk.grounding.model.PipelineId; |
| 15 | +import com.sap.ai.sdk.grounding.model.SearchPipeline; |
| 16 | +import com.sap.ai.sdk.grounding.model.SearchPipelinesResponse; |
14 | 17 | import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; |
15 | 18 | import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient; |
16 | 19 | import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService; |
@@ -1004,6 +1007,188 @@ public GetPipelineStatus getPipelineStatus( |
1004 | 1007 | localVarReturnType); |
1005 | 1008 | } |
1006 | 1009 |
|
| 1010 | + /** |
| 1011 | + * Patch pipeline |
| 1012 | + * |
| 1013 | + * <p>Patch a pipeline by pipeline id |
| 1014 | + * |
| 1015 | + * <p><b>204</b> - No Content |
| 1016 | + * |
| 1017 | + * <p><b>400</b> - The specification of the resource was incorrect |
| 1018 | + * |
| 1019 | + * @param aiResourceGroup Resource Group ID |
| 1020 | + * @param pipelineId The ID of the pipeline to patch. |
| 1021 | + * @param patchPipeline The value for the parameter patchPipeline |
| 1022 | + * @return An OpenApiResponse containing the status code of the HttpResponse. |
| 1023 | + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API |
| 1024 | + */ |
| 1025 | + @Nonnull |
| 1026 | + public OpenApiResponse patchPipelineById( |
| 1027 | + @Nonnull final String aiResourceGroup, |
| 1028 | + @Nonnull final String pipelineId, |
| 1029 | + @Nonnull final PatchPipeline patchPipeline) |
| 1030 | + throws OpenApiRequestException { |
| 1031 | + final Object localVarPostBody = patchPipeline; |
| 1032 | + |
| 1033 | + // verify the required parameter 'aiResourceGroup' is set |
| 1034 | + if (aiResourceGroup == null) { |
| 1035 | + throw new OpenApiRequestException( |
| 1036 | + "Missing the required parameter 'aiResourceGroup' when calling patchPipelineById"); |
| 1037 | + } |
| 1038 | + |
| 1039 | + // verify the required parameter 'pipelineId' is set |
| 1040 | + if (pipelineId == null) { |
| 1041 | + throw new OpenApiRequestException( |
| 1042 | + "Missing the required parameter 'pipelineId' when calling patchPipelineById"); |
| 1043 | + } |
| 1044 | + |
| 1045 | + // verify the required parameter 'patchPipeline' is set |
| 1046 | + if (patchPipeline == null) { |
| 1047 | + throw new OpenApiRequestException( |
| 1048 | + "Missing the required parameter 'patchPipeline' when calling pipelineV1PipelineEndpointsPatchPipelineById"); |
| 1049 | + } |
| 1050 | + |
| 1051 | + // create path and map variables |
| 1052 | + final Map<String, Object> localVarPathParams = new HashMap<String, Object>(); |
| 1053 | + localVarPathParams.put("pipelineId", pipelineId); |
| 1054 | + final String localVarPath = |
| 1055 | + UriComponentsBuilder.fromPath("/pipelines/{pipelineId}") |
| 1056 | + .buildAndExpand(localVarPathParams) |
| 1057 | + .toUriString(); |
| 1058 | + |
| 1059 | + final MultiValueMap<String, String> localVarQueryParams = |
| 1060 | + new LinkedMultiValueMap<String, String>(); |
| 1061 | + final HttpHeaders localVarHeaderParams = new HttpHeaders(); |
| 1062 | + final MultiValueMap<String, Object> localVarFormParams = |
| 1063 | + new LinkedMultiValueMap<String, Object>(); |
| 1064 | + |
| 1065 | + if (aiResourceGroup != null) |
| 1066 | + localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup)); |
| 1067 | + |
| 1068 | + final String[] localVarAccepts = {"application/json"}; |
| 1069 | + final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 1070 | + final String[] localVarContentTypes = {"application/json"}; |
| 1071 | + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 1072 | + |
| 1073 | + final String[] localVarAuthNames = new String[] {}; |
| 1074 | + |
| 1075 | + final ParameterizedTypeReference<Void> localVarReturnType = |
| 1076 | + new ParameterizedTypeReference<Void>() {}; |
| 1077 | + apiClient.invokeAPI( |
| 1078 | + localVarPath, |
| 1079 | + HttpMethod.PATCH, |
| 1080 | + localVarQueryParams, |
| 1081 | + localVarPostBody, |
| 1082 | + localVarHeaderParams, |
| 1083 | + localVarFormParams, |
| 1084 | + localVarAccept, |
| 1085 | + localVarContentType, |
| 1086 | + localVarAuthNames, |
| 1087 | + localVarReturnType); |
| 1088 | + return new OpenApiResponse(apiClient); |
| 1089 | + } |
| 1090 | + |
| 1091 | + /** |
| 1092 | + * Pipeline Search by Metadata |
| 1093 | + * |
| 1094 | + * <p>Search for pipelines based on metadata |
| 1095 | + * |
| 1096 | + * <p><b>200</b> - Returns pipelines for the tenant that matches the metadata |
| 1097 | + * |
| 1098 | + * <p><b>400</b> - The specification of the resource was incorrect |
| 1099 | + * |
| 1100 | + * @param aiResourceGroup (required) Resource Group ID |
| 1101 | + * @param searchPipeline (required) The value for the parameter searchPipeline |
| 1102 | + * @param $top (optional) Number of results to display |
| 1103 | + * @param $skip (optional) Number of results to be skipped from the ordered list of results |
| 1104 | + * @param $count (optional) When the $count field is set to false, the response contains a count |
| 1105 | + * of the items present in the response. When the $count field is set to true, the response |
| 1106 | + * contains a count of all the items present on the server, and not just the ones in the |
| 1107 | + * response. When the $count field is not passed, it is false by default. |
| 1108 | + * @return SearchPipelinesResponse |
| 1109 | + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API |
| 1110 | + */ |
| 1111 | + @Nonnull |
| 1112 | + public SearchPipelinesResponse searchPipelinesByMetadata( |
| 1113 | + @Nonnull final String aiResourceGroup, |
| 1114 | + @Nonnull final SearchPipeline searchPipeline, |
| 1115 | + @Nullable final Integer $top, |
| 1116 | + @Nullable final Integer $skip, |
| 1117 | + @Nullable final Boolean $count) |
| 1118 | + throws OpenApiRequestException { |
| 1119 | + final Object localVarPostBody = searchPipeline; |
| 1120 | + |
| 1121 | + // verify the required parameter 'aiResourceGroup' is set |
| 1122 | + if (aiResourceGroup == null) { |
| 1123 | + throw new OpenApiRequestException( |
| 1124 | + "Missing the required parameter 'aiResourceGroup' when calling searchPipelinesByMetadata"); |
| 1125 | + } |
| 1126 | + |
| 1127 | + // verify the required parameter 'searchPipeline' is set |
| 1128 | + if (searchPipeline == null) { |
| 1129 | + throw new OpenApiRequestException( |
| 1130 | + "Missing the required parameter 'searchPipeline' when calling pipelineV1PipelineEndpointsSearchPipeline"); |
| 1131 | + } |
| 1132 | + |
| 1133 | + final String localVarPath = |
| 1134 | + UriComponentsBuilder.fromPath("/pipelines/search").build().toUriString(); |
| 1135 | + |
| 1136 | + final MultiValueMap<String, String> localVarQueryParams = |
| 1137 | + new LinkedMultiValueMap<String, String>(); |
| 1138 | + final HttpHeaders localVarHeaderParams = new HttpHeaders(); |
| 1139 | + final MultiValueMap<String, Object> localVarFormParams = |
| 1140 | + new LinkedMultiValueMap<String, Object>(); |
| 1141 | + |
| 1142 | + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$top", $top)); |
| 1143 | + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$skip", $skip)); |
| 1144 | + localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "$count", $count)); |
| 1145 | + |
| 1146 | + if (aiResourceGroup != null) |
| 1147 | + localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup)); |
| 1148 | + |
| 1149 | + final String[] localVarAccepts = {"application/json"}; |
| 1150 | + final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 1151 | + final String[] localVarContentTypes = {"application/json"}; |
| 1152 | + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 1153 | + |
| 1154 | + final String[] localVarAuthNames = new String[] {}; |
| 1155 | + |
| 1156 | + final ParameterizedTypeReference<SearchPipelinesResponse> localVarReturnType = |
| 1157 | + new ParameterizedTypeReference<SearchPipelinesResponse>() {}; |
| 1158 | + return apiClient.invokeAPI( |
| 1159 | + localVarPath, |
| 1160 | + HttpMethod.POST, |
| 1161 | + localVarQueryParams, |
| 1162 | + localVarPostBody, |
| 1163 | + localVarHeaderParams, |
| 1164 | + localVarFormParams, |
| 1165 | + localVarAccept, |
| 1166 | + localVarContentType, |
| 1167 | + localVarAuthNames, |
| 1168 | + localVarReturnType); |
| 1169 | + } |
| 1170 | + |
| 1171 | + /** |
| 1172 | + * Pipeline Search by Metadata |
| 1173 | + * |
| 1174 | + * <p>Search for pipelines based on metadata |
| 1175 | + * |
| 1176 | + * <p><b>200</b> - Returns pipelines for the tenant that matches the metadata |
| 1177 | + * |
| 1178 | + * <p><b>400</b> - The specification of the resource was incorrect |
| 1179 | + * |
| 1180 | + * @param aiResourceGroup Resource Group ID |
| 1181 | + * @param searchPipeline The value for the parameter searchPipeline |
| 1182 | + * @return SearchPipelinesResponse |
| 1183 | + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API |
| 1184 | + */ |
| 1185 | + @Nonnull |
| 1186 | + public SearchPipelinesResponse searchPipelinesByMetadata( |
| 1187 | + @Nonnull final String aiResourceGroup, @Nonnull final SearchPipeline searchPipeline) |
| 1188 | + throws OpenApiRequestException { |
| 1189 | + return searchPipelinesByMetadata(aiResourceGroup, searchPipeline, null, null, null); |
| 1190 | + } |
| 1191 | + |
1007 | 1192 | /** |
1008 | 1193 | * Pipeline Trigger |
1009 | 1194 | * |
|
0 commit comments