From 00a9bcca84a3d5e4eb9a0fb4ecd44a19de88f686 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Portier Date: Tue, 18 Jun 2024 09:32:49 +0200 Subject: [PATCH] style: back to google code formatter style --- snippets/numbers/available_list/Snippet.java | 32 +++++++++--------- snippets/pom.xml | 1 - snippets/sms/send/Snippet.java | 33 +++++++++---------- snippets/verification/start_sms/Snippet.java | 28 ++++++++-------- .../callouts_text_to_speech/Snippet.java | 25 +++++++------- 5 files changed, 58 insertions(+), 61 deletions(-) diff --git a/snippets/numbers/available_list/Snippet.java b/snippets/numbers/available_list/Snippet.java index 47657ef..d164b1c 100644 --- a/snippets/numbers/available_list/Snippet.java +++ b/snippets/numbers/available_list/Snippet.java @@ -8,26 +8,26 @@ public class Snippet { - private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName()); - static void execute(NumbersService numbersService) { + static void execute(NumbersService numbersService) { - AvailableNumberService availableNumbersService = numbersService.available(); + AvailableNumberService availableNumbersService = numbersService.available(); - String regionCode = "US"; - NumberType type = NumberType.LOCAL; + String regionCode = "US"; + NumberType type = NumberType.LOCAL; - AvailableNumberListAllRequestParameters parameters = - AvailableNumberListAllRequestParameters.builder() - .setRegionCode(regionCode) - .setType(type) - .build(); + AvailableNumberListAllRequestParameters parameters = + AvailableNumberListAllRequestParameters.builder() + .setRegionCode(regionCode) + .setType(type) + .build(); - AvailableNumberListResponse response = availableNumbersService.list(parameters); + AvailableNumberListResponse response = availableNumbersService.list(parameters); - response.iterator() - .forEachRemaining( - number -> - LOGGER.info(String.format("Available number details: %s", number))); - } + response + .iterator() + .forEachRemaining( + number -> LOGGER.info(String.format("Available number details: %s", number))); + } } diff --git a/snippets/pom.xml b/snippets/pom.xml index 37dfcde..4cdfe3f 100644 --- a/snippets/pom.xml +++ b/snippets/pom.xml @@ -55,7 +55,6 @@ 1.22.0 - true diff --git a/snippets/sms/send/Snippet.java b/snippets/sms/send/Snippet.java index 1696c59..dc17c39 100644 --- a/snippets/sms/send/Snippet.java +++ b/snippets/sms/send/Snippet.java @@ -3,31 +3,30 @@ import com.sinch.sdk.domains.sms.*; import com.sinch.sdk.domains.sms.models.*; import com.sinch.sdk.domains.sms.models.requests.*; -import java.util.Collection; import java.util.Collections; import java.util.logging.Logger; public class Snippet { - private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName()); - static void execute(SMSService smsService) { + static void execute(SMSService smsService) { - BatchesService batchesService = smsService.batches(); + BatchesService batchesService = smsService.batches(); - String from = "YOUR_sinch_phone_number"; - String recipient = "YOUR_recipient_phone_number"; - String body = "This is a test SMS message using the Sinch Java SDK."; + String from = "YOUR_sinch_phone_number"; + String recipient = "YOUR_recipient_phone_number"; + String body = "This is a test SMS message using the Sinch Java SDK."; - LOGGER.info("Sending SMS Text"); - BatchText value = - batchesService.send( - SendSmsBatchTextRequest.builder() - .setTo(Collections.singletonList(recipient)) - .setBody(body) - .setFrom(from) - .build()); + LOGGER.info("Sending SMS Text"); + BatchText value = + batchesService.send( + SendSmsBatchTextRequest.builder() + .setTo(Collections.singletonList(recipient)) + .setBody(body) + .setFrom(from) + .build()); - LOGGER.info("Response: " + value); - } + LOGGER.info("Response: " + value); + } } diff --git a/snippets/verification/start_sms/Snippet.java b/snippets/verification/start_sms/Snippet.java index eb31bd5..7cd28ef 100644 --- a/snippets/verification/start_sms/Snippet.java +++ b/snippets/verification/start_sms/Snippet.java @@ -8,24 +8,24 @@ public class Snippet { - private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName()); + private static final Logger LOGGER = Logger.getLogger(Snippet.class.getName()); - static void execute(VerificationService verificationService) { + static void execute(VerificationService verificationService) { - // REMINDER: verification Service require to have set application key/secret - // onto Sinch Client init - VerificationsService verificationsService = verificationService.verifications(); + // REMINDER: verification Service require to have set application key/secret + // onto Sinch Client init + VerificationsService verificationsService = verificationService.verifications(); - String phoneNumber = "YOUR_phone_number"; + String phoneNumber = "YOUR_phone_number"; - LOGGER.info(String.format("Sending a SMS verification to '%s'", phoneNumber)); + LOGGER.info(String.format("Sending a SMS verification to '%s'", phoneNumber)); - StartVerificationResponseSMS response = - verificationsService.startSms( - StartVerificationSMSRequestParameters.builder() - .setIdentity(NumberIdentity.valueOf(phoneNumber)) - .build()); + StartVerificationResponseSMS response = + verificationsService.startSms( + StartVerificationSMSRequestParameters.builder() + .setIdentity(NumberIdentity.valueOf(phoneNumber)) + .build()); - LOGGER.info("Response: " + response); - } + LOGGER.info("Response: " + response); + } } diff --git a/snippets/voice/callouts_text_to_speech/Snippet.java b/snippets/voice/callouts_text_to_speech/Snippet.java index 9c674ca..4b1daa2 100644 --- a/snippets/voice/callouts_text_to_speech/Snippet.java +++ b/snippets/voice/callouts_text_to_speech/Snippet.java @@ -6,21 +6,20 @@ public class Snippet { - public static String execute(VoiceService voiceService) { + public static String execute(VoiceService voiceService) { - CalloutsService calloutsService = voiceService.callouts(); + CalloutsService calloutsService = voiceService.callouts(); - String phoneNumber = "YOUR_phone_number"; - String message = - "Hello, this is a call from Sinch. Congratulations! You made your first call."; + String phoneNumber = "YOUR_phone_number"; + String message = "Hello, this is a call from Sinch. Congratulations! You made your first call."; - CalloutRequestParametersTTS parameters = - CalloutRequestParametersTTS.builder() - .setDestination(DestinationNumber.valueOf(phoneNumber)) - .setText(message) - .build(); + CalloutRequestParametersTTS parameters = + CalloutRequestParametersTTS.builder() + .setDestination(DestinationNumber.valueOf(phoneNumber)) + .setText(message) + .build(); - String callId = calloutsService.textToSpeech(parameters); - return callId; - } + String callId = calloutsService.textToSpeech(parameters); + return callId; + } }