/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 * 
 * Code generated by Microsoft (R) AutoRest Code Generator 0.12.0.0
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

package fixtures.bodynumber;

import com.google.common.reflect.TypeToken;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceException;
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.ServiceResponseBuilder;
import com.microsoft.rest.ServiceResponseCallback;
import com.microsoft.rest.ServiceResponseEmptyCallback;
import com.squareup.okhttp.ResponseBody;
import retrofit.Retrofit;
import retrofit.Call;
import retrofit.Response;
import java.math.BigDecimal;
import fixtures.bodynumber.models.Error;

public class NumberImpl implements Number {
    private NumberService service;
    AutoRestNumberTestService client;

    public NumberImpl(Retrofit retrofit, AutoRestNumberTestService client) {
        this.service = retrofit.create(NumberService.class);
        this.client = client;
    }

    /**
     * Get null Number value
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getNull() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getNull();
            ServiceResponse<Double> response = getNullDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get null Number value
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getNullAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getNull();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getNullDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get invalid float Number value
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getInvalidFloat() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getInvalidFloat();
            ServiceResponse<Double> response = getInvalidFloatDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get invalid float Number value
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getInvalidFloatAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getInvalidFloat();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getInvalidFloatDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getInvalidFloatDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get invalid double Number value
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getInvalidDouble() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getInvalidDouble();
            ServiceResponse<Double> response = getInvalidDoubleDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get invalid double Number value
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getInvalidDoubleAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getInvalidDouble();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getInvalidDoubleDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getInvalidDoubleDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get invalid decimal Number value
     *
     * @return the BigDecimal object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public BigDecimal getInvalidDecimal() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getInvalidDecimal();
            ServiceResponse<BigDecimal> response = getInvalidDecimalDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get invalid decimal Number value
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getInvalidDecimalAsync(final ServiceCallback<BigDecimal> serviceCallback) {
        Call<ResponseBody> call = service.getInvalidDecimal();
        call.enqueue(new ServiceResponseCallback<BigDecimal>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getInvalidDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<BigDecimal> getInvalidDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<BigDecimal>()
                .register(200, new TypeToken<BigDecimal>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put big float value 3.402823e+20
     *
     * @param numberBody the double value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putBigFloat(double numberBody) throws ServiceException {
        try {
            Call<ResponseBody> call = service.putBigFloat(numberBody);
            ServiceResponse<Void> response = putBigFloatDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put big float value 3.402823e+20
     *
     * @param numberBody the double value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putBigFloatAsync(double numberBody, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.putBigFloat(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putBigFloatDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putBigFloatDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big float value 3.402823e+20
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getBigFloat() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getBigFloat();
            ServiceResponse<Double> response = getBigFloatDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big float value 3.402823e+20
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getBigFloatAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getBigFloat();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBigFloatDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getBigFloatDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put big double value 2.5976931e+101
     *
     * @param numberBody the double value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putBigDouble(double numberBody) throws ServiceException {
        try {
            Call<ResponseBody> call = service.putBigDouble(numberBody);
            ServiceResponse<Void> response = putBigDoubleDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put big double value 2.5976931e+101
     *
     * @param numberBody the double value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putBigDoubleAsync(double numberBody, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.putBigDouble(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putBigDoubleDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putBigDoubleDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big double value 2.5976931e+101
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getBigDouble() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getBigDouble();
            ServiceResponse<Double> response = getBigDoubleDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big double value 2.5976931e+101
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getBigDoubleAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getBigDouble();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBigDoubleDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getBigDoubleDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put big double value 99999999.99
     *
     * @param numberBody the double value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putBigDoublePositiveDecimal(double numberBody) throws ServiceException {
        try {
            Call<ResponseBody> call = service.putBigDoublePositiveDecimal(numberBody);
            ServiceResponse<Void> response = putBigDoublePositiveDecimalDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put big double value 99999999.99
     *
     * @param numberBody the double value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putBigDoublePositiveDecimalAsync(double numberBody, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.putBigDoublePositiveDecimal(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putBigDoublePositiveDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putBigDoublePositiveDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big double value 99999999.99
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getBigDoublePositiveDecimal() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getBigDoublePositiveDecimal();
            ServiceResponse<Double> response = getBigDoublePositiveDecimalDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big double value 99999999.99
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getBigDoublePositiveDecimalAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getBigDoublePositiveDecimal();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBigDoublePositiveDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getBigDoublePositiveDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put big double value -99999999.99
     *
     * @param numberBody the double value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putBigDoubleNegativeDecimal(double numberBody) throws ServiceException {
        try {
            Call<ResponseBody> call = service.putBigDoubleNegativeDecimal(numberBody);
            ServiceResponse<Void> response = putBigDoubleNegativeDecimalDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put big double value -99999999.99
     *
     * @param numberBody the double value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putBigDoubleNegativeDecimalAsync(double numberBody, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.putBigDoubleNegativeDecimal(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putBigDoubleNegativeDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putBigDoubleNegativeDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big double value -99999999.99
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getBigDoubleNegativeDecimal() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getBigDoubleNegativeDecimal();
            ServiceResponse<Double> response = getBigDoubleNegativeDecimalDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big double value -99999999.99
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getBigDoubleNegativeDecimalAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getBigDoubleNegativeDecimal();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBigDoubleNegativeDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getBigDoubleNegativeDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put big decimal value 2.5976931e+101
     *
     * @param numberBody the BigDecimal value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putBigDecimal(BigDecimal numberBody) throws ServiceException {
        if (numberBody == null) {
            throw new ServiceException(
                new IllegalArgumentException("Parameter numberBody is required and cannot be null."));
        }
        try {
            Call<ResponseBody> call = service.putBigDecimal(numberBody);
            ServiceResponse<Void> response = putBigDecimalDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put big decimal value 2.5976931e+101
     *
     * @param numberBody the BigDecimal value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putBigDecimalAsync(BigDecimal numberBody, final ServiceCallback<Void> serviceCallback) {
        if (numberBody == null) {
            serviceCallback.failure(new ServiceException(
                new IllegalArgumentException("Parameter numberBody is required and cannot be null.")));
        }
        Call<ResponseBody> call = service.putBigDecimal(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putBigDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putBigDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big decimal value 2.5976931e+101
     *
     * @return the BigDecimal object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public BigDecimal getBigDecimal() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getBigDecimal();
            ServiceResponse<BigDecimal> response = getBigDecimalDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big decimal value 2.5976931e+101
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getBigDecimalAsync(final ServiceCallback<BigDecimal> serviceCallback) {
        Call<ResponseBody> call = service.getBigDecimal();
        call.enqueue(new ServiceResponseCallback<BigDecimal>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBigDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<BigDecimal> getBigDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<BigDecimal>()
                .register(200, new TypeToken<BigDecimal>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put big decimal value 99999999.99
     *
     * @param numberBody the BigDecimal value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putBigDecimalPositiveDecimal(BigDecimal numberBody) throws ServiceException {
        if (numberBody == null) {
            throw new ServiceException(
                new IllegalArgumentException("Parameter numberBody is required and cannot be null."));
        }
        try {
            Call<ResponseBody> call = service.putBigDecimalPositiveDecimal(numberBody);
            ServiceResponse<Void> response = putBigDecimalPositiveDecimalDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put big decimal value 99999999.99
     *
     * @param numberBody the BigDecimal value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putBigDecimalPositiveDecimalAsync(BigDecimal numberBody, final ServiceCallback<Void> serviceCallback) {
        if (numberBody == null) {
            serviceCallback.failure(new ServiceException(
                new IllegalArgumentException("Parameter numberBody is required and cannot be null.")));
        }
        Call<ResponseBody> call = service.putBigDecimalPositiveDecimal(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putBigDecimalPositiveDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putBigDecimalPositiveDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big decimal value 99999999.99
     *
     * @return the BigDecimal object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public BigDecimal getBigDecimalPositiveDecimal() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getBigDecimalPositiveDecimal();
            ServiceResponse<BigDecimal> response = getBigDecimalPositiveDecimalDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big decimal value 99999999.99
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getBigDecimalPositiveDecimalAsync(final ServiceCallback<BigDecimal> serviceCallback) {
        Call<ResponseBody> call = service.getBigDecimalPositiveDecimal();
        call.enqueue(new ServiceResponseCallback<BigDecimal>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBigDecimalPositiveDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<BigDecimal> getBigDecimalPositiveDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<BigDecimal>()
                .register(200, new TypeToken<BigDecimal>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put big decimal value -99999999.99
     *
     * @param numberBody the BigDecimal value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putBigDecimalNegativeDecimal(BigDecimal numberBody) throws ServiceException {
        if (numberBody == null) {
            throw new ServiceException(
                new IllegalArgumentException("Parameter numberBody is required and cannot be null."));
        }
        try {
            Call<ResponseBody> call = service.putBigDecimalNegativeDecimal(numberBody);
            ServiceResponse<Void> response = putBigDecimalNegativeDecimalDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put big decimal value -99999999.99
     *
     * @param numberBody the BigDecimal value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putBigDecimalNegativeDecimalAsync(BigDecimal numberBody, final ServiceCallback<Void> serviceCallback) {
        if (numberBody == null) {
            serviceCallback.failure(new ServiceException(
                new IllegalArgumentException("Parameter numberBody is required and cannot be null.")));
        }
        Call<ResponseBody> call = service.putBigDecimalNegativeDecimal(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putBigDecimalNegativeDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putBigDecimalNegativeDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big decimal value -99999999.99
     *
     * @return the BigDecimal object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public BigDecimal getBigDecimalNegativeDecimal() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getBigDecimalNegativeDecimal();
            ServiceResponse<BigDecimal> response = getBigDecimalNegativeDecimalDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big decimal value -99999999.99
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getBigDecimalNegativeDecimalAsync(final ServiceCallback<BigDecimal> serviceCallback) {
        Call<ResponseBody> call = service.getBigDecimalNegativeDecimal();
        call.enqueue(new ServiceResponseCallback<BigDecimal>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBigDecimalNegativeDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<BigDecimal> getBigDecimalNegativeDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<BigDecimal>()
                .register(200, new TypeToken<BigDecimal>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put small float value 3.402823e-20
     *
     * @param numberBody the double value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putSmallFloat(double numberBody) throws ServiceException {
        try {
            Call<ResponseBody> call = service.putSmallFloat(numberBody);
            ServiceResponse<Void> response = putSmallFloatDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put small float value 3.402823e-20
     *
     * @param numberBody the double value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putSmallFloatAsync(double numberBody, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.putSmallFloat(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putSmallFloatDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putSmallFloatDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big double value 3.402823e-20
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getSmallFloat() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getSmallFloat();
            ServiceResponse<Double> response = getSmallFloatDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big double value 3.402823e-20
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getSmallFloatAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getSmallFloat();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getSmallFloatDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getSmallFloatDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put small double value 2.5976931e-101
     *
     * @param numberBody the double value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putSmallDouble(double numberBody) throws ServiceException {
        try {
            Call<ResponseBody> call = service.putSmallDouble(numberBody);
            ServiceResponse<Void> response = putSmallDoubleDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put small double value 2.5976931e-101
     *
     * @param numberBody the double value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putSmallDoubleAsync(double numberBody, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.putSmallDouble(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putSmallDoubleDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putSmallDoubleDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get big double value 2.5976931e-101
     *
     * @return the Double object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public Double getSmallDouble() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getSmallDouble();
            ServiceResponse<Double> response = getSmallDoubleDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get big double value 2.5976931e-101
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getSmallDoubleAsync(final ServiceCallback<Double> serviceCallback) {
        Call<ResponseBody> call = service.getSmallDouble();
        call.enqueue(new ServiceResponseCallback<Double>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getSmallDoubleDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Double> getSmallDoubleDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Double>()
                .register(200, new TypeToken<Double>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Put small decimal value 2.5976931e-101
     *
     * @param numberBody the BigDecimal value
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public void putSmallDecimal(BigDecimal numberBody) throws ServiceException {
        if (numberBody == null) {
            throw new ServiceException(
                new IllegalArgumentException("Parameter numberBody is required and cannot be null."));
        }
        try {
            Call<ResponseBody> call = service.putSmallDecimal(numberBody);
            ServiceResponse<Void> response = putSmallDecimalDelegate(call.execute(), null);
            response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Put small decimal value 2.5976931e-101
     *
     * @param numberBody the BigDecimal value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> putSmallDecimalAsync(BigDecimal numberBody, final ServiceCallback<Void> serviceCallback) {
        if (numberBody == null) {
            serviceCallback.failure(new ServiceException(
                new IllegalArgumentException("Parameter numberBody is required and cannot be null.")));
        }
        Call<ResponseBody> call = service.putSmallDecimal(numberBody);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(putSmallDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> putSmallDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<Void>()
                .register(200, new TypeToken<Void>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

    /**
     * Get small decimal value 2.5976931e-101
     *
     * @return the BigDecimal object if successful.
     * @throws ServiceException the exception wrapped in ServiceException if failed.
     */
    public BigDecimal getSmallDecimal() throws ServiceException {
        try {
            Call<ResponseBody> call = service.getSmallDecimal();
            ServiceResponse<BigDecimal> response = getSmallDecimalDelegate(call.execute(), null);
            return response.getBody();
        } catch (ServiceException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }

    /**
     * Get small decimal value 2.5976931e-101
     *
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     */
    public Call<ResponseBody> getSmallDecimalAsync(final ServiceCallback<BigDecimal> serviceCallback) {
        Call<ResponseBody> call = service.getSmallDecimal();
        call.enqueue(new ServiceResponseCallback<BigDecimal>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getSmallDecimalDelegate(response, retrofit));
                } catch (ServiceException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<BigDecimal> getSmallDecimalDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ServiceException {
        return new ServiceResponseBuilder<BigDecimal>()
                .register(200, new TypeToken<BigDecimal>(){}.getType())
                .registerError(new TypeToken<Error>(){}.getType())
                .build(response, retrofit);
    }

}
