package a.c.b;

import com.google.protobuf.GeneratedMessageLite;
import java.nio.ByteBuffer;

public class t {

    /* renamed from: a  reason: collision with root package name */
    private o f82a = k.c();
    private c b;
    private i c = i.SEND;
    private f d = f.RAW;
    private int e;

    public s a(GeneratedMessageLite<?, ?> generatedMessageLite) {
        j.b(generatedMessageLite, "protobufMessage");
        a(f.PB3);
        byte[] byteArray = generatedMessageLite.toByteArray();
        return new s(new h(byteArray.length + 20, new d(this.f82a, this.d, this.c, this.b, this.e)), byteArray);
    }

    public final s a(ByteBuffer byteBuffer) {
        return new s(new h(byteBuffer.remaining() + 20, new d(this.f82a, this.d, this.c, this.b, this.e)), byteBuffer, byteBuffer.remaining());
    }

    public final s a(byte[] bArr) {
        if (bArr == null) {
            bArr = new byte[0];
        }
        return new s(new h(bArr.length + 20, new d(this.f82a, this.d, this.c, this.b, this.e)), bArr);
    }

    public t a(int i) {
        this.e = i;
        return this;
    }

    public t a(c cVar) {
        j.b(cVar, "cmdCategory");
        this.b = cVar;
        return this;
    }

    public t a(f fVar) {
        j.b(fVar, "dataFormat");
        this.d = fVar;
        return this;
    }

    public t a(i iVar) {
        j.b(this.d, "dataFormat");
        this.c = iVar;
        return this;
    }

    public t a(o oVar) {
        j.b(oVar, "sourceDevice");
        this.f82a = oVar;
        return this;
    }
}
