Skip to content

Commit e8f9407

Browse files
committed
chore: sync from ark-apis 665a2441c2
Auto-generated SDK sync from ark-apis at 665a2441c2c8d9342e4770d776ea19de36ef6f83. Generated files are overwritten by the sync pipeline and should not be edited by hand. Sync-Source-Commit: ef0cb7eca8f44670e28abf52eff613cf2c624dfc Ark-APIs-Commit: 665a2441c2c8d9342e4770d776ea19de36ef6f83 Release-Version: 0.3.0
1 parent bd6b923 commit e8f9407

91 files changed

Lines changed: 16850 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Java Release
2+
3+
# Publishes com.volcengine:ark-runtime to Maven Central. Tags are created
4+
# exclusively by ark-hand after a sync PR lands on main, so a pushed v* tag
5+
# is always a reviewed release snapshot whose tree matches the internal
6+
# source tree. Mirrors the proven setup from volcengine/volcengine-java-sdk:
7+
# the `public` profile in pom.xml wires maven-javadoc/gpg and the
8+
# central-publishing-maven-plugin (tokenAuth, autoPublish); this workflow
9+
# only injects the Central token and the GPG signing key.
10+
#
11+
# The workflow_dispatch input allows re-publishing (or first-publishing) an
12+
# existing tag — e.g. when secrets were still missing when the tag was
13+
# originally pushed.
14+
on:
15+
push:
16+
tags:
17+
- "v*"
18+
workflow_dispatch:
19+
inputs:
20+
tag:
21+
description: "Release tag to publish (must already exist, e.g. v0.3.0)"
22+
required: true
23+
type: string
24+
25+
permissions:
26+
contents: read
27+
28+
# Never cancel an in-flight publish; a second dispatch for the same tag
29+
# should queue behind it instead of racing the upload.
30+
concurrency:
31+
group: java-release-${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
32+
cancel-in-progress: false
33+
34+
jobs:
35+
release:
36+
name: Build and publish to Maven Central
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 30
39+
40+
steps:
41+
- name: Resolve release tag
42+
id: tag
43+
env:
44+
DISPATCH_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || '' }}
45+
run: |
46+
tag="${DISPATCH_TAG:-${GITHUB_REF_NAME}}"
47+
case "${tag}" in
48+
v[0-9]*.[0-9]*.0) ;;
49+
*)
50+
echo "::error::${tag} is not a release tag (expected vMAJOR.MINOR.0)"
51+
exit 1
52+
;;
53+
esac
54+
echo "name=${tag}" >> "$GITHUB_OUTPUT"
55+
56+
- name: Check out repository
57+
uses: actions/checkout@v4
58+
with:
59+
ref: ${{ steps.tag.outputs.name }}
60+
61+
- name: Verify pom version matches tag
62+
env:
63+
RELEASE_TAG: ${{ steps.tag.outputs.name }}
64+
run: |
65+
version="${RELEASE_TAG#v}"
66+
actual=$(python3 -c "
67+
import re
68+
m = re.search(r'<artifactId>ark-runtime</artifactId>\s*<version>([^<]+)</version>', open('pom.xml').read())
69+
print(m.group(1) if m else 'missing')
70+
")
71+
if [ "${actual}" != "${version}" ]; then
72+
echo "::error::pom.xml ark-runtime version ${actual} does not match tag ${RELEASE_TAG}"
73+
exit 1
74+
fi
75+
76+
- name: Set up JDK
77+
uses: actions/setup-java@v4
78+
with:
79+
java-version: "8"
80+
distribution: "temurin"
81+
server-id: central
82+
server-username: MAVEN_CENTRAL_USERNAME
83+
server-password: MAVEN_CENTRAL_TOKEN
84+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
85+
gpg-passphrase: GPG_PASSPHRASE
86+
87+
- name: Check Maven Central version
88+
id: maven_check
89+
env:
90+
RELEASE_TAG: ${{ steps.tag.outputs.name }}
91+
run: |
92+
version="${RELEASE_TAG#v}"
93+
pom_url="https://repo.maven.apache.org/maven2/com/volcengine/ark-runtime/${version}/ark-runtime-${version}.pom"
94+
code=$(curl -sS -o /dev/null -w '%{http_code}' "${pom_url}")
95+
echo "publish_needed=$([ "${code}" = "200" ] && echo false || echo true)" >> "$GITHUB_OUTPUT"
96+
97+
- name: Check publish credentials
98+
env:
99+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
100+
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
101+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
102+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
103+
run: |
104+
missing=""
105+
[ -z "${OSSRH_USERNAME}" ] && missing="${missing} OSSRH_USERNAME"
106+
[ -z "${OSSRH_TOKEN}" ] && missing="${missing} OSSRH_TOKEN"
107+
[ -z "${GPG_PRIVATE_KEY}" ] && missing="${missing} GPG_PRIVATE_KEY"
108+
[ -z "${GPG_PASSPHRASE}" ] && missing="${missing} GPG_PASSPHRASE"
109+
if [ -n "${missing}" ]; then
110+
echo "::error::missing repository secrets:${missing}"
111+
exit 1
112+
fi
113+
114+
- name: Publish to Maven Central
115+
if: steps.maven_check.outputs.publish_needed == 'true'
116+
run: |
117+
mvn clean deploy -B -Ppublic -DskipTests \
118+
-Dmaven.javadoc.failOnError=false \
119+
-Dmaven.javadoc.quiet=true
120+
env:
121+
MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }}
122+
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
123+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ automatic retry logic.
1313
<dependency>
1414
<groupId>com.volcengine</groupId>
1515
<artifactId>ark-runtime</artifactId>
16-
<version>0.2.0</version>
16+
<version>0.3.0</version>
1717
</dependency>
1818
```
1919

2020
### Gradle
2121

2222
```groovy
23-
implementation 'com.volcengine:ark-runtime:0.2.0'
23+
implementation 'com.volcengine:ark-runtime:0.3.0'
2424
```
2525

2626
## Usage

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.3.0

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.volcengine</groupId>
88
<artifactId>ark-runtime</artifactId>
9-
<version>0.2.0</version>
9+
<version>0.3.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>ark-runtime</name>
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
// Copyright (c) 2026 ByteDance Ltd. and/or its affiliates.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
/*
5+
* Ark Messages API
6+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7+
*
8+
* The version of the OpenAPI document: 0.1.0
9+
*
10+
*
11+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12+
* https://openapi-generator.tech
13+
* Do not edit the class manually.
14+
*/
15+
16+
17+
package com.volcengine.ark.runtime.models.messages;
18+
19+
import com.fasterxml.jackson.annotation.JsonInclude;
20+
import com.fasterxml.jackson.annotation.JsonProperty;
21+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
22+
import java.util.Objects;
23+
24+
/**
25+
* ContentBlockStart
26+
*/
27+
@JsonPropertyOrder({
28+
ContentBlockStart.JSON_PROPERTY_TYPE,
29+
ContentBlockStart.JSON_PROPERTY_INDEX,
30+
ContentBlockStart.JSON_PROPERTY_CONTENT_BLOCK
31+
})
32+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.21.0")
33+
public class ContentBlockStart implements MessagesStreamEvent {
34+
public static final String JSON_PROPERTY_TYPE = "type";
35+
@javax.annotation.Nonnull
36+
private MessagesStreamEventType type = MessagesStreamEventType.CONTENT_BLOCK_START;
37+
38+
public static final String JSON_PROPERTY_INDEX = "index";
39+
@javax.annotation.Nonnull
40+
private Integer index;
41+
42+
public static final String JSON_PROPERTY_CONTENT_BLOCK = "content_block";
43+
@javax.annotation.Nonnull
44+
private ContentBlockStartContentBlock contentBlock;
45+
46+
public ContentBlockStart() {
47+
}
48+
49+
public ContentBlockStart type(@javax.annotation.Nonnull MessagesStreamEventType type) {
50+
51+
this.type = type;
52+
return this;
53+
}
54+
55+
/**
56+
* Get type
57+
* @return type
58+
*/
59+
@javax.annotation.Nonnull
60+
@JsonProperty(value = JSON_PROPERTY_TYPE, required = true)
61+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
62+
63+
public MessagesStreamEventType getType() {
64+
return type;
65+
}
66+
67+
68+
@JsonProperty(value = JSON_PROPERTY_TYPE, required = true)
69+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
70+
public void setType(@javax.annotation.Nonnull MessagesStreamEventType type) {
71+
this.type = type;
72+
}
73+
74+
public ContentBlockStart index(@javax.annotation.Nonnull Integer index) {
75+
76+
this.index = index;
77+
return this;
78+
}
79+
80+
/**
81+
* Get index
82+
* @return index
83+
*/
84+
@javax.annotation.Nonnull
85+
@JsonProperty(value = JSON_PROPERTY_INDEX, required = true)
86+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
87+
88+
public Integer getIndex() {
89+
return index;
90+
}
91+
92+
93+
@JsonProperty(value = JSON_PROPERTY_INDEX, required = true)
94+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
95+
public void setIndex(@javax.annotation.Nonnull Integer index) {
96+
this.index = index;
97+
}
98+
99+
public ContentBlockStart contentBlock(@javax.annotation.Nonnull ContentBlockStartContentBlock contentBlock) {
100+
101+
this.contentBlock = contentBlock;
102+
return this;
103+
}
104+
105+
/**
106+
* Get contentBlock
107+
* @return contentBlock
108+
*/
109+
@javax.annotation.Nonnull
110+
@JsonProperty(value = JSON_PROPERTY_CONTENT_BLOCK, required = true)
111+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
112+
113+
public ContentBlockStartContentBlock getContentBlock() {
114+
return contentBlock;
115+
}
116+
117+
118+
@JsonProperty(value = JSON_PROPERTY_CONTENT_BLOCK, required = true)
119+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
120+
public void setContentBlock(@javax.annotation.Nonnull ContentBlockStartContentBlock contentBlock) {
121+
this.contentBlock = contentBlock;
122+
}
123+
124+
125+
@Override
126+
public boolean equals(Object o) {
127+
if (this == o) {
128+
return true;
129+
}
130+
if (o == null || getClass() != o.getClass()) {
131+
return false;
132+
}
133+
ContentBlockStart contentBlockStart = (ContentBlockStart) o;
134+
return Objects.equals(this.type, contentBlockStart.type) &&
135+
Objects.equals(this.index, contentBlockStart.index) &&
136+
Objects.equals(this.contentBlock, contentBlockStart.contentBlock);
137+
}
138+
139+
@Override
140+
public int hashCode() {
141+
return Objects.hash(type, index, contentBlock);
142+
}
143+
144+
@Override
145+
public String toString() {
146+
StringBuilder sb = new StringBuilder();
147+
sb.append("class ContentBlockStart {\n");
148+
sb.append(" type: ").append(toIndentedString(type)).append("\n");
149+
sb.append(" index: ").append(toIndentedString(index)).append("\n");
150+
sb.append(" contentBlock: ").append(toIndentedString(contentBlock)).append("\n");
151+
sb.append("}");
152+
return sb.toString();
153+
}
154+
155+
/**
156+
* Convert the given object to string with each line indented by 4 spaces
157+
* (except the first line).
158+
*/
159+
private String toIndentedString(Object o) {
160+
return o == null ? "null" : o.toString().replace("\n", "\n ");
161+
}
162+
163+
public static class Builder {
164+
165+
private ContentBlockStart instance;
166+
167+
public Builder() {
168+
this(new ContentBlockStart());
169+
}
170+
171+
protected Builder(ContentBlockStart instance) {
172+
this.instance = instance;
173+
}
174+
175+
public ContentBlockStart.Builder type(MessagesStreamEventType type) {
176+
this.instance.type = type;
177+
return this;
178+
}
179+
public ContentBlockStart.Builder index(Integer index) {
180+
this.instance.index = index;
181+
return this;
182+
}
183+
public ContentBlockStart.Builder contentBlock(ContentBlockStartContentBlock contentBlock) {
184+
this.instance.contentBlock = contentBlock;
185+
return this;
186+
}
187+
188+
189+
/**
190+
* returns a built ContentBlockStart instance.
191+
*
192+
* The builder is not reusable.
193+
*/
194+
public ContentBlockStart build() {
195+
try {
196+
return this.instance;
197+
} finally {
198+
// ensure that this.instance is not reused
199+
this.instance = null;
200+
}
201+
}
202+
203+
@Override
204+
public String toString() {
205+
return getClass() + "=(" + instance + ")";
206+
}
207+
}
208+
209+
/**
210+
* Create a builder with no initialized field.
211+
*/
212+
public static ContentBlockStart.Builder builder() {
213+
return new ContentBlockStart.Builder();
214+
}
215+
216+
/**
217+
* Create a builder with a shallow copy of this instance.
218+
*/
219+
public ContentBlockStart.Builder toBuilder() {
220+
return new ContentBlockStart.Builder()
221+
.type(getType())
222+
.index(getIndex())
223+
.contentBlock(getContentBlock());
224+
}
225+
226+
227+
}

0 commit comments

Comments
 (0)