package nano;

import com.google.protobuf.nano.Any;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;

/* compiled from: TbsSdkJava */
public interface BaseResponse {

    /* compiled from: TbsSdkJava */
    public static final class Base_Response extends MessageNano {

        private static volatile Base_Response[] _emptyArray;

        private int bitField0_;

        public Any detail;

        public Header header;

        public Result result;

        private String traceId_;

        /* compiled from: TbsSdkJava */
        public static final class Header extends MessageNano {

            private static volatile Header[] _emptyArray;

            private int bitField0_;

            private String id_;

            private int proto_;

            public Header() {
                clear();
            }

            public static Header[] emptyArray() {
                if (_emptyArray == null) {
                    synchronized (InternalNano.LAZY_INIT_LOCK) {
                        try {
                            if (_emptyArray == null) {
                                _emptyArray = new Header[0];
                            }
                        } catch (Throwable th) {
                            throw th;
                        }
                    }
                }
                return _emptyArray;
            }

            public static Header parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
                return (Header) MessageNano.mergeFrom(new Header(), bArr);
            }

            public Header clear() {
                this.bitField0_ = 0;
                this.id_ = "";
                this.proto_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public Header clearId() {
                this.id_ = "";
                this.bitField0_ &= -2;
                return this;
            }

            public Header clearProto() {
                this.proto_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(1, this.id_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(2, this.proto_);
                }
                return computeSerializedSize;
            }

            public String getId() {
                return this.id_;
            }

            public int getProto() {
                return this.proto_;
            }

            public boolean hasId() {
                if ((this.bitField0_ & 1) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasProto() {
                if ((this.bitField0_ & 2) != 0) {
                    return true;
                }
                return false;
            }

            public Header setId(String str) {
                str.getClass();
                this.id_ = str;
                this.bitField0_ |= 1;
                return this;
            }

            public Header setProto(int i10) {
                this.proto_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeString(1, this.id_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.proto_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

            public static Header parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                return new Header().mergeFrom(codedInputByteBufferNano);
            }

            public Header mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        this.id_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.proto_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        /* compiled from: TbsSdkJava */
        public static final class Result extends MessageNano {

            private static volatile Result[] _emptyArray;

            private int bitField0_;

            private int code_;

            private String msg_;

            public Result() {
                clear();
            }

            public static Result[] emptyArray() {
                if (_emptyArray == null) {
                    synchronized (InternalNano.LAZY_INIT_LOCK) {
                        try {
                            if (_emptyArray == null) {
                                _emptyArray = new Result[0];
                            }
                        } catch (Throwable th) {
                            throw th;
                        }
                    }
                }
                return _emptyArray;
            }

            public static Result parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
                return (Result) MessageNano.mergeFrom(new Result(), bArr);
            }

            public Result clear() {
                this.bitField0_ = 0;
                this.code_ = 0;
                this.msg_ = "";
                this.cachedSize = -1;
                return this;
            }

            public Result clearCode() {
                this.code_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public Result clearMsg() {
                this.msg_ = "";
                this.bitField0_ &= -3;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(1, this.code_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeStringSize(2, this.msg_);
                }
                return computeSerializedSize;
            }

            public int getCode() {
                return this.code_;
            }

            public String getMsg() {
                return this.msg_;
            }

            public boolean hasCode() {
                if ((this.bitField0_ & 1) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasMsg() {
                if ((this.bitField0_ & 2) != 0) {
                    return true;
                }
                return false;
            }

            public Result setCode(int i10) {
                this.code_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public Result setMsg(String str) {
                str.getClass();
                this.msg_ = str;
                this.bitField0_ |= 2;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeInt32(1, this.code_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeString(2, this.msg_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

            public static Result parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                return new Result().mergeFrom(codedInputByteBufferNano);
            }

            public Result mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.code_ = codedInputByteBufferNano.readInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        this.msg_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public Base_Response() {
            clear();
        }

        public static Base_Response[] emptyArray() {
            if (_emptyArray == null) {
                synchronized (InternalNano.LAZY_INIT_LOCK) {
                    try {
                        if (_emptyArray == null) {
                            _emptyArray = new Base_Response[0];
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                }
            }
            return _emptyArray;
        }

        public static Base_Response parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
            return (Base_Response) MessageNano.mergeFrom(new Base_Response(), bArr);
        }

        public Base_Response clear() {
            this.bitField0_ = 0;
            this.result = null;
            this.detail = null;
            this.header = null;
            this.traceId_ = "";
            this.cachedSize = -1;
            return this;
        }

        public Base_Response clearTraceId() {
            this.traceId_ = "";
            this.bitField0_ &= -2;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            Result result2 = this.result;
            if (result2 != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, result2);
            }
            Any any = this.detail;
            if (any != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, any);
            }
            Header header2 = this.header;
            if (header2 != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(3, header2);
            }
            if ((this.bitField0_ & 1) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeStringSize(4, this.traceId_);
            }
            return computeSerializedSize;
        }

        public String getTraceId() {
            return this.traceId_;
        }

        public boolean hasTraceId() {
            if ((this.bitField0_ & 1) != 0) {
                return true;
            }
            return false;
        }

        public Base_Response setTraceId(String str) {
            str.getClass();
            this.traceId_ = str;
            this.bitField0_ |= 1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            Result result2 = this.result;
            if (result2 != null) {
                codedOutputByteBufferNano.writeMessage(1, result2);
            }
            Any any = this.detail;
            if (any != null) {
                codedOutputByteBufferNano.writeMessage(2, any);
            }
            Header header2 = this.header;
            if (header2 != null) {
                codedOutputByteBufferNano.writeMessage(3, header2);
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeString(4, this.traceId_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

        public static Base_Response parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            return new Base_Response().mergeFrom(codedInputByteBufferNano);
        }

        public Base_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.result == null) {
                        this.result = new Result();
                    }
                    codedInputByteBufferNano.readMessage(this.result);
                } else if (readTag == 18) {
                    if (this.detail == null) {
                        this.detail = new Any();
                    }
                    codedInputByteBufferNano.readMessage(this.detail);
                } else if (readTag == 26) {
                    if (this.header == null) {
                        this.header = new Header();
                    }
                    codedInputByteBufferNano.readMessage(this.header);
                } else if (readTag == 34) {
                    this.traceId_ = codedInputByteBufferNano.readString();
                    this.bitField0_ |= 1;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
