@@ -14,6 +14,9 @@ public class CreateContentGenerationTaskRequest {
1414 @ JsonProperty ("content" )
1515 private List <Content > content ;
1616
17+ @ JsonProperty ("safety_identifier" )
18+ private String safetyIdentifier ;
19+
1720 @ JsonProperty ("callback_url" )
1821 private String callbackUrl ;
1922
@@ -53,6 +56,9 @@ public class CreateContentGenerationTaskRequest {
5356 @ JsonProperty ("draft" )
5457 private Boolean draft ;
5558
59+ @ JsonProperty ("tools" )
60+ private List <ContentGenerationTool > tools ;
61+
5662 public CreateContentGenerationTaskRequest () {
5763 }
5864
@@ -68,9 +74,14 @@ public CreateContentGenerationTaskRequest(String model, List<Content> content, S
6874 this .returnLastFrame = returnLastFrame ;
6975 }
7076
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 ) {
77+ 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 , List <ContentGenerationTool > tools ) {
78+ this (model , content , null , callbackUrl , returnLastFrame , serviceTier , executionExpiresAfter , generateAudio , cameraFixed , watermark , seed , resolution , ratio , duration , frames , draft , tools );
79+ }
80+
81+ public CreateContentGenerationTaskRequest (String model , List <Content > content , String safetyIdentifier , 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 , List <ContentGenerationTool > tools ) {
7282 this .model = model ;
7383 this .content = content ;
84+ this .safetyIdentifier = safetyIdentifier ;
7485 this .callbackUrl = callbackUrl ;
7586 this .returnLastFrame = returnLastFrame ;
7687 this .serviceTier = serviceTier ;
@@ -84,6 +95,7 @@ public CreateContentGenerationTaskRequest(String model, List<Content> content, S
8495 this .duration = duration ;
8596 this .frames = frames ;
8697 this .draft = draft ;
98+ this .tools = tools ;
8799 }
88100
89101 public String getModel () {
@@ -102,6 +114,14 @@ public void setContent(List<Content> content) {
102114 this .content = content ;
103115 }
104116
117+ public String getSafetyIdentifier () {
118+ return safetyIdentifier ;
119+ }
120+
121+ public void setSafetyIdentifier (String safetyIdentifier ) {
122+ this .safetyIdentifier = safetyIdentifier ;
123+ }
124+
105125 public String getCallbackUrl () {
106126 return callbackUrl ;
107127 }
@@ -200,11 +220,20 @@ public void setDraft(Boolean draft) {
200220 this .draft = draft ;
201221 }
202222
223+ public List <ContentGenerationTool > getTools () {
224+ return tools ;
225+ }
226+
227+ public void setTools (List <ContentGenerationTool > tools ) {
228+ this .tools = tools ;
229+ }
230+
203231 @ Override
204232 public String toString () {
205233 return "CreateContentGenerationTaskRequest{" +
206234 "model='" + model + '\'' +
207235 ", content=" + content +
236+ ", safetyIdentifier='" + safetyIdentifier + '\'' +
208237 ", callbackUrl='" + callbackUrl + '\'' +
209238 ", returnLastFrame=" + returnLastFrame +
210239 ", serviceTier='" + serviceTier + '\'' +
@@ -218,6 +247,7 @@ public String toString() {
218247 ", duration=" + duration +
219248 ", frames=" + frames +
220249 ", draft=" + draft +
250+ ", tools=" + tools +
221251 '}' ;
222252 }
223253
@@ -228,6 +258,7 @@ public static CreateContentGenerationTaskRequest.Builder builder() {
228258 public static class Builder {
229259 private String model ;
230260 private List <Content > content ;
261+ private String safetyIdentifier ;
231262 private String callbackUrl ;
232263 private Boolean returnLastFrame ;
233264 private String serviceTier ;
@@ -241,6 +272,7 @@ public static class Builder {
241272 private Long duration ;
242273 private Long frames ;
243274 private Boolean draft ;
275+ private List <ContentGenerationTool > tools ;
244276
245277 private Builder () {
246278 }
@@ -255,6 +287,11 @@ public Builder content(List<Content> content) {
255287 return this ;
256288 }
257289
290+ public Builder safetyIdentifier (String safetyIdentifier ) {
291+ this .safetyIdentifier = safetyIdentifier ;
292+ return this ;
293+ }
294+
258295 public Builder callbackUrl (String callbackUrl ) {
259296 this .callbackUrl = callbackUrl ;
260297 return this ;
@@ -320,10 +357,16 @@ public Builder draft(Boolean draft) {
320357 return this ;
321358 }
322359
360+ public Builder tools (List <ContentGenerationTool > tools ) {
361+ this .tools = tools ;
362+ return this ;
363+ }
364+
323365 public CreateContentGenerationTaskRequest build () {
324366 CreateContentGenerationTaskRequest createContentGenerationTaskRequest = new CreateContentGenerationTaskRequest ();
325367 createContentGenerationTaskRequest .setModel (model );
326368 createContentGenerationTaskRequest .setContent (content );
369+ createContentGenerationTaskRequest .setSafetyIdentifier (safetyIdentifier );
327370 createContentGenerationTaskRequest .setCallbackUrl (callbackUrl );
328371 createContentGenerationTaskRequest .setReturnLastFrame (returnLastFrame );
329372 createContentGenerationTaskRequest .setServiceTier (serviceTier );
@@ -337,10 +380,47 @@ public CreateContentGenerationTaskRequest build() {
337380 createContentGenerationTaskRequest .setDuration (duration );
338381 createContentGenerationTaskRequest .setFrames (frames );
339382 createContentGenerationTaskRequest .setDraft (draft );
383+ createContentGenerationTaskRequest .setTools (tools );
340384 return createContentGenerationTaskRequest ;
341385 }
342386 }
343387
388+
389+ @ JsonIgnoreProperties (ignoreUnknown = true )
390+ public static class ContentGenerationTool {
391+ @ JsonProperty ("type" )
392+ private String type ;
393+
394+ public String getType () {
395+ return type ;
396+ }
397+
398+ public void setType (String type ) {
399+ this .type = type ;
400+ }
401+
402+ @ Override
403+ public String toString () {
404+ return "ContentGenerationTool{" +
405+ "type='" + type + '\'' +
406+ '}' ;
407+ }
408+
409+ public static ContentGenerationTool .Builder builder () {
410+ return new ContentGenerationTool .Builder ();
411+ }
412+
413+ public static class Builder {
414+ private String type ;
415+ }
416+
417+ public ContentGenerationTool build () {
418+ ContentGenerationTool contentGenerationTool = new ContentGenerationTool ();
419+ contentGenerationTool .setType (type );
420+ return contentGenerationTool ;
421+ }
422+ }
423+
344424 @ JsonIgnoreProperties (ignoreUnknown = true )
345425 public static class Content {
346426
@@ -353,6 +433,12 @@ public static class Content {
353433 @ JsonProperty ("image_url" )
354434 private ImageUrl imageUrl ;
355435
436+ @ JsonProperty ("audio_url" )
437+ private AudioUrl audioUrl ;
438+
439+ @ JsonProperty ("video_url" )
440+ private VideoUrl videoUrl ;
441+
356442 @ JsonProperty ("role" )
357443 private String role ;
358444
@@ -362,10 +448,12 @@ public static class Content {
362448 public Content () {
363449 }
364450
365- public Content (String type , String text , ImageUrl imageUrl , String role , DraftTask draftTask ) {
451+ public Content (String type , String text , ImageUrl imageUrl , AudioUrl audioUrl , VideoUrl videoUrl , String role , DraftTask draftTask ) {
366452 this .type = type ;
367453 this .text = text ;
368454 this .imageUrl = imageUrl ;
455+ this .audioUrl = audioUrl ;
456+ this .videoUrl = videoUrl ;
369457 this .role = role ;
370458 this .draftTask = draftTask ;
371459 }
@@ -394,6 +482,22 @@ public void setImageUrl(ImageUrl imageUrl) {
394482 this .imageUrl = imageUrl ;
395483 }
396484
485+ public AudioUrl getAudioUrl () {
486+ return audioUrl ;
487+ }
488+
489+ public void setAudioUrl (AudioUrl audioUrl ) {
490+ this .audioUrl = audioUrl ;
491+ }
492+
493+ public VideoUrl getVideoUrl () {
494+ return videoUrl ;
495+ }
496+
497+ public void setVideoUrl (VideoUrl videoUrl ) {
498+ this .videoUrl = videoUrl ;
499+ }
500+
397501 public String getRole () {
398502 return role ;
399503 }
@@ -416,6 +520,8 @@ public String toString() {
416520 "type='" + type + '\'' +
417521 ", text='" + text + '\'' +
418522 ", imageUrl=" + imageUrl +
523+ ", audioUrl=" + audioUrl +
524+ ", videoUrl=" + videoUrl +
419525 ", role=" + role +
420526 ", draftTask=" + draftTask +
421527 '}' ;
@@ -429,6 +535,8 @@ public static class Builder {
429535 private String type ;
430536 private String text ;
431537 private ImageUrl imageUrl ;
538+ private AudioUrl audioUrl ;
539+ private VideoUrl videoUrl ;
432540 private String role ;
433541 private DraftTask draftTask ;
434542
@@ -450,6 +558,16 @@ public Builder imageUrl(ImageUrl imageUrl) {
450558 return this ;
451559 }
452560
561+ public Builder audioUrl (AudioUrl audioUrl ) {
562+ this .audioUrl = audioUrl ;
563+ return this ;
564+ }
565+
566+ public Builder videoUrl (VideoUrl videoUrl ) {
567+ this .videoUrl = videoUrl ;
568+ return this ;
569+ }
570+
453571 public Builder role (String role ) {
454572 this .role = role ;
455573 return this ;
@@ -465,6 +583,8 @@ public Content build() {
465583 content .setType (type );
466584 content .setText (text );
467585 content .setImageUrl (imageUrl );
586+ content .setAudioUrl (audioUrl );
587+ content .setVideoUrl (videoUrl );
468588 content .setRole (role );
469589 content .setDraftTask (draftTask );
470590 return content ;
@@ -523,6 +643,108 @@ public ImageUrl build() {
523643 }
524644 }
525645
646+ @ JsonIgnoreProperties (ignoreUnknown = true )
647+ public static class AudioUrl {
648+
649+ @ JsonProperty ("url" )
650+ private String url ;
651+
652+ public AudioUrl () {
653+ }
654+
655+ public AudioUrl (String url ) {
656+ this .url = url ;
657+ }
658+
659+ public String getUrl () {
660+ return url ;
661+ }
662+
663+ public void setUrl (String url ) {
664+ this .url = url ;
665+ }
666+
667+ @ Override
668+ public String toString () {
669+ return "AudioUrl{" +
670+ "url='" + url + '\'' +
671+ '}' ;
672+ }
673+
674+ public static AudioUrl .Builder builder () {
675+ return new Builder ();
676+ }
677+
678+ public static class Builder {
679+ private String url ;
680+
681+ private Builder () {
682+ }
683+
684+ public Builder url (String url ) {
685+ this .url = url ;
686+ return this ;
687+ }
688+
689+ public AudioUrl build () {
690+ AudioUrl audioUrl = new AudioUrl ();
691+ audioUrl .setUrl (url );
692+ return audioUrl ;
693+ }
694+ }
695+ }
696+
697+ @ JsonIgnoreProperties (ignoreUnknown = true )
698+ public static class VideoUrl {
699+
700+ @ JsonProperty ("url" )
701+ private String url ;
702+
703+ public VideoUrl () {
704+ }
705+
706+ public VideoUrl (String url ) {
707+ this .url = url ;
708+ }
709+
710+ public String getUrl () {
711+ return url ;
712+ }
713+
714+ public void setUrl (String url ) {
715+ this .url = url ;
716+ }
717+
718+ @ Override
719+ public String toString () {
720+ return "VideoUrl{" +
721+ "url='" + url + '\'' +
722+ '}' ;
723+ }
724+
725+ public static VideoUrl .Builder builder () {
726+ return new Builder ();
727+ }
728+
729+ public static class Builder {
730+ private String url ;
731+
732+ private Builder () {
733+ }
734+
735+ public Builder url (String url ) {
736+ this .url = url ;
737+ return this ;
738+ }
739+
740+ public VideoUrl build () {
741+ VideoUrl videoUrl = new VideoUrl ();
742+ videoUrl .setUrl (url );
743+ return videoUrl ;
744+ }
745+ }
746+ }
747+
526748 @ JsonIgnoreProperties (ignoreUnknown = true )
527749 public static class DraftTask {
528750
0 commit comments