THRIFT-5650: Implement UUID in Go library

Client: go

This is only the library part of THRIFT-5650. I still have some open
questions for the compiler part so that will be done later.

While I'm here, also made some changes to go CI process:

* Update ubuntu-bionic to use go 1.18 for travis
* Update ubuntu-jammy to use the latest go 1.19.x for travis
* Run both go 1.18 and 1.19 for github actions
* Also run test/go tests for github actions
diff --git a/lib/go/test/tests/protocol_mock.go b/lib/go/test/tests/protocol_mock.go
index 1cdd4c3..221705f 100644
--- a/lib/go/test/tests/protocol_mock.go
+++ b/lib/go/test/tests/protocol_mock.go
@@ -1,111 +1,118 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
+// Code generated by MockGen. DO NOT EDIT.
+// Source: github.com/apache/thrift/lib/go/thrift (interfaces: TProtocol)
 
-// Automatically generated by MockGen. DO NOT EDIT!
-// Source: thrift (interfaces: TProtocol)
-
+// Package tests is a generated GoMock package.
 package tests
 
 import (
-	"context"
-	thrift "github.com/apache/thrift/lib/go/thrift"
+	context "context"
+	reflect "reflect"
 
+	thrift "github.com/apache/thrift/lib/go/thrift"
 	gomock "github.com/golang/mock/gomock"
 )
 
-// Mock of TProtocol interface
+// MockTProtocol is a mock of TProtocol interface.
 type MockTProtocol struct {
 	ctrl     *gomock.Controller
-	recorder *_MockTProtocolRecorder
+	recorder *MockTProtocolMockRecorder
 }
 
-// Recorder for MockTProtocol (not exported)
-type _MockTProtocolRecorder struct {
+// MockTProtocolMockRecorder is the mock recorder for MockTProtocol.
+type MockTProtocolMockRecorder struct {
 	mock *MockTProtocol
 }
 
+// NewMockTProtocol creates a new mock instance.
 func NewMockTProtocol(ctrl *gomock.Controller) *MockTProtocol {
 	mock := &MockTProtocol{ctrl: ctrl}
-	mock.recorder = &_MockTProtocolRecorder{mock}
+	mock.recorder = &MockTProtocolMockRecorder{mock}
 	return mock
 }
 
-func (_m *MockTProtocol) EXPECT() *_MockTProtocolRecorder {
-	return _m.recorder
+// EXPECT returns an object that allows the caller to indicate expected use.
+func (m *MockTProtocol) EXPECT() *MockTProtocolMockRecorder {
+	return m.recorder
 }
 
-func (_m *MockTProtocol) Flush(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "Flush")
+// Flush mocks base method.
+func (m *MockTProtocol) Flush(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "Flush", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) Flush(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "Flush")
+// Flush indicates an expected call of Flush.
+func (mr *MockTProtocolMockRecorder) Flush(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flush", reflect.TypeOf((*MockTProtocol)(nil).Flush), arg0)
 }
 
-func (_m *MockTProtocol) ReadBinary(ctx context.Context) ([]byte, error) {
-	ret := _m.ctrl.Call(_m, "ReadBinary", ctx)
+// ReadBinary mocks base method.
+func (m *MockTProtocol) ReadBinary(arg0 context.Context) ([]byte, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadBinary", arg0)
 	ret0, _ := ret[0].([]byte)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadBinary(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadBinary", ctx)
+// ReadBinary indicates an expected call of ReadBinary.
+func (mr *MockTProtocolMockRecorder) ReadBinary(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadBinary", reflect.TypeOf((*MockTProtocol)(nil).ReadBinary), arg0)
 }
 
-func (_m *MockTProtocol) ReadBool(ctx context.Context) (bool, error) {
-	ret := _m.ctrl.Call(_m, "ReadBool", ctx)
+// ReadBool mocks base method.
+func (m *MockTProtocol) ReadBool(arg0 context.Context) (bool, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadBool", arg0)
 	ret0, _ := ret[0].(bool)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadBool(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadBool", ctx)
+// ReadBool indicates an expected call of ReadBool.
+func (mr *MockTProtocolMockRecorder) ReadBool(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadBool", reflect.TypeOf((*MockTProtocol)(nil).ReadBool), arg0)
 }
 
-func (_m *MockTProtocol) ReadByte(ctx context.Context) (int8, error) {
-	ret := _m.ctrl.Call(_m, "ReadByte", ctx)
+// ReadByte mocks base method.
+func (m *MockTProtocol) ReadByte(arg0 context.Context) (int8, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadByte", arg0)
 	ret0, _ := ret[0].(int8)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadByte(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadByte", ctx)
+// ReadByte indicates an expected call of ReadByte.
+func (mr *MockTProtocolMockRecorder) ReadByte(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadByte", reflect.TypeOf((*MockTProtocol)(nil).ReadByte), arg0)
 }
 
-func (_m *MockTProtocol) ReadDouble(ctx context.Context) (float64, error) {
-	ret := _m.ctrl.Call(_m, "ReadDouble", ctx)
+// ReadDouble mocks base method.
+func (m *MockTProtocol) ReadDouble(arg0 context.Context) (float64, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadDouble", arg0)
 	ret0, _ := ret[0].(float64)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadDouble(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadDouble", ctx)
+// ReadDouble indicates an expected call of ReadDouble.
+func (mr *MockTProtocolMockRecorder) ReadDouble(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadDouble", reflect.TypeOf((*MockTProtocol)(nil).ReadDouble), arg0)
 }
 
-func (_m *MockTProtocol) ReadFieldBegin(ctx context.Context) (string, thrift.TType, int16, error) {
-	ret := _m.ctrl.Call(_m, "ReadFieldBegin", ctx)
+// ReadFieldBegin mocks base method.
+func (m *MockTProtocol) ReadFieldBegin(arg0 context.Context) (string, thrift.TType, int16, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadFieldBegin", arg0)
 	ret0, _ := ret[0].(string)
 	ret1, _ := ret[1].(thrift.TType)
 	ret2, _ := ret[2].(int16)
@@ -113,77 +120,105 @@
 	return ret0, ret1, ret2, ret3
 }
 
-func (_mr *_MockTProtocolRecorder) ReadFieldBegin(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadFieldBegin", ctx)
+// ReadFieldBegin indicates an expected call of ReadFieldBegin.
+func (mr *MockTProtocolMockRecorder) ReadFieldBegin(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadFieldBegin", reflect.TypeOf((*MockTProtocol)(nil).ReadFieldBegin), arg0)
 }
 
-func (_m *MockTProtocol) ReadFieldEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "ReadFieldEnd", ctx)
+// ReadFieldEnd mocks base method.
+func (m *MockTProtocol) ReadFieldEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadFieldEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) ReadFieldEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadFieldEnd", ctx)
+// ReadFieldEnd indicates an expected call of ReadFieldEnd.
+func (mr *MockTProtocolMockRecorder) ReadFieldEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadFieldEnd", reflect.TypeOf((*MockTProtocol)(nil).ReadFieldEnd), arg0)
 }
 
-func (_m *MockTProtocol) ReadI16(ctx context.Context) (int16, error) {
-	ret := _m.ctrl.Call(_m, "ReadI16", ctx)
+// ReadI16 mocks base method.
+func (m *MockTProtocol) ReadI16(arg0 context.Context) (int16, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadI16", arg0)
 	ret0, _ := ret[0].(int16)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadI16(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI16", ctx)
+// ReadI16 indicates an expected call of ReadI16.
+func (mr *MockTProtocolMockRecorder) ReadI16(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadI16", reflect.TypeOf((*MockTProtocol)(nil).ReadI16), arg0)
 }
 
-func (_m *MockTProtocol) ReadI32(ctx context.Context) (int32, error) {
-	ret := _m.ctrl.Call(_m, "ReadI32", ctx)
+// ReadI32 mocks base method.
+func (m *MockTProtocol) ReadI32(arg0 context.Context) (int32, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadI32", arg0)
 	ret0, _ := ret[0].(int32)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadI32(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI32", ctx)
+// ReadI32 indicates an expected call of ReadI32.
+func (mr *MockTProtocolMockRecorder) ReadI32(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadI32", reflect.TypeOf((*MockTProtocol)(nil).ReadI32), arg0)
 }
 
-func (_m *MockTProtocol) ReadI64(ctx context.Context) (int64, error) {
-	ret := _m.ctrl.Call(_m, "ReadI64", ctx)
+// ReadI64 mocks base method.
+func (m *MockTProtocol) ReadI64(arg0 context.Context) (int64, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadI64", arg0)
 	ret0, _ := ret[0].(int64)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadI64(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadI64", ctx)
+// ReadI64 indicates an expected call of ReadI64.
+func (mr *MockTProtocolMockRecorder) ReadI64(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadI64", reflect.TypeOf((*MockTProtocol)(nil).ReadI64), arg0)
 }
 
-func (_m *MockTProtocol) ReadListBegin(ctx context.Context) (thrift.TType, int, error) {
-	ret := _m.ctrl.Call(_m, "ReadListBegin", ctx)
+// ReadListBegin mocks base method.
+func (m *MockTProtocol) ReadListBegin(arg0 context.Context) (thrift.TType, int, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadListBegin", arg0)
 	ret0, _ := ret[0].(thrift.TType)
 	ret1, _ := ret[1].(int)
 	ret2, _ := ret[2].(error)
 	return ret0, ret1, ret2
 }
 
-func (_mr *_MockTProtocolRecorder) ReadListBegin(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadListBegin", ctx)
+// ReadListBegin indicates an expected call of ReadListBegin.
+func (mr *MockTProtocolMockRecorder) ReadListBegin(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadListBegin", reflect.TypeOf((*MockTProtocol)(nil).ReadListBegin), arg0)
 }
 
-func (_m *MockTProtocol) ReadListEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "ReadListEnd", ctx)
+// ReadListEnd mocks base method.
+func (m *MockTProtocol) ReadListEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadListEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) ReadListEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadListEnd", ctx)
+// ReadListEnd indicates an expected call of ReadListEnd.
+func (mr *MockTProtocolMockRecorder) ReadListEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadListEnd", reflect.TypeOf((*MockTProtocol)(nil).ReadListEnd), arg0)
 }
 
-func (_m *MockTProtocol) ReadMapBegin(ctx context.Context) (thrift.TType, thrift.TType, int, error) {
-	ret := _m.ctrl.Call(_m, "ReadMapBegin", ctx)
+// ReadMapBegin mocks base method.
+func (m *MockTProtocol) ReadMapBegin(arg0 context.Context) (thrift.TType, thrift.TType, int, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadMapBegin", arg0)
 	ret0, _ := ret[0].(thrift.TType)
 	ret1, _ := ret[1].(thrift.TType)
 	ret2, _ := ret[2].(int)
@@ -191,22 +226,30 @@
 	return ret0, ret1, ret2, ret3
 }
 
-func (_mr *_MockTProtocolRecorder) ReadMapBegin(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMapBegin", ctx)
+// ReadMapBegin indicates an expected call of ReadMapBegin.
+func (mr *MockTProtocolMockRecorder) ReadMapBegin(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMapBegin", reflect.TypeOf((*MockTProtocol)(nil).ReadMapBegin), arg0)
 }
 
-func (_m *MockTProtocol) ReadMapEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "ReadMapEnd", ctx)
+// ReadMapEnd mocks base method.
+func (m *MockTProtocol) ReadMapEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadMapEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) ReadMapEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMapEnd", ctx)
+// ReadMapEnd indicates an expected call of ReadMapEnd.
+func (mr *MockTProtocolMockRecorder) ReadMapEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMapEnd", reflect.TypeOf((*MockTProtocol)(nil).ReadMapEnd), arg0)
 }
 
-func (_m *MockTProtocol) ReadMessageBegin(ctx context.Context) (string, thrift.TMessageType, int32, error) {
-	ret := _m.ctrl.Call(_m, "ReadMessageBegin", ctx)
+// ReadMessageBegin mocks base method.
+func (m *MockTProtocol) ReadMessageBegin(arg0 context.Context) (string, thrift.TMessageType, int32, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadMessageBegin", arg0)
 	ret0, _ := ret[0].(string)
 	ret1, _ := ret[1].(thrift.TMessageType)
 	ret2, _ := ret[2].(int32)
@@ -214,300 +257,447 @@
 	return ret0, ret1, ret2, ret3
 }
 
-func (_mr *_MockTProtocolRecorder) ReadMessageBegin(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMessageBegin", ctx)
+// ReadMessageBegin indicates an expected call of ReadMessageBegin.
+func (mr *MockTProtocolMockRecorder) ReadMessageBegin(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMessageBegin", reflect.TypeOf((*MockTProtocol)(nil).ReadMessageBegin), arg0)
 }
 
-func (_m *MockTProtocol) ReadMessageEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "ReadMessageEnd", ctx)
+// ReadMessageEnd mocks base method.
+func (m *MockTProtocol) ReadMessageEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadMessageEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) ReadMessageEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadMessageEnd", ctx)
+// ReadMessageEnd indicates an expected call of ReadMessageEnd.
+func (mr *MockTProtocolMockRecorder) ReadMessageEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMessageEnd", reflect.TypeOf((*MockTProtocol)(nil).ReadMessageEnd), arg0)
 }
 
-func (_m *MockTProtocol) ReadSetBegin(ctx context.Context) (thrift.TType, int, error) {
-	ret := _m.ctrl.Call(_m, "ReadSetBegin", ctx)
+// ReadSetBegin mocks base method.
+func (m *MockTProtocol) ReadSetBegin(arg0 context.Context) (thrift.TType, int, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadSetBegin", arg0)
 	ret0, _ := ret[0].(thrift.TType)
 	ret1, _ := ret[1].(int)
 	ret2, _ := ret[2].(error)
 	return ret0, ret1, ret2
 }
 
-func (_mr *_MockTProtocolRecorder) ReadSetBegin(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadSetBegin", ctx)
+// ReadSetBegin indicates an expected call of ReadSetBegin.
+func (mr *MockTProtocolMockRecorder) ReadSetBegin(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSetBegin", reflect.TypeOf((*MockTProtocol)(nil).ReadSetBegin), arg0)
 }
 
-func (_m *MockTProtocol) ReadSetEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "ReadSetEnd", ctx)
+// ReadSetEnd mocks base method.
+func (m *MockTProtocol) ReadSetEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadSetEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) ReadSetEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadSetEnd", ctx)
+// ReadSetEnd indicates an expected call of ReadSetEnd.
+func (mr *MockTProtocolMockRecorder) ReadSetEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadSetEnd", reflect.TypeOf((*MockTProtocol)(nil).ReadSetEnd), arg0)
 }
 
-func (_m *MockTProtocol) ReadString(ctx context.Context) (string, error) {
-	ret := _m.ctrl.Call(_m, "ReadString", ctx)
+// ReadString mocks base method.
+func (m *MockTProtocol) ReadString(arg0 context.Context) (string, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadString", arg0)
 	ret0, _ := ret[0].(string)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadString(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadString", ctx)
+// ReadString indicates an expected call of ReadString.
+func (mr *MockTProtocolMockRecorder) ReadString(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadString", reflect.TypeOf((*MockTProtocol)(nil).ReadString), arg0)
 }
 
-func (_m *MockTProtocol) ReadStructBegin(ctx context.Context) (string, error) {
-	ret := _m.ctrl.Call(_m, "ReadStructBegin", ctx)
+// ReadStructBegin mocks base method.
+func (m *MockTProtocol) ReadStructBegin(arg0 context.Context) (string, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadStructBegin", arg0)
 	ret0, _ := ret[0].(string)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-func (_mr *_MockTProtocolRecorder) ReadStructBegin(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadStructBegin", ctx)
+// ReadStructBegin indicates an expected call of ReadStructBegin.
+func (mr *MockTProtocolMockRecorder) ReadStructBegin(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadStructBegin", reflect.TypeOf((*MockTProtocol)(nil).ReadStructBegin), arg0)
 }
 
-func (_m *MockTProtocol) ReadStructEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "ReadStructEnd", ctx)
+// ReadStructEnd mocks base method.
+func (m *MockTProtocol) ReadStructEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadStructEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) ReadStructEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "ReadStructEnd", ctx)
+// ReadStructEnd indicates an expected call of ReadStructEnd.
+func (mr *MockTProtocolMockRecorder) ReadStructEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadStructEnd", reflect.TypeOf((*MockTProtocol)(nil).ReadStructEnd), arg0)
 }
 
-func (_m *MockTProtocol) Skip(ctx context.Context, _param0 thrift.TType) error {
-	ret := _m.ctrl.Call(_m, "Skip", ctx, _param0)
+// ReadUUID mocks base method.
+func (m *MockTProtocol) ReadUUID(arg0 context.Context) (thrift.Tuuid, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "ReadUUID", arg0)
+	ret0, _ := ret[0].(thrift.Tuuid)
+	ret1, _ := ret[1].(error)
+	return ret0, ret1
+}
+
+// ReadUUID indicates an expected call of ReadUUID.
+func (mr *MockTProtocolMockRecorder) ReadUUID(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadUUID", reflect.TypeOf((*MockTProtocol)(nil).ReadUUID), arg0)
+}
+
+// Skip mocks base method.
+func (m *MockTProtocol) Skip(arg0 context.Context, arg1 thrift.TType) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "Skip", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) Skip(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "Skip", ctx, arg0)
+// Skip indicates an expected call of Skip.
+func (mr *MockTProtocolMockRecorder) Skip(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Skip", reflect.TypeOf((*MockTProtocol)(nil).Skip), arg0, arg1)
 }
 
-func (_m *MockTProtocol) Transport() thrift.TTransport {
-	ret := _m.ctrl.Call(_m, "Transport")
+// Transport mocks base method.
+func (m *MockTProtocol) Transport() thrift.TTransport {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "Transport")
 	ret0, _ := ret[0].(thrift.TTransport)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) Transport() *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "Transport")
+// Transport indicates an expected call of Transport.
+func (mr *MockTProtocolMockRecorder) Transport() *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Transport", reflect.TypeOf((*MockTProtocol)(nil).Transport))
 }
 
-func (_m *MockTProtocol) WriteBinary(ctx context.Context, _param0 []byte) error {
-	ret := _m.ctrl.Call(_m, "WriteBinary", ctx, _param0)
+// WriteBinary mocks base method.
+func (m *MockTProtocol) WriteBinary(arg0 context.Context, arg1 []byte) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteBinary", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteBinary(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteBinary", ctx, arg0)
+// WriteBinary indicates an expected call of WriteBinary.
+func (mr *MockTProtocolMockRecorder) WriteBinary(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteBinary", reflect.TypeOf((*MockTProtocol)(nil).WriteBinary), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteBool(ctx context.Context, _param0 bool) error {
-	ret := _m.ctrl.Call(_m, "WriteBool", ctx, _param0)
+// WriteBool mocks base method.
+func (m *MockTProtocol) WriteBool(arg0 context.Context, arg1 bool) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteBool", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteBool(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteBool", ctx, arg0)
+// WriteBool indicates an expected call of WriteBool.
+func (mr *MockTProtocolMockRecorder) WriteBool(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteBool", reflect.TypeOf((*MockTProtocol)(nil).WriteBool), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteByte(ctx context.Context, _param0 int8) error {
-	ret := _m.ctrl.Call(_m, "WriteByte", ctx, _param0)
+// WriteByte mocks base method.
+func (m *MockTProtocol) WriteByte(arg0 context.Context, arg1 int8) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteByte", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteByte(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteByte", ctx, arg0)
+// WriteByte indicates an expected call of WriteByte.
+func (mr *MockTProtocolMockRecorder) WriteByte(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteByte", reflect.TypeOf((*MockTProtocol)(nil).WriteByte), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteDouble(ctx context.Context, _param0 float64) error {
-	ret := _m.ctrl.Call(_m, "WriteDouble", ctx, _param0)
+// WriteDouble mocks base method.
+func (m *MockTProtocol) WriteDouble(arg0 context.Context, arg1 float64) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteDouble", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteDouble(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteDouble", ctx, arg0)
+// WriteDouble indicates an expected call of WriteDouble.
+func (mr *MockTProtocolMockRecorder) WriteDouble(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteDouble", reflect.TypeOf((*MockTProtocol)(nil).WriteDouble), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteFieldBegin(ctx context.Context, _param0 string, _param1 thrift.TType, _param2 int16) error {
-	ret := _m.ctrl.Call(_m, "WriteFieldBegin", ctx, _param0, _param1, _param2)
+// WriteFieldBegin mocks base method.
+func (m *MockTProtocol) WriteFieldBegin(arg0 context.Context, arg1 string, arg2 thrift.TType, arg3 int16) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteFieldBegin", arg0, arg1, arg2, arg3)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteFieldBegin(ctx context.Context, arg0, arg1, arg2 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldBegin", ctx, arg0, arg1, arg2)
+// WriteFieldBegin indicates an expected call of WriteFieldBegin.
+func (mr *MockTProtocolMockRecorder) WriteFieldBegin(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFieldBegin", reflect.TypeOf((*MockTProtocol)(nil).WriteFieldBegin), arg0, arg1, arg2, arg3)
 }
 
-func (_m *MockTProtocol) WriteFieldEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "WriteFieldEnd", ctx)
+// WriteFieldEnd mocks base method.
+func (m *MockTProtocol) WriteFieldEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteFieldEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteFieldEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldEnd", ctx)
+// WriteFieldEnd indicates an expected call of WriteFieldEnd.
+func (mr *MockTProtocolMockRecorder) WriteFieldEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFieldEnd", reflect.TypeOf((*MockTProtocol)(nil).WriteFieldEnd), arg0)
 }
 
-func (_m *MockTProtocol) WriteFieldStop(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "WriteFieldStop", ctx)
+// WriteFieldStop mocks base method.
+func (m *MockTProtocol) WriteFieldStop(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteFieldStop", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteFieldStop(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteFieldStop", ctx)
+// WriteFieldStop indicates an expected call of WriteFieldStop.
+func (mr *MockTProtocolMockRecorder) WriteFieldStop(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFieldStop", reflect.TypeOf((*MockTProtocol)(nil).WriteFieldStop), arg0)
 }
 
-func (_m *MockTProtocol) WriteI16(ctx context.Context, _param0 int16) error {
-	ret := _m.ctrl.Call(_m, "WriteI16", ctx, _param0)
+// WriteI16 mocks base method.
+func (m *MockTProtocol) WriteI16(arg0 context.Context, arg1 int16) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteI16", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteI16(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI16", ctx, arg0)
+// WriteI16 indicates an expected call of WriteI16.
+func (mr *MockTProtocolMockRecorder) WriteI16(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteI16", reflect.TypeOf((*MockTProtocol)(nil).WriteI16), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteI32(ctx context.Context, _param0 int32) error {
-	ret := _m.ctrl.Call(_m, "WriteI32", ctx, _param0)
+// WriteI32 mocks base method.
+func (m *MockTProtocol) WriteI32(arg0 context.Context, arg1 int32) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteI32", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteI32(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI32", ctx, arg0)
+// WriteI32 indicates an expected call of WriteI32.
+func (mr *MockTProtocolMockRecorder) WriteI32(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteI32", reflect.TypeOf((*MockTProtocol)(nil).WriteI32), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteI64(ctx context.Context, _param0 int64) error {
-	ret := _m.ctrl.Call(_m, "WriteI64", ctx, _param0)
+// WriteI64 mocks base method.
+func (m *MockTProtocol) WriteI64(arg0 context.Context, arg1 int64) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteI64", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteI64(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteI64", ctx, arg0)
+// WriteI64 indicates an expected call of WriteI64.
+func (mr *MockTProtocolMockRecorder) WriteI64(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteI64", reflect.TypeOf((*MockTProtocol)(nil).WriteI64), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteListBegin(ctx context.Context, _param0 thrift.TType, _param1 int) error {
-	ret := _m.ctrl.Call(_m, "WriteListBegin", ctx, _param0, _param1)
+// WriteListBegin mocks base method.
+func (m *MockTProtocol) WriteListBegin(arg0 context.Context, arg1 thrift.TType, arg2 int) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteListBegin", arg0, arg1, arg2)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteListBegin(ctx context.Context, arg0, arg1 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteListBegin", ctx, arg0, arg1)
+// WriteListBegin indicates an expected call of WriteListBegin.
+func (mr *MockTProtocolMockRecorder) WriteListBegin(arg0, arg1, arg2 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteListBegin", reflect.TypeOf((*MockTProtocol)(nil).WriteListBegin), arg0, arg1, arg2)
 }
 
-func (_m *MockTProtocol) WriteListEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "WriteListEnd", ctx)
+// WriteListEnd mocks base method.
+func (m *MockTProtocol) WriteListEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteListEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteListEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteListEnd", ctx)
+// WriteListEnd indicates an expected call of WriteListEnd.
+func (mr *MockTProtocolMockRecorder) WriteListEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteListEnd", reflect.TypeOf((*MockTProtocol)(nil).WriteListEnd), arg0)
 }
 
-func (_m *MockTProtocol) WriteMapBegin(ctx context.Context, _param0 thrift.TType, _param1 thrift.TType, _param2 int) error {
-	ret := _m.ctrl.Call(_m, "WriteMapBegin", ctx, _param0, _param1, _param2)
+// WriteMapBegin mocks base method.
+func (m *MockTProtocol) WriteMapBegin(arg0 context.Context, arg1, arg2 thrift.TType, arg3 int) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteMapBegin", arg0, arg1, arg2, arg3)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteMapBegin(ctx context.Context, arg0, arg1, arg2 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMapBegin", ctx, arg0, arg1, arg2)
+// WriteMapBegin indicates an expected call of WriteMapBegin.
+func (mr *MockTProtocolMockRecorder) WriteMapBegin(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteMapBegin", reflect.TypeOf((*MockTProtocol)(nil).WriteMapBegin), arg0, arg1, arg2, arg3)
 }
 
-func (_m *MockTProtocol) WriteMapEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "WriteMapEnd", ctx)
+// WriteMapEnd mocks base method.
+func (m *MockTProtocol) WriteMapEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteMapEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteMapEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMapEnd", ctx)
+// WriteMapEnd indicates an expected call of WriteMapEnd.
+func (mr *MockTProtocolMockRecorder) WriteMapEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteMapEnd", reflect.TypeOf((*MockTProtocol)(nil).WriteMapEnd), arg0)
 }
 
-func (_m *MockTProtocol) WriteMessageBegin(ctx context.Context, _param0 string, _param1 thrift.TMessageType, _param2 int32) error {
-	ret := _m.ctrl.Call(_m, "WriteMessageBegin", ctx, _param0, _param1, _param2)
+// WriteMessageBegin mocks base method.
+func (m *MockTProtocol) WriteMessageBegin(arg0 context.Context, arg1 string, arg2 thrift.TMessageType, arg3 int32) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteMessageBegin", arg0, arg1, arg2, arg3)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteMessageBegin(ctx context.Context, arg0, arg1, arg2 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMessageBegin", ctx, arg0, arg1, arg2)
+// WriteMessageBegin indicates an expected call of WriteMessageBegin.
+func (mr *MockTProtocolMockRecorder) WriteMessageBegin(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteMessageBegin", reflect.TypeOf((*MockTProtocol)(nil).WriteMessageBegin), arg0, arg1, arg2, arg3)
 }
 
-func (_m *MockTProtocol) WriteMessageEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "WriteMessageEnd", ctx)
+// WriteMessageEnd mocks base method.
+func (m *MockTProtocol) WriteMessageEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteMessageEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteMessageEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteMessageEnd", ctx)
+// WriteMessageEnd indicates an expected call of WriteMessageEnd.
+func (mr *MockTProtocolMockRecorder) WriteMessageEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteMessageEnd", reflect.TypeOf((*MockTProtocol)(nil).WriteMessageEnd), arg0)
 }
 
-func (_m *MockTProtocol) WriteSetBegin(ctx context.Context, _param0 thrift.TType, _param1 int) error {
-	ret := _m.ctrl.Call(_m, "WriteSetBegin", ctx, _param0, _param1)
+// WriteSetBegin mocks base method.
+func (m *MockTProtocol) WriteSetBegin(arg0 context.Context, arg1 thrift.TType, arg2 int) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteSetBegin", arg0, arg1, arg2)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteSetBegin(ctx context.Context, arg0, arg1 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteSetBegin", ctx, arg0, arg1)
+// WriteSetBegin indicates an expected call of WriteSetBegin.
+func (mr *MockTProtocolMockRecorder) WriteSetBegin(arg0, arg1, arg2 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteSetBegin", reflect.TypeOf((*MockTProtocol)(nil).WriteSetBegin), arg0, arg1, arg2)
 }
 
-func (_m *MockTProtocol) WriteSetEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "WriteSetEnd", ctx)
+// WriteSetEnd mocks base method.
+func (m *MockTProtocol) WriteSetEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteSetEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteSetEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteSetEnd", ctx)
+// WriteSetEnd indicates an expected call of WriteSetEnd.
+func (mr *MockTProtocolMockRecorder) WriteSetEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteSetEnd", reflect.TypeOf((*MockTProtocol)(nil).WriteSetEnd), arg0)
 }
 
-func (_m *MockTProtocol) WriteString(ctx context.Context, _param0 string) error {
-	ret := _m.ctrl.Call(_m, "WriteString", ctx, _param0)
+// WriteString mocks base method.
+func (m *MockTProtocol) WriteString(arg0 context.Context, arg1 string) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteString", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteString(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteString", ctx, arg0)
+// WriteString indicates an expected call of WriteString.
+func (mr *MockTProtocolMockRecorder) WriteString(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteString", reflect.TypeOf((*MockTProtocol)(nil).WriteString), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteStructBegin(ctx context.Context, _param0 string) error {
-	ret := _m.ctrl.Call(_m, "WriteStructBegin", ctx, _param0)
+// WriteStructBegin mocks base method.
+func (m *MockTProtocol) WriteStructBegin(arg0 context.Context, arg1 string) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteStructBegin", arg0, arg1)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteStructBegin(ctx context.Context, arg0 interface{}) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteStructBegin", ctx, arg0)
+// WriteStructBegin indicates an expected call of WriteStructBegin.
+func (mr *MockTProtocolMockRecorder) WriteStructBegin(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteStructBegin", reflect.TypeOf((*MockTProtocol)(nil).WriteStructBegin), arg0, arg1)
 }
 
-func (_m *MockTProtocol) WriteStructEnd(ctx context.Context) error {
-	ret := _m.ctrl.Call(_m, "WriteStructEnd", ctx)
+// WriteStructEnd mocks base method.
+func (m *MockTProtocol) WriteStructEnd(arg0 context.Context) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteStructEnd", arg0)
 	ret0, _ := ret[0].(error)
 	return ret0
 }
 
-func (_mr *_MockTProtocolRecorder) WriteStructEnd(ctx context.Context) *gomock.Call {
-	return _mr.mock.ctrl.RecordCall(_mr.mock, "WriteStructEnd", ctx)
+// WriteStructEnd indicates an expected call of WriteStructEnd.
+func (mr *MockTProtocolMockRecorder) WriteStructEnd(arg0 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteStructEnd", reflect.TypeOf((*MockTProtocol)(nil).WriteStructEnd), arg0)
+}
+
+// WriteUUID mocks base method.
+func (m *MockTProtocol) WriteUUID(arg0 context.Context, arg1 thrift.Tuuid) error {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "WriteUUID", arg0, arg1)
+	ret0, _ := ret[0].(error)
+	return ret0
+}
+
+// WriteUUID indicates an expected call of WriteUUID.
+func (mr *MockTProtocolMockRecorder) WriteUUID(arg0, arg1 interface{}) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteUUID", reflect.TypeOf((*MockTProtocol)(nil).WriteUUID), arg0, arg1)
 }
diff --git a/lib/go/thrift/binary_protocol.go b/lib/go/thrift/binary_protocol.go
index c6fae0f..eded931 100644
--- a/lib/go/thrift/binary_protocol.go
+++ b/lib/go/thrift/binary_protocol.go
@@ -260,6 +260,11 @@
 	return NewTProtocolException(err)
 }
 
+func (p *TBinaryProtocol) WriteUUID(ctx context.Context, value Tuuid) error {
+	_, err := p.trans.Write(value[:])
+	return NewTProtocolException(err)
+}
+
 /**
  * Reading methods
  */
@@ -488,6 +493,15 @@
 	return buf, NewTProtocolException(err)
 }
 
+func (p *TBinaryProtocol) ReadUUID(ctx context.Context) (value Tuuid, err error) {
+	buf := p.buffer[0:16]
+	err = p.readAll(ctx, buf)
+	if err == nil {
+		copy(value[:], buf)
+	}
+	return value, err
+}
+
 func (p *TBinaryProtocol) Flush(ctx context.Context) (err error) {
 	return NewTProtocolException(p.trans.Flush(ctx))
 }
diff --git a/lib/go/thrift/compact_protocol.go b/lib/go/thrift/compact_protocol.go
index dc86fe6..18915fe 100644
--- a/lib/go/thrift/compact_protocol.go
+++ b/lib/go/thrift/compact_protocol.go
@@ -52,6 +52,7 @@
 	COMPACT_SET           = 0x0A
 	COMPACT_MAP           = 0x0B
 	COMPACT_STRUCT        = 0x0C
+	COMPACT_UUID          = 0x0D
 )
 
 var (
@@ -72,6 +73,7 @@
 		SET:    COMPACT_SET,
 		MAP:    COMPACT_MAP,
 		STRUCT: COMPACT_STRUCT,
+		UUID:   COMPACT_UUID,
 	}
 }
 
@@ -354,6 +356,12 @@
 	return nil
 }
 
+// Write a Tuuid to the wire as 16 bytes.
+func (p *TCompactProtocol) WriteUUID(ctx context.Context, value Tuuid) error {
+	_, err := p.trans.Write(value[:])
+	return NewTProtocolException(err)
+}
+
 //
 // Reading methods.
 //
@@ -639,6 +647,16 @@
 	return buf, NewTProtocolException(e)
 }
 
+// Read fixed 16 bytes as UUID.
+func (p *TCompactProtocol) ReadUUID(ctx context.Context) (value Tuuid, err error) {
+	buf := p.buffer[0:16]
+	_, e := io.ReadFull(p.trans, buf)
+	if e == nil {
+		copy(value[:], buf)
+	}
+	return value, NewTProtocolException(e)
+}
+
 func (p *TCompactProtocol) Flush(ctx context.Context) (err error) {
 	return NewTProtocolException(p.trans.Flush(ctx))
 }
@@ -825,6 +843,8 @@
 		return MAP, nil
 	case COMPACT_STRUCT:
 		return STRUCT, nil
+	case COMPACT_UUID:
+		return UUID, nil
 	}
 	return STOP, NewTProtocolException(fmt.Errorf("don't know what type: %v", t&0x0f))
 }
diff --git a/lib/go/thrift/debug_protocol.go b/lib/go/thrift/debug_protocol.go
index c1f4fab..83ccad9 100644
--- a/lib/go/thrift/debug_protocol.go
+++ b/lib/go/thrift/debug_protocol.go
@@ -258,6 +258,14 @@
 	}
 	return err
 }
+func (tdp *TDebugProtocol) WriteUUID(ctx context.Context, value Tuuid) error {
+	err := tdp.Delegate.WriteUUID(ctx, value)
+	tdp.logf("%sWriteUUID(value=%#v) => %#v", tdp.LogPrefix, value, err)
+	if tdp.DuplicateTo != nil {
+		tdp.DuplicateTo.WriteUUID(ctx, value)
+	}
+	return err
+}
 
 func (tdp *TDebugProtocol) ReadMessageBegin(ctx context.Context) (name string, typeId TMessageType, seqid int32, err error) {
 	name, typeId, seqid, err = tdp.Delegate.ReadMessageBegin(ctx)
@@ -419,6 +427,14 @@
 	}
 	return
 }
+func (tdp *TDebugProtocol) ReadUUID(ctx context.Context) (value Tuuid, err error) {
+	value, err = tdp.Delegate.ReadUUID(ctx)
+	tdp.logf("%sReadUUID() (value=%#v, err=%#v)", tdp.LogPrefix, value, err)
+	if tdp.DuplicateTo != nil {
+		tdp.DuplicateTo.WriteUUID(ctx, value)
+	}
+	return
+}
 func (tdp *TDebugProtocol) Skip(ctx context.Context, fieldType TType) (err error) {
 	err = tdp.Delegate.Skip(ctx, fieldType)
 	tdp.logf("%sSkip(fieldType=%#v) (err=%#v)", tdp.LogPrefix, fieldType, err)
diff --git a/lib/go/thrift/duplicate_protocol.go b/lib/go/thrift/duplicate_protocol.go
index c23d548..6413909 100644
--- a/lib/go/thrift/duplicate_protocol.go
+++ b/lib/go/thrift/duplicate_protocol.go
@@ -166,6 +166,12 @@
 	return err
 }
 
+func (tdtp *TDuplicateToProtocol) WriteUUID(ctx context.Context, value Tuuid) error {
+	err := tdtp.Delegate.WriteUUID(ctx, value)
+	tdtp.DuplicateTo.WriteUUID(ctx, value)
+	return err
+}
+
 func (tdtp *TDuplicateToProtocol) ReadMessageBegin(ctx context.Context) (name string, typeId TMessageType, seqid int32, err error) {
 	name, typeId, seqid, err = tdtp.Delegate.ReadMessageBegin(ctx)
 	tdtp.DuplicateTo.WriteMessageBegin(ctx, name, typeId, seqid)
@@ -286,6 +292,12 @@
 	return
 }
 
