Skip to content

Commit 17b8fdb

Browse files
app-services-ciwtrocki
authored andcommitted
chore(all): re-generate OpenAPI client(s)
1 parent b3a8b45 commit 17b8fdb

4 files changed

Lines changed: 188 additions & 0 deletions

File tree

packages/kafka-management-sdk/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Class | Method | HTTP request | Description
113113
------------ | ------------- | ------------- | -------------
114114
*DefaultApi* | [**createKafka**](docs/DefaultApi.md#createKafka) | **POST** /api/kafkas_mgmt/v1/kafkas | Creates a Kafka request
115115
*DefaultApi* | [**deleteKafkaById**](docs/DefaultApi.md#deleteKafkaById) | **DELETE** /api/kafkas_mgmt/v1/kafkas/{id} | Deletes a Kafka request by ID
116+
*DefaultApi* | [**federateMetrics**](docs/DefaultApi.md#federateMetrics) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/federate | Returns all metrics in scrapeable format for a given kafka id
116117
*DefaultApi* | [**getCloudProviderRegions**](docs/DefaultApi.md#getCloudProviderRegions) | **GET** /api/kafkas_mgmt/v1/cloud_providers/{id}/regions | Returns the list of supported regions of the supported cloud provider
117118
*DefaultApi* | [**getCloudProviders**](docs/DefaultApi.md#getCloudProviders) | **GET** /api/kafkas_mgmt/v1/cloud_providers | Returns the list of supported cloud providers
118119
*DefaultApi* | [**getKafkaById**](docs/DefaultApi.md#getKafkaById) | **GET** /api/kafkas_mgmt/v1/kafkas/{id} | Returns a Kafka request by ID

packages/kafka-management-sdk/api/openapi.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,65 @@ paths:
10091009
- Bearer: []
10101010
summary: Returns metrics with instant query by Kafka ID
10111011
x-accepts: application/json
1012+
/api/kafkas_mgmt/v1/kafkas/{id}/metrics/federate:
1013+
get:
1014+
operationId: federateMetrics
1015+
parameters:
1016+
- description: The ID of record
1017+
explode: false
1018+
in: path
1019+
name: id
1020+
required: true
1021+
schema:
1022+
type: string
1023+
style: simple
1024+
responses:
1025+
"200":
1026+
content:
1027+
text/plain:
1028+
schema:
1029+
type: string
1030+
description: Returned Kafka metrics in a Prometheus text format
1031+
"400":
1032+
content:
1033+
application/json:
1034+
examples:
1035+
MissingParameterExample:
1036+
$ref: '#/components/examples/400MissingParameterExample'
1037+
schema:
1038+
$ref: '#/components/schemas/Error'
1039+
description: Bad request
1040+
"401":
1041+
content:
1042+
application/json:
1043+
examples:
1044+
"401Example":
1045+
$ref: '#/components/examples/401Example'
1046+
schema:
1047+
$ref: '#/components/schemas/Error'
1048+
description: Auth token is invalid
1049+
"404":
1050+
content:
1051+
application/json:
1052+
examples:
1053+
"404Example":
1054+
$ref: '#/components/examples/404Example'
1055+
schema:
1056+
$ref: '#/components/schemas/Error'
1057+
description: Kafka id not found
1058+
"500":
1059+
content:
1060+
application/json:
1061+
examples:
1062+
"500Example":
1063+
$ref: '#/components/examples/500Example'
1064+
schema:
1065+
$ref: '#/components/schemas/Error'
1066+
description: Unexpected error occurred
1067+
security:
1068+
- Bearer: []
1069+
summary: Returns all metrics in scrapeable format for a given kafka id
1070+
x-accepts: application/json
10121071
components:
10131072
examples:
10141073
USRegionExample:
@@ -1149,6 +1208,14 @@ components:
11491208
search: ''id''. Supported column names are: region, name, cloud_provider,
11501209
name, status. Query invalid: id = 123'
11511210
operation_id: 1lWDGuybIrEnxrAem724gqkkiDv
1211+
"400MissingParameterExample":
1212+
value:
1213+
id: "21"
1214+
kind: Error
1215+
href: /api/kafkas_mgmt/v1/errors/21
1216+
code: KAFKAS-MGMT-21
1217+
reason: 'missing path parameter: kafka id'
1218+
operation_id: 1lWDGuybIrEnxrAem724gqkkiDv
11521219
"404Example":
11531220
value:
11541221
id: "404"
@@ -1552,6 +1619,8 @@ components:
15521619
MetricsInstantQueryList:
15531620
allOf:
15541621
- $ref: '#/components/schemas/MetricsInstantQueryList_allOf'
1622+
MetricsFederationResult:
1623+
type: string
15551624
InstantQuery:
15561625
properties:
15571626
metric:

packages/kafka-management-sdk/docs/DefaultApi.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**createKafka**](DefaultApi.md#createKafka) | **POST** /api/kafkas_mgmt/v1/kafkas | Creates a Kafka request
88
[**deleteKafkaById**](DefaultApi.md#deleteKafkaById) | **DELETE** /api/kafkas_mgmt/v1/kafkas/{id} | Deletes a Kafka request by ID
9+
[**federateMetrics**](DefaultApi.md#federateMetrics) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/federate | Returns all metrics in scrapeable format for a given kafka id
910
[**getCloudProviderRegions**](DefaultApi.md#getCloudProviderRegions) | **GET** /api/kafkas_mgmt/v1/cloud_providers/{id}/regions | Returns the list of supported regions of the supported cloud provider
1011
[**getCloudProviders**](DefaultApi.md#getCloudProviders) | **GET** /api/kafkas_mgmt/v1/cloud_providers | Returns the list of supported cloud providers
1112
[**getKafkaById**](DefaultApi.md#getKafkaById) | **GET** /api/kafkas_mgmt/v1/kafkas/{id} | Returns a Kafka request by ID
@@ -171,6 +172,79 @@ Name | Type | Description | Notes
171172
| **500** | Unexpected error occurred | - |
172173

173174

175+
## federateMetrics
176+
177+
> String federateMetrics(id)
178+
179+
Returns all metrics in scrapeable format for a given kafka id
180+
181+
### Example
182+
183+
```java
184+
// Import classes:
185+
import com.openshift.cloud.api.kas.invoker.ApiClient;
186+
import com.openshift.cloud.api.kas.invoker.ApiException;
187+
import com.openshift.cloud.api.kas.invoker.Configuration;
188+
import com.openshift.cloud.api.kas.invoker.auth.*;
189+
import com.openshift.cloud.api.kas.invoker.models.*;
190+
import com.openshift.cloud.api.kas.DefaultApi;
191+
192+
public class Example {
193+
public static void main(String[] args) {
194+
ApiClient defaultClient = Configuration.getDefaultApiClient();
195+
defaultClient.setBasePath("https://api.openshift.com");
196+
197+
// Configure HTTP bearer authorization: Bearer
198+
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
199+
Bearer.setBearerToken("BEARER TOKEN");
200+
201+
DefaultApi apiInstance = new DefaultApi(defaultClient);
202+
String id = "id_example"; // String | The ID of record
203+
try {
204+
String result = apiInstance.federateMetrics(id);
205+
System.out.println(result);
206+
} catch (ApiException e) {
207+
System.err.println("Exception when calling DefaultApi#federateMetrics");
208+
System.err.println("Status code: " + e.getCode());
209+
System.err.println("Reason: " + e.getResponseBody());
210+
System.err.println("Response headers: " + e.getResponseHeaders());
211+
e.printStackTrace();
212+
}
213+
}
214+
}
215+
```
216+
217+
### Parameters
218+
219+
220+
Name | Type | Description | Notes
221+
------------- | ------------- | ------------- | -------------
222+
**id** | **String**| The ID of record |
223+
224+
### Return type
225+
226+
**String**
227+
228+
### Authorization
229+
230+
[Bearer](../README.md#Bearer)
231+
232+
### HTTP request headers
233+
234+
- **Content-Type**: Not defined
235+
- **Accept**: text/plain, application/json
236+
237+
238+
### HTTP response details
239+
| Status code | Description | Response headers |
240+
|-------------|-------------|------------------|
241+
| **200** | Returned Kafka metrics in a Prometheus text format | - |
242+
| **400** | Bad request | - |
243+
| **401** | Auth token is invalid | - |
244+
| **404** | Kafka id not found | - |
245+
| **500** | Unexpected error occurred | - |
246+
247+
174248
## getCloudProviderRegions
175249

176250
> CloudRegionList getCloudProviderRegions(id, page, size)

packages/kafka-management-sdk/src/main/java/com/openshift/cloud/api/kas/DefaultApi.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,50 @@ public Error deleteKafkaById(String id, Boolean async) throws ApiException {
145145
GenericType<Error> localVarReturnType = new GenericType<Error>() {};
146146
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
147147
}
148+
/**
149+
* Returns all metrics in scrapeable format for a given kafka id
150+
*
151+
* @param id The ID of record (required)
152+
* @return a {@code String}
153+
* @throws ApiException if fails to make API call
154+
*/
155+
public String federateMetrics(String id) throws ApiException {
156+
Object localVarPostBody = null;
157+
158+
// verify the required parameter 'id' is set
159+
if (id == null) {
160+
throw new ApiException(400, "Missing the required parameter 'id' when calling federateMetrics");
161+
}
162+
163+
// create path and map variables
164+
String localVarPath = "/api/kafkas_mgmt/v1/kafkas/{id}/metrics/federate".replaceAll("\\{format\\}","json")
165+
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
166+
167+
// query params
168+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
169+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
170+
Map<String, String> localVarCookieParams = new HashMap<String, String>();
171+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
172+
173+
174+
175+
176+
177+
final String[] localVarAccepts = {
178+
"text/plain", "application/json"
179+
};
180+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
181+
182+
final String[] localVarContentTypes = {
183+
184+
};
185+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
186+
187+
String[] localVarAuthNames = new String[] { "Bearer" };
188+
189+
GenericType<String> localVarReturnType = new GenericType<String>() {};
190+
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
191+
}
148192
/**
149193
* Returns the list of supported regions of the supported cloud provider
150194
*

0 commit comments

Comments
 (0)