Skip to content

Commit

Permalink
fix(kafka-mgmt/v1): update kafka-mgmt/v1 SDK (#389)
Browse files Browse the repository at this point in the history
Co-authored-by: app-services-ci <[email protected]>
  • Loading branch information
app-services-ci and app-services-ci authored Jan 9, 2023
1 parent 26dd7e7 commit fb04569
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 7 deletions.
88 changes: 84 additions & 4 deletions .openapi/kas-fleet-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,8 @@ paths:
examples:
400InvalidClusterIdExample:
$ref: '#/components/examples/400InvalidClusterIdExample'
400MInvalidExternalClusterIdExample:
$ref: '#/components/examples/400MInvalidExternalClusterIdExample'
400InvalidExternalClusterIdExample:
$ref: '#/components/examples/400InvalidExternalClusterIdExample'
description: Validation errors occurred
"401":
content:
Expand Down Expand Up @@ -1019,7 +1019,87 @@ paths:
security:
- Bearer: [ ]
tags:
- enterprise-dataplane-clusters
- enterprise-dataplane-clusters
/api/kafkas_mgmt/v1/clusters/{id}:
delete:
tags:
- enterprise-dataplane-clusters
operationId: deleteEnterpriseClusterById
parameters:
- in: query
name: async
description: Perform the action in an asynchronous manner
schema:
type: boolean
required: true
- in: query
name: force
description: |-
When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster.
When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
schema:
type: boolean
required: false
- in: path
name: id
description: ID of the enterprise data plane cluster
schema:
type: string
required: true
responses:
"202":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Enterprise cluster deletion accepted
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
400DeletionExample:
$ref: '#/components/examples/400DeletionExample'
description: Validation errors occurred
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
401Example:
$ref: '#/components/examples/401Example'
description: Auth token is invalid
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
403Example:
$ref: '#/components/examples/403Example'
description: User not authorized to access the service
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
404DeleteExample:
$ref: '#/components/examples/404DeleteExample'
description: No Enterprise cluster with specified ID exists
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
500DeleteExample:
$ref: '#/components/examples/500DeleteExample'
description: Unexpected error occurred
security:
- Bearer: [ ]

components:
schemas:
Expand Down Expand Up @@ -2166,7 +2246,7 @@ components:
code: "KAFKAS-MGMT-45"
reason: "Enterprise cluster ID is invalid"
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
400MInvalidExternalClusterIdExample:
400InvalidExternalClusterIdExample:
value:
id: "46"
kind: "Error"
Expand Down
1 change: 1 addition & 0 deletions packages/kafka-management-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Class | Method | HTTP request | Description
*DefaultApi* | [**getMetricsByRangeQuery**](docs/DefaultApi.md#getMetricsByRangeQuery) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query_range |
*DefaultApi* | [**getVersionMetadata**](docs/DefaultApi.md#getVersionMetadata) | **GET** /api/kafkas_mgmt/v1 |
*DefaultApi* | [**updateKafkaById**](docs/DefaultApi.md#updateKafkaById) | **PATCH** /api/kafkas_mgmt/v1/kafkas/{id} |
*EnterpriseDataplaneClustersApi* | [**deleteEnterpriseClusterById**](docs/EnterpriseDataplaneClustersApi.md#deleteEnterpriseClusterById) | **DELETE** /api/kafkas_mgmt/v1/clusters/{id} |
*EnterpriseDataplaneClustersApi* | [**getEnterpriseOsdClusters**](docs/EnterpriseDataplaneClustersApi.md#getEnterpriseOsdClusters) | **GET** /api/kafkas_mgmt/v1/clusters |
*EnterpriseDataplaneClustersApi* | [**registerEnterpriseOsdCluster**](docs/EnterpriseDataplaneClustersApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |
*ErrorsApi* | [**getErrorById**](docs/ErrorsApi.md#getErrorById) | **GET** /api/kafkas_mgmt/v1/errors/{id} |
Expand Down
93 changes: 90 additions & 3 deletions packages/kafka-management-sdk/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1279,8 +1279,8 @@ paths:
examples:
"400InvalidClusterIdExample":
$ref: '#/components/examples/400InvalidClusterIdExample'
"400MInvalidExternalClusterIdExample":
$ref: '#/components/examples/400MInvalidExternalClusterIdExample'
"400InvalidExternalClusterIdExample":
$ref: '#/components/examples/400InvalidExternalClusterIdExample'
schema:
$ref: '#/components/schemas/Error'
description: Validation errors occurred
Expand Down Expand Up @@ -1326,6 +1326,93 @@ paths:
- enterprise-dataplane-clusters
x-contentType: application/json
x-accepts: application/json
/api/kafkas_mgmt/v1/clusters/{id}:
delete:
operationId: deleteEnterpriseClusterById
parameters:
- description: Perform the action in an asynchronous manner
explode: true
in: query
name: async
required: true
schema:
type: boolean
style: form
- description: |-
When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster.
When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
explode: true
in: query
name: force
required: false
schema:
type: boolean
style: form
- description: ID of the enterprise data plane cluster
explode: false
in: path
name: id
required: true
schema:
type: string
style: simple
responses:
"202":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Enterprise cluster deletion accepted
"400":
content:
application/json:
examples:
"400DeletionExample":
$ref: '#/components/examples/400DeletionExample'
schema:
$ref: '#/components/schemas/Error'
description: Validation errors occurred
"401":
content:
application/json:
examples:
"401Example":
$ref: '#/components/examples/401Example'
schema:
$ref: '#/components/schemas/Error'
description: Auth token is invalid
"403":
content:
application/json:
examples:
"403Example":
$ref: '#/components/examples/403Example'
schema:
$ref: '#/components/schemas/Error'
description: User not authorized to access the service
"404":
content:
application/json:
examples:
"404DeleteExample":
$ref: '#/components/examples/404DeleteExample'
schema:
$ref: '#/components/schemas/Error'
description: No Enterprise cluster with specified ID exists
"500":
content:
application/json:
examples:
"500DeleteExample":
$ref: '#/components/examples/500DeleteExample'
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error occurred
security:
- Bearer: []
tags:
- enterprise-dataplane-clusters
x-accepts: application/json
components:
examples:
USRegionExample:
Expand Down Expand Up @@ -1577,7 +1664,7 @@ components:
code: KAFKAS-MGMT-45
reason: Enterprise cluster ID is invalid
operation_id: 1lWDGuybIrEnxrAem724gqkkiDv
"400MInvalidExternalClusterIdExample":
"400InvalidExternalClusterIdExample":
value:
id: "46"
kind: Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,90 @@ All URIs are relative to *https://api.openshift.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteEnterpriseClusterById**](EnterpriseDataplaneClustersApi.md#deleteEnterpriseClusterById) | **DELETE** /api/kafkas_mgmt/v1/clusters/{id} |
[**getEnterpriseOsdClusters**](EnterpriseDataplaneClustersApi.md#getEnterpriseOsdClusters) | **GET** /api/kafkas_mgmt/v1/clusters |
[**registerEnterpriseOsdCluster**](EnterpriseDataplaneClustersApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |



## deleteEnterpriseClusterById

> Error deleteEnterpriseClusterById(async, id, force)


### Example

```java
// Import classes:
import com.openshift.cloud.api.kas.invoker.ApiClient;
import com.openshift.cloud.api.kas.invoker.ApiException;
import com.openshift.cloud.api.kas.invoker.Configuration;
import com.openshift.cloud.api.kas.invoker.auth.*;
import com.openshift.cloud.api.kas.invoker.models.*;
import com.openshift.cloud.api.kas.EnterpriseDataplaneClustersApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.openshift.com");

// Configure HTTP bearer authorization: Bearer
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
Bearer.setBearerToken("BEARER TOKEN");

EnterpriseDataplaneClustersApi apiInstance = new EnterpriseDataplaneClustersApi(defaultClient);
Boolean async = true; // Boolean | Perform the action in an asynchronous manner
String id = "id_example"; // String | ID of the enterprise data plane cluster
Boolean force = true; // Boolean | When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
try {
Error result = apiInstance.deleteEnterpriseClusterById(async, id, force);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EnterpriseDataplaneClustersApi#deleteEnterpriseClusterById");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**async** | **Boolean**| Perform the action in an asynchronous manner |
**id** | **String**| ID of the enterprise data plane cluster |
**force** | **Boolean**| When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail. | [optional]

### Return type

[**Error**](Error.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **202** | Enterprise cluster deletion accepted | - |
| **400** | Validation errors occurred | - |
| **401** | Auth token is invalid | - |
| **403** | User not authorized to access the service | - |
| **404** | No Enterprise cluster with specified ID exists | - |
| **500** | Unexpected error occurred | - |


## getEnterpriseOsdClusters

> EnterpriseClusterList getEnterpriseOsdClusters()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,59 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}

/**
*
*
* @param async Perform the action in an asynchronous manner (required)
* @param id ID of the enterprise data plane cluster (required)
* @param force When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail. (optional)
* @return a {@code Error}
* @throws ApiException if fails to make API call
*/
public Error deleteEnterpriseClusterById(Boolean async, String id, Boolean force) throws ApiException {
Object localVarPostBody = null;

// verify the required parameter 'async' is set
if (async == null) {
throw new ApiException(400, "Missing the required parameter 'async' when calling deleteEnterpriseClusterById");
}

// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling deleteEnterpriseClusterById");
}

// create path and map variables
String localVarPath = "/api/kafkas_mgmt/v1/clusters/{id}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "async", async));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "force", force));




final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

final String[] localVarContentTypes = {

};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

String[] localVarAuthNames = new String[] { "Bearer" };

GenericType<Error> localVarReturnType = new GenericType<Error>() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
*
* List all Enterprise OSD clusters
Expand Down

0 comments on commit fb04569

Please sign in to comment.