diff --git a/src/main/java/com/zitadel/api/SessionServiceApi.java b/src/main/java/com/zitadel/api/SessionServiceApi.java index 5f2395f9..40983c71 100644 --- a/src/main/java/com/zitadel/api/SessionServiceApi.java +++ b/src/main/java/com/zitadel/api/SessionServiceApi.java @@ -22,7 +22,7 @@ import com.zitadel.model.SessionServiceCreateSessionRequest; import com.zitadel.model.SessionServiceCreateSessionResponse; -import com.zitadel.model.SessionServiceDeleteSessionBody; +import com.zitadel.model.SessionServiceDeleteSessionRequest; import com.zitadel.model.SessionServiceDeleteSessionResponse; import com.zitadel.model.SessionServiceGetSessionResponse; import com.zitadel.model.SessionServiceListSessionsRequest; @@ -128,12 +128,12 @@ public SessionServiceCreateSessionResponse sessionServiceCreateSession(SessionSe * Terminate an existing session * Terminate your own session or if granted any other session. * @param sessionId \"id of the session to terminate\" (required) - * @param sessionServiceDeleteSessionBody (required) + * @param sessionServiceDeleteSessionRequest (required) * @return SessionServiceDeleteSessionResponse * @throws ApiException if fails to make API call */ - public SessionServiceDeleteSessionResponse sessionServiceDeleteSession(String sessionId, SessionServiceDeleteSessionBody sessionServiceDeleteSessionBody) throws ApiException { - return this.sessionServiceDeleteSession(sessionId, sessionServiceDeleteSessionBody, Collections.emptyMap()); + public SessionServiceDeleteSessionResponse sessionServiceDeleteSession(String sessionId, SessionServiceDeleteSessionRequest sessionServiceDeleteSessionRequest) throws ApiException { + return this.sessionServiceDeleteSession(sessionId, sessionServiceDeleteSessionRequest, Collections.emptyMap()); } @@ -141,22 +141,22 @@ public SessionServiceDeleteSessionResponse sessionServiceDeleteSession(String se * Terminate an existing session * Terminate your own session or if granted any other session. * @param sessionId \"id of the session to terminate\" (required) - * @param sessionServiceDeleteSessionBody (required) + * @param sessionServiceDeleteSessionRequest (required) * @param additionalHeaders additionalHeaders for this call * @return SessionServiceDeleteSessionResponse * @throws ApiException if fails to make API call */ - public SessionServiceDeleteSessionResponse sessionServiceDeleteSession(String sessionId, SessionServiceDeleteSessionBody sessionServiceDeleteSessionBody, Map additionalHeaders) throws ApiException { - Object localVarPostBody = sessionServiceDeleteSessionBody; + public SessionServiceDeleteSessionResponse sessionServiceDeleteSession(String sessionId, SessionServiceDeleteSessionRequest sessionServiceDeleteSessionRequest, Map additionalHeaders) throws ApiException { + Object localVarPostBody = sessionServiceDeleteSessionRequest; // verify the required parameter 'sessionId' is set if (sessionId == null) { throw new ApiException(400, "Missing the required parameter 'sessionId' when calling sessionServiceDeleteSession"); } - // verify the required parameter 'sessionServiceDeleteSessionBody' is set - if (sessionServiceDeleteSessionBody == null) { - throw new ApiException(400, "Missing the required parameter 'sessionServiceDeleteSessionBody' when calling sessionServiceDeleteSession"); + // verify the required parameter 'sessionServiceDeleteSessionRequest' is set + if (sessionServiceDeleteSessionRequest == null) { + throw new ApiException(400, "Missing the required parameter 'sessionServiceDeleteSessionRequest' when calling sessionServiceDeleteSession"); } // create path and map variables diff --git a/src/main/java/com/zitadel/model/IdentityProviderServiceAzureADTenant.java b/src/main/java/com/zitadel/model/IdentityProviderServiceAzureADTenant.java index 9b296ec7..03429e34 100644 --- a/src/main/java/com/zitadel/model/IdentityProviderServiceAzureADTenant.java +++ b/src/main/java/com/zitadel/model/IdentityProviderServiceAzureADTenant.java @@ -168,26 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `tenantType` to the URL query string - if (getTenantType() != null) { - try { - joiner.add(String.format("%stenantType%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTenantType()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `tenantId` to the URL query string - if (getTenantId() != null) { - try { - joiner.add(String.format("%stenantId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTenantId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/IdentityProviderServiceIDPConfig.java b/src/main/java/com/zitadel/model/IdentityProviderServiceIDPConfig.java index 675fccf1..1bdfb0f6 100644 --- a/src/main/java/com/zitadel/model/IdentityProviderServiceIDPConfig.java +++ b/src/main/java/com/zitadel/model/IdentityProviderServiceIDPConfig.java @@ -532,71 +532,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `options` to the URL query string - if (getOptions() != null) { - joiner.add(getOptions().toUrlQueryString(prefix + "options" + suffix)); - } - - // add `ldap` to the URL query string - if (getLdap() != null) { - joiner.add(getLdap().toUrlQueryString(prefix + "ldap" + suffix)); - } - - // add `google` to the URL query string - if (getGoogle() != null) { - joiner.add(getGoogle().toUrlQueryString(prefix + "google" + suffix)); - } - - // add `oauth` to the URL query string - if (getOauth() != null) { - joiner.add(getOauth().toUrlQueryString(prefix + "oauth" + suffix)); - } - - // add `oidc` to the URL query string - if (getOidc() != null) { - joiner.add(getOidc().toUrlQueryString(prefix + "oidc" + suffix)); - } - - // add `jwt` to the URL query string - if (getJwt() != null) { - joiner.add(getJwt().toUrlQueryString(prefix + "jwt" + suffix)); - } - - // add `github` to the URL query string - if (getGithub() != null) { - joiner.add(getGithub().toUrlQueryString(prefix + "github" + suffix)); - } - - // add `githubEs` to the URL query string - if (getGithubEs() != null) { - joiner.add(getGithubEs().toUrlQueryString(prefix + "githubEs" + suffix)); - } - - // add `gitlab` to the URL query string - if (getGitlab() != null) { - joiner.add(getGitlab().toUrlQueryString(prefix + "gitlab" + suffix)); - } - - // add `gitlabSelfHosted` to the URL query string - if (getGitlabSelfHosted() != null) { - joiner.add(getGitlabSelfHosted().toUrlQueryString(prefix + "gitlabSelfHosted" + suffix)); - } - - // add `azureAd` to the URL query string - if (getAzureAd() != null) { - joiner.add(getAzureAd().toUrlQueryString(prefix + "azureAd" + suffix)); - } - - // add `apple` to the URL query string - if (getApple() != null) { - joiner.add(getApple().toUrlQueryString(prefix + "apple" + suffix)); - } - - // add `saml` to the URL query string - if (getSaml() != null) { - joiner.add(getSaml().toUrlQueryString(prefix + "saml" + suffix)); - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest.java b/src/main/java/com/zitadel/model/OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest.java index 3efde9c1..3ec9dc39 100644 --- a/src/main/java/com/zitadel/model/OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest.java +++ b/src/main/java/com/zitadel/model/OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest.java @@ -168,21 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `session` to the URL query string - if (getSession() != null) { - joiner.add(getSession().toUrlQueryString(prefix + "session" + suffix)); - } - - // add `deny` to the URL query string - if (getDeny() != null) { - try { - joiner.add(String.format("%sdeny%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeny()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/OIDCServiceCreateCallbackRequest.java b/src/main/java/com/zitadel/model/OIDCServiceCreateCallbackRequest.java index e0029741..9ac79426 100644 --- a/src/main/java/com/zitadel/model/OIDCServiceCreateCallbackRequest.java +++ b/src/main/java/com/zitadel/model/OIDCServiceCreateCallbackRequest.java @@ -169,16 +169,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `session` to the URL query string - if (getSession() != null) { - joiner.add(getSession().toUrlQueryString(prefix + "session" + suffix)); - } - - // add `error` to the URL query string - if (getError() != null) { - joiner.add(getError().toUrlQueryString(prefix + "error" + suffix)); - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/OrganizationServiceAddHumanUserRequest.java b/src/main/java/com/zitadel/model/OrganizationServiceAddHumanUserRequest.java index 3014d2df..384a7578 100644 --- a/src/main/java/com/zitadel/model/OrganizationServiceAddHumanUserRequest.java +++ b/src/main/java/com/zitadel/model/OrganizationServiceAddHumanUserRequest.java @@ -482,86 +482,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `userId` to the URL query string - if (getUserId() != null) { - try { - joiner.add(String.format("%suserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUserId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `username` to the URL query string - if (getUsername() != null) { - try { - joiner.add(String.format("%susername%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUsername()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `organization` to the URL query string - if (getOrganization() != null) { - joiner.add(getOrganization().toUrlQueryString(prefix + "organization" + suffix)); - } - - // add `profile` to the URL query string - if (getProfile() != null) { - joiner.add(getProfile().toUrlQueryString(prefix + "profile" + suffix)); - } - - // add `email` to the URL query string - if (getEmail() != null) { - joiner.add(getEmail().toUrlQueryString(prefix + "email" + suffix)); - } - - // add `phone` to the URL query string - if (getPhone() != null) { - joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); - } - - // add `metadata` to the URL query string - if (getMetadata() != null) { - for (int i = 0; i < getMetadata().size(); i++) { - if (getMetadata().get(i) != null) { - joiner.add(getMetadata().get(i).toUrlQueryString(String.format("%smetadata%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - - // add `password` to the URL query string - if (getPassword() != null) { - joiner.add(getPassword().toUrlQueryString(prefix + "password" + suffix)); - } - - // add `hashedPassword` to the URL query string - if (getHashedPassword() != null) { - joiner.add(getHashedPassword().toUrlQueryString(prefix + "hashedPassword" + suffix)); - } - - // add `idpLinks` to the URL query string - if (getIdpLinks() != null) { - for (int i = 0; i < getIdpLinks().size(); i++) { - if (getIdpLinks().get(i) != null) { - joiner.add(getIdpLinks().get(i).toUrlQueryString(String.format("%sidpLinks%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - - // add `totpSecret` to the URL query string - if (getTotpSecret() != null) { - try { - joiner.add(String.format("%stotpSecret%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotpSecret()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/OrganizationServiceAddOrganizationRequestAdmin.java b/src/main/java/com/zitadel/model/OrganizationServiceAddOrganizationRequestAdmin.java index feb25563..76afcbb8 100644 --- a/src/main/java/com/zitadel/model/OrganizationServiceAddOrganizationRequestAdmin.java +++ b/src/main/java/com/zitadel/model/OrganizationServiceAddOrganizationRequestAdmin.java @@ -211,35 +211,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `userId` to the URL query string - if (getUserId() != null) { - try { - joiner.add(String.format("%suserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUserId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `human` to the URL query string - if (getHuman() != null) { - joiner.add(getHuman().toUrlQueryString(prefix + "human" + suffix)); - } - - // add `roles` to the URL query string - if (getRoles() != null) { - for (int i = 0; i < getRoles().size(); i++) { - try { - joiner.add(String.format("%sroles%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getRoles().get(i)), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/OrganizationServiceSearchQuery.java b/src/main/java/com/zitadel/model/OrganizationServiceSearchQuery.java index bee12399..09479cab 100644 --- a/src/main/java/com/zitadel/model/OrganizationServiceSearchQuery.java +++ b/src/main/java/com/zitadel/model/OrganizationServiceSearchQuery.java @@ -267,36 +267,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `nameQuery` to the URL query string - if (getNameQuery() != null) { - joiner.add(getNameQuery().toUrlQueryString(prefix + "nameQuery" + suffix)); - } - - // add `domainQuery` to the URL query string - if (getDomainQuery() != null) { - joiner.add(getDomainQuery().toUrlQueryString(prefix + "domainQuery" + suffix)); - } - - // add `stateQuery` to the URL query string - if (getStateQuery() != null) { - joiner.add(getStateQuery().toUrlQueryString(prefix + "stateQuery" + suffix)); - } - - // add `idQuery` to the URL query string - if (getIdQuery() != null) { - joiner.add(getIdQuery().toUrlQueryString(prefix + "idQuery" + suffix)); - } - - // add `defaultQuery` to the URL query string - if (getDefaultQuery() != null) { - try { - joiner.add(String.format("%sdefaultQuery%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDefaultQuery()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/OrganizationServiceSetHumanEmail.java b/src/main/java/com/zitadel/model/OrganizationServiceSetHumanEmail.java index a93a8d00..1c46abf0 100644 --- a/src/main/java/com/zitadel/model/OrganizationServiceSetHumanEmail.java +++ b/src/main/java/com/zitadel/model/OrganizationServiceSetHumanEmail.java @@ -232,41 +232,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `email` to the URL query string - if (getEmail() != null) { - try { - joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `sendCode` to the URL query string - if (getSendCode() != null) { - joiner.add(getSendCode().toUrlQueryString(prefix + "sendCode" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `isVerified` to the URL query string - if (getIsVerified() != null) { - try { - joiner.add(String.format("%sisVerified%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsVerified()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/OrganizationServiceSetHumanPhone.java b/src/main/java/com/zitadel/model/OrganizationServiceSetHumanPhone.java index 13a5904e..c0ae60b6 100644 --- a/src/main/java/com/zitadel/model/OrganizationServiceSetHumanPhone.java +++ b/src/main/java/com/zitadel/model/OrganizationServiceSetHumanPhone.java @@ -231,46 +231,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `phone` to the URL query string - if (getPhone() != null) { - try { - joiner.add(String.format("%sphone%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPhone()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `sendCode` to the URL query string - if (getSendCode() != null) { - try { - joiner.add(String.format("%ssendCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSendCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `isVerified` to the URL query string - if (getIsVerified() != null) { - try { - joiner.add(String.format("%sisVerified%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsVerified()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/SAMLServiceCreateResponseRequest.java b/src/main/java/com/zitadel/model/SAMLServiceCreateResponseRequest.java index 969b9284..55f98f62 100644 --- a/src/main/java/com/zitadel/model/SAMLServiceCreateResponseRequest.java +++ b/src/main/java/com/zitadel/model/SAMLServiceCreateResponseRequest.java @@ -169,16 +169,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `session` to the URL query string - if (getSession() != null) { - joiner.add(getSession().toUrlQueryString(prefix + "session" + suffix)); - } - - // add `error` to the URL query string - if (getError() != null) { - joiner.add(getError().toUrlQueryString(prefix + "error" + suffix)); - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/SAMLServiceCreateResponseResponse.java b/src/main/java/com/zitadel/model/SAMLServiceCreateResponseResponse.java index 4c741a96..142466a2 100644 --- a/src/main/java/com/zitadel/model/SAMLServiceCreateResponseResponse.java +++ b/src/main/java/com/zitadel/model/SAMLServiceCreateResponseResponse.java @@ -233,36 +233,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(getDetails().toUrlQueryString(prefix + "details" + suffix)); - } - - // add `url` to the URL query string - if (getUrl() != null) { - try { - joiner.add(String.format("%surl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUrl()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `redirect` to the URL query string - if (getRedirect() != null) { - try { - joiner.add(String.format("%sredirect%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRedirect()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `post` to the URL query string - if (getPost() != null) { - joiner.add(getPost().toUrlQueryString(prefix + "post" + suffix)); - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/SessionServiceCheckUser.java b/src/main/java/com/zitadel/model/SessionServiceCheckUser.java index b5af1c57..5eddae63 100644 --- a/src/main/java/com/zitadel/model/SessionServiceCheckUser.java +++ b/src/main/java/com/zitadel/model/SessionServiceCheckUser.java @@ -167,26 +167,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `userId` to the URL query string - if (getUserId() != null) { - try { - joiner.add(String.format("%suserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUserId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `loginName` to the URL query string - if (getLoginName() != null) { - try { - joiner.add(String.format("%sloginName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLoginName()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/SessionServiceDeleteSessionBody.java b/src/main/java/com/zitadel/model/SessionServiceDeleteSessionRequest.java similarity index 88% rename from src/main/java/com/zitadel/model/SessionServiceDeleteSessionBody.java rename to src/main/java/com/zitadel/model/SessionServiceDeleteSessionRequest.java index 5202c33f..6a908682 100644 --- a/src/main/java/com/zitadel/model/SessionServiceDeleteSessionBody.java +++ b/src/main/java/com/zitadel/model/SessionServiceDeleteSessionRequest.java @@ -27,21 +27,21 @@ import java.util.StringJoiner; /** - * SessionServiceDeleteSessionBody + * SessionServiceDeleteSessionRequest */ @JsonPropertyOrder({ - SessionServiceDeleteSessionBody.JSON_PROPERTY_SESSION_TOKEN + SessionServiceDeleteSessionRequest.JSON_PROPERTY_SESSION_TOKEN }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") -public class SessionServiceDeleteSessionBody { +public class SessionServiceDeleteSessionRequest { public static final String JSON_PROPERTY_SESSION_TOKEN = "sessionToken"; @javax.annotation.Nullable private String sessionToken; - public SessionServiceDeleteSessionBody() { + public SessionServiceDeleteSessionRequest() { } - public SessionServiceDeleteSessionBody sessionToken(@javax.annotation.Nullable String sessionToken) { + public SessionServiceDeleteSessionRequest sessionToken(@javax.annotation.Nullable String sessionToken) { this.sessionToken = sessionToken; return this; @@ -74,8 +74,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SessionServiceDeleteSessionBody sessionServiceDeleteSessionBody = (SessionServiceDeleteSessionBody) o; - return Objects.equals(this.sessionToken, sessionServiceDeleteSessionBody.sessionToken); + SessionServiceDeleteSessionRequest sessionServiceDeleteSessionRequest = (SessionServiceDeleteSessionRequest) o; + return Objects.equals(this.sessionToken, sessionServiceDeleteSessionRequest.sessionToken); } @Override @@ -86,7 +86,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SessionServiceDeleteSessionBody {\n"); + sb.append("class SessionServiceDeleteSessionRequest {\n"); sb.append(" sessionToken: ").append(toIndentedString(sessionToken)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/zitadel/model/SessionServiceRequestChallengesOTPEmailSendCode.java b/src/main/java/com/zitadel/model/SessionServiceOTPEmailSendCode.java similarity index 85% rename from src/main/java/com/zitadel/model/SessionServiceRequestChallengesOTPEmailSendCode.java rename to src/main/java/com/zitadel/model/SessionServiceOTPEmailSendCode.java index 52fb217e..c9da2e5a 100644 --- a/src/main/java/com/zitadel/model/SessionServiceRequestChallengesOTPEmailSendCode.java +++ b/src/main/java/com/zitadel/model/SessionServiceOTPEmailSendCode.java @@ -27,21 +27,21 @@ import java.util.StringJoiner; /** - * SessionServiceRequestChallengesOTPEmailSendCode + * SessionServiceOTPEmailSendCode */ @JsonPropertyOrder({ - SessionServiceRequestChallengesOTPEmailSendCode.JSON_PROPERTY_URL_TEMPLATE + SessionServiceOTPEmailSendCode.JSON_PROPERTY_URL_TEMPLATE }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") -public class SessionServiceRequestChallengesOTPEmailSendCode { +public class SessionServiceOTPEmailSendCode { public static final String JSON_PROPERTY_URL_TEMPLATE = "urlTemplate"; @javax.annotation.Nullable private String urlTemplate; - public SessionServiceRequestChallengesOTPEmailSendCode() { + public SessionServiceOTPEmailSendCode() { } - public SessionServiceRequestChallengesOTPEmailSendCode urlTemplate(@javax.annotation.Nullable String urlTemplate) { + public SessionServiceOTPEmailSendCode urlTemplate(@javax.annotation.Nullable String urlTemplate) { this.urlTemplate = urlTemplate; return this; @@ -74,8 +74,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SessionServiceRequestChallengesOTPEmailSendCode sessionServiceRequestChallengesOTPEmailSendCode = (SessionServiceRequestChallengesOTPEmailSendCode) o; - return Objects.equals(this.urlTemplate, sessionServiceRequestChallengesOTPEmailSendCode.urlTemplate); + SessionServiceOTPEmailSendCode sessionServiceOTPEmailSendCode = (SessionServiceOTPEmailSendCode) o; + return Objects.equals(this.urlTemplate, sessionServiceOTPEmailSendCode.urlTemplate); } @Override @@ -86,7 +86,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SessionServiceRequestChallengesOTPEmailSendCode {\n"); + sb.append("class SessionServiceOTPEmailSendCode {\n"); sb.append(" urlTemplate: ").append(toIndentedString(urlTemplate)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/zitadel/model/SessionServiceRequestChallengesOTPEmail.java b/src/main/java/com/zitadel/model/SessionServiceRequestChallengesOTPEmail.java index d11dfc5b..3fa770eb 100644 --- a/src/main/java/com/zitadel/model/SessionServiceRequestChallengesOTPEmail.java +++ b/src/main/java/com/zitadel/model/SessionServiceRequestChallengesOTPEmail.java @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import com.zitadel.model.SessionServiceRequestChallengesOTPEmailSendCode; +import com.zitadel.model.SessionServiceOTPEmailSendCode; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; import java.io.UnsupportedEncodingException; @@ -38,7 +38,7 @@ public class SessionServiceRequestChallengesOTPEmail { public static final String JSON_PROPERTY_SEND_CODE = "sendCode"; @javax.annotation.Nullable - private SessionServiceRequestChallengesOTPEmailSendCode sendCode; + private SessionServiceOTPEmailSendCode sendCode; public static final String JSON_PROPERTY_RETURN_CODE = "returnCode"; @javax.annotation.Nullable @@ -47,7 +47,7 @@ public class SessionServiceRequestChallengesOTPEmail { public SessionServiceRequestChallengesOTPEmail() { } - public SessionServiceRequestChallengesOTPEmail sendCode(@javax.annotation.Nullable SessionServiceRequestChallengesOTPEmailSendCode sendCode) { + public SessionServiceRequestChallengesOTPEmail sendCode(@javax.annotation.Nullable SessionServiceOTPEmailSendCode sendCode) { this.sendCode = sendCode; return this; @@ -61,14 +61,14 @@ public SessionServiceRequestChallengesOTPEmail sendCode(@javax.annotation.Nullab @JsonProperty(JSON_PROPERTY_SEND_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SessionServiceRequestChallengesOTPEmailSendCode getSendCode() { + public SessionServiceOTPEmailSendCode getSendCode() { return sendCode; } @JsonProperty(JSON_PROPERTY_SEND_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSendCode(@javax.annotation.Nullable SessionServiceRequestChallengesOTPEmailSendCode sendCode) { + public void setSendCode(@javax.annotation.Nullable SessionServiceOTPEmailSendCode sendCode) { this.sendCode = sendCode; } @@ -168,21 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `sendCode` to the URL query string - if (getSendCode() != null) { - joiner.add(getSendCode().toUrlQueryString(prefix + "sendCode" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/SessionServiceSearchQuery.java b/src/main/java/com/zitadel/model/SessionServiceSearchQuery.java index 8965ff63..326541d2 100644 --- a/src/main/java/com/zitadel/model/SessionServiceSearchQuery.java +++ b/src/main/java/com/zitadel/model/SessionServiceSearchQuery.java @@ -268,31 +268,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `idsQuery` to the URL query string - if (getIdsQuery() != null) { - joiner.add(getIdsQuery().toUrlQueryString(prefix + "idsQuery" + suffix)); - } - - // add `userIdQuery` to the URL query string - if (getUserIdQuery() != null) { - joiner.add(getUserIdQuery().toUrlQueryString(prefix + "userIdQuery" + suffix)); - } - - // add `creationDateQuery` to the URL query string - if (getCreationDateQuery() != null) { - joiner.add(getCreationDateQuery().toUrlQueryString(prefix + "creationDateQuery" + suffix)); - } - - // add `creatorQuery` to the URL query string - if (getCreatorQuery() != null) { - joiner.add(getCreatorQuery().toUrlQueryString(prefix + "creatorQuery" + suffix)); - } - - // add `userAgentQuery` to the URL query string - if (getUserAgentQuery() != null) { - joiner.add(getUserAgentQuery().toUrlQueryString(prefix + "userAgentQuery" + suffix)); - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceAddHumanUserRequest.java b/src/main/java/com/zitadel/model/UserServiceAddHumanUserRequest.java index 3fabfd7f..0e633177 100644 --- a/src/main/java/com/zitadel/model/UserServiceAddHumanUserRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceAddHumanUserRequest.java @@ -482,86 +482,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `userId` to the URL query string - if (getUserId() != null) { - try { - joiner.add(String.format("%suserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUserId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `username` to the URL query string - if (getUsername() != null) { - try { - joiner.add(String.format("%susername%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUsername()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `organization` to the URL query string - if (getOrganization() != null) { - joiner.add(getOrganization().toUrlQueryString(prefix + "organization" + suffix)); - } - - // add `profile` to the URL query string - if (getProfile() != null) { - joiner.add(getProfile().toUrlQueryString(prefix + "profile" + suffix)); - } - - // add `email` to the URL query string - if (getEmail() != null) { - joiner.add(getEmail().toUrlQueryString(prefix + "email" + suffix)); - } - - // add `phone` to the URL query string - if (getPhone() != null) { - joiner.add(getPhone().toUrlQueryString(prefix + "phone" + suffix)); - } - - // add `metadata` to the URL query string - if (getMetadata() != null) { - for (int i = 0; i < getMetadata().size(); i++) { - if (getMetadata().get(i) != null) { - joiner.add(getMetadata().get(i).toUrlQueryString(String.format("%smetadata%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - - // add `password` to the URL query string - if (getPassword() != null) { - joiner.add(getPassword().toUrlQueryString(prefix + "password" + suffix)); - } - - // add `hashedPassword` to the URL query string - if (getHashedPassword() != null) { - joiner.add(getHashedPassword().toUrlQueryString(prefix + "hashedPassword" + suffix)); - } - - // add `idpLinks` to the URL query string - if (getIdpLinks() != null) { - for (int i = 0; i < getIdpLinks().size(); i++) { - if (getIdpLinks().get(i) != null) { - joiner.add(getIdpLinks().get(i).toUrlQueryString(String.format("%sidpLinks%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - - // add `totpSecret` to the URL query string - if (getTotpSecret() != null) { - try { - joiner.add(String.format("%stotpSecret%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getTotpSecret()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceAuthFactor.java b/src/main/java/com/zitadel/model/UserServiceAuthFactor.java index 88d03678..479ad841 100644 --- a/src/main/java/com/zitadel/model/UserServiceAuthFactor.java +++ b/src/main/java/com/zitadel/model/UserServiceAuthFactor.java @@ -265,51 +265,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `state` to the URL query string - if (getState() != null) { - try { - joiner.add(String.format("%sstate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getState()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `otp` to the URL query string - if (getOtp() != null) { - try { - joiner.add(String.format("%sotp%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOtp()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `u2f` to the URL query string - if (getU2f() != null) { - joiner.add(getU2f().toUrlQueryString(prefix + "u2f" + suffix)); - } - - // add `otpSms` to the URL query string - if (getOtpSms() != null) { - try { - joiner.add(String.format("%sotpSms%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOtpSms()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `otpEmail` to the URL query string - if (getOtpEmail() != null) { - try { - joiner.add(String.format("%sotpEmail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOtpEmail()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceCreateInviteCodeRequest.java b/src/main/java/com/zitadel/model/UserServiceCreateInviteCodeRequest.java index 72d7b94b..ed5ff216 100644 --- a/src/main/java/com/zitadel/model/UserServiceCreateInviteCodeRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceCreateInviteCodeRequest.java @@ -168,21 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `sendCode` to the URL query string - if (getSendCode() != null) { - joiner.add(getSendCode().toUrlQueryString(prefix + "sendCode" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceCreatePasskeyRegistrationLinkRequest.java b/src/main/java/com/zitadel/model/UserServiceCreatePasskeyRegistrationLinkRequest.java index d0f61edd..fbee01cb 100644 --- a/src/main/java/com/zitadel/model/UserServiceCreatePasskeyRegistrationLinkRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceCreatePasskeyRegistrationLinkRequest.java @@ -168,21 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `sendLink` to the URL query string - if (getSendLink() != null) { - joiner.add(getSendLink().toUrlQueryString(prefix + "sendLink" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceIDPInformation.java b/src/main/java/com/zitadel/model/UserServiceIDPInformation.java index 2a1b5cfc..2f271b48 100644 --- a/src/main/java/com/zitadel/model/UserServiceIDPInformation.java +++ b/src/main/java/com/zitadel/model/UserServiceIDPInformation.java @@ -330,61 +330,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `oauth` to the URL query string - if (getOauth() != null) { - joiner.add(getOauth().toUrlQueryString(prefix + "oauth" + suffix)); - } - - // add `ldap` to the URL query string - if (getLdap() != null) { - joiner.add(getLdap().toUrlQueryString(prefix + "ldap" + suffix)); - } - - // add `saml` to the URL query string - if (getSaml() != null) { - joiner.add(getSaml().toUrlQueryString(prefix + "saml" + suffix)); - } - - // add `idpId` to the URL query string - if (getIdpId() != null) { - try { - joiner.add(String.format("%sidpId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdpId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `userId` to the URL query string - if (getUserId() != null) { - try { - joiner.add(String.format("%suserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUserId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `userName` to the URL query string - if (getUserName() != null) { - try { - joiner.add(String.format("%suserName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUserName()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `rawInformation` to the URL query string - if (getRawInformation() != null) { - try { - joiner.add(String.format("%srawInformation%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getRawInformation()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceOrganization.java b/src/main/java/com/zitadel/model/UserServiceOrganization.java index ce3dc3f9..c14b00e5 100644 --- a/src/main/java/com/zitadel/model/UserServiceOrganization.java +++ b/src/main/java/com/zitadel/model/UserServiceOrganization.java @@ -167,26 +167,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `orgId` to the URL query string - if (getOrgId() != null) { - try { - joiner.add(String.format("%sorgId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOrgId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `orgDomain` to the URL query string - if (getOrgDomain() != null) { - try { - joiner.add(String.format("%sorgDomain%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOrgDomain()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServicePasswordResetRequest.java b/src/main/java/com/zitadel/model/UserServicePasswordResetRequest.java index 17dca9ad..20547650 100644 --- a/src/main/java/com/zitadel/model/UserServicePasswordResetRequest.java +++ b/src/main/java/com/zitadel/model/UserServicePasswordResetRequest.java @@ -168,21 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `sendLink` to the URL query string - if (getSendLink() != null) { - joiner.add(getSendLink().toUrlQueryString(prefix + "sendLink" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceResendEmailCodeRequest.java b/src/main/java/com/zitadel/model/UserServiceResendEmailCodeRequest.java index 80bb0b18..5198778c 100644 --- a/src/main/java/com/zitadel/model/UserServiceResendEmailCodeRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceResendEmailCodeRequest.java @@ -168,21 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `sendCode` to the URL query string - if (getSendCode() != null) { - joiner.add(getSendCode().toUrlQueryString(prefix + "sendCode" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceResendPhoneCodeRequest.java b/src/main/java/com/zitadel/model/UserServiceResendPhoneCodeRequest.java index dce009e6..be333711 100644 --- a/src/main/java/com/zitadel/model/UserServiceResendPhoneCodeRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceResendPhoneCodeRequest.java @@ -167,26 +167,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `sendCode` to the URL query string - if (getSendCode() != null) { - try { - joiner.add(String.format("%ssendCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSendCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceSearchQuery.java b/src/main/java/com/zitadel/model/UserServiceSearchQuery.java index ad97731e..78a6187e 100644 --- a/src/main/java/com/zitadel/model/UserServiceSearchQuery.java +++ b/src/main/java/com/zitadel/model/UserServiceSearchQuery.java @@ -631,86 +631,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `userNameQuery` to the URL query string - if (getUserNameQuery() != null) { - joiner.add(getUserNameQuery().toUrlQueryString(prefix + "userNameQuery" + suffix)); - } - - // add `firstNameQuery` to the URL query string - if (getFirstNameQuery() != null) { - joiner.add(getFirstNameQuery().toUrlQueryString(prefix + "firstNameQuery" + suffix)); - } - - // add `lastNameQuery` to the URL query string - if (getLastNameQuery() != null) { - joiner.add(getLastNameQuery().toUrlQueryString(prefix + "lastNameQuery" + suffix)); - } - - // add `nickNameQuery` to the URL query string - if (getNickNameQuery() != null) { - joiner.add(getNickNameQuery().toUrlQueryString(prefix + "nickNameQuery" + suffix)); - } - - // add `displayNameQuery` to the URL query string - if (getDisplayNameQuery() != null) { - joiner.add(getDisplayNameQuery().toUrlQueryString(prefix + "displayNameQuery" + suffix)); - } - - // add `emailQuery` to the URL query string - if (getEmailQuery() != null) { - joiner.add(getEmailQuery().toUrlQueryString(prefix + "emailQuery" + suffix)); - } - - // add `stateQuery` to the URL query string - if (getStateQuery() != null) { - joiner.add(getStateQuery().toUrlQueryString(prefix + "stateQuery" + suffix)); - } - - // add `typeQuery` to the URL query string - if (getTypeQuery() != null) { - joiner.add(getTypeQuery().toUrlQueryString(prefix + "typeQuery" + suffix)); - } - - // add `loginNameQuery` to the URL query string - if (getLoginNameQuery() != null) { - joiner.add(getLoginNameQuery().toUrlQueryString(prefix + "loginNameQuery" + suffix)); - } - - // add `inUserIdsQuery` to the URL query string - if (getInUserIdsQuery() != null) { - joiner.add(getInUserIdsQuery().toUrlQueryString(prefix + "inUserIdsQuery" + suffix)); - } - - // add `orQuery` to the URL query string - if (getOrQuery() != null) { - joiner.add(getOrQuery().toUrlQueryString(prefix + "orQuery" + suffix)); - } - - // add `andQuery` to the URL query string - if (getAndQuery() != null) { - joiner.add(getAndQuery().toUrlQueryString(prefix + "andQuery" + suffix)); - } - - // add `notQuery` to the URL query string - if (getNotQuery() != null) { - joiner.add(getNotQuery().toUrlQueryString(prefix + "notQuery" + suffix)); - } - - // add `inUserEmailsQuery` to the URL query string - if (getInUserEmailsQuery() != null) { - joiner.add(getInUserEmailsQuery().toUrlQueryString(prefix + "inUserEmailsQuery" + suffix)); - } - - // add `organizationIdQuery` to the URL query string - if (getOrganizationIdQuery() != null) { - joiner.add(getOrganizationIdQuery().toUrlQueryString(prefix + "organizationIdQuery" + suffix)); - } - - // add `phoneQuery` to the URL query string - if (getPhoneQuery() != null) { - joiner.add(getPhoneQuery().toUrlQueryString(prefix + "phoneQuery" + suffix)); - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceSendEmailCodeRequest.java b/src/main/java/com/zitadel/model/UserServiceSendEmailCodeRequest.java index 7f712a39..b88350d5 100644 --- a/src/main/java/com/zitadel/model/UserServiceSendEmailCodeRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceSendEmailCodeRequest.java @@ -168,21 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `sendCode` to the URL query string - if (getSendCode() != null) { - joiner.add(getSendCode().toUrlQueryString(prefix + "sendCode" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceSetEmailRequest.java b/src/main/java/com/zitadel/model/UserServiceSetEmailRequest.java index 2da64740..be8a2b92 100644 --- a/src/main/java/com/zitadel/model/UserServiceSetEmailRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceSetEmailRequest.java @@ -232,41 +232,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `email` to the URL query string - if (getEmail() != null) { - try { - joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `sendCode` to the URL query string - if (getSendCode() != null) { - joiner.add(getSendCode().toUrlQueryString(prefix + "sendCode" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `isVerified` to the URL query string - if (getIsVerified() != null) { - try { - joiner.add(String.format("%sisVerified%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsVerified()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceSetHumanEmail.java b/src/main/java/com/zitadel/model/UserServiceSetHumanEmail.java index b6139575..cf86732e 100644 --- a/src/main/java/com/zitadel/model/UserServiceSetHumanEmail.java +++ b/src/main/java/com/zitadel/model/UserServiceSetHumanEmail.java @@ -232,41 +232,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `email` to the URL query string - if (getEmail() != null) { - try { - joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `sendCode` to the URL query string - if (getSendCode() != null) { - joiner.add(getSendCode().toUrlQueryString(prefix + "sendCode" + suffix)); - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `isVerified` to the URL query string - if (getIsVerified() != null) { - try { - joiner.add(String.format("%sisVerified%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsVerified()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceSetHumanPhone.java b/src/main/java/com/zitadel/model/UserServiceSetHumanPhone.java index 605d9db0..23e1a802 100644 --- a/src/main/java/com/zitadel/model/UserServiceSetHumanPhone.java +++ b/src/main/java/com/zitadel/model/UserServiceSetHumanPhone.java @@ -231,46 +231,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `phone` to the URL query string - if (getPhone() != null) { - try { - joiner.add(String.format("%sphone%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPhone()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `sendCode` to the URL query string - if (getSendCode() != null) { - try { - joiner.add(String.format("%ssendCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSendCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `isVerified` to the URL query string - if (getIsVerified() != null) { - try { - joiner.add(String.format("%sisVerified%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsVerified()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceSetPassword.java b/src/main/java/com/zitadel/model/UserServiceSetPassword.java index 8055cffb..0f9cf889 100644 --- a/src/main/java/com/zitadel/model/UserServiceSetPassword.java +++ b/src/main/java/com/zitadel/model/UserServiceSetPassword.java @@ -233,36 +233,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `password` to the URL query string - if (getPassword() != null) { - joiner.add(getPassword().toUrlQueryString(prefix + "password" + suffix)); - } - - // add `hashedPassword` to the URL query string - if (getHashedPassword() != null) { - joiner.add(getHashedPassword().toUrlQueryString(prefix + "hashedPassword" + suffix)); - } - - // add `currentPassword` to the URL query string - if (getCurrentPassword() != null) { - try { - joiner.add(String.format("%scurrentPassword%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCurrentPassword()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `verificationCode` to the URL query string - if (getVerificationCode() != null) { - try { - joiner.add(String.format("%sverificationCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerificationCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceSetPasswordRequest.java b/src/main/java/com/zitadel/model/UserServiceSetPasswordRequest.java index a2c20d2a..27085573 100644 --- a/src/main/java/com/zitadel/model/UserServiceSetPasswordRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceSetPasswordRequest.java @@ -200,31 +200,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `newPassword` to the URL query string - if (getNewPassword() != null) { - joiner.add(getNewPassword().toUrlQueryString(prefix + "newPassword" + suffix)); - } - - // add `currentPassword` to the URL query string - if (getCurrentPassword() != null) { - try { - joiner.add(String.format("%scurrentPassword%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getCurrentPassword()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `verificationCode` to the URL query string - if (getVerificationCode() != null) { - try { - joiner.add(String.format("%sverificationCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVerificationCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceSetPhoneRequest.java b/src/main/java/com/zitadel/model/UserServiceSetPhoneRequest.java index fced4941..4dc2a122 100644 --- a/src/main/java/com/zitadel/model/UserServiceSetPhoneRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceSetPhoneRequest.java @@ -231,46 +231,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `phone` to the URL query string - if (getPhone() != null) { - try { - joiner.add(String.format("%sphone%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPhone()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `sendCode` to the URL query string - if (getSendCode() != null) { - try { - joiner.add(String.format("%ssendCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSendCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `returnCode` to the URL query string - if (getReturnCode() != null) { - try { - joiner.add(String.format("%sreturnCode%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getReturnCode()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `isVerified` to the URL query string - if (getIsVerified() != null) { - try { - joiner.add(String.format("%sisVerified%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsVerified()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceStartIdentityProviderIntentRequest.java b/src/main/java/com/zitadel/model/UserServiceStartIdentityProviderIntentRequest.java index 154656c6..8648f1fb 100644 --- a/src/main/java/com/zitadel/model/UserServiceStartIdentityProviderIntentRequest.java +++ b/src/main/java/com/zitadel/model/UserServiceStartIdentityProviderIntentRequest.java @@ -201,26 +201,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `idpId` to the URL query string - if (getIdpId() != null) { - try { - joiner.add(String.format("%sidpId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIdpId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `urls` to the URL query string - if (getUrls() != null) { - joiner.add(getUrls().toUrlQueryString(prefix + "urls" + suffix)); - } - - // add `ldap` to the URL query string - if (getLdap() != null) { - joiner.add(getLdap().toUrlQueryString(prefix + "ldap" + suffix)); - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceStartIdentityProviderIntentResponse.java b/src/main/java/com/zitadel/model/UserServiceStartIdentityProviderIntentResponse.java index 6cefc92e..061ddb97 100644 --- a/src/main/java/com/zitadel/model/UserServiceStartIdentityProviderIntentResponse.java +++ b/src/main/java/com/zitadel/model/UserServiceStartIdentityProviderIntentResponse.java @@ -233,36 +233,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(getDetails().toUrlQueryString(prefix + "details" + suffix)); - } - - // add `authUrl` to the URL query string - if (getAuthUrl() != null) { - try { - joiner.add(String.format("%sauthUrl%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getAuthUrl()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `idpIntent` to the URL query string - if (getIdpIntent() != null) { - joiner.add(getIdpIntent().toUrlQueryString(prefix + "idpIntent" + suffix)); - } - - // add `postForm` to the URL query string - if (getPostForm() != null) { - try { - joiner.add(String.format("%spostForm%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPostForm()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/UserServiceUser.java b/src/main/java/com/zitadel/model/UserServiceUser.java index 5121c663..922c255d 100644 --- a/src/main/java/com/zitadel/model/UserServiceUser.java +++ b/src/main/java/com/zitadel/model/UserServiceUser.java @@ -374,75 +374,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `userId` to the URL query string - if (getUserId() != null) { - try { - joiner.add(String.format("%suserId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUserId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `details` to the URL query string - if (getDetails() != null) { - joiner.add(getDetails().toUrlQueryString(prefix + "details" + suffix)); - } - - // add `state` to the URL query string - if (getState() != null) { - try { - joiner.add(String.format("%sstate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getState()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `username` to the URL query string - if (getUsername() != null) { - try { - joiner.add(String.format("%susername%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getUsername()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `loginNames` to the URL query string - if (getLoginNames() != null) { - for (int i = 0; i < getLoginNames().size(); i++) { - try { - joiner.add(String.format("%sloginNames%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getLoginNames().get(i)), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - } - - // add `preferredLoginName` to the URL query string - if (getPreferredLoginName() != null) { - try { - joiner.add(String.format("%spreferredLoginName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPreferredLoginName()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `human` to the URL query string - if (getHuman() != null) { - joiner.add(getHuman().toUrlQueryString(prefix + "human" + suffix)); - } - - // add `machine` to the URL query string - if (getMachine() != null) { - joiner.add(getMachine().toUrlQueryString(prefix + "machine" + suffix)); - } - return joiner.toString(); } diff --git a/src/main/java/com/zitadel/model/Zitadelobjectv2Organization.java b/src/main/java/com/zitadel/model/Zitadelobjectv2Organization.java index dd59c639..6f79cf2f 100644 --- a/src/main/java/com/zitadel/model/Zitadelobjectv2Organization.java +++ b/src/main/java/com/zitadel/model/Zitadelobjectv2Organization.java @@ -168,26 +168,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `orgId` to the URL query string - if (getOrgId() != null) { - try { - joiner.add(String.format("%sorgId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOrgId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `orgDomain` to the URL query string - if (getOrgDomain() != null) { - try { - joiner.add(String.format("%sorgDomain%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOrgDomain()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - return joiner.toString(); }