forked from litmuschaos/litmus-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add invite Client (litmuschaos#7)
Signed-off-by: 잉퓨 <[email protected]>
- Loading branch information
Showing
10 changed files
with
453 additions
and
0 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
35 changes: 35 additions & 0 deletions
35
src/main/java/io/litmuschaos/request/AcceptInvitationRequest.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,35 @@ | ||
package io.litmuschaos.request; | ||
|
||
public class AcceptInvitationRequest { | ||
|
||
private String projectId; | ||
private String userId; | ||
|
||
public AcceptInvitationRequest(String projectId, String userId) { | ||
this.projectId = projectId; | ||
this.userId = userId; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder { | ||
private String projectId; | ||
private String userId; | ||
|
||
public Builder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public Builder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
public AcceptInvitationRequest build() { | ||
return new AcceptInvitationRequest(this.projectId, this.userId); | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/io/litmuschaos/request/DeclineInvitationRequest.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,36 @@ | ||
package io.litmuschaos.request; | ||
|
||
public class DeclineInvitationRequest { | ||
|
||
private String projectId; | ||
private String userId; | ||
|
||
public DeclineInvitationRequest(String projectId, String userId) { | ||
this.projectId = projectId; | ||
this.userId = userId; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder { | ||
private String projectId; | ||
private String userId; | ||
|
||
public Builder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public Builder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
public DeclineInvitationRequest build() { | ||
return new DeclineInvitationRequest(this.projectId, this.userId); | ||
} | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/io/litmuschaos/request/InviteUsersRequest.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,12 @@ | ||
package io.litmuschaos.request; | ||
|
||
public class InviteUsersRequest { | ||
|
||
private String projectId; | ||
private String userId; | ||
|
||
public InviteUsersRequest(String projectId, String userId) { | ||
this.projectId = projectId; | ||
this.userId = userId; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/io/litmuschaos/request/ListInvitationRequest.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,35 @@ | ||
package io.litmuschaos.request; | ||
|
||
public class ListInvitationRequest { | ||
|
||
private String projectId; | ||
private String userId; | ||
|
||
public ListInvitationRequest(String projectId, String userId) { | ||
this.projectId = projectId; | ||
this.userId = userId; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder { | ||
private String projectId; | ||
private String userId; | ||
|
||
public Builder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public Builder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
public ListInvitationRequest build() { | ||
return new ListInvitationRequest(this.projectId, this.userId); | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/io/litmuschaos/request/RemoveInvitationRequest.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,35 @@ | ||
package io.litmuschaos.request; | ||
|
||
public class RemoveInvitationRequest { | ||
|
||
private String projectId; | ||
private String userId; | ||
|
||
public RemoveInvitationRequest(String projectId, String userId) { | ||
this.projectId = projectId; | ||
this.userId = userId; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder { | ||
private String projectId; | ||
private String userId; | ||
|
||
public Builder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public Builder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
public RemoveInvitationRequest build() { | ||
return new RemoveInvitationRequest(this.projectId, this.userId); | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
src/main/java/io/litmuschaos/request/SendInvitationRequest.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,55 @@ | ||
package io.litmuschaos.request; | ||
|
||
public class SendInvitationRequest { | ||
|
||
private String projectId; | ||
private String userId; | ||
private String role; | ||
|
||
public SendInvitationRequest(String projectId, String userId, String role) { | ||
this.projectId = projectId; | ||
this.userId = userId; | ||
this.role = role; | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder { | ||
private String projectId; | ||
private String userId; | ||
private String role; | ||
|
||
public Builder projectId(String projectId) { | ||
this.projectId = projectId; | ||
return this; | ||
} | ||
|
||
public Builder userId(String userId) { | ||
this.userId = userId; | ||
return this; | ||
} | ||
|
||
public Builder role(String role) { | ||
this.role = role; | ||
return this; | ||
} | ||
|
||
public SendInvitationRequest build() { | ||
return new SendInvitationRequest(this.projectId, this.userId, this.role); | ||
} | ||
} | ||
|
||
public String getProjectId() { | ||
return projectId; | ||
} | ||
|
||
public String getUserId() { | ||
return userId; | ||
} | ||
|
||
public String getRole() { | ||
return role; | ||
} | ||
} |
92 changes: 92 additions & 0 deletions
92
src/main/java/io/litmuschaos/response/InviteUsersResponse.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,92 @@ | ||
package io.litmuschaos.response; | ||
|
||
public class InviteUsersResponse { | ||
|
||
private long updatedAt; | ||
private long createdAt; | ||
private UserInfo createdBy; | ||
private UserInfo updatedBy; | ||
private boolean isRemoved; | ||
private String userID; | ||
private String username; | ||
private String salt; | ||
private String email; | ||
private String name; | ||
private String role; | ||
private boolean isInitialLogin; | ||
|
||
public class UserInfo { | ||
private String userID; | ||
private String username; | ||
private String email; | ||
|
||
public UserInfo(String userID, String username, String email) { | ||
this.userID = userID; | ||
this.username = username; | ||
this.email = email; | ||
} | ||
} | ||
|
||
public InviteUsersResponse(long updatedAt, long createdAt, UserInfo createdBy, UserInfo updatedBy, boolean isRemoved, String userID, String username, String salt, String email, String name, String role, boolean isInitialLogin) { | ||
this.updatedAt = updatedAt; | ||
this.createdAt = createdAt; | ||
this.createdBy = createdBy; | ||
this.updatedBy = updatedBy; | ||
this.isRemoved = isRemoved; | ||
this.userID = userID; | ||
this.username = username; | ||
this.salt = salt; | ||
this.email = email; | ||
this.name = name; | ||
this.role = role; | ||
this.isInitialLogin = isInitialLogin; | ||
} | ||
|
||
public long getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public long getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public UserInfo getCreatedBy() { | ||
return createdBy; | ||
} | ||
|
||
public UserInfo getUpdatedBy() { | ||
return updatedBy; | ||
} | ||
|
||
public boolean getIsRemoved() { | ||
return isRemoved; | ||
} | ||
|
||
public String getUserID() { | ||
return userID; | ||
} | ||
|
||
public String getUsername() { | ||
return username; | ||
} | ||
|
||
public String getSalt() { | ||
return salt; | ||
} | ||
|
||
public String getEmail() { | ||
return email; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getRole() { | ||
return role; | ||
} | ||
|
||
public boolean getIsInitialLogin() { | ||
return isInitialLogin; | ||
} | ||
} |
Oops, something went wrong.