-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from harmonyzhang/develop
Develop
- Loading branch information
Showing
5 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
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,34 @@ | ||
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("document") | ||
private Media document; | ||
|
||
|
||
/** | ||
* Instantiates a new Document parameter. | ||
* | ||
* @param document document | ||
*/ | ||
public DocumentParameter(Media document) { | ||
super(ParameterType.DOCUMENT); | ||
this.document = document; | ||
} | ||
|
||
public Media getDocument() { | ||
return document; | ||
} | ||
|
||
public void setDocument(Media document) { | ||
this.document = document; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
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,33 @@ | ||
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("image") | ||
private Media image; | ||
|
||
/** | ||
* Instantiates a new Image parameter. | ||
* | ||
* @param image image | ||
*/ | ||
public ImageParameter(Media image) { | ||
super(ParameterType.IMAGE); | ||
this.image = image; | ||
} | ||
|
||
public Media getImage() { | ||
return image; | ||
} | ||
|
||
public void setImage(Media image) { | ||
this.image = image; | ||
} | ||
} |
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,45 @@ | ||
package com.whatsapp.api.domain.messages; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.*; | ||
|
||
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
@Setter | ||
@Builder | ||
@JsonInclude(NON_NULL) | ||
public class Media { | ||
/** | ||
* Required when type is an image, audio, document, or video and you are not using a link. | ||
* The media object ID. For more information, see Get Media ID. | ||
* */ | ||
private String id; | ||
/** | ||
* Required when type is audio, document, image, sticker, or video and you are not using an uploaded media ID. | ||
* The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs. caption Optional. | ||
*/ | ||
private String link; | ||
|
||
/** | ||
* Describes the specified image, video, or document media. Do not use it with audio media. | ||
*/ | ||
private String caption; | ||
|
||
/** | ||
* Describes the filename for the specific document. Use only with document media. | ||
*/ | ||
private String filename; | ||
|
||
/** | ||
* 是否是语音 | ||
*/ | ||
private Boolean voice; | ||
|
||
/** | ||
* 文件类型 | ||
*/ | ||
private String mimeType; | ||
} |
33 changes: 33 additions & 0 deletions
33
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,33 @@ | ||
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("video") | ||
private Media video; | ||
|
||
/** | ||
* Instantiates a new Video parameter. | ||
* | ||
* @param video video | ||
*/ | ||
public VideoParameter(Media video) { | ||
super(ParameterType.VIDEO); | ||
this.video = video; | ||
} | ||
|
||
public Media getVideo() { | ||
return video; | ||
} | ||
|
||
public void setVideo(Media video) { | ||
this.video = video; | ||
} | ||
} |
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