-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1561: Refactor CreateDeviceRequest#platform into enum
- Loading branch information
Showing
4 changed files
with
47 additions
and
33 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -17,44 +17,41 @@ | |
*/ | ||
package io.getlime.security.powerauth.lib.mtoken.model.request; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* Request to register for sending push messages. | ||
* @author Petr Dvorak, [email protected] | ||
*/ | ||
@Getter | ||
@Setter | ||
public class PushRegisterRequest { | ||
|
||
private String platform; | ||
private String token; | ||
|
||
/** | ||
* Get mobile platform - "ios" / "android". | ||
* @return Mobile platform. | ||
* Platform | ||
*/ | ||
public String getPlatform() { | ||
return platform; | ||
} | ||
@NotNull | ||
@Schema(description = "Platform.") | ||
private Platform platform; | ||
|
||
/** | ||
* Set mobile platform - "ios" / "android". | ||
* @param platform Mobile platform. | ||
* | ||
*/ | ||
public void setPlatform(String platform) { | ||
this.platform = platform; | ||
} | ||
@NotBlank | ||
@Schema(description = "Push registration token.") | ||
private String token; | ||
|
||
/** | ||
* Get push registration token. | ||
* @return Push registration token. | ||
*/ | ||
public String getToken() { | ||
return token; | ||
} | ||
public enum Platform { | ||
@JsonProperty("ios") | ||
IOS, | ||
|
||
/** | ||
* Set push registration token. | ||
* @param token Push registration token. | ||
*/ | ||
public void setToken(String token) { | ||
this.token = token; | ||
@JsonProperty("android") | ||
ANDROID | ||
} | ||
|
||
} |
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