Skip to content

Commit fb65015

Browse files
committed
Adjusted Javadoc so it is consistent after moving code from Wanaku
1 parent 269fe28 commit fb65015

19 files changed

+349
-10
lines changed

capabilities-api/src/main/java/ai/wanaku/capabilities/sdk/api/types/AudioContent.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@ public class AudioContent implements PromptContent {
1919
*/
2020
private String mimeType;
2121

22+
/**
23+
* Default constructor for serialization frameworks.
24+
*/
2225
public AudioContent() {}
2326

27+
/**
28+
* Creates a new AudioContent with the specified data and MIME type.
29+
*
30+
* @param data the base64-encoded audio data
31+
* @param mimeType the MIME type of the audio
32+
*/
2433
public AudioContent(String data, String mimeType) {
2534
this.data = data;
2635
this.mimeType = mimeType;
@@ -31,18 +40,38 @@ public String getType() {
3140
return TYPE;
3241
}
3342

43+
/**
44+
* Gets the base64-encoded audio data.
45+
*
46+
* @return the audio data
47+
*/
3448
public String getData() {
3549
return data;
3650
}
3751

52+
/**
53+
* Sets the base64-encoded audio data.
54+
*
55+
* @param data the audio data to set
56+
*/
3857
public void setData(String data) {
3958
this.data = data;
4059
}
4160

61+
/**
62+
* Gets the MIME type of the audio.
63+
*
64+
* @return the MIME type
65+
*/
4266
public String getMimeType() {
4367
return mimeType;
4468
}
4569

70+
/**
71+
* Sets the MIME type of the audio.
72+
*
73+
* @param mimeType the MIME type to set
74+
*/
4675
public void setMimeType(String mimeType) {
4776
this.mimeType = mimeType;
4877
}

capabilities-api/src/main/java/ai/wanaku/capabilities/sdk/api/types/EmbeddedResource.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ public class EmbeddedResource implements PromptContent {
1414
*/
1515
private ResourceReference resource;
1616

17+
/**
18+
* Default constructor for serialization frameworks.
19+
*/
1720
public EmbeddedResource() {}
1821

22+
/**
23+
* Creates a new EmbeddedResource with the specified resource reference.
24+
*
25+
* @param resource the resource to embed
26+
*/
1927
public EmbeddedResource(ResourceReference resource) {
2028
this.resource = resource;
2129
}
@@ -25,10 +33,20 @@ public String getType() {
2533
return TYPE;
2634
}
2735

36+
/**
37+
* Gets the embedded resource reference.
38+
*
39+
* @return the resource reference
40+
*/
2841
public ResourceReference getResource() {
2942
return resource;
3043
}
3144

45+
/**
46+
* Sets the embedded resource reference.
47+
*
48+
* @param resource the resource reference to set
49+
*/
3250
public void setResource(ResourceReference resource) {
3351
this.resource = resource;
3452
}

capabilities-api/src/main/java/ai/wanaku/capabilities/sdk/api/types/ImageContent.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@ public class ImageContent implements PromptContent {
1919
*/
2020
private String mimeType;
2121

22+
/**
23+
* Default constructor for serialization frameworks.
24+
*/
2225
public ImageContent() {}
2326

27+
/**
28+
* Creates a new ImageContent with the specified data and MIME type.
29+
*
30+
* @param data the base64-encoded image data
31+
* @param mimeType the MIME type of the image
32+
*/
2433
public ImageContent(String data, String mimeType) {
2534
this.data = data;
2635
this.mimeType = mimeType;
@@ -31,18 +40,38 @@ public String getType() {
3140
return TYPE;
3241
}
3342

43+
/**
44+
* Gets the base64-encoded image data.
45+
*
46+
* @return the image data
47+
*/
3448
public String getData() {
3549
return data;
3650
}
3751

52+
/**
53+
* Sets the base64-encoded image data.
54+
*
55+
* @param data the image data to set
56+
*/
3857
public void setData(String data) {
3958
this.data = data;
4059
}
4160

61+
/**
62+
* Gets the MIME type of the image.
63+
*
64+
* @return the MIME type
65+
*/
4266
public String getMimeType() {
4367
return mimeType;
4468
}
4569

70+
/**
71+
* Sets the MIME type of the image.
72+
*
73+
* @param mimeType the MIME type to set
74+
*/
4675
public void setMimeType(String mimeType) {
4776
this.mimeType = mimeType;
4877
}

capabilities-api/src/main/java/ai/wanaku/capabilities/sdk/api/types/LabelsAwareEntity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
* @see WanakuEntity
1515
*/
1616
public abstract class LabelsAwareEntity<T> implements WanakuEntity<T> {
17+
/**
18+
* Default constructor for serialization frameworks.
19+
*/
20+
protected LabelsAwareEntity() {}
1721

1822
private Map<String, String> labels;
1923

capabilities-api/src/main/java/ai/wanaku/capabilities/sdk/api/types/Namespace.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
* its location within the namespace hierarchy.
99
*/
1010
public class Namespace extends LabelsAwareEntity<String> {
11+
/**
12+
* Default constructor for serialization frameworks.
13+
*/
14+
public Namespace() {}
15+
1116
private String id;
1217
private String name;
1318
private String path;

capabilities-api/src/main/java/ai/wanaku/capabilities/sdk/api/types/PromptMessage.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,54 @@ public class PromptMessage {
2323
*/
2424
private PromptContent content;
2525

26+
/**
27+
* Default constructor for serialization frameworks.
28+
*/
2629
public PromptMessage() {}
2730

31+
/**
32+
* Creates a new PromptMessage with the specified role and content.
33+
*
34+
* @param role the role of the message sender
35+
* @param content the content of the message
36+
*/
2837
public PromptMessage(String role, PromptContent content) {
2938
this.role = role;
3039
this.content = content;
3140
}
3241

42+
/**
43+
* Gets the role of the message sender.
44+
*
45+
* @return the role
46+
*/
3347
public String getRole() {
3448
return role;
3549
}
3650

51+
/**
52+
* Sets the role of the message sender.
53+
*
54+
* @param role the role to set
55+
*/
3756
public void setRole(String role) {
3857
this.role = role;
3958
}
4059

60+
/**
61+
* Gets the content of the message.
62+
*
63+
* @return the message content
64+
*/
4165
public PromptContent getContent() {
4266
return content;
4367
}
4468

69+
/**
70+
* Sets the content of the message.
71+
*
72+
* @param content the content to set
73+
*/
4574
public void setContent(PromptContent content) {
4675
this.content = content;
4776
}

0 commit comments

Comments
 (0)