Skip to content

Commit

Permalink
fix: Synch generated files (URLPathUtils usage)
Browse files Browse the repository at this point in the history
  • Loading branch information
JPPortier committed Nov 24, 2023
1 parent f29f8db commit 8cdfba5
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sinch.sdk.core.http.HttpResponse;
import com.sinch.sdk.core.http.HttpStatus;
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLParameterUtils;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
import com.sinch.sdk.domains.numbers.models.dto.v1.ActiveNumberDto;
import com.sinch.sdk.domains.numbers.models.dto.v1.ActiveNumberRequestDto;
Expand Down Expand Up @@ -116,11 +116,10 @@ private HttpRequest numberServiceGetActiveNumberRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/activeNumbers/{phoneNumber}"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()))
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()))
.replaceAll(
"\\{" + "phoneNumber" + "\\}",
URLParameterUtils.encodeParameterValue(phoneNumber.toString()));
URLPathUtils.encodePathSegment(phoneNumber.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -271,8 +270,7 @@ private HttpRequest numberServiceListActiveNumbersRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/activeNumbers"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()));
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();
if (null != regionCode) {
Expand Down Expand Up @@ -401,11 +399,10 @@ private HttpRequest numberServiceReleaseNumberRequestBuilder(String projectId, S
String localVarPath =
"/v1/projects/{projectId}/activeNumbers/{phoneNumber}:release"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()))
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()))
.replaceAll(
"\\{" + "phoneNumber" + "\\}",
URLParameterUtils.encodeParameterValue(phoneNumber.toString()));
URLPathUtils.encodePathSegment(phoneNumber.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -501,11 +498,10 @@ private HttpRequest numberServiceUpdateActiveNumberRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/activeNumbers/{phoneNumber}"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()))
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()))
.replaceAll(
"\\{" + "phoneNumber" + "\\}",
URLParameterUtils.encodeParameterValue(phoneNumber.toString()));
URLPathUtils.encodePathSegment(phoneNumber.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sinch.sdk.core.http.HttpResponse;
import com.sinch.sdk.core.http.HttpStatus;
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLParameterUtils;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
import com.sinch.sdk.domains.numbers.models.dto.v1.ActiveNumberDto;
import com.sinch.sdk.domains.numbers.models.dto.v1.AvailableNumberDto;
Expand Down Expand Up @@ -123,11 +123,10 @@ private HttpRequest numberServiceGetAvailableNumberRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/availableNumbers/{phoneNumber}"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()))
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()))
.replaceAll(
"\\{" + "phoneNumber" + "\\}",
URLParameterUtils.encodeParameterValue(phoneNumber.toString()));
URLPathUtils.encodePathSegment(phoneNumber.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -267,8 +266,7 @@ private HttpRequest numberServiceListAvailableNumbersRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/availableNumbers"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()));
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();
if (null != numberPatternPattern) {
Expand Down Expand Up @@ -389,8 +387,7 @@ private HttpRequest numberServiceRentAnyNumberRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/availableNumbers:rentAny"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()));
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -487,11 +484,10 @@ private HttpRequest numberServiceRentNumberRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/availableNumbers/{phoneNumber}:rent"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()))
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()))
.replaceAll(
"\\{" + "phoneNumber" + "\\}",
URLParameterUtils.encodeParameterValue(phoneNumber.toString()));
URLPathUtils.encodePathSegment(phoneNumber.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sinch.sdk.core.http.HttpResponse;
import com.sinch.sdk.core.http.HttpStatus;
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLParameterUtils;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
import com.sinch.sdk.domains.numbers.models.dto.v1.ListAvailableRegionsResponseDto;
import java.util.ArrayList;
Expand Down Expand Up @@ -112,8 +112,7 @@ private HttpRequest numberServiceListAvailableRegionsRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/availableRegions"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()));
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();
if (null != types) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sinch.sdk.core.http.HttpResponse;
import com.sinch.sdk.core.http.HttpStatus;
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLParameterUtils;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
import com.sinch.sdk.domains.numbers.models.dto.v1.CallbackConfigurationDto;
import com.sinch.sdk.domains.numbers.models.dto.v1.CallbackConfigurationUpdateDto;
Expand Down Expand Up @@ -97,8 +97,7 @@ private HttpRequest getCallbackConfigurationRequestBuilder(String projectId) thr
String localVarPath =
"/v1/projects/{projectId}/callbackConfiguration"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()));
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -177,8 +176,7 @@ private HttpRequest updateCallbackConfigurationRequestBuilder(
String localVarPath =
"/v1/projects/{projectId}/callbackConfiguration"
.replaceAll(
"\\{" + "projectId" + "\\}",
URLParameterUtils.encodeParameterValue(projectId.toString()));
"\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sinch.sdk.core.http.HttpResponse;
import com.sinch.sdk.core.http.HttpStatus;
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLParameterUtils;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
import com.sinch.sdk.domains.sms.models.dto.v1.ApiBatchListDto;
import com.sinch.sdk.domains.sms.models.dto.v1.ApiDeliveryFeedbackDto;
Expand Down Expand Up @@ -115,10 +115,9 @@ private HttpRequest cancelBatchMessageRequestBuilder(String servicePlanId, Strin
"/xms/v1/{service_plan_id}/batches/{batch_id}"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()))
URLPathUtils.encodePathSegment(servicePlanId.toString()))
.replaceAll(
"\\{" + "batch_id" + "\\}",
URLParameterUtils.encodeParameterValue(batchId.toString()));
"\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -215,10 +214,9 @@ private HttpRequest deliveryFeedbackRequestBuilder(
"/xms/v1/{service_plan_id}/batches/{batch_id}/delivery_feedback"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()))
URLPathUtils.encodePathSegment(servicePlanId.toString()))
.replaceAll(
"\\{" + "batch_id" + "\\}",
URLParameterUtils.encodeParameterValue(batchId.toString()));
"\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -311,7 +309,7 @@ private HttpRequest dryRunRequestBuilder(
"/xms/v1/{service_plan_id}/batches/dry_run"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()));
URLPathUtils.encodePathSegment(servicePlanId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();
if (null != perRecipient) {
Expand Down Expand Up @@ -401,10 +399,9 @@ private HttpRequest getBatchMessageRequestBuilder(String servicePlanId, String b
"/xms/v1/{service_plan_id}/batches/{batch_id}"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()))
URLPathUtils.encodePathSegment(servicePlanId.toString()))
.replaceAll(
"\\{" + "batch_id" + "\\}",
URLParameterUtils.encodeParameterValue(batchId.toString()));
"\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -519,7 +516,7 @@ private HttpRequest listBatchesRequestBuilder(
"/xms/v1/{service_plan_id}/batches"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()));
URLPathUtils.encodePathSegment(servicePlanId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();
if (null != page) {
Expand Down Expand Up @@ -636,10 +633,9 @@ private HttpRequest replaceBatchRequestBuilder(
"/xms/v1/{service_plan_id}/batches/{batch_id}"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()))
URLPathUtils.encodePathSegment(servicePlanId.toString()))
.replaceAll(
"\\{" + "batch_id" + "\\}",
URLParameterUtils.encodeParameterValue(batchId.toString()));
"\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -718,7 +714,7 @@ private HttpRequest sendSMSRequestBuilder(
"/xms/v1/{service_plan_id}/batches"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()));
URLPathUtils.encodePathSegment(servicePlanId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -809,10 +805,9 @@ private HttpRequest updateBatchMessageRequestBuilder(
"/xms/v1/{service_plan_id}/batches/{batch_id}"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()))
URLPathUtils.encodePathSegment(servicePlanId.toString()))
.replaceAll(
"\\{" + "batch_id" + "\\}",
URLParameterUtils.encodeParameterValue(batchId.toString()));
"\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sinch.sdk.core.http.HttpResponse;
import com.sinch.sdk.core.http.HttpStatus;
import com.sinch.sdk.core.http.URLParameter;
import com.sinch.sdk.core.http.URLParameterUtils;
import com.sinch.sdk.core.http.URLPathUtils;
import com.sinch.sdk.core.models.ServerConfiguration;
import com.sinch.sdk.domains.sms.models.dto.v1.DeliveryReportDto;
import com.sinch.sdk.domains.sms.models.dto.v1.DeliveryReportListDto;
Expand Down Expand Up @@ -134,10 +134,9 @@ private HttpRequest getDeliveryReportByBatchIdRequestBuilder(
"/xms/v1/{service_plan_id}/batches/{batch_id}/delivery_report"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()))
URLPathUtils.encodePathSegment(servicePlanId.toString()))
.replaceAll(
"\\{" + "batch_id" + "\\}",
URLParameterUtils.encodeParameterValue(batchId.toString()));
"\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();
if (null != type) {
Expand Down Expand Up @@ -245,13 +244,12 @@ private HttpRequest getDeliveryReportByPhoneNumberRequestBuilder(
"/xms/v1/{service_plan_id}/batches/{batch_id}/delivery_report/{recipient_msisdn}"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()))
URLPathUtils.encodePathSegment(servicePlanId.toString()))
.replaceAll(
"\\{" + "batch_id" + "\\}",
URLParameterUtils.encodeParameterValue(batchId.toString()))
"\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString()))
.replaceAll(
"\\{" + "recipient_msisdn" + "\\}",
URLParameterUtils.encodeParameterValue(recipientMsisdn.toString()));
URLPathUtils.encodePathSegment(recipientMsisdn.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();

Expand Down Expand Up @@ -369,7 +367,7 @@ private HttpRequest getDeliveryReportsRequestBuilder(
"/xms/v1/{service_plan_id}/delivery_reports"
.replaceAll(
"\\{" + "service_plan_id" + "\\}",
URLParameterUtils.encodeParameterValue(servicePlanId.toString()));
URLPathUtils.encodePathSegment(servicePlanId.toString()));

List<URLParameter> localVarQueryParams = new ArrayList<>();
if (null != page) {
Expand Down
Loading

0 comments on commit 8cdfba5

Please sign in to comment.