com.sap.cloud.mt.tools.api.ServiceResponse Maven / Gradle / Ivy
/*
* ----------------------------------------------------------------
* © 2021 SAP SE or an SAP affiliate company. All rights reserved.
* ----------------------------------------------------------------
*
*/
package com.sap.cloud.mt.tools.api;
import org.apache.http.Header;
import java.util.Optional;
/**
* Data class that combines returned payload, code and eTag
*
* @param : type of returned payload
*/
public final class ServiceResponse {
private Optional payload = Optional.empty();
private int httpStatusCode;
private Optional eTag = Optional.empty();
private Header[] headers;
public Optional getPayload() {
return payload;
}
public void setPayload(Optional payload) {
this.payload = payload;
}
public int getHttpStatusCode() {
return httpStatusCode;
}
public void setHttpStatusCode(int httpStatusCode) {
this.httpStatusCode = httpStatusCode;
}
public Optional getETag() {
return eTag;
}
public void setETag(Optional eTag) {
this.eTag = eTag;
}
public Header[] getHeaders() {
return headers;
}
public void setHeaders(Header[] headers) {
this.headers = headers;
}
}