io.getstream.core.options.CustomQueryParameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stream-java Show documentation
Show all versions of stream-java Show documentation
Stream Feeds Java Client for backend and android integrations
package io.getstream.core.options;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import io.getstream.core.http.Request;
public final class CustomQueryParameter implements RequestOption {
private final String name;
private final String value;
public CustomQueryParameter(String name, String value) {
checkNotNull(name, "Missing query parameter name");
checkNotNull(value, "Missing query parameter value");
checkArgument(!name.isEmpty(), "Query parameter name can't be empty");
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public String getValue() {
return value;
}
@Override
public void apply(Request.Builder builder) {
builder.addQueryParameter(name, value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy