All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ftl.builtin.HttpResponse Maven / Gradle / Ivy

package ftl.builtin;

import java.lang.String;
import java.util.List;
import java.util.Map;
import org.jetbrains.annotations.NotNull;
import xyz.block.ftl.GeneratedRef;

@GeneratedRef(
    name = "HttpResponse",
    module = "builtin"
)
public class HttpResponse {
  private long status;

  private @NotNull Map> headers;

  private Body body;

  private Error error;

  public HttpResponse() {
  }

  public HttpResponse(Body body, Error error, @NotNull Map> headers,
      long status) {
    this.body = body;
    this.error = error;
    this.headers = headers;
    this.status = status;
  }

  public HttpResponse setStatus(long status) {
    this.status = status;
    return this;
  }

  public long getStatus() {
    return status;
  }

  public HttpResponse setHeaders(@NotNull Map> headers) {
    this.headers = headers;
    return this;
  }

  public @NotNull Map> getHeaders() {
    return headers;
  }

  public HttpResponse setBody(Body body) {
    this.body = body;
    return this;
  }

  public Body getBody() {
    return body;
  }

  public HttpResponse setError(Error error) {
    this.error = error;
    return this;
  }

  public Error getError() {
    return error;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy