@@ -126,14 +126,14 @@ public Mono<Response<AreaCodes>> getAllAreaCodesWithResponse(
126126 Mono <Response <AreaCodes >> getAllAreaCodesWithResponse (
127127 String locationType , String countryCode , String phonePlanId , List <LocationOptionsQuery > locationOptions ,
128128 Context context ) {
129- Objects .requireNonNull (locationType , "'locationType' cannot be null." );
130- Objects .requireNonNull (countryCode , "'countryCode' cannot be null." );
131- Objects .requireNonNull (phonePlanId , "'phonePlanId' cannot be null." );
132129
133130 LocationOptionsQueries locationOptionsQueries = new LocationOptionsQueries ();
134131 locationOptionsQueries .setLocationOptions (locationOptions );
135132
136133 try {
134+ Objects .requireNonNull (locationType , "'locationType' cannot be null." );
135+ Objects .requireNonNull (countryCode , "'countryCode' cannot be null." );
136+ Objects .requireNonNull (phonePlanId , "'phonePlanId' cannot be null." );
137137 if (context == null ) {
138138 return phoneNumberAdministrations .getAllAreaCodesWithResponseAsync (
139139 locationType , countryCode , phonePlanId , locationOptionsQueries );
@@ -173,9 +173,8 @@ public Mono<Response<UpdatePhoneNumberCapabilitiesResponse>> getCapabilitiesUpda
173173
174174 Mono <Response <UpdatePhoneNumberCapabilitiesResponse >> getCapabilitiesUpdateWithResponse (
175175 String capabilitiesId , Context context ) {
176- Objects .requireNonNull (capabilitiesId , "'capabilitiesId' cannot be null." );
177-
178176 try {
177+ Objects .requireNonNull (capabilitiesId , "'capabilitiesId' cannot be null." );
179178 if (context == null ) {
180179 return phoneNumberAdministrations .getCapabilitiesUpdateWithResponseAsync (capabilitiesId );
181180 } else {
@@ -214,17 +213,15 @@ public Mono<Response<UpdateNumberCapabilitiesResponse>> updateCapabilitiesWithRe
214213
215214 Mono <Response <UpdateNumberCapabilitiesResponse >> updateCapabilitiesWithResponse (
216215 Map <PhoneNumber , NumberUpdateCapabilities > phoneNumberCapabilitiesUpdate , Context context ) {
217- Objects .requireNonNull (phoneNumberCapabilitiesUpdate , "'phoneNumberCapabilitiesUpdate' cannot be null." );
218-
219- Map <String , NumberUpdateCapabilities > capabilitiesMap = new HashMap <>();
220- for (Map .Entry <PhoneNumber , NumberUpdateCapabilities > entry : phoneNumberCapabilitiesUpdate .entrySet ()) {
221- capabilitiesMap .put (entry .getKey ().getValue (), entry .getValue ());
222- }
223-
224- UpdateNumberCapabilitiesRequest updateNumberCapabilitiesRequest = new UpdateNumberCapabilitiesRequest ();
225- updateNumberCapabilitiesRequest .setPhoneNumberCapabilitiesUpdate (capabilitiesMap );
226-
227216 try {
217+ Objects .requireNonNull (phoneNumberCapabilitiesUpdate , "'phoneNumberCapabilitiesUpdate' cannot be null." );
218+ Map <String , NumberUpdateCapabilities > capabilitiesMap = new HashMap <>();
219+ for (Map .Entry <PhoneNumber , NumberUpdateCapabilities > entry : phoneNumberCapabilitiesUpdate .entrySet ()) {
220+ capabilitiesMap .put (entry .getKey ().getValue (), entry .getValue ());
221+ }
222+ UpdateNumberCapabilitiesRequest updateNumberCapabilitiesRequest = new UpdateNumberCapabilitiesRequest ();
223+ updateNumberCapabilitiesRequest .setPhoneNumberCapabilitiesUpdate (capabilitiesMap );
224+
228225 if (context == null ) {
229226 return phoneNumberAdministrations .updateCapabilitiesWithResponseAsync (
230227 updateNumberCapabilitiesRequest );
@@ -285,12 +282,11 @@ public Mono<Response<NumberConfigurationResponse>> getNumberConfigurationWithRes
285282
286283 Mono <Response <NumberConfigurationResponse >> getNumberConfigurationWithResponse (
287284 PhoneNumber phoneNumber , Context context ) {
288- Objects .requireNonNull (phoneNumber , "'phoneNumber' cannot be null." );
289-
290- NumberConfigurationPhoneNumber configurationPhoneNumber = new NumberConfigurationPhoneNumber ();
291- configurationPhoneNumber .setPhoneNumber (phoneNumber .getValue ());
292-
293285 try {
286+ Objects .requireNonNull (phoneNumber , "'phoneNumber' cannot be null." );
287+ NumberConfigurationPhoneNumber configurationPhoneNumber = new NumberConfigurationPhoneNumber ();
288+ configurationPhoneNumber .setPhoneNumber (phoneNumber .getValue ());
289+
294290 if (context == null ) {
295291 return phoneNumberAdministrations .getNumberConfigurationWithResponseAsync (
296292 configurationPhoneNumber );
@@ -330,13 +326,13 @@ public Mono<Response<Void>> configureNumberWithResponse(
330326
331327 Mono <Response <Void >> configureNumberWithResponse (
332328 PhoneNumber phoneNumber , PstnConfiguration pstnConfiguration , Context context ) {
333- Objects .requireNonNull (phoneNumber , "'phoneNumber' cannot be null." );
334- Objects .requireNonNull (pstnConfiguration , "'pstnConfiguration' cannot be null." );
335-
336- NumberConfiguration numberConfiguration = new NumberConfiguration ();
337- numberConfiguration .setPhoneNumber (phoneNumber .getValue ()).setPstnConfiguration (pstnConfiguration );
338-
339329 try {
330+ Objects .requireNonNull (phoneNumber , "'phoneNumber' cannot be null." );
331+ Objects .requireNonNull (pstnConfiguration , "'pstnConfiguration' cannot be null." );
332+
333+ NumberConfiguration numberConfiguration = new NumberConfiguration ();
334+ numberConfiguration .setPhoneNumber (phoneNumber .getValue ()).setPstnConfiguration (pstnConfiguration );
335+
340336 if (context == null ) {
341337 return phoneNumberAdministrations .configureNumberWithResponseAsync (numberConfiguration );
342338 } else {
@@ -370,11 +366,11 @@ public Mono<Response<Void>> unconfigureNumberWithResponse(PhoneNumber phoneNumbe
370366 }
371367
372368 Mono <Response <Void >> unconfigureNumberWithResponse (PhoneNumber phoneNumber , Context context ) {
373- Objects .requireNonNull (phoneNumber , "'phoneNumber' cannot be null." );
374- NumberConfigurationPhoneNumber configurationPhoneNumber = new NumberConfigurationPhoneNumber ();
375- configurationPhoneNumber .setPhoneNumber (phoneNumber .getValue ());
376-
377369 try {
370+ Objects .requireNonNull (phoneNumber , "'phoneNumber' cannot be null." );
371+ NumberConfigurationPhoneNumber configurationPhoneNumber = new NumberConfigurationPhoneNumber ();
372+ configurationPhoneNumber .setPhoneNumber (phoneNumber .getValue ());
373+
378374 if (context == null ) {
379375 return phoneNumberAdministrations .unconfigureNumberWithResponseAsync (configurationPhoneNumber );
380376 } else {
@@ -401,9 +397,8 @@ public PagedFlux<PhonePlanGroup> listPhonePlanGroups(
401397
402398 PagedFlux <PhonePlanGroup > listPhonePlanGroups (
403399 String countryCode , String locale , Boolean includeRateInformation , Context context ) {
404- Objects .requireNonNull (countryCode , "'countryCode' cannot be null." );
405-
406400 try {
401+ Objects .requireNonNull (countryCode , "'countryCode' cannot be null." );
407402 if (context == null ) {
408403 return phoneNumberAdministrations .getPhonePlanGroupsAsync (
409404 countryCode , locale , includeRateInformation , null , null );
@@ -430,10 +425,9 @@ public PagedFlux<PhonePlan> listPhonePlans(String countryCode, String phonePlanG
430425 }
431426
432427 PagedFlux <PhonePlan > listPhonePlans (String countryCode , String phonePlanGroupId , String locale , Context context ) {
433- Objects .requireNonNull (countryCode , "'countryCode' cannot be null." );
434- Objects .requireNonNull (phonePlanGroupId , "'phonePlanGroupId' cannot be null." );
435-
436428 try {
429+ Objects .requireNonNull (countryCode , "'countryCode' cannot be null." );
430+ Objects .requireNonNull (phonePlanGroupId , "'phonePlanGroupId' cannot be null." );
437431 if (context == null ) {
438432 return phoneNumberAdministrations .getPhonePlansAsync (
439433 countryCode , phonePlanGroupId , locale , null , null );
@@ -481,11 +475,11 @@ public Mono<Response<LocationOptionsResponse>> getPhonePlanLocationOptionsWithRe
481475
482476 Mono <Response <LocationOptionsResponse >> getPhonePlanLocationOptionsWithResponse (
483477 String countryCode , String phonePlanGroupId , String phonePlanId , String locale , Context context ) {
484- Objects .requireNonNull (countryCode , "'countryCode' cannot be null." );
485- Objects .requireNonNull (phonePlanGroupId , "'phonePlanGroupId' cannot be null." );
486- Objects .requireNonNull (phonePlanId , "'phonePlanId' cannot be null." );
487-
488478 try {
479+ Objects .requireNonNull (countryCode , "'countryCode' cannot be null." );
480+ Objects .requireNonNull (phonePlanGroupId , "'phonePlanGroupId' cannot be null." );
481+ Objects .requireNonNull (phonePlanId , "'phonePlanId' cannot be null." );
482+
489483 if (context == null ) {
490484 return phoneNumberAdministrations .getPhonePlanLocationOptionsWithResponseAsync (
491485 countryCode , phonePlanGroupId , phonePlanId , locale );
@@ -522,9 +516,8 @@ public Mono<Response<PhoneNumberRelease>> getReleaseByIdWithResponse(String rele
522516 }
523517
524518 Mono <Response <PhoneNumberRelease >> getReleaseByIdWithResponse (String releaseId , Context context ) {
525- Objects .requireNonNull (releaseId , "'releaseId' cannot be null." );
526-
527519 try {
520+ Objects .requireNonNull (releaseId , "'releaseId' cannot be null." );
528521 if (context == null ) {
529522 return phoneNumberAdministrations .getReleaseByIdWithResponseAsync (releaseId );
530523 } else {
@@ -621,9 +614,8 @@ public Mono<Response<PhoneNumberReservation>> getReservationByIdWithResponse(Str
621614 }
622615
623616 Mono <Response <PhoneNumberReservation >> getReservationByIdWithResponse (String reservationId , Context context ) {
624- Objects .requireNonNull (reservationId , "'ReservationId' cannot be null." );
625-
626617 try {
618+ Objects .requireNonNull (reservationId , "'reservationId' cannot be null." );
627619 if (context == null ) {
628620 return phoneNumberAdministrations .getSearchByIdWithResponseAsync (reservationId );
629621 } else {
@@ -658,9 +650,9 @@ private Mono<Response<CreateReservationResponse>> createReservationWithResponse(
658650
659651 private Mono <Response <CreateReservationResponse >> createReservationWithResponse (
660652 CreateReservationOptions reservationOptions , Context context ) {
661- Objects .requireNonNull (reservationOptions , "'reservationOptions' cannot be null." );
662-
663653 try {
654+ Objects .requireNonNull (reservationOptions , "'reservationOptions' cannot be null." );
655+
664656 if (context == null ) {
665657 return phoneNumberAdministrations .createSearchWithResponseAsync (reservationOptions );
666658 } else {
@@ -716,9 +708,9 @@ public Mono<Response<Void>> cancelReservationWithResponse(String reservationId)
716708 }
717709
718710 Mono <Response <Void >> cancelReservationWithResponse (String reservationId , Context context ) {
719- Objects .requireNonNull (reservationId , "'ReservationId' cannot be null." );
720-
721711 try {
712+ Objects .requireNonNull (reservationId , "'ReservationId' cannot be null." );
713+
722714 if (context == null ) {
723715 return phoneNumberAdministrations .cancelSearchWithResponseAsync (reservationId );
724716 } else {
@@ -750,9 +742,8 @@ private Mono<Response<Void>> purchaseReservationWithResponse(String reservationI
750742 }
751743
752744 private Mono <Response <Void >> purchaseReservationWithResponse (String reservationId , Context context ) {
753- Objects .requireNonNull (reservationId , "'reservationId' cannot be null." );
754-
755745 try {
746+ Objects .requireNonNull (reservationId , "'reservationId' cannot be null." );
756747 if (context == null ) {
757748 return phoneNumberAdministrations .purchaseSearchWithResponseAsync (reservationId );
758749 } else {
0 commit comments