-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add DocumentParameter、ImageParameter、VideoParameter
- Loading branch information
1 parent
fe47dea
commit fa4ad30
Showing
4 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
src/main/java/com/whatsapp/api/domain/messages/DocumentParameter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.whatsapp.api.domain.messages; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.whatsapp.api.domain.messages.type.ParameterType; | ||
|
||
/** | ||
* The type Document parameter. | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class DocumentParameter extends Parameter { | ||
|
||
@JsonProperty("link") | ||
private String link; | ||
@JsonProperty("caption") | ||
private String caption; | ||
@JsonProperty("filename") | ||
private String filename; | ||
|
||
|
||
/** | ||
* Instantiates a new Document parameter. | ||
* | ||
* @param link the link | ||
* @param caption the caption | ||
* @param filename the filename | ||
*/ | ||
public DocumentParameter(String link, String caption, String filename) { | ||
super(ParameterType.IMAGE); | ||
this.link = link; | ||
this.caption = caption; | ||
this.filename = filename; | ||
} | ||
|
||
public String getLink() { | ||
return link; | ||
} | ||
|
||
public String getCaption() { | ||
return caption; | ||
} | ||
|
||
public String getFilename() { | ||
return filename; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/com/whatsapp/api/domain/messages/ImageParameter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.whatsapp.api.domain.messages; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.whatsapp.api.domain.messages.type.ParameterType; | ||
|
||
/** | ||
* The type Image parameter. | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class ImageParameter extends Parameter { | ||
|
||
@JsonProperty("link") | ||
private String link; | ||
@JsonProperty("caption") | ||
private String caption; | ||
|
||
|
||
/** | ||
* Instantiates a new Image parameter. | ||
* | ||
* @param link the link | ||
* @param caption the caption | ||
*/ | ||
public ImageParameter(String link, String caption) { | ||
super(ParameterType.IMAGE); | ||
this.link = link; | ||
this.caption = caption; | ||
} | ||
|
||
public String getLink() { | ||
return link; | ||
} | ||
|
||
public String getCaption() { | ||
return caption; | ||
} | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/com/whatsapp/api/domain/messages/VideoParameter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.whatsapp.api.domain.messages; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.whatsapp.api.domain.messages.type.ParameterType; | ||
|
||
/** | ||
* The type Video parameter. | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class VideoParameter extends Parameter { | ||
|
||
@JsonProperty("link") | ||
private String link; | ||
@JsonProperty("caption") | ||
private String caption; | ||
|
||
|
||
/** | ||
* Instantiates a new Video parameter. | ||
* | ||
* @param link the link | ||
* @param caption the caption | ||
*/ | ||
public VideoParameter(String link, String caption) { | ||
super(ParameterType.IMAGE); | ||
this.link = link; | ||
this.caption = caption; | ||
} | ||
|
||
public String getLink() { | ||
return link; | ||
} | ||
|
||
public String getCaption() { | ||
return caption; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters