net.gdface.sdk.decorator.CodeInfo Maven / Gradle / Ivy
The newest version!
// ______________________________________________________
// Generated by codegen - https://gitee.com/l0km/codegen
// template: thrift/service/perstruct/bean.decorator.class.vm
// ______________________________________________________
package net.gdface.sdk.decorator;
import com.gitee.l0km.xthrift.base.ThriftDecorator;
import java.nio.ByteBuffer;
import com.facebook.swift.codec.ThriftStruct;
import com.facebook.swift.codec.ThriftField;
import com.facebook.swift.codec.ThriftField.Requiredness;
import com.gitee.l0km.xthrift.thrift.TypeTransformer;
/**
* 人脸特征码信息描述对象
* 包括人脸位置,眼睛、嘴巴,、鼻子位置,人脸角度,特征码数据
* @author guyadong
* ========================================
* decorator pattern 装饰者模式代理{@link net.gdface.sdk.CodeInfo}
* 代理对象必须有默认构造方法,必须是普通类型,不可以有@ThriftStruct注释
* 转发所有{@link net.gdface.sdk.CodeInfo}get/set方法到{@link #delegate()}指定的实例,
* 计算机生成代码(generated by automated tools ThriftServiceDecoratorGenerator @author guyadong)
*
*/
@ThriftStruct
public final class CodeInfo implements ThriftDecorator {
private final net.gdface.sdk.CodeInfo delegate;
public CodeInfo(){
this(new net.gdface.sdk.CodeInfo());
}
public CodeInfo(net.gdface.sdk.CodeInfo delegate) {
if(null == delegate){
throw new NullPointerException("delegate is null");
}
// 检查被装饰类是否有@ThriftStruct注释
if(delegate.getClass().isAnnotationPresent(ThriftStruct.class)){
throw new IllegalArgumentException(
String.format("NOT ALLOW %s have @ThriftStruct annotation",delegate.getClass().getName()));
}
this.delegate = delegate;
}
/**
* 返回被装饰的{@link net.gdface.sdk.CodeInfo}实例
*/
@Override
public net.gdface.sdk.CodeInfo delegate() {
return delegate;
}
@Override
public int hashCode() {
return delegate().hashCode();
}
@Override
public boolean equals(Object obj) {
return delegate().equals(obj);
}
@Override
public String toString() {
return delegate().toString();
}
/**
* @return angle
*/
@ThriftField(value = 1,name = "angle",requiredness=Requiredness.OPTIONAL)
public FAngle getAngle(){
return TypeTransformer.getInstance().to(
delegate().getAngle(),
net.gdface.sdk.FAngle.class,
FAngle.class);
}
/**
* @param angle 要设置的 angle
*/
@ThriftField
public void setAngle(FAngle angle){
delegate().setAngle(TypeTransformer.getInstance().to(
angle,
FAngle.class,
net.gdface.sdk.FAngle.class));
}
@ThriftField(value = 2,name = "code",requiredness=Requiredness.OPTIONAL)
public ByteBuffer getCode(){
return TypeTransformer.getInstance().to(
delegate().getCode(),
byte[].class,
ByteBuffer.class);
}
@ThriftField
public void setCode(ByteBuffer code){
delegate().setCode(TypeTransformer.getInstance().to(
code,
ByteBuffer.class,
byte[].class));
}
/**
* @return the ei
*/
@ThriftField(value = 3,name = "ei",requiredness=Requiredness.OPTIONAL)
public EyeInfo getEi(){
return TypeTransformer.getInstance().to(
delegate().getEi(),
net.gdface.sdk.EyeInfo.class,
EyeInfo.class);
}
/**
* @param ei the ei to set
*/
@ThriftField
public void setEi(EyeInfo ei){
delegate().setEi(TypeTransformer.getInstance().to(
ei,
EyeInfo.class,
net.gdface.sdk.EyeInfo.class));
}
/**
* @return facialData
*/
@ThriftField(value = 4,name = "facialData",requiredness=Requiredness.OPTIONAL)
public ByteBuffer getFacialData(){
return TypeTransformer.getInstance().to(
delegate().getFacialData(),
byte[].class,
ByteBuffer.class);
}
/**
* @param facialData 要设置的 facialData
*/
@ThriftField
public void setFacialData(ByteBuffer facialData){
delegate().setFacialData(TypeTransformer.getInstance().to(
facialData,
ByteBuffer.class,
byte[].class));
}
/**
* @return mouth
*/
@ThriftField(value = 5,name = "mouth",requiredness=Requiredness.OPTIONAL)
public FInt2 getMouth(){
return TypeTransformer.getInstance().to(
delegate().getMouth(),
net.gdface.sdk.FInt2.class,
FInt2.class);
}
/**
* @param mouth 要设置的 mouth
*/
@ThriftField
public void setMouth(FInt2 mouth){
delegate().setMouth(TypeTransformer.getInstance().to(
mouth,
FInt2.class,
net.gdface.sdk.FInt2.class));
}
/**
* @return nose
*/
@ThriftField(value = 6,name = "nose",requiredness=Requiredness.OPTIONAL)
public FInt2 getNose(){
return TypeTransformer.getInstance().to(
delegate().getNose(),
net.gdface.sdk.FInt2.class,
FInt2.class);
}
/**
* @param nose 要设置的 nose
*/
@ThriftField
public void setNose(FInt2 nose){
delegate().setNose(TypeTransformer.getInstance().to(
nose,
FInt2.class,
net.gdface.sdk.FInt2.class));
}
/**
* 人脸信息坐标偏移量
* 此字段属于状态描述字段,不是属于人脸信息部分,
* 此字段不为{@code null}时用于描述当前人脸信息对象中所有的坐标数据的原点相对实际原点的偏移量
* @return 偏移量对象,为{@code null}无偏移或偏移为0
*/
@ThriftField(value = 7,name = "offset",requiredness=Requiredness.OPTIONAL)
public FInt2 getOffset(){
return TypeTransformer.getInstance().to(
delegate().getOffset(),
net.gdface.sdk.FInt2.class,
FInt2.class);
}
@ThriftField
public void setOffset(FInt2 offset){
delegate().setOffset(TypeTransformer.getInstance().to(
offset,
FInt2.class,
net.gdface.sdk.FInt2.class));
}
@ThriftField(value = 8,name = "pos",requiredness=Requiredness.OPTIONAL)
public FRect getPos(){
return TypeTransformer.getInstance().to(
delegate().getPos(),
net.gdface.sdk.FRect.class,
FRect.class);
}
@ThriftField
public void setPos(FRect pos){
delegate().setPos(TypeTransformer.getInstance().to(
pos,
FRect.class,
net.gdface.sdk.FRect.class));
}
/**
* 人脸位置旋转角度(0,90,270)
* @return 旋转角度(0,90,270)
*/
@ThriftField(value = 9,name = "rotate",requiredness=Requiredness.REQUIRED)
public int getRotate(){
return delegate().getRotate();
}
@ThriftField
public void setRotate(int rotate){
delegate().setRotate(rotate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy