text:
package fixtures.url;

import com.google.common.reflect.TypeToken;
import com.microsoft.rest.serializer.CollectionFormat;
import com.microsoft.rest.serializer.JacksonUtils;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.ServiceResponseBuilder;
import com.microsoft.rest.ServiceResponseCallback;
import com.squareup.okhttp.ResponseBody;
import fixtures.url.models.ErrorException;
import fixtures.url.models.UriColor;
import java.io.IOException;
import java.util.List;
import org.apache.commons.codec.binary.Base64;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import retrofit.Call;
import retrofit.Response;
import retrofit.Retrofit;

/**
 * An instance of this class provides access to all the operations defined
 * in Queries.
 */
public final class QueriesImpl implements Queries {
    /** The Retrofit service to perform REST calls. */
    private QueriesService service;
    /** The service client containing this operation class. */
    private AutoRestUrlTestService client;

    /**
     * Initializes an instance of Queries.
     *
     * @param retrofit the Retrofit instance built from a Retrofit Builder.
     * @param client the instance of the service client containing this operation class.
     */
    public QueriesImpl(Retrofit retrofit, AutoRestUrlTestService client) {
        this.service = retrofit.create(QueriesService.class);
        this.client = client;
    }

    /**
     * Get true Boolean value on path.
     *
     * @param boolQuery true boolean 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> getBooleanTrue(Boolean boolQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getBooleanTrue(boolQuery);
        return getBooleanTrueDelegate(call.execute(), null);
    }

    /**
     * Get true Boolean value on path.
     *
     * @param boolQuery true boolean value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getBooleanTrueAsync(Boolean boolQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getBooleanTrue(boolQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBooleanTrueDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getBooleanTrueDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get false Boolean value on path.
     *
     * @param boolQuery false boolean 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> getBooleanFalse(Boolean boolQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getBooleanFalse(boolQuery);
        return getBooleanFalseDelegate(call.execute(), null);
    }

    /**
     * Get false Boolean value on path.
     *
     * @param boolQuery false boolean value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getBooleanFalseAsync(Boolean boolQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getBooleanFalse(boolQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBooleanFalseDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getBooleanFalseDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null Boolean value on query (query string should be absent).
     *
     * @param boolQuery null boolean 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> getBooleanNull(Boolean boolQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getBooleanNull(boolQuery);
        return getBooleanNullDelegate(call.execute(), null);
    }

    /**
     * Get null Boolean value on query (query string should be absent).
     *
     * @param boolQuery null boolean value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getBooleanNullAsync(Boolean boolQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getBooleanNull(boolQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getBooleanNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getBooleanNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '1000000' integer value.
     *
     * @param intQuery '1000000' integer 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> getIntOneMillion(Integer intQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getIntOneMillion(intQuery);
        return getIntOneMillionDelegate(call.execute(), null);
    }

    /**
     * Get '1000000' integer value.
     *
     * @param intQuery '1000000' integer value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getIntOneMillionAsync(Integer intQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getIntOneMillion(intQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getIntOneMillionDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getIntOneMillionDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '-1000000' integer value.
     *
     * @param intQuery '-1000000' integer 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> getIntNegativeOneMillion(Integer intQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getIntNegativeOneMillion(intQuery);
        return getIntNegativeOneMillionDelegate(call.execute(), null);
    }

    /**
     * Get '-1000000' integer value.
     *
     * @param intQuery '-1000000' integer value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getIntNegativeOneMillionAsync(Integer intQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getIntNegativeOneMillion(intQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getIntNegativeOneMillionDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getIntNegativeOneMillionDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null integer value (no query parameter).
     *
     * @param intQuery null integer 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> getIntNull(Integer intQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getIntNull(intQuery);
        return getIntNullDelegate(call.execute(), null);
    }

    /**
     * Get null integer value (no query parameter).
     *
     * @param intQuery null integer value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getIntNullAsync(Integer intQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getIntNull(intQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getIntNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getIntNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '10000000000' 64 bit integer value.
     *
     * @param longQuery '10000000000' 64 bit integer 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> getTenBillion(Long longQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getTenBillion(longQuery);
        return getTenBillionDelegate(call.execute(), null);
    }

    /**
     * Get '10000000000' 64 bit integer value.
     *
     * @param longQuery '10000000000' 64 bit integer value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getTenBillionAsync(Long longQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getTenBillion(longQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getTenBillionDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getTenBillionDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '-10000000000' 64 bit integer value.
     *
     * @param longQuery '-10000000000' 64 bit integer 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> getNegativeTenBillion(Long longQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getNegativeTenBillion(longQuery);
        return getNegativeTenBillionDelegate(call.execute(), null);
    }

    /**
     * Get '-10000000000' 64 bit integer value.
     *
     * @param longQuery '-10000000000' 64 bit integer value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getNegativeTenBillionAsync(Long longQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getNegativeTenBillion(longQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getNegativeTenBillionDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getNegativeTenBillionDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get 'null 64 bit integer value (no query param in uri).
     *
     * @param longQuery null 64 bit integer 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> getLongNull(Long longQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.getLongNull(longQuery);
        return getLongNullDelegate(call.execute(), null);
    }

    /**
     * Get 'null 64 bit integer value (no query param in uri).
     *
     * @param longQuery null 64 bit integer value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> getLongNullAsync(Long longQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.getLongNull(longQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(getLongNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> getLongNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '1.034E+20' numeric value.
     *
     * @param floatQuery '1.034E+20'numeric 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> floatScientificPositive(Double floatQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.floatScientificPositive(floatQuery);
        return floatScientificPositiveDelegate(call.execute(), null);
    }

    /**
     * Get '1.034E+20' numeric value.
     *
     * @param floatQuery '1.034E+20'numeric value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> floatScientificPositiveAsync(Double floatQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.floatScientificPositive(floatQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(floatScientificPositiveDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> floatScientificPositiveDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '-1.034E-20' numeric value.
     *
     * @param floatQuery '-1.034E-20'numeric 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> floatScientificNegative(Double floatQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.floatScientificNegative(floatQuery);
        return floatScientificNegativeDelegate(call.execute(), null);
    }

    /**
     * Get '-1.034E-20' numeric value.
     *
     * @param floatQuery '-1.034E-20'numeric value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> floatScientificNegativeAsync(Double floatQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.floatScientificNegative(floatQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(floatScientificNegativeDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> floatScientificNegativeDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null numeric value (no query parameter).
     *
     * @param floatQuery null numeric 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> floatNull(Double floatQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.floatNull(floatQuery);
        return floatNullDelegate(call.execute(), null);
    }

    /**
     * Get null numeric value (no query parameter).
     *
     * @param floatQuery null numeric value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> floatNullAsync(Double floatQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.floatNull(floatQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(floatNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> floatNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '9999999.999' numeric value.
     *
     * @param doubleQuery '9999999.999'numeric 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> doubleDecimalPositive(Double doubleQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.doubleDecimalPositive(doubleQuery);
        return doubleDecimalPositiveDelegate(call.execute(), null);
    }

    /**
     * Get '9999999.999' numeric value.
     *
     * @param doubleQuery '9999999.999'numeric value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> doubleDecimalPositiveAsync(Double doubleQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.doubleDecimalPositive(doubleQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(doubleDecimalPositiveDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> doubleDecimalPositiveDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '-9999999.999' numeric value.
     *
     * @param doubleQuery '-9999999.999'numeric 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> doubleDecimalNegative(Double doubleQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.doubleDecimalNegative(doubleQuery);
        return doubleDecimalNegativeDelegate(call.execute(), null);
    }

    /**
     * Get '-9999999.999' numeric value.
     *
     * @param doubleQuery '-9999999.999'numeric value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> doubleDecimalNegativeAsync(Double doubleQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.doubleDecimalNegative(doubleQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(doubleDecimalNegativeDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> doubleDecimalNegativeDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null numeric value (no query parameter).
     *
     * @param doubleQuery null numeric 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> doubleNull(Double doubleQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.doubleNull(doubleQuery);
        return doubleNullDelegate(call.execute(), null);
    }

    /**
     * Get null numeric value (no query parameter).
     *
     * @param doubleQuery null numeric value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> doubleNullAsync(Double doubleQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.doubleNull(doubleQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(doubleNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> doubleNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value.
     *
     * @param stringQuery '啊齄丂狛狜隣郎隣兀﨩'multi-byte string value. Possible values for this parameter include: '啊齄丂狛狜隣郎隣兀﨩'
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> stringUnicode(String stringQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.stringUnicode(stringQuery);
        return stringUnicodeDelegate(call.execute(), null);
    }

    /**
     * Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value.
     *
     * @param stringQuery '啊齄丂狛狜隣郎隣兀﨩'multi-byte string value. Possible values for this parameter include: '啊齄丂狛狜隣郎隣兀﨩'
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> stringUnicodeAsync(String stringQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.stringUnicode(stringQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(stringUnicodeDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> stringUnicodeDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get 'begin!*'();:@ &=+$,/?#[]end.
     *
     * @param stringQuery 'begin!*'();:@ &=+$,/?#[]end' url encoded string value. Possible values for this parameter include: 'begin!*'();:@ &=+$,/?#[]end'
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> stringUrlEncoded(String stringQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.stringUrlEncoded(stringQuery);
        return stringUrlEncodedDelegate(call.execute(), null);
    }

    /**
     * Get 'begin!*'();:@ &=+$,/?#[]end.
     *
     * @param stringQuery 'begin!*'();:@ &=+$,/?#[]end' url encoded string value. Possible values for this parameter include: 'begin!*'();:@ &=+$,/?#[]end'
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> stringUrlEncodedAsync(String stringQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.stringUrlEncoded(stringQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(stringUrlEncodedDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> stringUrlEncodedDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get ''.
     *
     * @param stringQuery '' string value. Possible values for this parameter include: ''
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> stringEmpty(String stringQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.stringEmpty(stringQuery);
        return stringEmptyDelegate(call.execute(), null);
    }

    /**
     * Get ''.
     *
     * @param stringQuery '' string value. Possible values for this parameter include: ''
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> stringEmptyAsync(String stringQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.stringEmpty(stringQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(stringEmptyDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> stringEmptyDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null (no query parameter in url).
     *
     * @param stringQuery null 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> stringNull(String stringQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.stringNull(stringQuery);
        return stringNullDelegate(call.execute(), null);
    }

    /**
     * Get null (no query parameter in url).
     *
     * @param stringQuery null string value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> stringNullAsync(String stringQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.stringNull(stringQuery);
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(stringNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> stringNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get using uri with query parameter 'green color'.
     *
     * @param enumQuery 'green color' enum value. Possible values for this parameter include: 'red color', 'green color', 'blue color'
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> enumValid(UriColor enumQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.enumValid(JacksonUtils.serializeRaw(enumQuery));
        return enumValidDelegate(call.execute(), null);
    }

    /**
     * Get using uri with query parameter 'green color'.
     *
     * @param enumQuery 'green color' enum value. Possible values for this parameter include: 'red color', 'green color', 'blue color'
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> enumValidAsync(UriColor enumQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.enumValid(JacksonUtils.serializeRaw(enumQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(enumValidDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> enumValidDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null (no query parameter in url).
     *
     * @param enumQuery null string value. Possible values for this parameter include: 'red color', 'green color', 'blue color'
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> enumNull(UriColor enumQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.enumNull(JacksonUtils.serializeRaw(enumQuery));
        return enumNullDelegate(call.execute(), null);
    }

    /**
     * Get null (no query parameter in url).
     *
     * @param enumQuery null string value. Possible values for this parameter include: 'red color', 'green color', 'blue color'
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> enumNullAsync(UriColor enumQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.enumNull(JacksonUtils.serializeRaw(enumQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(enumNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> enumNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array.
     *
     * @param byteQuery '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> byteMultiByte(byte[] byteQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.byteMultiByte(Base64.encodeBase64String(byteQuery));
        return byteMultiByteDelegate(call.execute(), null);
    }

    /**
     * Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array.
     *
     * @param byteQuery '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> byteMultiByteAsync(byte[] byteQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.byteMultiByte(Base64.encodeBase64String(byteQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(byteMultiByteDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> byteMultiByteDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '' as byte array.
     *
     * @param byteQuery '' as byte array
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> byteEmpty(byte[] byteQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.byteEmpty(Base64.encodeBase64String(byteQuery));
        return byteEmptyDelegate(call.execute(), null);
    }

    /**
     * Get '' as byte array.
     *
     * @param byteQuery '' as byte array
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> byteEmptyAsync(byte[] byteQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.byteEmpty(Base64.encodeBase64String(byteQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(byteEmptyDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> byteEmptyDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null as byte array (no query parameters in uri).
     *
     * @param byteQuery null as byte array (no query parameters in uri)
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> byteNull(byte[] byteQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.byteNull(Base64.encodeBase64String(byteQuery));
        return byteNullDelegate(call.execute(), null);
    }

    /**
     * Get null as byte array (no query parameters in uri).
     *
     * @param byteQuery null as byte array (no query parameters in uri)
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> byteNullAsync(byte[] byteQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.byteNull(Base64.encodeBase64String(byteQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(byteNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> byteNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '2012-01-01' as date.
     *
     * @param dateQuery '2012-01-01' as date
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> dateValid(LocalDate dateQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.dateValid(JacksonUtils.serializeRaw(dateQuery));
        return dateValidDelegate(call.execute(), null);
    }

    /**
     * Get '2012-01-01' as date.
     *
     * @param dateQuery '2012-01-01' as date
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> dateValidAsync(LocalDate dateQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.dateValid(JacksonUtils.serializeRaw(dateQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(dateValidDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> dateValidDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null as date - this should result in no query parameters in uri.
     *
     * @param dateQuery null as date (no query parameters in uri)
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> dateNull(LocalDate dateQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.dateNull(JacksonUtils.serializeRaw(dateQuery));
        return dateNullDelegate(call.execute(), null);
    }

    /**
     * Get null as date - this should result in no query parameters in uri.
     *
     * @param dateQuery null as date (no query parameters in uri)
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> dateNullAsync(LocalDate dateQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.dateNull(JacksonUtils.serializeRaw(dateQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(dateNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> dateNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get '2012-01-01T01:01:01Z' as date-time.
     *
     * @param dateTimeQuery '2012-01-01T01:01:01Z' as date-time
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> dateTimeValid(DateTime dateTimeQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.dateTimeValid(JacksonUtils.serializeRaw(dateTimeQuery));
        return dateTimeValidDelegate(call.execute(), null);
    }

    /**
     * Get '2012-01-01T01:01:01Z' as date-time.
     *
     * @param dateTimeQuery '2012-01-01T01:01:01Z' as date-time
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> dateTimeValidAsync(DateTime dateTimeQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.dateTimeValid(JacksonUtils.serializeRaw(dateTimeQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(dateTimeValidDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> dateTimeValidDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get null as date-time, should result in no query parameters in uri.
     *
     * @param dateTimeQuery null as date-time (no query parameters)
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> dateTimeNull(DateTime dateTimeQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.dateTimeNull(JacksonUtils.serializeRaw(dateTimeQuery));
        return dateTimeNullDelegate(call.execute(), null);
    }

    /**
     * Get null as date-time, should result in no query parameters in uri.
     *
     * @param dateTimeQuery null as date-time (no query parameters)
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> dateTimeNullAsync(DateTime dateTimeQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.dateTimeNull(JacksonUtils.serializeRaw(dateTimeQuery));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(dateTimeNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> dateTimeNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format.
     *
     * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> arrayStringCsvValid(List<String> arrayQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.arrayStringCsvValid(JacksonUtils.serializeList(arrayQuery, CollectionFormat.CSV));
        return arrayStringCsvValidDelegate(call.execute(), null);
    }

    /**
     * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format.
     *
     * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> arrayStringCsvValidAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.arrayStringCsvValid(JacksonUtils.serializeList(arrayQuery, CollectionFormat.CSV));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(arrayStringCsvValidDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> arrayStringCsvValidDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get a null array of string using the csv-array format.
     *
     * @param arrayQuery a null array of string using the csv-array format
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> arrayStringCsvNull(List<String> arrayQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.arrayStringCsvNull(JacksonUtils.serializeList(arrayQuery, CollectionFormat.CSV));
        return arrayStringCsvNullDelegate(call.execute(), null);
    }

    /**
     * Get a null array of string using the csv-array format.
     *
     * @param arrayQuery a null array of string using the csv-array format
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> arrayStringCsvNullAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.arrayStringCsvNull(JacksonUtils.serializeList(arrayQuery, CollectionFormat.CSV));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(arrayStringCsvNullDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> arrayStringCsvNullDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get an empty array [] of string using the csv-array format.
     *
     * @param arrayQuery an empty array [] of string using the csv-array format
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> arrayStringCsvEmpty(List<String> arrayQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.arrayStringCsvEmpty(JacksonUtils.serializeList(arrayQuery, CollectionFormat.CSV));
        return arrayStringCsvEmptyDelegate(call.execute(), null);
    }

    /**
     * Get an empty array [] of string using the csv-array format.
     *
     * @param arrayQuery an empty array [] of string using the csv-array format
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> arrayStringCsvEmptyAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.arrayStringCsvEmpty(JacksonUtils.serializeList(arrayQuery, CollectionFormat.CSV));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(arrayStringCsvEmptyDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> arrayStringCsvEmptyDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the ssv-array format.
     *
     * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the ssv-array format
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> arrayStringSsvValid(List<String> arrayQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.arrayStringSsvValid(JacksonUtils.serializeList(arrayQuery, CollectionFormat.SSV));
        return arrayStringSsvValidDelegate(call.execute(), null);
    }

    /**
     * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the ssv-array format.
     *
     * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the ssv-array format
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> arrayStringSsvValidAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.arrayStringSsvValid(JacksonUtils.serializeList(arrayQuery, CollectionFormat.SSV));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(arrayStringSsvValidDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> arrayStringSsvValidDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the tsv-array format.
     *
     * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the tsv-array format
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> arrayStringTsvValid(List<String> arrayQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.arrayStringTsvValid(JacksonUtils.serializeList(arrayQuery, CollectionFormat.TSV));
        return arrayStringTsvValidDelegate(call.execute(), null);
    }

    /**
     * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the tsv-array format.
     *
     * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the tsv-array format
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> arrayStringTsvValidAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.arrayStringTsvValid(JacksonUtils.serializeList(arrayQuery, CollectionFormat.TSV));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(arrayStringTsvValidDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> arrayStringTsvValidDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

    /**
     * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the pipes-array format.
     *
     * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the pipes-array format
     * @throws ErrorException exception thrown from REST call
     * @throws IOException exception thrown from serialization/deserialization
     * @return the {@link ServiceResponse} object if successful.
     */
    public ServiceResponse<Void> arrayStringPipesValid(List<String> arrayQuery) throws ErrorException, IOException {
        Call<ResponseBody> call = service.arrayStringPipesValid(JacksonUtils.serializeList(arrayQuery, CollectionFormat.PIPES));
        return arrayStringPipesValidDelegate(call.execute(), null);
    }

    /**
     * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the pipes-array format.
     *
     * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the pipes-array format
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @return the {@link Call} object
     */
    public Call<ResponseBody> arrayStringPipesValidAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) {
        Call<ResponseBody> call = service.arrayStringPipesValid(JacksonUtils.serializeList(arrayQuery, CollectionFormat.PIPES));
        call.enqueue(new ServiceResponseCallback<Void>(serviceCallback) {
            @Override
            public void onResponse(Response<ResponseBody> response, Retrofit retrofit) {
                try {
                    serviceCallback.success(arrayStringPipesValidDelegate(response, retrofit));
                } catch (ErrorException | IOException exception) {
                    serviceCallback.failure(exception);
                }
            }
        });
        return call;
    }

    private ServiceResponse<Void> arrayStringPipesValidDelegate(Response<ResponseBody> response, Retrofit retrofit) throws ErrorException, IOException {
        return new ServiceResponseBuilder<Void, ErrorException>()
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(ErrorException.class)
                .build(response, retrofit);
    }

}


text:
package com.soussidev.kotlin.rx_java2_lib.RxVerify_Support_7.verifyFuncCompac;

import android.support.v7.widget.AppCompatEditText;
import android.text.TextUtils;

import com.soussidev.kotlin.rx_java2_lib.RxVerify_Support_7.RxVerifyCompacResult;
import com.soussidev.kotlin.rx_java2_lib.RxVerify_Support_7.VerifyCompac;

import rx.Observable;

/**
 * Created by Soussi on 15/09/2017.
 */

public class VerifyLengthCompac implements VerifyCompac<AppCompatEditText> {
    private static final String DEFAULT_MESSAGE = "Bad length";

    private String lengthMessage;
    private int properLength;

    public VerifyLengthCompac(int properLength) {
        this(properLength, DEFAULT_MESSAGE);
    }

    public VerifyLengthCompac(int properLength, String lengthMessage) {
        this.lengthMessage = lengthMessage;
        this.properLength = properLength;
    }

    @Override public Observable<RxVerifyCompacResult<AppCompatEditText>> verify(String text, AppCompatEditText item) {
        if (TextUtils.isEmpty(text)) {
            return Observable.just(RxVerifyCompacResult.createImproper(item, lengthMessage));
        }

        if (text.trim().length() == properLength) {
            return Observable.just(RxVerifyCompacResult.createSuccess(item));
        }

        return Observable.just(RxVerifyCompacResult.createImproper(item, lengthMessage));
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Acme\UserBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use FOS\UserBundle\Entity\UserManager;

class EventsController extends Controller
{
    public function indexAction()
    {
        $em = $this->getDoctrine()->getEntityManager();
         $events = $em->getRepository('AcmeUserBundle:Events')
            ->createQueryBuilder("n")
            ->orderby('n.id', 'DESC')
            ->getQuery()
            ->getResult();
        return $this->render('AcmeUserBundle:Default:events.html.twig',array('events'=>$events));

    }
public function newAction()
    {

    }
}


text:
package net.qldarch.search;

import java.io.IOException;

import javax.inject.Inject;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.apache.lucene.document.Document;
import org.apache.lucene.store.Directory;

import lombok.extern.slf4j.Slf4j;
import net.qldarch.gson.JsonFixedLengthDecimal;
import net.qldarch.gson.serialize.JsonSerializer;
import net.qldarch.jaxrs.ContentType;

@Path("/search")
@Slf4j
public class WsSearch {

  @Inject
  private Search search;

  @Inject
  private Index index;

  @GET
  @Produces(ContentType.JSON)
  @JsonSerializer(type=Document.class, serializer=DocumentTypeAdapter.class)
  @JsonFixedLengthDecimal
  public SearchResult  get(@QueryParam("q") String q,
      @DefaultValue("0") @QueryParam("p") int p,
      @DefaultValue("20") @QueryParam("pc") int pc) {
    try(Directory directory = index.directory()) {
      return search.search(q, p, pc, directory);
    } catch(IOException e) {
      log.warn("exception on search", e);
      throw new RuntimeException(e);
    }
  }

}


text:
package com.koch.ambeth.util.factory;

import java.lang.reflect.Array;
import java.util.concurrent.ConcurrentHashMap;

public class EmptyArrayFactory extends IEmptyArrayFactory {
	protected final ConcurrentHashMap<Class<?>, Object> typeToEmptyArray =
			new ConcurrentHashMap<>(128, 0.5f);

	@Override
	public <T> Object createSharedEmptyArray(Class<T> componentType) {
		Object array = typeToEmptyArray.get(componentType);
		if (array != null) {
			return array;
		}
		array = Array.newInstance(componentType, 0);
		if (typeToEmptyArray.putIfAbsent(componentType, array) != null) {
			// concurrent thread might have been faster
			array = typeToEmptyArray.get(componentType);
		}
		return array;
	}
}


text:
require 'tzinfo/timezone_definition'

module TZInfo
  module Definitions
    module Etc
      module GMT__m__3
        include TimezoneDefinition

        timezone 'Etc/GMT-3' do |tz|
          tz.offset :o0, 10800, 0, :'GMT-3'

        end
      end
    end
  end
end


text:
package eu.javimar.wirelessvlc.view;

import android.app.LoaderManager;
import android.content.CursorLoader;
import android.content.Intent;
import android.content.Loader;
import android.database.Cursor;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.CircleOptions;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;

import eu.javimar.wirelessvlc.MainActivity;
import eu.javimar.wirelessvlc.R;
import eu.javimar.wirelessvlc.model.GeoPoint;
import eu.javimar.wirelessvlc.model.WifiContract.WifiEntry;

import static eu.javimar.wirelessvlc.MainActivity.HAVE_LOCATION_PERMISSION;

public class MapWifis extends AppCompatActivity implements
        OnMapReadyCallback,
        GoogleMap.OnInfoWindowClickListener,
        LoaderManager.LoaderCallbacks<Cursor>
{

    GoogleMap mapa;
    LatLng myLocation, wifiLocation;
    double lat, lng = 0.0;
    String wifiName;
    CameraPosition cameraPosition;

    /** Identifier for the wifi loaders */
    private static final int MAPA_LOADER = 0;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.map_fragment);

        MapFragment mapFragment = (MapFragment)
                getFragmentManager().findFragmentById(R.id.mapa);
        mapFragment.getMapAsync(this);

        setTitle(getString(R.string.title_mapa_activity));

        // start the loader to get all wifis
        getLoaderManager().initLoader(MAPA_LOADER, null, this);
    }

    /** LOADER LOGIC */
    @Override
    public Loader<Cursor> onCreateLoader(int id, Bundle args)
    {
        String[] projection;

        switch (id)
        {
            case MAPA_LOADER:
                // Define a projection that specifies the columns from the table we care about.
                projection = new String[]
                        {
                                WifiEntry._ID,
                                WifiEntry.COLUMN_WIFI_NAME,
                                WifiEntry.COLUMN_WIFI_LATITUDE,
                                WifiEntry.COLUMN_WIFI_LONGITUDE,
                        };
                // This loader will execute the ContentProvider's query method on a background thread
                return new CursorLoader(
                        this,                   // Parent activity context
                        WifiEntry.CONTENT_URI,  // Provider content URI to query
                        projection,             // Columns to include in the resulting Cursor
                        null,                   // No selection clause
                        null,                   // No selection arguments
                        null);                  // Default sort order
        }
        return null;
    }

    public void onLoadFinished(Loader<Cursor> loader, Cursor cursor)
    {
        // Bail early if the cursor is null or there is no rows in the cursor
        if (cursor == null || cursor.getCount() < 1)
        {
            return;
        }
        addMarkersForAllWifis(cursor);
    }
    @Override
    public void onLoaderReset(Loader<Cursor> loader) {
    }

    @Override
    public void onMapReady(GoogleMap map)
    {
        if (HAVE_LOCATION_PERMISSION)
        {
            mapa = map;

            // where I am now
            myLocation = new LatLng(MainActivity.sCurrentPosition.getLatitude(),
                    MainActivity.sCurrentPosition.getLongitud());

            mapa.setMapType(GoogleMap.MAP_TYPE_NORMAL);
            mapa.getUiSettings().setZoomControlsEnabled(true);
            mapa.getUiSettings().setCompassEnabled(true);

            mapa.addCircle(new CircleOptions()
                    .center(myLocation)
                    .radius(500) // meters
                    .strokeColor(Color.argb(255, 196, 202, 235))
                    .fillColor(Color.argb(110, 196, 202, 235)));

            mapa.addMarker(new MarkerOptions()
                    .position(myLocation)
                    .title("Hola")
                    //.snippet(getString(R.string.geo_take_me))
                    .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))
                    .anchor(0.5f, 0.5f));
        }
    }

    private void addMarkersForAllWifis(Cursor cursor)
    {
        if (mapa == null || cursor == null)
            return;

        MarkerOptions mo = new MarkerOptions();

        // Loop through the cursor
        while (cursor.moveToNext())
        {
            // Find the columns of wifi attributes that we're interested in
            int nameColumnIndex = cursor.getColumnIndex(WifiEntry.COLUMN_WIFI_NAME);
            int lngColumnIndex = cursor.getColumnIndex(WifiEntry.COLUMN_WIFI_LONGITUDE);
            int latColumnIndex = cursor.getColumnIndex(WifiEntry.COLUMN_WIFI_LATITUDE);

            wifiName = cursor.getString(nameColumnIndex);
            double longitude = cursor.getDouble(lngColumnIndex);
            double latitude = cursor.getDouble(latColumnIndex);
            wifiLocation = new LatLng(latitude, longitude);

            mo.position(wifiLocation)
                    .title(wifiName)
                    .snippet(new GeoPoint(longitude, latitude).toString());
            mo.icon(BitmapDescriptorFactory
                    .defaultMarker(BitmapDescriptorFactory.HUE_GREEN));
            mapa.addMarker(mo);

        }
        // set view to my current location
        moveCameraTo(myLocation);
        mapa.setOnInfoWindowClickListener(this);
    }

    private void moveCameraTo(LatLng coor)
    {
        cameraPosition = CameraPosition.builder()
                .target(coor)
                .zoom(15)
                .bearing(0) // north
                .tilt(40) // some inclination
                .build();
        mapa.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
        mapa.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition),
                5000, null); // 5'' animation
    }

    @Override
    public void onInfoWindowClick(Marker marker)
    {
        if (!HAVE_LOCATION_PERMISSION)
            return;
        // Give me data for new query WHERE the Wifi name equals the one I just clicked on
        showWifiInStreetView(marker.getTitle());
    }

    private void showWifiInStreetView(String wifi)
    {
        String[] projection = new String[]
                {
                        WifiEntry._ID,
                        WifiEntry.COLUMN_WIFI_LATITUDE,
                        WifiEntry.COLUMN_WIFI_LONGITUDE,
                };
        String selection = WifiEntry.COLUMN_WIFI_NAME + "=?";
        String [] selectionArgs = new String[] { wifi };

        Cursor cursor = getContentResolver()
                .query(WifiEntry.CONTENT_URI, projection, selection, selectionArgs, null);

        if (cursor != null && cursor.getCount() >= 1)
        {
            // Proceed with moving to the first row of the cursor and reading data from it
            // (This should be the only row in the cursor)
            if (cursor.moveToFirst())
            {
                int lngColumnIndex = cursor.getColumnIndex(WifiEntry.COLUMN_WIFI_LONGITUDE);
                int latColumnIndex = cursor.getColumnIndex(WifiEntry.COLUMN_WIFI_LATITUDE);

                lng = cursor.getDouble(lngColumnIndex);
                lat = cursor.getDouble(latColumnIndex);

                Intent i = new Intent(this, PanoramaActivity.class);
                i.putExtra("lat", lat);
                i.putExtra("lng", lng);
                startActivity(i);
            }
            cursor.close();
        }
    }

}


text:
package org.apache.jena.commonsrdf;

import org.apache.commons.rdf.api.AbstractBlankNodeTest;
import org.apache.commons.rdf.api.BlankNode;
import org.apache.jena.commonsrdf.impl.JCR_Factory;

/** org.apache.commons.rdf.api BlankNode tests */
public class TestBlankNodeJena extends AbstractBlankNodeTest {
    @Override
    protected BlankNode getBlankNode() {
        return JCR_Factory.createBlankNode();
    }

    @Override
    protected BlankNode getBlankNode(String identifier) {
        return JCR_Factory.createBlankNode(identifier);
    }
}


text:
using System.Collections.Generic;
using System.Linq;

using NoSqlKickoff.Indexes.Reference;
using NoSqlKickoff.Model.Reference;

using NUnit.Framework;

using Raven.Client;
using Raven.Client.Indexes;
using Raven.Tests.Helpers;

namespace NoSqlKickoff.Tests.Reference
{
    /// <summary>
    /// Use Case: Query result type coercion
    /// Goal: Query properties of the index and still get Player objects back
    ///
    /// Index Entry Property Names and Document Property Names have to match exactly, otherwise
    //  either the compiler complains, it will throw at runtime or you won't get any results
    //  Best Solution: use type coercion
    /// </summary>
    public class R04_Querying_TypeCoercion : RavenTestBase
    {
        private IDocumentStore _store;

