Skip to content

Commit 642fd54

Browse files
author
BitsAdmin
committed
Merge 'feat/support-draft' into 'integration_2026-01-09_1102557242882'
feat: [development task] ark runtime (2013659) See merge request: !848
2 parents cb1bea9 + 75a667d commit 642fd54

File tree

2 files changed

+299
-4
lines changed

2 files changed

+299
-4
lines changed

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/model/content/generation/CreateContentGenerationTaskRequest.java

Lines changed: 236 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,30 @@ public class CreateContentGenerationTaskRequest {
2929
@JsonProperty("generate_audio")
3030
private Boolean generateAudio;
3131

32+
@JsonProperty("camera_fixed")
33+
private Boolean cameraFixed;
34+
35+
@JsonProperty("watermark")
36+
private Boolean watermark;
37+
38+
@JsonProperty("seed")
39+
private Long seed;
40+
41+
@JsonProperty("resolution")
42+
private String resolution;
43+
44+
@JsonProperty("ratio")
45+
private String ratio;
46+
47+
@JsonProperty("duration")
48+
private Long duration;
49+
50+
@JsonProperty("frames")
51+
private Long frames;
52+
53+
@JsonProperty("draft")
54+
private Boolean draft;
55+
3256
public CreateContentGenerationTaskRequest() {
3357
}
3458

@@ -44,6 +68,24 @@ public CreateContentGenerationTaskRequest(String model, List<Content> content, S
4468
this.returnLastFrame = returnLastFrame;
4569
}
4670

71+
public CreateContentGenerationTaskRequest(String model, List<Content> content, String callbackUrl, Boolean returnLastFrame, String serviceTier, Long executionExpiresAfter, Boolean generateAudio, Boolean cameraFixed, Boolean watermark, Long seed, String resolution, String ratio, Long duration, Long frames, Boolean draft) {
72+
this.model = model;
73+
this.content = content;
74+
this.callbackUrl = callbackUrl;
75+
this.returnLastFrame = returnLastFrame;
76+
this.serviceTier = serviceTier;
77+
this.executionExpiresAfter = executionExpiresAfter;
78+
this.generateAudio = generateAudio;
79+
this.cameraFixed = cameraFixed;
80+
this.watermark = watermark;
81+
this.seed = seed;
82+
this.resolution = resolution;
83+
this.ratio = ratio;
84+
this.duration = duration;
85+
this.frames = frames;
86+
this.draft = draft;
87+
}
88+
4789
public String getModel() {
4890
return model;
4991
}
@@ -100,6 +142,64 @@ public void setGenerateAudio(Boolean generateAudio) {
100142
this.generateAudio = generateAudio;
101143
}
102144

145+
public Boolean getCameraFixed() {
146+
return cameraFixed;
147+
}
148+
149+
public void setCameraFixed(Boolean cameraFixed) {
150+
this.cameraFixed = cameraFixed;
151+
}
152+
public Boolean getWatermark() {
153+
return watermark;
154+
}
155+
156+
public void setWatermark(Boolean watermark) {
157+
this.watermark = watermark;
158+
}
159+
public Long getSeed() {
160+
return seed;
161+
}
162+
163+
public void setSeed(Long seed) {
164+
this.seed = seed;
165+
}
166+
167+
public String getResolution() {
168+
return resolution;
169+
}
170+
171+
public void setResolution(String resolution) {
172+
this.resolution = resolution;
173+
}
174+
public String getRatio() {
175+
return ratio;
176+
}
177+
178+
public void setRatio(String ratio) {
179+
this.ratio = ratio;
180+
}
181+
public Long getDuration() {
182+
return duration;
183+
}
184+
185+
public void setDuration(Long duration) {
186+
this.duration = duration;
187+
}
188+
public Long getFrames() {
189+
return frames;
190+
}
191+
192+
public void setFrames(Long frames) {
193+
this.frames = frames;
194+
}
195+
public Boolean getDraft() {
196+
return draft;
197+
}
198+
199+
public void setDraft(Boolean draft) {
200+
this.draft = draft;
201+
}
202+
103203
@Override
104204
public String toString() {
105205
return "CreateContentGenerationTaskRequest{" +
@@ -110,6 +210,14 @@ public String toString() {
110210
", serviceTier='" + serviceTier + '\'' +
111211
", executionExpiresAfter=" + executionExpiresAfter +
112212
", generateAudio=" + generateAudio +
213+
", cameraFixed=" + cameraFixed +
214+
", watermark=" + watermark +
215+
", seed=" + seed +
216+
", resolution='" + resolution + '\'' +
217+
", ratio='" + ratio + '\'' +
218+
", duration=" + duration +
219+
", frames=" + frames +
220+
", draft=" + draft +
113221
'}';
114222
}
115223

@@ -125,6 +233,14 @@ public static class Builder {
125233
private String serviceTier;
126234
private Long executionExpiresAfter;
127235
private Boolean generateAudio;
236+
private Boolean cameraFixed;
237+
private Boolean watermark;
238+
private Long seed;
239+
private String resolution;
240+
private String ratio;
241+
private Long duration;
242+
private Long frames;
243+
private Boolean draft;
128244

129245
private Builder() {
130246
}
@@ -164,6 +280,46 @@ public Builder generateAudio(Boolean generateAudio) {
164280
return this;
165281
}
166282

283+
public Builder cameraFixed(Boolean cameraFixed) {
284+
this.cameraFixed = cameraFixed;
285+
return this;
286+
}
287+
288+
public Builder watermark(Boolean watermark) {
289+
this.watermark = watermark;
290+
return this;
291+
}
292+
293+
public Builder seed(Long seed) {
294+
this.seed = seed;
295+
return this;
296+
}
297+
298+
public Builder resolution(String resolution) {
299+
this.resolution = resolution;
300+
return this;
301+
}
302+
303+
public Builder ratio(String ratio) {
304+
this.ratio = ratio;
305+
return this;
306+
}
307+
308+
public Builder duration(Long duration) {
309+
this.duration = duration;
310+
return this;
311+
}
312+
313+
public Builder frames(Long frames) {
314+
this.frames = frames;
315+
return this;
316+
}
317+
318+
public Builder draft(Boolean draft) {
319+
this.draft = draft;
320+
return this;
321+
}
322+
167323
public CreateContentGenerationTaskRequest build() {
168324
CreateContentGenerationTaskRequest createContentGenerationTaskRequest = new CreateContentGenerationTaskRequest();
169325
createContentGenerationTaskRequest.setModel(model);
@@ -173,6 +329,14 @@ public CreateContentGenerationTaskRequest build() {
173329
createContentGenerationTaskRequest.setServiceTier(serviceTier);
174330
createContentGenerationTaskRequest.setExecutionExpiresAfter(executionExpiresAfter);
175331
createContentGenerationTaskRequest.setGenerateAudio(generateAudio);
332+
createContentGenerationTaskRequest.setCameraFixed(cameraFixed);
333+
createContentGenerationTaskRequest.setWatermark(watermark);
334+
createContentGenerationTaskRequest.setSeed(seed);
335+
createContentGenerationTaskRequest.setResolution(resolution);
336+
createContentGenerationTaskRequest.setRatio(ratio);
337+
createContentGenerationTaskRequest.setDuration(duration);
338+
createContentGenerationTaskRequest.setFrames(frames);
339+
createContentGenerationTaskRequest.setDraft(draft);
176340
return createContentGenerationTaskRequest;
177341
}
178342
}
@@ -192,14 +356,18 @@ public static class Content {
192356
@JsonProperty("role")
193357
private String role;
194358

359+
@JsonProperty("draft_task")
360+
private DraftTask draftTask;
361+
195362
public Content() {
196363
}
197364

198-
public Content(String type, String text, ImageUrl imageUrl, String role) {
365+
public Content(String type, String text, ImageUrl imageUrl, String role, DraftTask draftTask) {
199366
this.type = type;
200367
this.text = text;
201368
this.imageUrl = imageUrl;
202369
this.role = role;
370+
this.draftTask = draftTask;
203371
}
204372

205373
public String getType() {
@@ -234,13 +402,22 @@ public void setRole(String role) {
234402
this.role = role;
235403
}
236404

405+
public DraftTask getDraftTask() {
406+
return draftTask;
407+
}
408+
409+
public void setDraftTask(DraftTask draftTask) {
410+
this.draftTask = draftTask;
411+
}
412+
237413
@Override
238414
public String toString() {
239415
return "Content{" +
240416
"type='" + type + '\'' +
241417
", text='" + text + '\'' +
242418
", imageUrl=" + imageUrl +
243419
", role=" + role +
420+
", draftTask=" + draftTask +
244421
'}';
245422
}
246423

@@ -253,6 +430,7 @@ public static class Builder {
253430
private String text;
254431
private ImageUrl imageUrl;
255432
private String role;
433+
private DraftTask draftTask;
256434

257435
private Builder() {
258436
}
@@ -277,12 +455,18 @@ public Builder role(String role) {
277455
return this;
278456
}
279457

458+
public Builder draftTask(DraftTask draftTask) {
459+
this.draftTask = draftTask;
460+
return this;
461+
}
462+
280463
public Content build() {
281464
Content content = new Content();
282465
content.setType(type);
283466
content.setText(text);
284467
content.setImageUrl(imageUrl);
285468
content.setRole(role);
469+
content.setDraftTask(draftTask);
286470
return content;
287471
}
288472
}
@@ -338,4 +522,55 @@ public ImageUrl build() {
338522
}
339523
}
340524
}
525+
526+
@JsonIgnoreProperties(ignoreUnknown = true)
527+
public static class DraftTask {
528+
529+
@JsonProperty("id")
530+
private String id;
531+
532+
public DraftTask() {
533+
}
534+
535+
public DraftTask(String id) {
536+
this.id = id;
537+
}
538+
539+
public String getId() {
540+
return id;
541+
}
542+
543+
public void setId(String id) {
544+
this.id = id;
545+
}
546+
547+
@Override
548+
public String toString() {
549+
return "DraftTask{" +
550+
"id='" + id + '\'' +
551+
'}';
552+
}
553+
554+
public static DraftTask.Builder builder() {
555+
return new Builder();
556+
}
557+
558+
public static class Builder {
559+
private String id;
560+
561+
private Builder() {
562+
}
563+
564+
public Builder id(String id) {
565+
this.id = id;
566+
return this;
567+
}
568+
569+
public DraftTask build() {
570+
DraftTask draftTask = new DraftTask();
571+
draftTask.setId(id);
572+
return draftTask;
573+
}
574+
}
575+
}
341576
}

0 commit comments

Comments
 (0)