/** * Test implicitly required path parameter. * * @param pathParameter the String value * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Error object wrapped in {@link ServiceResponse} if successful. */ public ServiceResponse<Error> getRequiredPath(String pathParameter) throws ErrorException, IOException, IllegalArgumentException { if (pathParameter == null) { throw new IllegalArgumentException("Parameter pathParameter is required and cannot be null."); } Call<ResponseBody> call = service.getRequiredPath(pathParameter); return getRequiredPathDelegate(call.execute(), null); }
/** * Test implicitly required query parameter. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Error object wrapped in {@link ServiceResponse} if successful. */ public ServiceResponse<Error> getRequiredGlobalQuery() throws ErrorException, IOException, IllegalArgumentException { if (this.client.getRequiredGlobalQuery() == null) { throw new IllegalArgumentException( "Parameter this.client.getRequiredGlobalQuery() is required and cannot be null."); } Call<ResponseBody> call = service.getRequiredGlobalQuery(this.client.getRequiredGlobalQuery()); return getRequiredGlobalQueryDelegate(call.execute(), null); }
/** * Test implicitly optional query parameter * * @param queryParameter the String value * @throws ServiceException the exception wrapped in ServiceException if failed. */ public void putOptionalQuery(String queryParameter) throws ServiceException { try { Call<ResponseBody> call = service.putOptionalQuery(queryParameter); ServiceResponse<Void> response = putOptionalQueryDelegate(call.execute(), null); response.getBody(); } catch (ServiceException ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex); } }
/** * Test implicitly optional query parameter * * @return the Error object if successful. * @throws ServiceException the exception wrapped in ServiceException if failed. */ public Error getOptionalGlobalQuery() throws ServiceException { try { Call<ResponseBody> call = service.getOptionalGlobalQuery(this.client.getOptionalGlobalQuery()); ServiceResponse<Error> response = getOptionalGlobalQueryDelegate(call.execute(), null); return response.getBody(); } catch (ServiceException ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex); } }
/** * Test implicitly required path parameter * * @param pathParameter the String value * @return the Error object if successful. * @throws ServiceException the exception wrapped in ServiceException if failed. */ public Error getRequiredPath(String pathParameter) throws ServiceException { if (pathParameter == null) { throw new ServiceException( new IllegalArgumentException("Parameter pathParameter is required and cannot be null.")); } try { Call<ResponseBody> call = service.getRequiredPath(pathParameter); ServiceResponse<Error> response = getRequiredPathDelegate(call.execute(), null); return response.getBody(); } catch (ServiceException ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex); } }
/** * Test implicitly optional query parameter. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link Call} object */ public Call<ResponseBody> getOptionalGlobalQueryAsync( final ServiceCallback<Error> serviceCallback) { Call<ResponseBody> call = service.getOptionalGlobalQuery(this.client.getOptionalGlobalQuery()); call.enqueue( new ServiceResponseCallback<Error>(serviceCallback) { @Override public void onResponse(Response<ResponseBody> response, Retrofit retrofit) { try { serviceCallback.success(getOptionalGlobalQueryDelegate(response, retrofit)); } catch (ErrorException | IOException exception) { serviceCallback.failure(exception); } } }); return call; }
/** * Test implicitly optional body parameter. * * @param bodyParameter the String value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link Call} object */ public Call<ResponseBody> putOptionalBodyAsync( String bodyParameter, final ServiceCallback<Void> serviceCallback) { Call<ResponseBody> call = service.putOptionalBody(bodyParameter); call.enqueue( new ServiceResponseCallback<Void>(serviceCallback) { @Override public void onResponse(Response<ResponseBody> response, Retrofit retrofit) { try { serviceCallback.success(putOptionalBodyDelegate(response, retrofit)); } catch (ErrorException | IOException exception) { serviceCallback.failure(exception); } } }); return call; }
/** * Test implicitly required query parameter * * @return the Error object if successful. * @throws ServiceException the exception wrapped in ServiceException if failed. */ public Error getRequiredGlobalQuery() throws ServiceException { if (this.client.getRequiredGlobalQuery() == null) { throw new ServiceException( new IllegalArgumentException( "Parameter this.client.getRequiredGlobalQuery() is required and cannot be null.")); } try { Call<ResponseBody> call = service.getRequiredGlobalQuery(this.client.getRequiredGlobalQuery()); ServiceResponse<Error> response = getRequiredGlobalQueryDelegate(call.execute(), null); return response.getBody(); } catch (ServiceException ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex); } }
/** * Test implicitly required path parameter. * * @param pathParameter the String value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link Call} object */ public Call<ResponseBody> getRequiredPathAsync( String pathParameter, final ServiceCallback<Error> serviceCallback) { if (pathParameter == null) { serviceCallback.failure( new IllegalArgumentException("Parameter pathParameter is required and cannot be null.")); return null; } Call<ResponseBody> call = service.getRequiredPath(pathParameter); call.enqueue( new ServiceResponseCallback<Error>(serviceCallback) { @Override public void onResponse(Response<ResponseBody> response, Retrofit retrofit) { try { serviceCallback.success(getRequiredPathDelegate(response, retrofit)); } catch (ErrorException | IOException exception) { serviceCallback.failure(exception); } } }); return call; }
/** * Test implicitly required query parameter. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link Call} object */ public Call<ResponseBody> getRequiredGlobalQueryAsync( final ServiceCallback<Error> serviceCallback) { if (this.client.getRequiredGlobalQuery() == null) { serviceCallback.failure( new IllegalArgumentException( "Parameter this.client.getRequiredGlobalQuery() is required and cannot be null.")); return null; } Call<ResponseBody> call = service.getRequiredGlobalQuery(this.client.getRequiredGlobalQuery()); call.enqueue( new ServiceResponseCallback<Error>(serviceCallback) { @Override public void onResponse(Response<ResponseBody> response, Retrofit retrofit) { try { serviceCallback.success(getRequiredGlobalQueryDelegate(response, retrofit)); } catch (ErrorException | IOException exception) { serviceCallback.failure(exception); } } }); return call; }
/** * Test implicitly optional query parameter. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the Error object wrapped in {@link ServiceResponse} if successful. */ public ServiceResponse<Error> getOptionalGlobalQuery() throws ErrorException, IOException { Call<ResponseBody> call = service.getOptionalGlobalQuery(this.client.getOptionalGlobalQuery()); return getOptionalGlobalQueryDelegate(call.execute(), null); }
/** * Test implicitly optional body parameter. * * @param bodyParameter the String value * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the {@link ServiceResponse} object if successful. */ public ServiceResponse<Void> putOptionalBody(String bodyParameter) throws ErrorException, IOException { Call<ResponseBody> call = service.putOptionalBody(bodyParameter); return putOptionalBodyDelegate(call.execute(), null); }