-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set return value to be Role object instead of untyped Strings for lis…
…tRoles
- Loading branch information
Showing
4 changed files
with
78 additions
and
10 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
35 changes: 35 additions & 0 deletions
35
management-api-server/src/main/java/com/datastax/mgmtapi/resources/models/Role.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 @@ | ||
/* | ||
* Copyright DataStax, Inc. | ||
* | ||
* Please see the included license file for details. | ||
*/ | ||
package com.datastax.mgmtapi.resources.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class Role { | ||
|
||
@JsonProperty(value = "name") | ||
private String name; | ||
|
||
@JsonProperty(value = "super") | ||
private boolean isSuperUser; | ||
|
||
@JsonProperty(value = "login") | ||
private boolean canLogin; | ||
|
||
@JsonProperty(value = "datacenters") | ||
private String datacenters; | ||
|
||
@JsonProperty(value = "options") | ||
private String options; | ||
|
||
public Role( | ||
String name, boolean isSuperUser, boolean canLogin, String datacenters, String options) { | ||
this.name = name; | ||
this.isSuperUser = isSuperUser; | ||
this.canLogin = canLogin; | ||
this.datacenters = datacenters; | ||
this.options = options; | ||
} | ||
} |
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