+func (tdtp *TDuplicateToProtocol) ReadUUID(ctx context.Context) (value Tuuid, err error) {
+	value, err = tdtp.Delegate.ReadUUID(ctx)
+	tdtp.DuplicateTo.WriteUUID(ctx, value)
+	return
+}
+
 func (tdtp *TDuplicateToProtocol) Skip(ctx context.Context, fieldType TType) (err error) {
 	err = tdtp.Delegate.Skip(ctx, fieldType)
 	tdtp.DuplicateTo.Skip(ctx, fieldType)
diff --git a/lib/go/thrift/header_protocol.go b/lib/go/thrift/header_protocol.go
index 878041f..36777b4 100644
--- a/lib/go/thrift/header_protocol.go
+++ b/lib/go/thrift/header_protocol.go
@@ -221,6 +221,10 @@
 	return p.protocol.WriteBinary(ctx, value)
 }
 
+func (p *THeaderProtocol) WriteUUID(ctx context.Context, value Tuuid) error {
+	return p.protocol.WriteUUID(ctx, value)
+}
+
 // ReadFrame calls underlying THeaderTransport's ReadFrame function.
 func (p *THeaderProtocol) ReadFrame(ctx context.Context) error {
 	return p.transport.ReadFrame(ctx)
@@ -334,6 +338,10 @@
 	return p.protocol.ReadBinary(ctx)
 }
 
+func (p *THeaderProtocol) ReadUUID(ctx context.Context) (value Tuuid, err error) {
+	return p.protocol.ReadUUID(ctx)
+}
+
 func (p *THeaderProtocol) Skip(ctx context.Context, fieldType TType) error {
 	return p.protocol.Skip(ctx, fieldType)
 }
diff --git a/lib/go/thrift/json_protocol.go b/lib/go/thrift/json_protocol.go
index d248ecf..8b1bb52 100644
--- a/lib/go/thrift/json_protocol.go
+++ b/lib/go/thrift/json_protocol.go
@@ -33,7 +33,6 @@
 
 // JSON protocol implementation for thrift.
 // Utilizes Simple JSON protocol
-//
 type TJSONProtocol struct {
 	*TSimpleJSONProtocol
 }
diff --git a/lib/go/thrift/pointerize.go b/lib/go/thrift/pointerize.go
index e200c68..1eddfa7 100644
--- a/lib/go/thrift/pointerize.go
+++ b/lib/go/thrift/pointerize.go
@@ -56,3 +56,4 @@
 func Uint64Ptr(v uint64) *uint64    { return &v }
 func BoolPtr(v bool) *bool          { return &v }
 func ByteSlicePtr(v []byte) *[]byte { return &v }
+func TuuidPtr(v Tuuid) *Tuuid       { return &v }
diff --git a/lib/go/thrift/protocol.go b/lib/go/thrift/protocol.go
index 647c0bd..2ee14ca 100644
--- a/lib/go/thrift/protocol.go
+++ b/lib/go/thrift/protocol.go
@@ -52,6 +52,7 @@
 	WriteDouble(ctx context.Context, value float64) error
 	WriteString(ctx context.Context, value string) error
 	WriteBinary(ctx context.Context, value []byte) error
+	WriteUUID(ctx context.Context, value Tuuid) error
 
 	ReadMessageBegin(ctx context.Context) (name string, typeId TMessageType, seqid int32, err error)
 	ReadMessageEnd(ctx context.Context) error
@@ -73,6 +74,7 @@
 	ReadDouble(ctx context.Context) (value float64, err error)
 	ReadString(ctx context.Context) (value string, err error)
 	ReadBinary(ctx context.Context) (value []byte, err error)
+	ReadUUID(ctx context.Context) (value Tuuid, err error)
 
 	Skip(ctx context.Context, fieldType TType) (err error)
 	Flush(ctx context.Context) (err error)
@@ -117,6 +119,9 @@
 	case STRING:
 		_, err = self.ReadString(ctx)
 		return
+	case UUID:
+		_, err = self.ReadUUID(ctx)
+		return
 	case STRUCT:
 		if _, err = self.ReadStructBegin(ctx); err != nil {
 			return err
diff --git a/lib/go/thrift/protocol_test.go b/lib/go/thrift/protocol_test.go
index d66dc65..1093c94 100644
--- a/lib/go/thrift/protocol_test.go
+++ b/lib/go/thrift/protocol_test.go
@@ -40,6 +40,7 @@
 	INT64_VALUES   []int64
 	DOUBLE_VALUES  []float64
 	STRING_VALUES  []string
+	UUID_VALUES    []Tuuid
 )
 
 func init() {
@@ -54,6 +55,13 @@
 	INT64_VALUES = []int64{459, 0, 1, -1, -128, 127, 32767, 2147483647, -2147483535, 34359738481, -35184372088719, -9223372036854775808, 9223372036854775807}
 	DOUBLE_VALUES = []float64{459.3, 0.0, -1.0, 1.0, 0.5, 0.3333, 3.14159, 1.537e-38, 1.673e25, 6.02214179e23, -6.02214179e23, INFINITY.Float64(), NEGATIVE_INFINITY.Float64(), NAN.Float64()}
 	STRING_VALUES = []string{"", "a", "st[uf]f", "st,u:ff with spaces", "stuff\twith\nescape\\characters'...\"lots{of}fun</xml>"}
+	UUID_VALUES = []Tuuid{
+		{},
+		Must(ParseTuuid("6ba7b810-9dad-11d1-80b4-00c04fd430c8")),
+		Must(ParseTuuid("6ba7b811-9dad-11d1-80b4-00c04fd430c8")),
+		Must(ParseTuuid("6ba7b812-9dad-11d1-80b4-00c04fd430c8")),
+		Must(ParseTuuid("6ba7b814-9dad-11d1-80b4-00c04fd430c8")),
+	}
 }
 
 type HTTPEchoServer struct{}
@@ -211,10 +219,21 @@
 			continue
 		}
 		p := protocolFactory.GetProtocol(trans)
+		ReadWriteUUID(t, p, trans)
+		trans.Close()
+	}
+	for _, tf := range transports {
+		trans, err := tf.GetTransport(nil)
+		if err != nil {
+			t.Error(err)
+			continue
+		}
+		p := protocolFactory.GetProtocol(trans)
 		ReadWriteI64(t, p, trans)
 		ReadWriteDouble(t, p, trans)
 		ReadWriteBinary(t, p, trans)
 		ReadWriteByte(t, p, trans)
+		ReadWriteUUID(t, p, trans)
 		trans.Close()
 	}
 
@@ -520,6 +539,43 @@
 	}
 }
 
+func ReadWriteUUID(t testing.TB, p TProtocol, trans TTransport) {
+	ctx := context.Background()
+	thetype := TType(UUID)
+	thelen := len(UUID_VALUES)
+	p.WriteListBegin(ctx, thetype, thelen)
+	for _, v := range UUID_VALUES {
+		p.WriteUUID(ctx, v)
+	}
+	p.WriteListEnd(ctx)
+	p.Flush(ctx)
+	thetype2, thelen2, err := p.ReadListBegin(ctx)
+	if err != nil {
+		t.Errorf("%s: %T %T %q Error reading list: %q", "ReadWriteUUID", p, trans, err, STRING_VALUES)
+	}
+	_, ok := p.(*TSimpleJSONProtocol)
+	if !ok {
+		if thetype != thetype2 {
+			t.Errorf("%s: %T %T type %s != type %s", "ReadWriteUUID", p, trans, thetype, thetype2)
+		}
+		if thelen != thelen2 {
+			t.Errorf("%s: %T %T len %v != len %v", "ReadWriteUUID", p, trans, thelen, thelen2)
+		}
+	}
+	for k, v := range UUID_VALUES {
+		value, err := p.ReadUUID(ctx)
+		if err != nil {
+			t.Errorf("%s: %T %T %q Error reading UUID at index %d: %q", "ReadWriteUUID", p, trans, err, k, v)
+		}
+		if v != value {
+			t.Errorf("%s: %T %T %v != %v", "ReadWriteUUID", p, trans, v, value)
+		}
+	}
+	if err != nil {
+		t.Errorf("%s: %T %T Unable to read list end: %q", "ReadWriteUUID", p, trans, err)
+	}
+}
+
 func UnmatchedBeginEndProtocolTest(t *testing.T, protocolFactory TProtocolFactory) {
 	// NOTE: not all protocol implementations do strict state check to
 	// return an error on unmatched Begin/End calls.
diff --git a/lib/go/thrift/simple_json_protocol.go b/lib/go/thrift/simple_json_protocol.go
index 5cefb60..8b1284f 100644
--- a/lib/go/thrift/simple_json_protocol.go
+++ b/lib/go/thrift/simple_json_protocol.go
@@ -93,7 +93,6 @@
 // This protocol produces/consumes a simple output format
 // suitable for parsing by scripting languages.  It should not be
 // confused with the full-featured TJSONProtocol.
-//
 type TSimpleJSONProtocol struct {
 	trans TTransport
 
@@ -341,6 +340,10 @@
 	return p.OutputPostValue()
 }
 
+func (p *TSimpleJSONProtocol) WriteUUID(ctx context.Context, v Tuuid) error {
+	return p.OutputString(v.String())
+}
+
 // Reading methods.
 func (p *TSimpleJSONProtocol) ReadMessageBegin(ctx context.Context) (name string, typeId TMessageType, seqId int32, err error) {
 	p.resetContextStack() // THRIFT-3735
@@ -595,6 +598,16 @@
 	return v, p.ParsePostValue()
 }
 
+func (p *TSimpleJSONProtocol) ReadUUID(ctx context.Context) (v Tuuid, err error) {
+	var s string
+	s, err = p.ReadString(ctx)
+	if err != nil {
+		return v, err
+	}
+	v, err = ParseTuuid(s)
+	return v, NewTProtocolExceptionWithType(INVALID_DATA, err)
+}
+
 func (p *TSimpleJSONProtocol) Flush(ctx context.Context) (err error) {
 	return NewTProtocolException(p.writer.Flush())
 }
diff --git a/lib/go/thrift/type.go b/lib/go/thrift/type.go
index 4292ffc..687557e 100644
--- a/lib/go/thrift/type.go
+++ b/lib/go/thrift/type.go
@@ -38,9 +38,7 @@
 	MAP    = 13
 	SET    = 14
 	LIST   = 15
-	UTF8   = 16
-	UTF16  = 17
-	//BINARY = 18   wrong and unusued
+	UUID   = 16
 )
 
 var typeNames = map[int]string{
@@ -57,8 +55,7 @@
 	MAP:    "MAP",
 	SET:    "SET",
 	LIST:   "LIST",
-	UTF8:   "UTF8",
-	UTF16:  "UTF16",
+	UUID:   "UUID",
 }
 
 func (p TType) String() string {
diff --git a/lib/go/thrift/uuid.go b/lib/go/thrift/uuid.go
new file mode 100644
index 0000000..ab47331
--- /dev/null
+++ b/lib/go/thrift/uuid.go
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package thrift
+
+import (
+	"encoding/hex"
+	"fmt"
+)
+
+// Tuuid is a minimal implementation of UUID for thrift's read/write operations.
+//
+// This implementation only covers read/write in various thrift protocols.
+// If you need to generate/manipulate/etc. an UUID,
+// you likely would need a third party UUID library instead.
+//
+// This type should be directly cast-able with most popular third party UUID
+// libraries.
+// For example, assuming you are using
+// https://pkg.go.dev/github.com/google/uuid to generate a v4 UUID for an
+// optional thrift field:
+//
+//	id, err := uuid.NewRandom()
+//	if err != nil {
+//	  // TODO: handle errors
+//	}
+//	myRequest.Uuid = thrift.Pointer(thrift.Tuuid(id))
+type Tuuid [16]byte
+
+// String generates the canonical form string for an Tuuid.
+//
+// This string is suitable for writing with TJSONProtocol.
+func (u Tuuid) String() string {
+	var buf [36]byte
+	hex.Encode(buf[0:], u[:4])
+	buf[8] = '-'
+	hex.Encode(buf[9:], u[4:6])
+	buf[13] = '-'
+	hex.Encode(buf[14:], u[6:8])
+	buf[18] = '-'
+	hex.Encode(buf[19:], u[8:10])
+	buf[23] = '-'
+	hex.Encode(buf[24:], u[10:])
+	return string(buf[:])
+}
+
+func hexToDec(b byte) (byte, bool) {
+	switch {
+	case b >= '0' && b <= '9':
+		return b - '0', true
+	case b >= 'a' && b <= 'f':
+		return b - 'a' + 10, true
+	case b >= 'A' && b <= 'F':
+		return b - 'A' + 10, true
+	default:
+		return 0, false
+	}
+}
+
+func hexToByte(b1, b2 byte) (b byte, ok bool) {
+	b1, ok = hexToDec(b1)
+	if !ok {
+		return 0, ok
+	}
+	b2, ok = hexToDec(b2)
+	if !ok {
+		return 0, ok
+	}
+	return b1<<4 + b2, true
+}
+
+// ParseTuuid parses a canonical form UUID string into Tuuid.
+//
+// Note that this function only supports case insensitive canonical form
+// (8-4-4-4-12/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx),
+// and rejects any other forms.
+// For a more flexible UUID string parser,
+// please use third party UUID libraries.
+//
+// This function is suitable for reading with TJSONProtocol.
+func ParseTuuid(s string) (u Tuuid, err error) {
+	if len(s) != 36 || s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
+		return u, fmt.Errorf("malformed Tuuid string: %q", s)
+	}
+	var ok bool
+	for i, j := range []int{
+		0, 2, 4, 6,
+		9, 11,
+		14, 16,
+		19, 21,
+		24, 26, 28, 30, 32, 34,
+	} {
+		u[i], ok = hexToByte(s[j], s[j+1])
+		if !ok {
+			return u, fmt.Errorf("malformed Tuuid string: %q", s)
+		}
+	}
+	return u, nil
+}
+
+// Must is a sugar to be used in places that error handling is impossible (for
+// example, global variable declarations) and also errors are not in general
+// expected.
+//
+// This is an example to use Must with ParseTuuid to declare a global special
+// uuid:
+//
+//	var NameSpaceDNSUUID = thrift.Must(thrift.ParseTuuid("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
+func Must[T any](v T, err error) T {
+	if err != nil {
+		panic(err)
+	}
+	return v
+}
diff --git a/lib/go/thrift/uuid_test.go b/lib/go/thrift/uuid_test.go
new file mode 100644
index 0000000..450400c
--- /dev/null
+++ b/lib/go/thrift/uuid_test.go
@@ -0,0 +1,290 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package thrift
+
+import (
+	"fmt"
+	"testing"
+	"testing/quick"
+)
+
+func TestHexToByte(t *testing.T) {
+	for _, c := range []struct {
+		s    string
+		b    byte
+		fail bool
+	}{
+		{
+			s: "ff",
+			b: 0xff,
+		},
+		{
+			s: "FF",
+			b: 0xff,
+		},
+		{
+			s: "00",
+			b: 0,
+		},
+		{
+			s: "77",
+			b: 0x77,
+		},
+		{
+			s: "aC",
+			b: 0xac,
+		},
+		{
+			s:    "xx",
+			fail: true,
+		},
+		{
+			s:    "x0",
+			fail: true,
+		},
+		{
+			s:    "fx",
+			fail: true,
+		},
+	} {
+		t.Run(c.s, func(t *testing.T) {
+			b, ok := hexToByte(c.s[0], c.s[1])
+			if ok != !c.fail {
+				t.Errorf("Want failure, got %x, %v", b, ok)
+			}
+			if !c.fail && b != c.b {
+				t.Errorf("Want %x, got %x", c.b, b)
+			}
+		})
+	}
+}
+
+func TestUUIDString(t *testing.T) {
+	for _, c := range []struct {
+		uuid Tuuid
+		want string
+	}{
+		{
+			uuid: Tuuid{},
+			want: "00000000-0000-0000-0000-000000000000",
+		},
+		{
+			uuid: Tuuid{
+				0x6b, 0xa7, 0xb8, 0x10,
+				0x9d, 0xad,
+				0x11, 0xd1,
+				0x80, 0xb4,
+				0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8,
+			},
+			want: "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
+		},
+		{
+			uuid: Tuuid{
+				0x6b, 0xa7, 0xB8, 0x11,
+				0x9d, 0xAd,
+				0x11, 0xd1,
+				0x80, 0xb4,
+				0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8,
+			},
+			want: "6ba7b811-9dad-11d1-80b4-00c04fd430c8",
+		},
+		{
+			uuid: Tuuid{
+				0x6b, 0xa7, 0xb8, 0x12,
+				0x9d, 0xad,
+				0x11, 0xd1,
+				0x80, 0xb4,
+				0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8,
+			},
+			want: "6ba7b812-9dad-11d1-80b4-00c04fd430c8",
+		},
+		{
+			uuid: Tuuid{
+				0x6b, 0xa7, 0xb8, 0x14,
+				0x9d, 0xad,
+				0x11, 0xd1,
+				0x80, 0xb4,
+				0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8,
+			},
+			want: "6ba7b814-9dad-11d1-80b4-00c04fd430c8",
+		},
+	} {
+		t.Run(fmt.Sprintf("% 02x", c.uuid[:]), func(t *testing.T) {
+			got := c.uuid.String()
+			if got != c.want {
+				t.Errorf("got %q, want %q", got, c.want)
+			}
+		})
+	}
+}
+
+func TestUUIDParse(t *testing.T) {
+	for _, c := range []struct {
+		uuid string
+		want Tuuid
+		err  bool
+	}{
+		{
+			uuid: "00000000-0000-0000-0000-000000000000",
+			want: Tuuid{
+				0x00, 0x00, 0x00, 0x00,
+				0x00, 0x00,
+				0x00, 0x00,
+				0x00, 0x00,
+				0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			},
+		},
+		{
+			uuid: "6BA7B810-9DAD-11D1-80B4-00C04FD430C8",
+			want: Tuuid{
+				0x6B, 0xA7, 0xB8, 0x10,
+				0x9D, 0xAD,
+				0x11, 0xD1,
+				0x80, 0xB4,
+				0x00, 0xC0, 0x4F, 0xD4, 0x30, 0xC8,
+			},
+		},
+		{
+			uuid: "6ba7B811-9dAd-11d1-80b4-00c04fd430c8",
+			want: Tuuid{
+				0x6b, 0xa7, 0xB8, 0x11,
+				0x9d, 0xAd,
+				0x11, 0xd1,
+				0x80, 0xb4,
+				0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8,
+			},
+		},
+		{
+			uuid: "6ba7b812-9dad-11d1-80b4-00c04fd430c8",
+			want: Tuuid{
+				0x6b, 0xa7, 0xb8, 0x12,
+				0x9d, 0xad,
+				0x11, 0xd1,
+				0x80, 0xb4,
+				0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8,
+			},
+		},
+		{
+			uuid: "6ba7b814-9dad-11d1-80b4-00c04fd430c8",
+			want: Tuuid{
+				0x6b, 0xa7, 0xb8, 0x14,
+				0x9d, 0xad,
+				0x11, 0xd1,
+				0x80, 0xb4,
+				0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8,
+			},
+		},
+		{
+			uuid: "00000000000000000000000000000000",
+			err:  true, // not in canonical form
+		},
+		{
+			uuid: "6ba7b810-9d-ad11d1-80b4-00c04fd430c8",
+			err:  true, // wrong position of hyphens
+		},
+		{
+			uuid: "urn:uuid:6ba7b811-9dad-11d1-80b4-00c04fd430c8",
+			err:  true, // urn form is not supported
+		},
+		{
+			uuid: "{6ba7b812-9dad-11d1-80b4-00c04fd430c8}",
+			err:  true, // guid with braces form is not supported
+		},
+		{
+			uuid: "6xa7b814-9dad-11d1-80b4-00c04fd430c8",
+			err:  true, // non-hex numbers
+		},
+	} {
+		t.Run(c.uuid, func(t *testing.T) {
+			uuid, err := ParseTuuid(c.uuid)
+			if c.err {
+				if err == nil {
+					t.Errorf("Got %v, want error", uuid)
+				}
+			} else {
+				if err != nil {
+					t.Errorf("Failed to parse: %v", err)
+				}
+				if uuid != c.want {
+					t.Errorf("Got %v, want %v", uuid, c.want)
+				}
+			}
+		})
+	}
+}
+
+func TestUUIDQuick(t *testing.T) {
+	f := func(u Tuuid) bool {
+		s := u.String()
+		parsed, err := ParseTuuid(s)
+		if err != nil {
+			t.Error(err)
+		}
+		if parsed != u {
+			t.Errorf("Parsed %v want %v", parsed, u)
+		}
+		return !t.Failed()
+	}
+	if err := quick.Check(f, nil); err != nil {
+		t.Error(err)
+	}
+}
+
+func BenchmarkUUIDParse(b *testing.B) {
+	for _, s := range []string{
+		"00000000-0000-0000-0000-000000000000",
+		"6ba7b810-9dad-11d1-80b4-00c04fd430c8",
+		"6ba7b811-9dad-11d1-80b4-00c04fd430c8",
+		"6ba7b812-9dad-11d1-80b4-00c04fd430c8",
+		"6ba7b814-9dad-11d1-80b4-00c04fd430c8",
+	} {
+		b.Run(s, func(b *testing.B) {
+			b.ReportAllocs()
+			if _, err := ParseTuuid(s); err != nil {
+				b.Fatalf("Unable to parse %q: %v", s, err)
+			}
+			b.ResetTimer()
+			b.RunParallel(func(pb *testing.PB) {
+				for pb.Next() {
+					ParseTuuid(s)
+				}
+			})
+		})
+	}
+}
+
+func BenchmarkUUIDString(b *testing.B) {
+	for _, u := range []Tuuid{
+		{},
+		Must(ParseTuuid("6ba7b810-9dad-11d1-80b4-00c04fd430c8")),
+		Must(ParseTuuid("6ba7b811-9dad-11d1-80b4-00c04fd430c8")),
+		Must(ParseTuuid("6ba7b812-9dad-11d1-80b4-00c04fd430c8")),
+		Must(ParseTuuid("6ba7b814-9dad-11d1-80b4-00c04fd430c8")),
+	} {
+		b.Run(u.String(), func(b *testing.B) {
+			b.ReportAllocs()
+			b.RunParallel(func(pb *testing.PB) {
+				for pb.Next() {
+					_ = u.String()
+				}
+			})
+		})
+	}
+}