diff --git a/src/main/java/com/auth0/json/mgmt/selfserviceprofiles/GoogleWorkspaceProvisioningConfig.java b/src/main/java/com/auth0/json/mgmt/selfserviceprofiles/GoogleWorkspaceProvisioningConfig.java new file mode 100644 index 000000000..a20726c78 --- /dev/null +++ b/src/main/java/com/auth0/json/mgmt/selfserviceprofiles/GoogleWorkspaceProvisioningConfig.java @@ -0,0 +1,22 @@ +package com.auth0.json.mgmt.selfserviceprofiles; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class GoogleWorkspaceProvisioningConfig { + @JsonProperty("sync_users") + private boolean syncUsers; + + @JsonProperty("sync_users") + public boolean isSyncUsers() { + return syncUsers; + } + + @JsonProperty("sync_users") + public void setSyncUsers(boolean syncUsers) { + this.syncUsers = syncUsers; + } +} diff --git a/src/main/java/com/auth0/json/mgmt/selfserviceprofiles/ProvisioningConfig.java b/src/main/java/com/auth0/json/mgmt/selfserviceprofiles/ProvisioningConfig.java index c267e7ec4..e78625f80 100644 --- a/src/main/java/com/auth0/json/mgmt/selfserviceprofiles/ProvisioningConfig.java +++ b/src/main/java/com/auth0/json/mgmt/selfserviceprofiles/ProvisioningConfig.java @@ -13,6 +13,8 @@ public class ProvisioningConfig { private List scopes; @JsonProperty("token_lifetime") private int tokenLifetime; + @JsonProperty("google_workspace") + private GoogleWorkspaceProvisioningConfig googleWorkspace; /** @@ -33,6 +35,15 @@ public void setScopes(List scopes) { this.scopes = scopes; } + /** + * Getter for the Google Workspace provisioning config. + * @return the Google Workspace provisioning config. + */ + @JsonProperty("google_workspace") + public GoogleWorkspaceProvisioningConfig getGoogleWorkspace() { + return googleWorkspace; + } + /** * Getter for the token lifetime. * @return the token lifetime. @@ -50,4 +61,13 @@ public int getTokenLifetime() { public void setTokenLifetime(int tokenLifetime) { this.tokenLifetime = tokenLifetime; } + + /** + * Setter for the Google Workspace provisioning config. + * @param googleWorkspace the Google Workspace provisioning config to set. + */ + @JsonProperty("google_workspace") + public void setGoogleWorkspace(GoogleWorkspaceProvisioningConfig googleWorkspace) { + this.googleWorkspace = googleWorkspace; + } } diff --git a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesEntityTest.java b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesEntityTest.java index 08d66d578..feaaeedfb 100644 --- a/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesEntityTest.java +++ b/src/test/java/com/auth0/client/mgmt/SelfServiceProfilesEntityTest.java @@ -278,6 +278,11 @@ public void shouldThrowOnCreateSsoAccessTicketWhenPayloadIsNull() { public void shouldCreateSsoAccessTicket() throws Exception{ SsoAccessTicketRequest requestBody = new SsoAccessTicketRequest(); requestBody.setConnectionId("test-connection"); + ProvisioningConfig provisioningConfig = new ProvisioningConfig(); + GoogleWorkspaceProvisioningConfig googleWorkspace = new GoogleWorkspaceProvisioningConfig(); + googleWorkspace.setSyncUsers(true); + provisioningConfig.setGoogleWorkspace(googleWorkspace); + requestBody.setProvisioningConfig(provisioningConfig); Request request = api.selfServiceProfiles().createSsoAccessTicket("id", requestBody); assertThat(request, is(notNullValue()));