com.aliyun.datahub.client.http.Entity Maven / Gradle / Ivy
package com.aliyun.datahub.client.http;
public class Entity {
private T entity;
private String contentType;
private Entity(T entity, String contentType) {
this.entity = entity;
this.contentType = contentType;
}
public static Entity json(T entity) {
return new Entity(entity, "application/json");
}
public static Entity protobuf(T entity) {
return new Entity(entity, "application/x-protobuf");
}
public T getEntity() {
return entity;
}
public String getContentType() {
return contentType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy