diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index baa2b65e..fca192f2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,6 +14,6 @@ jobs: - run: mkdir -p "$HOME/.local/bin"; echo "$HOME/.local/bin" >> $GITHUB_PATH - run: wget https://github.com/mikefarah/yq/releases/download/v4.2.0/yq_linux_amd64 -O $HOME/.local/bin/yq && chmod +x $HOME/.local/bin/yq - run: ./scripts/generate.sh - - run: ./scripts/build.sh + - run: mvn clean package diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 16db2c4d..3ce88cf1 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -25,3 +25,9 @@ **/gradlew.bat **/settings.gradle **/.classpath + +## Temp workaround to make build pass +**/**/AclPatternTypeFilter.java +**/**/AclPermissionTypeFilter.java +**/**/AclOperationFilter.java +**/**/AclResourceTypeFilter.java \ No newline at end of file diff --git a/.openapi/kafka-admin-rest.yml b/.openapi/kafka-admin-rest.yml deleted file mode 100644 index 271d4bd2..00000000 --- a/.openapi/kafka-admin-rest.yml +++ /dev/null @@ -1,779 +0,0 @@ -openapi: 3.0.0 -info: - title: Kafka Admin REST API - version: 0.1.0 - description: An API to provide REST endpoints for query Kafka for admin operations - license: - name: Apache 2.0 - url: 'https://www.apache.org/licenses/LICENSE-2.0' -paths: - /topics: - get: - parameters: - - name: limit - description: Maximum number of topics to return - schema: - format: int32 - type: integer - in: query - required: false - - name: filter - description: Filter to apply when returning the list of topics - schema: - type: string - in: query - - name: offset - description: The page offset when returning the limit of requested topics. - schema: - format: int32 - type: integer - in: query - - name: order - description: >- - Order of the items sorting. If "asc" is set as a value, ascending order is used, - descending otherwise. - schema: - type: string - in: query - required: false - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/TopicsList' - description: List of topics matching the users query paramters. - '400': - content: - application/json: {} - description: Unable to retreive topics. - '401': - content: - application/json: {} - description: 'Unauthorized, unable to retrive topics.' - '500': - content: - application/json: {} - description: Internal server error. - '503': - content: - application/json: {} - description: Unable to connect to the Kafka cluster. - # security: - # - Bearer: [] - operationId: getTopics - summary: List of topics - description: >- - Returns a list of all of the available topics, or the list of topics that meet the users URL - Query Parameters. - post: - requestBody: - description: Topic to create. - content: - application/json: - schema: - $ref: '#/components/schemas/NewTopicInput' - examples: - NewTopicInput: - value: - name: my-topic - settings: - numPartitions: 3 - replicationFactor: 4 - config: - - key: min.insync.replicas - value: '1' - - key: max.message.bytes - value: '1050000' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/Topic' - description: Topic created successfully. - '400': - description: Unable to create topic. - '401': - description: 'Unauthorized, Unable to create topic.' - '409': - description: Entry already exisits - '500': - description: Internal server error. - '503': - description: Unable to connect to the Kafka cluster. - # security: - # - Bearer: [] - operationId: createTopic - summary: Creates a new topic - description: Creates a new topic for Kafka. - '/topics/{topicName}': - get: - parameters: - - name: topicName - description: The topic name to retrieve. - schema: - type: string - in: path - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Topic' - description: Kakfa topic details. - '401': - content: - application/json: {} - description: 'Unauthorized, unable to retrieve topics.' - '404': - content: - application/json: {} - description: Topic not found. - '500': - content: - application/json: {} - description: Internal server error. - '503': - content: - application/json: {} - description: Unable to connect to the Kafka cluster. - # security: - # - Bearer: [] - operationId: getTopic - summary: Retrieves the topic with the specified name. - description: Topic - delete: - parameters: - - name: topicName - description: The topic name to delete. - schema: - type: string - in: path - required: true - responses: - '200': - description: Topic deleted successfully. - '401': - description: 'Unathorized, unable to delete topic.' - '404': - description: Topic not found. - '500': - description: Internal server error. - '503': - description: Unable to connect to the Kafka cluster. - # security: - # - Bearer: [] - operationId: deleteTopic - summary: Deletes a topic - description: Deletes the topic with the specified name. - patch: - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateTopicInput' - required: true - parameters: - - name: topicName - description: The topic name which is its unique id. - schema: - type: string - in: path - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Topic' - description: Topic updated successfully. - '400': - description: Unable to update topic. - '401': - description: 'Unauthroized, unable to update topic.' - '404': - description: Topic not found. - '500': - description: Internal server error. - '503': - description: Unable to connect to the Kafka cluster. - # security: - # - Bearer: [] - operationId: updateTopic - summary: Updates the topic with the specified name. - description: updates the topic with the new data. - parameters: - - name: topicName - description: The topic name which is its unique id. - schema: - type: string - in: path - required: true - '/consumer-groups/{consumerGroupId}': - get: - parameters: - - name: consumerGroupId - description: The unique ID of the consumer group - schema: - type: string - in: path - required: true - - examples: - Consumer group: - value: - groupId: consumer_group_1 - consumers: - - groupId: consumer_group_1 - topic: topic-1 - partition: 0 - memberId: consumer_group_member1 - offset: 5 - lag: 0 - logEndOffset: 5 - - groupId: consumer_group_1 - topic: topic-1 - partition: 1 - memberId: consumer_group_member2 - offset: 3 - lag: 0 - logEndOffset: 3 - - groupId: consumer_group_1 - topic: topic-1 - partition: 2 - memberId: consumer_group_member3 - offset: 6 - lag: 1 - logEndOffset: 5 - name: topic - description: Filter consumer groups for a specific topic - schema: - type: string - in: query - required: false - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ConsumerGroup' - description: Consumer group details. - '401': - content: - application/json: {} - description: >- - Unauthorized, request has not been applied because it lacks valid authentication - credentials. - '403': - content: - application/json: {} - description: User is forbidden this view this consumer group. - '404': - content: - application/json: {} - description: Consumer group not found. - '500': - content: - application/json: {} - description: Internal server error. - '503': - content: - application/json: {} - description: Unable to connect to the Kafka cluster. - # security: - # - Bearer: [] - operationId: getConsumerGroupById - summary: Get a single consumer group by its unique ID. - delete: - parameters: - - name: consumerGroupId - description: The unique ID of the cobsumer group. - schema: - type: string - in: path - required: true - responses: - '204': - description: The consumer group was deleted successfully. - '401': - content: - application/json: {} - description: >- - Unauthorized, request has not been applied because it lacks valid authentication - credentials. - '403': - content: - application/json: {} - description: Forbidden to delete this consumer group. - '404': - content: - application/json: {} - description: The consumer group does not exist. - '423': - content: - application/json: {} - description: User cannot delete consumer group with active members. - '500': - content: - application/json: {} - description: Internal Server Error. - '503': - content: - application/json: {} - description: Unable to connect to the Kafka cluster. - # security: - # - Bearer: [] - operationId: deleteConsumerGroupById - summary: Delete a consumer group. - description: 'Delete a consumer group, along with its consumers.' - parameters: - - name: consumerGroupId - description: The unique name of the topic. - schema: - type: string - in: path - required: true - /consumer-groups: - summary: API endpoints for consumer groups under a Kafka topic - get: - parameters: - - name: limit - description: Maximum number of consumer groups to returnd - schema: - type: integer - in: query - - name: offset - description: The page offset when returning the list of consumer groups - schema: - type: integer - in: query - - name: topic - description: Return consumer groups for this topic - schema: - type: string - in: query - - name: group-id-filter - description: Return the consumer groups where the ID begins with this value - schema: - type: string - in: query - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ConsumerGroupList' - examples: - List of consumer groups: - value: - count: 1 - limit: 10 - offset: 0 - items: - - groupId: consumer_group_1 - consumers: - - groupId: consumer_group_1 - topic: topic-1 - partition: 0 - memberId: consumer_group_member1 - offset: 5 - lag: 0 - logEndOffset: 5 - - groupId: consumer_group_1 - topic: topic-1 - partition: 1 - memberId: consumer_group_member2 - offset: 3 - lag: 0 - logEndOffset: 3 - - groupId: consumer_group_1 - topic: topic-1 - partition: 2 - memberId: consumer_group_member3 - offset: 6 - lag: 1 - logEndOffset: 5 - description: List of consumer groups matching the request parameters. - '400': - content: - application/json: {} - description: >- - The server cannot or will not process the request due to something that is perceived - to be a client error such as malformed request syntax. - '401': - content: - application/json: {} - description: >- - Unauthorized, request has not been applied because it lacks valid authentication - credentials. - '403': - content: - application/json: {} - description: User is forbidden to retrieve the list of consumer groups. - '500': - content: - application/json: {} - description: An internal server error occurred. - '503': - content: - application/json: {} - description: Unable to connect to the Kafka cluster. - # security: - # - Bearer: [] - operationId: getConsumerGroups - summary: List of consumer groups in the Kafka instance. - description: Returns a list of all consumer groups for a particular Kafka instance. - /: {} -components: - schemas: - Topic: - title: Root Type for NewTopicInput - description: Kafka Topic (A feed where records are stored and published) - type: object - properties: - name: - description: The name of the topic. - type: string - config: - description: Topic configuration entry. - type: array - items: - $ref: '#/components/schemas/ConfigEntry' - partitions: - description: Partitions for this topic. - type: array - items: - $ref: '#/components/schemas/Partition' - example: - name: my-topic - config: - - key: min.insync.replicas - value: '1' - - key: max.message.bytes - value: '1050000' - partitions: - - id: 0 - replicas: - - id: 0 - - id: 1 - isr: - - id: 0 - - id: 1 - leader: - id: 0 - - id: 1 - replicas: - - id: 0 - - id: 1 - isr: - - id: 0 - - id: 1 - leader: - id: 1 - Partition: - description: Kafka topic partition - required: - - id - type: object - properties: - id: - description: Uniquie id for the partition - type: integer - replicas: - description: List of replicas for the partition - type: array - items: - $ref: '#/components/schemas/Node' - isr: - description: List isync-replicas for this partition. - type: array - items: - $ref: '#/components/schemas/Node' - leader: - $ref: '#/components/schemas/Node' - description: Node that is the leader for this partition. - example: - id: 0 - replicas: - - id: 0 - - id: 1 - isr: - - id: 0 - - id: 1 - leader: - id: 1 - ConfigEntry: - description: Key value pair indicating possible configuration options for a topic. - type: object - properties: - key: - description: The key indicating what configuration entry you would like to set for the topic. - type: string - value: - description: Value to indicate the setting on the topic configuration entry. - type: string - example: - key: min.insync.replicas - value: '1' - TopicsList: - description: A list of topics. - required: - - items - - offset - - limit - - count - type: object - properties: - offset: - description: The page offset - type: integer - limit: - description: number of entries per page - type: integer - count: - description: Total number of topics - type: integer - items: - description: List of topics - type: array - items: - $ref: '#/components/schemas/Topic' - example: - items: - - name: my-topic - config: - - key: min.insync.replicas - value: '1' - - key: max.message.bytes - value: '1050000' - partitions: - - id: 0 - replicas: - - id: 0 - - id: 1 - isr: - - id: 0 - - id: 1 - leader: - id: 0 - - id: 1 - replicas: - - id: 0 - - id: 1 - isr: - - id: 0 - - id: 1 - leader: - id: 1 - offset: 25 - limit: 90 - count: 94 - TopicSettings: - title: Root Type for NewTopicInput - description: Kafka Topic (A feed where records are stored and published) - required: - - numPartitions - type: object - properties: - numPartitions: - description: Number of partitions for this topic. - type: integer - config: - description: Topic configuration entry. - type: array - items: - $ref: '#/components/schemas/ConfigEntry' - example: - numPartitions: 2 - config: - - key: min.insync.replicas - value: '1' - - key: max.message.bytes - value: '1050000' - Node: - description: Kafka server / broker. - type: object - NewTopicInput: - description: Input object to create a new topic. - required: - - name - - settings - type: object - properties: - name: - description: 'The topic name, this value must be unique.' - type: string - settings: - $ref: '#/components/schemas/TopicSettings' - description: >- - The settings that are applicable to this topic. This includes partitions, - configuration information, and number of replicas. - example: - name: my-topic - settings: - numPartitions: 3 - config: - - key: min.insync.replicas - value: '1' - - key: max.message.bytes - value: '1050000' - ConsumerGroup: - description: A group of Kafka consumers - required: - - groupId - - consumers - type: object - properties: - groupId: - description: Unique identifier for the consumer group - type: string - consumers: - description: The list of consumers associated with this consumer group - type: array - items: - $ref: '#/components/schemas/Consumer' - example: - id: consumer_group_1 - consumers: - - groupId: consumer_group_1 - topic: topic-1 - partition: 0 - memberId: consumer_group_member1 - offset: 5 - lag: 0 - logEndOffset: 5 - - groupId: consumer_group_1 - topic: topic-1 - partition: 1 - memberId: consumer_group_member2 - offset: 3 - lag: 0 - logEndOffset: 3 - - groupId: consumer_group_1 - topic: topic-1 - partition: 2 - memberId: consumer_group_member3 - offset: 6 - lag: 1 - logEndOffset: 5 - Consumer: - description: >- - A Kafka consumer is responsible for reading records from one or more topics and one or more - partitions of a topic. - required: - - groupId - - topic - - partition - - offset - - lag - type: object - properties: - groupId: - description: Unique identifier for the consumer group to which this consumer belongs. - type: string - topic: - description: The unique topic name to which this consumer belongs - type: string - partition: - description: The partition number to which this consumer group is assigned to. - type: integer - offset: - description: Offset denotes the position of the consumer in a partition. - type: number - logEndOffset: - description: The log end offset is the offset of the last message written to a log. - type: number - lag: - description: >- - Offset Lag is the delta between the last produced message and the last consumer's - committed offset. - type: integer - memberId: - description: >- - The member ID is a unique identifier given to a consumer by the coordinator upon - initially joining the group. - type: string - example: - groupId: consumer_group_1 - topic: topic-1 - partition: 0 - memberId: consumer_group_1-0 - offset: 5 - lag: 0 - logEndOffset: 5 - ConsumerGroupList: - description: A list of consumer groups - required: - - items - - count - - limit - - offset - type: object - properties: - items: - description: Consumer group list items - type: array - items: - $ref: '#/components/schemas/ConsumerGroup' - count: - description: The total number of consumer groups. - type: number - limit: - description: The number of consumer groups per page. - type: number - offset: - description: The page offset - type: integer - example: - count: 1 - limit: 10 - offset: 0 - items: - - groupId: consumer_group_1 - consumers: - - groupId: consumer_group_1 - topic: topic-1 - partition: 0 - memberId: consumer_group_member1 - offset: 5 - lag: 0 - logEndOffset: 5 - - groupId: consumer_group_1 - topic: topic-1 - partition: 1 - memberId: consumer_group_member2 - offset: 3 - lag: 0 - logEndOffset: 3 - - groupId: consumer_group_1 - topic: topic-1 - partition: 2 - memberId: consumer_group_member3 - offset: 6 - lag: 1 - logEndOffset: 5 - UpdateTopicInput: - title: Root Type for UpdateTopicInput - description: Kafka Topic (A feed where records are stored and published) - type: object - properties: - config: - description: Topic configuration entry. - type: array - items: - $ref: '#/components/schemas/ConfigEntry' - example: - config: - - - key: min.insync.replicas - value: '1' - - - key: max.message.bytes - value: '1050000' - securitySchemes: - Bearer: - flows: {} - type: oauth2 - description: Access token used with OAuth 2.0 \ No newline at end of file diff --git a/Makefile b/Makefile index 109436fa..88849d88 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,12 @@ install: - ./scripts/install.sh + mvn clean install .PHONY: install build: - ./scripts/build.sh + mvn clean package .PHONE: build generate: ./scripts/generate.sh - .PHONY: generate \ No newline at end of file diff --git a/openapitools.json b/openapitools.json index d2fdbae8..29f5d069 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "5.1.1" + "version": "5.2.0" } } diff --git a/packages/kafka-instance-sdk/README.md b/packages/kafka-instance-sdk/README.md index 9afac469..cadeaf40 100644 --- a/packages/kafka-instance-sdk/README.md +++ b/packages/kafka-instance-sdk/README.md @@ -144,6 +144,9 @@ Class | Method | HTTP request | Description - [ConsumerGroup](docs/ConsumerGroup.md) - [ConsumerGroupList](docs/ConsumerGroupList.md) - [ConsumerGroupResetOffsetParameters](docs/ConsumerGroupResetOffsetParameters.md) + - [ConsumerGroupResetOffsetResult](docs/ConsumerGroupResetOffsetResult.md) + - [ConsumerGroupResetOffsetResultAllOf](docs/ConsumerGroupResetOffsetResultAllOf.md) + - [ConsumerGroupResetOffsetResultItem](docs/ConsumerGroupResetOffsetResultItem.md) - [Error](docs/Error.md) - [NewTopicInput](docs/NewTopicInput.md) - [Partition](docs/Partition.md) diff --git a/packages/kafka-instance-sdk/api/openapi.yaml b/packages/kafka-instance-sdk/api/openapi.yaml index 04ef742c..8f700ce2 100644 --- a/packages/kafka-instance-sdk/api/openapi.yaml +++ b/packages/kafka-instance-sdk/api/openapi.yaml @@ -697,9 +697,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/ConsumerGroupResetOffsetResult' - type: array + $ref: '#/components/schemas/ConsumerGroupResetOffsetResult' description: The consumer group offsets have been reset. "400": description: The consumer group to reset the offset does have active consumers. @@ -1839,37 +1837,50 @@ components: title: Root Type for TopicsToResetOffset type: object ConsumerGroupResetOffsetResult: + allOf: + - $ref: '#/components/schemas/ConsumerGroupResetOffsetResult_allOf' + - $ref: '#/components/schemas/ResultListPage' + example: + total: 2 + page: 1 + size: 10 + items: + - topic: your-topic + partition: 0 + offset: 4 + - topic: my-topic + partition: 0 + offset: 0 + title: Root Type for ConsumerGroupResetOffsetResult + type: object + ConsumerGroupResetOffsetResultItem: example: - - topic: your-topic + topic: your-topic partition: 0 offset: 4 - - topic: my-topic - partition: 0 - offset: 0 - items: - properties: - topic: - type: string - partition: - format: int32 - type: integer - offset: - format: int32 - type: integer - type: object - title: Root Type for ConsumerGroupResetOffsetResult - type: array + properties: + topic: + type: string + partition: + format: int32 + type: integer + offset: + format: int32 + type: integer + type: object ResultListPage: properties: total: description: Total number of entries in the full result set type: number page: - description: Current page number + description: Current page number (returned for fetch requests) type: integer size: - description: Number of entries per page + description: Number of entries per page (returned for fetch requests) type: number + required: + - total type: object Error: description: General error response @@ -1894,6 +1905,13 @@ components: enum: - MATCH type: string + ConsumerGroupResetOffsetResult_allOf: + properties: + items: + items: + $ref: '#/components/schemas/ConsumerGroupResetOffsetResultItem' + type: array + type: object securitySchemes: Bearer: description: Access token used with OAuth 2.0 diff --git a/packages/kafka-instance-sdk/docs/AclBindingListPage.md b/packages/kafka-instance-sdk/docs/AclBindingListPage.md index 8c40c6d2..2a2fb90d 100644 --- a/packages/kafka-instance-sdk/docs/AclBindingListPage.md +++ b/packages/kafka-instance-sdk/docs/AclBindingListPage.md @@ -9,9 +9,9 @@ A page of ACL binding entries Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **items** | [**List<AclBinding>**](AclBinding.md) | | [optional] -**total** | **BigDecimal** | Total number of entries in the full result set | [optional] -**page** | **Integer** | Current page number | [optional] -**size** | **BigDecimal** | Number of entries per page | [optional] +**total** | **BigDecimal** | Total number of entries in the full result set | +**page** | **Integer** | Current page number (returned for fetch requests) | [optional] +**size** | **BigDecimal** | Number of entries per page (returned for fetch requests) | [optional] diff --git a/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResult.md b/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResult.md new file mode 100644 index 00000000..1be64f57 --- /dev/null +++ b/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResult.md @@ -0,0 +1,16 @@ + + +# ConsumerGroupResetOffsetResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List<ConsumerGroupResetOffsetResultItem>**](ConsumerGroupResetOffsetResultItem.md) | | [optional] +**total** | **BigDecimal** | Total number of entries in the full result set | +**page** | **Integer** | Current page number (returned for fetch requests) | [optional] +**size** | **BigDecimal** | Number of entries per page (returned for fetch requests) | [optional] + + + diff --git a/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResultAllOf.md b/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResultAllOf.md new file mode 100644 index 00000000..a4b01557 --- /dev/null +++ b/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResultAllOf.md @@ -0,0 +1,13 @@ + + +# ConsumerGroupResetOffsetResultAllOf + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List<ConsumerGroupResetOffsetResultItem>**](ConsumerGroupResetOffsetResultItem.md) | | [optional] + + + diff --git a/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResultItem.md b/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResultItem.md new file mode 100644 index 00000000..b425ba22 --- /dev/null +++ b/packages/kafka-instance-sdk/docs/ConsumerGroupResetOffsetResultItem.md @@ -0,0 +1,15 @@ + + +# ConsumerGroupResetOffsetResultItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topic** | **String** | | [optional] +**partition** | **Integer** | | [optional] +**offset** | **Integer** | | [optional] + + + diff --git a/packages/kafka-instance-sdk/docs/GroupsApi.md b/packages/kafka-instance-sdk/docs/GroupsApi.md index 47f06951..e8426749 100644 --- a/packages/kafka-instance-sdk/docs/GroupsApi.md +++ b/packages/kafka-instance-sdk/docs/GroupsApi.md @@ -261,7 +261,7 @@ Name | Type | Description | Notes ## resetConsumerGroupOffset -> List<List<Object>> resetConsumerGroupOffset(consumerGroupId, consumerGroupResetOffsetParameters) +> ConsumerGroupResetOffsetResult resetConsumerGroupOffset(consumerGroupId, consumerGroupResetOffsetParameters) Reset the offset for a consumer group. @@ -291,7 +291,7 @@ public class Example { String consumerGroupId = "consumerGroupId_example"; // String | The ID of the consumer group. ConsumerGroupResetOffsetParameters consumerGroupResetOffsetParameters = new ConsumerGroupResetOffsetParameters(); // ConsumerGroupResetOffsetParameters | try { - List> result = apiInstance.resetConsumerGroupOffset(consumerGroupId, consumerGroupResetOffsetParameters); + ConsumerGroupResetOffsetResult result = apiInstance.resetConsumerGroupOffset(consumerGroupId, consumerGroupResetOffsetParameters); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling GroupsApi#resetConsumerGroupOffset"); @@ -314,7 +314,7 @@ Name | Type | Description | Notes ### Return type -[**List<List<Object>>**](List.md) +[**ConsumerGroupResetOffsetResult**](ConsumerGroupResetOffsetResult.md) ### Authorization diff --git a/packages/kafka-instance-sdk/docs/ResultListPage.md b/packages/kafka-instance-sdk/docs/ResultListPage.md index f4208a27..3bf5867e 100644 --- a/packages/kafka-instance-sdk/docs/ResultListPage.md +++ b/packages/kafka-instance-sdk/docs/ResultListPage.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **BigDecimal** | Total number of entries in the full result set | [optional] -**page** | **Integer** | Current page number | [optional] -**size** | **BigDecimal** | Number of entries per page | [optional] +**total** | **BigDecimal** | Total number of entries in the full result set | +**page** | **Integer** | Current page number (returned for fetch requests) | [optional] +**size** | **BigDecimal** | Number of entries per page (returned for fetch requests) | [optional] diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/GroupsApi.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/GroupsApi.java index 74049712..c01e0ce9 100644 --- a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/GroupsApi.java +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/GroupsApi.java @@ -10,6 +10,7 @@ import com.openshift.cloud.api.kas.auth.models.ConsumerGroup; import com.openshift.cloud.api.kas.auth.models.ConsumerGroupList; import com.openshift.cloud.api.kas.auth.models.ConsumerGroupResetOffsetParameters; +import com.openshift.cloud.api.kas.auth.models.ConsumerGroupResetOffsetResult; import com.openshift.cloud.api.kas.auth.models.Error; import java.util.ArrayList; @@ -190,10 +191,10 @@ public ConsumerGroupList getConsumerGroups(Integer offset, Integer limit, Intege * Reset the offset for a particular consumer group. * @param consumerGroupId The ID of the consumer group. (required) * @param consumerGroupResetOffsetParameters (required) - * @return a {@code List>} + * @return a {@code ConsumerGroupResetOffsetResult} * @throws ApiException if fails to make API call */ - public List> resetConsumerGroupOffset(String consumerGroupId, ConsumerGroupResetOffsetParameters consumerGroupResetOffsetParameters) throws ApiException { + public ConsumerGroupResetOffsetResult resetConsumerGroupOffset(String consumerGroupId, ConsumerGroupResetOffsetParameters consumerGroupResetOffsetParameters) throws ApiException { Object localVarPostBody = consumerGroupResetOffsetParameters; // verify the required parameter 'consumerGroupId' is set @@ -232,7 +233,7 @@ public List> resetConsumerGroupOffset(String consumerGroupId, Consu String[] localVarAuthNames = new String[] { "Bearer" }; - GenericType>> localVarReturnType = new GenericType>>() {}; + GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclBindingListPage.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclBindingListPage.java index 05e6e603..f11b7cc6 100644 --- a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclBindingListPage.java +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclBindingListPage.java @@ -101,10 +101,9 @@ public AclBindingListPage total(BigDecimal total) { * Total number of entries in the full result set * @return total **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Total number of entries in the full result set") + @ApiModelProperty(required = true, value = "Total number of entries in the full result set") @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public BigDecimal getTotal() { return total; @@ -112,7 +111,7 @@ public BigDecimal getTotal() { @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setTotal(BigDecimal total) { this.total = total; } @@ -125,11 +124,11 @@ public AclBindingListPage page(Integer page) { } /** - * Current page number + * Current page number (returned for fetch requests) * @return page **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Current page number") + @ApiModelProperty(value = "Current page number (returned for fetch requests)") @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -152,11 +151,11 @@ public AclBindingListPage size(BigDecimal size) { } /** - * Number of entries per page + * Number of entries per page (returned for fetch requests) * @return size **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Number of entries per page") + @ApiModelProperty(value = "Number of entries per page (returned for fetch requests)") @JsonProperty(JSON_PROPERTY_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclOperationFilter.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclOperationFilter.java index 8ee23b66..99509391 100644 --- a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclOperationFilter.java +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclOperationFilter.java @@ -18,6 +18,7 @@ import com.openshift.cloud.api.kas.auth.models.AclFilterAny; import com.openshift.cloud.api.kas.auth.models.AclOperation; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AclOperationFilter diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclPatternTypeFilter.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclPatternTypeFilter.java index 65ef281b..4a1850b4 100644 --- a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclPatternTypeFilter.java +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclPatternTypeFilter.java @@ -19,7 +19,7 @@ import com.openshift.cloud.api.kas.auth.models.AclPatternType; import com.openshift.cloud.api.kas.auth.models.AclPatternTypeFilterOneOf; import com.fasterxml.jackson.annotation.JsonPropertyOrder; - +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AclPatternTypeFilter */ diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclPermissionTypeFilter.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclPermissionTypeFilter.java index f23c1d0e..7a55f324 100644 --- a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclPermissionTypeFilter.java +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclPermissionTypeFilter.java @@ -18,6 +18,7 @@ import com.openshift.cloud.api.kas.auth.models.AclFilterAny; import com.openshift.cloud.api.kas.auth.models.AclPermissionType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AclPermissionTypeFilter diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclResourceTypeFilter.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclResourceTypeFilter.java index c491a2a1..cf763b91 100644 --- a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclResourceTypeFilter.java +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/AclResourceTypeFilter.java @@ -18,6 +18,7 @@ import com.openshift.cloud.api.kas.auth.models.AclFilterAny; import com.openshift.cloud.api.kas.auth.models.AclResourceType; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; /** * AclResourceTypeFilter diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResult.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResult.java new file mode 100644 index 00000000..d3f471df --- /dev/null +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResult.java @@ -0,0 +1,217 @@ +/* + * Kafka Admin REST API + * An API to provide REST endpoints for query Kafka for admin operations + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.openshift.cloud.api.kas.auth.models; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.openshift.cloud.api.kas.auth.models.ConsumerGroupResetOffsetResultAllOf; +import com.openshift.cloud.api.kas.auth.models.ConsumerGroupResetOffsetResultItem; +import com.openshift.cloud.api.kas.auth.models.ResultListPage; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * ConsumerGroupResetOffsetResult + */ +@JsonPropertyOrder({ + ConsumerGroupResetOffsetResult.JSON_PROPERTY_ITEMS, + ConsumerGroupResetOffsetResult.JSON_PROPERTY_TOTAL, + ConsumerGroupResetOffsetResult.JSON_PROPERTY_PAGE, + ConsumerGroupResetOffsetResult.JSON_PROPERTY_SIZE +}) +@JsonTypeName("ConsumerGroupResetOffsetResult") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConsumerGroupResetOffsetResult { + public static final String JSON_PROPERTY_ITEMS = "items"; + private List items = null; + + public static final String JSON_PROPERTY_TOTAL = "total"; + private BigDecimal total; + + public static final String JSON_PROPERTY_PAGE = "page"; + private Integer page; + + public static final String JSON_PROPERTY_SIZE = "size"; + private BigDecimal size; + + + public ConsumerGroupResetOffsetResult items(List items) { + + this.items = items; + return this; + } + + public ConsumerGroupResetOffsetResult addItemsItem(ConsumerGroupResetOffsetResultItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setItems(List items) { + this.items = items; + } + + + public ConsumerGroupResetOffsetResult total(BigDecimal total) { + + this.total = total; + return this; + } + + /** + * Total number of entries in the full result set + * @return total + **/ + @ApiModelProperty(required = true, value = "Total number of entries in the full result set") + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BigDecimal getTotal() { + return total; + } + + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(BigDecimal total) { + this.total = total; + } + + + public ConsumerGroupResetOffsetResult page(Integer page) { + + this.page = page; + return this; + } + + /** + * Current page number (returned for fetch requests) + * @return page + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Current page number (returned for fetch requests)") + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPage() { + return page; + } + + + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPage(Integer page) { + this.page = page; + } + + + public ConsumerGroupResetOffsetResult size(BigDecimal size) { + + this.size = size; + return this; + } + + /** + * Number of entries per page (returned for fetch requests) + * @return size + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Number of entries per page (returned for fetch requests)") + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getSize() { + return size; + } + + + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSize(BigDecimal size) { + this.size = size; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConsumerGroupResetOffsetResult consumerGroupResetOffsetResult = (ConsumerGroupResetOffsetResult) o; + return Objects.equals(this.items, consumerGroupResetOffsetResult.items) && + Objects.equals(this.total, consumerGroupResetOffsetResult.total) && + Objects.equals(this.page, consumerGroupResetOffsetResult.page) && + Objects.equals(this.size, consumerGroupResetOffsetResult.size); + } + + @Override + public int hashCode() { + return Objects.hash(items, total, page, size); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConsumerGroupResetOffsetResult {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResultAllOf.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResultAllOf.java new file mode 100644 index 00000000..f6bf5a3c --- /dev/null +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResultAllOf.java @@ -0,0 +1,116 @@ +/* + * Kafka Admin REST API + * An API to provide REST endpoints for query Kafka for admin operations + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.openshift.cloud.api.kas.auth.models; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.openshift.cloud.api.kas.auth.models.ConsumerGroupResetOffsetResultItem; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * ConsumerGroupResetOffsetResultAllOf + */ +@JsonPropertyOrder({ + ConsumerGroupResetOffsetResultAllOf.JSON_PROPERTY_ITEMS +}) +@JsonTypeName("ConsumerGroupResetOffsetResult_allOf") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConsumerGroupResetOffsetResultAllOf { + public static final String JSON_PROPERTY_ITEMS = "items"; + private List items = null; + + + public ConsumerGroupResetOffsetResultAllOf items(List items) { + + this.items = items; + return this; + } + + public ConsumerGroupResetOffsetResultAllOf addItemsItem(ConsumerGroupResetOffsetResultItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setItems(List items) { + this.items = items; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConsumerGroupResetOffsetResultAllOf consumerGroupResetOffsetResultAllOf = (ConsumerGroupResetOffsetResultAllOf) o; + return Objects.equals(this.items, consumerGroupResetOffsetResultAllOf.items); + } + + @Override + public int hashCode() { + return Objects.hash(items); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConsumerGroupResetOffsetResultAllOf {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResultItem.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResultItem.java new file mode 100644 index 00000000..781bf73a --- /dev/null +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ConsumerGroupResetOffsetResultItem.java @@ -0,0 +1,171 @@ +/* + * Kafka Admin REST API + * An API to provide REST endpoints for query Kafka for admin operations + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.openshift.cloud.api.kas.auth.models; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * ConsumerGroupResetOffsetResultItem + */ +@JsonPropertyOrder({ + ConsumerGroupResetOffsetResultItem.JSON_PROPERTY_TOPIC, + ConsumerGroupResetOffsetResultItem.JSON_PROPERTY_PARTITION, + ConsumerGroupResetOffsetResultItem.JSON_PROPERTY_OFFSET +}) +@JsonTypeName("ConsumerGroupResetOffsetResultItem") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ConsumerGroupResetOffsetResultItem { + public static final String JSON_PROPERTY_TOPIC = "topic"; + private String topic; + + public static final String JSON_PROPERTY_PARTITION = "partition"; + private Integer partition; + + public static final String JSON_PROPERTY_OFFSET = "offset"; + private Integer offset; + + + public ConsumerGroupResetOffsetResultItem topic(String topic) { + + this.topic = topic; + return this; + } + + /** + * Get topic + * @return topic + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TOPIC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTopic() { + return topic; + } + + + @JsonProperty(JSON_PROPERTY_TOPIC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTopic(String topic) { + this.topic = topic; + } + + + public ConsumerGroupResetOffsetResultItem partition(Integer partition) { + + this.partition = partition; + return this; + } + + /** + * Get partition + * @return partition + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PARTITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getPartition() { + return partition; + } + + + @JsonProperty(JSON_PROPERTY_PARTITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPartition(Integer partition) { + this.partition = partition; + } + + + public ConsumerGroupResetOffsetResultItem offset(Integer offset) { + + this.offset = offset; + return this; + } + + /** + * Get offset + * @return offset + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getOffset() { + return offset; + } + + + @JsonProperty(JSON_PROPERTY_OFFSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOffset(Integer offset) { + this.offset = offset; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConsumerGroupResetOffsetResultItem consumerGroupResetOffsetResultItem = (ConsumerGroupResetOffsetResultItem) o; + return Objects.equals(this.topic, consumerGroupResetOffsetResultItem.topic) && + Objects.equals(this.partition, consumerGroupResetOffsetResultItem.partition) && + Objects.equals(this.offset, consumerGroupResetOffsetResultItem.offset); + } + + @Override + public int hashCode() { + return Objects.hash(topic, partition, offset); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConsumerGroupResetOffsetResultItem {\n"); + sb.append(" topic: ").append(toIndentedString(topic)).append("\n"); + sb.append(" partition: ").append(toIndentedString(partition)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ResultListPage.java b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ResultListPage.java index d7baf830..934805b5 100644 --- a/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ResultListPage.java +++ b/packages/kafka-instance-sdk/src/main/java/com/openshift/cloud/api/kas/auth/models/ResultListPage.java @@ -56,10 +56,9 @@ public ResultListPage total(BigDecimal total) { * Total number of entries in the full result set * @return total **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Total number of entries in the full result set") + @ApiModelProperty(required = true, value = "Total number of entries in the full result set") @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public BigDecimal getTotal() { return total; @@ -67,7 +66,7 @@ public BigDecimal getTotal() { @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setTotal(BigDecimal total) { this.total = total; } @@ -80,11 +79,11 @@ public ResultListPage page(Integer page) { } /** - * Current page number + * Current page number (returned for fetch requests) * @return page **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Current page number") + @ApiModelProperty(value = "Current page number (returned for fetch requests)") @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -107,11 +106,11 @@ public ResultListPage size(BigDecimal size) { } /** - * Number of entries per page + * Number of entries per page (returned for fetch requests) * @return size **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Number of entries per page") + @ApiModelProperty(value = "Number of entries per page (returned for fetch requests)") @JsonProperty(JSON_PROPERTY_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..e8445ebc --- /dev/null +++ b/pom.xml @@ -0,0 +1,88 @@ + + + 4.0.0 + + com.redhat.cloud + rhoas-sdk-java + 0.1.0-SNAPSHOT + pom + + app-services-sdk-java + http://console.redhat.com + + packages/connector-management-sdk + packages/kafka-management-sdk + packages/registry-management-sdk + packages/kafka-instance-sdk + + + + + + io.quarkus + quarkus-bom + ${quarkus.version} + pom + import + + + + + + + 11 + 11 + 11 + 1.13.1.Final + 2.13.3 + + + + + + net.revelc.code.formatter + formatter-maven-plugin + 2.15.0 + + ${project.parent.basedir}/source/eclipse-formatter-config.xml + UTF-8 + + + + net.nicoulaj.maven.plugins + checksum-maven-plugin + 1.9 + + + + artifacts + + + + + + SHA-256 + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.21.0 + + + + org.junit.platform + junit-platform-surefire-provider + 1.2.0-M1 + + + org.junit.jupiter + junit-jupiter-engine + 5.2.0-M1 + + + + + + \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100755 index 8efecb86..00000000 --- a/scripts/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -cd "$(dirname "$0")" -cd ../packages/kafka-management-sdk -mvn package - -cd "$(dirname "$0")" -cd ../packages/kafka-instance-sdk -mvn package - -cd "$(dirname "$0")" -cd ../packages/registry-management-sdk -mvn package diff --git a/scripts/generate.sh b/scripts/generate.sh index cbfbe098..ef9b9629 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash ## OPENAPI_FILENAME=yourapi generate_js.sh +set -e + npx @openapitools/openapi-generator-cli version-manager set 5.2.0 echo "Generating SDKs" @@ -45,7 +47,8 @@ OPENAPI_FILENAME=".openapi/kafka-admin-rest.yaml" PACKAGE_NAME="com.openshift.cloud.api.kas.auth" OUTPUT_PATH="packages/kafka-instance-sdk/" yq e 'del(.. | select(has("deprecated")))' "${OPENAPI_FILENAME}" > "${OPENAPI_FILENAME}.processed" -rm -Rf $OUTPUT_PATH/src $OUTPUT_PATH/target +## Disabled temporairly +##rm -Rf $OUTPUT_PATH/src $OUTPUT_PATH/target echo "Generating based on ${OPENAPI_FILENAME}" diff --git a/scripts/install.sh b/scripts/install.sh deleted file mode 100644 index eb6c6b0d..00000000 --- a/scripts/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -cd ./packages/kafka-management-sdk -mvn clean install -cd ../.. - -cd ./packages/kafka-instance-sdk -mvn clean install -cd ../.. - -cd ./packages/registry-management-sdk -mvn clean install -cd ../..