        private List<Player> _players;

        [SetUp]
        public void SetUp()
        {
            _store = NewDocumentStore();
            _store.Initialize();

            // We first have to create the static indexes
            IndexCreation.CreateIndexes(typeof(Player_Index_R03).Assembly, _store);

            _players = DataGenerator.CreatePlayerList();

            // Store some players in the database
            using (var session = _store.OpenSession())
            {
                foreach (var player in _players)
                {
                    session.Store(player);
                }

                session.SaveChanges();
            }

            // Let's wait for indexing to happen
            // this method is part of RavenTestBase and thus should only be used in tests
            WaitForIndexing(_store);
        }

        [Test]
        public void TypeCoercion_OnNewlyCreatedProperty()
        {
            using (var session = _store.OpenSession())
            {
                 // Not possible to query on Name, because Player does not have a Name property
                 // var filteredResults = session.Query<Player, Player_Index_UC04>()
                 //   .Where(p => p.Name.StartsWith("C"))
                 //   .ToList();

                // Instead we have to query on the Index Entry and then coerce the type to Player using special operators

                // Option 1: As<T>
                // var filteredResults = session.Query<Player_Index_UC04.IndexEntry, Player_Index_UC04>()
                // .Where(p => p.Name.StartsWith("C"))
                // .As<Player>()
                // .ToList();

                // Option 2: OfType<T>
                var filteredResults = session.Query<Player_Index_R04.IndexEntry, Player_Index_R04>()
                     .Where(p => p.Name.StartsWith("C"))
                     .OfType<Player>()
                     .ToList();

                Assert.That(filteredResults.Count(), Is.EqualTo(5));
            }
        }

        [Test]
        public void TypeCoerction_OnRenamedProperty()
        {
            using (var session = _store.OpenSession())
            {
                // Not possible to use Player as Result Type, since it does not have the property "FirstNameRenamed"
                // var filteredResults = session.Query<Player, Player_Index_UC04>()
                //    .Where(p => p.FirstNameRenamed.StartsWith("C"))
                //    .ToList();

                // Solution: Type coercion
                var filteredResults = session.Query<Player_Index_R04.IndexEntry, Player_Index_R04>()
                     .Where(p => p.FirstNameRenamed.StartsWith("C"))
                     .OfType<Player>()
                     .ToList();

                Assert.That(filteredResults.Count(), Is.EqualTo(5));
            }
        }

        [Test]
        public void NestedProperties_WithoutTypeCoercion()
        {
            using (var session = _store.OpenSession())
            {
                var filteredResults = session.Query<Player, Player_Index_R04>()
                    .Where(p => p.Nationality.Name == "Germany")
                    .ToList();

                Assert.That(filteredResults.Count(), Is.EqualTo(17));
            }
        }

        [Test]
        public void TypeCoerction_WithNestedProperties()
        {
            using (var session = _store.OpenSession())
            {
                var filteredResults = session.Query<Player_Index_R04.IndexEntry, Player_Index_R04>()
                    .Where(p => p.Nationality == "Germany")
                    .OfType<Player>()
                    .ToList();

                Assert.That(filteredResults.Count(), Is.EqualTo(17));
            }
        }
    }
}


text:
import emitter from 'sketch-module-web-view/client';

const listeners = {};

window.webviewBroadcaster = (event, ...args) => {
  const queue = listeners[event];

  (queue || []).forEach((cb) => {
    cb(...args);
  });
};

export default {
  on(event, cb) {
    if (listeners[event]) {
      listeners[event].push(cb);
    } else {
      listeners[event] = [cb];
    }
  },
  off(event, cb) {
    const target = (listeners[event] || []).indexOf(cb);

    if (target > -1) {
      listeners.splice(target, 1);
    } else if (listeners[event]) {
      delete listeners[event];
    }
  },
  emit: emitter,
};


text:
<?php
/**
 * Press This Display and Handler.
 *
 * @package WordPress
 * @subpackage Press_This
 */

define('IFRAME_REQUEST' , true);

/** WordPress Administration Bootstrap */
require_once( dirname( __FILE__ ) . '/admin.php' );

if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
	wp_die(
		'
' . __( 'Cheatin’ uh?' ) . '
' .
		'
' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '
',
		403
	);
}

include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
$wp_press_this = new WP_Press_This();
$wp_press_this->html();


text:
package de.dfki.asr.compass.business;

import de.dfki.asr.compass.model.components.AnnotationComponent;
import de.dfki.asr.compass.business.api.ComponentAnnouncer;
import de.dfki.asr.compass.business.api.ComponentRegistry;
import javax.ejb.Stateless;

@Stateless
public class WebComponentAnnouncer implements ComponentAnnouncer {

	@Override
	public void announceComponents(final ComponentRegistry registry) {
		registry.registerComponent(AnnotationComponent.class);
	}
}


text:
import React from 'react';
import PropTypes from 'prop-types';

const Container = (props) => (
  <div className='container'>
    {props.children}
  </div>
);

Container.propTypes = {
  children: PropTypes.node
};

export default Container;


text:
package com.mvvm.http;

import android.util.Log;

import com.mvvm.exception.AccessDenyException;
import com.mvvm.exception.ConversionException;
import com.mvvm.exception.UnKnowException;

import retrofit.ErrorHandler;
import retrofit.RequestInterceptor;
import retrofit.RestAdapter;
import retrofit.RetrofitError;

/**
 * Created by chiclaim on 2016/01/26
 */
public class ApiServiceFactory {

    //server source code please see:
    //    https://github.com/chiclaim/android_mvvm_server
    private static final String BASE_URL = "http://192.168.1.109:8080/AndroidMvvmServer";

    private static RequestInterceptor requestInterceptor = new RequestInterceptor() {
        @Override
        public void intercept(RequestFacade request) {
            request.addHeader("Authorization", "test");
        }
    };

    private static class NetWorkErrorHandler implements ErrorHandler {
        @Override
        public Throwable handleError(RetrofitError error) {
            retrofit.client.Response r = error.getResponse();
            if (r != null && r.getStatus() == 401) {
                Log.e("ErrorHandler", "---------> access deny code=401");
                return new AccessDenyException(error.getMessage());
            } else if (error.getKind() == RetrofitError.Kind.NETWORK) {
                Log.e("ErrorHandler", "---------> An IOException occurred while communicating to the server");
                //return new NetworkException(cause.getMessage());
            } else if (error.getKind() == RetrofitError.Kind.HTTP) {
                Log.e("ErrorHandler", "---------> A non-200 HTTP status code was received from the server");
                //return new Non200HttpException(cause.getMessage());
            } else if (error.getKind() == RetrofitError.Kind.CONVERSION) {
                Log.e("ErrorHandler", "---------> An exception was thrown while (de)serializing a body");
                return new ConversionException(error.getMessage());
            } else if (error.getKind() == RetrofitError.Kind.UNEXPECTED) {
                Log.e("ErrorHandler", "---------> An internal error occurred while attempting to execute a request. " +
                        "It is best practice to re-throw this exception so your application crashes.");
                return new UnKnowException(error.getMessage());
            }
            return error.getCause();
        }
    }

    private static RestAdapter restAdapter = new RestAdapter
            .Builder()
            .setLogLevel(RestAdapter.LogLevel.FULL)
            .setEndpoint(BASE_URL)
            .setErrorHandler(new NetWorkErrorHandler())
            .setRequestInterceptor(requestInterceptor)
            .build();

    public static <S> S createService(Class<S> serviceClazz) {
        return restAdapter.create(serviceClazz);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <solid android:color="@color/blue" />

    <corners
        android:bottomLeftRadius="0dp"
        android:topLeftRadius="0dp"
        android:bottomRightRadius="3dp"
        android:topRightRadius="3dp" />

</shape>


text:
$errors = $mongo.collection('errors')

module Helpers
  def log_e(err, data = {})
    err = {msg: err.to_s, backtrace: err.backtrace.to_a.slice(0,4)} if err.is_a? Exception
    err = {} unless err.is_a? Hash
    err[:user_id]  = cuid
    err[:username] = cusername
    err[:path]     = request_path
    err[:params]   = JSON.parse(_params.to_json) #sometimes params has un-BSON able fields
    $errors.add(err)
  rescue => e
    nil
  end
end

error do
  e = env['sinatra.error']
  log_e(e)
  data = {msg: "an error occurred", e: e.to_s, backtrace: e.backtrace.to_a.slice(0,4).to_s}
  data
  # if request_expects_json?
  #   data
  # else
  #   full_page_card(:"other/500", locals: {data: data})
  # end
end

not_found do
  return {err: 'No such route'}
  if request_expects_json?
    content_type 'application/json'
    status 404
    return {a:1} #{msg: 'Whoops, no such route.'}
  else
    full_page_card(:"other/404")
  end
end

get '/error' do
  a = b
end